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