@progress/kendo-charts 2.3.0-dev.202403071434 → 2.3.0-dev.202403191229

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.
@@ -1,4 +1,5 @@
1
1
  import { Group } from '@progress/kendo-drawing';
2
+ import { Border, Margin, Padding } from './field-types';
2
3
 
3
4
  /**
4
5
  * Represents the highlight options of the Sankey links.
@@ -143,12 +144,7 @@ export interface SankeyLabel {
143
144
  *
144
145
  * @default `{ width: 0 }`
145
146
  */
146
- border?: {
147
- width?: number;
148
- color?: string;
149
- opacity?: number;
150
- dashType?: string;
151
- };
147
+ border?: Border;
152
148
  /**
153
149
  * The offset applied to the label's position.
154
150
  *
@@ -206,6 +202,71 @@ export interface SankeyNode {
206
202
  align?: 'stretch' | 'left' | 'right';
207
203
  }
208
204
 
205
+ /**
206
+ * @hidden
207
+ */
208
+ export interface SankeyTitle {
209
+ align?: 'center' | 'left' | 'right';
210
+ background?: string;
211
+ border?: Border;
212
+ color?: string;
213
+ font?: string;
214
+ margin?: Margin | number;
215
+ padding?: Padding | number;
216
+ position?: 'top' | 'bottom';
217
+ text?: string;
218
+ visible?: boolean;
219
+ }
220
+
221
+ /**
222
+ * @hidden
223
+ */
224
+ export interface SankeyLegend {
225
+ align?: 'start' | 'center' | 'end';
226
+ background?: string;
227
+ border?: Border;
228
+ height?: number;
229
+ labels?: any;
230
+ margin?: Margin | number;
231
+ orientation?: 'vertical' | 'horizontal';
232
+ padding?: Padding | number;
233
+ position?: 'top' | 'bottom' | 'left' | 'right';
234
+ reverse?: boolean;
235
+ visible?: boolean;
236
+ width?: number;
237
+ inactiveItems?: any;
238
+ item?: any;
239
+ title?: any;
240
+ }
241
+
242
+ /**
243
+ * Represents the tooltips options of the Sankey widget.
244
+ */
245
+ export interface SankeyTooltips {
246
+ /**
247
+ * The horizontal distance between the tooltip and the mouse pointer.
248
+ * The distance is measured in pixels.
249
+ *
250
+ * @default 10
251
+ */
252
+ offset?: number;
253
+
254
+ /**
255
+ * Indicates whether the tooltip will follow the mouse pointer.
256
+ *
257
+ * @default false
258
+ */
259
+ followPointer?: boolean;
260
+
261
+ /**
262
+ * Represents the delay of the tooltip displaying.
263
+ * The delay is measured in milliseconds.
264
+ *
265
+ * @default 1000
266
+ */
267
+ delay?: number;
268
+ }
269
+
209
270
  /**
210
271
  * Represents the default link options of the Sankey widget.
211
272
  * The value will be applied to all links unless overridden by the `links` prop of the Sankey data option.
@@ -237,6 +298,9 @@ export interface SankeyOptions {
237
298
  links?: SankeyLinkDefaults;
238
299
  nodes?: SankeyNodeDefaults;
239
300
  disableAutoLayout?: boolean;
301
+ title?: SankeyTitle;
302
+ legend?: SankeyLegend;
303
+ tooltips?: SankeyTooltips;
240
304
  }
241
305
 
242
306
  export interface SankeyTheme {
@@ -269,12 +333,13 @@ export interface SankeyExportVisualOptions {
269
333
  * Represents the Kendo Sankey widget.
270
334
  */
271
335
  export class Sankey {
272
- constructor(element: Element, options: SankeyOptions, theme?: SankeyTheme);
336
+ public element: HTMLElement;
337
+ constructor(element: HTMLElement, options: SankeyOptions, theme?: SankeyTheme);
273
338
 
274
339
  public setOptions(options: SankeyOptions): void;
275
340
  public bind(event: any, handlers: any): void;
276
341
  public unbind(event?: any, handlers?: any): void;
277
- public exportVisual(options: SankeyExportVisualOptions): Group;
342
+ public exportVisual(options?: SankeyExportVisualOptions): Group;
278
343
  public destroy(): void;
279
344
  }
280
345
 
@@ -294,6 +359,10 @@ export interface SankeyEvent {
294
359
  * The event type.
295
360
  */
296
361
  type: string;
362
+ /**
363
+ * The dataItem of the related element.
364
+ */
365
+ dataItem: SankeyLinkDataItem | SankeyNodeDataItem;
297
366
  /**
298
367
  * Prevents the default action.
299
368
  */
@@ -303,3 +372,37 @@ export interface SankeyEvent {
303
372
  */
304
373
  isDefaultPrevented(): boolean;
305
374
  }
375
+
376
+ export interface SankeyLinkDataItem extends SankeyLink {
377
+ source: SankeyNodeDataItem;
378
+ target: SankeyNodeDataItem;
379
+ }
380
+
381
+ export interface SankeyNodeDataItem extends SankeyNode {
382
+ sourceLinks: SankeyLinkDataItem[];
383
+ targetLinks: SankeyLinkDataItem[];
384
+ }
385
+
386
+ /**
387
+ * Represents the Sankey `tooltipShow` event object.
388
+ */
389
+ export interface SankeyTooltipEvent extends SankeyEvent {
390
+ /**
391
+ * The tooltip data object.
392
+ */
393
+ tooltipData: {
394
+ popupOffset: { left: number, top: number };
395
+ popupAlign: { horizontal: string, vertical: string };
396
+ };
397
+
398
+ /**
399
+ * The tooltip target element type.
400
+ */
401
+ tooltipTargetType: 'node' | 'link';
402
+
403
+ /**
404
+ * The target element value.
405
+ * Available for the `node` tooltipTargetType.
406
+ */
407
+ nodeValue?: number;
408
+ }