@sisense/sdk-ui-angular 1.5.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm2020/lib/component-wrapper-helpers/context-connectors.mjs +13 -1
- package/dist/esm2020/lib/components/charts/area-chart.component.mjs +137 -0
- package/dist/esm2020/lib/components/charts/areamap-chart.component.mjs +100 -0
- package/dist/esm2020/lib/components/charts/bar-chart.component.mjs +136 -0
- package/dist/esm2020/lib/components/charts/boxplot-chart.component.mjs +129 -0
- package/dist/esm2020/lib/components/charts/chart.component.mjs +171 -0
- package/dist/esm2020/lib/components/charts/column-chart.component.mjs +137 -0
- package/dist/esm2020/lib/components/charts/funnel-chart.component.mjs +135 -0
- package/dist/esm2020/lib/components/charts/index.mjs +18 -0
- package/dist/esm2020/lib/components/charts/indicator-chart.component.mjs +107 -0
- package/dist/esm2020/lib/components/charts/line-chart.component.mjs +135 -0
- package/dist/esm2020/lib/components/charts/pie-chart.component.mjs +137 -0
- package/dist/esm2020/lib/components/charts/pivot-table.component.mjs +116 -0
- package/dist/esm2020/lib/components/charts/polar-chart.component.mjs +136 -0
- package/dist/esm2020/lib/components/charts/scatter-chart.component.mjs +140 -0
- package/dist/esm2020/lib/components/charts/scattermap-chart.component.mjs +108 -0
- package/dist/esm2020/lib/components/charts/sunburst-chart.component.mjs +137 -0
- package/dist/esm2020/lib/components/charts/table.component.mjs +94 -0
- package/dist/esm2020/lib/components/{treemap-chart.component.mjs → charts/treemap-chart.component.mjs} +52 -1
- package/dist/esm2020/lib/components/context-menu.component.mjs +3 -1
- package/dist/esm2020/lib/components/drilldown-breadcrumbs.component.mjs +3 -1
- package/dist/esm2020/lib/components/filters/basic-member-filter-tile.component.mjs +62 -0
- package/dist/esm2020/lib/components/filters/date-range-filter-tile.component.mjs +141 -0
- package/dist/esm2020/lib/components/filters/index.mjs +4 -0
- package/dist/esm2020/lib/components/filters/member-filter-tile.component.mjs +131 -0
- package/dist/esm2020/lib/components/index.mjs +4 -25
- package/dist/esm2020/lib/components/widgets/chart-widget.component.mjs +167 -0
- package/dist/esm2020/lib/components/widgets/dashboard-widget.component.mjs +116 -0
- package/dist/esm2020/lib/components/widgets/drilldown-widget.component.mjs +174 -0
- package/dist/esm2020/lib/components/widgets/index.mjs +5 -0
- package/dist/esm2020/lib/components/widgets/table-widget.component.mjs +104 -0
- package/dist/esm2020/lib/sdk-ui.module.mjs +3 -1
- package/dist/esm2020/lib/services/dashboard.service.mjs +7 -1
- package/dist/esm2020/lib/services/query.service.mjs +7 -2
- package/dist/esm2020/lib/services/sisense-context.service.mjs +7 -1
- package/dist/esm2020/lib/services/theme.service.mjs +7 -1
- package/dist/esm2020/public-api.mjs +9 -2
- package/dist/esm2020/version.mjs +2 -2
- package/dist/fesm2015/sisense-sdk-ui-angular.mjs +1723 -709
- package/dist/fesm2015/sisense-sdk-ui-angular.mjs.map +1 -1
- package/dist/fesm2020/sisense-sdk-ui-angular.mjs +1724 -710
- package/dist/fesm2020/sisense-sdk-ui-angular.mjs.map +1 -1
- package/dist/lib/component-wrapper-helpers/context-connectors.d.ts +12 -0
- package/dist/lib/components/{area-chart.component.d.ts → charts/area-chart.component.d.ts} +53 -2
- package/dist/lib/components/{areamap-chart.component.d.ts → charts/areamap-chart.component.d.ts} +40 -1
- package/dist/lib/components/{bar-chart.component.d.ts → charts/bar-chart.component.d.ts} +52 -2
- package/dist/lib/components/{boxplot-chart.component.d.ts → charts/boxplot-chart.component.d.ts} +45 -2
- package/dist/lib/components/{chart.component.d.ts → charts/chart.component.d.ts} +6 -4
- package/dist/lib/components/{column-chart.component.d.ts → charts/column-chart.component.d.ts} +53 -2
- package/dist/lib/components/{funnel-chart.component.d.ts → charts/funnel-chart.component.d.ts} +52 -2
- package/dist/lib/components/charts/index.d.ts +17 -0
- package/dist/lib/components/{indicator-chart.component.d.ts → charts/indicator-chart.component.d.ts} +57 -1
- package/dist/lib/components/{line-chart.component.d.ts → charts/line-chart.component.d.ts} +52 -2
- package/dist/lib/components/{pie-chart.component.d.ts → charts/pie-chart.component.d.ts} +53 -2
- package/dist/lib/components/{pivot-table.component.d.ts → charts/pivot-table.component.d.ts} +53 -2
- package/dist/lib/components/{polar-chart.component.d.ts → charts/polar-chart.component.d.ts} +53 -2
- package/dist/lib/components/{scatter-chart.component.d.ts → charts/scatter-chart.component.d.ts} +50 -2
- package/dist/lib/components/{scattermap-chart.component.d.ts → charts/scattermap-chart.component.d.ts} +49 -2
- package/dist/lib/components/{sunburst-chart.component.d.ts → charts/sunburst-chart.component.d.ts} +53 -2
- package/dist/lib/components/{table.component.d.ts → charts/table.component.d.ts} +32 -2
- package/dist/lib/components/{treemap-chart.component.d.ts → charts/treemap-chart.component.d.ts} +53 -2
- package/dist/lib/components/context-menu.component.d.ts +2 -0
- package/dist/lib/components/drilldown-breadcrumbs.component.d.ts +2 -0
- package/dist/lib/components/{date-range-filter-tile.component.d.ts → filters/date-range-filter-tile.component.d.ts} +43 -3
- package/dist/lib/components/filters/index.d.ts +3 -0
- package/dist/lib/components/{member-filter-tile.component.d.ts → filters/member-filter-tile.component.d.ts} +39 -3
- package/dist/lib/components/index.d.ts +3 -24
- package/dist/lib/components/{chart-widget.component.d.ts → widgets/chart-widget.component.d.ts} +58 -3
- package/dist/lib/components/{dashboard-widget.component.d.ts → widgets/dashboard-widget.component.d.ts} +27 -2
- package/dist/lib/components/{drilldown-widget.component.d.ts → widgets/drilldown-widget.component.d.ts} +5 -2
- package/dist/lib/components/widgets/index.d.ts +4 -0
- package/dist/lib/components/{table-widget.component.d.ts → widgets/table-widget.component.d.ts} +37 -2
- package/dist/lib/sdk-ui.module.d.ts +26 -24
- package/dist/lib/services/dashboard.service.d.ts +6 -0
- package/dist/lib/services/query.service.d.ts +6 -1
- package/dist/lib/services/sisense-context.service.d.ts +6 -0
- package/dist/lib/services/theme.service.d.ts +6 -0
- package/dist/package.json +1 -1
- package/dist/public-api.d.ts +8 -1
- package/dist/version.d.ts +1 -1
- package/package.json +4 -4
- package/dist/esm2020/lib/components/area-chart.component.mjs +0 -86
- package/dist/esm2020/lib/components/areamap-chart.component.mjs +0 -61
- package/dist/esm2020/lib/components/bar-chart.component.mjs +0 -86
- package/dist/esm2020/lib/components/basic-member-filter-tile.component.mjs +0 -62
- package/dist/esm2020/lib/components/boxplot-chart.component.mjs +0 -86
- package/dist/esm2020/lib/components/chart-widget.component.mjs +0 -112
- package/dist/esm2020/lib/components/chart.component.mjs +0 -169
- package/dist/esm2020/lib/components/column-chart.component.mjs +0 -86
- package/dist/esm2020/lib/components/dashboard-widget.component.mjs +0 -91
- package/dist/esm2020/lib/components/date-range-filter-tile.component.mjs +0 -101
- package/dist/esm2020/lib/components/drilldown-widget.component.mjs +0 -171
- package/dist/esm2020/lib/components/funnel-chart.component.mjs +0 -85
- package/dist/esm2020/lib/components/indicator-chart.component.mjs +0 -51
- package/dist/esm2020/lib/components/line-chart.component.mjs +0 -85
- package/dist/esm2020/lib/components/member-filter-tile.component.mjs +0 -95
- package/dist/esm2020/lib/components/pie-chart.component.mjs +0 -86
- package/dist/esm2020/lib/components/pivot-table.component.mjs +0 -65
- package/dist/esm2020/lib/components/polar-chart.component.mjs +0 -85
- package/dist/esm2020/lib/components/scatter-chart.component.mjs +0 -92
- package/dist/esm2020/lib/components/scattermap-chart.component.mjs +0 -61
- package/dist/esm2020/lib/components/sunburst-chart.component.mjs +0 -86
- package/dist/esm2020/lib/components/table-widget.component.mjs +0 -69
- package/dist/esm2020/lib/components/table.component.mjs +0 -64
- /package/dist/lib/components/{basic-member-filter-tile.component.d.ts → filters/basic-member-filter-tile.component.d.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { EventEmitter, Component, ViewChild, Input, Output, InjectionToken, Injectable, Inject, NgModule, Optional } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
|
-
import { ComponentAdapter, createElement, BasicMemberFilterTile, createContextProviderRenderer, CustomThemeProvider, CustomSisenseContextProvider, createClientApplication, executeQuery, executeQueryByWidgetId, getDashboardModel, getDashboardModels, getDefaultThemeSettings, getThemeSettingsByOid, Chart, Table,
|
|
4
|
+
import { ComponentAdapter, createElement, BasicMemberFilterTile, createContextProviderRenderer, CustomThemeProvider, CustomSisenseContextProvider, createClientApplication, executeQuery, executeQueryByWidgetId, getDashboardModel, getDashboardModels, getDefaultThemeSettings, getThemeSettingsByOid, MemberFilterTile, DateRangeFilterTile, Chart, Table, PivotTable, TableWidget, DashboardWidget, createWrapperElementHandler, createWrapperElement, DrilldownWidget, createComponentRenderer, ChartWidget, DrilldownBreadcrumbs, ContextMenu } from '@sisense/sdk-ui-preact';
|
|
5
5
|
export { boxWhiskerProcessResult } from '@sisense/sdk-ui-preact';
|
|
6
6
|
import { map, BehaviorSubject } from 'rxjs';
|
|
7
7
|
import { __decorate } from 'tslib';
|
|
@@ -80,6 +80,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
80
80
|
type: Output
|
|
81
81
|
}] } });
|
|
82
82
|
|
|
83
|
+
/**
|
|
84
|
+
* Creates theme context connector
|
|
85
|
+
*
|
|
86
|
+
* @param themeService - The theme service
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
83
89
|
const createThemeContextConnector = (themeService) => {
|
|
84
90
|
return {
|
|
85
91
|
prepareContext() {
|
|
@@ -91,6 +97,12 @@ const createThemeContextConnector = (themeService) => {
|
|
|
91
97
|
renderContextProvider: createContextProviderRenderer(CustomThemeProvider),
|
|
92
98
|
};
|
|
93
99
|
};
|
|
100
|
+
/**
|
|
101
|
+
* Creates Sisense context connector
|
|
102
|
+
*
|
|
103
|
+
* @param sisenseContextService - The Sisense context service
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
94
106
|
const createSisenseContextConnector = (sisenseContextService) => {
|
|
95
107
|
return {
|
|
96
108
|
async prepareContext() {
|
|
@@ -135,8 +147,14 @@ const createSisenseContextConnector = (sisenseContextService) => {
|
|
|
135
147
|
* bootstrap: [AppComponent],
|
|
136
148
|
* })
|
|
137
149
|
* ```
|
|
150
|
+
* @group Contexts
|
|
138
151
|
*/
|
|
139
152
|
const SISENSE_CONTEXT_CONFIG_TOKEN = new InjectionToken('Props for connecting to Sisense instance');
|
|
153
|
+
/**
|
|
154
|
+
* Service for working with Sisense Fusion context.
|
|
155
|
+
*
|
|
156
|
+
* @group Contexts
|
|
157
|
+
*/
|
|
140
158
|
class SisenseContextService {
|
|
141
159
|
constructor(sisenseContextConfig) {
|
|
142
160
|
this.appPromise = createClientApplication(sisenseContextConfig);
|
|
@@ -167,6 +185,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
167
185
|
args: [SISENSE_CONTEXT_CONFIG_TOKEN]
|
|
168
186
|
}] }]; } });
|
|
169
187
|
|
|
188
|
+
/**
|
|
189
|
+
* Service for executing data queries.
|
|
190
|
+
*
|
|
191
|
+
* @group Queries
|
|
192
|
+
*/
|
|
170
193
|
let QueryService = class QueryService {
|
|
171
194
|
constructor(sisenseContextService) {
|
|
172
195
|
this.sisenseContextService = sisenseContextService;
|
|
@@ -179,7 +202,7 @@ let QueryService = class QueryService {
|
|
|
179
202
|
* [External Charts Guide](/guides/sdk/guides/charts/guide-external-charts.html#query)
|
|
180
203
|
*
|
|
181
204
|
* @param params - Query parameters
|
|
182
|
-
* return Query result
|
|
205
|
+
* @return Query result
|
|
183
206
|
*/
|
|
184
207
|
async executeQuery(params) {
|
|
185
208
|
const { dataSource, dimensions, measures, filters, highlights, count, offset, onBeforeQuery } = params;
|
|
@@ -223,6 +246,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
223
246
|
}]
|
|
224
247
|
}], ctorParameters: function () { return [{ type: SisenseContextService }]; } });
|
|
225
248
|
|
|
249
|
+
/**
|
|
250
|
+
* Service for working with Sisense Fusion dashboards.
|
|
251
|
+
*
|
|
252
|
+
* @group Fusion Embed
|
|
253
|
+
* @fusionEmbed
|
|
254
|
+
*/
|
|
226
255
|
let DashboardService = class DashboardService {
|
|
227
256
|
constructor(sisenseContextService) {
|
|
228
257
|
this.sisenseContextService = sisenseContextService;
|
|
@@ -277,7 +306,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
277
306
|
}]
|
|
278
307
|
}], ctorParameters: function () { return [{ type: SisenseContextService }]; } });
|
|
279
308
|
|
|
280
|
-
var packageVersion = '1.
|
|
309
|
+
var packageVersion = '1.7.0';
|
|
281
310
|
|
|
282
311
|
function Trackable(target, propertyKey, descriptor) {
|
|
283
312
|
const originalMethod = descriptor.value;
|
|
@@ -350,8 +379,14 @@ async function track(action, methodName) {
|
|
|
350
379
|
* bootstrap: [AppComponent],
|
|
351
380
|
* })
|
|
352
381
|
* ```
|
|
382
|
+
* @group Contexts
|
|
353
383
|
*/
|
|
354
384
|
const THEME_CONFIG_TOKEN = new InjectionToken('theme configuration');
|
|
385
|
+
/**
|
|
386
|
+
* Service for working with Sisense Fusion themes.
|
|
387
|
+
*
|
|
388
|
+
* @group Contexts
|
|
389
|
+
*/
|
|
355
390
|
let ThemeService = class ThemeService {
|
|
356
391
|
constructor(sisenseContextService, themeConfig) {
|
|
357
392
|
this.sisenseContextService = sisenseContextService;
|
|
@@ -406,6 +441,264 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
406
441
|
args: [THEME_CONFIG_TOKEN]
|
|
407
442
|
}] }]; } });
|
|
408
443
|
|
|
444
|
+
/**
|
|
445
|
+
* Member Filter Tile Component
|
|
446
|
+
*
|
|
447
|
+
* @example
|
|
448
|
+
* ```html
|
|
449
|
+
* <csdk-member-filter-tile
|
|
450
|
+
* title="Years Filter"
|
|
451
|
+
* [attribute]="DM.ER.Date.Years"
|
|
452
|
+
* [filter]="memberFilterTileProps.yearFilter"
|
|
453
|
+
* (filterChange)="memberFilterTileProps.setYearFilter($event)"
|
|
454
|
+
* />
|
|
455
|
+
* ```
|
|
456
|
+
* ```ts
|
|
457
|
+
* import { Component } from '@angular/core';
|
|
458
|
+
* import { Member } from '@sisense/sdk-ui-angular';
|
|
459
|
+
* import { Filter, filterFactory } from '@sisense/sdk-data';
|
|
460
|
+
* import * as DM from '../../assets/sample-healthcare-model';
|
|
461
|
+
*
|
|
462
|
+
* @Component({
|
|
463
|
+
* selector: 'app-filters',
|
|
464
|
+
* templateUrl: './filters.component.html',
|
|
465
|
+
* styleUrls: ['./filters.component.scss'],
|
|
466
|
+
* })
|
|
467
|
+
* export class FiltersComponent {
|
|
468
|
+
* DM = DM;
|
|
469
|
+
* memberFilterTileProps = {
|
|
470
|
+
* yearFilter: filterFactory.members(DM.ER.Date.Years, ['2013-01-01T00:00:00']),
|
|
471
|
+
* setYearFilter({ filter }: { filter: Filter | null }) {
|
|
472
|
+
* if (filter) {
|
|
473
|
+
* this.yearFilter = filter;
|
|
474
|
+
* }
|
|
475
|
+
* },
|
|
476
|
+
* };
|
|
477
|
+
* }
|
|
478
|
+
* ```
|
|
479
|
+
* <img src="media://angular-member-filter-tile-example.png" width="800px" />
|
|
480
|
+
*
|
|
481
|
+
* @group Filter Tiles
|
|
482
|
+
*/
|
|
483
|
+
class MemberFilterTileComponent {
|
|
484
|
+
/**
|
|
485
|
+
* Constructor for the `MemberFilterTileComponent`.
|
|
486
|
+
*
|
|
487
|
+
* @param sisenseContextService - Sisense context service
|
|
488
|
+
* @param themeService - Theme service
|
|
489
|
+
*/
|
|
490
|
+
constructor(
|
|
491
|
+
/**
|
|
492
|
+
* Sisense context service
|
|
493
|
+
*
|
|
494
|
+
* @category Constructor
|
|
495
|
+
*/
|
|
496
|
+
sisenseContextService,
|
|
497
|
+
/**
|
|
498
|
+
* Theme service
|
|
499
|
+
*
|
|
500
|
+
* @category Constructor
|
|
501
|
+
*/
|
|
502
|
+
themeService) {
|
|
503
|
+
this.sisenseContextService = sisenseContextService;
|
|
504
|
+
this.themeService = themeService;
|
|
505
|
+
/**
|
|
506
|
+
* {@inheritDoc @sisense/sdk-ui!MemberFilterTileProps.onChange}
|
|
507
|
+
*/
|
|
508
|
+
this.filterChange = new EventEmitter();
|
|
509
|
+
this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
|
|
510
|
+
createSisenseContextConnector(this.sisenseContextService),
|
|
511
|
+
createThemeContextConnector(this.themeService),
|
|
512
|
+
]);
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* @internal
|
|
516
|
+
*/
|
|
517
|
+
ngAfterViewInit() {
|
|
518
|
+
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* @internal
|
|
522
|
+
*/
|
|
523
|
+
ngOnChanges() {
|
|
524
|
+
if (this.preactRef) {
|
|
525
|
+
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
createPreactComponent() {
|
|
529
|
+
const props = {
|
|
530
|
+
title: this.title,
|
|
531
|
+
dataSource: this.dataSource,
|
|
532
|
+
attribute: this.attribute,
|
|
533
|
+
filter: this.filter,
|
|
534
|
+
onChange: (...[filter]) => this.filterChange.emit({ filter }),
|
|
535
|
+
};
|
|
536
|
+
return createElement(MemberFilterTile, props);
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* @internal
|
|
540
|
+
*/
|
|
541
|
+
ngOnDestroy() {
|
|
542
|
+
this.componentAdapter.destroy();
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
MemberFilterTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MemberFilterTileComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
546
|
+
MemberFilterTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MemberFilterTileComponent, selector: "csdk-member-filter-tile", inputs: { title: "title", dataSource: "dataSource", attribute: "attribute", filter: "filter" }, outputs: { filterChange: "filterChange" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
|
|
547
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MemberFilterTileComponent, decorators: [{
|
|
548
|
+
type: Component,
|
|
549
|
+
args: [{
|
|
550
|
+
selector: 'csdk-member-filter-tile',
|
|
551
|
+
template,
|
|
552
|
+
}]
|
|
553
|
+
}], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
|
|
554
|
+
type: ViewChild,
|
|
555
|
+
args: [rootId]
|
|
556
|
+
}], title: [{
|
|
557
|
+
type: Input
|
|
558
|
+
}], dataSource: [{
|
|
559
|
+
type: Input
|
|
560
|
+
}], attribute: [{
|
|
561
|
+
type: Input
|
|
562
|
+
}], filter: [{
|
|
563
|
+
type: Input
|
|
564
|
+
}], filterChange: [{
|
|
565
|
+
type: Output
|
|
566
|
+
}] } });
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Date Range Filter Tile Component
|
|
570
|
+
*
|
|
571
|
+
* @example
|
|
572
|
+
* ```html
|
|
573
|
+
* <csdk-date-range-filter-tile
|
|
574
|
+
* title="dateRangeFilterTileProps.title"
|
|
575
|
+
* [attribute]="dateRangeFilterTileProps.attribute"
|
|
576
|
+
* [filter]="dateRangeFilterTileProps.filter"
|
|
577
|
+
* (filterChange)="dateRangeFilterTileProps.setFilter($event)"
|
|
578
|
+
* />
|
|
579
|
+
* ```
|
|
580
|
+
* ```ts
|
|
581
|
+
* import { Component } from '@angular/core';
|
|
582
|
+
* import { Member } from '@sisense/sdk-ui-angular';
|
|
583
|
+
* import { Filter, filterFactory } from '@sisense/sdk-data';
|
|
584
|
+
* import * as DM from '../../assets/sample-healthcare-model';
|
|
585
|
+
*
|
|
586
|
+
* @Component({
|
|
587
|
+
* selector: 'app-filters',
|
|
588
|
+
* templateUrl: './filters.component.html',
|
|
589
|
+
* styleUrls: ['./filters.component.scss'],
|
|
590
|
+
* })
|
|
591
|
+
* export class FiltersComponent {
|
|
592
|
+
* DM = DM;
|
|
593
|
+
|
|
594
|
+
* dateRangeFilterTileProps = {
|
|
595
|
+
* title: 'Range Filter',
|
|
596
|
+
* attribute: DM.ER.Date.Years,
|
|
597
|
+
* filter: filterFactory.dateRange(DM.ER.Date.Years),
|
|
598
|
+
* setFilter({ filter }: { filter: Filter | null }) {
|
|
599
|
+
* console.log(filter);
|
|
600
|
+
* if (filter) {
|
|
601
|
+
* this.filter = filter;
|
|
602
|
+
* }
|
|
603
|
+
* },
|
|
604
|
+
* };
|
|
605
|
+
* }
|
|
606
|
+
* ```
|
|
607
|
+
* <img src="media://angular-date-range-filter-tile-example.png" width="800px" />
|
|
608
|
+
*
|
|
609
|
+
* @group Filter Tiles
|
|
610
|
+
*/
|
|
611
|
+
class DateRangeFilterTileComponent {
|
|
612
|
+
/**
|
|
613
|
+
* Constructor for the `DateRangeFilterTileComponent`.
|
|
614
|
+
*
|
|
615
|
+
* @param sisenseContextService - Sisense context service
|
|
616
|
+
* @param themeService - Theme service
|
|
617
|
+
*/
|
|
618
|
+
constructor(
|
|
619
|
+
/**
|
|
620
|
+
* Sisense context service
|
|
621
|
+
*
|
|
622
|
+
* @category Constructor
|
|
623
|
+
*/
|
|
624
|
+
sisenseContextService,
|
|
625
|
+
/**
|
|
626
|
+
* Theme service
|
|
627
|
+
*
|
|
628
|
+
* @category Constructor
|
|
629
|
+
*/
|
|
630
|
+
themeService) {
|
|
631
|
+
this.sisenseContextService = sisenseContextService;
|
|
632
|
+
this.themeService = themeService;
|
|
633
|
+
/**
|
|
634
|
+
* {@inheritDoc @sisense/sdk-ui!DateRangeFilterTileProps.onChange}
|
|
635
|
+
*/
|
|
636
|
+
this.filterChange = new EventEmitter();
|
|
637
|
+
this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
|
|
638
|
+
createSisenseContextConnector(this.sisenseContextService),
|
|
639
|
+
createThemeContextConnector(this.themeService),
|
|
640
|
+
]);
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* @internal
|
|
644
|
+
*/
|
|
645
|
+
ngAfterViewInit() {
|
|
646
|
+
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
647
|
+
}
|
|
648
|
+
/**
|
|
649
|
+
* @internal
|
|
650
|
+
*/
|
|
651
|
+
ngOnChanges() {
|
|
652
|
+
if (this.preactRef) {
|
|
653
|
+
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
createPreactComponent() {
|
|
657
|
+
const props = {
|
|
658
|
+
title: this.title,
|
|
659
|
+
attribute: this.attribute,
|
|
660
|
+
dataSource: this.dataSource,
|
|
661
|
+
filter: this.filter,
|
|
662
|
+
earliestDate: this.earliestDate,
|
|
663
|
+
lastDate: this.lastDate,
|
|
664
|
+
onChange: (...[filter]) => this.filterChange.emit({ filter }),
|
|
665
|
+
};
|
|
666
|
+
return createElement(DateRangeFilterTile, props);
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* @internal
|
|
670
|
+
*/
|
|
671
|
+
ngOnDestroy() {
|
|
672
|
+
this.componentAdapter.destroy();
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
DateRangeFilterTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateRangeFilterTileComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
676
|
+
DateRangeFilterTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DateRangeFilterTileComponent, selector: "csdk-date-range-filter-tile", inputs: { title: "title", attribute: "attribute", dataSource: "dataSource", filter: "filter", earliestDate: "earliestDate", lastDate: "lastDate" }, outputs: { filterChange: "filterChange" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
|
|
677
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateRangeFilterTileComponent, decorators: [{
|
|
678
|
+
type: Component,
|
|
679
|
+
args: [{
|
|
680
|
+
selector: 'csdk-date-range-filter-tile',
|
|
681
|
+
template,
|
|
682
|
+
}]
|
|
683
|
+
}], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
|
|
684
|
+
type: ViewChild,
|
|
685
|
+
args: [rootId]
|
|
686
|
+
}], title: [{
|
|
687
|
+
type: Input
|
|
688
|
+
}], attribute: [{
|
|
689
|
+
type: Input
|
|
690
|
+
}], dataSource: [{
|
|
691
|
+
type: Input
|
|
692
|
+
}], filter: [{
|
|
693
|
+
type: Input
|
|
694
|
+
}], earliestDate: [{
|
|
695
|
+
type: Input
|
|
696
|
+
}], lastDate: [{
|
|
697
|
+
type: Input
|
|
698
|
+
}], filterChange: [{
|
|
699
|
+
type: Output
|
|
700
|
+
}] } });
|
|
701
|
+
|
|
409
702
|
/**
|
|
410
703
|
* An Angular component used for easily switching chart types or rendering multiple series of different chart types.
|
|
411
704
|
*
|
|
@@ -452,7 +745,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
452
745
|
* />
|
|
453
746
|
* ```
|
|
454
747
|
*
|
|
455
|
-
* <img src="media://angular-chart-
|
|
748
|
+
* <img src="media://angular-chart-example.png" width="800px" />
|
|
749
|
+
*
|
|
750
|
+
* @group Charts
|
|
456
751
|
*/
|
|
457
752
|
class ChartComponent {
|
|
458
753
|
/**
|
|
@@ -570,6 +865,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
570
865
|
|
|
571
866
|
/**
|
|
572
867
|
* Table with aggregation and pagination.
|
|
868
|
+
*
|
|
869
|
+
* @example
|
|
870
|
+
* ```html
|
|
871
|
+
* <csdk-table [dataSet]="table.dataSet" [dataOptions]="table.dataOptions" [filters]="filters" />
|
|
872
|
+
* ```
|
|
873
|
+
* ```ts
|
|
874
|
+
import { Component } from '@angular/core';
|
|
875
|
+
import { measureFactory, filterFactory } from '@sisense/sdk-data';
|
|
876
|
+
import * as DM from '../../assets/sample-healthcare-model';
|
|
877
|
+
|
|
878
|
+
@Component({
|
|
879
|
+
selector: 'app-analytics',
|
|
880
|
+
templateUrl: './analytics.component.html',
|
|
881
|
+
styleUrls: ['./analytics.component.scss'],
|
|
882
|
+
})
|
|
883
|
+
export class AnalyticsComponent {
|
|
884
|
+
DM = DM;
|
|
885
|
+
filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
|
|
886
|
+
table = {
|
|
887
|
+
dataSet: DM.DataSource,
|
|
888
|
+
dataOptions: {
|
|
889
|
+
columns: [DM.Admissions.Patient_ID, measureFactory.sum(DM.Admissions.Cost_of_admission)],
|
|
890
|
+
},
|
|
891
|
+
};
|
|
892
|
+
|
|
893
|
+
}
|
|
894
|
+
* ```
|
|
895
|
+
* <img src="media://angular-table-chart-example.png" width="800px" />
|
|
896
|
+
*
|
|
897
|
+
* @group Data Grids
|
|
573
898
|
*/
|
|
574
899
|
class TableComponent {
|
|
575
900
|
constructor(sisenseContextService, themeService) {
|
|
@@ -626,114 +951,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
626
951
|
}] } });
|
|
627
952
|
|
|
628
953
|
/**
|
|
629
|
-
*
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
onDataPointsSelected: (...[points, nativeEvent]) => this.dataPointsSelect.emit({ points, nativeEvent }),
|
|
684
|
-
};
|
|
685
|
-
return createElement(ChartWidget, props);
|
|
686
|
-
}
|
|
687
|
-
/** @internal */
|
|
688
|
-
ngOnDestroy() {
|
|
689
|
-
this.componentAdapter.destroy();
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
ChartWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWidgetComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
693
|
-
ChartWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ChartWidgetComponent, selector: "csdk-chart-widget", inputs: { chartType: "chartType", dataSource: "dataSource", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions", drilldownOptions: "drilldownOptions", title: "title", description: "description", highlightSelectionDisabled: "highlightSelectionDisabled", beforeRender: "beforeRender" }, outputs: { dataPointClick: "dataPointClick", dataPointContextMenu: "dataPointContextMenu", dataPointsSelect: "dataPointsSelect" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
|
|
694
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWidgetComponent, decorators: [{
|
|
695
|
-
type: Component,
|
|
696
|
-
args: [{
|
|
697
|
-
selector: 'csdk-chart-widget',
|
|
698
|
-
template,
|
|
699
|
-
}]
|
|
700
|
-
}], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
|
|
701
|
-
type: ViewChild,
|
|
702
|
-
args: [rootId]
|
|
703
|
-
}], chartType: [{
|
|
704
|
-
type: Input
|
|
705
|
-
}], dataSource: [{
|
|
706
|
-
type: Input
|
|
707
|
-
}], dataOptions: [{
|
|
708
|
-
type: Input
|
|
709
|
-
}], filters: [{
|
|
710
|
-
type: Input
|
|
711
|
-
}], highlights: [{
|
|
712
|
-
type: Input
|
|
713
|
-
}], styleOptions: [{
|
|
714
|
-
type: Input
|
|
715
|
-
}], drilldownOptions: [{
|
|
716
|
-
type: Input
|
|
717
|
-
}], title: [{
|
|
718
|
-
type: Input
|
|
719
|
-
}], description: [{
|
|
720
|
-
type: Input
|
|
721
|
-
}], highlightSelectionDisabled: [{
|
|
722
|
-
type: Input
|
|
723
|
-
}], beforeRender: [{
|
|
724
|
-
type: Input
|
|
725
|
-
}], dataPointClick: [{
|
|
726
|
-
type: Output
|
|
727
|
-
}], dataPointContextMenu: [{
|
|
728
|
-
type: Output
|
|
729
|
-
}], dataPointsSelect: [{
|
|
730
|
-
type: Output
|
|
731
|
-
}] } });
|
|
732
|
-
|
|
733
|
-
/**
|
|
734
|
-
* A component representing categorical data with vertical rectangular bars
|
|
735
|
-
* whose heights are proportional to the values that they represent.
|
|
736
|
-
* See [Column Chart](https://docs.sisense.com/main/SisenseLinux/column-chart.htm) for more information.
|
|
954
|
+
* A component representing categorical data with vertical rectangular bars
|
|
955
|
+
* whose heights are proportional to the values that they represent.
|
|
956
|
+
* See [Column Chart](https://docs.sisense.com/main/SisenseLinux/column-chart.htm) for more information.
|
|
957
|
+
*
|
|
958
|
+
* @example
|
|
959
|
+
* ```html
|
|
960
|
+
* <csdk-column-chart
|
|
961
|
+
* [dataSet]="chart.dataSet"
|
|
962
|
+
* [dataOptions]="chart.dataOptions"
|
|
963
|
+
* [highlights]="filters"
|
|
964
|
+
* [beforeRender]="onBeforeRender"
|
|
965
|
+
* (dataPointClick)="logArguments($event)"
|
|
966
|
+
* (dataPointContextMenu)="logArguments($event)"
|
|
967
|
+
* (dataPointsSelect)="logArguments($event)"
|
|
968
|
+
* />
|
|
969
|
+
* ```
|
|
970
|
+
* ```ts
|
|
971
|
+
import { Component } from '@angular/core';
|
|
972
|
+
import { measureFactory, filterFactory } from '@sisense/sdk-data';
|
|
973
|
+
import * as DM from '../../assets/sample-healthcare-model';
|
|
974
|
+
import type { ChartType } from '@sisense/sdk-ui-angular';
|
|
975
|
+
|
|
976
|
+
@Component({
|
|
977
|
+
selector: 'app-analytics',
|
|
978
|
+
templateUrl: './analytics.component.html',
|
|
979
|
+
styleUrls: ['./analytics.component.scss'],
|
|
980
|
+
})
|
|
981
|
+
export class AnalyticsComponent {
|
|
982
|
+
DM = DM;
|
|
983
|
+
filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
|
|
984
|
+
chart = {
|
|
985
|
+
chartType: 'column' as ChartType,
|
|
986
|
+
dataSet: DM.DataSource,
|
|
987
|
+
dataOptions: {
|
|
988
|
+
category: [DM.Divisions.Divison_name],
|
|
989
|
+
value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
|
|
990
|
+
breakBy: [],
|
|
991
|
+
},
|
|
992
|
+
};
|
|
993
|
+
|
|
994
|
+
onBeforeRender(options: any) {
|
|
995
|
+
console.log('beforeRender');
|
|
996
|
+
console.log(options);
|
|
997
|
+
return options;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
logArguments(...args: any[]) {
|
|
1001
|
+
console.log(args);
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
* ```
|
|
1005
|
+
* <img src="media://angular-column-chart-example.png" width="800px" />
|
|
1006
|
+
*
|
|
1007
|
+
* @group Charts
|
|
737
1008
|
*/
|
|
738
1009
|
class ColumnChartComponent {
|
|
739
1010
|
constructor() {
|
|
@@ -817,6 +1088,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
817
1088
|
* A component representing categorical data with horizontal rectangular bars,
|
|
818
1089
|
* whose lengths are proportional to the values that they represent.
|
|
819
1090
|
* See [Bar Chart](https://docs.sisense.com/main/SisenseLinux/bar-chart.htm) for more information.
|
|
1091
|
+
*
|
|
1092
|
+
* @example
|
|
1093
|
+
* ```html
|
|
1094
|
+
* <csdk-bar-chart
|
|
1095
|
+
* [dataSet]="chart.dataSet"
|
|
1096
|
+
* [dataOptions]="chart.dataOptions"
|
|
1097
|
+
* [highlights]="filters"
|
|
1098
|
+
* [beforeRender]="onBeforeRender"
|
|
1099
|
+
* (dataPointClick)="logArguments($event)"
|
|
1100
|
+
* (dataPointContextMenu)="logArguments($event)"
|
|
1101
|
+
* (dataPointsSelect)="logArguments($event)"
|
|
1102
|
+
* /> * ```
|
|
1103
|
+
* ```ts
|
|
1104
|
+
import { Component } from '@angular/core';
|
|
1105
|
+
import { measureFactory, filterFactory } from '@sisense/sdk-data';
|
|
1106
|
+
import * as DM from '../../assets/sample-healthcare-model';
|
|
1107
|
+
import type { ChartType } from '@sisense/sdk-ui-angular';
|
|
1108
|
+
|
|
1109
|
+
@Component({
|
|
1110
|
+
selector: 'app-analytics',
|
|
1111
|
+
templateUrl: './analytics.component.html',
|
|
1112
|
+
styleUrls: ['./analytics.component.scss'],
|
|
1113
|
+
})
|
|
1114
|
+
export class AnalyticsComponent {
|
|
1115
|
+
DM = DM;
|
|
1116
|
+
filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
|
|
1117
|
+
chart = {
|
|
1118
|
+
chartType: 'column' as ChartType,
|
|
1119
|
+
dataSet: DM.DataSource,
|
|
1120
|
+
dataOptions: {
|
|
1121
|
+
category: [DM.Divisions.Divison_name],
|
|
1122
|
+
value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
|
|
1123
|
+
breakBy: [],
|
|
1124
|
+
},
|
|
1125
|
+
};
|
|
1126
|
+
|
|
1127
|
+
onBeforeRender(options: any) {
|
|
1128
|
+
console.log('beforeRender');
|
|
1129
|
+
console.log(options);
|
|
1130
|
+
return options;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
logArguments(...args: any[]) {
|
|
1134
|
+
console.log(args);
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
* ```
|
|
1138
|
+
* <img src="media://angular-bar-chart-example.png" width="800px" />
|
|
1139
|
+
*
|
|
1140
|
+
* @group Charts
|
|
820
1141
|
*/
|
|
821
1142
|
class BarChartComponent {
|
|
822
1143
|
constructor() {
|
|
@@ -900,6 +1221,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
900
1221
|
* A component similar to a {@link LineChartComponent},
|
|
901
1222
|
* but with filled in areas under each line and an option to display them as stacked.
|
|
902
1223
|
* More info on [Sisense Documentation page](https://docs.sisense.com/main/SisenseLinux/area-chart.htm).
|
|
1224
|
+
*
|
|
1225
|
+
* @example
|
|
1226
|
+
* ```html
|
|
1227
|
+
* <csdk-area-chart
|
|
1228
|
+
* [dataSet]="chart.dataSet"
|
|
1229
|
+
* [dataOptions]="chart.dataOptions"
|
|
1230
|
+
* [highlights]="filters"
|
|
1231
|
+
* [beforeRender]="onBeforeRender"
|
|
1232
|
+
* (dataPointClick)="logArguments($event)"
|
|
1233
|
+
* (dataPointContextMenu)="logArguments($event)"
|
|
1234
|
+
* (dataPointsSelect)="logArguments($event)"
|
|
1235
|
+
* />
|
|
1236
|
+
* ```
|
|
1237
|
+
* ```ts
|
|
1238
|
+
import { Component } from '@angular/core';
|
|
1239
|
+
import { measureFactory, filterFactory, Filter } from '@sisense/sdk-data';
|
|
1240
|
+
import * as DM from '../../assets/sample-healthcare-model';
|
|
1241
|
+
import type { ChartType } from '@sisense/sdk-ui-angular';
|
|
1242
|
+
|
|
1243
|
+
@Component({
|
|
1244
|
+
selector: 'app-analytics',
|
|
1245
|
+
templateUrl: './analytics.component.html',
|
|
1246
|
+
styleUrls: ['./analytics.component.scss'],
|
|
1247
|
+
})
|
|
1248
|
+
export class AnalyticsComponent {
|
|
1249
|
+
DM = DM;
|
|
1250
|
+
filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
|
|
1251
|
+
chart = {
|
|
1252
|
+
chartType: 'column' as ChartType,
|
|
1253
|
+
dataSet: DM.DataSource,
|
|
1254
|
+
dataOptions: {
|
|
1255
|
+
category: [DM.Divisions.Divison_name],
|
|
1256
|
+
value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
|
|
1257
|
+
breakBy: [],
|
|
1258
|
+
},
|
|
1259
|
+
};
|
|
1260
|
+
|
|
1261
|
+
onBeforeRender(options: any) {
|
|
1262
|
+
console.log('beforeRender');
|
|
1263
|
+
console.log(options);
|
|
1264
|
+
return options;
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
logArguments(...args: any[]) {
|
|
1268
|
+
console.log(args);
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
* ```
|
|
1272
|
+
* <img src="media://angular-area-chart-example.png" width="800px" />
|
|
1273
|
+
*
|
|
1274
|
+
* @group Charts
|
|
903
1275
|
*/
|
|
904
1276
|
class AreaChartComponent {
|
|
905
1277
|
constructor() {
|
|
@@ -982,6 +1354,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
982
1354
|
/**
|
|
983
1355
|
* A component displaying data as a series of points connected by a line. Used to show trends or changes over time.
|
|
984
1356
|
* See [Line Chart](https://docs.sisense.com/main/SisenseLinux/line-chart.htm) for more information.
|
|
1357
|
+
*
|
|
1358
|
+
* @example
|
|
1359
|
+
* ```html
|
|
1360
|
+
* <csdk-line-chart
|
|
1361
|
+
* [dataSet]="chart.dataSet"
|
|
1362
|
+
* [dataOptions]="chart.dataOptions"
|
|
1363
|
+
* [highlights]="filters"
|
|
1364
|
+
* [beforeRender]="onBeforeRender"
|
|
1365
|
+
* (dataPointClick)="logArguments($event)"
|
|
1366
|
+
* (dataPointContextMenu)="logArguments($event)"
|
|
1367
|
+
* (dataPointsSelect)="logArguments($event)"
|
|
1368
|
+
* />
|
|
1369
|
+
* ```
|
|
1370
|
+
* ```ts
|
|
1371
|
+
import { Component } from '@angular/core';
|
|
1372
|
+
import { measureFactory, filterFactory, Filter } from '@sisense/sdk-data';
|
|
1373
|
+
import * as DM from '../../assets/sample-healthcare-model';
|
|
1374
|
+
import type { ChartType } from '@sisense/sdk-ui-angular';
|
|
1375
|
+
@Component({
|
|
1376
|
+
selector: 'app-analytics',
|
|
1377
|
+
templateUrl: './analytics.component.html',
|
|
1378
|
+
styleUrls: ['./analytics.component.scss'],
|
|
1379
|
+
})
|
|
1380
|
+
export class AnalyticsComponent {
|
|
1381
|
+
DM = DM;
|
|
1382
|
+
filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
|
|
1383
|
+
chart = {
|
|
1384
|
+
chartType: 'column' as ChartType,
|
|
1385
|
+
dataSet: DM.DataSource,
|
|
1386
|
+
dataOptions: {
|
|
1387
|
+
category: [DM.Divisions.Divison_name],
|
|
1388
|
+
value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
|
|
1389
|
+
breakBy: [],
|
|
1390
|
+
},
|
|
1391
|
+
};
|
|
1392
|
+
|
|
1393
|
+
onBeforeRender(options: any) {
|
|
1394
|
+
console.log('beforeRender');
|
|
1395
|
+
console.log(options);
|
|
1396
|
+
return options;
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
logArguments(...args: any[]) {
|
|
1400
|
+
console.log(args);
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
* ```
|
|
1404
|
+
* <img src="media://angular-line-chart-example.png" width="800px" />
|
|
1405
|
+
*
|
|
1406
|
+
* @group Charts
|
|
985
1407
|
*/
|
|
986
1408
|
class LineChartComponent {
|
|
987
1409
|
constructor() {
|
|
@@ -1064,6 +1486,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1064
1486
|
/**
|
|
1065
1487
|
* A component that provides various options for displaying one or two numeric values as a number, gauge or ticker.
|
|
1066
1488
|
* See [Indicator](https://docs.sisense.com/main/SisenseLinux/indicator.htm) for more information.
|
|
1489
|
+
*
|
|
1490
|
+
* @example
|
|
1491
|
+
* ```html
|
|
1492
|
+
* <csdk-indicator-chart
|
|
1493
|
+
* [dataSet]="indicator.dataSet"
|
|
1494
|
+
* [dataOptions]="indicator.dataOptions"
|
|
1495
|
+
* [filters]="filters"
|
|
1496
|
+
* [styleOptions]="indicator.styleOptions"
|
|
1497
|
+
* />
|
|
1498
|
+
* ```
|
|
1499
|
+
* ```ts
|
|
1500
|
+
import { Component } from '@angular/core';
|
|
1501
|
+
import { measureFactory, filterFactory } from '@sisense/sdk-data';
|
|
1502
|
+
import * as DM from '../../assets/sample-healthcare-model';
|
|
1503
|
+
import type { IndicatorStyleOptions } from '@sisense/sdk-ui-angular';
|
|
1504
|
+
|
|
1505
|
+
@Component({
|
|
1506
|
+
selector: 'app-analytics',
|
|
1507
|
+
templateUrl: './analytics.component.html',
|
|
1508
|
+
styleUrls: ['./analytics.component.scss'],
|
|
1509
|
+
})
|
|
1510
|
+
export class AnalyticsComponent {
|
|
1511
|
+
DM = DM;
|
|
1512
|
+
filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
|
|
1513
|
+
indicator = {
|
|
1514
|
+
dataSet: DM.DataSource,
|
|
1515
|
+
dataOptions: {
|
|
1516
|
+
value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
|
|
1517
|
+
secondary: [measureFactory.sum(DM.Admissions.Diagnosis_ID)],
|
|
1518
|
+
},
|
|
1519
|
+
styleOptions: {
|
|
1520
|
+
indicatorComponents: {
|
|
1521
|
+
title: {
|
|
1522
|
+
shouldBeShown: true,
|
|
1523
|
+
text: 'Total Cost_of_admission',
|
|
1524
|
+
},
|
|
1525
|
+
secondaryTitle: {
|
|
1526
|
+
text: 'Total Diagnosis_ID',
|
|
1527
|
+
},
|
|
1528
|
+
ticks: {
|
|
1529
|
+
shouldBeShown: true,
|
|
1530
|
+
},
|
|
1531
|
+
labels: {
|
|
1532
|
+
shouldBeShown: true,
|
|
1533
|
+
},
|
|
1534
|
+
},
|
|
1535
|
+
subtype: 'indicator/gauge',
|
|
1536
|
+
skin: 2,
|
|
1537
|
+
} as IndicatorStyleOptions,
|
|
1538
|
+
};
|
|
1539
|
+
|
|
1540
|
+
}
|
|
1541
|
+
* ```
|
|
1542
|
+
* <img src="media://angular-indicator-chart-example.png" width="800px" />
|
|
1543
|
+
*
|
|
1544
|
+
* @group Charts
|
|
1067
1545
|
*/
|
|
1068
1546
|
class IndicatorChartComponent {
|
|
1069
1547
|
constructor() {
|
|
@@ -1119,6 +1597,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1119
1597
|
* If omitted, all scatter points are equal in size. If used, the circle sizes are relative to their values.
|
|
1120
1598
|
*
|
|
1121
1599
|
* See [Scatter Chart](https://docs.sisense.com/main/SisenseLinux/scatter-chart.htm) for more information.
|
|
1600
|
+
*
|
|
1601
|
+
* @example
|
|
1602
|
+
* ```html
|
|
1603
|
+
* <csdk-scatter-chart
|
|
1604
|
+
* [dataSet]="scatter.dataSet"
|
|
1605
|
+
* [dataOptions]="scatter.dataOptions"
|
|
1606
|
+
* [highlights]="filters"
|
|
1607
|
+
* [beforeRender]="onBeforeRender"
|
|
1608
|
+
* (dataPointClick)="logArguments($event)"
|
|
1609
|
+
* (dataPointContextMenu)="logArguments($event)"
|
|
1610
|
+
* (dataPointsSelect)="logArguments($event)"
|
|
1611
|
+
* />
|
|
1612
|
+
* ```
|
|
1613
|
+
* ```ts
|
|
1614
|
+
import { Component } from '@angular/core';
|
|
1615
|
+
import { measureFactory, filterFactory } from '@sisense/sdk-data';
|
|
1616
|
+
import * as DM from '../../assets/sample-healthcare-model';
|
|
1617
|
+
|
|
1618
|
+
@Component({
|
|
1619
|
+
selector: 'app-analytics',
|
|
1620
|
+
templateUrl: './analytics.component.html',
|
|
1621
|
+
styleUrls: ['./analytics.component.scss'],
|
|
1622
|
+
})
|
|
1623
|
+
export class AnalyticsComponent {
|
|
1624
|
+
DM = DM;
|
|
1625
|
+
filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
|
|
1626
|
+
scatter = {
|
|
1627
|
+
dataSet: DM.DataSource,
|
|
1628
|
+
dataOptions: {
|
|
1629
|
+
x: DM.Admissions.Room_ID,
|
|
1630
|
+
y: measureFactory.sum(DM.Admissions.Cost_of_admission),
|
|
1631
|
+
},
|
|
1632
|
+
};
|
|
1633
|
+
|
|
1634
|
+
onBeforeRender(options: any) {
|
|
1635
|
+
console.log('beforeRender');
|
|
1636
|
+
console.log(options);
|
|
1637
|
+
return options;
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
logArguments(...args: any[]) {
|
|
1641
|
+
console.log(args);
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
* ```
|
|
1645
|
+
* <img src="media://angular-scatter-chart-example.png" width="800px" />
|
|
1646
|
+
*
|
|
1647
|
+
* @group Charts
|
|
1122
1648
|
*/
|
|
1123
1649
|
class ScatterChartComponent {
|
|
1124
1650
|
constructor() {
|
|
@@ -1202,6 +1728,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1202
1728
|
* A component representing data in a circular graph with the data shown as slices of a whole,
|
|
1203
1729
|
* with each slice representing a proportion of the total.
|
|
1204
1730
|
* See [Pie Chart](https://docs.sisense.com/main/SisenseLinux/pie-chart.htm) for more information.
|
|
1731
|
+
*
|
|
1732
|
+
* @example
|
|
1733
|
+
* ```html
|
|
1734
|
+
* <csdk-pie-chart
|
|
1735
|
+
* [dataSet]="chart.dataSet"
|
|
1736
|
+
* [dataOptions]="chart.dataOptions"
|
|
1737
|
+
* [highlights]="filters"
|
|
1738
|
+
* [beforeRender]="onBeforeRender"
|
|
1739
|
+
* (dataPointClick)="logArguments($event)"
|
|
1740
|
+
* (dataPointContextMenu)="logArguments($event)"
|
|
1741
|
+
* (dataPointsSelect)="logArguments($event)"
|
|
1742
|
+
* />
|
|
1743
|
+
* ```
|
|
1744
|
+
* ```ts
|
|
1745
|
+
import { Component } from '@angular/core';
|
|
1746
|
+
import { measureFactory, filterFactory } from '@sisense/sdk-data';
|
|
1747
|
+
import * as DM from '../../assets/sample-healthcare-model';
|
|
1748
|
+
import type { ChartType } from '@sisense/sdk-ui-angular';
|
|
1749
|
+
|
|
1750
|
+
@Component({
|
|
1751
|
+
selector: 'app-analytics',
|
|
1752
|
+
templateUrl: './analytics.component.html',
|
|
1753
|
+
styleUrls: ['./analytics.component.scss'],
|
|
1754
|
+
})
|
|
1755
|
+
export class AnalyticsComponent {
|
|
1756
|
+
DM = DM;
|
|
1757
|
+
filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
|
|
1758
|
+
chart = {
|
|
1759
|
+
chartType: 'column' as ChartType,
|
|
1760
|
+
dataSet: DM.DataSource,
|
|
1761
|
+
dataOptions: {
|
|
1762
|
+
category: [DM.Divisions.Divison_name],
|
|
1763
|
+
value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
|
|
1764
|
+
breakBy: [],
|
|
1765
|
+
},
|
|
1766
|
+
};
|
|
1767
|
+
|
|
1768
|
+
onBeforeRender(options: any) {
|
|
1769
|
+
console.log('beforeRender');
|
|
1770
|
+
console.log(options);
|
|
1771
|
+
return options;
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
logArguments(...args: any[]) {
|
|
1775
|
+
console.log(args);
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
* ```
|
|
1779
|
+
* <img src="media://angular-pie-chart-example.png" width="800px" />
|
|
1780
|
+
*
|
|
1781
|
+
* @group Charts
|
|
1205
1782
|
*/
|
|
1206
1783
|
class PieChartComponent {
|
|
1207
1784
|
constructor() {
|
|
@@ -1284,6 +1861,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1284
1861
|
/**
|
|
1285
1862
|
* A component representing data progressively decreasing in size or quantity through a funnel shape.
|
|
1286
1863
|
* See [Funnel Chart](https://docs.sisense.com/main/SisenseLinux/funnel-chart.htm) for more information.
|
|
1864
|
+
*
|
|
1865
|
+
* @example
|
|
1866
|
+
* ```html
|
|
1867
|
+
* <csdk-funnel-chart
|
|
1868
|
+
* [dataSet]="chart.dataSet"
|
|
1869
|
+
* [dataOptions]="chart.dataOptions"
|
|
1870
|
+
* [highlights]="filters"
|
|
1871
|
+
* [beforeRender]="onBeforeRender"
|
|
1872
|
+
* (dataPointClick)="logArguments($event)"
|
|
1873
|
+
* (dataPointContextMenu)="logArguments($event)"
|
|
1874
|
+
* (dataPointsSelect)="logArguments($event)"
|
|
1875
|
+
* />
|
|
1876
|
+
* ```
|
|
1877
|
+
* ```ts
|
|
1878
|
+
import { Component } from '@angular/core';
|
|
1879
|
+
import { measureFactory, filterFactory, Filter } from '@sisense/sdk-data';
|
|
1880
|
+
import * as DM from '../../assets/sample-healthcare-model';
|
|
1881
|
+
import type { ChartType } from '@sisense/sdk-ui-angular';
|
|
1882
|
+
@Component({
|
|
1883
|
+
selector: 'app-analytics',
|
|
1884
|
+
templateUrl: './analytics.component.html',
|
|
1885
|
+
styleUrls: ['./analytics.component.scss'],
|
|
1886
|
+
})
|
|
1887
|
+
export class AnalyticsComponent {
|
|
1888
|
+
DM = DM;
|
|
1889
|
+
filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
|
|
1890
|
+
chart = {
|
|
1891
|
+
chartType: 'column' as ChartType,
|
|
1892
|
+
dataSet: DM.DataSource,
|
|
1893
|
+
dataOptions: {
|
|
1894
|
+
category: [DM.Divisions.Divison_name],
|
|
1895
|
+
value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
|
|
1896
|
+
breakBy: [],
|
|
1897
|
+
},
|
|
1898
|
+
};
|
|
1899
|
+
|
|
1900
|
+
onBeforeRender(options: any) {
|
|
1901
|
+
console.log('beforeRender');
|
|
1902
|
+
console.log(options);
|
|
1903
|
+
return options;
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
logArguments(...args: any[]) {
|
|
1907
|
+
console.log(args);
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
* ```
|
|
1911
|
+
* <img src="media://angular-funnel-chart-example.png" width="800px" />
|
|
1912
|
+
*
|
|
1913
|
+
* @group Charts
|
|
1287
1914
|
*/
|
|
1288
1915
|
class FunnelChartComponent {
|
|
1289
1916
|
constructor() {
|
|
@@ -1366,6 +1993,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1366
1993
|
/**
|
|
1367
1994
|
* A component comparing multiple categories/variables with a spacial perspective in a radial chart.
|
|
1368
1995
|
* See [Polar Chart](https://docs.sisense.com/main/SisenseLinux/polar-chart.htm) for more information.
|
|
1996
|
+
*
|
|
1997
|
+
* @example
|
|
1998
|
+
* ```html
|
|
1999
|
+
* <csdk-polar-chart
|
|
2000
|
+
* [dataSet]="chart.dataSet"
|
|
2001
|
+
* [dataOptions]="chart.dataOptions"
|
|
2002
|
+
* [highlights]="filters"
|
|
2003
|
+
* [beforeRender]="onBeforeRender"
|
|
2004
|
+
* (dataPointClick)="logArguments($event)"
|
|
2005
|
+
* (dataPointContextMenu)="logArguments($event)"
|
|
2006
|
+
* (dataPointsSelect)="logArguments($event)"
|
|
2007
|
+
* />
|
|
2008
|
+
* ```
|
|
2009
|
+
* ```ts
|
|
2010
|
+
import { Component } from '@angular/core';
|
|
2011
|
+
import { measureFactory, filterFactory } from '@sisense/sdk-data';
|
|
2012
|
+
import * as DM from '../../assets/sample-healthcare-model';
|
|
2013
|
+
import type { ChartType } from '@sisense/sdk-ui-angular';
|
|
2014
|
+
|
|
2015
|
+
@Component({
|
|
2016
|
+
selector: 'app-analytics',
|
|
2017
|
+
templateUrl: './analytics.component.html',
|
|
2018
|
+
styleUrls: ['./analytics.component.scss'],
|
|
2019
|
+
})
|
|
2020
|
+
export class AnalyticsComponent {
|
|
2021
|
+
DM = DM;
|
|
2022
|
+
filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
|
|
2023
|
+
chart = {
|
|
2024
|
+
chartType: 'column' as ChartType,
|
|
2025
|
+
dataSet: DM.DataSource,
|
|
2026
|
+
dataOptions: {
|
|
2027
|
+
category: [DM.Divisions.Divison_name],
|
|
2028
|
+
value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
|
|
2029
|
+
breakBy: [],
|
|
2030
|
+
},
|
|
2031
|
+
};
|
|
2032
|
+
|
|
2033
|
+
onBeforeRender(options: any) {
|
|
2034
|
+
console.log('beforeRender');
|
|
2035
|
+
console.log(options);
|
|
2036
|
+
return options;
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2039
|
+
logArguments(...args: any[]) {
|
|
2040
|
+
console.log(args);
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
* ```
|
|
2044
|
+
* <img src="media://angular-polar-chart-example.png" width="800px" />
|
|
2045
|
+
*
|
|
2046
|
+
* @group Charts
|
|
1369
2047
|
*/
|
|
1370
2048
|
class PolarChartComponent {
|
|
1371
2049
|
constructor() {
|
|
@@ -1449,6 +2127,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1449
2127
|
* A component displaying hierarchical data in the form of nested rectangles.
|
|
1450
2128
|
* This type of chart can be used instead of a column chart for comparing a large number of categories and sub-categories.
|
|
1451
2129
|
* See [Treemap Chart](https://docs.sisense.com/main/SisenseLinux/treemap.htm) for more information.
|
|
2130
|
+
*
|
|
2131
|
+
* @example
|
|
2132
|
+
* ```html
|
|
2133
|
+
* <csdk-treemap-chart
|
|
2134
|
+
* [dataSet]="chart.dataSet"
|
|
2135
|
+
* [dataOptions]="chart.dataOptions"
|
|
2136
|
+
* [highlights]="filters"
|
|
2137
|
+
* [beforeRender]="onBeforeRender"
|
|
2138
|
+
* (dataPointClick)="logArguments($event)"
|
|
2139
|
+
* (dataPointContextMenu)="logArguments($event)"
|
|
2140
|
+
* (dataPointsSelect)="logArguments($event)"
|
|
2141
|
+
* />
|
|
2142
|
+
* ```
|
|
2143
|
+
* ```ts
|
|
2144
|
+
import { Component } from '@angular/core';
|
|
2145
|
+
import { measureFactory, filterFactory } from '@sisense/sdk-data';
|
|
2146
|
+
import type { ChartType } from '@sisense/sdk-ui-angular';
|
|
2147
|
+
import * as DM from '../../assets/sample-healthcare-model';
|
|
2148
|
+
|
|
2149
|
+
@Component({
|
|
2150
|
+
selector: 'app-analytics',
|
|
2151
|
+
templateUrl: './analytics.component.html',
|
|
2152
|
+
styleUrls: ['./analytics.component.scss'],
|
|
2153
|
+
})
|
|
2154
|
+
export class AnalyticsComponent {
|
|
2155
|
+
DM = DM;
|
|
2156
|
+
filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
|
|
2157
|
+
chart = {
|
|
2158
|
+
chartType: 'column' as ChartType,
|
|
2159
|
+
dataSet: DM.DataSource,
|
|
2160
|
+
dataOptions: {
|
|
2161
|
+
category: [DM.Divisions.Divison_name],
|
|
2162
|
+
value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
|
|
2163
|
+
breakBy: [],
|
|
2164
|
+
},
|
|
2165
|
+
};
|
|
2166
|
+
|
|
2167
|
+
onBeforeRender(options: any) {
|
|
2168
|
+
console.log('beforeRender');
|
|
2169
|
+
console.log(options);
|
|
2170
|
+
return options;
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
logArguments(...args: any[]) {
|
|
2174
|
+
console.log(args);
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
2177
|
+
* ```
|
|
2178
|
+
* <img src="media://angular-treemap-chart-example.png" width="800px" />
|
|
2179
|
+
*
|
|
2180
|
+
* @group Charts
|
|
1452
2181
|
*/
|
|
1453
2182
|
class TreemapChartComponent {
|
|
1454
2183
|
constructor() {
|
|
@@ -1532,6 +2261,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1532
2261
|
* A component displaying hierarchical data in the form of nested slices.
|
|
1533
2262
|
* This type of chart can be used instead of a pie chart for comparing a large number of categories and sub-categories.
|
|
1534
2263
|
* See [Sunburst Chart](https://docs.sisense.com/main/SisenseLinux/sunburst-widget.htm) for more information.
|
|
2264
|
+
*
|
|
2265
|
+
* @example
|
|
2266
|
+
* ```html
|
|
2267
|
+
* <csdk-sunburst-chart
|
|
2268
|
+
* [dataSet]="chart.dataSet"
|
|
2269
|
+
* [dataOptions]="chart.dataOptions"
|
|
2270
|
+
* [highlights]="filters"
|
|
2271
|
+
* [beforeRender]="onBeforeRender"
|
|
2272
|
+
* (dataPointClick)="logArguments($event)"
|
|
2273
|
+
* (dataPointContextMenu)="logArguments($event)"
|
|
2274
|
+
* (dataPointsSelect)="logArguments($event)"
|
|
2275
|
+
* />
|
|
2276
|
+
* ```
|
|
2277
|
+
* ```ts
|
|
2278
|
+
import { Component } from '@angular/core';
|
|
2279
|
+
import { measureFactory, filterFactory } from '@sisense/sdk-data';
|
|
2280
|
+
import * as DM from '../../assets/sample-healthcare-model';
|
|
2281
|
+
import type { ChartType } from '@sisense/sdk-ui-angular';
|
|
2282
|
+
|
|
2283
|
+
@Component({
|
|
2284
|
+
selector: 'app-analytics',
|
|
2285
|
+
templateUrl: './analytics.component.html',
|
|
2286
|
+
styleUrls: ['./analytics.component.scss'],
|
|
2287
|
+
})
|
|
2288
|
+
export class AnalyticsComponent {
|
|
2289
|
+
DM = DM;
|
|
2290
|
+
filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
|
|
2291
|
+
chart = {
|
|
2292
|
+
chartType: 'column' as ChartType,
|
|
2293
|
+
dataSet: DM.DataSource,
|
|
2294
|
+
dataOptions: {
|
|
2295
|
+
category: [DM.Divisions.Divison_name],
|
|
2296
|
+
value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
|
|
2297
|
+
breakBy: [],
|
|
2298
|
+
},
|
|
2299
|
+
};
|
|
2300
|
+
|
|
2301
|
+
onBeforeRender(options: any) {
|
|
2302
|
+
console.log('beforeRender');
|
|
2303
|
+
console.log(options);
|
|
2304
|
+
return options;
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2307
|
+
logArguments(...args: any[]) {
|
|
2308
|
+
console.log(args);
|
|
2309
|
+
}
|
|
2310
|
+
}
|
|
2311
|
+
* ```
|
|
2312
|
+
* <img src="media://angular-sunburst-chart-example.png" width="800px" />
|
|
2313
|
+
*
|
|
2314
|
+
* @group Charts
|
|
1535
2315
|
*/
|
|
1536
2316
|
class SunburstChartComponent {
|
|
1537
2317
|
constructor() {
|
|
@@ -1612,342 +2392,403 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1612
2392
|
}] } });
|
|
1613
2393
|
|
|
1614
2394
|
/**
|
|
1615
|
-
*
|
|
2395
|
+
* An Angular component representing data in a way that visually describes the distribution, variability,
|
|
2396
|
+
* and center of a data set along an axis.
|
|
2397
|
+
* See [Boxplot Chart](https://docs.sisense.com/main/SisenseLinux/box-and-whisker-plot.htm) for more information.
|
|
1616
2398
|
*
|
|
1617
|
-
* @
|
|
2399
|
+
* @example
|
|
2400
|
+
* ```html
|
|
2401
|
+
* <csdk-boxplot-chart
|
|
2402
|
+
* [dataSet]="boxplotChart.dataSet"
|
|
2403
|
+
* [dataOptions]="boxplotChart.dataOptions"
|
|
2404
|
+
* [highlights]="boxplotChart.highlights"
|
|
2405
|
+
* [beforeRender]="onBeforeRender"
|
|
2406
|
+
* (dataPointClick)="logArguments($event)"
|
|
2407
|
+
* (dataPointContextMenu)="logArguments($event)"
|
|
2408
|
+
* (dataPointsSelect)="logArguments($event)"
|
|
2409
|
+
* /> * ```
|
|
2410
|
+
* ```ts
|
|
2411
|
+
import { Component } from '@angular/core';
|
|
2412
|
+
import { filterFactory } from '@sisense/sdk-data';
|
|
2413
|
+
import type { BoxplotChartDataOptions } from '@sisense/sdk-ui-angular';
|
|
2414
|
+
import * as DM from '../../assets/sample-healthcare-model';
|
|
2415
|
+
|
|
2416
|
+
@Component({
|
|
2417
|
+
selector: 'app-analytics',
|
|
2418
|
+
templateUrl: './analytics.component.html',
|
|
2419
|
+
styleUrls: ['./analytics.component.scss'],
|
|
2420
|
+
})
|
|
2421
|
+
export class AnalyticsComponent {
|
|
2422
|
+
boxplotChart = {
|
|
2423
|
+
dataSet: DM.DataSource,
|
|
2424
|
+
dataOptions: {
|
|
2425
|
+
category: [DM.Divisions.Divison_name],
|
|
2426
|
+
value: [DM.Admissions.TimeofStay],
|
|
2427
|
+
boxType: 'iqr',
|
|
2428
|
+
outliersEnabled: true,
|
|
2429
|
+
} as BoxplotChartDataOptions,
|
|
2430
|
+
highlights: [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])],
|
|
2431
|
+
};
|
|
2432
|
+
|
|
2433
|
+
logArguments(...args: any[]) {
|
|
2434
|
+
console.log(args);
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
* ```
|
|
2438
|
+
* <img src="media://angular-boxplot-chart-example.png" width="800px" />
|
|
2439
|
+
*
|
|
2440
|
+
* @group Charts
|
|
1618
2441
|
*/
|
|
1619
|
-
class
|
|
1620
|
-
constructor(
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
styleOptions: this.styleOptions,
|
|
1642
|
-
title: this.title,
|
|
1643
|
-
description: this.description,
|
|
1644
|
-
};
|
|
1645
|
-
return createElement(TableWidget, props);
|
|
1646
|
-
}
|
|
1647
|
-
ngOnDestroy() {
|
|
1648
|
-
this.componentAdapter.destroy();
|
|
2442
|
+
class BoxplotChartComponent {
|
|
2443
|
+
constructor() {
|
|
2444
|
+
/**
|
|
2445
|
+
* {@inheritDoc @sisense/sdk-ui!BoxplotChartProps.onDataPointClick}
|
|
2446
|
+
*
|
|
2447
|
+
* @category Callbacks
|
|
2448
|
+
*/
|
|
2449
|
+
this.dataPointClick = new EventEmitter();
|
|
2450
|
+
/**
|
|
2451
|
+
* {@inheritDoc @sisense/sdk-ui!BoxplotChartProps.onDataPointContextMenu}
|
|
2452
|
+
*
|
|
2453
|
+
* @category Callbacks
|
|
2454
|
+
*/
|
|
2455
|
+
this.dataPointContextMenu = new EventEmitter();
|
|
2456
|
+
/**
|
|
2457
|
+
* {@inheritDoc @sisense/sdk-ui!BoxplotChartProps.onDataPointsSelected}
|
|
2458
|
+
*
|
|
2459
|
+
* @category Callbacks
|
|
2460
|
+
*/
|
|
2461
|
+
this.dataPointsSelect = new EventEmitter();
|
|
2462
|
+
/** @internal */
|
|
2463
|
+
this.chartType = 'boxplot';
|
|
1649
2464
|
}
|
|
1650
2465
|
}
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
2466
|
+
BoxplotChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BoxplotChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2467
|
+
BoxplotChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: BoxplotChartComponent, selector: "csdk-boxplot-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions", beforeRender: "beforeRender" }, outputs: { dataPointClick: "dataPointClick", dataPointContextMenu: "dataPointContextMenu", dataPointsSelect: "dataPointsSelect" }, ngImport: i0, template: `
|
|
2468
|
+
<csdk-chart
|
|
2469
|
+
[chartType]="chartType"
|
|
2470
|
+
[dataSet]="dataSet"
|
|
2471
|
+
[dataOptions]="dataOptions"
|
|
2472
|
+
[filters]="filters"
|
|
2473
|
+
[highlights]="highlights"
|
|
2474
|
+
[styleOptions]="styleOptions"
|
|
2475
|
+
[beforeRender]="beforeRender"
|
|
2476
|
+
(dataPointClick)="dataPointClick.emit($event)"
|
|
2477
|
+
(dataPointContextMenu)="dataPointContextMenu.emit($event)"
|
|
2478
|
+
(dataPointsSelect)="dataPointsSelect.emit($event)"
|
|
2479
|
+
/>
|
|
2480
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
|
|
2481
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BoxplotChartComponent, decorators: [{
|
|
1654
2482
|
type: Component,
|
|
1655
2483
|
args: [{
|
|
1656
|
-
selector: 'csdk-
|
|
1657
|
-
template
|
|
2484
|
+
selector: 'csdk-boxplot-chart',
|
|
2485
|
+
template: `
|
|
2486
|
+
<csdk-chart
|
|
2487
|
+
[chartType]="chartType"
|
|
2488
|
+
[dataSet]="dataSet"
|
|
2489
|
+
[dataOptions]="dataOptions"
|
|
2490
|
+
[filters]="filters"
|
|
2491
|
+
[highlights]="highlights"
|
|
2492
|
+
[styleOptions]="styleOptions"
|
|
2493
|
+
[beforeRender]="beforeRender"
|
|
2494
|
+
(dataPointClick)="dataPointClick.emit($event)"
|
|
2495
|
+
(dataPointContextMenu)="dataPointContextMenu.emit($event)"
|
|
2496
|
+
(dataPointsSelect)="dataPointsSelect.emit($event)"
|
|
2497
|
+
/>
|
|
2498
|
+
`,
|
|
1658
2499
|
}]
|
|
1659
|
-
}],
|
|
1660
|
-
type: ViewChild,
|
|
1661
|
-
args: [rootId]
|
|
1662
|
-
}], dataSource: [{
|
|
2500
|
+
}], propDecorators: { dataSet: [{
|
|
1663
2501
|
type: Input
|
|
1664
2502
|
}], dataOptions: [{
|
|
1665
2503
|
type: Input
|
|
1666
2504
|
}], filters: [{
|
|
1667
2505
|
type: Input
|
|
1668
|
-
}],
|
|
2506
|
+
}], highlights: [{
|
|
1669
2507
|
type: Input
|
|
1670
|
-
}],
|
|
2508
|
+
}], styleOptions: [{
|
|
1671
2509
|
type: Input
|
|
1672
|
-
}],
|
|
2510
|
+
}], beforeRender: [{
|
|
1673
2511
|
type: Input
|
|
2512
|
+
}], dataPointClick: [{
|
|
2513
|
+
type: Output
|
|
2514
|
+
}], dataPointContextMenu: [{
|
|
2515
|
+
type: Output
|
|
2516
|
+
}], dataPointsSelect: [{
|
|
2517
|
+
type: Output
|
|
1674
2518
|
}] } });
|
|
1675
2519
|
|
|
1676
2520
|
/**
|
|
1677
|
-
*
|
|
1678
|
-
*
|
|
1679
|
-
*
|
|
1680
|
-
* To learn more about using Sisense Fusion Widgets in Compose SDK, see
|
|
1681
|
-
* [Sisense Fusion Widgets](https://sisense.dev/guides/sdk/guides/charts/guide-fusion-widgets.html).
|
|
2521
|
+
* An Angular component that allows to visualize geographical data as data points on a map.
|
|
2522
|
+
* See [Scattermap Chart](https://docs.sisense.com/main/SisenseLinux/scatter-map.htm) for more information.
|
|
1682
2523
|
*
|
|
2524
|
+
* @example
|
|
2525
|
+
* ```html
|
|
2526
|
+
* <csdk-scattermap-chart
|
|
2527
|
+
* [dataSet]="scattermapChart.dataSet"
|
|
2528
|
+
* [dataOptions]="scattermapChart.dataOptions"
|
|
2529
|
+
* [styleOptions]="scattermapChart.styleOptions"
|
|
2530
|
+
* (dataPointClick)="logArguments($event)"
|
|
2531
|
+
* />
|
|
2532
|
+
* ```
|
|
2533
|
+
* ```ts
|
|
2534
|
+
import { Component } from '@angular/core';
|
|
2535
|
+
import { measureFactory, filterFactory } from '@sisense/sdk-data';
|
|
2536
|
+
import type { ScattermapStyleOptions,ScattermapChartDataOptions } from '@sisense/sdk-ui-angular';
|
|
2537
|
+
import * as DM from '../../assets/sample-ecommerce';
|
|
2538
|
+
|
|
2539
|
+
@Component({
|
|
2540
|
+
selector: 'app-analytics',
|
|
2541
|
+
templateUrl: './analytics.component.html',
|
|
2542
|
+
styleUrls: ['./analytics.component.scss'],
|
|
2543
|
+
})
|
|
2544
|
+
export class AnalyticsComponent {
|
|
2545
|
+
scattermapChart = {
|
|
2546
|
+
dataSet: DM.DataSource,
|
|
2547
|
+
dataOptions: {
|
|
2548
|
+
geo: [DM.Country.Country],
|
|
2549
|
+
size: measureFactory.sum(DM.Commerce.Cost, 'Size by Cost'),
|
|
2550
|
+
colorBy: {
|
|
2551
|
+
column: measureFactory.sum(DM.Commerce.Revenue, 'Color by Revenue'),
|
|
2552
|
+
color: 'green',
|
|
2553
|
+
},
|
|
2554
|
+
details: DM.Category.Category,
|
|
2555
|
+
} as ScattermapChartDataOptions,
|
|
2556
|
+
styleOptions: {
|
|
2557
|
+
markers: {
|
|
2558
|
+
fill: 'hollow-bold',
|
|
2559
|
+
},
|
|
2560
|
+
} as ScattermapStyleOptions,
|
|
2561
|
+
};
|
|
2562
|
+
|
|
2563
|
+
logArguments(...args: any[]) {
|
|
2564
|
+
console.log(args);
|
|
2565
|
+
}
|
|
2566
|
+
}
|
|
2567
|
+
* ```
|
|
2568
|
+
* <img src="media://angular-scattermap-chart-example.png" width="800px" />
|
|
2569
|
+
* @group Charts
|
|
1683
2570
|
*/
|
|
1684
|
-
class
|
|
1685
|
-
constructor(
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
ngAfterViewInit() {
|
|
1695
|
-
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
1696
|
-
}
|
|
1697
|
-
/** @internal */
|
|
1698
|
-
ngOnChanges() {
|
|
1699
|
-
if (this.preactRef) {
|
|
1700
|
-
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1703
|
-
/** @internal */
|
|
1704
|
-
createPreactComponent() {
|
|
1705
|
-
const props = {
|
|
1706
|
-
widgetOid: this.widgetOid,
|
|
1707
|
-
dashboardOid: this.dashboardOid,
|
|
1708
|
-
filters: this.filters,
|
|
1709
|
-
highlights: this.highlights,
|
|
1710
|
-
filtersMergeStrategy: this.filtersMergeStrategy,
|
|
1711
|
-
includeDashboardFilters: this.includeDashboardFilters,
|
|
1712
|
-
title: this.title,
|
|
1713
|
-
description: this.description,
|
|
1714
|
-
styleOptions: this.styleOptions,
|
|
1715
|
-
highlightSelectionDisabled: this.highlightSelectionDisabled,
|
|
1716
|
-
drilldownOptions: this.drilldownOptions,
|
|
1717
|
-
};
|
|
1718
|
-
return createElement(DashboardWidget, props);
|
|
1719
|
-
}
|
|
1720
|
-
/** @internal */
|
|
1721
|
-
ngOnDestroy() {
|
|
1722
|
-
this.componentAdapter.destroy();
|
|
2571
|
+
class ScattermapChartComponent {
|
|
2572
|
+
constructor() {
|
|
2573
|
+
/**
|
|
2574
|
+
* {@inheritDoc @sisense/sdk-ui!ScattermapChartProps.onDataPointClick}
|
|
2575
|
+
*
|
|
2576
|
+
* @category Callbacks
|
|
2577
|
+
*/
|
|
2578
|
+
this.dataPointClick = new EventEmitter();
|
|
2579
|
+
/** @internal */
|
|
2580
|
+
this.chartType = 'scattermap';
|
|
1723
2581
|
}
|
|
1724
2582
|
}
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
2583
|
+
ScattermapChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ScattermapChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2584
|
+
ScattermapChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ScattermapChartComponent, selector: "csdk-scattermap-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions" }, outputs: { dataPointClick: "dataPointClick" }, ngImport: i0, template: `
|
|
2585
|
+
<csdk-chart
|
|
2586
|
+
[chartType]="chartType"
|
|
2587
|
+
[dataSet]="dataSet"
|
|
2588
|
+
[dataOptions]="dataOptions"
|
|
2589
|
+
[filters]="filters"
|
|
2590
|
+
[highlights]="highlights"
|
|
2591
|
+
[styleOptions]="styleOptions"
|
|
2592
|
+
(dataPointClick)="dataPointClick.emit($event)"
|
|
2593
|
+
/>
|
|
2594
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
|
|
2595
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ScattermapChartComponent, decorators: [{
|
|
1728
2596
|
type: Component,
|
|
1729
2597
|
args: [{
|
|
1730
|
-
selector: 'csdk-
|
|
1731
|
-
template
|
|
2598
|
+
selector: 'csdk-scattermap-chart',
|
|
2599
|
+
template: `
|
|
2600
|
+
<csdk-chart
|
|
2601
|
+
[chartType]="chartType"
|
|
2602
|
+
[dataSet]="dataSet"
|
|
2603
|
+
[dataOptions]="dataOptions"
|
|
2604
|
+
[filters]="filters"
|
|
2605
|
+
[highlights]="highlights"
|
|
2606
|
+
[styleOptions]="styleOptions"
|
|
2607
|
+
(dataPointClick)="dataPointClick.emit($event)"
|
|
2608
|
+
/>
|
|
2609
|
+
`,
|
|
1732
2610
|
}]
|
|
1733
|
-
}],
|
|
1734
|
-
type: ViewChild,
|
|
1735
|
-
args: [rootId]
|
|
1736
|
-
}], widgetOid: [{
|
|
2611
|
+
}], propDecorators: { dataSet: [{
|
|
1737
2612
|
type: Input
|
|
1738
|
-
}],
|
|
2613
|
+
}], dataOptions: [{
|
|
1739
2614
|
type: Input
|
|
1740
2615
|
}], filters: [{
|
|
1741
2616
|
type: Input
|
|
1742
2617
|
}], highlights: [{
|
|
1743
2618
|
type: Input
|
|
1744
|
-
}], filtersMergeStrategy: [{
|
|
1745
|
-
type: Input
|
|
1746
|
-
}], includeDashboardFilters: [{
|
|
1747
|
-
type: Input
|
|
1748
|
-
}], title: [{
|
|
1749
|
-
type: Input
|
|
1750
|
-
}], description: [{
|
|
1751
|
-
type: Input
|
|
1752
2619
|
}], styleOptions: [{
|
|
1753
2620
|
type: Input
|
|
1754
|
-
}],
|
|
1755
|
-
type:
|
|
1756
|
-
}], drilldownOptions: [{
|
|
1757
|
-
type: Input
|
|
2621
|
+
}], dataPointClick: [{
|
|
2622
|
+
type: Output
|
|
1758
2623
|
}] } });
|
|
1759
2624
|
|
|
1760
2625
|
/**
|
|
1761
|
-
*
|
|
2626
|
+
* An Angular component that allows to visualize geographical data as polygons on a map.
|
|
2627
|
+
* See [Areamap Chart](https://docs.sisense.com/main/SisenseLinux/area-map.htm) for more information.
|
|
2628
|
+
*
|
|
2629
|
+
* @example
|
|
2630
|
+
* ```html
|
|
2631
|
+
* <csdk-areamap-chart
|
|
2632
|
+
* [dataSet]="areamapChart.dataSet"
|
|
2633
|
+
* [dataOptions]="areamapChart.dataOptions"
|
|
2634
|
+
* [styleOptions]="areamapChart.styleOptions"
|
|
2635
|
+
* (dataPointClick)="logArguments($event)"
|
|
2636
|
+
* /> * ```
|
|
2637
|
+
* ```ts
|
|
2638
|
+
import { Component } from '@angular/core';
|
|
2639
|
+
import { measureFactory } from '@sisense/sdk-data';
|
|
2640
|
+
import * as DM from '../../assets/sample-ecommerce';
|
|
2641
|
+
|
|
2642
|
+
@Component({
|
|
2643
|
+
selector: 'app-analytics',
|
|
2644
|
+
templateUrl: './analytics.component.html',
|
|
2645
|
+
styleUrls: ['./analytics.component.scss'],
|
|
2646
|
+
})
|
|
2647
|
+
export class AnalyticsComponent {
|
|
2648
|
+
areamapChart = {
|
|
2649
|
+
dataSet: DM.DataSource,
|
|
2650
|
+
dataOptions: {
|
|
2651
|
+
geo: [DM.Country.Country],
|
|
2652
|
+
color: [measureFactory.sum(DM.Commerce.Revenue, 'Color by Revenue')],
|
|
2653
|
+
} as AreamapChartDataOptions,
|
|
2654
|
+
styleOptions: {
|
|
2655
|
+
mapType: 'world',
|
|
2656
|
+
} as AreamapStyleOptions,
|
|
2657
|
+
};
|
|
2658
|
+
|
|
2659
|
+
logArguments(...args: any[]) {
|
|
2660
|
+
console.log(args);
|
|
2661
|
+
}
|
|
2662
|
+
}
|
|
2663
|
+
* ```
|
|
2664
|
+
* <img src="media://angular-areamap-chart-example.png" width="800px" />
|
|
2665
|
+
*
|
|
2666
|
+
* @group Charts
|
|
1762
2667
|
*/
|
|
1763
|
-
class
|
|
1764
|
-
|
|
1765
|
-
* Constructor for the `MemberFilterTileComponent`.
|
|
1766
|
-
*
|
|
1767
|
-
* @param sisenseContextService - Sisense context service
|
|
1768
|
-
* @param themeService - Theme service
|
|
1769
|
-
*/
|
|
1770
|
-
constructor(
|
|
1771
|
-
/**
|
|
1772
|
-
* Sisense context service
|
|
1773
|
-
*
|
|
1774
|
-
* @category Constructor
|
|
1775
|
-
*/
|
|
1776
|
-
sisenseContextService,
|
|
1777
|
-
/**
|
|
1778
|
-
* Theme service
|
|
1779
|
-
*
|
|
1780
|
-
* @category Constructor
|
|
1781
|
-
*/
|
|
1782
|
-
themeService) {
|
|
1783
|
-
this.sisenseContextService = sisenseContextService;
|
|
1784
|
-
this.themeService = themeService;
|
|
2668
|
+
class AreamapChartComponent {
|
|
2669
|
+
constructor() {
|
|
1785
2670
|
/**
|
|
1786
|
-
* {@inheritDoc @sisense/sdk-ui!
|
|
2671
|
+
* {@inheritDoc @sisense/sdk-ui!AreamapChartProps.onDataPointClick}
|
|
2672
|
+
*
|
|
2673
|
+
* @category Callbacks
|
|
1787
2674
|
*/
|
|
1788
|
-
this.
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
createThemeContextConnector(this.themeService),
|
|
1792
|
-
]);
|
|
1793
|
-
}
|
|
1794
|
-
/**
|
|
1795
|
-
* @internal
|
|
1796
|
-
*/
|
|
1797
|
-
ngAfterViewInit() {
|
|
1798
|
-
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
1799
|
-
}
|
|
1800
|
-
/**
|
|
1801
|
-
* @internal
|
|
1802
|
-
*/
|
|
1803
|
-
ngOnChanges() {
|
|
1804
|
-
if (this.preactRef) {
|
|
1805
|
-
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
1806
|
-
}
|
|
1807
|
-
}
|
|
1808
|
-
createPreactComponent() {
|
|
1809
|
-
const props = {
|
|
1810
|
-
title: this.title,
|
|
1811
|
-
dataSource: this.dataSource,
|
|
1812
|
-
attribute: this.attribute,
|
|
1813
|
-
filter: this.filter,
|
|
1814
|
-
onChange: (...[filter]) => this.filterChange.emit({ filter }),
|
|
1815
|
-
};
|
|
1816
|
-
return createElement(MemberFilterTile, props);
|
|
1817
|
-
}
|
|
1818
|
-
/**
|
|
1819
|
-
* @internal
|
|
1820
|
-
*/
|
|
1821
|
-
ngOnDestroy() {
|
|
1822
|
-
this.componentAdapter.destroy();
|
|
2675
|
+
this.dataPointClick = new EventEmitter();
|
|
2676
|
+
/** @internal */
|
|
2677
|
+
this.chartType = 'areamap';
|
|
1823
2678
|
}
|
|
1824
2679
|
}
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
2680
|
+
AreamapChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AreamapChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2681
|
+
AreamapChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AreamapChartComponent, selector: "csdk-areamap-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions" }, outputs: { dataPointClick: "dataPointClick" }, ngImport: i0, template: `
|
|
2682
|
+
<csdk-chart
|
|
2683
|
+
[chartType]="chartType"
|
|
2684
|
+
[dataSet]="dataSet"
|
|
2685
|
+
[dataOptions]="dataOptions"
|
|
2686
|
+
[filters]="filters"
|
|
2687
|
+
[highlights]="highlights"
|
|
2688
|
+
[styleOptions]="styleOptions"
|
|
2689
|
+
(dataPointClick)="dataPointClick.emit($event)"
|
|
2690
|
+
/>
|
|
2691
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
|
|
2692
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AreamapChartComponent, decorators: [{
|
|
1828
2693
|
type: Component,
|
|
1829
2694
|
args: [{
|
|
1830
|
-
selector: 'csdk-
|
|
1831
|
-
template
|
|
2695
|
+
selector: 'csdk-areamap-chart',
|
|
2696
|
+
template: `
|
|
2697
|
+
<csdk-chart
|
|
2698
|
+
[chartType]="chartType"
|
|
2699
|
+
[dataSet]="dataSet"
|
|
2700
|
+
[dataOptions]="dataOptions"
|
|
2701
|
+
[filters]="filters"
|
|
2702
|
+
[highlights]="highlights"
|
|
2703
|
+
[styleOptions]="styleOptions"
|
|
2704
|
+
(dataPointClick)="dataPointClick.emit($event)"
|
|
2705
|
+
/>
|
|
2706
|
+
`,
|
|
1832
2707
|
}]
|
|
1833
|
-
}],
|
|
1834
|
-
type: ViewChild,
|
|
1835
|
-
args: [rootId]
|
|
1836
|
-
}], title: [{
|
|
2708
|
+
}], propDecorators: { dataSet: [{
|
|
1837
2709
|
type: Input
|
|
1838
|
-
}],
|
|
2710
|
+
}], dataOptions: [{
|
|
1839
2711
|
type: Input
|
|
1840
|
-
}],
|
|
2712
|
+
}], filters: [{
|
|
1841
2713
|
type: Input
|
|
1842
|
-
}],
|
|
2714
|
+
}], highlights: [{
|
|
1843
2715
|
type: Input
|
|
1844
|
-
}],
|
|
2716
|
+
}], styleOptions: [{
|
|
2717
|
+
type: Input
|
|
2718
|
+
}], dataPointClick: [{
|
|
1845
2719
|
type: Output
|
|
1846
2720
|
}] } });
|
|
1847
2721
|
|
|
1848
2722
|
/**
|
|
1849
|
-
*
|
|
1850
|
-
*
|
|
1851
|
-
* It acts as a wrapper around a given chart component, enhancing it with drilldown capabilities
|
|
1852
|
-
*
|
|
1853
|
-
* The widget offers several features including:
|
|
1854
|
-
* - A context menu for initiating drilldown actions (can be provided as a custom component)
|
|
1855
|
-
* - Breadcrumbs that not only allow for drilldown selection slicing but also
|
|
1856
|
-
* provide an option to clear the selection (can be provided as a custom component)
|
|
1857
|
-
* - Filters specifically created for drilldown operation
|
|
1858
|
-
* - An option to navigate to the next drilldown dimension
|
|
1859
|
-
*
|
|
1860
|
-
* When an `initialDimension` is specified, the `drilldownDimension` will automatically inherit its value,
|
|
1861
|
-
* even before any points on the chart are selected.
|
|
1862
|
-
* This allows for complete control over the chart's dimensions to be handed over to the DrilldownWidget
|
|
2723
|
+
* Pivot Table with and pagination.
|
|
1863
2724
|
*
|
|
1864
2725
|
* @example
|
|
1865
|
-
* An example of using the `csdk-drilldown-widget` component to plot a `csdk-column-chart`
|
|
1866
|
-
* over the Sample Healthcare data source hosted in a Sisense instance:
|
|
1867
|
-
* ```ts
|
|
1868
|
-
* // Component behavior in .component.ts
|
|
1869
|
-
* chart = {
|
|
1870
|
-
* dataOptions: {
|
|
1871
|
-
* category: [DM.Divisions.Divison_name],
|
|
1872
|
-
* value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
|
|
1873
|
-
* breakBy: [],
|
|
1874
|
-
* },
|
|
1875
|
-
* dataPointContextMenu: ({ point, nativeEvent }: { point: any; nativeEvent: MouseEvent }) => {
|
|
1876
|
-
* this.drilldownResult?.onDataPointsSelected?.([point], nativeEvent);
|
|
1877
|
-
* this.drilldownResult?.onContextMenu({
|
|
1878
|
-
* left: nativeEvent.clientX,
|
|
1879
|
-
* top: nativeEvent.clientY,
|
|
1880
|
-
* });
|
|
1881
|
-
* }
|
|
1882
|
-
* }
|
|
1883
|
-
*
|
|
1884
|
-
* drilldownResult?: CustomDrilldownResult;
|
|
1885
|
-
*
|
|
1886
|
-
* drilldown = {
|
|
1887
|
-
* drilldownDimensions: [DM.Patients.Gender, DM.Admissions.Surgical_Procedure],
|
|
1888
|
-
* initialDimension: DM.Divisions.Divison_name,
|
|
1889
|
-
* drilldownChange: (drilldownResult: CustomDrilldownResult) => {
|
|
1890
|
-
* this.drilldownResult = drilldownResult;
|
|
1891
|
-
* this.chart.dataOptions = {
|
|
1892
|
-
* ...this.chart.dataOptions,
|
|
1893
|
-
* category: [drilldownResult.drilldownDimension]
|
|
1894
|
-
* }
|
|
1895
|
-
* }
|
|
1896
|
-
* };
|
|
1897
|
-
* ```
|
|
1898
2726
|
* ```html
|
|
1899
|
-
*
|
|
1900
|
-
*
|
|
1901
|
-
*
|
|
1902
|
-
*
|
|
1903
|
-
*
|
|
1904
|
-
*
|
|
1905
|
-
*
|
|
1906
|
-
*
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
*
|
|
1910
|
-
|
|
1911
|
-
|
|
2727
|
+
* <csdk-pivot-table
|
|
2728
|
+
* [dataSet]="pivotTable.dataSet"
|
|
2729
|
+
* [dataOptions]="pivotTable.dataOptions"
|
|
2730
|
+
* [filters]="pivotTable.filters"
|
|
2731
|
+
* [styleOptions]="pivotTable.styleOptions"
|
|
2732
|
+
* />
|
|
2733
|
+
* ```
|
|
2734
|
+
* ```ts
|
|
2735
|
+
import { Component } from '@angular/core';
|
|
2736
|
+
import { measureFactory, filterFactory } from '@sisense/sdk-data';
|
|
2737
|
+
import * as DM from '../../assets/sample-ecommerce';
|
|
2738
|
+
import type { PivotTableDataOptions } from '@sisense/sdk-ui-angular';
|
|
2739
|
+
|
|
2740
|
+
@Component({
|
|
2741
|
+
selector: 'app-analytics',
|
|
2742
|
+
templateUrl: './analytics.component.html',
|
|
2743
|
+
styleUrls: ['./analytics.component.scss'],
|
|
2744
|
+
})
|
|
2745
|
+
export class AnalyticsComponent {
|
|
2746
|
+
|
|
2747
|
+
pivotTableDataOptions: PivotTableDataOptions = {
|
|
2748
|
+
rows: [
|
|
2749
|
+
{ column: DM.Category.Category, includeSubTotals: true },
|
|
2750
|
+
{ column: DM.Commerce.AgeRange, includeSubTotals: true },
|
|
2751
|
+
DM.Commerce.Condition,
|
|
2752
|
+
],
|
|
2753
|
+
columns: [{ column: DM.Commerce.Gender, includeSubTotals: true }],
|
|
2754
|
+
values: [
|
|
2755
|
+
measureFactory.sum(DM.Commerce.Cost, 'Total Cost'),
|
|
2756
|
+
{
|
|
2757
|
+
column: measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue'),
|
|
2758
|
+
totalsCalculation: 'sum',
|
|
2759
|
+
dataBars: true,
|
|
2760
|
+
},
|
|
2761
|
+
],
|
|
2762
|
+
grandTotals: { title: 'Grand Total', rows: true, columns: true },
|
|
2763
|
+
};
|
|
2764
|
+
|
|
2765
|
+
pivotTable = {
|
|
2766
|
+
dataSet: DM.DataSource,
|
|
2767
|
+
dataOptions: this.pivotTableDataOptions,
|
|
2768
|
+
filters: [filterFactory.members(DM.Commerce.Gender, ['Female', 'Male'])],
|
|
2769
|
+
styleOptions: { width: 1400, height: 600, rowsPerPage: 50 },
|
|
2770
|
+
};
|
|
2771
|
+
|
|
2772
|
+
}
|
|
1912
2773
|
* ```
|
|
2774
|
+
* <img src="media://angular-pivot-table-example.png" width="800px" />
|
|
2775
|
+
* @group Data Grids
|
|
2776
|
+
* @alpha
|
|
1913
2777
|
*/
|
|
1914
|
-
class
|
|
1915
|
-
|
|
1916
|
-
* Constructor for the `DrilldownWidgetComponent`.
|
|
1917
|
-
*
|
|
1918
|
-
* @param sisenseContextService - Sisense context service
|
|
1919
|
-
* @param themeService - Theme service
|
|
1920
|
-
*/
|
|
1921
|
-
constructor(
|
|
1922
|
-
/**
|
|
1923
|
-
* Sisense context service
|
|
1924
|
-
*
|
|
1925
|
-
* @category Constructor
|
|
1926
|
-
*/
|
|
1927
|
-
sisenseContextService,
|
|
1928
|
-
/**
|
|
1929
|
-
* Theme service
|
|
1930
|
-
*
|
|
1931
|
-
* @category Constructor
|
|
1932
|
-
*/
|
|
1933
|
-
themeService) {
|
|
2778
|
+
class PivotTableComponent {
|
|
2779
|
+
constructor(sisenseContextService, themeService) {
|
|
1934
2780
|
this.sisenseContextService = sisenseContextService;
|
|
1935
2781
|
this.themeService = themeService;
|
|
1936
|
-
this.drilldownResultChange = new EventEmitter();
|
|
1937
2782
|
this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
|
|
1938
2783
|
createSisenseContextConnector(this.sisenseContextService),
|
|
1939
2784
|
createThemeContextConnector(this.themeService),
|
|
1940
2785
|
]);
|
|
1941
2786
|
}
|
|
1942
|
-
/**
|
|
1943
|
-
* @internal
|
|
1944
|
-
*/
|
|
2787
|
+
/** @internal */
|
|
1945
2788
|
ngAfterViewInit() {
|
|
1946
2789
|
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
1947
2790
|
}
|
|
1948
|
-
/**
|
|
1949
|
-
* @internal
|
|
1950
|
-
*/
|
|
2791
|
+
/** @internal */
|
|
1951
2792
|
ngOnChanges() {
|
|
1952
2793
|
if (this.preactRef) {
|
|
1953
2794
|
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
@@ -1955,103 +2796,91 @@ class DrilldownWidgetComponent {
|
|
|
1955
2796
|
}
|
|
1956
2797
|
createPreactComponent() {
|
|
1957
2798
|
const props = {
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
...(this.config?.breadcrumbsComponent && {
|
|
1963
|
-
breadcrumbsComponent: createWrapperElementHandler(this.config.breadcrumbsComponent),
|
|
1964
|
-
}),
|
|
1965
|
-
...(this.config?.contextMenuComponent && {
|
|
1966
|
-
contextMenuComponent: (contextMenuProps) => createWrapperElement(this.config.contextMenuComponent(contextMenuProps)),
|
|
1967
|
-
}),
|
|
1968
|
-
},
|
|
2799
|
+
dataSet: this.dataSet,
|
|
2800
|
+
dataOptions: this.dataOptions,
|
|
2801
|
+
filters: this.filters,
|
|
2802
|
+
styleOptions: this.styleOptions,
|
|
1969
2803
|
};
|
|
1970
|
-
return createElement(
|
|
1971
|
-
const { breadcrumbsComponent } = customDrilldownResult;
|
|
1972
|
-
this.drilldownResultChange.emit({
|
|
1973
|
-
...customDrilldownResult,
|
|
1974
|
-
...(breadcrumbsComponent && {
|
|
1975
|
-
breadcrumbsComponent: { render: createComponentRenderer(breadcrumbsComponent) },
|
|
1976
|
-
}),
|
|
1977
|
-
});
|
|
1978
|
-
return createWrapperElement(this.preactContentRef.nativeElement);
|
|
1979
|
-
});
|
|
2804
|
+
return createElement(PivotTable, props);
|
|
1980
2805
|
}
|
|
1981
|
-
/**
|
|
1982
|
-
* @internal
|
|
1983
|
-
*/
|
|
2806
|
+
/** @internal */
|
|
1984
2807
|
ngOnDestroy() {
|
|
1985
2808
|
this.componentAdapter.destroy();
|
|
1986
2809
|
}
|
|
1987
2810
|
}
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type:
|
|
2811
|
+
PivotTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PivotTableComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2812
|
+
PivotTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PivotTableComponent, selector: "csdk-pivot-table", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", styleOptions: "styleOptions" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
|
|
2813
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PivotTableComponent, decorators: [{
|
|
1991
2814
|
type: Component,
|
|
1992
2815
|
args: [{
|
|
1993
|
-
selector: 'csdk-
|
|
1994
|
-
template
|
|
2816
|
+
selector: 'csdk-pivot-table',
|
|
2817
|
+
template,
|
|
1995
2818
|
}]
|
|
1996
2819
|
}], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
|
|
1997
2820
|
type: ViewChild,
|
|
1998
2821
|
args: [rootId]
|
|
1999
|
-
}],
|
|
2000
|
-
type: ViewChild,
|
|
2001
|
-
args: [rootContentId]
|
|
2002
|
-
}], drilldownDimensions: [{
|
|
2822
|
+
}], dataSet: [{
|
|
2003
2823
|
type: Input
|
|
2004
|
-
}],
|
|
2824
|
+
}], dataOptions: [{
|
|
2005
2825
|
type: Input
|
|
2006
|
-
}],
|
|
2826
|
+
}], filters: [{
|
|
2827
|
+
type: Input
|
|
2828
|
+
}], styleOptions: [{
|
|
2007
2829
|
type: Input
|
|
2008
|
-
}], drilldownResultChange: [{
|
|
2009
|
-
type: Output
|
|
2010
2830
|
}] } });
|
|
2011
2831
|
|
|
2012
2832
|
/**
|
|
2013
|
-
*
|
|
2833
|
+
* The Table Widget component extending {@link TableComponent} component to support widget style options.
|
|
2834
|
+
*
|
|
2835
|
+
* @example
|
|
2836
|
+
* ```html
|
|
2837
|
+
* <csdk-table-widget
|
|
2838
|
+
* [dataSource]="table.dataSet"
|
|
2839
|
+
* [dataOptions]="table.dataOptions"
|
|
2840
|
+
* [filters]="filters"
|
|
2841
|
+
* [title]="table.title"
|
|
2842
|
+
* [description]="table.description"
|
|
2843
|
+
* />
|
|
2844
|
+
* ```
|
|
2845
|
+
* ```ts
|
|
2846
|
+
* import { Component } from '@angular/core';
|
|
2847
|
+
* import { ChartType } from '@sisense/sdk-ui-angular';
|
|
2848
|
+
* import { filterFactory, measureFactory } from '@sisense/sdk-data';
|
|
2849
|
+
* import * as DM from '../../assets/sample-healthcare-model';
|
|
2850
|
+
*
|
|
2851
|
+
* @Component({
|
|
2852
|
+
* selector: 'app-widgets',
|
|
2853
|
+
* templateUrl: './widgets.component.html',
|
|
2854
|
+
* styleUrls: ['./widgets.component.scss'],
|
|
2855
|
+
* })
|
|
2856
|
+
* export class WidgetsComponent {
|
|
2857
|
+
* filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
|
|
2858
|
+
*
|
|
2859
|
+
* table = {
|
|
2860
|
+
* dataSet: DM.DataSource,
|
|
2861
|
+
* dataOptions: {
|
|
2862
|
+
* columns: [DM.Admissions.Patient_ID, measureFactory.sum(DM.Admissions.Cost_of_admission)],
|
|
2863
|
+
* }
|
|
2864
|
+
* title: 'Widget Title',
|
|
2865
|
+
* description: 'Widget Description',
|
|
2866
|
+
* };
|
|
2867
|
+
* }
|
|
2868
|
+
* ```
|
|
2869
|
+
* <img src="media://angular-table-widget-example.png" width="800px" />
|
|
2870
|
+
* @internal
|
|
2014
2871
|
*/
|
|
2015
|
-
class
|
|
2016
|
-
|
|
2017
|
-
* Constructor for the `DateRangeFilterTileComponent`.
|
|
2018
|
-
*
|
|
2019
|
-
* @param sisenseContextService - Sisense context service
|
|
2020
|
-
* @param themeService - Theme service
|
|
2021
|
-
*/
|
|
2022
|
-
constructor(
|
|
2023
|
-
/**
|
|
2024
|
-
* Sisense context service
|
|
2025
|
-
*
|
|
2026
|
-
* @category Constructor
|
|
2027
|
-
*/
|
|
2028
|
-
sisenseContextService,
|
|
2029
|
-
/**
|
|
2030
|
-
* Theme service
|
|
2031
|
-
*
|
|
2032
|
-
* @category Constructor
|
|
2033
|
-
*/
|
|
2034
|
-
themeService) {
|
|
2872
|
+
class TableWidgetComponent {
|
|
2873
|
+
constructor(sisenseContextService, themeService) {
|
|
2035
2874
|
this.sisenseContextService = sisenseContextService;
|
|
2036
2875
|
this.themeService = themeService;
|
|
2037
|
-
/**
|
|
2038
|
-
* {@inheritDoc @sisense/sdk-ui!DateRangeFilterTileProps.onChange}
|
|
2039
|
-
*/
|
|
2040
|
-
this.filterChange = new EventEmitter();
|
|
2041
2876
|
this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
|
|
2042
2877
|
createSisenseContextConnector(this.sisenseContextService),
|
|
2043
2878
|
createThemeContextConnector(this.themeService),
|
|
2044
2879
|
]);
|
|
2045
2880
|
}
|
|
2046
|
-
/**
|
|
2047
|
-
* @internal
|
|
2048
|
-
*/
|
|
2049
2881
|
ngAfterViewInit() {
|
|
2050
2882
|
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
2051
2883
|
}
|
|
2052
|
-
/**
|
|
2053
|
-
* @internal
|
|
2054
|
-
*/
|
|
2055
2884
|
ngOnChanges() {
|
|
2056
2885
|
if (this.preactRef) {
|
|
2057
2886
|
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
@@ -2059,149 +2888,225 @@ class DateRangeFilterTileComponent {
|
|
|
2059
2888
|
}
|
|
2060
2889
|
createPreactComponent() {
|
|
2061
2890
|
const props = {
|
|
2062
|
-
title: this.title,
|
|
2063
|
-
attribute: this.attribute,
|
|
2064
2891
|
dataSource: this.dataSource,
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2892
|
+
dataOptions: this.dataOptions,
|
|
2893
|
+
filters: this.filters,
|
|
2894
|
+
styleOptions: this.styleOptions,
|
|
2895
|
+
title: this.title,
|
|
2896
|
+
description: this.description,
|
|
2069
2897
|
};
|
|
2070
|
-
return createElement(
|
|
2898
|
+
return createElement(TableWidget, props);
|
|
2071
2899
|
}
|
|
2072
|
-
/**
|
|
2073
|
-
* @internal
|
|
2074
|
-
*/
|
|
2075
2900
|
ngOnDestroy() {
|
|
2076
2901
|
this.componentAdapter.destroy();
|
|
2077
2902
|
}
|
|
2078
2903
|
}
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type:
|
|
2904
|
+
TableWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TableWidgetComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2905
|
+
TableWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TableWidgetComponent, selector: "csdk-table-widget", inputs: { dataSource: "dataSource", dataOptions: "dataOptions", filters: "filters", styleOptions: "styleOptions", title: "title", description: "description" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
|
|
2906
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TableWidgetComponent, decorators: [{
|
|
2082
2907
|
type: Component,
|
|
2083
2908
|
args: [{
|
|
2084
|
-
selector: 'csdk-
|
|
2909
|
+
selector: 'csdk-table-widget',
|
|
2085
2910
|
template,
|
|
2086
2911
|
}]
|
|
2087
2912
|
}], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
|
|
2088
2913
|
type: ViewChild,
|
|
2089
2914
|
args: [rootId]
|
|
2090
|
-
}],
|
|
2915
|
+
}], dataSource: [{
|
|
2091
2916
|
type: Input
|
|
2092
|
-
}],
|
|
2917
|
+
}], dataOptions: [{
|
|
2093
2918
|
type: Input
|
|
2094
|
-
}],
|
|
2919
|
+
}], filters: [{
|
|
2095
2920
|
type: Input
|
|
2096
|
-
}],
|
|
2921
|
+
}], styleOptions: [{
|
|
2097
2922
|
type: Input
|
|
2098
|
-
}],
|
|
2923
|
+
}], title: [{
|
|
2099
2924
|
type: Input
|
|
2100
|
-
}],
|
|
2925
|
+
}], description: [{
|
|
2101
2926
|
type: Input
|
|
2102
|
-
}], filterChange: [{
|
|
2103
|
-
type: Output
|
|
2104
2927
|
}] } });
|
|
2105
2928
|
|
|
2106
2929
|
/**
|
|
2107
|
-
*
|
|
2930
|
+
* The Dashboard Widget component, which is a thin wrapper on {@link ChartWidgetComponent},
|
|
2931
|
+
* is used to render a widget created in a Sisense Fusion instance.
|
|
2932
|
+
*
|
|
2933
|
+
* To learn more about using Sisense Fusion Widgets in Compose SDK, see
|
|
2934
|
+
* [Sisense Fusion Widgets](https://sisense.dev/guides/sdk/guides/charts/guide-fusion-widgets.html).
|
|
2935
|
+
*
|
|
2936
|
+
* @example
|
|
2937
|
+
* ```html
|
|
2938
|
+
* <csdk-dashboard-widget
|
|
2939
|
+
* [widgetOid]="widgetOid"
|
|
2940
|
+
* [dashboardOid]="dashboardOid"
|
|
2941
|
+
* [includeDashboardFilters]="true"
|
|
2942
|
+
* />
|
|
2943
|
+
* ```
|
|
2944
|
+
* ```ts
|
|
2945
|
+
* import { Component } from '@angular/core';
|
|
2946
|
+
* import { ChartType } from '@sisense/sdk-ui-angular';
|
|
2947
|
+
* import { filterFactory, measureFactory } from '@sisense/sdk-data';
|
|
2948
|
+
* import * as DM from '../../assets/sample-healthcare-model';
|
|
2949
|
+
*
|
|
2950
|
+
* @Component({
|
|
2951
|
+
* selector: 'app-widgets',
|
|
2952
|
+
* templateUrl: './widgets.component.html',
|
|
2953
|
+
* styleUrls: ['./widgets.component.scss'],
|
|
2954
|
+
* })
|
|
2955
|
+
* export class WidgetsComponent {
|
|
2956
|
+
* widgetOid: string = '60f3e3e3e4b0e3e3e4b0e3e3';
|
|
2957
|
+
* dashboardOid: string = '60f3e3e3e4b0e3e3e4b0e3e3';
|
|
2958
|
+
* ```
|
|
2959
|
+
* @group Fusion Embed
|
|
2960
|
+
* @fusionEmbed
|
|
2108
2961
|
*/
|
|
2109
|
-
class
|
|
2110
|
-
|
|
2111
|
-
* Constructor for the `DrilldownBreadcrumbsComponent`.
|
|
2112
|
-
*
|
|
2113
|
-
* @param sisenseContextService - Sisense context service
|
|
2114
|
-
* @param themeService - Theme service
|
|
2115
|
-
*/
|
|
2116
|
-
constructor(
|
|
2117
|
-
/**
|
|
2118
|
-
* Sisense context service
|
|
2119
|
-
*
|
|
2120
|
-
* @category Constructor
|
|
2121
|
-
*/
|
|
2122
|
-
sisenseContextService,
|
|
2123
|
-
/**
|
|
2124
|
-
* Theme service
|
|
2125
|
-
*
|
|
2126
|
-
* @category Constructor
|
|
2127
|
-
*/
|
|
2128
|
-
themeService) {
|
|
2962
|
+
class DashboardWidgetComponent {
|
|
2963
|
+
constructor(sisenseContextService, themeService) {
|
|
2129
2964
|
this.sisenseContextService = sisenseContextService;
|
|
2130
2965
|
this.themeService = themeService;
|
|
2131
|
-
/**
|
|
2132
|
-
* {@inheritDoc @sisense/sdk-ui!DrilldownBreadcrumbsProps.clearDrilldownSelections}
|
|
2133
|
-
*
|
|
2134
|
-
* @category Widget
|
|
2135
|
-
*/
|
|
2136
|
-
this.drilldownSelectionsClear = new EventEmitter();
|
|
2137
|
-
/**
|
|
2138
|
-
* {@inheritDoc @sisense/sdk-ui!DrilldownBreadcrumbsProps.sliceDrilldownSelections}
|
|
2139
|
-
*
|
|
2140
|
-
* @category Widget
|
|
2141
|
-
*/
|
|
2142
|
-
this.drilldownSelectionsSlice = new EventEmitter();
|
|
2143
2966
|
this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
|
|
2144
2967
|
createSisenseContextConnector(this.sisenseContextService),
|
|
2145
2968
|
createThemeContextConnector(this.themeService),
|
|
2146
2969
|
]);
|
|
2147
2970
|
}
|
|
2148
|
-
/**
|
|
2149
|
-
* @internal
|
|
2150
|
-
*/
|
|
2971
|
+
/** @internal */
|
|
2151
2972
|
ngAfterViewInit() {
|
|
2152
2973
|
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
2153
2974
|
}
|
|
2154
|
-
/**
|
|
2155
|
-
* @internal
|
|
2156
|
-
*/
|
|
2975
|
+
/** @internal */
|
|
2157
2976
|
ngOnChanges() {
|
|
2158
2977
|
if (this.preactRef) {
|
|
2159
2978
|
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
2160
2979
|
}
|
|
2161
2980
|
}
|
|
2981
|
+
/** @internal */
|
|
2162
2982
|
createPreactComponent() {
|
|
2163
2983
|
const props = {
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2984
|
+
widgetOid: this.widgetOid,
|
|
2985
|
+
dashboardOid: this.dashboardOid,
|
|
2986
|
+
filters: this.filters,
|
|
2987
|
+
highlights: this.highlights,
|
|
2988
|
+
filtersMergeStrategy: this.filtersMergeStrategy,
|
|
2989
|
+
includeDashboardFilters: this.includeDashboardFilters,
|
|
2990
|
+
title: this.title,
|
|
2991
|
+
description: this.description,
|
|
2992
|
+
styleOptions: this.styleOptions,
|
|
2993
|
+
highlightSelectionDisabled: this.highlightSelectionDisabled,
|
|
2994
|
+
drilldownOptions: this.drilldownOptions,
|
|
2168
2995
|
};
|
|
2169
|
-
return createElement(
|
|
2996
|
+
return createElement(DashboardWidget, props);
|
|
2170
2997
|
}
|
|
2171
|
-
/**
|
|
2172
|
-
* @internal
|
|
2173
|
-
*/
|
|
2998
|
+
/** @internal */
|
|
2174
2999
|
ngOnDestroy() {
|
|
2175
3000
|
this.componentAdapter.destroy();
|
|
2176
3001
|
}
|
|
2177
3002
|
}
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type:
|
|
3003
|
+
DashboardWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardWidgetComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3004
|
+
DashboardWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DashboardWidgetComponent, selector: "csdk-dashboard-widget", inputs: { widgetOid: "widgetOid", dashboardOid: "dashboardOid", filters: "filters", highlights: "highlights", filtersMergeStrategy: "filtersMergeStrategy", includeDashboardFilters: "includeDashboardFilters", title: "title", description: "description", styleOptions: "styleOptions", highlightSelectionDisabled: "highlightSelectionDisabled", drilldownOptions: "drilldownOptions" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
|
|
3005
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardWidgetComponent, decorators: [{
|
|
2181
3006
|
type: Component,
|
|
2182
3007
|
args: [{
|
|
2183
|
-
selector: 'csdk-
|
|
3008
|
+
selector: 'csdk-dashboard-widget',
|
|
2184
3009
|
template,
|
|
2185
3010
|
}]
|
|
2186
3011
|
}], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
|
|
2187
3012
|
type: ViewChild,
|
|
2188
3013
|
args: [rootId]
|
|
2189
|
-
}],
|
|
3014
|
+
}], widgetOid: [{
|
|
2190
3015
|
type: Input
|
|
2191
|
-
}],
|
|
3016
|
+
}], dashboardOid: [{
|
|
3017
|
+
type: Input
|
|
3018
|
+
}], filters: [{
|
|
3019
|
+
type: Input
|
|
3020
|
+
}], highlights: [{
|
|
3021
|
+
type: Input
|
|
3022
|
+
}], filtersMergeStrategy: [{
|
|
3023
|
+
type: Input
|
|
3024
|
+
}], includeDashboardFilters: [{
|
|
3025
|
+
type: Input
|
|
3026
|
+
}], title: [{
|
|
3027
|
+
type: Input
|
|
3028
|
+
}], description: [{
|
|
3029
|
+
type: Input
|
|
3030
|
+
}], styleOptions: [{
|
|
3031
|
+
type: Input
|
|
3032
|
+
}], highlightSelectionDisabled: [{
|
|
3033
|
+
type: Input
|
|
3034
|
+
}], drilldownOptions: [{
|
|
2192
3035
|
type: Input
|
|
2193
|
-
}], drilldownSelectionsClear: [{
|
|
2194
|
-
type: Output
|
|
2195
|
-
}], drilldownSelectionsSlice: [{
|
|
2196
|
-
type: Output
|
|
2197
3036
|
}] } });
|
|
2198
3037
|
|
|
2199
3038
|
/**
|
|
2200
|
-
*
|
|
3039
|
+
* An Angular component designed to add drilldown functionality to any type of chart.
|
|
3040
|
+
*
|
|
3041
|
+
* It acts as a wrapper around a given chart component, enhancing it with drilldown capabilities
|
|
3042
|
+
*
|
|
3043
|
+
* The widget offers several features including:
|
|
3044
|
+
* - A context menu for initiating drilldown actions (can be provided as a custom component)
|
|
3045
|
+
* - Breadcrumbs that not only allow for drilldown selection slicing but also
|
|
3046
|
+
* provide an option to clear the selection (can be provided as a custom component)
|
|
3047
|
+
* - Filters specifically created for drilldown operation
|
|
3048
|
+
* - An option to navigate to the next drilldown dimension
|
|
3049
|
+
*
|
|
3050
|
+
* When an `initialDimension` is specified, the `drilldownDimension` will automatically inherit its value,
|
|
3051
|
+
* even before any points on the chart are selected.
|
|
3052
|
+
* This allows for complete control over the chart's dimensions to be handed over to the DrilldownWidget
|
|
3053
|
+
*
|
|
3054
|
+
* @example
|
|
3055
|
+
* An example of using the `csdk-drilldown-widget` component to plot a `csdk-column-chart`
|
|
3056
|
+
* over the Sample Healthcare data source hosted in a Sisense instance:
|
|
3057
|
+
* ```ts
|
|
3058
|
+
* // Component behavior in .component.ts
|
|
3059
|
+
* chart = {
|
|
3060
|
+
* dataOptions: {
|
|
3061
|
+
* category: [DM.Divisions.Divison_name],
|
|
3062
|
+
* value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
|
|
3063
|
+
* breakBy: [],
|
|
3064
|
+
* },
|
|
3065
|
+
* dataPointContextMenu: ({ point, nativeEvent }: { point: any; nativeEvent: MouseEvent }) => {
|
|
3066
|
+
* this.drilldownResult?.onDataPointsSelected?.([point], nativeEvent);
|
|
3067
|
+
* this.drilldownResult?.onContextMenu({
|
|
3068
|
+
* left: nativeEvent.clientX,
|
|
3069
|
+
* top: nativeEvent.clientY,
|
|
3070
|
+
* });
|
|
3071
|
+
* }
|
|
3072
|
+
* }
|
|
3073
|
+
*
|
|
3074
|
+
* drilldownResult?: CustomDrilldownResult;
|
|
3075
|
+
*
|
|
3076
|
+
* drilldown = {
|
|
3077
|
+
* drilldownDimensions: [DM.Patients.Gender, DM.Admissions.Surgical_Procedure],
|
|
3078
|
+
* initialDimension: DM.Divisions.Divison_name,
|
|
3079
|
+
* drilldownChange: (drilldownResult: CustomDrilldownResult) => {
|
|
3080
|
+
* this.drilldownResult = drilldownResult;
|
|
3081
|
+
* this.chart.dataOptions = {
|
|
3082
|
+
* ...this.chart.dataOptions,
|
|
3083
|
+
* category: [drilldownResult.drilldownDimension]
|
|
3084
|
+
* }
|
|
3085
|
+
* }
|
|
3086
|
+
* };
|
|
3087
|
+
* ```
|
|
3088
|
+
* ```html
|
|
3089
|
+
* <!--Component HTML template in .component.html-->
|
|
3090
|
+
* <csdk-drilldown-widget
|
|
3091
|
+
* [drilldownDimensions]="drilldown.drilldownDimensions"
|
|
3092
|
+
* [initialDimension]="drilldown.initialDimension"
|
|
3093
|
+
* (drilldownResultChange)="drilldown.drilldownChange($event)"
|
|
3094
|
+
* >
|
|
3095
|
+
* <csdk-column-chart
|
|
3096
|
+
* [dataSet]="DM.DataSource"
|
|
3097
|
+
* [dataOptions]="chart.dataOptions"
|
|
3098
|
+
* [filters]="drilldownResult?.drilldownFilters || []"
|
|
3099
|
+
* (dataPointContextMenu)="chart.dataPointContextMenu($event)"
|
|
3100
|
+
* />
|
|
3101
|
+
* </csdk-drilldown-widget>
|
|
3102
|
+
* ```
|
|
3103
|
+
* <img src="media://angular-drilldown-widget-example.png" width="800px" />
|
|
3104
|
+
*
|
|
3105
|
+
* @group Drilldown
|
|
2201
3106
|
*/
|
|
2202
|
-
class
|
|
3107
|
+
class DrilldownWidgetComponent {
|
|
2203
3108
|
/**
|
|
2204
|
-
* Constructor for the `
|
|
3109
|
+
* Constructor for the `DrilldownWidgetComponent`.
|
|
2205
3110
|
*
|
|
2206
3111
|
* @param sisenseContextService - Sisense context service
|
|
2207
3112
|
* @param themeService - Theme service
|
|
@@ -2221,10 +3126,7 @@ class ContextMenuComponent {
|
|
|
2221
3126
|
themeService) {
|
|
2222
3127
|
this.sisenseContextService = sisenseContextService;
|
|
2223
3128
|
this.themeService = themeService;
|
|
2224
|
-
|
|
2225
|
-
* {@inheritDoc @sisense/sdk-ui!ContextMenuProps.closeContextMenu}
|
|
2226
|
-
*/
|
|
2227
|
-
this.contextMenuClose = new EventEmitter();
|
|
3129
|
+
this.drilldownResultChange = new EventEmitter();
|
|
2228
3130
|
this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
|
|
2229
3131
|
createSisenseContextConnector(this.sisenseContextService),
|
|
2230
3132
|
createThemeContextConnector(this.themeService),
|
|
@@ -2246,11 +3148,28 @@ class ContextMenuComponent {
|
|
|
2246
3148
|
}
|
|
2247
3149
|
createPreactComponent() {
|
|
2248
3150
|
const props = {
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
3151
|
+
drilldownDimensions: this.drilldownDimensions,
|
|
3152
|
+
initialDimension: this.initialDimension,
|
|
3153
|
+
config: {
|
|
3154
|
+
...this.config,
|
|
3155
|
+
...(this.config?.breadcrumbsComponent && {
|
|
3156
|
+
breadcrumbsComponent: createWrapperElementHandler(this.config.breadcrumbsComponent),
|
|
3157
|
+
}),
|
|
3158
|
+
...(this.config?.contextMenuComponent && {
|
|
3159
|
+
contextMenuComponent: (contextMenuProps) => createWrapperElement(this.config.contextMenuComponent(contextMenuProps)),
|
|
3160
|
+
}),
|
|
3161
|
+
},
|
|
2252
3162
|
};
|
|
2253
|
-
return createElement(
|
|
3163
|
+
return createElement(DrilldownWidget, props, (customDrilldownResult) => {
|
|
3164
|
+
const { breadcrumbsComponent } = customDrilldownResult;
|
|
3165
|
+
this.drilldownResultChange.emit({
|
|
3166
|
+
...customDrilldownResult,
|
|
3167
|
+
...(breadcrumbsComponent && {
|
|
3168
|
+
breadcrumbsComponent: { render: createComponentRenderer(breadcrumbsComponent) },
|
|
3169
|
+
}),
|
|
3170
|
+
});
|
|
3171
|
+
return createWrapperElement(this.preactContentRef.nativeElement);
|
|
3172
|
+
});
|
|
2254
3173
|
}
|
|
2255
3174
|
/**
|
|
2256
3175
|
* @internal
|
|
@@ -2259,12 +3178,12 @@ class ContextMenuComponent {
|
|
|
2259
3178
|
this.componentAdapter.destroy();
|
|
2260
3179
|
}
|
|
2261
3180
|
}
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type:
|
|
3181
|
+
DrilldownWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DrilldownWidgetComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3182
|
+
DrilldownWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DrilldownWidgetComponent, selector: "csdk-drilldown-widget", inputs: { drilldownDimensions: "drilldownDimensions", initialDimension: "initialDimension", config: "config" }, outputs: { drilldownResultChange: "drilldownResultChange" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }, { propertyName: "preactContentRef", first: true, predicate: ["preactContent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\">\n <div #preactContent style=\"width: 100%; height: 100%\">\n <ng-content></ng-content>\n </div>\n </div>\n", isInline: true });
|
|
3183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DrilldownWidgetComponent, decorators: [{
|
|
2265
3184
|
type: Component,
|
|
2266
3185
|
args: [{
|
|
2267
|
-
selector: 'csdk-
|
|
3186
|
+
selector: 'csdk-drilldown-widget',
|
|
2268
3187
|
template: templateWithContent,
|
|
2269
3188
|
}]
|
|
2270
3189
|
}], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
|
|
@@ -2273,78 +3192,149 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2273
3192
|
}], preactContentRef: [{
|
|
2274
3193
|
type: ViewChild,
|
|
2275
3194
|
args: [rootContentId]
|
|
2276
|
-
}],
|
|
3195
|
+
}], drilldownDimensions: [{
|
|
2277
3196
|
type: Input
|
|
2278
|
-
}],
|
|
3197
|
+
}], initialDimension: [{
|
|
2279
3198
|
type: Input
|
|
2280
|
-
}],
|
|
3199
|
+
}], config: [{
|
|
3200
|
+
type: Input
|
|
3201
|
+
}], drilldownResultChange: [{
|
|
2281
3202
|
type: Output
|
|
2282
3203
|
}] } });
|
|
2283
3204
|
|
|
2284
3205
|
/**
|
|
2285
|
-
*
|
|
2286
|
-
*
|
|
2287
|
-
*
|
|
3206
|
+
* The Chart Widget component extending {@link ChartComponent} to support widget style options.
|
|
3207
|
+
*
|
|
3208
|
+
* @example
|
|
3209
|
+
* ```html
|
|
3210
|
+
* <csdk-chart-widget
|
|
3211
|
+
* [chartType]="chartWidget.chartType"
|
|
3212
|
+
* [dataSource]="chartWidget.dataSource"
|
|
3213
|
+
* [dataOptions]="chartWidget.dataOptions"
|
|
3214
|
+
* [highlights]="filters"
|
|
3215
|
+
* [title]="chartWidget.title"
|
|
3216
|
+
* [description]="chartWidget.description"
|
|
3217
|
+
* [beforeRender]="onBeforeRender"
|
|
3218
|
+
* (dataPointClick)="logArguments($event)"
|
|
3219
|
+
* (dataPointContextMenu)="logArguments($event)"
|
|
3220
|
+
* (dataPointsSelect)="logArguments($event)"
|
|
3221
|
+
* />
|
|
3222
|
+
* ```
|
|
3223
|
+
* ```ts
|
|
3224
|
+
* import { Component } from '@angular/core';
|
|
3225
|
+
* import { ChartType } from '@sisense/sdk-ui-angular';
|
|
3226
|
+
* import { filterFactory } from '@sisense/sdk-data';
|
|
3227
|
+
* import * as DM from '../../assets/sample-healthcare-model';
|
|
3228
|
+
*
|
|
3229
|
+
* @Component({
|
|
3230
|
+
* selector: 'app-widgets',
|
|
3231
|
+
* templateUrl: './widgets.component.html',
|
|
3232
|
+
* styleUrls: ['./widgets.component.scss'],
|
|
3233
|
+
* })
|
|
3234
|
+
* export class WidgetsComponent {
|
|
3235
|
+
* filters = [filterFactory.members(DM.Divisions.Divison_name, ['Cardiology', 'Neurology'])];
|
|
3236
|
+
* chartWidget = {
|
|
3237
|
+
* chartType: 'column' as ChartType,
|
|
3238
|
+
* dataSource: DM.DataSource,
|
|
3239
|
+
* dataOptions: {
|
|
3240
|
+
* category: [DM.Divisions.Divison_name],
|
|
3241
|
+
* value: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
|
|
3242
|
+
* breakBy: [],
|
|
3243
|
+
* },
|
|
3244
|
+
* title: 'Chart Title',
|
|
3245
|
+
* description: 'Chart Description',
|
|
3246
|
+
* };
|
|
3247
|
+
* logArguments(...args: any[]) {
|
|
3248
|
+
* console.log(args);
|
|
3249
|
+
* }
|
|
3250
|
+
*
|
|
3251
|
+
* onBeforeRender(options: any) {
|
|
3252
|
+
* console.log('beforeRender');
|
|
3253
|
+
* console.log(options);
|
|
3254
|
+
* return options;
|
|
3255
|
+
* }
|
|
3256
|
+
*
|
|
3257
|
+
* }
|
|
3258
|
+
* ```
|
|
3259
|
+
* <img src="media://angular-chart-widget-example.png" width="800px" />
|
|
3260
|
+
*
|
|
3261
|
+
* @group Chart Utilities
|
|
2288
3262
|
*/
|
|
2289
|
-
class
|
|
2290
|
-
constructor() {
|
|
3263
|
+
class ChartWidgetComponent {
|
|
3264
|
+
constructor(sisenseContextService, themeService) {
|
|
3265
|
+
this.sisenseContextService = sisenseContextService;
|
|
3266
|
+
this.themeService = themeService;
|
|
2291
3267
|
/**
|
|
2292
|
-
* {@inheritDoc @sisense/sdk-ui!
|
|
3268
|
+
* {@inheritDoc @sisense/sdk-ui!ChartProps.onDataPointClick}
|
|
2293
3269
|
*
|
|
2294
3270
|
* @category Callbacks
|
|
2295
3271
|
*/
|
|
2296
3272
|
this.dataPointClick = new EventEmitter();
|
|
2297
3273
|
/**
|
|
2298
|
-
* {@inheritDoc @sisense/sdk-ui!
|
|
3274
|
+
* {@inheritDoc @sisense/sdk-ui!ChartProps.onDataPointContextMenu}
|
|
2299
3275
|
*
|
|
2300
3276
|
* @category Callbacks
|
|
2301
3277
|
*/
|
|
2302
3278
|
this.dataPointContextMenu = new EventEmitter();
|
|
2303
3279
|
/**
|
|
2304
|
-
* {@inheritDoc @sisense/sdk-ui!
|
|
3280
|
+
* {@inheritDoc @sisense/sdk-ui!ChartProps.onDataPointsSelected}
|
|
2305
3281
|
*
|
|
2306
3282
|
* @category Callbacks
|
|
2307
3283
|
*/
|
|
2308
3284
|
this.dataPointsSelect = new EventEmitter();
|
|
2309
|
-
|
|
2310
|
-
|
|
3285
|
+
this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
|
|
3286
|
+
createSisenseContextConnector(this.sisenseContextService),
|
|
3287
|
+
createThemeContextConnector(this.themeService),
|
|
3288
|
+
]);
|
|
3289
|
+
}
|
|
3290
|
+
/** @internal */
|
|
3291
|
+
ngAfterViewInit() {
|
|
3292
|
+
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
3293
|
+
}
|
|
3294
|
+
/** @internal */
|
|
3295
|
+
ngOnChanges() {
|
|
3296
|
+
if (this.preactRef) {
|
|
3297
|
+
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
3298
|
+
}
|
|
3299
|
+
}
|
|
3300
|
+
createPreactComponent() {
|
|
3301
|
+
const props = {
|
|
3302
|
+
chartType: this.chartType,
|
|
3303
|
+
dataSource: this.dataSource,
|
|
3304
|
+
dataOptions: this.dataOptions,
|
|
3305
|
+
filters: this.filters,
|
|
3306
|
+
highlights: this.highlights,
|
|
3307
|
+
styleOptions: this.styleOptions,
|
|
3308
|
+
drilldownOptions: this.drilldownOptions,
|
|
3309
|
+
title: this.title,
|
|
3310
|
+
description: this.description,
|
|
3311
|
+
highlightSelectionDisabled: this.highlightSelectionDisabled,
|
|
3312
|
+
onBeforeRender: this.beforeRender?.bind(this),
|
|
3313
|
+
onDataPointClick: (...[point, nativeEvent]) => this.dataPointClick.emit({ point, nativeEvent }),
|
|
3314
|
+
onDataPointContextMenu: (...[point, nativeEvent]) => this.dataPointContextMenu.emit({ point, nativeEvent }),
|
|
3315
|
+
onDataPointsSelected: (...[points, nativeEvent]) => this.dataPointsSelect.emit({ points, nativeEvent }),
|
|
3316
|
+
};
|
|
3317
|
+
return createElement(ChartWidget, props);
|
|
3318
|
+
}
|
|
3319
|
+
/** @internal */
|
|
3320
|
+
ngOnDestroy() {
|
|
3321
|
+
this.componentAdapter.destroy();
|
|
2311
3322
|
}
|
|
2312
3323
|
}
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
[chartType]="chartType"
|
|
2317
|
-
[dataSet]="dataSet"
|
|
2318
|
-
[dataOptions]="dataOptions"
|
|
2319
|
-
[filters]="filters"
|
|
2320
|
-
[highlights]="highlights"
|
|
2321
|
-
[styleOptions]="styleOptions"
|
|
2322
|
-
[beforeRender]="beforeRender"
|
|
2323
|
-
(dataPointClick)="dataPointClick.emit($event)"
|
|
2324
|
-
(dataPointContextMenu)="dataPointContextMenu.emit($event)"
|
|
2325
|
-
(dataPointsSelect)="dataPointsSelect.emit($event)"
|
|
2326
|
-
/>
|
|
2327
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
|
|
2328
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BoxplotChartComponent, decorators: [{
|
|
3324
|
+
ChartWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWidgetComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3325
|
+
ChartWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ChartWidgetComponent, selector: "csdk-chart-widget", inputs: { chartType: "chartType", dataSource: "dataSource", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions", drilldownOptions: "drilldownOptions", title: "title", description: "description", highlightSelectionDisabled: "highlightSelectionDisabled", beforeRender: "beforeRender" }, outputs: { dataPointClick: "dataPointClick", dataPointContextMenu: "dataPointContextMenu", dataPointsSelect: "dataPointsSelect" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
|
|
3326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWidgetComponent, decorators: [{
|
|
2329
3327
|
type: Component,
|
|
2330
3328
|
args: [{
|
|
2331
|
-
selector: 'csdk-
|
|
2332
|
-
template
|
|
2333
|
-
<csdk-chart
|
|
2334
|
-
[chartType]="chartType"
|
|
2335
|
-
[dataSet]="dataSet"
|
|
2336
|
-
[dataOptions]="dataOptions"
|
|
2337
|
-
[filters]="filters"
|
|
2338
|
-
[highlights]="highlights"
|
|
2339
|
-
[styleOptions]="styleOptions"
|
|
2340
|
-
[beforeRender]="beforeRender"
|
|
2341
|
-
(dataPointClick)="dataPointClick.emit($event)"
|
|
2342
|
-
(dataPointContextMenu)="dataPointContextMenu.emit($event)"
|
|
2343
|
-
(dataPointsSelect)="dataPointsSelect.emit($event)"
|
|
2344
|
-
/>
|
|
2345
|
-
`,
|
|
3329
|
+
selector: 'csdk-chart-widget',
|
|
3330
|
+
template,
|
|
2346
3331
|
}]
|
|
2347
|
-
}], propDecorators: {
|
|
3332
|
+
}], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
|
|
3333
|
+
type: ViewChild,
|
|
3334
|
+
args: [rootId]
|
|
3335
|
+
}], chartType: [{
|
|
3336
|
+
type: Input
|
|
3337
|
+
}], dataSource: [{
|
|
2348
3338
|
type: Input
|
|
2349
3339
|
}], dataOptions: [{
|
|
2350
3340
|
type: Input
|
|
@@ -2354,6 +3344,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2354
3344
|
type: Input
|
|
2355
3345
|
}], styleOptions: [{
|
|
2356
3346
|
type: Input
|
|
3347
|
+
}], drilldownOptions: [{
|
|
3348
|
+
type: Input
|
|
3349
|
+
}], title: [{
|
|
3350
|
+
type: Input
|
|
3351
|
+
}], description: [{
|
|
3352
|
+
type: Input
|
|
3353
|
+
}], highlightSelectionDisabled: [{
|
|
3354
|
+
type: Input
|
|
2357
3355
|
}], beforeRender: [{
|
|
2358
3356
|
type: Input
|
|
2359
3357
|
}], dataPointClick: [{
|
|
@@ -2365,140 +3363,145 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2365
3363
|
}] } });
|
|
2366
3364
|
|
|
2367
3365
|
/**
|
|
2368
|
-
*
|
|
2369
|
-
*
|
|
3366
|
+
* Drilldown Breadcrumbs Component
|
|
3367
|
+
*
|
|
3368
|
+
* @group Drilldown
|
|
2370
3369
|
*/
|
|
2371
|
-
class
|
|
2372
|
-
|
|
3370
|
+
class DrilldownBreadcrumbsComponent {
|
|
3371
|
+
/**
|
|
3372
|
+
* Constructor for the `DrilldownBreadcrumbsComponent`.
|
|
3373
|
+
*
|
|
3374
|
+
* @param sisenseContextService - Sisense context service
|
|
3375
|
+
* @param themeService - Theme service
|
|
3376
|
+
*/
|
|
3377
|
+
constructor(
|
|
3378
|
+
/**
|
|
3379
|
+
* Sisense context service
|
|
3380
|
+
*
|
|
3381
|
+
* @category Constructor
|
|
3382
|
+
*/
|
|
3383
|
+
sisenseContextService,
|
|
3384
|
+
/**
|
|
3385
|
+
* Theme service
|
|
3386
|
+
*
|
|
3387
|
+
* @category Constructor
|
|
3388
|
+
*/
|
|
3389
|
+
themeService) {
|
|
3390
|
+
this.sisenseContextService = sisenseContextService;
|
|
3391
|
+
this.themeService = themeService;
|
|
2373
3392
|
/**
|
|
2374
|
-
* {@inheritDoc @sisense/sdk-ui!
|
|
3393
|
+
* {@inheritDoc @sisense/sdk-ui!DrilldownBreadcrumbsProps.clearDrilldownSelections}
|
|
2375
3394
|
*
|
|
2376
|
-
* @category
|
|
3395
|
+
* @category Widget
|
|
2377
3396
|
*/
|
|
2378
|
-
this.
|
|
2379
|
-
/** @internal */
|
|
2380
|
-
this.chartType = 'scattermap';
|
|
2381
|
-
}
|
|
2382
|
-
}
|
|
2383
|
-
ScattermapChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ScattermapChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2384
|
-
ScattermapChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ScattermapChartComponent, selector: "csdk-scattermap-chart", inputs: { dataSet: "dataSet", dataOptions: "dataOptions", filters: "filters", highlights: "highlights", styleOptions: "styleOptions" }, outputs: { dataPointClick: "dataPointClick" }, ngImport: i0, template: `
|
|
2385
|
-
<csdk-chart
|
|
2386
|
-
[chartType]="chartType"
|
|
2387
|
-
[dataSet]="dataSet"
|
|
2388
|
-
[dataOptions]="dataOptions"
|
|
2389
|
-
[filters]="filters"
|
|
2390
|
-
[highlights]="highlights"
|
|
2391
|
-
[styleOptions]="styleOptions"
|
|
2392
|
-
(dataPointClick)="dataPointClick.emit($event)"
|
|
2393
|
-
/>
|
|
2394
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
|
|
2395
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ScattermapChartComponent, decorators: [{
|
|
2396
|
-
type: Component,
|
|
2397
|
-
args: [{
|
|
2398
|
-
selector: 'csdk-scattermap-chart',
|
|
2399
|
-
template: `
|
|
2400
|
-
<csdk-chart
|
|
2401
|
-
[chartType]="chartType"
|
|
2402
|
-
[dataSet]="dataSet"
|
|
2403
|
-
[dataOptions]="dataOptions"
|
|
2404
|
-
[filters]="filters"
|
|
2405
|
-
[highlights]="highlights"
|
|
2406
|
-
[styleOptions]="styleOptions"
|
|
2407
|
-
(dataPointClick)="dataPointClick.emit($event)"
|
|
2408
|
-
/>
|
|
2409
|
-
`,
|
|
2410
|
-
}]
|
|
2411
|
-
}], propDecorators: { dataSet: [{
|
|
2412
|
-
type: Input
|
|
2413
|
-
}], dataOptions: [{
|
|
2414
|
-
type: Input
|
|
2415
|
-
}], filters: [{
|
|
2416
|
-
type: Input
|
|
2417
|
-
}], highlights: [{
|
|
2418
|
-
type: Input
|
|
2419
|
-
}], styleOptions: [{
|
|
2420
|
-
type: Input
|
|
2421
|
-
}], dataPointClick: [{
|
|
2422
|
-
type: Output
|
|
2423
|
-
}] } });
|
|
2424
|
-
|
|
2425
|
-
/**
|
|
2426
|
-
* An Angular component that allows to visualize geographical data as polygons on a map.
|
|
2427
|
-
* See [Areamap Chart](https://docs.sisense.com/main/SisenseLinux/area-map.htm) for more information.
|
|
2428
|
-
*/
|
|
2429
|
-
class AreamapChartComponent {
|
|
2430
|
-
constructor() {
|
|
3397
|
+
this.drilldownSelectionsClear = new EventEmitter();
|
|
2431
3398
|
/**
|
|
2432
|
-
* {@inheritDoc @sisense/sdk-ui!
|
|
3399
|
+
* {@inheritDoc @sisense/sdk-ui!DrilldownBreadcrumbsProps.sliceDrilldownSelections}
|
|
2433
3400
|
*
|
|
2434
|
-
* @category
|
|
3401
|
+
* @category Widget
|
|
2435
3402
|
*/
|
|
2436
|
-
this.
|
|
2437
|
-
|
|
2438
|
-
|
|
3403
|
+
this.drilldownSelectionsSlice = new EventEmitter();
|
|
3404
|
+
this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
|
|
3405
|
+
createSisenseContextConnector(this.sisenseContextService),
|
|
3406
|
+
createThemeContextConnector(this.themeService),
|
|
3407
|
+
]);
|
|
3408
|
+
}
|
|
3409
|
+
/**
|
|
3410
|
+
* @internal
|
|
3411
|
+
*/
|
|
3412
|
+
ngAfterViewInit() {
|
|
3413
|
+
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
3414
|
+
}
|
|
3415
|
+
/**
|
|
3416
|
+
* @internal
|
|
3417
|
+
*/
|
|
3418
|
+
ngOnChanges() {
|
|
3419
|
+
if (this.preactRef) {
|
|
3420
|
+
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
3421
|
+
}
|
|
3422
|
+
}
|
|
3423
|
+
createPreactComponent() {
|
|
3424
|
+
const props = {
|
|
3425
|
+
filtersDisplayValues: this.filtersDisplayValues,
|
|
3426
|
+
currentDimension: this.currentDimension,
|
|
3427
|
+
clearDrilldownSelections: () => this.drilldownSelectionsClear.emit(),
|
|
3428
|
+
sliceDrilldownSelections: (i) => this.drilldownSelectionsSlice.emit(i),
|
|
3429
|
+
};
|
|
3430
|
+
return createElement(DrilldownBreadcrumbs, props);
|
|
3431
|
+
}
|
|
3432
|
+
/**
|
|
3433
|
+
* @internal
|
|
3434
|
+
*/
|
|
3435
|
+
ngOnDestroy() {
|
|
3436
|
+
this.componentAdapter.destroy();
|
|
2439
3437
|
}
|
|
2440
3438
|
}
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
[chartType]="chartType"
|
|
2445
|
-
[dataSet]="dataSet"
|
|
2446
|
-
[dataOptions]="dataOptions"
|
|
2447
|
-
[filters]="filters"
|
|
2448
|
-
[highlights]="highlights"
|
|
2449
|
-
[styleOptions]="styleOptions"
|
|
2450
|
-
(dataPointClick)="dataPointClick.emit($event)"
|
|
2451
|
-
/>
|
|
2452
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ChartComponent, selector: "csdk-chart", inputs: ["chartType", "dataSet", "dataOptions", "filters", "highlights", "styleOptions", "beforeRender"], outputs: ["dataPointClick", "dataPointContextMenu", "dataPointsSelect"] }] });
|
|
2453
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AreamapChartComponent, decorators: [{
|
|
3439
|
+
DrilldownBreadcrumbsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DrilldownBreadcrumbsComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3440
|
+
DrilldownBreadcrumbsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DrilldownBreadcrumbsComponent, selector: "csdk-drilldown-breadcrumbs", inputs: { filtersDisplayValues: "filtersDisplayValues", currentDimension: "currentDimension" }, outputs: { drilldownSelectionsClear: "drilldownSelectionsClear", drilldownSelectionsSlice: "drilldownSelectionsSlice" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
|
|
3441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DrilldownBreadcrumbsComponent, decorators: [{
|
|
2454
3442
|
type: Component,
|
|
2455
3443
|
args: [{
|
|
2456
|
-
selector: 'csdk-
|
|
2457
|
-
template
|
|
2458
|
-
<csdk-chart
|
|
2459
|
-
[chartType]="chartType"
|
|
2460
|
-
[dataSet]="dataSet"
|
|
2461
|
-
[dataOptions]="dataOptions"
|
|
2462
|
-
[filters]="filters"
|
|
2463
|
-
[highlights]="highlights"
|
|
2464
|
-
[styleOptions]="styleOptions"
|
|
2465
|
-
(dataPointClick)="dataPointClick.emit($event)"
|
|
2466
|
-
/>
|
|
2467
|
-
`,
|
|
3444
|
+
selector: 'csdk-drilldown-breadcrumbs',
|
|
3445
|
+
template,
|
|
2468
3446
|
}]
|
|
2469
|
-
}], propDecorators: {
|
|
2470
|
-
type:
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
}], filters: [{
|
|
2474
|
-
type: Input
|
|
2475
|
-
}], highlights: [{
|
|
3447
|
+
}], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
|
|
3448
|
+
type: ViewChild,
|
|
3449
|
+
args: [rootId]
|
|
3450
|
+
}], filtersDisplayValues: [{
|
|
2476
3451
|
type: Input
|
|
2477
|
-
}],
|
|
3452
|
+
}], currentDimension: [{
|
|
2478
3453
|
type: Input
|
|
2479
|
-
}],
|
|
3454
|
+
}], drilldownSelectionsClear: [{
|
|
3455
|
+
type: Output
|
|
3456
|
+
}], drilldownSelectionsSlice: [{
|
|
2480
3457
|
type: Output
|
|
2481
3458
|
}] } });
|
|
2482
3459
|
|
|
2483
3460
|
/**
|
|
2484
|
-
*
|
|
3461
|
+
* Context Menu Component
|
|
2485
3462
|
*
|
|
2486
|
-
* @
|
|
3463
|
+
* @group Drilldown
|
|
2487
3464
|
*/
|
|
2488
|
-
class
|
|
2489
|
-
|
|
3465
|
+
class ContextMenuComponent {
|
|
3466
|
+
/**
|
|
3467
|
+
* Constructor for the `ContextMenuComponent`.
|
|
3468
|
+
*
|
|
3469
|
+
* @param sisenseContextService - Sisense context service
|
|
3470
|
+
* @param themeService - Theme service
|
|
3471
|
+
*/
|
|
3472
|
+
constructor(
|
|
3473
|
+
/**
|
|
3474
|
+
* Sisense context service
|
|
3475
|
+
*
|
|
3476
|
+
* @category Constructor
|
|
3477
|
+
*/
|
|
3478
|
+
sisenseContextService,
|
|
3479
|
+
/**
|
|
3480
|
+
* Theme service
|
|
3481
|
+
*
|
|
3482
|
+
* @category Constructor
|
|
3483
|
+
*/
|
|
3484
|
+
themeService) {
|
|
2490
3485
|
this.sisenseContextService = sisenseContextService;
|
|
2491
3486
|
this.themeService = themeService;
|
|
3487
|
+
/**
|
|
3488
|
+
* {@inheritDoc @sisense/sdk-ui!ContextMenuProps.closeContextMenu}
|
|
3489
|
+
*/
|
|
3490
|
+
this.contextMenuClose = new EventEmitter();
|
|
2492
3491
|
this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
|
|
2493
3492
|
createSisenseContextConnector(this.sisenseContextService),
|
|
2494
3493
|
createThemeContextConnector(this.themeService),
|
|
2495
3494
|
]);
|
|
2496
3495
|
}
|
|
2497
|
-
/**
|
|
3496
|
+
/**
|
|
3497
|
+
* @internal
|
|
3498
|
+
*/
|
|
2498
3499
|
ngAfterViewInit() {
|
|
2499
3500
|
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
2500
3501
|
}
|
|
2501
|
-
/**
|
|
3502
|
+
/**
|
|
3503
|
+
* @internal
|
|
3504
|
+
*/
|
|
2502
3505
|
ngOnChanges() {
|
|
2503
3506
|
if (this.preactRef) {
|
|
2504
3507
|
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
@@ -2506,37 +3509,39 @@ class PivotTableComponent {
|
|
|
2506
3509
|
}
|
|
2507
3510
|
createPreactComponent() {
|
|
2508
3511
|
const props = {
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
styleOptions: this.styleOptions,
|
|
3512
|
+
position: this.position,
|
|
3513
|
+
itemSections: this.itemSections,
|
|
3514
|
+
closeContextMenu: () => this.contextMenuClose.emit(),
|
|
2513
3515
|
};
|
|
2514
|
-
return createElement(
|
|
3516
|
+
return createElement(ContextMenu, props, createWrapperElement(this.preactContentRef.nativeElement));
|
|
2515
3517
|
}
|
|
2516
|
-
/**
|
|
3518
|
+
/**
|
|
3519
|
+
* @internal
|
|
3520
|
+
*/
|
|
2517
3521
|
ngOnDestroy() {
|
|
2518
3522
|
this.componentAdapter.destroy();
|
|
2519
3523
|
}
|
|
2520
3524
|
}
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type:
|
|
3525
|
+
ContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3526
|
+
ContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ContextMenuComponent, selector: "csdk-context-menu", inputs: { position: "position", itemSections: "itemSections" }, outputs: { contextMenuClose: "contextMenuClose" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }, { propertyName: "preactContentRef", first: true, predicate: ["preactContent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\">\n <div #preactContent style=\"width: 100%; height: 100%\">\n <ng-content></ng-content>\n </div>\n </div>\n", isInline: true });
|
|
3527
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuComponent, decorators: [{
|
|
2524
3528
|
type: Component,
|
|
2525
3529
|
args: [{
|
|
2526
|
-
selector: 'csdk-
|
|
2527
|
-
template,
|
|
3530
|
+
selector: 'csdk-context-menu',
|
|
3531
|
+
template: templateWithContent,
|
|
2528
3532
|
}]
|
|
2529
3533
|
}], ctorParameters: function () { return [{ type: SisenseContextService }, { type: ThemeService }]; }, propDecorators: { preactRef: [{
|
|
2530
3534
|
type: ViewChild,
|
|
2531
3535
|
args: [rootId]
|
|
2532
|
-
}],
|
|
2533
|
-
type:
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
}], filters: [{
|
|
3536
|
+
}], preactContentRef: [{
|
|
3537
|
+
type: ViewChild,
|
|
3538
|
+
args: [rootContentId]
|
|
3539
|
+
}], position: [{
|
|
2537
3540
|
type: Input
|
|
2538
|
-
}],
|
|
3541
|
+
}], itemSections: [{
|
|
2539
3542
|
type: Input
|
|
3543
|
+
}], contextMenuClose: [{
|
|
3544
|
+
type: Output
|
|
2540
3545
|
}] } });
|
|
2541
3546
|
|
|
2542
3547
|
/**
|
|
@@ -2564,6 +3569,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2564
3569
|
* bootstrap: [AppComponent],
|
|
2565
3570
|
* })
|
|
2566
3571
|
* ```
|
|
3572
|
+
*
|
|
3573
|
+
* @group Contexts
|
|
2567
3574
|
*/
|
|
2568
3575
|
class SdkUiModule {
|
|
2569
3576
|
}
|
|
@@ -2692,7 +3699,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2692
3699
|
*/
|
|
2693
3700
|
/**
|
|
2694
3701
|
* @packageDocumentation
|
|
2695
|
-
* @
|
|
3702
|
+
* @groupDescription Charts
|
|
3703
|
+
* Angular components for charts
|
|
3704
|
+
* @groupDescription Fusion Embed
|
|
3705
|
+
* Fusion Dashboards, Widgets, Queries, and Formulas
|
|
3706
|
+
* @groupDescription Interfaces
|
|
3707
|
+
* TypeScript interfaces for components and services listed above
|
|
3708
|
+
* @groupDescription Type Aliases
|
|
3709
|
+
* TypeScript type aliases for components and services listed above
|
|
2696
3710
|
*/
|
|
2697
3711
|
|
|
2698
3712
|
/**
|