@progress/kendo-angular-charts 15.5.0-develop.9 → 16.0.0-develop.1
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/charts.module.d.ts +2 -1
- package/common/has-observers.d.ts +9 -0
- package/esm2020/chart.component.mjs +1 -3
- package/esm2020/charts.module.mjs +4 -3
- package/esm2020/common/has-observers.mjs +10 -0
- package/esm2020/common/theme.service.mjs +6 -0
- package/esm2020/index.mjs +4 -0
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/sankey/api-types/index.mjs +5 -0
- package/esm2020/sankey/data-binding/create-sankey-data.mjs +45 -0
- package/esm2020/sankey/data-binding/flat-binding.directive.mjs +65 -0
- package/esm2020/sankey/data-binding/flat-binding.event.mjs +15 -0
- package/esm2020/sankey/events/index.mjs +8 -0
- package/esm2020/sankey/events/instance-event.service.mjs +22 -0
- package/esm2020/sankey/events/sankey-base-event.mjs +18 -0
- package/esm2020/sankey/events/sankey-link-event.mjs +17 -0
- package/esm2020/sankey/events/sankey-node-event.mjs +17 -0
- package/esm2020/sankey/labels.component.mjs +49 -0
- package/esm2020/sankey/legend.component.mjs +64 -0
- package/esm2020/sankey/links.component.mjs +37 -0
- package/esm2020/sankey/localization/custom-messages.component.mjs +42 -0
- package/esm2020/sankey/localization/localized-messages.directive.mjs +37 -0
- package/esm2020/sankey/localization/messages.mjs +23 -0
- package/esm2020/sankey/nodes.component.mjs +43 -0
- package/esm2020/sankey/title.component.mjs +59 -0
- package/esm2020/sankey/tooltip/link-tooltip-template-context.mjs +18 -0
- package/esm2020/sankey/tooltip/link-tooltip-template.directive.mjs +87 -0
- package/esm2020/sankey/tooltip/node-tooltip-template-context.mjs +18 -0
- package/esm2020/sankey/tooltip/node-tooltip-template.directive.mjs +64 -0
- package/esm2020/sankey/tooltip/square-symbol.directive.mjs +43 -0
- package/esm2020/sankey/tooltip/tooltip-popup.component.mjs +203 -0
- package/esm2020/sankey/tooltip/tooltip-template.service.mjs +16 -0
- package/esm2020/sankey/tooltip.component.mjs +52 -0
- package/esm2020/sankey.component.mjs +378 -0
- package/esm2020/sankey.directives.mjs +46 -0
- package/esm2020/sankey.module.mjs +63 -0
- package/fesm2015/progress-kendo-angular-charts.mjs +1353 -30
- package/fesm2020/progress-kendo-angular-charts.mjs +1347 -27
- package/index.d.ts +4 -0
- package/package.json +9 -8
- package/sankey/api-types/index.d.ts +21 -0
- package/sankey/data-binding/create-sankey-data.d.ts +9 -0
- package/sankey/data-binding/flat-binding.directive.d.ts +38 -0
- package/sankey/data-binding/flat-binding.event.d.ts +24 -0
- package/sankey/events/index.d.ts +8 -0
- package/sankey/events/instance-event.service.d.ts +14 -0
- package/sankey/events/sankey-base-event.d.ts +24 -0
- package/sankey/events/sankey-link-event.d.ts +20 -0
- package/sankey/events/sankey-node-event.d.ts +20 -0
- package/sankey/labels.component.d.ts +36 -0
- package/sankey/legend.component.d.ts +82 -0
- package/sankey/links.component.d.ts +22 -0
- package/sankey/localization/custom-messages.component.d.ts +18 -0
- package/sankey/localization/localized-messages.directive.d.ts +16 -0
- package/sankey/localization/messages.d.ts +17 -0
- package/sankey/nodes.component.d.ts +34 -0
- package/sankey/title.component.d.ts +70 -0
- package/sankey/tooltip/link-tooltip-template-context.d.ts +26 -0
- package/sankey/tooltip/link-tooltip-template.directive.d.ts +78 -0
- package/sankey/tooltip/node-tooltip-template-context.d.ts +26 -0
- package/sankey/tooltip/node-tooltip-template.directive.d.ts +55 -0
- package/sankey/tooltip/square-symbol.directive.d.ts +16 -0
- package/sankey/tooltip/tooltip-popup.component.d.ts +60 -0
- package/sankey/tooltip/tooltip-template.service.d.ts +15 -0
- package/sankey/tooltip.component.d.ts +49 -0
- package/sankey.component.d.ts +200 -0
- package/sankey.directives.d.ts +27 -0
- package/sankey.module.d.ts +51 -0
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { isDevMode, Directive, Optional, Injectable, SimpleChange, TemplateRef, Component, ChangeDetectionStrategy, Input, ContentChild, ElementRef, ViewChild, ViewChildren, EventEmitter, Output, ContentChildren, LOCALE_ID, Inject, InjectionToken, NgModule } from '@angular/core';
|
|
6
|
+
import { isDevMode, Directive, Optional, Injectable, SimpleChange, TemplateRef, Component, ChangeDetectionStrategy, Input, ContentChild, ElementRef, ViewChild, ViewChildren, EventEmitter, Output, ContentChildren, LOCALE_ID, Inject, InjectionToken, NgModule, HostBinding, forwardRef } from '@angular/core';
|
|
7
7
|
import * as i8 from '@progress/kendo-angular-common';
|
|
8
|
-
import { isDocumentAvailable, shouldShowValidationUI, ResizeSensorModule, WatermarkModule } from '@progress/kendo-angular-common';
|
|
8
|
+
import { isDocumentAvailable, shouldShowValidationUI, ResizeSensorModule, WatermarkModule, PreventableEvent as PreventableEvent$1, isChanged } from '@progress/kendo-angular-common';
|
|
9
9
|
import * as i3 from '@progress/kendo-angular-intl';
|
|
10
10
|
import * as i4 from '@progress/kendo-angular-l10n';
|
|
11
|
-
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
12
|
-
import { DateCategoryAxis, DateValueAxis, DomEventsBuilder as DomEventsBuilder$1, InstanceObserver, chartBaseTheme, Chart, StockChart, Sparkline } from '@progress/kendo-charts';
|
|
11
|
+
import { LocalizationService, L10N_PREFIX, ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
12
|
+
import { DateCategoryAxis, DateValueAxis, DomEventsBuilder as DomEventsBuilder$1, InstanceObserver, chartBaseTheme, Chart, StockChart, Sparkline, Sankey } from '@progress/kendo-charts';
|
|
13
13
|
import { exportImage, exportSVG } from '@progress/kendo-drawing';
|
|
14
14
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
15
15
|
import { Subject, BehaviorSubject, combineLatest, Subscription } from 'rxjs';
|
|
@@ -20,7 +20,10 @@ import * as i4$1 from '@angular/common';
|
|
|
20
20
|
import { CommonModule } from '@angular/common';
|
|
21
21
|
import * as i1$1 from '@progress/kendo-angular-navigation';
|
|
22
22
|
import { BreadCrumbModule } from '@progress/kendo-angular-navigation';
|
|
23
|
-
import { homeIcon } from '@progress/kendo-svg-icons';
|
|
23
|
+
import { homeIcon, arrowRightIcon } from '@progress/kendo-svg-icons';
|
|
24
|
+
import * as i5 from '@progress/kendo-angular-icons';
|
|
25
|
+
import { IconsModule } from '@progress/kendo-angular-icons';
|
|
26
|
+
import { getter } from '@progress/kendo-common';
|
|
24
27
|
|
|
25
28
|
const getTouch = (domEvent) => {
|
|
26
29
|
return {
|
|
@@ -1730,6 +1733,10 @@ class ThemeService extends ConfigurationService {
|
|
|
1730
1733
|
this.mapColor('seriesDefaults.waterfall.line.color', 'chart-major-lines');
|
|
1731
1734
|
this.mapColor('title.color', 'normal-text-color');
|
|
1732
1735
|
this.mapColor('subtitle.color', 'normal-text-color');
|
|
1736
|
+
// Sankey diagram
|
|
1737
|
+
this.mapColor('labels.color', 'normal-text-color');
|
|
1738
|
+
this.mapColor('labels.stroke.color', 'background');
|
|
1739
|
+
this.mapColor('links.color', 'chart-major-lines');
|
|
1733
1740
|
const opacity = parseFloat(this.queryStyle('chart-area-opacity').opacity);
|
|
1734
1741
|
if (!isNaN(opacity)) {
|
|
1735
1742
|
this.setStyle('seriesDefaults.area.opacity', opacity);
|
|
@@ -1760,6 +1767,8 @@ class ThemeService extends ConfigurationService {
|
|
|
1760
1767
|
this.setStyle('title.font', titleFont);
|
|
1761
1768
|
this.setStyle('subtitle.font', paneTitleFont);
|
|
1762
1769
|
this.setStyle('paneDefaults.title.font', paneTitleFont);
|
|
1770
|
+
// Sankey diagram
|
|
1771
|
+
this.setStyle('labels.font', defaultFont);
|
|
1763
1772
|
}
|
|
1764
1773
|
setSeriesColors() {
|
|
1765
1774
|
const element = this.element;
|
|
@@ -2192,7 +2201,7 @@ class ZoomStartEvent extends PreventableEvent {
|
|
|
2192
2201
|
}
|
|
2193
2202
|
}
|
|
2194
2203
|
|
|
2195
|
-
const EVENT_MAP$
|
|
2204
|
+
const EVENT_MAP$2 = {
|
|
2196
2205
|
axisLabelClick: AxisLabelClickEvent,
|
|
2197
2206
|
drag: DragEvent,
|
|
2198
2207
|
dragEnd: DragEndEvent,
|
|
@@ -2221,10 +2230,10 @@ const EVENT_MAP$1 = {
|
|
|
2221
2230
|
/**
|
|
2222
2231
|
* @hidden
|
|
2223
2232
|
*/
|
|
2224
|
-
class InstanceEventService {
|
|
2233
|
+
class InstanceEventService$1 {
|
|
2225
2234
|
create(name, args, sender) {
|
|
2226
|
-
if (EVENT_MAP$
|
|
2227
|
-
return new EVENT_MAP$
|
|
2235
|
+
if (EVENT_MAP$2[name]) {
|
|
2236
|
+
return new EVENT_MAP$2[name](args, sender);
|
|
2228
2237
|
}
|
|
2229
2238
|
}
|
|
2230
2239
|
}
|
|
@@ -2248,8 +2257,8 @@ const packageMetadata = {
|
|
|
2248
2257
|
name: '@progress/kendo-angular-charts',
|
|
2249
2258
|
productName: 'Kendo UI for Angular',
|
|
2250
2259
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
2251
|
-
publishDate:
|
|
2252
|
-
version: '
|
|
2260
|
+
publishDate: 1714060786,
|
|
2261
|
+
version: '16.0.0-develop.1',
|
|
2253
2262
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
2254
2263
|
};
|
|
2255
2264
|
|
|
@@ -2357,9 +2366,13 @@ class DrilldownEvent extends PreventableEvent {
|
|
|
2357
2366
|
}
|
|
2358
2367
|
}
|
|
2359
2368
|
|
|
2369
|
+
/**
|
|
2370
|
+
* @hidden
|
|
2371
|
+
*/
|
|
2360
2372
|
function hasObservers(emitter) {
|
|
2361
2373
|
return emitter.observers.length > 0;
|
|
2362
2374
|
}
|
|
2375
|
+
|
|
2363
2376
|
/**
|
|
2364
2377
|
* The root Chart component.
|
|
2365
2378
|
*
|
|
@@ -3048,11 +3061,11 @@ class ChartComponent {
|
|
|
3048
3061
|
return Boolean(this.localizationService.rtl);
|
|
3049
3062
|
}
|
|
3050
3063
|
}
|
|
3051
|
-
ChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ChartComponent, deps: [{ token: ConfigurationService }, { token: ThemeService }, { token: i0.ElementRef }, { token: i3.IntlService }, { token: i4.LocalizationService }, { token: i0.NgZone }, { token: InstanceEventService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
3064
|
+
ChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ChartComponent, deps: [{ token: ConfigurationService }, { token: ThemeService }, { token: i0.ElementRef }, { token: i3.IntlService }, { token: i4.LocalizationService }, { token: i0.NgZone }, { token: InstanceEventService$1 }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
3052
3065
|
ChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ChartComponent, selector: "kendo-chart", inputs: { pannable: "pannable", renderAs: "renderAs", seriesColors: "seriesColors", subtitle: "subtitle", title: "title", transitions: "transitions", zoomable: "zoomable", axisDefaults: "axisDefaults", categoryAxis: "categoryAxis", chartArea: "chartArea", legend: "legend", panes: "panes", paneDefaults: "paneDefaults", plotArea: "plotArea", series: "series", seriesDefaults: "seriesDefaults", tooltip: "tooltip", valueAxis: "valueAxis", xAxis: "xAxis", yAxis: "yAxis", resizeRateLimit: "resizeRateLimit", popupSettings: "popupSettings", drilldownLevel: "drilldownLevel" }, outputs: { axisLabelClick: "axisLabelClick", drag: "drag", dragEnd: "dragEnd", dragStart: "dragStart", legendItemHover: "legendItemHover", legendItemLeave: "legendItemLeave", noteClick: "noteClick", noteHover: "noteHover", noteLeave: "noteLeave", paneRender: "paneRender", plotAreaClick: "plotAreaClick", plotAreaHover: "plotAreaHover", plotAreaLeave: "plotAreaLeave", render: "render", select: "select", selectEnd: "selectEnd", selectStart: "selectStart", seriesClick: "seriesClick", drilldown: "drilldown", seriesHover: "seriesHover", seriesOver: "seriesOver", seriesLeave: "seriesLeave", zoom: "zoom", zoomEnd: "zoomEnd", zoomStart: "zoomStart", legendItemClick: "legendItemClick", drilldownLevelChange: "drilldownLevelChange" }, providers: [
|
|
3053
3066
|
ConfigurationService,
|
|
3054
3067
|
TooltipTemplateService,
|
|
3055
|
-
InstanceEventService,
|
|
3068
|
+
InstanceEventService$1,
|
|
3056
3069
|
LocalizationService,
|
|
3057
3070
|
{
|
|
3058
3071
|
provide: L10N_PREFIX,
|
|
@@ -3079,7 +3092,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
3079
3092
|
providers: [
|
|
3080
3093
|
ConfigurationService,
|
|
3081
3094
|
TooltipTemplateService,
|
|
3082
|
-
InstanceEventService,
|
|
3095
|
+
InstanceEventService$1,
|
|
3083
3096
|
LocalizationService,
|
|
3084
3097
|
{
|
|
3085
3098
|
provide: L10N_PREFIX,
|
|
@@ -3101,7 +3114,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
3101
3114
|
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
|
3102
3115
|
`
|
|
3103
3116
|
}]
|
|
3104
|
-
}], ctorParameters: function () { return [{ type: ConfigurationService }, { type: ThemeService }, { type: i0.ElementRef }, { type: i3.IntlService }, { type: i4.LocalizationService }, { type: i0.NgZone }, { type: InstanceEventService }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; }, propDecorators: { pannable: [{
|
|
3117
|
+
}], ctorParameters: function () { return [{ type: ConfigurationService }, { type: ThemeService }, { type: i0.ElementRef }, { type: i3.IntlService }, { type: i4.LocalizationService }, { type: i0.NgZone }, { type: InstanceEventService$1 }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; }, propDecorators: { pannable: [{
|
|
3105
3118
|
type: Input
|
|
3106
3119
|
}], renderAs: [{
|
|
3107
3120
|
type: Input
|
|
@@ -6624,16 +6637,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
6624
6637
|
type: Injectable
|
|
6625
6638
|
}] });
|
|
6626
6639
|
|
|
6627
|
-
const EVENT_MAP = {
|
|
6640
|
+
const EVENT_MAP$1 = {
|
|
6628
6641
|
navigatorFilter: NavigatorFilterEvent
|
|
6629
6642
|
};
|
|
6630
6643
|
/**
|
|
6631
6644
|
* @hidden
|
|
6632
6645
|
*/
|
|
6633
|
-
class StockInstanceEventService extends InstanceEventService {
|
|
6646
|
+
class StockInstanceEventService extends InstanceEventService$1 {
|
|
6634
6647
|
create(name, args, sender) {
|
|
6635
|
-
if (EVENT_MAP[name]) {
|
|
6636
|
-
return new EVENT_MAP[name](args, sender);
|
|
6648
|
+
if (EVENT_MAP$1[name]) {
|
|
6649
|
+
return new EVENT_MAP$1[name](args, sender);
|
|
6637
6650
|
}
|
|
6638
6651
|
return super.create(name, args, sender);
|
|
6639
6652
|
}
|
|
@@ -7651,11 +7664,11 @@ class SparklineComponent extends ChartComponent {
|
|
|
7651
7664
|
this.instance.setOptions(Sparkline.normalizeOptions(this.options));
|
|
7652
7665
|
}
|
|
7653
7666
|
}
|
|
7654
|
-
SparklineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SparklineComponent, deps: [{ token: ConfigurationService }, { token: ThemeService }, { token: i0.ElementRef }, { token: i3.IntlService }, { token: i4.LocalizationService }, { token: i0.NgZone }, { token: InstanceEventService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
7667
|
+
SparklineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SparklineComponent, deps: [{ token: ConfigurationService }, { token: ThemeService }, { token: i0.ElementRef }, { token: i3.IntlService }, { token: i4.LocalizationService }, { token: i0.NgZone }, { token: InstanceEventService$1 }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
7655
7668
|
SparklineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SparklineComponent, selector: "kendo-sparkline", inputs: { type: "type", data: "data", drilldownLevel: "drilldownLevel" }, outputs: { drilldown: "drilldown", drilldownLevelChange: "drilldownLevelChange" }, providers: [
|
|
7656
7669
|
ConfigurationService,
|
|
7657
7670
|
TooltipTemplateService,
|
|
7658
|
-
InstanceEventService,
|
|
7671
|
+
InstanceEventService$1,
|
|
7659
7672
|
LocalizationService,
|
|
7660
7673
|
{
|
|
7661
7674
|
provide: L10N_PREFIX,
|
|
@@ -7680,7 +7693,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
7680
7693
|
providers: [
|
|
7681
7694
|
ConfigurationService,
|
|
7682
7695
|
TooltipTemplateService,
|
|
7683
|
-
InstanceEventService,
|
|
7696
|
+
InstanceEventService$1,
|
|
7684
7697
|
LocalizationService,
|
|
7685
7698
|
{
|
|
7686
7699
|
provide: L10N_PREFIX,
|
|
@@ -7700,7 +7713,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
7700
7713
|
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
|
7701
7714
|
`
|
|
7702
7715
|
}]
|
|
7703
|
-
}], ctorParameters: function () { return [{ type: ConfigurationService }, { type: ThemeService }, { type: i0.ElementRef }, { type: i3.IntlService }, { type: i4.LocalizationService }, { type: i0.NgZone }, { type: InstanceEventService }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; }, propDecorators: { type: [{
|
|
7716
|
+
}], ctorParameters: function () { return [{ type: ConfigurationService }, { type: ThemeService }, { type: i0.ElementRef }, { type: i3.IntlService }, { type: i4.LocalizationService }, { type: i0.NgZone }, { type: InstanceEventService$1 }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; }, propDecorators: { type: [{
|
|
7704
7717
|
type: Input
|
|
7705
7718
|
}], data: [{
|
|
7706
7719
|
type: Input
|
|
@@ -7834,6 +7847,1313 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
7834
7847
|
}]
|
|
7835
7848
|
}] });
|
|
7836
7849
|
|
|
7850
|
+
/**
|
|
7851
|
+
* @hidden
|
|
7852
|
+
*/
|
|
7853
|
+
class SankeyBaseEvent extends PreventableEvent$1 {
|
|
7854
|
+
/**
|
|
7855
|
+
* @hidden
|
|
7856
|
+
*/
|
|
7857
|
+
constructor(e, sender) {
|
|
7858
|
+
super();
|
|
7859
|
+
this.sender = sender;
|
|
7860
|
+
this.originalEvent = e.originalEvent;
|
|
7861
|
+
}
|
|
7862
|
+
}
|
|
7863
|
+
|
|
7864
|
+
/**
|
|
7865
|
+
* Arguments for the node-related events of the [`SankeyComponent`]({% slug api_charts_sankeycomponent %}).
|
|
7866
|
+
*/
|
|
7867
|
+
class SankeyNodeEvent extends SankeyBaseEvent {
|
|
7868
|
+
/**
|
|
7869
|
+
* @hidden
|
|
7870
|
+
*/
|
|
7871
|
+
constructor(e, sender) {
|
|
7872
|
+
super(e, sender);
|
|
7873
|
+
this.dataItem = e.dataItem;
|
|
7874
|
+
}
|
|
7875
|
+
}
|
|
7876
|
+
|
|
7877
|
+
/**
|
|
7878
|
+
* Arguments for the link-related events of the [`SankeyComponent`]({% slug api_charts_sankeycomponent %}).
|
|
7879
|
+
*/
|
|
7880
|
+
class SankeyLinkEvent extends SankeyBaseEvent {
|
|
7881
|
+
/**
|
|
7882
|
+
* @hidden
|
|
7883
|
+
*/
|
|
7884
|
+
constructor(e, sender) {
|
|
7885
|
+
super(e, sender);
|
|
7886
|
+
this.dataItem = e.dataItem;
|
|
7887
|
+
}
|
|
7888
|
+
}
|
|
7889
|
+
|
|
7890
|
+
const EVENT_MAP = {
|
|
7891
|
+
nodeEnter: SankeyNodeEvent,
|
|
7892
|
+
nodeLeave: SankeyNodeEvent,
|
|
7893
|
+
linkEnter: SankeyLinkEvent,
|
|
7894
|
+
linkLeave: SankeyLinkEvent,
|
|
7895
|
+
nodeClick: SankeyNodeEvent,
|
|
7896
|
+
linkClick: SankeyLinkEvent
|
|
7897
|
+
};
|
|
7898
|
+
/**
|
|
7899
|
+
* @hidden
|
|
7900
|
+
*/
|
|
7901
|
+
class InstanceEventService {
|
|
7902
|
+
create(name, args, sender) {
|
|
7903
|
+
return new EVENT_MAP[name](args, sender);
|
|
7904
|
+
}
|
|
7905
|
+
}
|
|
7906
|
+
|
|
7907
|
+
/**
|
|
7908
|
+
* The context that is passed to the Sankey diagram Link tooltip template.
|
|
7909
|
+
*/
|
|
7910
|
+
class SankeyLinkTooltipTemplateContext {
|
|
7911
|
+
/**
|
|
7912
|
+
* @hidden
|
|
7913
|
+
*/
|
|
7914
|
+
constructor(e) {
|
|
7915
|
+
const dataItem = e.dataItem;
|
|
7916
|
+
this.source = dataItem.source;
|
|
7917
|
+
this.target = dataItem.target;
|
|
7918
|
+
this.value = dataItem.value;
|
|
7919
|
+
}
|
|
7920
|
+
}
|
|
7921
|
+
|
|
7922
|
+
/**
|
|
7923
|
+
* A directive that selects a [template](link:site.data.urls.angular['templatesyntax'])
|
|
7924
|
+
* within the `<kendo-sankey-tooltip>` component for the
|
|
7925
|
+
* [links tooltip](slug:tooltip_sankey#toc-specifying-a-template).
|
|
7926
|
+
* The following context fields are frequently utilized:
|
|
7927
|
+
* - `let-source="source"`—The link source data item..
|
|
7928
|
+
* - `let-target="target"`—The link target data item.
|
|
7929
|
+
* - `let-value="value"`—The link value.
|
|
7930
|
+
* For the full list of available fields, refer to the [`SankeyLinkTooltipTemplateContext`](slug:api_charts_sankeylinktooltiptemplatecontext).
|
|
7931
|
+
*
|
|
7932
|
+
* @example
|
|
7933
|
+
* ```ts
|
|
7934
|
+
* import { Component } from '@angular/core';
|
|
7935
|
+
*
|
|
7936
|
+
* _@Component({
|
|
7937
|
+
* selector: 'my-app',
|
|
7938
|
+
* template: `
|
|
7939
|
+
* <kendo-chart>
|
|
7940
|
+
* <kendo-chart-tooltip>
|
|
7941
|
+
* <ng-template kendoChartSeriesTooltipTemplate let-value="value">
|
|
7942
|
+
* Value is {{value}}
|
|
7943
|
+
* </ng-template>
|
|
7944
|
+
* </kendo-chart-tooltip>
|
|
7945
|
+
* <kendo-chart-series>
|
|
7946
|
+
* <kendo-chart-series-item [data]="[1, 2, 3]">
|
|
7947
|
+
* </kendo-chart-series-item>
|
|
7948
|
+
* </kendo-chart-series>
|
|
7949
|
+
* </kendo-chart>
|
|
7950
|
+
* `
|
|
7951
|
+
* })
|
|
7952
|
+
* class AppComponent {
|
|
7953
|
+
* }
|
|
7954
|
+
*
|
|
7955
|
+
* import { Component } from '@angular/core';
|
|
7956
|
+
* import { SankeyData } from '@progress/kendo-angular-charts';
|
|
7957
|
+
*
|
|
7958
|
+
* _@Component({
|
|
7959
|
+
* selector: 'my-app',
|
|
7960
|
+
* template: `
|
|
7961
|
+
* <kendo-sankey [data]="data">
|
|
7962
|
+
* <kendo-sankey-tooltip [followPointer]="true">
|
|
7963
|
+
* <ng-template kendoSankeyLinkTooltipTemplate let-source="source" let-target="target" let-value="value">
|
|
7964
|
+
* {{ source.label?.text }} - {{ target.label?.text }}: {{ value }}
|
|
7965
|
+
* </ng-template>
|
|
7966
|
+
* </kendo-sankey-tooltip>
|
|
7967
|
+
* </kendo-sankey>
|
|
7968
|
+
* `,
|
|
7969
|
+
* })
|
|
7970
|
+
* export class AppComponent {
|
|
7971
|
+
* public data: SankeyData = {
|
|
7972
|
+
* nodes: [
|
|
7973
|
+
* { id: 1, label: { text: 'Linux' } },
|
|
7974
|
+
* { id: 0, label: { text: 'iOS'} },
|
|
7975
|
+
* { id: 2, label: { text: 'Mobile' } },
|
|
7976
|
+
* { id: 3, label: { text: 'Desktop' } },
|
|
7977
|
+
* ],
|
|
7978
|
+
* links: [
|
|
7979
|
+
* { sourceId: 0, targetId: 2, value: 1 },
|
|
7980
|
+
* { sourceId: 1, targetId: 2, value: 2 },
|
|
7981
|
+
* { sourceId: 1, targetId: 3, value: 3 },
|
|
7982
|
+
* ],
|
|
7983
|
+
* };
|
|
7984
|
+
* }
|
|
7985
|
+
*
|
|
7986
|
+
* ```
|
|
7987
|
+
*/
|
|
7988
|
+
class SankeyLinkTooltipTemplateDirective {
|
|
7989
|
+
constructor(templateRef) {
|
|
7990
|
+
this.templateRef = templateRef;
|
|
7991
|
+
}
|
|
7992
|
+
}
|
|
7993
|
+
SankeyLinkTooltipTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyLinkTooltipTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
7994
|
+
SankeyLinkTooltipTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: SankeyLinkTooltipTemplateDirective, selector: "[kendoSankeyLinkTooltipTemplate]", ngImport: i0 });
|
|
7995
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyLinkTooltipTemplateDirective, decorators: [{
|
|
7996
|
+
type: Directive,
|
|
7997
|
+
args: [{
|
|
7998
|
+
selector: '[kendoSankeyLinkTooltipTemplate]'
|
|
7999
|
+
}]
|
|
8000
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
|
|
8001
|
+
type: Optional
|
|
8002
|
+
}] }]; } });
|
|
8003
|
+
|
|
8004
|
+
/**
|
|
8005
|
+
* The context that is passed to the Sankey diagram Node tooltip template.
|
|
8006
|
+
*/
|
|
8007
|
+
class SankeyNodeTooltipTemplateContext {
|
|
8008
|
+
/**
|
|
8009
|
+
* @hidden
|
|
8010
|
+
*/
|
|
8011
|
+
constructor(e) {
|
|
8012
|
+
const dataItem = e.dataItem;
|
|
8013
|
+
this.label = dataItem.label;
|
|
8014
|
+
this.color = dataItem.color;
|
|
8015
|
+
this.value = e.nodeValue;
|
|
8016
|
+
}
|
|
8017
|
+
}
|
|
8018
|
+
|
|
8019
|
+
/**
|
|
8020
|
+
* A directive that selects a [template](link:site.data.urls.angular['templatesyntax'])
|
|
8021
|
+
* within the `<kendo-sankey-tooltip>` component for the
|
|
8022
|
+
* [series tooltip](slug:tooltip_sankey#toc-specifying-a-template).
|
|
8023
|
+
* The following context fields are frequently utilized:
|
|
8024
|
+
* - `let-color="color"`—The node color.
|
|
8025
|
+
* - `let-label="label"`—The node label data.
|
|
8026
|
+
* - `let-value="value"`—The node value.
|
|
8027
|
+
* For the full list of available fields, refer to the [`SankeyNodeTooltipTemplateContext`](slug:api_charts_sankeynodetooltiptemplatecontext).
|
|
8028
|
+
*
|
|
8029
|
+
* @example
|
|
8030
|
+
* ```ts
|
|
8031
|
+
* import { Component } from '@angular/core';
|
|
8032
|
+
* import { SankeyData } from '@progress/kendo-angular-charts';
|
|
8033
|
+
*
|
|
8034
|
+
* _@Component({
|
|
8035
|
+
* selector: 'my-app',
|
|
8036
|
+
* template: `
|
|
8037
|
+
* <kendo-sankey [data]="data">
|
|
8038
|
+
* <ng-template kendoSankeyNodeTooltipTemplate let-color="color" let-label="label" let-value="value">
|
|
8039
|
+
* {{ label.text }}: {{ value }}
|
|
8040
|
+
* </ng-template>
|
|
8041
|
+
* </kendo-sankey>
|
|
8042
|
+
* `,
|
|
8043
|
+
* })
|
|
8044
|
+
* export class AppComponent {
|
|
8045
|
+
* public data: SankeyData = {
|
|
8046
|
+
* nodes: [
|
|
8047
|
+
* { id: 1, label: { text: 'Linux' } },
|
|
8048
|
+
* { id: 0, label: { text: 'iOS'} },
|
|
8049
|
+
* { id: 2, label: { text: 'Mobile' } },
|
|
8050
|
+
* { id: 3, label: { text: 'Desktop' } },
|
|
8051
|
+
* ],
|
|
8052
|
+
* links: [
|
|
8053
|
+
* { sourceId: 0, targetId: 2, value: 1 },
|
|
8054
|
+
* { sourceId: 1, targetId: 2, value: 2 },
|
|
8055
|
+
* { sourceId: 1, targetId: 3, value: 3 },
|
|
8056
|
+
* ],
|
|
8057
|
+
* };
|
|
8058
|
+
* }
|
|
8059
|
+
*
|
|
8060
|
+
* ```
|
|
8061
|
+
*/
|
|
8062
|
+
class SankeyNodeTooltipTemplateDirective {
|
|
8063
|
+
constructor(templateRef) {
|
|
8064
|
+
this.templateRef = templateRef;
|
|
8065
|
+
}
|
|
8066
|
+
}
|
|
8067
|
+
SankeyNodeTooltipTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyNodeTooltipTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
8068
|
+
SankeyNodeTooltipTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: SankeyNodeTooltipTemplateDirective, selector: "[kendoSankeyNodeTooltipTemplate]", ngImport: i0 });
|
|
8069
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyNodeTooltipTemplateDirective, decorators: [{
|
|
8070
|
+
type: Directive,
|
|
8071
|
+
args: [{
|
|
8072
|
+
selector: '[kendoSankeyNodeTooltipTemplate]'
|
|
8073
|
+
}]
|
|
8074
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
|
|
8075
|
+
type: Optional
|
|
8076
|
+
}] }]; } });
|
|
8077
|
+
|
|
8078
|
+
/**
|
|
8079
|
+
* @hidden
|
|
8080
|
+
*/
|
|
8081
|
+
class SankeyTooltipTemplateService {
|
|
8082
|
+
}
|
|
8083
|
+
SankeyTooltipTemplateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyTooltipTemplateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8084
|
+
SankeyTooltipTemplateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyTooltipTemplateService });
|
|
8085
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyTooltipTemplateService, decorators: [{
|
|
8086
|
+
type: Injectable
|
|
8087
|
+
}] });
|
|
8088
|
+
|
|
8089
|
+
/**
|
|
8090
|
+
* @hidden
|
|
8091
|
+
*/
|
|
8092
|
+
class SquareSymbol {
|
|
8093
|
+
constructor() {
|
|
8094
|
+
this.size = 15;
|
|
8095
|
+
this.display = 'inline-flex';
|
|
8096
|
+
this.marginLeft = 3;
|
|
8097
|
+
}
|
|
8098
|
+
}
|
|
8099
|
+
SquareSymbol.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SquareSymbol, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8100
|
+
SquareSymbol.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: SquareSymbol, selector: "[squareSymbol]", inputs: { color: "color", size: "size" }, host: { properties: { "style.backgroundColor": "this.color", "style.width.px": "this.size", "style.height.px": "this.size", "style.display": "this.display", "style.marginLeft.px": "this.marginLeft" } }, ngImport: i0 });
|
|
8101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SquareSymbol, decorators: [{
|
|
8102
|
+
type: Directive,
|
|
8103
|
+
args: [{
|
|
8104
|
+
selector: '[squareSymbol]'
|
|
8105
|
+
}]
|
|
8106
|
+
}], propDecorators: { color: [{
|
|
8107
|
+
type: Input
|
|
8108
|
+
}, {
|
|
8109
|
+
type: HostBinding,
|
|
8110
|
+
args: ['style.backgroundColor']
|
|
8111
|
+
}], size: [{
|
|
8112
|
+
type: Input
|
|
8113
|
+
}, {
|
|
8114
|
+
type: HostBinding,
|
|
8115
|
+
args: ['style.width.px']
|
|
8116
|
+
}, {
|
|
8117
|
+
type: HostBinding,
|
|
8118
|
+
args: ['style.height.px']
|
|
8119
|
+
}], display: [{
|
|
8120
|
+
type: HostBinding,
|
|
8121
|
+
args: ['style.display']
|
|
8122
|
+
}], marginLeft: [{
|
|
8123
|
+
type: HostBinding,
|
|
8124
|
+
args: ['style.marginLeft.px']
|
|
8125
|
+
}] } });
|
|
8126
|
+
|
|
8127
|
+
const DEFAULT_OFFSET = 12;
|
|
8128
|
+
/**
|
|
8129
|
+
* @hidden
|
|
8130
|
+
*/
|
|
8131
|
+
class SankeyTooltipPopupComponent extends BaseTooltip {
|
|
8132
|
+
constructor(element, popupService, templateService, localizationService, intlService, ngZone) {
|
|
8133
|
+
super(popupService, localizationService);
|
|
8134
|
+
this.element = element;
|
|
8135
|
+
this.popupService = popupService;
|
|
8136
|
+
this.templateService = templateService;
|
|
8137
|
+
this.localizationService = localizationService;
|
|
8138
|
+
this.intlService = intlService;
|
|
8139
|
+
this.ngZone = ngZone;
|
|
8140
|
+
this.animate = false;
|
|
8141
|
+
this.wrapperClass = 'k-chart-tooltip-wrapper';
|
|
8142
|
+
this.arrowRightIcon = arrowRightIcon;
|
|
8143
|
+
// TODO: Move to themes
|
|
8144
|
+
this.textStyle = { margin: '0 3px' };
|
|
8145
|
+
this.tooltipStyle = { display: 'flex', alignItems: 'center' };
|
|
8146
|
+
}
|
|
8147
|
+
onInit() {
|
|
8148
|
+
this.popupRef.popupElement.className += ` ${this.wrapperClass}`;
|
|
8149
|
+
}
|
|
8150
|
+
show(e) {
|
|
8151
|
+
this.isNode = e.targetType === 'node';
|
|
8152
|
+
this.isLink = e.targetType === 'link';
|
|
8153
|
+
this.nodeTooltipTemplateRef = this.templateService.nodeTemplate || this.defaultNodeTooltipTemplate.templateRef;
|
|
8154
|
+
this.nodeTooltipContext = new SankeyNodeTooltipTemplateContext(e);
|
|
8155
|
+
this.linkTooltipTemplateRef = this.templateService.linkTemplate || this.defaultLinkTooltipTemplate.templateRef;
|
|
8156
|
+
this.linkTooltipContext = new SankeyLinkTooltipTemplateContext(e);
|
|
8157
|
+
super.show({
|
|
8158
|
+
style: {
|
|
8159
|
+
position: 'static' // Override k-tooltip positioning
|
|
8160
|
+
},
|
|
8161
|
+
anchor: {
|
|
8162
|
+
align: e.tooltipData.popupAlign,
|
|
8163
|
+
point: this.tooltipAnchor(e),
|
|
8164
|
+
},
|
|
8165
|
+
});
|
|
8166
|
+
}
|
|
8167
|
+
tooltipAnchor(e) {
|
|
8168
|
+
const element = this.element.nativeElement;
|
|
8169
|
+
const size = { width: element.offsetWidth, height: element.offsetHeight };
|
|
8170
|
+
const anchor = { ...e.tooltipData.popupOffset };
|
|
8171
|
+
const popupAlign = e.tooltipData.popupAlign;
|
|
8172
|
+
const offset = this.offset || DEFAULT_OFFSET;
|
|
8173
|
+
anchor.left += (popupAlign.horizontal === 'left') ? offset : (-1 * offset);
|
|
8174
|
+
if (popupAlign.horizontal === 'right') {
|
|
8175
|
+
anchor.left -= size.width;
|
|
8176
|
+
}
|
|
8177
|
+
if (popupAlign.vertical === 'bottom') {
|
|
8178
|
+
anchor.top -= size.height + offset;
|
|
8179
|
+
}
|
|
8180
|
+
else {
|
|
8181
|
+
anchor.top += offset;
|
|
8182
|
+
}
|
|
8183
|
+
return anchor;
|
|
8184
|
+
}
|
|
8185
|
+
formatUnits(value) {
|
|
8186
|
+
return this.intlService.format(this.tooltipUnitFormat, value ?? 0);
|
|
8187
|
+
}
|
|
8188
|
+
}
|
|
8189
|
+
SankeyTooltipPopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyTooltipPopupComponent, deps: [{ token: i0.ElementRef }, { token: i1.PopupService }, { token: SankeyTooltipTemplateService }, { token: i4.LocalizationService }, { token: i3.IntlService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
8190
|
+
SankeyTooltipPopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SankeyTooltipPopupComponent, selector: "kendo-sankey-tooltip-popup", inputs: { animate: "animate", popupSettings: "popupSettings", wrapperClass: "wrapperClass", tooltipUnitFormat: "tooltipUnitFormat", offset: "offset" }, providers: [
|
|
8191
|
+
PopupService,
|
|
8192
|
+
{
|
|
8193
|
+
provide: POPUP_CONTAINER,
|
|
8194
|
+
useFactory: bodyFactory,
|
|
8195
|
+
},
|
|
8196
|
+
], viewQueries: [{ propertyName: "defaultNodeTooltipTemplate", first: true, predicate: SankeyNodeTooltipTemplateDirective, descendants: true }, { propertyName: "defaultLinkTooltipTemplate", first: true, predicate: SankeyLinkTooltipTemplateDirective, descendants: true }, { propertyName: "templateRef", first: true, predicate: ["content"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
8197
|
+
<ng-template #content>
|
|
8198
|
+
<div class="k-tooltip k-sankey-tooltip k-chart-tooltip k-chart-shared-tooltip" [ngStyle]="style">
|
|
8199
|
+
<div class="k-tooltip-content">
|
|
8200
|
+
<ng-template
|
|
8201
|
+
[ngTemplateOutlet]="nodeTooltipTemplateRef"
|
|
8202
|
+
*ngIf="isNode"
|
|
8203
|
+
[ngTemplateOutletContext]="nodeTooltipContext"
|
|
8204
|
+
>
|
|
8205
|
+
</ng-template>
|
|
8206
|
+
<ng-template
|
|
8207
|
+
[ngTemplateOutlet]="linkTooltipTemplateRef"
|
|
8208
|
+
*ngIf="isLink"
|
|
8209
|
+
[ngTemplateOutletContext]="linkTooltipContext"
|
|
8210
|
+
>
|
|
8211
|
+
</ng-template>
|
|
8212
|
+
</div>
|
|
8213
|
+
</div>
|
|
8214
|
+
</ng-template>
|
|
8215
|
+
|
|
8216
|
+
<ng-template kendoSankeyNodeTooltipTemplate let-color="color" let-label="label" let-value="value">
|
|
8217
|
+
<div [ngStyle]="tooltipStyle">
|
|
8218
|
+
<div squareSymbol [color]="color"></div>
|
|
8219
|
+
<span [ngStyle]="textStyle">{{ label.text }}</span>
|
|
8220
|
+
<span [ngStyle]="textStyle">{{ formatUnits(value) }}</span>
|
|
8221
|
+
</div>
|
|
8222
|
+
</ng-template>
|
|
8223
|
+
|
|
8224
|
+
<ng-template kendoSankeyLinkTooltipTemplate let-source="source" let-target="target" let-value="value">
|
|
8225
|
+
<div [ngStyle]="tooltipStyle">
|
|
8226
|
+
<div squareSymbol [color]="source.color"></div>
|
|
8227
|
+
<span [ngStyle]="textStyle">{{ source.label?.text }}</span>
|
|
8228
|
+
<kendo-icon-wrapper name="arrow-right" [svgIcon]="arrowRightIcon"></kendo-icon-wrapper>
|
|
8229
|
+
<span [ngStyle]="textStyle">{{ target.label?.text }}</span>
|
|
8230
|
+
<span [ngStyle]="textStyle">{{ formatUnits(value) }}</span>
|
|
8231
|
+
</div>
|
|
8232
|
+
</ng-template>
|
|
8233
|
+
`, isInline: true, components: [{ type: i5.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: SankeyNodeTooltipTemplateDirective, selector: "[kendoSankeyNodeTooltipTemplate]" }, { type: SquareSymbol, selector: "[squareSymbol]", inputs: ["color", "size"] }, { type: SankeyLinkTooltipTemplateDirective, selector: "[kendoSankeyLinkTooltipTemplate]" }] });
|
|
8234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyTooltipPopupComponent, decorators: [{
|
|
8235
|
+
type: Component,
|
|
8236
|
+
args: [{
|
|
8237
|
+
providers: [
|
|
8238
|
+
PopupService,
|
|
8239
|
+
{
|
|
8240
|
+
provide: POPUP_CONTAINER,
|
|
8241
|
+
useFactory: bodyFactory,
|
|
8242
|
+
},
|
|
8243
|
+
],
|
|
8244
|
+
selector: 'kendo-sankey-tooltip-popup',
|
|
8245
|
+
template: `
|
|
8246
|
+
<ng-template #content>
|
|
8247
|
+
<div class="k-tooltip k-sankey-tooltip k-chart-tooltip k-chart-shared-tooltip" [ngStyle]="style">
|
|
8248
|
+
<div class="k-tooltip-content">
|
|
8249
|
+
<ng-template
|
|
8250
|
+
[ngTemplateOutlet]="nodeTooltipTemplateRef"
|
|
8251
|
+
*ngIf="isNode"
|
|
8252
|
+
[ngTemplateOutletContext]="nodeTooltipContext"
|
|
8253
|
+
>
|
|
8254
|
+
</ng-template>
|
|
8255
|
+
<ng-template
|
|
8256
|
+
[ngTemplateOutlet]="linkTooltipTemplateRef"
|
|
8257
|
+
*ngIf="isLink"
|
|
8258
|
+
[ngTemplateOutletContext]="linkTooltipContext"
|
|
8259
|
+
>
|
|
8260
|
+
</ng-template>
|
|
8261
|
+
</div>
|
|
8262
|
+
</div>
|
|
8263
|
+
</ng-template>
|
|
8264
|
+
|
|
8265
|
+
<ng-template kendoSankeyNodeTooltipTemplate let-color="color" let-label="label" let-value="value">
|
|
8266
|
+
<div [ngStyle]="tooltipStyle">
|
|
8267
|
+
<div squareSymbol [color]="color"></div>
|
|
8268
|
+
<span [ngStyle]="textStyle">{{ label.text }}</span>
|
|
8269
|
+
<span [ngStyle]="textStyle">{{ formatUnits(value) }}</span>
|
|
8270
|
+
</div>
|
|
8271
|
+
</ng-template>
|
|
8272
|
+
|
|
8273
|
+
<ng-template kendoSankeyLinkTooltipTemplate let-source="source" let-target="target" let-value="value">
|
|
8274
|
+
<div [ngStyle]="tooltipStyle">
|
|
8275
|
+
<div squareSymbol [color]="source.color"></div>
|
|
8276
|
+
<span [ngStyle]="textStyle">{{ source.label?.text }}</span>
|
|
8277
|
+
<kendo-icon-wrapper name="arrow-right" [svgIcon]="arrowRightIcon"></kendo-icon-wrapper>
|
|
8278
|
+
<span [ngStyle]="textStyle">{{ target.label?.text }}</span>
|
|
8279
|
+
<span [ngStyle]="textStyle">{{ formatUnits(value) }}</span>
|
|
8280
|
+
</div>
|
|
8281
|
+
</ng-template>
|
|
8282
|
+
`,
|
|
8283
|
+
}]
|
|
8284
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.PopupService }, { type: SankeyTooltipTemplateService }, { type: i4.LocalizationService }, { type: i3.IntlService }, { type: i0.NgZone }]; }, propDecorators: { defaultNodeTooltipTemplate: [{
|
|
8285
|
+
type: ViewChild,
|
|
8286
|
+
args: [SankeyNodeTooltipTemplateDirective, { static: false }]
|
|
8287
|
+
}], defaultLinkTooltipTemplate: [{
|
|
8288
|
+
type: ViewChild,
|
|
8289
|
+
args: [SankeyLinkTooltipTemplateDirective, { static: false }]
|
|
8290
|
+
}], templateRef: [{
|
|
8291
|
+
type: ViewChild,
|
|
8292
|
+
args: ['content', { static: true }]
|
|
8293
|
+
}], animate: [{
|
|
8294
|
+
type: Input
|
|
8295
|
+
}], popupSettings: [{
|
|
8296
|
+
type: Input
|
|
8297
|
+
}], wrapperClass: [{
|
|
8298
|
+
type: Input
|
|
8299
|
+
}], tooltipUnitFormat: [{
|
|
8300
|
+
type: Input
|
|
8301
|
+
}], offset: [{
|
|
8302
|
+
type: Input
|
|
8303
|
+
}] } });
|
|
8304
|
+
|
|
8305
|
+
/**
|
|
8306
|
+
* @hidden
|
|
8307
|
+
*/
|
|
8308
|
+
class Messages extends ComponentMessages {
|
|
8309
|
+
}
|
|
8310
|
+
Messages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
8311
|
+
Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: Messages, selector: "[kendoSankeyMessages]", inputs: { tooltipUnitFormat: "tooltipUnitFormat" }, usesInheritance: true, ngImport: i0 });
|
|
8312
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: Messages, decorators: [{
|
|
8313
|
+
type: Directive,
|
|
8314
|
+
args: [{
|
|
8315
|
+
selector: '[kendoSankeyMessages]'
|
|
8316
|
+
}]
|
|
8317
|
+
}], propDecorators: { tooltipUnitFormat: [{
|
|
8318
|
+
type: Input
|
|
8319
|
+
}] } });
|
|
8320
|
+
|
|
8321
|
+
/**
|
|
8322
|
+
* @hidden
|
|
8323
|
+
*/
|
|
8324
|
+
class LocalizedMessagesDirective extends Messages {
|
|
8325
|
+
constructor(service) {
|
|
8326
|
+
super();
|
|
8327
|
+
this.service = service;
|
|
8328
|
+
}
|
|
8329
|
+
}
|
|
8330
|
+
LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i4.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
8331
|
+
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: LocalizedMessagesDirective, selector: "[kendoSankeyLocalizedMessages]", providers: [
|
|
8332
|
+
{
|
|
8333
|
+
provide: Messages,
|
|
8334
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
8335
|
+
}
|
|
8336
|
+
], usesInheritance: true, ngImport: i0 });
|
|
8337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
8338
|
+
type: Directive,
|
|
8339
|
+
args: [{
|
|
8340
|
+
providers: [
|
|
8341
|
+
{
|
|
8342
|
+
provide: Messages,
|
|
8343
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
8344
|
+
}
|
|
8345
|
+
],
|
|
8346
|
+
selector: '[kendoSankeyLocalizedMessages]'
|
|
8347
|
+
}]
|
|
8348
|
+
}], ctorParameters: function () { return [{ type: i4.LocalizationService }]; } });
|
|
8349
|
+
|
|
8350
|
+
/**
|
|
8351
|
+
* The Sankey diagram component.
|
|
8352
|
+
*
|
|
8353
|
+
* @example
|
|
8354
|
+
* ```ts
|
|
8355
|
+
* import { Component } from '@angular/core';
|
|
8356
|
+
*
|
|
8357
|
+
* _@Component({
|
|
8358
|
+
* selector: 'my-app',
|
|
8359
|
+
* template: `
|
|
8360
|
+
* <kendo-sankey [data]="data">
|
|
8361
|
+
* </kendo-sankey>
|
|
8362
|
+
* `,
|
|
8363
|
+
* })
|
|
8364
|
+
* export class AppComponent {
|
|
8365
|
+
* public data: SankeyData = {
|
|
8366
|
+
* nodes: [
|
|
8367
|
+
* { id: 1, label: { text: 'Linux' } },
|
|
8368
|
+
* { id: 0, label: { text: 'iOS'} },
|
|
8369
|
+
* { id: 2, label: { text: 'Mobile' } },
|
|
8370
|
+
* { id: 3, label: { text: 'Desktop' } },
|
|
8371
|
+
* ],
|
|
8372
|
+
* links: [
|
|
8373
|
+
* { sourceId: 0, targetId: 2, value: 1 },
|
|
8374
|
+
* { sourceId: 1, targetId: 2, value: 2 },
|
|
8375
|
+
* { sourceId: 1, targetId: 3, value: 3 },
|
|
8376
|
+
* ],
|
|
8377
|
+
* };
|
|
8378
|
+
* }
|
|
8379
|
+
* ```
|
|
8380
|
+
*/
|
|
8381
|
+
class SankeyComponent {
|
|
8382
|
+
constructor(element, configurationService, themeService, localizationService, instanceEventService, ngZone, changeDetector, renderer) {
|
|
8383
|
+
this.element = element;
|
|
8384
|
+
this.configurationService = configurationService;
|
|
8385
|
+
this.themeService = themeService;
|
|
8386
|
+
this.localizationService = localizationService;
|
|
8387
|
+
this.instanceEventService = instanceEventService;
|
|
8388
|
+
this.ngZone = ngZone;
|
|
8389
|
+
this.changeDetector = changeDetector;
|
|
8390
|
+
this.renderer = renderer;
|
|
8391
|
+
/**
|
|
8392
|
+
* Fires when the mouse pointer enters a node. Similar to the `mouseenter` event.
|
|
8393
|
+
*/
|
|
8394
|
+
this.nodeEnter = new EventEmitter();
|
|
8395
|
+
/**
|
|
8396
|
+
* Fires when the mouse pointer leaves a node. Similar to the `mouseleave` event.
|
|
8397
|
+
*/
|
|
8398
|
+
this.nodeLeave = new EventEmitter();
|
|
8399
|
+
/**
|
|
8400
|
+
* Fires when a node is clicked.
|
|
8401
|
+
*/
|
|
8402
|
+
this.nodeClick = new EventEmitter();
|
|
8403
|
+
/**
|
|
8404
|
+
* Fires when the mouse pointer enters a link. Similar to the `mouseenter` event,
|
|
8405
|
+
*/
|
|
8406
|
+
this.linkEnter = new EventEmitter();
|
|
8407
|
+
/**
|
|
8408
|
+
* Fires when the mouse pointer leaves a link. Similar to the `mouseleave` event.
|
|
8409
|
+
*/
|
|
8410
|
+
this.linkLeave = new EventEmitter();
|
|
8411
|
+
/**
|
|
8412
|
+
* Fires when a link is clicked.
|
|
8413
|
+
*/
|
|
8414
|
+
this.linkClick = new EventEmitter();
|
|
8415
|
+
/**
|
|
8416
|
+
* @hidden
|
|
8417
|
+
*/
|
|
8418
|
+
this.showLicenseWatermark = false;
|
|
8419
|
+
this.rtl = false;
|
|
8420
|
+
const isValid = validatePackage(packageMetadata);
|
|
8421
|
+
this.showLicenseWatermark = shouldShowValidationUI(isValid);
|
|
8422
|
+
this.themeService.loadTheme();
|
|
8423
|
+
this.refreshWait();
|
|
8424
|
+
}
|
|
8425
|
+
ngOnChanges(changes) {
|
|
8426
|
+
const store = this.configurationService.store;
|
|
8427
|
+
copyChanges(changes, store);
|
|
8428
|
+
store.popupSettings = null;
|
|
8429
|
+
this.configurationService.push(store);
|
|
8430
|
+
}
|
|
8431
|
+
/**
|
|
8432
|
+
* Updates the component fields with the specified values and refreshes the widget.
|
|
8433
|
+
*
|
|
8434
|
+
* Use this method when the configuration values cannot be set through the template.
|
|
8435
|
+
*
|
|
8436
|
+
* @example
|
|
8437
|
+
* ```ts-no-run
|
|
8438
|
+
* sankey.notifyChanges({ title: { text: 'New Title' } });
|
|
8439
|
+
* ```
|
|
8440
|
+
*
|
|
8441
|
+
* @param changes An object containing the updated input fields.
|
|
8442
|
+
*/
|
|
8443
|
+
notifyChanges(changes) {
|
|
8444
|
+
this.ngOnChanges(toSimpleChanges(changes));
|
|
8445
|
+
}
|
|
8446
|
+
ngOnDestroy() {
|
|
8447
|
+
this.destroyed = true;
|
|
8448
|
+
if (this.optionsChange) {
|
|
8449
|
+
this.optionsChange.unsubscribe();
|
|
8450
|
+
}
|
|
8451
|
+
if (this.instance) {
|
|
8452
|
+
this.instance.destroy();
|
|
8453
|
+
this.instance = null;
|
|
8454
|
+
}
|
|
8455
|
+
if (this.subscriptions) {
|
|
8456
|
+
this.subscriptions.unsubscribe();
|
|
8457
|
+
}
|
|
8458
|
+
clearTimeout(this.redrawTimeout);
|
|
8459
|
+
}
|
|
8460
|
+
/**
|
|
8461
|
+
* @hidden
|
|
8462
|
+
*/
|
|
8463
|
+
messageFor(key) {
|
|
8464
|
+
return this.localizationService.get(key);
|
|
8465
|
+
}
|
|
8466
|
+
createInstance(element) {
|
|
8467
|
+
this.instance = new Sankey(element, this.options, this.theme);
|
|
8468
|
+
['nodeEnter', 'nodeLeave', 'nodeClick', 'linkEnter', 'linkLeave', 'linkClick'].forEach((eventName) => this.instance.bind(eventName, (e) => this.trigger(eventName, e)));
|
|
8469
|
+
this.instance.bind('tooltipShow', (e) => this.onShowTooltip(e));
|
|
8470
|
+
this.instance.bind('tooltipHide', () => this.onHideTooltip());
|
|
8471
|
+
}
|
|
8472
|
+
/**
|
|
8473
|
+
* Exports the Sankey diagram as an image. The export operation is asynchronous and returns a promise.
|
|
8474
|
+
*
|
|
8475
|
+
* @param {ImageExportOptions} options - The parameters for the exported image.
|
|
8476
|
+
* @returns {Promise<string>} - A promise that will be resolved with a PNG image encoded as a Data URI.
|
|
8477
|
+
*/
|
|
8478
|
+
exportImage(options = {}) {
|
|
8479
|
+
return exportImage(this.exportVisual(options), options);
|
|
8480
|
+
}
|
|
8481
|
+
/**
|
|
8482
|
+
* Exports the Sankey diagram as an SVG document. The export operation is asynchronous and returns a promise.
|
|
8483
|
+
*
|
|
8484
|
+
* @param options - The parameters for the exported file.
|
|
8485
|
+
* @returns - A promise that will be resolved with an SVG document that is encoded as a Data URI.
|
|
8486
|
+
*/
|
|
8487
|
+
exportSVG(options = {}) {
|
|
8488
|
+
return exportSVG(this.exportVisual(options), options);
|
|
8489
|
+
}
|
|
8490
|
+
/**
|
|
8491
|
+
* Exports the visual of the Sankey component to a drawing group.
|
|
8492
|
+
*
|
|
8493
|
+
* @param options - The parameters for the export operation.
|
|
8494
|
+
* @returns - The root Group of the scene.
|
|
8495
|
+
*/
|
|
8496
|
+
exportVisual(options = {}) {
|
|
8497
|
+
return this.instance.exportVisual(options);
|
|
8498
|
+
}
|
|
8499
|
+
init() {
|
|
8500
|
+
if (!this.canRender) {
|
|
8501
|
+
return;
|
|
8502
|
+
}
|
|
8503
|
+
const element = this.instanceElement.nativeElement;
|
|
8504
|
+
this.createInstance(element);
|
|
8505
|
+
}
|
|
8506
|
+
/**
|
|
8507
|
+
* Reloads the Sankey appearance settings from the current [Kendo UI Theme]({% slug themesandstyles %}).
|
|
8508
|
+
*
|
|
8509
|
+
* Call this method after loading a different theme stylesheet.
|
|
8510
|
+
*/
|
|
8511
|
+
reloadTheme() {
|
|
8512
|
+
if (!this.instance) {
|
|
8513
|
+
return;
|
|
8514
|
+
}
|
|
8515
|
+
this.themeService.reset();
|
|
8516
|
+
this.instance.destroy();
|
|
8517
|
+
this.instance = null;
|
|
8518
|
+
}
|
|
8519
|
+
onShowTooltip(e) {
|
|
8520
|
+
this.run(() => {
|
|
8521
|
+
this.tooltipInstance.show(e);
|
|
8522
|
+
}, true, true);
|
|
8523
|
+
}
|
|
8524
|
+
onHideTooltip() {
|
|
8525
|
+
if (this.tooltipInstance.active) {
|
|
8526
|
+
this.tooltipInstance.hide();
|
|
8527
|
+
this.detectChanges();
|
|
8528
|
+
}
|
|
8529
|
+
}
|
|
8530
|
+
trigger(name, e) {
|
|
8531
|
+
const emitter = this.activeEmitter(name);
|
|
8532
|
+
if (emitter) {
|
|
8533
|
+
const args = this.instanceEventService.create(name, e, this);
|
|
8534
|
+
this.run(() => {
|
|
8535
|
+
emitter.emit(args);
|
|
8536
|
+
});
|
|
8537
|
+
return args.isDefaultPrevented && args.isDefaultPrevented();
|
|
8538
|
+
}
|
|
8539
|
+
}
|
|
8540
|
+
requiresHandlers(names) {
|
|
8541
|
+
for (let idx = 0; idx < names.length; idx++) {
|
|
8542
|
+
if (this.activeEmitter(names[idx])) {
|
|
8543
|
+
return true;
|
|
8544
|
+
}
|
|
8545
|
+
}
|
|
8546
|
+
return false;
|
|
8547
|
+
}
|
|
8548
|
+
refresh() {
|
|
8549
|
+
clearTimeout(this.redrawTimeout);
|
|
8550
|
+
if (!this.instance) {
|
|
8551
|
+
this.init();
|
|
8552
|
+
return;
|
|
8553
|
+
}
|
|
8554
|
+
this.updateOptions();
|
|
8555
|
+
}
|
|
8556
|
+
updateOptions() {
|
|
8557
|
+
this.instance.setOptions(this.options);
|
|
8558
|
+
}
|
|
8559
|
+
get canRender() {
|
|
8560
|
+
return isDocumentAvailable() && Boolean(this.instanceElement);
|
|
8561
|
+
}
|
|
8562
|
+
activeEmitter(name) {
|
|
8563
|
+
const emitter = this[name];
|
|
8564
|
+
if (emitter && emitter.emit && hasObservers(emitter)) {
|
|
8565
|
+
return emitter;
|
|
8566
|
+
}
|
|
8567
|
+
}
|
|
8568
|
+
refreshWait() {
|
|
8569
|
+
this.ngZone.runOutsideAngular(() => {
|
|
8570
|
+
this.optionsChange = combineLatest([this.configurationService.onChange$, this.themeService.onChange$])
|
|
8571
|
+
.pipe(tap((result) => {
|
|
8572
|
+
this.options = result[0];
|
|
8573
|
+
this.theme = this.loadTheme(result[1]);
|
|
8574
|
+
}), auditTime(THROTTLE_MS))
|
|
8575
|
+
.subscribe(() => {
|
|
8576
|
+
this.refresh();
|
|
8577
|
+
});
|
|
8578
|
+
});
|
|
8579
|
+
}
|
|
8580
|
+
loadTheme(chartTheme) {
|
|
8581
|
+
return {
|
|
8582
|
+
...chartTheme,
|
|
8583
|
+
nodeColors: chartTheme.seriesColors,
|
|
8584
|
+
};
|
|
8585
|
+
}
|
|
8586
|
+
run(callback, inZone = true, detectChanges) {
|
|
8587
|
+
if (inZone) {
|
|
8588
|
+
if (detectChanges) {
|
|
8589
|
+
this.changeDetector.markForCheck();
|
|
8590
|
+
}
|
|
8591
|
+
this.ngZone.run(callback);
|
|
8592
|
+
}
|
|
8593
|
+
else {
|
|
8594
|
+
callback();
|
|
8595
|
+
if (detectChanges) {
|
|
8596
|
+
this.detectChanges();
|
|
8597
|
+
}
|
|
8598
|
+
}
|
|
8599
|
+
}
|
|
8600
|
+
detectChanges() {
|
|
8601
|
+
if (!this.destroyed) {
|
|
8602
|
+
this.changeDetector.detectChanges();
|
|
8603
|
+
}
|
|
8604
|
+
}
|
|
8605
|
+
}
|
|
8606
|
+
SankeyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyComponent, deps: [{ token: i0.ElementRef }, { token: ConfigurationService }, { token: ThemeService }, { token: i4.LocalizationService }, { token: InstanceEventService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
8607
|
+
SankeyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SankeyComponent, selector: "kendo-sankey", inputs: { data: "data", links: "links", nodes: "nodes", labels: "labels", title: "title", legend: "legend", tooltip: "tooltip", disableAutoLayout: "disableAutoLayout", popupSettings: "popupSettings" }, outputs: { nodeEnter: "nodeEnter", nodeLeave: "nodeLeave", nodeClick: "nodeClick", linkEnter: "linkEnter", linkLeave: "linkLeave", linkClick: "linkClick" }, providers: [
|
|
8608
|
+
ConfigurationService,
|
|
8609
|
+
LocalizationService,
|
|
8610
|
+
InstanceEventService,
|
|
8611
|
+
SankeyTooltipTemplateService,
|
|
8612
|
+
{
|
|
8613
|
+
provide: L10N_PREFIX,
|
|
8614
|
+
useValue: 'kendo.sankey',
|
|
8615
|
+
},
|
|
8616
|
+
], viewQueries: [{ propertyName: "tooltipInstance", first: true, predicate: SankeyTooltipPopupComponent, descendants: true, static: true }, { propertyName: "instanceElement", first: true, predicate: ["instance"], descendants: true, static: true }], exportAs: ["kendoSankey"], usesOnChanges: true, ngImport: i0, template: `
|
|
8617
|
+
<ng-container
|
|
8618
|
+
kendoSankeyLocalizedMessages
|
|
8619
|
+
i18n-tooltipUnitFormat="kendo.sankey.tooltipUnitFormat|The format string to use when displaying node and link values in the tooltip"
|
|
8620
|
+
tooltipUnitFormat="({0} units)"
|
|
8621
|
+
></ng-container>
|
|
8622
|
+
<div #instance></div>
|
|
8623
|
+
<kendo-sankey-tooltip-popup
|
|
8624
|
+
[popupSettings]="popupSettings"
|
|
8625
|
+
[tooltipUnitFormat]="messageFor('tooltipUnitFormat')"
|
|
8626
|
+
>
|
|
8627
|
+
</kendo-sankey-tooltip-popup>
|
|
8628
|
+
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
|
8629
|
+
`, isInline: true, components: [{ type: SankeyTooltipPopupComponent, selector: "kendo-sankey-tooltip-popup", inputs: ["animate", "popupSettings", "wrapperClass", "tooltipUnitFormat", "offset"] }, { type: i8.WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]" }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoSankeyLocalizedMessages]" }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8630
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyComponent, decorators: [{
|
|
8631
|
+
type: Component,
|
|
8632
|
+
args: [{
|
|
8633
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8634
|
+
exportAs: 'kendoSankey',
|
|
8635
|
+
providers: [
|
|
8636
|
+
ConfigurationService,
|
|
8637
|
+
LocalizationService,
|
|
8638
|
+
InstanceEventService,
|
|
8639
|
+
SankeyTooltipTemplateService,
|
|
8640
|
+
{
|
|
8641
|
+
provide: L10N_PREFIX,
|
|
8642
|
+
useValue: 'kendo.sankey',
|
|
8643
|
+
},
|
|
8644
|
+
],
|
|
8645
|
+
selector: 'kendo-sankey',
|
|
8646
|
+
template: `
|
|
8647
|
+
<ng-container
|
|
8648
|
+
kendoSankeyLocalizedMessages
|
|
8649
|
+
i18n-tooltipUnitFormat="kendo.sankey.tooltipUnitFormat|The format string to use when displaying node and link values in the tooltip"
|
|
8650
|
+
tooltipUnitFormat="({0} units)"
|
|
8651
|
+
></ng-container>
|
|
8652
|
+
<div #instance></div>
|
|
8653
|
+
<kendo-sankey-tooltip-popup
|
|
8654
|
+
[popupSettings]="popupSettings"
|
|
8655
|
+
[tooltipUnitFormat]="messageFor('tooltipUnitFormat')"
|
|
8656
|
+
>
|
|
8657
|
+
</kendo-sankey-tooltip-popup>
|
|
8658
|
+
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
|
8659
|
+
`,
|
|
8660
|
+
}]
|
|
8661
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: ConfigurationService }, { type: ThemeService }, { type: i4.LocalizationService }, { type: InstanceEventService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; }, propDecorators: { data: [{
|
|
8662
|
+
type: Input
|
|
8663
|
+
}], links: [{
|
|
8664
|
+
type: Input
|
|
8665
|
+
}], nodes: [{
|
|
8666
|
+
type: Input
|
|
8667
|
+
}], labels: [{
|
|
8668
|
+
type: Input
|
|
8669
|
+
}], title: [{
|
|
8670
|
+
type: Input
|
|
8671
|
+
}], legend: [{
|
|
8672
|
+
type: Input
|
|
8673
|
+
}], tooltip: [{
|
|
8674
|
+
type: Input
|
|
8675
|
+
}], disableAutoLayout: [{
|
|
8676
|
+
type: Input
|
|
8677
|
+
}], popupSettings: [{
|
|
8678
|
+
type: Input
|
|
8679
|
+
}], nodeEnter: [{
|
|
8680
|
+
type: Output
|
|
8681
|
+
}], nodeLeave: [{
|
|
8682
|
+
type: Output
|
|
8683
|
+
}], nodeClick: [{
|
|
8684
|
+
type: Output
|
|
8685
|
+
}], linkEnter: [{
|
|
8686
|
+
type: Output
|
|
8687
|
+
}], linkLeave: [{
|
|
8688
|
+
type: Output
|
|
8689
|
+
}], linkClick: [{
|
|
8690
|
+
type: Output
|
|
8691
|
+
}], tooltipInstance: [{
|
|
8692
|
+
type: ViewChild,
|
|
8693
|
+
args: [SankeyTooltipPopupComponent, { static: true }]
|
|
8694
|
+
}], instanceElement: [{
|
|
8695
|
+
type: ViewChild,
|
|
8696
|
+
args: ['instance', { static: true }]
|
|
8697
|
+
}] } });
|
|
8698
|
+
|
|
8699
|
+
/**
|
|
8700
|
+
* @hidden
|
|
8701
|
+
*/
|
|
8702
|
+
function createSankeyData(data, dimensions, measure) {
|
|
8703
|
+
const nodes = new Set();
|
|
8704
|
+
const links = new Map();
|
|
8705
|
+
const linksMap = new Map();
|
|
8706
|
+
data.forEach((row) => {
|
|
8707
|
+
dimensions.forEach((dimension) => {
|
|
8708
|
+
nodes.add(dimension(row));
|
|
8709
|
+
});
|
|
8710
|
+
for (let i = 0; i < dimensions.length - 1; i++) {
|
|
8711
|
+
const source = dimensions[i](row);
|
|
8712
|
+
const target = dimensions[i + 1](row);
|
|
8713
|
+
const key = `${source}_${target}`;
|
|
8714
|
+
const value = measure(row);
|
|
8715
|
+
if (links.has(key)) {
|
|
8716
|
+
links.set(key, links.get(key) + value);
|
|
8717
|
+
}
|
|
8718
|
+
else {
|
|
8719
|
+
links.set(key, value);
|
|
8720
|
+
linksMap.set(key, { source, target });
|
|
8721
|
+
}
|
|
8722
|
+
}
|
|
8723
|
+
});
|
|
8724
|
+
const nodesId = new Map();
|
|
8725
|
+
const nodesArray = Array.from(nodes).map((node, index) => {
|
|
8726
|
+
nodesId.set(node, index);
|
|
8727
|
+
return { id: index, label: { text: String(node) } };
|
|
8728
|
+
});
|
|
8729
|
+
const linksArray = Array.from(links).map(([key, value]) => {
|
|
8730
|
+
const { source, target } = linksMap.get(key);
|
|
8731
|
+
return {
|
|
8732
|
+
sourceId: nodesId.get(source),
|
|
8733
|
+
targetId: nodesId.get(target),
|
|
8734
|
+
value
|
|
8735
|
+
};
|
|
8736
|
+
});
|
|
8737
|
+
return { nodes: nodesArray, links: linksArray };
|
|
8738
|
+
}
|
|
8739
|
+
;
|
|
8740
|
+
|
|
8741
|
+
/**
|
|
8742
|
+
* Arguments for the `dataBound` event of the [`[kendoSankeyFlatBinding]`]({% slug api_charts_sankeyflatbindingdirective %}) directive.
|
|
8743
|
+
*/
|
|
8744
|
+
class SankeyFlatBindingDataBoundEvent {
|
|
8745
|
+
/**
|
|
8746
|
+
* @hidden
|
|
8747
|
+
*/
|
|
8748
|
+
constructor(data) {
|
|
8749
|
+
this.data = data;
|
|
8750
|
+
}
|
|
8751
|
+
}
|
|
8752
|
+
|
|
8753
|
+
/**
|
|
8754
|
+
* A directive which encapsulates the retrieval of the nodes and links when flat data is provided.
|
|
8755
|
+
*
|
|
8756
|
+
* See [Data Binding - Binding to Flat Data]({% slug data_binding_sankey %}#toc-binding-to-flat-data).
|
|
8757
|
+
*/
|
|
8758
|
+
class SankeyFlatBindingDirective {
|
|
8759
|
+
constructor(sankey) {
|
|
8760
|
+
this.sankey = sankey;
|
|
8761
|
+
/**
|
|
8762
|
+
* Represents the fields which identify the nodes.
|
|
8763
|
+
*/
|
|
8764
|
+
this.dimensionFields = [];
|
|
8765
|
+
/**
|
|
8766
|
+
* Fires when the flat data has been converted to `SankeyData`.
|
|
8767
|
+
*
|
|
8768
|
+
* To customize the created nodes and links, modify the data.
|
|
8769
|
+
*/
|
|
8770
|
+
this.dataBound = new EventEmitter();
|
|
8771
|
+
}
|
|
8772
|
+
ngOnChanges(changes) {
|
|
8773
|
+
if (!isChanged('data', changes, false)) {
|
|
8774
|
+
return;
|
|
8775
|
+
}
|
|
8776
|
+
if (this.dimensionFields?.length === 0) {
|
|
8777
|
+
throw new Error('kendoSankeyFlatBinding: dimensionFields is required');
|
|
8778
|
+
}
|
|
8779
|
+
if (!this.valueField) {
|
|
8780
|
+
throw new Error('kendoSankeyFlatBinding: valueField is required');
|
|
8781
|
+
}
|
|
8782
|
+
const dimensions = this.dimensionFields.map(field => getter(field));
|
|
8783
|
+
const measure = getter(this.valueField);
|
|
8784
|
+
const data = createSankeyData(this.data, dimensions, measure);
|
|
8785
|
+
this.dataBound.emit(new SankeyFlatBindingDataBoundEvent(data));
|
|
8786
|
+
this.sankey.notifyChanges({ data });
|
|
8787
|
+
}
|
|
8788
|
+
}
|
|
8789
|
+
SankeyFlatBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyFlatBindingDirective, deps: [{ token: SankeyComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
8790
|
+
SankeyFlatBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: SankeyFlatBindingDirective, selector: "[kendoSankeyFlatBinding]", inputs: { data: ["kendoSankeyFlatBinding", "data"], dimensionFields: "dimensionFields", valueField: "valueField" }, outputs: { dataBound: "dataBound" }, usesOnChanges: true, ngImport: i0 });
|
|
8791
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyFlatBindingDirective, decorators: [{
|
|
8792
|
+
type: Directive,
|
|
8793
|
+
args: [{
|
|
8794
|
+
selector: '[kendoSankeyFlatBinding]'
|
|
8795
|
+
}]
|
|
8796
|
+
}], ctorParameters: function () { return [{ type: SankeyComponent }]; }, propDecorators: { data: [{
|
|
8797
|
+
type: Input,
|
|
8798
|
+
args: ['kendoSankeyFlatBinding']
|
|
8799
|
+
}], dimensionFields: [{
|
|
8800
|
+
type: Input
|
|
8801
|
+
}], valueField: [{
|
|
8802
|
+
type: Input
|
|
8803
|
+
}], dataBound: [{
|
|
8804
|
+
type: Output
|
|
8805
|
+
}] } });
|
|
8806
|
+
|
|
8807
|
+
/**
|
|
8808
|
+
* The configuration options of the Sankey legend
|
|
8809
|
+
* ([see example]({% slug legend_sankey %})).
|
|
8810
|
+
*/
|
|
8811
|
+
class SankeyLabelsComponent extends SettingsComponent {
|
|
8812
|
+
constructor(configurationService) {
|
|
8813
|
+
super('labels', configurationService);
|
|
8814
|
+
this.configurationService = configurationService;
|
|
8815
|
+
}
|
|
8816
|
+
}
|
|
8817
|
+
SankeyLabelsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyLabelsComponent, deps: [{ token: ConfigurationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
8818
|
+
SankeyLabelsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SankeyLabelsComponent, selector: "kendo-sankey-labels", inputs: { visible: "visible", font: "font", color: "color", align: "align", position: "position", padding: "padding", margin: "margin", border: "border", offset: "offset", stroke: "stroke" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8819
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyLabelsComponent, decorators: [{
|
|
8820
|
+
type: Component,
|
|
8821
|
+
args: [{
|
|
8822
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8823
|
+
selector: 'kendo-sankey-labels',
|
|
8824
|
+
template: '',
|
|
8825
|
+
}]
|
|
8826
|
+
}], ctorParameters: function () { return [{ type: ConfigurationService }]; }, propDecorators: { visible: [{
|
|
8827
|
+
type: Input
|
|
8828
|
+
}], font: [{
|
|
8829
|
+
type: Input
|
|
8830
|
+
}], color: [{
|
|
8831
|
+
type: Input
|
|
8832
|
+
}], align: [{
|
|
8833
|
+
type: Input
|
|
8834
|
+
}], position: [{
|
|
8835
|
+
type: Input
|
|
8836
|
+
}], padding: [{
|
|
8837
|
+
type: Input
|
|
8838
|
+
}], margin: [{
|
|
8839
|
+
type: Input
|
|
8840
|
+
}], border: [{
|
|
8841
|
+
type: Input
|
|
8842
|
+
}], offset: [{
|
|
8843
|
+
type: Input
|
|
8844
|
+
}], stroke: [{
|
|
8845
|
+
type: Input
|
|
8846
|
+
}] } });
|
|
8847
|
+
|
|
8848
|
+
/**
|
|
8849
|
+
* The configuration options of the Sankey legend
|
|
8850
|
+
* ([see example]({% slug legend_sankey %})).
|
|
8851
|
+
*/
|
|
8852
|
+
class SankeyLegendComponent extends SettingsComponent {
|
|
8853
|
+
constructor(configurationService) {
|
|
8854
|
+
super('legend', configurationService);
|
|
8855
|
+
this.configurationService = configurationService;
|
|
8856
|
+
this.markAsVisible();
|
|
8857
|
+
}
|
|
8858
|
+
}
|
|
8859
|
+
SankeyLegendComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyLegendComponent, deps: [{ token: ConfigurationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
8860
|
+
SankeyLegendComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SankeyLegendComponent, selector: "kendo-sankey-legend", inputs: { align: "align", background: "background", border: "border", height: "height", labels: "labels", margin: "margin", offsetX: "offsetX", offsetY: "offsetY", orientation: "orientation", padding: "padding", position: "position", reverse: "reverse", visible: "visible", width: "width", markers: "markers", spacing: "spacing", title: "title" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8861
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyLegendComponent, decorators: [{
|
|
8862
|
+
type: Component,
|
|
8863
|
+
args: [{
|
|
8864
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8865
|
+
selector: 'kendo-sankey-legend',
|
|
8866
|
+
template: ''
|
|
8867
|
+
}]
|
|
8868
|
+
}], ctorParameters: function () { return [{ type: ConfigurationService }]; }, propDecorators: { align: [{
|
|
8869
|
+
type: Input
|
|
8870
|
+
}], background: [{
|
|
8871
|
+
type: Input
|
|
8872
|
+
}], border: [{
|
|
8873
|
+
type: Input
|
|
8874
|
+
}], height: [{
|
|
8875
|
+
type: Input
|
|
8876
|
+
}], labels: [{
|
|
8877
|
+
type: Input
|
|
8878
|
+
}], margin: [{
|
|
8879
|
+
type: Input
|
|
8880
|
+
}], offsetX: [{
|
|
8881
|
+
type: Input
|
|
8882
|
+
}], offsetY: [{
|
|
8883
|
+
type: Input
|
|
8884
|
+
}], orientation: [{
|
|
8885
|
+
type: Input
|
|
8886
|
+
}], padding: [{
|
|
8887
|
+
type: Input
|
|
8888
|
+
}], position: [{
|
|
8889
|
+
type: Input
|
|
8890
|
+
}], reverse: [{
|
|
8891
|
+
type: Input
|
|
8892
|
+
}], visible: [{
|
|
8893
|
+
type: Input
|
|
8894
|
+
}], width: [{
|
|
8895
|
+
type: Input
|
|
8896
|
+
}], markers: [{
|
|
8897
|
+
type: Input
|
|
8898
|
+
}], spacing: [{
|
|
8899
|
+
type: Input
|
|
8900
|
+
}], title: [{
|
|
8901
|
+
type: Input
|
|
8902
|
+
}] } });
|
|
8903
|
+
|
|
8904
|
+
/**
|
|
8905
|
+
* The configuration options of the Sankey legend
|
|
8906
|
+
* ([see example]({% slug legend_sankey %})).
|
|
8907
|
+
*/
|
|
8908
|
+
class SankeyLinksComponent extends SettingsComponent {
|
|
8909
|
+
constructor(configurationService) {
|
|
8910
|
+
super('links', configurationService);
|
|
8911
|
+
this.configurationService = configurationService;
|
|
8912
|
+
}
|
|
8913
|
+
}
|
|
8914
|
+
SankeyLinksComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyLinksComponent, deps: [{ token: ConfigurationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
8915
|
+
SankeyLinksComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SankeyLinksComponent, selector: "kendo-sankey-links", inputs: { colorType: "colorType", color: "color", opacity: "opacity", highlight: "highlight" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8916
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyLinksComponent, decorators: [{
|
|
8917
|
+
type: Component,
|
|
8918
|
+
args: [{
|
|
8919
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8920
|
+
selector: 'kendo-sankey-links',
|
|
8921
|
+
template: '',
|
|
8922
|
+
}]
|
|
8923
|
+
}], ctorParameters: function () { return [{ type: ConfigurationService }]; }, propDecorators: { colorType: [{
|
|
8924
|
+
type: Input
|
|
8925
|
+
}], color: [{
|
|
8926
|
+
type: Input
|
|
8927
|
+
}], opacity: [{
|
|
8928
|
+
type: Input
|
|
8929
|
+
}], highlight: [{
|
|
8930
|
+
type: Input
|
|
8931
|
+
}] } });
|
|
8932
|
+
|
|
8933
|
+
/**
|
|
8934
|
+
* Custom component messages override default component messages
|
|
8935
|
+
* ([see example]({% slug globalization_filter %}#toc-localization)).
|
|
8936
|
+
*/
|
|
8937
|
+
class SankeyCustomMessagesComponent extends Messages {
|
|
8938
|
+
constructor(service) {
|
|
8939
|
+
super();
|
|
8940
|
+
this.service = service;
|
|
8941
|
+
}
|
|
8942
|
+
get override() {
|
|
8943
|
+
return true;
|
|
8944
|
+
}
|
|
8945
|
+
}
|
|
8946
|
+
SankeyCustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyCustomMessagesComponent, deps: [{ token: i4.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
8947
|
+
SankeyCustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SankeyCustomMessagesComponent, selector: "kendo-sankey-messages", providers: [
|
|
8948
|
+
{
|
|
8949
|
+
provide: Messages,
|
|
8950
|
+
useExisting: forwardRef(() => SankeyCustomMessagesComponent)
|
|
8951
|
+
}
|
|
8952
|
+
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
8953
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyCustomMessagesComponent, decorators: [{
|
|
8954
|
+
type: Component,
|
|
8955
|
+
args: [{
|
|
8956
|
+
providers: [
|
|
8957
|
+
{
|
|
8958
|
+
provide: Messages,
|
|
8959
|
+
useExisting: forwardRef(() => SankeyCustomMessagesComponent)
|
|
8960
|
+
}
|
|
8961
|
+
],
|
|
8962
|
+
selector: 'kendo-sankey-messages',
|
|
8963
|
+
template: ``
|
|
8964
|
+
}]
|
|
8965
|
+
}], ctorParameters: function () { return [{ type: i4.LocalizationService }]; } });
|
|
8966
|
+
|
|
8967
|
+
/**
|
|
8968
|
+
* The configuration options of the Sankey legend
|
|
8969
|
+
* ([see example]({% slug legend_sankey %})).
|
|
8970
|
+
*/
|
|
8971
|
+
class SankeyNodesComponent extends SettingsComponent {
|
|
8972
|
+
constructor(configurationService) {
|
|
8973
|
+
super('nodes', configurationService);
|
|
8974
|
+
this.configurationService = configurationService;
|
|
8975
|
+
}
|
|
8976
|
+
}
|
|
8977
|
+
SankeyNodesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyNodesComponent, deps: [{ token: ConfigurationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
8978
|
+
SankeyNodesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SankeyNodesComponent, selector: "kendo-sankey-nodes", inputs: { colorType: "colorType", color: "color", opacity: "opacity", offset: "offset", padding: "padding", width: "width", align: "align" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8979
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyNodesComponent, decorators: [{
|
|
8980
|
+
type: Component,
|
|
8981
|
+
args: [{
|
|
8982
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8983
|
+
selector: 'kendo-sankey-nodes',
|
|
8984
|
+
template: '',
|
|
8985
|
+
}]
|
|
8986
|
+
}], ctorParameters: function () { return [{ type: ConfigurationService }]; }, propDecorators: { colorType: [{
|
|
8987
|
+
type: Input
|
|
8988
|
+
}], color: [{
|
|
8989
|
+
type: Input
|
|
8990
|
+
}], opacity: [{
|
|
8991
|
+
type: Input
|
|
8992
|
+
}], offset: [{
|
|
8993
|
+
type: Input
|
|
8994
|
+
}], padding: [{
|
|
8995
|
+
type: Input
|
|
8996
|
+
}], width: [{
|
|
8997
|
+
type: Input
|
|
8998
|
+
}], align: [{
|
|
8999
|
+
type: Input
|
|
9000
|
+
}] } });
|
|
9001
|
+
|
|
9002
|
+
/**
|
|
9003
|
+
* The configuration options of the Sankey title or text
|
|
9004
|
+
* ([see example]({% slug title_sankey %})).
|
|
9005
|
+
*
|
|
9006
|
+
* @example
|
|
9007
|
+
* ```html
|
|
9008
|
+
* <kendo-sankey [data]="data">
|
|
9009
|
+
* <kendo-sankey-title text="Title Text" [padding]="{bottom: 20}"></kendo-sankey-title>
|
|
9010
|
+
* ...
|
|
9011
|
+
* </kendo-sankey>
|
|
9012
|
+
* ```
|
|
9013
|
+
*/
|
|
9014
|
+
class SankeyTitleComponent extends SettingsComponent {
|
|
9015
|
+
constructor(configurationService) {
|
|
9016
|
+
super('title', configurationService);
|
|
9017
|
+
this.configurationService = configurationService;
|
|
9018
|
+
}
|
|
9019
|
+
}
|
|
9020
|
+
SankeyTitleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyTitleComponent, deps: [{ token: ConfigurationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9021
|
+
SankeyTitleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SankeyTitleComponent, selector: "kendo-sankey-title", inputs: { align: "align", background: "background", border: "border", color: "color", font: "font", margin: "margin", padding: "padding", position: "position", text: "text", description: "description", visible: "visible" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9022
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyTitleComponent, decorators: [{
|
|
9023
|
+
type: Component,
|
|
9024
|
+
args: [{
|
|
9025
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9026
|
+
selector: 'kendo-sankey-title',
|
|
9027
|
+
template: ''
|
|
9028
|
+
}]
|
|
9029
|
+
}], ctorParameters: function () { return [{ type: ConfigurationService }]; }, propDecorators: { align: [{
|
|
9030
|
+
type: Input
|
|
9031
|
+
}], background: [{
|
|
9032
|
+
type: Input
|
|
9033
|
+
}], border: [{
|
|
9034
|
+
type: Input
|
|
9035
|
+
}], color: [{
|
|
9036
|
+
type: Input
|
|
9037
|
+
}], font: [{
|
|
9038
|
+
type: Input
|
|
9039
|
+
}], margin: [{
|
|
9040
|
+
type: Input
|
|
9041
|
+
}], padding: [{
|
|
9042
|
+
type: Input
|
|
9043
|
+
}], position: [{
|
|
9044
|
+
type: Input
|
|
9045
|
+
}], text: [{
|
|
9046
|
+
type: Input
|
|
9047
|
+
}], description: [{
|
|
9048
|
+
type: Input
|
|
9049
|
+
}], visible: [{
|
|
9050
|
+
type: Input
|
|
9051
|
+
}] } });
|
|
9052
|
+
|
|
9053
|
+
/**
|
|
9054
|
+
* The configuration options of the Sankey tooltip
|
|
9055
|
+
* ([see example]({% slug tooltip_sankey %})).
|
|
9056
|
+
*/
|
|
9057
|
+
class SankeyTooltipComponent extends SettingsComponent {
|
|
9058
|
+
constructor(configurationService, templateService) {
|
|
9059
|
+
super('tooltip', configurationService);
|
|
9060
|
+
this.configurationService = configurationService;
|
|
9061
|
+
this.templateService = templateService;
|
|
9062
|
+
this.markAsVisible();
|
|
9063
|
+
}
|
|
9064
|
+
ngAfterContentChecked() {
|
|
9065
|
+
this.templateService.linkTemplate = this.linkTooltipTemplate?.templateRef;
|
|
9066
|
+
this.templateService.nodeTemplate = this.nodeTooltipTemplate?.templateRef;
|
|
9067
|
+
}
|
|
9068
|
+
}
|
|
9069
|
+
SankeyTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyTooltipComponent, deps: [{ token: ConfigurationService }, { token: SankeyTooltipTemplateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9070
|
+
SankeyTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SankeyTooltipComponent, selector: "kendo-sankey-tooltip", inputs: { followPointer: "followPointer", delay: "delay", offset: "offset", visible: "visible" }, queries: [{ propertyName: "linkTooltipTemplate", first: true, predicate: SankeyLinkTooltipTemplateDirective, descendants: true }, { propertyName: "nodeTooltipTemplate", first: true, predicate: SankeyNodeTooltipTemplateDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
9071
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyTooltipComponent, decorators: [{
|
|
9072
|
+
type: Component,
|
|
9073
|
+
args: [{
|
|
9074
|
+
selector: 'kendo-sankey-tooltip',
|
|
9075
|
+
template: '',
|
|
9076
|
+
}]
|
|
9077
|
+
}], ctorParameters: function () { return [{ type: ConfigurationService }, { type: SankeyTooltipTemplateService }]; }, propDecorators: { followPointer: [{
|
|
9078
|
+
type: Input
|
|
9079
|
+
}], delay: [{
|
|
9080
|
+
type: Input
|
|
9081
|
+
}], offset: [{
|
|
9082
|
+
type: Input
|
|
9083
|
+
}], visible: [{
|
|
9084
|
+
type: Input
|
|
9085
|
+
}], linkTooltipTemplate: [{
|
|
9086
|
+
type: ContentChild,
|
|
9087
|
+
args: [SankeyLinkTooltipTemplateDirective, { static: false }]
|
|
9088
|
+
}], nodeTooltipTemplate: [{
|
|
9089
|
+
type: ContentChild,
|
|
9090
|
+
args: [SankeyNodeTooltipTemplateDirective, { static: false }]
|
|
9091
|
+
}] } });
|
|
9092
|
+
|
|
9093
|
+
/**
|
|
9094
|
+
* @hidden
|
|
9095
|
+
*/
|
|
9096
|
+
const SANKEY_EXPORTS = [
|
|
9097
|
+
SankeyComponent,
|
|
9098
|
+
SankeyTooltipPopupComponent,
|
|
9099
|
+
SankeyLinkTooltipTemplateDirective,
|
|
9100
|
+
SankeyNodeTooltipTemplateDirective,
|
|
9101
|
+
SankeyCustomMessagesComponent,
|
|
9102
|
+
LocalizedMessagesDirective,
|
|
9103
|
+
SankeyTitleComponent,
|
|
9104
|
+
SankeyLegendComponent,
|
|
9105
|
+
SankeyTooltipComponent,
|
|
9106
|
+
SankeyLinksComponent,
|
|
9107
|
+
SankeyNodesComponent,
|
|
9108
|
+
SankeyLabelsComponent,
|
|
9109
|
+
SankeyFlatBindingDirective
|
|
9110
|
+
];
|
|
9111
|
+
/**
|
|
9112
|
+
* @hidden
|
|
9113
|
+
*/
|
|
9114
|
+
const SANKEY_DIRECTIVES = [
|
|
9115
|
+
...SANKEY_EXPORTS,
|
|
9116
|
+
SquareSymbol
|
|
9117
|
+
];
|
|
9118
|
+
|
|
9119
|
+
/**
|
|
9120
|
+
* A [module](link:site.data.urls.angular['ngmoduleapi']) that includes the Sparkline component and directives.
|
|
9121
|
+
*
|
|
9122
|
+
* Imports the SparklineModule into your application
|
|
9123
|
+
* [root module](link:site.data.urls.angular['ngmodules']#angular-modularity) or any other sub-module
|
|
9124
|
+
* that will use the Sparkline component.
|
|
9125
|
+
*
|
|
9126
|
+
* @example
|
|
9127
|
+
* ```ts-no-run
|
|
9128
|
+
* import { NgModule } from '@angular/core';
|
|
9129
|
+
* import { BrowserModule } from '@angular/platform-browser';
|
|
9130
|
+
* import { SparklineModule } from '@progress/kendo-angular-charts';
|
|
9131
|
+
* import { AppComponent } from './app.component';
|
|
9132
|
+
*
|
|
9133
|
+
* _@NgModule({
|
|
9134
|
+
* bootstrap: [AppComponent],
|
|
9135
|
+
* declarations: [AppComponent],
|
|
9136
|
+
* imports: [BrowserModule, SparklineModule]
|
|
9137
|
+
* })
|
|
9138
|
+
* export class AppModule {
|
|
9139
|
+
* }
|
|
9140
|
+
* ```
|
|
9141
|
+
*/
|
|
9142
|
+
class SankeyModule {
|
|
9143
|
+
}
|
|
9144
|
+
SankeyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
9145
|
+
SankeyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyModule, declarations: [SankeyComponent, SankeyTooltipPopupComponent, SankeyLinkTooltipTemplateDirective, SankeyNodeTooltipTemplateDirective, SankeyCustomMessagesComponent, LocalizedMessagesDirective, SankeyTitleComponent, SankeyLegendComponent, SankeyTooltipComponent, SankeyLinksComponent, SankeyNodesComponent, SankeyLabelsComponent, SankeyFlatBindingDirective, SquareSymbol], imports: [CommonModule, IconsModule, PopupModule, ResizeSensorModule, WatermarkModule], exports: [SankeyComponent, SankeyTooltipPopupComponent, SankeyLinkTooltipTemplateDirective, SankeyNodeTooltipTemplateDirective, SankeyCustomMessagesComponent, LocalizedMessagesDirective, SankeyTitleComponent, SankeyLegendComponent, SankeyTooltipComponent, SankeyLinksComponent, SankeyNodesComponent, SankeyLabelsComponent, SankeyFlatBindingDirective] });
|
|
9146
|
+
SankeyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyModule, providers: [ThemeService], imports: [[CommonModule, IconsModule, PopupModule, ResizeSensorModule, WatermarkModule]] });
|
|
9147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyModule, decorators: [{
|
|
9148
|
+
type: NgModule,
|
|
9149
|
+
args: [{
|
|
9150
|
+
declarations: [SANKEY_DIRECTIVES],
|
|
9151
|
+
exports: [SANKEY_EXPORTS],
|
|
9152
|
+
imports: [CommonModule, IconsModule, PopupModule, ResizeSensorModule, WatermarkModule],
|
|
9153
|
+
providers: [ThemeService],
|
|
9154
|
+
}]
|
|
9155
|
+
}] });
|
|
9156
|
+
|
|
7837
9157
|
/**
|
|
7838
9158
|
* A [module](link:site.data.urls.angular['ngmoduleapi']) that includes all Chart components and directives.
|
|
7839
9159
|
*
|
|
@@ -7860,12 +9180,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
7860
9180
|
class ChartsModule {
|
|
7861
9181
|
}
|
|
7862
9182
|
ChartsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ChartsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
7863
|
-
ChartsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ChartsModule, exports: [ChartModule, SparklineModule, StockChartModule] });
|
|
7864
|
-
ChartsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ChartsModule, imports: [ChartModule, SparklineModule, StockChartModule] });
|
|
9183
|
+
ChartsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ChartsModule, exports: [ChartModule, SparklineModule, StockChartModule, SankeyModule] });
|
|
9184
|
+
ChartsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ChartsModule, imports: [ChartModule, SparklineModule, StockChartModule, SankeyModule] });
|
|
7865
9185
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ChartsModule, decorators: [{
|
|
7866
9186
|
type: NgModule,
|
|
7867
9187
|
args: [{
|
|
7868
|
-
exports: [ChartModule, SparklineModule, StockChartModule]
|
|
9188
|
+
exports: [ChartModule, SparklineModule, StockChartModule, SankeyModule]
|
|
7869
9189
|
}]
|
|
7870
9190
|
}] });
|
|
7871
9191
|
|
|
@@ -7873,5 +9193,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
7873
9193
|
* Generated bundle index. Do not edit.
|
|
7874
9194
|
*/
|
|
7875
9195
|
|
|
7876
|
-
export { AxisDefaultsComponent, AxisDefaultsCrosshairComponent, AxisDefaultsCrosshairTooltipComponent, AxisDefaultsLabelsComponent, AxisDefaultsTitleComponent, AxisLabelClickEvent, CHART_DIRECTIVES, CategoryAxisComponent, CategoryAxisCrosshairComponent, CategoryAxisCrosshairTooltipComponent, CategoryAxisItemComponent, CategoryAxisLabelsComponent, CategoryAxisNotesComponent, CategoryAxisNotesIconComponent, CategoryAxisNotesLabelComponent, CategoryAxisRangeLabelsComponent, CategoryAxisSelectComponent, CategoryAxisTitleComponent, ChartAreaComponent, ChartBreadcrumbComponent, ChartComponent, ChartModule, ChartsModule, CollectionService, ConfigurationService, CrosshairTooltipComponent, CrosshairTooltipsContainerComponent, DonutCenterTemplateDirective, DragEndEvent, DragEvent, DragStartEvent, DrilldownEvent, LegendComponent, LegendInactiveItemsComponent, LegendItemClickEvent, LegendItemComponent, LegendItemHoverEvent, LegendItemLeaveEvent, NavigatorCategoryAxisComponent, NavigatorCategoryAxisCrosshairComponent, NavigatorCategoryAxisCrosshairTooltipComponent, NavigatorCategoryAxisLabelsComponent, NavigatorCategoryAxisNotesComponent, NavigatorCategoryAxisNotesIconComponent, NavigatorCategoryAxisNotesLabelComponent, NavigatorCategoryAxisSelectComponent, NavigatorCategoryAxisTitleComponent, NavigatorComponent, NavigatorFilterEvent, NavigatorHintComponent, NavigatorPaneComponent, NavigatorPaneTitleComponent, NavigatorSelectComponent, NavigatorSeriesComponent, NavigatorSeriesErrorBarsComponent, NavigatorSeriesExtremesComponent, NavigatorSeriesHighlightComponent, NavigatorSeriesItemComponent, NavigatorSeriesLabelsComponent, NavigatorSeriesLabelsFromComponent, NavigatorSeriesLabelsToComponent, NavigatorSeriesMarkersComponent, NavigatorSeriesNotesComponent, NavigatorSeriesNotesIconComponent, NavigatorSeriesNotesLabelComponent, NavigatorSeriesOutliersComponent, NavigatorSeriesTooltipComponent, NoteClickEvent, NoteHoverEvent, PaneComponent, PaneDefaultsComponent, PaneDefaultsTitleComponent, PaneRenderEvent, PanesComponent, PanesTitleComponent, PlotAreaClickEvent, PlotAreaComponent, PlotAreaHoverEvent, RenderEvent, SPARKLINE_DIRECTIVES, STOCK_CHART_DIRECTIVES, SelectEndEvent, SelectEvent, SelectStartEvent, SeriesClickEvent, SeriesComponent, SeriesDefaultsComponent, SeriesDefaultsLabelsComponent, SeriesDefaultsLabelsFromComponent, SeriesDefaultsLabelsToComponent, SeriesDefaultsNotesComponent, SeriesDefaultsNotesIconComponent, SeriesDefaultsNotesLabelComponent, SeriesDefaultsTooltipComponent, SeriesDrilldownTemplateDirective, SeriesErrorBarsComponent, SeriesExtremesComponent, SeriesHighlightComponent, SeriesHoverEvent, SeriesItemComponent, SeriesLabelsComponent, SeriesLabelsFromComponent, SeriesLabelsToComponent, SeriesMarkersComponent, SeriesNotesComponent, SeriesNotesIconComponent, SeriesNotesLabelComponent, SeriesOutliersComponent, SeriesTooltipComponent, SeriesTooltipTemplateDirective, SeriesTrendlineComponent, SeriesTrendlineForecastComponent, SharedTooltipTemplateDirective, SparklineComponent, SparklineModule, StockChartComponent, StockChartModule, SubtitleComponent, TitleComponent, TooltipComponent, TooltipPopupComponent, TooltipTemplateService, ValueAxisComponent, ValueAxisCrosshairComponent, ValueAxisCrosshairTooltipComponent, ValueAxisItemComponent, ValueAxisLabelsComponent, ValueAxisNotesComponent, ValueAxisNotesIconComponent, ValueAxisNotesLabelComponent, ValueAxisTitleComponent, WeekStartDay, XAxisComponent, XAxisCrosshairComponent, XAxisCrosshairTooltipComponent, XAxisItemComponent, XAxisLabelsComponent, XAxisNotesComponent, XAxisNotesIconComponent, XAxisNotesLabelComponent, XAxisTitleComponent, YAxisComponent, YAxisCrosshairComponent, YAxisCrosshairTooltipComponent, YAxisItemComponent, YAxisLabelsComponent, YAxisNotesComponent, YAxisNotesIconComponent, YAxisNotesLabelComponent, YAxisTitleComponent, ZoomEndEvent, ZoomEvent, ZoomStartEvent, ZoomableComponent };
|
|
9196
|
+
export { AxisDefaultsComponent, AxisDefaultsCrosshairComponent, AxisDefaultsCrosshairTooltipComponent, AxisDefaultsLabelsComponent, AxisDefaultsTitleComponent, AxisLabelClickEvent, CHART_DIRECTIVES, CategoryAxisComponent, CategoryAxisCrosshairComponent, CategoryAxisCrosshairTooltipComponent, CategoryAxisItemComponent, CategoryAxisLabelsComponent, CategoryAxisNotesComponent, CategoryAxisNotesIconComponent, CategoryAxisNotesLabelComponent, CategoryAxisRangeLabelsComponent, CategoryAxisSelectComponent, CategoryAxisTitleComponent, ChartAreaComponent, ChartBreadcrumbComponent, ChartComponent, ChartModule, ChartsModule, CollectionService, ConfigurationService, CrosshairTooltipComponent, CrosshairTooltipsContainerComponent, DonutCenterTemplateDirective, DragEndEvent, DragEvent, DragStartEvent, DrilldownEvent, InstanceEventService, LegendComponent, LegendInactiveItemsComponent, LegendItemClickEvent, LegendItemComponent, LegendItemHoverEvent, LegendItemLeaveEvent, LocalizedMessagesDirective, NavigatorCategoryAxisComponent, NavigatorCategoryAxisCrosshairComponent, NavigatorCategoryAxisCrosshairTooltipComponent, NavigatorCategoryAxisLabelsComponent, NavigatorCategoryAxisNotesComponent, NavigatorCategoryAxisNotesIconComponent, NavigatorCategoryAxisNotesLabelComponent, NavigatorCategoryAxisSelectComponent, NavigatorCategoryAxisTitleComponent, NavigatorComponent, NavigatorFilterEvent, NavigatorHintComponent, NavigatorPaneComponent, NavigatorPaneTitleComponent, NavigatorSelectComponent, NavigatorSeriesComponent, NavigatorSeriesErrorBarsComponent, NavigatorSeriesExtremesComponent, NavigatorSeriesHighlightComponent, NavigatorSeriesItemComponent, NavigatorSeriesLabelsComponent, NavigatorSeriesLabelsFromComponent, NavigatorSeriesLabelsToComponent, NavigatorSeriesMarkersComponent, NavigatorSeriesNotesComponent, NavigatorSeriesNotesIconComponent, NavigatorSeriesNotesLabelComponent, NavigatorSeriesOutliersComponent, NavigatorSeriesTooltipComponent, NoteClickEvent, NoteHoverEvent, PaneComponent, PaneDefaultsComponent, PaneDefaultsTitleComponent, PaneRenderEvent, PanesComponent, PanesTitleComponent, PlotAreaClickEvent, PlotAreaComponent, PlotAreaHoverEvent, RenderEvent, SANKEY_DIRECTIVES, SANKEY_EXPORTS, SPARKLINE_DIRECTIVES, STOCK_CHART_DIRECTIVES, SankeyBaseEvent, SankeyComponent, SankeyCustomMessagesComponent, SankeyFlatBindingDataBoundEvent, SankeyFlatBindingDirective, SankeyLabelsComponent, SankeyLegendComponent, SankeyLinkEvent, SankeyLinkTooltipTemplateDirective, SankeyLinksComponent, SankeyModule, SankeyNodeEvent, SankeyNodeTooltipTemplateDirective, SankeyNodesComponent, SankeyTitleComponent, SankeyTooltipComponent, SankeyTooltipPopupComponent, SelectEndEvent, SelectEvent, SelectStartEvent, SeriesClickEvent, SeriesComponent, SeriesDefaultsComponent, SeriesDefaultsLabelsComponent, SeriesDefaultsLabelsFromComponent, SeriesDefaultsLabelsToComponent, SeriesDefaultsNotesComponent, SeriesDefaultsNotesIconComponent, SeriesDefaultsNotesLabelComponent, SeriesDefaultsTooltipComponent, SeriesDrilldownTemplateDirective, SeriesErrorBarsComponent, SeriesExtremesComponent, SeriesHighlightComponent, SeriesHoverEvent, SeriesItemComponent, SeriesLabelsComponent, SeriesLabelsFromComponent, SeriesLabelsToComponent, SeriesMarkersComponent, SeriesNotesComponent, SeriesNotesIconComponent, SeriesNotesLabelComponent, SeriesOutliersComponent, SeriesTooltipComponent, SeriesTooltipTemplateDirective, SeriesTrendlineComponent, SeriesTrendlineForecastComponent, SharedTooltipTemplateDirective, SparklineComponent, SparklineModule, StockChartComponent, StockChartModule, SubtitleComponent, TitleComponent, TooltipComponent, TooltipPopupComponent, TooltipTemplateService, ValueAxisComponent, ValueAxisCrosshairComponent, ValueAxisCrosshairTooltipComponent, ValueAxisItemComponent, ValueAxisLabelsComponent, ValueAxisNotesComponent, ValueAxisNotesIconComponent, ValueAxisNotesLabelComponent, ValueAxisTitleComponent, WeekStartDay, XAxisComponent, XAxisCrosshairComponent, XAxisCrosshairTooltipComponent, XAxisItemComponent, XAxisLabelsComponent, XAxisNotesComponent, XAxisNotesIconComponent, XAxisNotesLabelComponent, XAxisTitleComponent, YAxisComponent, YAxisCrosshairComponent, YAxisCrosshairTooltipComponent, YAxisItemComponent, YAxisLabelsComponent, YAxisNotesComponent, YAxisNotesIconComponent, YAxisNotesLabelComponent, YAxisTitleComponent, ZoomEndEvent, ZoomEvent, ZoomStartEvent, ZoomableComponent };
|
|
7877
9197
|
|