@progress/kendo-charts 2.3.0-dev.202404191639 → 2.3.0-dev.202404241357

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.
@@ -25,7 +25,13 @@ export interface SankeyLinkHighlight {
25
25
  * @default `{ top: 0, left: 0 }`
26
26
  */
27
27
  export interface SankeyOffset {
28
+ /**
29
+ * The left offset of the element.
30
+ */
28
31
  left?: number;
32
+ /**
33
+ * The top offset of the element.
34
+ */
29
35
  top?: number;
30
36
  }
31
37
 
@@ -74,6 +80,39 @@ export interface SankeyLink {
74
80
  highlight?: SankeyLinkHighlight;
75
81
  }
76
82
 
83
+ /**
84
+ * Represents the horizontal margin of a Sankey element.
85
+ */
86
+ export interface SankeyHorizontalMargin extends Pick<Margin, 'left' | 'right'> { }
87
+
88
+ /**
89
+ * Represents the stroke options of the Sankey label.
90
+ */
91
+ export interface SankeyLabelStroke {
92
+ /**
93
+ * The stroke color of the label.
94
+ * Accepts a valid CSS color string, including hex and rgb.
95
+ */
96
+ color?: string;
97
+ /**
98
+ * The stroke width of the label.
99
+ *
100
+ * @default 1
101
+ */
102
+ width?: number;
103
+ /**
104
+ * The line join option of the label.
105
+ *
106
+ * The supported values are:
107
+ * * `round`&mdash;The outer corners of the stroke will be rounded.
108
+ * * `bevel`&mdash;The outer corners of the stroke will be beveled.
109
+ * * `miter`&mdash;The outer corners of the stroke will be squared off.
110
+ *
111
+ * @default 'round'
112
+ */
113
+ lineJoin?: 'round' | 'bevel' | 'miter';
114
+ }
115
+
77
116
  /**
78
117
  * Represents the labels options of the Sankey widget.
79
118
  */
@@ -96,12 +135,6 @@ export interface SankeyLabel {
96
135
  * The color of the label.
97
136
  */
98
137
  color?: string;
99
- /**
100
- * The opacity of the label.
101
- *
102
- * @default 1
103
- */
104
- opacity?: number;
105
138
  /**
106
139
  * The alignment of the label.
107
140
  *
@@ -130,10 +163,7 @@ export interface SankeyLabel {
130
163
  *
131
164
  * @default `{ left: 8, right: 8 }`
132
165
  */
133
- margin?: {
134
- left?: number;
135
- right?: number;
136
- };
166
+ margin?: SankeyHorizontalMargin;
137
167
  /**
138
168
  * The border of the label.
139
169
  *
@@ -152,11 +182,7 @@ export interface SankeyLabel {
152
182
  *
153
183
  * @default `{ width: 1, lineJoin: 'round' }`
154
184
  */
155
- stroke?: {
156
- color?: string;
157
- width?: number;
158
- lineJoin?: 'round' | 'bevel' | 'miter';
159
- };
185
+ stroke?: SankeyLabelStroke;
160
186
  }
161
187
 
162
188
  /**
@@ -263,6 +289,55 @@ export interface SankeyTitle {
263
289
  */
264
290
  interface LegendTitle extends Omit<SankeyTitle, 'description'> { }
265
291
 
292
+ /**
293
+ * Represents the legend item options of the Sankey widget.
294
+ */
295
+ export interface SankeyLegendItem {
296
+ /**
297
+ * The background color of the legend item square element. Accepts a valid CSS color string, including HEX and RGB.
298
+ * Defaults to the corresponding node color.
299
+ */
300
+ areaBackground?: string;
301
+ /**
302
+ * The opacity of the legend item square element.
303
+ * Defaults to the corresponding node opacity.
304
+ */
305
+ areaOpacity?: number;
306
+ /**
307
+ * The [cursor style](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor) of the legend item.
308
+ */
309
+ cursor?: string;
310
+ /**
311
+ * A function that can be used to create a custom visual for the legend items. The available argument fields are:
312
+ *
313
+ * * `options`&mdash;The options of the legend item.
314
+ * * `createVisual`&mdash;A function for getting the default visual.
315
+ */
316
+ visual?: (args: { options: any; createVisual: () => Group }) => Group;
317
+ }
318
+
319
+ /**
320
+ * Represents the legend label options of the Sankey widget.
321
+ */
322
+ export interface SankeyLegendLabel {
323
+ /**
324
+ * The color of the legend item label.
325
+ */
326
+ color?: string;
327
+ /**
328
+ * The font of the legend item label.
329
+ */
330
+ font?: string;
331
+ /**
332
+ * The margin of the legend item label.
333
+ */
334
+ margin?: Margin | number;
335
+ /**
336
+ * The padding of the legend item label.
337
+ */
338
+ padding?: Padding | number;
339
+ }
340
+
266
341
  /**
267
342
  * Represents the legend options of the Sankey widget.
268
343
  */
@@ -286,21 +361,11 @@ export interface SankeyLegend {
286
361
  /**
287
362
  * The item options of the legend. The item options apply to the legend items and will override the default options.
288
363
  */
289
- item?: {
290
- areaBackground?: string;
291
- areaOpacity?: number;
292
- cursor?: string;
293
- visual?: any;
294
- };
364
+ item?: SankeyLegendItem;
295
365
  /**
296
366
  * The labels options of the legend.
297
367
  */
298
- labels?: {
299
- color?: string;
300
- font?: string;
301
- margin?: Margin | number;
302
- padding?: Padding | number;
303
- };
368
+ labels?: SankeyLegendLabel;
304
369
  /**
305
370
  * The margin of the legend.
306
371
  */
@@ -397,24 +462,63 @@ export interface SankeyLabelDefaults extends Omit<SankeyLabel, 'text'> { }
397
462
  */
398
463
  export interface SankeyNodeDefaults extends Omit<SankeyNode, 'id' | 'label'> { }
399
464
 
465
+ /**
466
+ * Represents the Sankey data object.
467
+ */
468
+ export interface SankeyData {
469
+ /**
470
+ * The links of the Sankey. The links are the connections between the nodes.
471
+ * Each link has a `sourceId` and `targetId` that correspond to the id of the source and target nodes, and a `value` that represents the value of the link.
472
+ */
473
+ links: SankeyLink[];
474
+ /**
475
+ * The nodes of the Sankey. The nodes are the elements that are connected by the links.
476
+ * Each node has an `id` that is used to connect the nodes with the links.
477
+ */
478
+ nodes: SankeyNode[];
479
+ }
480
+
400
481
  /**
401
482
  * Sankey options.
402
483
  */
403
484
  export interface SankeyOptions {
404
- data: {
405
- links: SankeyLink[];
406
- nodes: SankeyNode[];
407
- };
408
-
485
+ /**
486
+ * The data of the Sankey. The data object contains the Sankey nodes and links configuration.
487
+ */
488
+ data: SankeyData;
489
+ /**
490
+ * The default label options of the Sankey.
491
+ */
409
492
  labels?: SankeyLabelDefaults;
493
+ /**
494
+ * The default link options of the Sankey.
495
+ */
410
496
  links?: SankeyLinkDefaults;
497
+ /**
498
+ * The default node options of the Sankey.
499
+ */
411
500
  nodes?: SankeyNodeDefaults;
501
+ /**
502
+ * If set to `true`, the Sankey will not automatically reorder the nodes to reduce the number of links that cross over each other.
503
+ */
412
504
  disableAutoLayout?: boolean;
505
+ /**
506
+ * The Sankey title configuration options.
507
+ */
413
508
  title?: SankeyTitle;
509
+ /**
510
+ * The legend configuration options of the Sankey.
511
+ */
414
512
  legend?: SankeyLegend;
513
+ /**
514
+ * The tooltip configuration options of the Sankey.
515
+ */
415
516
  tooltip?: SankeyTooltip;
416
517
  }
417
518
 
519
+ /**
520
+ * @hidden
521
+ */
418
522
  export interface SankeyTheme {
419
523
  labels?: SankeyLabelDefaults;
420
524
  links?: SankeyLinkDefaults;
@@ -489,14 +593,38 @@ export interface SankeyEvent {
489
593
  isDefaultPrevented(): boolean;
490
594
  }
491
595
 
492
- export interface SankeyLinkDataItem extends SankeyLink {
596
+ /**
597
+ * Represents the Sankey dataItem of the link element.
598
+ */
599
+ export interface SankeyLinkDataItem {
600
+ /**
601
+ * The source node dataItem.
602
+ */
493
603
  source: SankeyNodeDataItem;
604
+ /**
605
+ * The target node dataItem.
606
+ */
494
607
  target: SankeyNodeDataItem;
608
+ /**
609
+ * The value of the link.
610
+ */
611
+ value: number;
495
612
  }
496
613
 
614
+ /**
615
+ * Represents the Sankey dataItem of the node element.
616
+ */
497
617
  export interface SankeyNodeDataItem extends SankeyNode {
498
- sourceLinks: SankeyLinkDataItem[];
499
- targetLinks: SankeyLinkDataItem[];
618
+ /**
619
+ * The source links that are connected to the node.
620
+ * Contains the `sourceId`, `targetId` and `value` of the links.
621
+ */
622
+ sourceLinks: SankeyLink[];
623
+ /**
624
+ * The target links that are connected to the node.
625
+ * Contains the `sourceId`, `targetId` and `value` of the links.
626
+ */
627
+ targetLinks: SankeyLink[];
500
628
  }
501
629
 
502
630
  /**