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