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