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