@progress/kendo-angular-charts 15.5.0 → 16.0.0-develop.2
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
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, NgZone, Output, Renderer2, ViewChild, } from '@angular/core';
|
|
6
|
+
import { isDocumentAvailable, shouldShowValidationUI } from '@progress/kendo-angular-common';
|
|
7
|
+
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
+
import { exportImage, exportSVG } from '@progress/kendo-drawing';
|
|
9
|
+
import { validatePackage } from '@progress/kendo-licensing';
|
|
10
|
+
import { combineLatest } from 'rxjs';
|
|
11
|
+
import { auditTime, tap } from 'rxjs/operators';
|
|
12
|
+
import { ConfigurationService, THROTTLE_MS } from './common/configuration.service';
|
|
13
|
+
import { copyChanges } from './common/copy-changes';
|
|
14
|
+
import { ThemeService } from './common/theme.service';
|
|
15
|
+
import { toSimpleChanges } from './common/to-simple-changes';
|
|
16
|
+
import { packageMetadata } from './package-metadata';
|
|
17
|
+
import { InstanceEventService } from './sankey/events';
|
|
18
|
+
import { Sankey, } from '@progress/kendo-charts';
|
|
19
|
+
import { hasObservers } from './common/has-observers';
|
|
20
|
+
import { SankeyTooltipPopupComponent } from './sankey/tooltip/tooltip-popup.component';
|
|
21
|
+
import { SankeyTooltipTemplateService } from './sankey/tooltip/tooltip-template.service';
|
|
22
|
+
import * as i0 from "@angular/core";
|
|
23
|
+
import * as i1 from "./common/configuration.service";
|
|
24
|
+
import * as i2 from "./common/theme.service";
|
|
25
|
+
import * as i3 from "@progress/kendo-angular-l10n";
|
|
26
|
+
import * as i4 from "./sankey/events";
|
|
27
|
+
import * as i5 from "./sankey/tooltip/tooltip-popup.component";
|
|
28
|
+
import * as i6 from "@progress/kendo-angular-common";
|
|
29
|
+
import * as i7 from "./sankey/localization/localized-messages.directive";
|
|
30
|
+
import * as i8 from "@angular/common";
|
|
31
|
+
/**
|
|
32
|
+
* The Sankey diagram component.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* import { Component } from '@angular/core';
|
|
37
|
+
*
|
|
38
|
+
* _@Component({
|
|
39
|
+
* selector: 'my-app',
|
|
40
|
+
* template: `
|
|
41
|
+
* <kendo-sankey [data]="data">
|
|
42
|
+
* </kendo-sankey>
|
|
43
|
+
* `,
|
|
44
|
+
* })
|
|
45
|
+
* export class AppComponent {
|
|
46
|
+
* public data: SankeyData = {
|
|
47
|
+
* nodes: [
|
|
48
|
+
* { id: 1, label: { text: 'Linux' } },
|
|
49
|
+
* { id: 0, label: { text: 'iOS'} },
|
|
50
|
+
* { id: 2, label: { text: 'Mobile' } },
|
|
51
|
+
* { id: 3, label: { text: 'Desktop' } },
|
|
52
|
+
* ],
|
|
53
|
+
* links: [
|
|
54
|
+
* { sourceId: 0, targetId: 2, value: 1 },
|
|
55
|
+
* { sourceId: 1, targetId: 2, value: 2 },
|
|
56
|
+
* { sourceId: 1, targetId: 3, value: 3 },
|
|
57
|
+
* ],
|
|
58
|
+
* };
|
|
59
|
+
* }
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export class SankeyComponent {
|
|
63
|
+
constructor(element, configurationService, themeService, localizationService, instanceEventService, ngZone, changeDetector, renderer) {
|
|
64
|
+
this.element = element;
|
|
65
|
+
this.configurationService = configurationService;
|
|
66
|
+
this.themeService = themeService;
|
|
67
|
+
this.localizationService = localizationService;
|
|
68
|
+
this.instanceEventService = instanceEventService;
|
|
69
|
+
this.ngZone = ngZone;
|
|
70
|
+
this.changeDetector = changeDetector;
|
|
71
|
+
this.renderer = renderer;
|
|
72
|
+
/**
|
|
73
|
+
* Fires when the mouse pointer enters a node. Similar to the `mouseenter` event.
|
|
74
|
+
*/
|
|
75
|
+
this.nodeEnter = new EventEmitter();
|
|
76
|
+
/**
|
|
77
|
+
* Fires when the mouse pointer leaves a node. Similar to the `mouseleave` event.
|
|
78
|
+
*/
|
|
79
|
+
this.nodeLeave = new EventEmitter();
|
|
80
|
+
/**
|
|
81
|
+
* Fires when a node is clicked.
|
|
82
|
+
*/
|
|
83
|
+
this.nodeClick = new EventEmitter();
|
|
84
|
+
/**
|
|
85
|
+
* Fires when the mouse pointer enters a link. Similar to the `mouseenter` event,
|
|
86
|
+
*/
|
|
87
|
+
this.linkEnter = new EventEmitter();
|
|
88
|
+
/**
|
|
89
|
+
* Fires when the mouse pointer leaves a link. Similar to the `mouseleave` event.
|
|
90
|
+
*/
|
|
91
|
+
this.linkLeave = new EventEmitter();
|
|
92
|
+
/**
|
|
93
|
+
* Fires when a link is clicked.
|
|
94
|
+
*/
|
|
95
|
+
this.linkClick = new EventEmitter();
|
|
96
|
+
/**
|
|
97
|
+
* @hidden
|
|
98
|
+
*/
|
|
99
|
+
this.showLicenseWatermark = false;
|
|
100
|
+
this.rtl = false;
|
|
101
|
+
const isValid = validatePackage(packageMetadata);
|
|
102
|
+
this.showLicenseWatermark = shouldShowValidationUI(isValid);
|
|
103
|
+
this.themeService.loadTheme();
|
|
104
|
+
this.refreshWait();
|
|
105
|
+
}
|
|
106
|
+
ngOnChanges(changes) {
|
|
107
|
+
const store = this.configurationService.store;
|
|
108
|
+
copyChanges(changes, store);
|
|
109
|
+
store.popupSettings = null;
|
|
110
|
+
this.configurationService.push(store);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Updates the component fields with the specified values and refreshes the widget.
|
|
114
|
+
*
|
|
115
|
+
* Use this method when the configuration values cannot be set through the template.
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```ts-no-run
|
|
119
|
+
* sankey.notifyChanges({ title: { text: 'New Title' } });
|
|
120
|
+
* ```
|
|
121
|
+
*
|
|
122
|
+
* @param changes An object containing the updated input fields.
|
|
123
|
+
*/
|
|
124
|
+
notifyChanges(changes) {
|
|
125
|
+
this.ngOnChanges(toSimpleChanges(changes));
|
|
126
|
+
}
|
|
127
|
+
ngOnDestroy() {
|
|
128
|
+
this.destroyed = true;
|
|
129
|
+
if (this.optionsChange) {
|
|
130
|
+
this.optionsChange.unsubscribe();
|
|
131
|
+
}
|
|
132
|
+
if (this.instance) {
|
|
133
|
+
this.instance.destroy();
|
|
134
|
+
this.instance = null;
|
|
135
|
+
}
|
|
136
|
+
if (this.subscriptions) {
|
|
137
|
+
this.subscriptions.unsubscribe();
|
|
138
|
+
}
|
|
139
|
+
clearTimeout(this.redrawTimeout);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* @hidden
|
|
143
|
+
*/
|
|
144
|
+
messageFor(key) {
|
|
145
|
+
return this.localizationService.get(key);
|
|
146
|
+
}
|
|
147
|
+
createInstance(element) {
|
|
148
|
+
this.instance = new Sankey(element, this.options, this.theme);
|
|
149
|
+
['nodeEnter', 'nodeLeave', 'nodeClick', 'linkEnter', 'linkLeave', 'linkClick'].forEach((eventName) => this.instance.bind(eventName, (e) => this.trigger(eventName, e)));
|
|
150
|
+
this.instance.bind('tooltipShow', (e) => this.onShowTooltip(e));
|
|
151
|
+
this.instance.bind('tooltipHide', () => this.onHideTooltip());
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Exports the Sankey diagram as an image. The export operation is asynchronous and returns a promise.
|
|
155
|
+
*
|
|
156
|
+
* @param {ImageExportOptions} options - The parameters for the exported image.
|
|
157
|
+
* @returns {Promise<string>} - A promise that will be resolved with a PNG image encoded as a Data URI.
|
|
158
|
+
*/
|
|
159
|
+
exportImage(options = {}) {
|
|
160
|
+
return exportImage(this.exportVisual(options), options);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Exports the Sankey diagram as an SVG document. The export operation is asynchronous and returns a promise.
|
|
164
|
+
*
|
|
165
|
+
* @param options - The parameters for the exported file.
|
|
166
|
+
* @returns - A promise that will be resolved with an SVG document that is encoded as a Data URI.
|
|
167
|
+
*/
|
|
168
|
+
exportSVG(options = {}) {
|
|
169
|
+
return exportSVG(this.exportVisual(options), options);
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Exports the visual of the Sankey component to a drawing group.
|
|
173
|
+
*
|
|
174
|
+
* @param options - The parameters for the export operation.
|
|
175
|
+
* @returns - The root Group of the scene.
|
|
176
|
+
*/
|
|
177
|
+
exportVisual(options = {}) {
|
|
178
|
+
return this.instance.exportVisual(options);
|
|
179
|
+
}
|
|
180
|
+
init() {
|
|
181
|
+
if (!this.canRender) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
const element = this.instanceElement.nativeElement;
|
|
185
|
+
this.createInstance(element);
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Reloads the Sankey appearance settings from the current [Kendo UI Theme]({% slug themesandstyles %}).
|
|
189
|
+
*
|
|
190
|
+
* Call this method after loading a different theme stylesheet.
|
|
191
|
+
*/
|
|
192
|
+
reloadTheme() {
|
|
193
|
+
if (!this.instance) {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
this.themeService.reset();
|
|
197
|
+
this.instance.destroy();
|
|
198
|
+
this.instance = null;
|
|
199
|
+
}
|
|
200
|
+
onShowTooltip(e) {
|
|
201
|
+
this.run(() => {
|
|
202
|
+
this.tooltipInstance.show(e);
|
|
203
|
+
}, true, true);
|
|
204
|
+
}
|
|
205
|
+
onHideTooltip() {
|
|
206
|
+
if (this.tooltipInstance.active) {
|
|
207
|
+
this.tooltipInstance.hide();
|
|
208
|
+
this.detectChanges();
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
trigger(name, e) {
|
|
212
|
+
const emitter = this.activeEmitter(name);
|
|
213
|
+
if (emitter) {
|
|
214
|
+
const args = this.instanceEventService.create(name, e, this);
|
|
215
|
+
this.run(() => {
|
|
216
|
+
emitter.emit(args);
|
|
217
|
+
});
|
|
218
|
+
return args.isDefaultPrevented && args.isDefaultPrevented();
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
requiresHandlers(names) {
|
|
222
|
+
for (let idx = 0; idx < names.length; idx++) {
|
|
223
|
+
if (this.activeEmitter(names[idx])) {
|
|
224
|
+
return true;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return false;
|
|
228
|
+
}
|
|
229
|
+
refresh() {
|
|
230
|
+
clearTimeout(this.redrawTimeout);
|
|
231
|
+
if (!this.instance) {
|
|
232
|
+
this.init();
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
this.updateOptions();
|
|
236
|
+
}
|
|
237
|
+
updateOptions() {
|
|
238
|
+
this.instance.setOptions(this.options);
|
|
239
|
+
}
|
|
240
|
+
get canRender() {
|
|
241
|
+
return isDocumentAvailable() && Boolean(this.instanceElement);
|
|
242
|
+
}
|
|
243
|
+
activeEmitter(name) {
|
|
244
|
+
const emitter = this[name];
|
|
245
|
+
if (emitter && emitter.emit && hasObservers(emitter)) {
|
|
246
|
+
return emitter;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
refreshWait() {
|
|
250
|
+
this.ngZone.runOutsideAngular(() => {
|
|
251
|
+
this.optionsChange = combineLatest([this.configurationService.onChange$, this.themeService.onChange$])
|
|
252
|
+
.pipe(tap((result) => {
|
|
253
|
+
this.options = result[0];
|
|
254
|
+
this.theme = this.loadTheme(result[1]);
|
|
255
|
+
}), auditTime(THROTTLE_MS))
|
|
256
|
+
.subscribe(() => {
|
|
257
|
+
this.refresh();
|
|
258
|
+
});
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
loadTheme(chartTheme) {
|
|
262
|
+
return {
|
|
263
|
+
...chartTheme,
|
|
264
|
+
nodeColors: chartTheme.seriesColors,
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
run(callback, inZone = true, detectChanges) {
|
|
268
|
+
if (inZone) {
|
|
269
|
+
if (detectChanges) {
|
|
270
|
+
this.changeDetector.markForCheck();
|
|
271
|
+
}
|
|
272
|
+
this.ngZone.run(callback);
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
callback();
|
|
276
|
+
if (detectChanges) {
|
|
277
|
+
this.detectChanges();
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
detectChanges() {
|
|
282
|
+
if (!this.destroyed) {
|
|
283
|
+
this.changeDetector.detectChanges();
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
SankeyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyComponent, deps: [{ token: i0.ElementRef }, { token: i1.ConfigurationService }, { token: i2.ThemeService }, { token: i3.LocalizationService }, { token: i4.InstanceEventService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
288
|
+
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: [
|
|
289
|
+
ConfigurationService,
|
|
290
|
+
LocalizationService,
|
|
291
|
+
InstanceEventService,
|
|
292
|
+
SankeyTooltipTemplateService,
|
|
293
|
+
{
|
|
294
|
+
provide: L10N_PREFIX,
|
|
295
|
+
useValue: 'kendo.sankey',
|
|
296
|
+
},
|
|
297
|
+
], 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: `
|
|
298
|
+
<ng-container
|
|
299
|
+
kendoSankeyLocalizedMessages
|
|
300
|
+
i18n-tooltipUnitFormat="kendo.sankey.tooltipUnitFormat|The format string to use when displaying node and link values in the tooltip"
|
|
301
|
+
tooltipUnitFormat="({0} units)"
|
|
302
|
+
></ng-container>
|
|
303
|
+
<div #instance></div>
|
|
304
|
+
<kendo-sankey-tooltip-popup
|
|
305
|
+
[popupSettings]="popupSettings"
|
|
306
|
+
[tooltipUnitFormat]="messageFor('tooltipUnitFormat')"
|
|
307
|
+
>
|
|
308
|
+
</kendo-sankey-tooltip-popup>
|
|
309
|
+
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
|
310
|
+
`, isInline: true, components: [{ type: i5.SankeyTooltipPopupComponent, selector: "kendo-sankey-tooltip-popup", inputs: ["animate", "popupSettings", "wrapperClass", "tooltipUnitFormat", "offset"] }, { type: i6.WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]" }], directives: [{ type: i7.LocalizedMessagesDirective, selector: "[kendoSankeyLocalizedMessages]" }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyComponent, decorators: [{
|
|
312
|
+
type: Component,
|
|
313
|
+
args: [{
|
|
314
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
315
|
+
exportAs: 'kendoSankey',
|
|
316
|
+
providers: [
|
|
317
|
+
ConfigurationService,
|
|
318
|
+
LocalizationService,
|
|
319
|
+
InstanceEventService,
|
|
320
|
+
SankeyTooltipTemplateService,
|
|
321
|
+
{
|
|
322
|
+
provide: L10N_PREFIX,
|
|
323
|
+
useValue: 'kendo.sankey',
|
|
324
|
+
},
|
|
325
|
+
],
|
|
326
|
+
selector: 'kendo-sankey',
|
|
327
|
+
template: `
|
|
328
|
+
<ng-container
|
|
329
|
+
kendoSankeyLocalizedMessages
|
|
330
|
+
i18n-tooltipUnitFormat="kendo.sankey.tooltipUnitFormat|The format string to use when displaying node and link values in the tooltip"
|
|
331
|
+
tooltipUnitFormat="({0} units)"
|
|
332
|
+
></ng-container>
|
|
333
|
+
<div #instance></div>
|
|
334
|
+
<kendo-sankey-tooltip-popup
|
|
335
|
+
[popupSettings]="popupSettings"
|
|
336
|
+
[tooltipUnitFormat]="messageFor('tooltipUnitFormat')"
|
|
337
|
+
>
|
|
338
|
+
</kendo-sankey-tooltip-popup>
|
|
339
|
+
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
|
340
|
+
`,
|
|
341
|
+
}]
|
|
342
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.ConfigurationService }, { type: i2.ThemeService }, { type: i3.LocalizationService }, { type: i4.InstanceEventService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; }, propDecorators: { data: [{
|
|
343
|
+
type: Input
|
|
344
|
+
}], links: [{
|
|
345
|
+
type: Input
|
|
346
|
+
}], nodes: [{
|
|
347
|
+
type: Input
|
|
348
|
+
}], labels: [{
|
|
349
|
+
type: Input
|
|
350
|
+
}], title: [{
|
|
351
|
+
type: Input
|
|
352
|
+
}], legend: [{
|
|
353
|
+
type: Input
|
|
354
|
+
}], tooltip: [{
|
|
355
|
+
type: Input
|
|
356
|
+
}], disableAutoLayout: [{
|
|
357
|
+
type: Input
|
|
358
|
+
}], popupSettings: [{
|
|
359
|
+
type: Input
|
|
360
|
+
}], nodeEnter: [{
|
|
361
|
+
type: Output
|
|
362
|
+
}], nodeLeave: [{
|
|
363
|
+
type: Output
|
|
364
|
+
}], nodeClick: [{
|
|
365
|
+
type: Output
|
|
366
|
+
}], linkEnter: [{
|
|
367
|
+
type: Output
|
|
368
|
+
}], linkLeave: [{
|
|
369
|
+
type: Output
|
|
370
|
+
}], linkClick: [{
|
|
371
|
+
type: Output
|
|
372
|
+
}], tooltipInstance: [{
|
|
373
|
+
type: ViewChild,
|
|
374
|
+
args: [SankeyTooltipPopupComponent, { static: true }]
|
|
375
|
+
}], instanceElement: [{
|
|
376
|
+
type: ViewChild,
|
|
377
|
+
args: ['instance', { static: true }]
|
|
378
|
+
}] } });
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { SankeyComponent } from './sankey.component';
|
|
6
|
+
import { SankeyFlatBindingDirective } from './sankey/data-binding/flat-binding.directive';
|
|
7
|
+
import { SankeyFlatBindingDataBoundEvent } from './sankey/data-binding/flat-binding.event';
|
|
8
|
+
import { SankeyLabelsComponent } from './sankey/labels.component';
|
|
9
|
+
import { SankeyLegendComponent } from './sankey/legend.component';
|
|
10
|
+
import { SankeyLinksComponent } from './sankey/links.component';
|
|
11
|
+
import { SankeyCustomMessagesComponent } from './sankey/localization/custom-messages.component';
|
|
12
|
+
import { LocalizedMessagesDirective } from './sankey/localization/localized-messages.directive';
|
|
13
|
+
import { SankeyNodesComponent } from './sankey/nodes.component';
|
|
14
|
+
import { SankeyTitleComponent } from './sankey/title.component';
|
|
15
|
+
import { SankeyTooltipComponent } from './sankey/tooltip.component';
|
|
16
|
+
import { SankeyLinkTooltipTemplateDirective } from './sankey/tooltip/link-tooltip-template.directive';
|
|
17
|
+
import { SankeyNodeTooltipTemplateDirective } from './sankey/tooltip/node-tooltip-template.directive';
|
|
18
|
+
import { SquareSymbol } from './sankey/tooltip/square-symbol.directive';
|
|
19
|
+
import { SankeyTooltipPopupComponent } from './sankey/tooltip/tooltip-popup.component';
|
|
20
|
+
// Re-exports
|
|
21
|
+
export { SankeyComponent, SankeyTooltipPopupComponent, SankeyLinkTooltipTemplateDirective, SankeyNodeTooltipTemplateDirective, SankeyCustomMessagesComponent, LocalizedMessagesDirective, SankeyTitleComponent, SankeyLegendComponent, SankeyTooltipComponent, SankeyLinksComponent, SankeyNodesComponent, SankeyLabelsComponent, SankeyFlatBindingDirective, SankeyFlatBindingDataBoundEvent };
|
|
22
|
+
/**
|
|
23
|
+
* @hidden
|
|
24
|
+
*/
|
|
25
|
+
export const SANKEY_EXPORTS = [
|
|
26
|
+
SankeyComponent,
|
|
27
|
+
SankeyTooltipPopupComponent,
|
|
28
|
+
SankeyLinkTooltipTemplateDirective,
|
|
29
|
+
SankeyNodeTooltipTemplateDirective,
|
|
30
|
+
SankeyCustomMessagesComponent,
|
|
31
|
+
LocalizedMessagesDirective,
|
|
32
|
+
SankeyTitleComponent,
|
|
33
|
+
SankeyLegendComponent,
|
|
34
|
+
SankeyTooltipComponent,
|
|
35
|
+
SankeyLinksComponent,
|
|
36
|
+
SankeyNodesComponent,
|
|
37
|
+
SankeyLabelsComponent,
|
|
38
|
+
SankeyFlatBindingDirective
|
|
39
|
+
];
|
|
40
|
+
/**
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
43
|
+
export const SANKEY_DIRECTIVES = [
|
|
44
|
+
...SANKEY_EXPORTS,
|
|
45
|
+
SquareSymbol
|
|
46
|
+
];
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { CommonModule } from '@angular/common';
|
|
6
|
+
import { NgModule } from '@angular/core';
|
|
7
|
+
import { ResizeSensorModule, WatermarkModule } from '@progress/kendo-angular-common';
|
|
8
|
+
import { IconsModule } from '@progress/kendo-angular-icons';
|
|
9
|
+
import { PopupModule } from '@progress/kendo-angular-popup';
|
|
10
|
+
import { ThemeService } from './common/theme.service';
|
|
11
|
+
import { SANKEY_DIRECTIVES, SANKEY_EXPORTS } from './sankey.directives';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
import * as i1 from "./sankey.component";
|
|
14
|
+
import * as i2 from "./sankey/tooltip/tooltip-popup.component";
|
|
15
|
+
import * as i3 from "./sankey/tooltip/link-tooltip-template.directive";
|
|
16
|
+
import * as i4 from "./sankey/tooltip/node-tooltip-template.directive";
|
|
17
|
+
import * as i5 from "./sankey/localization/custom-messages.component";
|
|
18
|
+
import * as i6 from "./sankey/localization/localized-messages.directive";
|
|
19
|
+
import * as i7 from "./sankey/title.component";
|
|
20
|
+
import * as i8 from "./sankey/legend.component";
|
|
21
|
+
import * as i9 from "./sankey/tooltip.component";
|
|
22
|
+
import * as i10 from "./sankey/links.component";
|
|
23
|
+
import * as i11 from "./sankey/nodes.component";
|
|
24
|
+
import * as i12 from "./sankey/labels.component";
|
|
25
|
+
import * as i13 from "./sankey/data-binding/flat-binding.directive";
|
|
26
|
+
import * as i14 from "./sankey/tooltip/square-symbol.directive";
|
|
27
|
+
/**
|
|
28
|
+
* A [module](link:site.data.urls.angular['ngmoduleapi']) that includes the Sparkline component and directives.
|
|
29
|
+
*
|
|
30
|
+
* Imports the SparklineModule into your application
|
|
31
|
+
* [root module](link:site.data.urls.angular['ngmodules']#angular-modularity) or any other sub-module
|
|
32
|
+
* that will use the Sparkline component.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts-no-run
|
|
36
|
+
* import { NgModule } from '@angular/core';
|
|
37
|
+
* import { BrowserModule } from '@angular/platform-browser';
|
|
38
|
+
* import { SparklineModule } from '@progress/kendo-angular-charts';
|
|
39
|
+
* import { AppComponent } from './app.component';
|
|
40
|
+
*
|
|
41
|
+
* _@NgModule({
|
|
42
|
+
* bootstrap: [AppComponent],
|
|
43
|
+
* declarations: [AppComponent],
|
|
44
|
+
* imports: [BrowserModule, SparklineModule]
|
|
45
|
+
* })
|
|
46
|
+
* export class AppModule {
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export class SankeyModule {
|
|
51
|
+
}
|
|
52
|
+
SankeyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
53
|
+
SankeyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyModule, declarations: [i1.SankeyComponent, i2.SankeyTooltipPopupComponent, i3.SankeyLinkTooltipTemplateDirective, i4.SankeyNodeTooltipTemplateDirective, i5.SankeyCustomMessagesComponent, i6.LocalizedMessagesDirective, i7.SankeyTitleComponent, i8.SankeyLegendComponent, i9.SankeyTooltipComponent, i10.SankeyLinksComponent, i11.SankeyNodesComponent, i12.SankeyLabelsComponent, i13.SankeyFlatBindingDirective, i14.SquareSymbol], imports: [CommonModule, IconsModule, PopupModule, ResizeSensorModule, WatermarkModule], exports: [i1.SankeyComponent, i2.SankeyTooltipPopupComponent, i3.SankeyLinkTooltipTemplateDirective, i4.SankeyNodeTooltipTemplateDirective, i5.SankeyCustomMessagesComponent, i6.LocalizedMessagesDirective, i7.SankeyTitleComponent, i8.SankeyLegendComponent, i9.SankeyTooltipComponent, i10.SankeyLinksComponent, i11.SankeyNodesComponent, i12.SankeyLabelsComponent, i13.SankeyFlatBindingDirective] });
|
|
54
|
+
SankeyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyModule, providers: [ThemeService], imports: [[CommonModule, IconsModule, PopupModule, ResizeSensorModule, WatermarkModule]] });
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SankeyModule, decorators: [{
|
|
56
|
+
type: NgModule,
|
|
57
|
+
args: [{
|
|
58
|
+
declarations: [SANKEY_DIRECTIVES],
|
|
59
|
+
exports: [SANKEY_EXPORTS],
|
|
60
|
+
imports: [CommonModule, IconsModule, PopupModule, ResizeSensorModule, WatermarkModule],
|
|
61
|
+
providers: [ThemeService],
|
|
62
|
+
}]
|
|
63
|
+
}] });
|