@oliasoft-open-source/charts-library 8.0.0-beta-1 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ import { Plugin as Plugin_2 } from 'chart.js';
8
8
  import { ReactNode } from 'react';
9
9
  import { ScaleOptions } from 'chart.js';
10
10
 
11
+ /** Alignment identifiers used by chart layout and legend options. */
11
12
  export declare enum AlignOptions {
12
13
  End = "end",
13
14
  Start = "start",
@@ -16,6 +17,7 @@ export declare enum AlignOptions {
16
17
  Left = "left"
17
18
  }
18
19
 
20
+ /** Annotation shape identifiers. */
19
21
  export declare enum AnnotationType {
20
22
  Box = "box",
21
23
  Ellipse = "ellipse",
@@ -24,22 +26,65 @@ export declare enum AnnotationType {
24
26
  Label = "label"
25
27
  }
26
28
 
29
+ /** Cartesian axis identifiers. */
27
30
  export declare enum AxisType {
28
31
  X = "x",
29
32
  Y = "y"
30
33
  }
31
34
 
35
+ /**
36
+ * Renders vertical or horizontal bars with optional stacking, annotations and a legend.
37
+ *
38
+ * Pass partial configuration through `chart`; omitted settings receive component defaults.
39
+ * The example uses sample data, labels and a height of 320 pixels; these are not default values.
40
+ *
41
+ * @remarks
42
+ * Defaults: vertical bars, a top-left legend, zero included in automatic scale bounds, and annotations enabled.
43
+ * Zoom, pan, stacking and data labels are disabled. No fixed width or height is assigned.
44
+ * Performance mode is enabled by default, disabling animations.
45
+ * The linked reference lists the complete normalized default configuration.
46
+ *
47
+ * @see https://gitlab.com/oliasoft-open-source/charts-library/-/blob/master/README.md#barchart
48
+ *
49
+ * @param props - Chart data and options.
50
+ * @returns The chart canvas and its associated UI.
51
+ * @example
52
+ * ```tsx
53
+ * <BarChart chart={{
54
+ * data: {
55
+ * labels: ['A', 'B', 'C'],
56
+ * datasets: [{
57
+ * label: 'DS A',
58
+ * data: [{ x: 'A', y: 10 }, { x: 'B', y: 20 }, { x: 'C', y: 15 }],
59
+ * }],
60
+ * },
61
+ * options: {
62
+ * direction: 'vertical',
63
+ * axes: {
64
+ * x: [{ label: 'Category', position: 'bottom' }],
65
+ * y: [{ label: 'Value', position: 'left' }],
66
+ * },
67
+ * chartStyling: { height: 320 },
68
+ * legend: { display: true, position: 'top-left' },
69
+ * graph: { showDataLabels: false },
70
+ * },
71
+ * }} />
72
+ * ```
73
+ */
32
74
  export declare const BarChart: (props: IBarChartProps) => JSX.Element;
33
75
 
76
+ /** Cartesian rendering orientation; this does not select LineChart tooltip content. */
34
77
  export declare enum ChartDirection {
35
78
  VERTICAL = "vertical",
36
79
  HORIZONTAL = "horizontal"
37
80
  }
38
81
 
82
+ /** Hover interaction modes used by the library. */
39
83
  export declare enum ChartHoverMode {
40
84
  Nearest = "nearest"
41
85
  }
42
86
 
87
+ /** Chart.js chart-kind identifiers used by the library. */
43
88
  export declare enum ChartType {
44
89
  LINE = "line",
45
90
  BAR = "bar",
@@ -48,8 +93,10 @@ export declare enum ChartType {
48
93
  SCATTER = "scatter"
49
94
  }
50
95
 
96
+ /** Default categorical DS colour palette. Treat the exported array as read-only. */
51
97
  export declare const COLORS: string[];
52
98
 
99
+ /** CSS cursors used during chart interactions. */
53
100
  export declare enum CursorStyle {
54
101
  Pointer = "pointer",
55
102
  Initial = "initial",
@@ -59,16 +106,19 @@ export declare enum CursorStyle {
59
106
  Move = "move"
60
107
  }
61
108
 
109
+ /** Recursively makes object properties optional while preserving callable types and array element shapes. */
62
110
  export declare type DeepPartial<T> = T extends (...args: any[]) => any ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends object ? {
63
111
  [K in keyof T]?: DeepPartial<T[K]>;
64
112
  } : T;
65
113
 
114
+ /** Allowed axes for annotation dragging. */
66
115
  export declare enum DragAxis {
67
116
  X = "x",
68
117
  Y = "y",
69
118
  Both = "both"
70
119
  }
71
120
 
121
+ /** Annotation shape identifiers. */
72
122
  export declare enum DraggableAnnotationType {
73
123
  POINT = "point",
74
124
  BOX = "box",
@@ -77,6 +127,7 @@ export declare enum DraggableAnnotationType {
77
127
  LABEL = "label"
78
128
  }
79
129
 
130
+ /** DOM event names used by chart interaction handlers. */
80
131
  export declare enum Events {
81
132
  Mousemove = "mousemove",
82
133
  Mouseout = "mouseout",
@@ -86,8 +137,20 @@ export declare enum Events {
86
137
  Dblclick = "dblclick"
87
138
  }
88
139
 
140
+ /**
141
+ * Builds a darkest-first palette by varying LCH lightness while retaining the starting hue and chroma.
142
+ *
143
+ * @param length - Requested number of colours. Use a non-negative integer; zero returns an empty array.
144
+ * @param startingColor - Colour understood by colord. A length of one returns this string unchanged.
145
+ * @returns CSS LCH colour strings, except for the unchanged single-colour case.
146
+ * @example
147
+ * ```ts
148
+ * const colors = getGroupedColorScheme(3, '#3366cc');
149
+ * ```
150
+ */
89
151
  export declare const getGroupedColorScheme: (length: number, startingColor: string) => string[];
90
152
 
153
+ /** Direction of the background gradient between chart-area edges or corners. */
91
154
  export declare enum GradientDirection {
92
155
  TopToBottom = 0,
93
156
  BottomToTop = 1,
@@ -99,140 +162,237 @@ export declare enum GradientDirection {
99
162
  TopRightToBottomLeft = 7
100
163
  }
101
164
 
165
+ /** Annotation label options, including additional plugin-specific fields. */
102
166
  export declare interface IAnnotationLabelConfig {
167
+ /** Canvas fill colour; arrays provide per-element colours where supported. */
103
168
  backgroundColor?: string;
169
+ /** Whether this element is visible. */
104
170
  display?: boolean;
171
+ /** Visual placement of this element. */
105
172
  position?: string;
173
+ /** Canvas/CSS colour used by this element. */
106
174
  color?: string;
175
+ /** Canvas font specification used for the text. */
107
176
  font?: string;
177
+ /** Canvas colour used for the element outline. */
108
178
  borderColor?: string;
179
+ /** Additional connector settings for an annotation label. */
109
180
  callout?: Record<string, unknown>;
110
181
  [key: string]: unknown;
111
182
  }
112
183
 
184
+ /** BarChart scale options with independent X/Y stacking controls. */
113
185
  export declare interface IBarAdditionalAxesOptions extends ICommonAdditionalAxesOptions {
186
+ /** Enables stacking on the X scale. */
114
187
  stackedX?: boolean;
188
+ /** Enables stacking on the Y scale. */
115
189
  stackedY?: boolean;
116
190
  }
117
191
 
192
+ /** Ordered horizontal and vertical BarChart axis collections. */
118
193
  export declare interface IBarAxes {
194
+ /** Horizontal axis definitions in order. */
119
195
  x: ICommonAxis<'top' | 'bottom'>[];
196
+ /** Vertical axis definitions in order. */
120
197
  y: ICommonAxis<'left' | 'right'>[];
121
198
  [key: string]: ICommonAxis[];
122
199
  }
123
200
 
201
+ /** Bar labels and DS definitions. */
124
202
  export declare interface IBarChartBaseData {
203
+ /** Labels associated with the input data. */
125
204
  labels: string[];
205
+ /** DS definitions in rendering order. */
126
206
  datasets: IBarChartDataset[];
127
207
  }
128
208
 
209
+ /** Normalized BarChart data, options and controls container. */
129
210
  export declare interface IBarChartData extends ICommonData {
211
+ /** Test identifier applied to the rendered chart container. */
130
212
  testId?: string;
213
+ /** ID of an existing DOM element in which chart controls should be rendered. */
131
214
  controlsPortalId?: string;
215
+ /** Values rendered by the chart or DS. */
132
216
  data: IBarChartBaseData;
217
+ /** Configuration for this chart or generated element. */
133
218
  options: IBarOptions;
134
219
  }
135
220
 
221
+ /** Consumer-facing BarChart configuration with optional datasets and options. */
136
222
  export declare interface IBarChartDataInput extends Omit<IBarChartData, 'options' | 'data'> {
223
+ /** Values rendered by the chart or DS. */
137
224
  data?: Omit<DeepPartial<IBarChartData['data']>, 'datasets'> & {
225
+ /** DS definitions in rendering order. */
138
226
  datasets?: Array<DeepPartial<IBarChartDataset> | object | null>;
139
227
  };
228
+ /** Configuration for this chart or generated element. */
140
229
  options?: IBarOptionsInput;
141
230
  }
142
231
 
232
+ /** Input bar DS, including axis bindings and legend grouping. */
143
233
  export declare interface IBarChartDataset extends ICommonDataset {
234
+ /** Marks a generated DS as annotation data rather than plotted input data. */
144
235
  isAnnotation?: boolean;
236
+ /** Index of the source annotation in the annotation collection. */
145
237
  annotationIndex?: number;
238
+ /** Controls whether a bar border edge is omitted. */
146
239
  borderSkipped?: boolean;
240
+ /** Bar corner radius in pixels. */
147
241
  borderRadius?: number;
242
+ /** Horizontal scale ID for this DS, such as `x` or `x2`. */
148
243
  xAxisID?: string;
244
+ /** Vertical scale ID for this DS, such as `y` or `y2`. */
149
245
  yAxisID?: string;
246
+ /** Initial visibility flag for the DS. */
150
247
  hidden?: boolean;
248
+ /** Groups DS entries for legend display. */
151
249
  displayGroup?: string | number;
250
+ /** Chart or annotation kind. */
152
251
  type?: ChartType.BAR;
153
252
  }
154
253
 
254
+ /** Props accepted by the BarChart React component. */
155
255
  export declare interface IBarChartProps {
256
+ /** Chart data and options. Omitted optional settings are resolved by the component defaults. */
156
257
  chart: IBarChartDataInput;
157
258
  }
158
259
 
260
+ /** BarChart configuration after default values have been applied. */
159
261
  export declare interface IBarDefaultProps {
262
+ /** Test identifier applied to the rendered chart container. */
160
263
  testId: string;
264
+ /** ID of an existing DOM element in which chart controls should be rendered. */
161
265
  controlsPortalId: string;
266
+ /** Values rendered by the chart or DS. */
162
267
  data: IBarChartBaseData;
268
+ /** Configuration for this chart or generated element. */
163
269
  options: {
270
+ /** Chart title; an array represents multiple lines. */
164
271
  title?: string | string[];
272
+ /** Chart orientation. Support and interpretation depend on the chart component. */
165
273
  direction: 'vertical' | 'horizontal';
274
+ /** Axis descriptions. Configure horizontal axes in `x` and vertical axes in `y`. */
166
275
  axes: IBarAxes;
276
+ /** Scale behaviour, bounds and tick settings shared across the chart axes. */
167
277
  additionalAxesOptions: IBarAdditionalAxesOptions;
278
+ /** Chart sizing and visual layout settings. */
168
279
  chartStyling: IBarStyling;
280
+ /** Tooltip visibility, formatting and supported callbacks. */
169
281
  tooltip: ICommonTooltip;
282
+ /** Geometry, grid and data-label rendering options. */
170
283
  graph: IChartGraph;
284
+ /** Chart.js scale configuration keyed by scale ID. */
171
285
  scales?: ICommonScales;
286
+ /** Annotation visibility, interaction and geometry configuration. */
172
287
  annotations: {
288
+ /** Whether configured annotations are rendered. */
173
289
  showAnnotations: boolean;
290
+ /** Enables annotation controls where supported by the chart. */
174
291
  controlAnnotation: boolean;
292
+ /** Annotation definitions in drawing order. */
175
293
  annotationsData: ICommonAnnotationsData[];
176
294
  };
295
+ /** Legend visibility, placement and custom rendering options. */
177
296
  legend: IBarLegend;
297
+ /** Initial interaction and rendering controls. */
178
298
  chartOptions: ICommonChartOptions;
299
+ /** Callbacks for legend and pointer interactions. */
179
300
  interactions: ICommonInteractions;
301
+ /** Point-dragging options and lifecycle callbacks. */
180
302
  dragData: ICommonDragData;
181
303
  };
182
304
  }
183
305
 
306
+ /** BarChart legend options, including custom HTML legend integration. */
184
307
  export declare interface IBarLegend extends ICommonLegend {
308
+ /** Custom legend plugin and its target DOM container. */
185
309
  customLegend?: ICommonCustomLegend<any>;
186
310
  }
187
311
 
312
+ /** Resolved BarChart options. Use {@link IBarOptionsInput} for partial consumer configuration. */
188
313
  export declare interface IBarOptions extends ICommonOptions {
314
+ /** Chart orientation. Support and interpretation depend on the chart component. */
189
315
  direction?: 'vertical' | 'horizontal';
316
+ /** Axis descriptions. Configure horizontal axes in `x` and vertical axes in `y`. */
190
317
  axes: IBarAxes;
318
+ /** Chart.js scale configuration keyed by scale ID. */
191
319
  scales?: ICommonScales;
320
+ /** Scale behaviour, bounds and tick settings shared across the chart axes. */
192
321
  additionalAxesOptions?: IBarAdditionalAxesOptions;
322
+ /** Chart sizing and visual layout settings. */
193
323
  chartStyling: IBarStyling;
324
+ /** Geometry, grid and data-label rendering options. */
194
325
  graph?: ICommonGraph;
326
+ /** Annotation visibility, interaction and geometry configuration. */
195
327
  annotations?: ICommonAnnotations;
328
+ /** Legend visibility, placement and custom rendering options. */
196
329
  legend?: IBarLegend;
330
+ /** Point-dragging options and lifecycle callbacks. */
197
331
  dragData?: ICommonDragData;
198
332
  }
199
333
 
334
+ /**
335
+ * Partial BarChart options accepted at the component boundary.
336
+ * Unknown fields are accepted for compatibility, not guaranteed to be forwarded.
337
+ */
200
338
  export declare type IBarOptionsInput = Omit<DeepPartial<IBarOptions>, 'title' | 'direction' | 'axes' | 'legend' | 'chartStyling' | 'interactions' | 'annotations' | 'additionalAxesOptions' | 'scales'> & {
201
339
  [key: string]: unknown;
340
+ /** Chart title; an array represents multiple lines. */
202
341
  title?: unknown;
342
+ /** Chart orientation. Support and interpretation depend on the chart component. */
203
343
  direction?: string;
344
+ /** Axis descriptions. Configure horizontal axes in `x` and vertical axes in `y`. */
204
345
  axes?: {
346
+ /** Horizontal axis definitions in order. */
205
347
  x?: ILooseBarAxis[];
348
+ /** Vertical axis definitions in order. */
206
349
  y?: ILooseBarAxis[];
207
350
  [key: string]: ILooseBarAxis[] | undefined;
208
351
  };
352
+ /** Legend visibility, placement and custom rendering options. */
209
353
  legend?: Omit<DeepPartial<IBarLegend>, 'position' | 'align'> & {
354
+ /** Visual placement of this element; does not select LineChart tooltip axes. */
210
355
  position?: string;
356
+ /** Alignment within the available layout space. */
211
357
  align?: string;
212
358
  [key: string]: unknown;
213
359
  };
360
+ /** Chart sizing and visual layout settings. */
214
361
  chartStyling?: DeepPartial<IBarStyling> & {
362
+ /** Compatibility input; not currently consumed by the chart option normalizers. */
215
363
  hideControls?: boolean;
364
+ /** Compatibility input; not currently consumed by the chart option normalizers. */
216
365
  minHeight?: number | string;
217
366
  [key: string]: unknown;
218
367
  };
368
+ /** Scale behaviour, bounds and tick settings shared across the chart axes. */
219
369
  additionalAxesOptions?: Omit<DeepPartial<IBarAdditionalAxesOptions>, 'chartScaleType'> & {
370
+ /** Scale family used when constructing axes. */
220
371
  chartScaleType?: string;
221
372
  [key: string]: unknown;
222
373
  };
374
+ /** Chart.js scale configuration keyed by scale ID. */
223
375
  scales?: Record<string, unknown>;
376
+ /** Callbacks for legend and pointer interactions. */
224
377
  interactions?: DeepPartial<ICommonInteractions> & {
378
+ /** Compatibility interaction input; configure zoom through `chartOptions.enableZoom`. */
225
379
  enableZoom?: boolean;
380
+ /** Compatibility interaction input; configure pan through `chartOptions.enablePan`. */
226
381
  enablePan?: boolean;
227
382
  [key: string]: unknown;
228
383
  };
384
+ /** Annotation visibility, interaction and geometry configuration. */
229
385
  annotations?: (Omit<DeepPartial<ICommonAnnotations>, 'annotationsData'> & {
386
+ /** Annotation definitions in drawing order. */
230
387
  annotationsData?: ILooseBarAnnotation[];
231
388
  }) | null;
232
389
  };
233
390
 
391
+ /** BarChart canvas sizing and padding. */
234
392
  export declare interface IBarStyling extends ICommonStyling {
393
+ /** Requests a square chart layout; LineChart also accepts a numeric layout value. */
235
394
  squareAspectRatio?: boolean;
395
+ /** Padding around the chart area, globally or per side. */
236
396
  layoutPadding?: string | number | {
237
397
  top: number;
238
398
  bottom: number;
@@ -241,36 +401,63 @@ export declare interface IBarStyling extends ICommonStyling {
241
401
  };
242
402
  }
243
403
 
404
+ /** Appearance, geometry and drag callbacks for a callout label. */
244
405
  export declare interface ICalloutLabelConfig {
406
+ /** Whether this feature is active. */
245
407
  enabled?: boolean;
408
+ /** Canvas/CSS colour used by this element. */
246
409
  color?: string;
410
+ /** Canvas font specification used for the text. */
247
411
  font?: string;
412
+ /** Canvas colour used for the element outline. */
248
413
  borderColor?: string;
414
+ /** Canvas stroke colour used by the connector. */
249
415
  strokeStyle?: string;
416
+ /** Stroke width in canvas pixels. */
250
417
  lineWidth?: number;
418
+ /** Connector clearance from the source element, in canvas pixels. */
251
419
  startOffset?: number;
420
+ /** Connector clearance from the label end, in canvas pixels. */
252
421
  endOffset?: number;
422
+ /** Callout label margin in pixels. */
253
423
  margin?: number;
424
+ /** X coordinate in scale units. */
254
425
  xValue?: number;
426
+ /** Y coordinate in scale units. */
255
427
  yValue?: number;
428
+ /** Horizontal adjustment of the annotation label in pixels. */
256
429
  xAdjust?: number;
430
+ /** Vertical adjustment of the annotation label in pixels. */
257
431
  yAdjust?: number;
432
+ /** Called when a drag starts. */
258
433
  onDragStart?: (coordinates: ICoordinates, annotation: ICommonAnnotationsData) => void;
434
+ /** Called as the dragged value or annotation position changes. */
259
435
  onDrag?: (coordinates: ICoordinates, annotation: ICommonAnnotationsData) => void;
436
+ /** Called when dragging ends. */
260
437
  onDragEnd?: (coordinates: ICoordinates, annotation: ICommonAnnotationsData) => void;
261
438
  }
262
439
 
440
+ /** Data-label plugin display and formatting options. */
263
441
  export declare interface IChartDataLabelsOptions {
442
+ /** Whether this element is visible. */
264
443
  display?: 'auto' | boolean;
444
+ /** Alignment within the available layout space. */
265
445
  align?: 'center';
446
+ /** Anchor used to place the data label relative to its element. */
266
447
  anchor?: 'center';
448
+ /** Formats the displayed data label from the value and plugin context. */
267
449
  formatter?: (_value: unknown, context: unknown) => unknown;
268
450
  }
269
451
 
452
+ /** Legend label produced by chart dataset generation. */
270
453
  export declare interface IChartGeneratedLabel {
454
+ /** Text to display; arrays represent multiple lines where supported. */
271
455
  text: string;
456
+ /** Canvas fill style used by the generated legend label. */
272
457
  fillStyle: string;
458
+ /** Canvas stroke colour used by the connector. */
273
459
  strokeStyle: string;
460
+ /** Zero-based index of the data item. */
274
461
  index: number;
275
462
  }
276
463
 
@@ -278,486 +465,873 @@ declare interface IChartGraph {
278
465
  showMinorGridlines?: boolean;
279
466
  }
280
467
 
468
+ /** DS visibility metadata passed to legend filtering helpers. */
281
469
  export declare interface IChartLegendItemFilter {
470
+ /** Zero-based index of the data item. */
282
471
  index: number;
472
+ /** Zero-based index of the DS in the chart data. */
283
473
  datasetIndex: number;
474
+ /** Initial visibility flag for the DS. */
284
475
  hidden: boolean;
285
476
  }
286
477
 
478
+ /** Shared Cartesian scale behaviour and range settings. */
287
479
  export declare interface ICommonAdditionalAxesOptions {
480
+ /** Scale family used when constructing axes. */
288
481
  chartScaleType?: 'linear' | 'logarithmic' | 'time' | 'timeseries';
482
+ /** Reverses the relevant scale or marker direction. */
289
483
  reverse?: boolean;
484
+ /** Includes zero when determining automatic scale bounds. */
290
485
  beginAtZero?: boolean;
486
+ /** Requested spacing between axis ticks, in scale units. */
291
487
  stepSize?: number;
488
+ /** Enables stacked rendering where supported. */
292
489
  stacked?: boolean;
490
+ /** Suggested lower scale bound; data may extend beyond it. */
293
491
  suggestedMin?: number;
492
+ /** Suggested upper scale bound; data may extend beyond it. */
294
493
  suggestedMax?: number;
494
+ /** Explicit lower bound in scale units. */
295
495
  min?: number | string;
496
+ /** Explicit upper bound in scale units. */
296
497
  max?: number | string;
297
498
  }
298
499
 
500
+ /** A text overlay placed inside the chart area. */
299
501
  export declare interface ICommonAnnotation {
502
+ /** Shows the chart-area text overlay. */
300
503
  showLabel?: boolean;
504
+ /** Text to display; arrays represent multiple lines where supported. */
301
505
  text?: string | string[];
506
+ /** Visual placement of this element. */
302
507
  position?: string;
508
+ /** Text size in pixels. */
303
509
  fontSize?: number;
510
+ /** Horizontal offset of the text overlay in pixels. */
304
511
  xOffset?: number;
512
+ /** Vertical offset of the text overlay in pixels. */
305
513
  yOffset?: number;
514
+ /** Maximum width available for the text overlay, in pixels. */
306
515
  maxWidth?: number;
516
+ /** Text line spacing in pixels. */
307
517
  lineHeight?: number;
308
518
  }
309
519
 
520
+ /** Rendered annotation metadata used by annotation interaction helpers. */
310
521
  export declare interface ICommonAnnotationElement {
522
+ /** Identifier used to associate this configuration with its rendered element. */
311
523
  id?: string;
524
+ /** Whether this element is visible. */
312
525
  display: boolean;
526
+ /** Index of the source annotation in the annotation collection. */
313
527
  annotationIndex: number;
528
+ /** Rendered annotation label content and plugin options. */
314
529
  label: {
530
+ /** Configuration for this chart or generated element. */
315
531
  options: LabelOptions;
532
+ /** Text content of the generated label. */
316
533
  content: string;
317
534
  };
535
+ /** Configuration for this chart or generated element. */
318
536
  options: {
537
+ /** Identifier used to associate this configuration with its rendered element. */
319
538
  id?: string;
539
+ /** Chart.js scale ID associated with this element. */
320
540
  scaleID?: string;
541
+ /** Canvas colour used for the element outline. */
321
542
  borderColor?: string;
543
+ /** Outline width in canvas pixels. */
322
544
  borderWidth?: number;
545
+ /** Rendered annotation radius in pixels. */
323
546
  radius?: number;
547
+ /** Rendered annotation label content and plugin options. */
324
548
  label?: {
549
+ /** Text content of the generated label. */
325
550
  content?: string;
551
+ /** Visual placement of this element. */
326
552
  position?: string;
553
+ /** Whether this feature is active. */
327
554
  enabled?: boolean;
555
+ /** Horizontal adjustment of the annotation label in pixels. */
328
556
  xAdjust?: number;
329
557
  };
330
558
  };
331
559
  }
332
560
 
561
+ /** Annotation collection and associated controls. */
333
562
  export declare interface ICommonAnnotations {
563
+ /** Whether configured annotations are rendered. */
334
564
  showAnnotations?: boolean;
565
+ /** Enables annotation controls where supported by the chart. */
335
566
  controlAnnotation?: boolean;
567
+ /** Enables annotation dragging in the corresponding controls. */
336
568
  enableDragAnnotation?: boolean;
569
+ /** Enables callout annotation controls in LineChart. */
337
570
  enableCalloutAnnotation?: boolean;
571
+ /** Line-marker plugin configuration. */
338
572
  lineMarkersAnnotation?: ILineMarkersAnnotation;
573
+ /** Annotation definitions in drawing order. */
339
574
  annotationsData?: ICommonAnnotationsData[];
575
+ /** Text overlay drawn inside the chart area. */
340
576
  labelAnnotation?: ICommonAnnotation;
341
577
  }
342
578
 
579
+ /**
580
+ * Geometry and interaction settings for one annotation.
581
+ * Coordinate values use the referenced scales; pixel offsets are named separately.
582
+ */
343
583
  export declare interface ICommonAnnotationsData {
584
+ /** Whether this element is visible. */
344
585
  display?: boolean;
586
+ /** Excludes this entry from the legend where supported. */
345
587
  hideLegend?: boolean;
588
+ /** Pixel offset between the label and its associated geometry. */
346
589
  labelOffsetPx?: number;
590
+ /** Identifier used to associate this configuration with its rendered element. */
347
591
  id?: string;
592
+ /** Whether this annotation may expand the scale bounds to remain visible. */
348
593
  adjustScaleRange?: boolean;
594
+ /** Axis on which `value` and `endValue` locate the annotation. */
349
595
  annotationAxis?: 'x' | 'y';
596
+ /** Annotation rotation in degrees. */
350
597
  rotation?: number;
598
+ /** Canvas/CSS colour used by this element. */
351
599
  color?: string;
600
+ /** End coordinate of a ranged annotation on `annotationAxis`. */
352
601
  endValue?: number;
602
+ /** Outline width in canvas pixels. */
353
603
  borderWidth?: number;
604
+ /** Canvas fill colour; arrays provide per-element colours where supported. */
354
605
  backgroundColor?: string;
606
+ /** Display text associated with this element. */
355
607
  label?: string;
608
+ /** Appearance and placement of the annotation label. */
356
609
  labelConfig?: IAnnotationLabelConfig;
610
+ /** Chart or annotation kind. */
357
611
  type?: DraggableAnnotationType;
612
+ /** Numeric value or axis coordinate represented by this item. */
358
613
  value?: number;
614
+ /** Lower X bound in scale units. */
359
615
  xMin?: number;
616
+ /** Upper X bound in scale units. */
360
617
  xMax?: number;
618
+ /** Lower Y bound in scale units. */
361
619
  yMin?: number;
620
+ /** Upper Y bound in scale units. */
362
621
  yMax?: number;
622
+ /** X coordinate in scale units. */
363
623
  xValue?: number;
624
+ /** Y coordinate in scale units. */
364
625
  yValue?: number;
626
+ /** Annotation point or circle radius in pixels. */
365
627
  radius?: number;
628
+ /** Allows this annotation to be dragged when annotation dragging is enabled. */
366
629
  enableDrag?: boolean;
630
+ /** Called when a drag starts. */
367
631
  onDragStart?: (coordinates: ICoordinates, annotation: ICommonAnnotationsData) => void;
632
+ /** Called as the dragged value or annotation position changes. */
368
633
  onDrag?: (coordinates: ICoordinates, annotation: ICommonAnnotationsData) => void;
634
+ /** Called when dragging ends. */
369
635
  onDragEnd?: (coordinates: ICoordinates, annotation: ICommonAnnotationsData) => void;
636
+ /** Restricts annotation movement to X, Y, or both axes. */
370
637
  dragAxis?: DragAxis;
638
+ /** Point marker shape. */
371
639
  pointStyle?: string;
640
+ /** Allows interactive resizing of supported annotations. */
372
641
  resizable?: boolean;
642
+ /** Inclusive dragging limits in axis units, expressed as [minimum, maximum]. */
373
643
  dragRange?: {
644
+ /** Inclusive X dragging bounds [minimum, maximum], in scale units. */
374
645
  x?: [number, number];
646
+ /** Inclusive Y dragging bounds [minimum, maximum], in scale units. */
375
647
  y?: [number, number];
376
648
  };
649
+ /** Displays coordinates while dragging an annotation. */
377
650
  displayDragCoordinates?: boolean;
651
+ /** Horizontal Chart.js scale ID used to resolve annotation coordinates. */
378
652
  xScaleID?: string;
653
+ /** Vertical Chart.js scale ID used to resolve annotation coordinates. */
379
654
  yScaleID?: string;
655
+ /** Opacity multiplier between 0 (transparent) and 1 (opaque). */
380
656
  opacity?: number;
381
657
  }
382
658
 
659
+ /** Shared Cartesian axis label, placement and tick settings. */
383
660
  export declare interface ICommonAxis<PositionType = string> {
661
+ /** Display text associated with this element. */
384
662
  label?: string;
663
+ /** Visual placement of this element. */
385
664
  position?: PositionType;
665
+ /** Canvas/CSS colour used by this element. */
386
666
  color?: string | string[];
667
+ /** Unit identifier used by the axis. */
387
668
  unit?: string;
669
+ /** Grid-line configuration for this axis. */
388
670
  gridLines?: boolean;
671
+ /** Requested spacing between axis ticks, in scale units. */
389
672
  stepSize?: number;
390
673
  }
391
674
 
675
+ /** Shared zoom and pan controls; defaults differ between chart components. */
392
676
  export declare interface ICommonChartOptions {
677
+ /** Enables zooming when supported by the chart. */
393
678
  enableZoom?: boolean;
679
+ /** Enables panning when supported by the chart. */
394
680
  enablePan?: boolean;
395
681
  }
396
682
 
683
+ /** Shared legend and title plugin option shapes. */
397
684
  export declare interface ICommonChartPlugins {
685
+ /** Legend visibility, placement and custom rendering options. */
398
686
  legend: {
687
+ /** Visual placement of this element. */
399
688
  position: TAxisPosition;
400
689
  };
690
+ /** Chart title; an array represents multiple lines. */
401
691
  title: {
692
+ /** Whether this element is visible. */
402
693
  display: boolean;
694
+ /** Text to display; arrays represent multiple lines where supported. */
403
695
  text: string;
404
696
  };
405
697
  }
406
698
 
699
+ /** A Chart.js legend plugin paired with an external DOM container. */
407
700
  export declare interface ICommonCustomLegend<T extends keyof ChartTypeRegistry> {
701
+ /** Chart.js plugin implementing the custom legend; null selects no custom plugin. */
408
702
  customLegendPlugin: Plugin_2<T> | null;
703
+ /** ID of the DOM element used by the custom legend plugin. */
409
704
  customLegendContainerID: string;
410
705
  }
411
706
 
707
+ /** Base chart input extended by component-specific data models. */
412
708
  export declare interface ICommonData {
709
+ /** Test identifier applied to the rendered chart container. */
413
710
  testId?: string;
711
+ /** Values rendered by the chart or DS. */
414
712
  data?: {
713
+ /** Labels associated with the input data. */
415
714
  labels?: string[];
715
+ /** DS definitions in rendering order. */
416
716
  datasets?: ICommonDataset[];
417
717
  };
718
+ /** Configuration for this chart or generated element. */
418
719
  options: ICommonOptions;
419
720
  }
420
721
 
722
+ /** Shared input DS fields for Cartesian chart components. */
421
723
  export declare interface ICommonDataset {
724
+ /** DS name used in the legend and tooltip. */
422
725
  label?: string;
726
+ /** Canvas colour used for the element outline. */
423
727
  borderColor?: string;
728
+ /** Canvas fill colour; arrays provide per-element colours where supported. */
424
729
  backgroundColor?: string | string[];
730
+ /** Outline width in canvas pixels. */
425
731
  borderWidth?: number;
732
+ /** Values rendered by the chart or DS. */
426
733
  data: ICommonDataValue[];
734
+ /** Initial visibility flag for the DS. */
427
735
  hidden?: boolean;
428
736
  }
429
737
 
738
+ /** A Cartesian data point with an optional display label. */
430
739
  export declare interface ICommonDataValue {
740
+ /** X coordinate in scale units. */
431
741
  x: number | string;
742
+ /** Y coordinate in scale units. */
432
743
  y: number | string;
744
+ /** Display text associated with this element. */
433
745
  label?: string;
434
746
  }
435
747
 
748
+ /** Data-point dragging configuration passed to the drag-data plugin. */
436
749
  export declare interface ICommonDragData {
750
+ /** Enables dragging data points. Defaults to false. */
437
751
  enableDragData?: boolean;
752
+ /** Displays the drag tooltip while moving a data point. */
438
753
  showTooltip?: boolean;
754
+ /** Rounds values during point dragging. */
439
755
  roundPoints?: boolean;
756
+ /** Allows point dragging along the X axis. */
440
757
  dragX?: boolean;
758
+ /** Allows point dragging along the Y axis. */
441
759
  dragY?: boolean;
760
+ /** Called when a drag starts. */
442
761
  onDragStart?: (event: unknown, element: unknown) => unknown;
762
+ /** Called as the dragged value or annotation position changes. */
443
763
  onDrag?: (event: unknown, datasetIndex: number, index: number, value: unknown) => unknown;
764
+ /** Called when dragging ends. */
444
765
  onDragEnd?: (event: unknown, datasetIndex: number, index: number, value: unknown) => unknown;
445
766
  }
446
767
 
768
+ /** Background gradient settings used by ScatterChart. */
447
769
  export declare interface ICommonGradient {
770
+ /** Whether this element is visible. */
448
771
  display: boolean;
772
+ /** Ordered colour stops for the background gradient. */
449
773
  gradientColors?: ICommonGradientColor[];
774
+ /** Chart orientation. Support and interpretation depend on the chart component. */
450
775
  direction?: GradientDirection;
451
776
  }
452
777
 
778
+ /** One colour stop in a canvas gradient. */
453
779
  export declare interface ICommonGradientColor {
780
+ /** Gradient stop position between 0 and 1. */
454
781
  offset: number;
782
+ /** Canvas/CSS colour used by this element. */
455
783
  color: string;
456
784
  }
457
785
 
786
+ /** Shared line geometry, grid and data-label settings. */
458
787
  export declare interface ICommonGraph {
788
+ /** Line interpolation tension; zero produces straight segments. */
459
789
  lineTension?: number;
790
+ /** Connects line segments across missing values. */
460
791
  spanGaps?: boolean;
792
+ /** Draws labels on data elements. */
461
793
  showDataLabels?: boolean;
794
+ /** Draws intermediate grid lines between the main ticks. */
462
795
  showMinorGridlines?: boolean;
463
796
  }
464
797
 
798
+ /** Indices identifying the currently hovered DS and point. */
465
799
  export declare interface ICommonHoveredItems {
800
+ /** Zero-based index of the data item. */
466
801
  index: number;
802
+ /** Zero-based index of the DS in the chart data. */
467
803
  datasetIndex: number;
468
804
  }
469
805
 
806
+ /** Chart interaction callbacks. Generated DS indices may include annotation entries. */
470
807
  export declare interface ICommonInteractions {
808
+ /** Receives the clicked legend text and its hidden state. */
471
809
  onLegendClick?: (text: string, hidden: boolean) => void;
810
+ /** Receives the chart event, DS index, point index and generated DS collection on hover. */
472
811
  onHover?: (event: ChartEvent, datasetIndex: number, index: number, generatedDataset: any[]) => void;
812
+ /** Called when the pointer leaves the hovered chart element. */
473
813
  onUnhover?: (event?: ChartEvent, datasetIndex?: number, index?: number, generatedDataset?: any[]) => void;
474
814
  }
475
815
 
816
+ /** Common legend visibility and placement settings. */
476
817
  export declare interface ICommonLegend {
818
+ /** Whether this element is visible. */
477
819
  display: boolean;
820
+ /** Visual placement of this element. */
478
821
  position?: Position;
822
+ /** Alignment within the available layout space. */
479
823
  align?: AlignOptions;
480
824
  }
481
825
 
826
+ /**
827
+ * Common chart options extended by each chart component.
828
+ * A field's presence in this shared type does not imply support in every chart.
829
+ */
482
830
  export declare interface ICommonOptions {
831
+ /** Chart title; an array represents multiple lines. */
483
832
  title?: string | string[];
833
+ /** Chart sizing and visual layout settings. */
484
834
  chartStyling?: ICommonStyling;
835
+ /** Tooltip visibility, formatting and supported callbacks. */
485
836
  tooltip?: ICommonTooltip;
837
+ /** Legend visibility, placement and custom rendering options. */
486
838
  legend?: ICommonLegend;
839
+ /** Initial interaction and rendering controls. */
487
840
  chartOptions?: ICommonChartOptions;
841
+ /** Callbacks for legend and pointer interactions. */
488
842
  interactions?: ICommonInteractions;
843
+ /** Point-dragging options and lifecycle callbacks. */
489
844
  dragData?: ICommonDragData;
845
+ /** Annotation visibility, interaction and geometry configuration. */
490
846
  annotations?: ICommonAnnotations;
847
+ /** Plugin configuration accepted by this options shape; forwarding is chart-specific. */
491
848
  plugins?: {
849
+ /** Line-marker plugin enablement settings. */
492
850
  lineMarkersPlugin?: {
851
+ /** Whether this feature is active. */
493
852
  enabled?: boolean;
494
853
  };
495
854
  };
496
855
  }
497
856
 
857
+ /** Supported Chart.js scale option variants. */
498
858
  export declare type ICommonScaleOptions = ScaleOptions<'category'> | ScaleOptions<'linear'> | ScaleOptions<'logarithmic'> | ScaleOptions<'time'> | ScaleOptions<'timeseries'>;
499
859
 
860
+ /** Scale configuration indexed by Chart.js scale ID. */
500
861
  export declare type ICommonScales = Partial<Record<string, ICommonScaleOptions>>;
501
862
 
863
+ /** Shared chart container and canvas layout settings. */
502
864
  export declare interface ICommonStyling {
865
+ /** Chart width as a number or CSS size string. */
503
866
  width?: number | string;
867
+ /** Chart height as a number or CSS size string. */
504
868
  height?: number | string;
869
+ /** Preserves the canvas aspect ratio while resizing. */
505
870
  maintainAspectRatio?: boolean;
871
+ /** Uses the fixed-height layout instead of stretching to the container. */
506
872
  staticChartHeight?: boolean;
873
+ /** Disables chart animation when true. Defaults to true. */
507
874
  performanceMode?: boolean;
875
+ /** Background gradient configuration; consumed by ScatterChart. */
508
876
  gradient?: ICommonGradient;
509
877
  }
510
878
 
879
+ /** Shared tooltip settings; individual chart components determine supported callbacks. */
511
880
  export declare interface ICommonTooltip {
881
+ /** Enables hover tooltips. Defaults to true. */
512
882
  tooltips?: boolean;
883
+ /** Includes the optional point label in supported tooltips. Defaults to false. */
513
884
  showLabelsInTooltips?: boolean;
885
+ /** Allows scientific notation when formatting tooltip numbers. Defaults to true. */
514
886
  scientificNotation?: boolean;
887
+ /** Custom tooltip callbacks. LineChart preserves title, label and afterLabel overrides independently. */
515
888
  callbacks?: ICommonTooltipCallbacks;
516
889
  }
517
890
 
891
+ /**
892
+ * Tooltip callback overrides consumed by LineChart.
893
+ * BarChart, PieChart and ScatterChart currently use their own tooltip formatters.
894
+ */
518
895
  export declare interface ICommonTooltipCallbacks {
896
+ /** Replaces the tooltip title callback. LineChart passes the hovered tooltip items. */
519
897
  title?: (...args: unknown[]) => unknown;
898
+ /** Replaces the DS-row callback. LineChart passes one tooltip item. */
520
899
  label?: (...args: unknown[]) => unknown;
900
+ /** Appends content below the DS value. LineChart uses this instead of its built-in after-label callback. */
521
901
  afterLabel?: (...args: unknown[]) => unknown;
522
902
  }
523
903
 
904
+ /** A pair of X/Y coordinates passed to annotation drag callbacks. */
524
905
  export declare interface ICoordinates {
906
+ /** X coordinate in scale units. */
525
907
  x: number;
908
+ /** Y coordinate in scale units. */
526
909
  y: number;
527
910
  }
528
911
 
912
+ /** Legacy selector type retained for source compatibility. */
529
913
  export declare interface IDepthType {
914
+ /** Available selector values. */
530
915
  options: string[];
916
+ /** Currently selected unit identifier. */
531
917
  selectedUnit: string;
918
+ /** Notifies the consumer when another unit is selected; the consumer owns the selection. */
532
919
  setSelectedUnit: (value: string) => void;
533
920
  }
534
921
 
922
+ /** Generated bar DS with annotation and legend metadata. */
535
923
  export declare interface IGenerateBarChartDataset extends ChartDataset<'bar', ICommonDataValue[]> {
924
+ /** Canvas colour used for the element outline. */
536
925
  borderColor: string;
926
+ /** Canvas fill colour; arrays provide per-element colours where supported. */
537
927
  backgroundColor: string | string[];
928
+ /** Alternating dash and gap lengths in canvas pixels. */
538
929
  borderDash?: number[];
930
+ /** Outline width in canvas pixels. */
539
931
  borderWidth?: number;
932
+ /** Shape identifier retained for the generated annotation DS. */
540
933
  annotationType?: string;
934
+ /** Excludes this entry from the legend where supported. */
541
935
  hideLegend?: boolean;
936
+ /** Groups DS entries for legend display. */
542
937
  displayGroup?: string | number;
938
+ /** Marks a generated DS as annotation data rather than plotted input data. */
543
939
  isAnnotation?: boolean;
940
+ /** Index of the source annotation in the annotation collection. */
544
941
  annotationIndex?: number;
545
942
  }
546
943
 
944
+ /** DS produced by LineChart normalization, including generated annotation metadata. */
547
945
  export declare interface IGeneratedLineChartDataset {
946
+ /** Display text associated with this element. */
548
947
  label?: string;
948
+ /** Values rendered by the chart or DS. */
549
949
  data: ICommonDataValue[];
950
+ /** Whether to draw connecting lines. */
550
951
  showLine?: boolean;
952
+ /** Resolved interpolation tension for the generated DS. */
551
953
  lineTension: number;
954
+ /** Connects line segments across missing values. */
552
955
  spanGaps: boolean;
956
+ /** Outline width in canvas pixels. */
553
957
  borderWidth: number;
958
+ /** Alternating dash and gap lengths in canvas pixels. */
554
959
  borderDash: number[];
960
+ /** Canvas join style at line segment corners. */
555
961
  borderJoinStyle: 'round' | 'bevel' | 'miter';
962
+ /** Canvas colour used for the element outline. */
556
963
  borderColor: string;
964
+ /** Canvas fill colour; arrays provide per-element colours where supported. */
557
965
  backgroundColor: string | string[];
966
+ /** Fill colour of the point marker. */
558
967
  pointBackgroundColor: string;
968
+ /** Point marker radius in pixels. */
559
969
  pointRadius: number;
970
+ /** Point radius while hovered, in pixels. */
560
971
  pointHoverRadius: number;
972
+ /** Additional hit-test radius around a point, in pixels. */
561
973
  pointHitRadius: number;
974
+ /** Marks a generated DS as annotation data rather than plotted input data. */
562
975
  isAnnotation?: boolean;
976
+ /** Shape identifier retained for the generated annotation DS. */
563
977
  annotationType?: string;
978
+ /** Index of the source annotation in the annotation collection. */
564
979
  annotationIndex?: number;
980
+ /** Text retained for the generated annotation DS. */
565
981
  annotationLabel?: string;
982
+ /** Fill colour retained for the generated annotation DS. */
566
983
  annotationBackgroundColor?: string;
984
+ /** Point fill retained for the generated annotation DS. */
567
985
  annotationPointBackgroundColor?: string;
986
+ /** Outline colour retained for the generated annotation DS. */
568
987
  annotationBorderColor?: string;
988
+ /** Outline dash pattern retained for the generated annotation DS. */
569
989
  annotationBorderDash?: number[];
990
+ /** Outline width retained for the generated annotation DS. */
570
991
  annotationBorderWidth?: number;
992
+ /** Groups DS entries for legend display. */
571
993
  displayGroup?: string | number;
994
+ /** Excludes this entry from the legend where supported. */
572
995
  hideLegend?: boolean;
996
+ /** Point marker shape. */
573
997
  pointStyle?: string;
998
+ /** Horizontal scale ID for this DS, such as `x` or `x2`. */
574
999
  xAxisID?: string;
1000
+ /** Vertical scale ID for this DS, such as `y` or `y2`. */
575
1001
  yAxisID?: string;
576
1002
  }
577
1003
 
1004
+ /** Generated pie DS with annotation and legend metadata. */
578
1005
  export declare interface IGeneratedPieChartDataset {
1006
+ /** Display text associated with this element. */
579
1007
  label: string;
1008
+ /** Canvas fill colour; arrays provide per-element colours where supported. */
580
1009
  backgroundColor: string[];
1010
+ /** Canvas colour used for the element outline. */
581
1011
  borderColor: string;
1012
+ /** Outline width in canvas pixels. */
582
1013
  borderWidth: number;
1014
+ /** Alternating dash and gap lengths in canvas pixels. */
583
1015
  borderDash: number[];
1016
+ /** Shape identifier retained for the generated annotation DS. */
584
1017
  annotationType?: string;
1018
+ /** Values rendered by the chart or DS. */
585
1019
  data: IPieDataValue[];
1020
+ /** Excludes this entry from the legend where supported. */
586
1021
  hideLegend?: boolean;
1022
+ /** Groups DS entries for legend display. */
587
1023
  displayGroup?: string | number;
1024
+ /** Marks a generated DS as annotation data rather than plotted input data. */
588
1025
  isAnnotation?: boolean;
1026
+ /** Index of the source annotation in the annotation collection. */
589
1027
  annotationIndex?: number;
590
1028
  }
591
1029
 
1030
+ /** Generated scatter DS with annotation and legend metadata. */
592
1031
  export declare interface IGeneratedScatterChartDataset {
1032
+ /** Display text associated with this element. */
593
1033
  label: string;
1034
+ /** Canvas fill colour; arrays provide per-element colours where supported. */
594
1035
  backgroundColor: string[];
1036
+ /** Canvas colour used for the element outline. */
595
1037
  borderColor: string;
1038
+ /** Outline width in canvas pixels. */
596
1039
  borderWidth: number;
1040
+ /** Alternating dash and gap lengths in canvas pixels. */
597
1041
  borderDash: number[];
1042
+ /** Shape identifier retained for the generated annotation DS. */
598
1043
  annotationType?: string;
1044
+ /** Values rendered by the chart or DS. */
599
1045
  data: IScatterDataValue[];
1046
+ /** Excludes this entry from the legend where supported. */
600
1047
  hideLegend?: boolean;
1048
+ /** Groups DS entries for legend display. */
601
1049
  displayGroup?: string | number;
1050
+ /** Marks a generated DS as annotation data rather than plotted input data. */
602
1051
  isAnnotation?: boolean;
1052
+ /** Index of the source annotation in the annotation collection. */
603
1053
  annotationIndex?: number;
604
1054
  }
605
1055
 
1056
+ /** Initial LineChart rendering and interaction controls. */
606
1057
  export declare interface ILChartOptions extends ICommonChartOptions {
1058
+ /** Whether to draw point markers. */
607
1059
  showPoints?: boolean;
1060
+ /** Closes the LineChart controls panel when clicking outside it. Defaults to false. */
608
1061
  closeOnOutsideClick?: boolean;
1062
+ /** Whether to draw connecting lines. */
609
1063
  showLine?: boolean;
1064
+ /** Enables zooming when supported by the chart. */
610
1065
  enableZoom?: boolean;
1066
+ /** Enables panning when supported by the chart. */
611
1067
  enablePan?: boolean;
1068
+ /** Enables annotation dragging in the corresponding controls. */
612
1069
  enableDragAnnotation?: boolean;
1070
+ /** Legacy control flag; use `dragData.enableDragData` to configure LineChart point dragging. */
613
1071
  enableDragPoints?: boolean;
614
1072
  }
615
1073
 
1074
+ /** LineChart scale defaults and per-axis range overrides. */
616
1075
  export declare interface ILineChartAdditionalAxesOptions {
1076
+ /** Scale family used when constructing axes. */
617
1077
  chartScaleType?: 'linear' | 'logarithmic' | 'time' | 'timeseries';
1078
+ /** Reverses the Y scale direction. Does not change tooltip axis selection. */
618
1079
  reverse?: boolean;
1080
+ /** Includes zero when determining automatic scale bounds. */
619
1081
  beginAtZero?: boolean;
1082
+ /** Requested spacing between axis ticks, in scale units. */
620
1083
  stepSize?: number;
1084
+ /** Suggested lower scale bound; data may extend beyond it. */
621
1085
  suggestedMin?: number;
1086
+ /** Suggested upper scale bound; data may extend beyond it. */
622
1087
  suggestedMax?: number;
1088
+ /** Per-axis bounds keyed by scale ID, such as `x`, `y`, or `y2`. */
623
1089
  range?: ILineRange;
1090
+ /** Adds padding to automatically computed axis bounds. Defaults to false in LineChart. */
624
1091
  autoAxisPadding?: boolean;
625
1092
  }
626
1093
 
1094
+ /** Ordered horizontal and vertical axis collections for LineChart. */
627
1095
  export declare interface ILineChartAxes {
1096
+ /** Horizontal axis definitions in order. */
628
1097
  x: ILineChartAxis<'top' | 'bottom'>[];
1098
+ /** Vertical axis definitions in order. */
629
1099
  y: ILineChartAxis<'left' | 'right'>[];
630
1100
  [key: string]: ILineChartAxis[];
631
1101
  }
632
1102
 
1103
+ /** One LineChart axis. Array order determines generated IDs (`x`, `x2`, ... or `y`, `y2`, ...). */
633
1104
  export declare interface ILineChartAxis<PositionType = TAxisPosition> {
1105
+ /** Optional axis metadata; generated scale IDs currently follow the axis array order. */
634
1106
  id?: string;
1107
+ /** Axis title, also appended to the default tooltip title when this is the selected title axis. */
635
1108
  label?: string;
1109
+ /** Visual axis placement; does not affect tooltip coordinate roles. */
636
1110
  position?: PositionType;
1111
+ /** Canvas/CSS colour used by this element. */
637
1112
  color?: string | string[];
1113
+ /**
1114
+ * Unit metadata or a consumer-owned unit selector. Does not convert DS coordinates.
1115
+ * The default DS tooltip row uses this string or `selectedUnit` when non-empty, otherwise it extracts
1116
+ * units from square brackets in the value-axis label. The title uses the title-axis label instead.
1117
+ */
638
1118
  unit?: IUnitOptions | string;
1119
+ /** Requested spacing between axis ticks, in scale units. */
639
1120
  stepSize?: number;
1121
+ /** Grid-line configuration for this axis. */
640
1122
  gridLines?: ILineChartGraph;
1123
+ /** Explicit lower bound in scale units. */
641
1124
  min?: number | string;
1125
+ /** Explicit upper bound in scale units. */
642
1126
  max?: number | string;
643
1127
  }
644
1128
 
1129
+ /** Normalized LineChart configuration and control integration identifiers. */
645
1130
  export declare interface ILineChartData extends ICommonData {
1131
+ /** Values rendered by the chart or DS. */
646
1132
  data?: {
1133
+ /** DS definitions in rendering order. */
647
1134
  datasets: ILineChartDataset[];
648
1135
  };
1136
+ /** Configuration for this chart or generated element. */
649
1137
  options: ILineChartOptions;
1138
+ /** Key used by LineChart to persist chart settings; use distinct IDs for independent charts. */
650
1139
  persistenceId?: string;
1140
+ /** ID of an existing DOM element in which chart controls should be rendered. */
651
1141
  controlsPortalId?: string;
652
1142
  }
653
1143
 
1144
+ /**
1145
+ * Consumer-facing LineChart configuration. Missing datasets and options receive component defaults.
1146
+ * Use this type for standalone chart configuration objects.
1147
+ */
654
1148
  export declare interface ILineChartDataInput extends Omit<ILineChartData, 'data' | 'options'> {
1149
+ /** Values rendered by the chart or DS. */
655
1150
  data?: Omit<DeepPartial<ILineChartData['data']>, 'datasets'> & {
1151
+ /** DS definitions in rendering order. */
656
1152
  datasets?: Array<(DeepPartial<ILineChartDataset> & {
1153
+ /** Line interpolation tension; zero produces straight segments. */
657
1154
  lineTension?: number | string;
1155
+ /** Controls filling beneath or between lines. */
658
1156
  fill?: boolean | string | Record<string, unknown>;
1157
+ /** Point marker shape. */
659
1158
  pointStyle?: unknown;
1159
+ /** Legacy input accepted for compatibility; prefer `showPoints`. */
660
1160
  showPoint?: boolean;
1161
+ /** Whether to draw point markers. */
661
1162
  showPoints?: boolean;
1163
+ /** Legacy DS input accepted for compatibility; not a tooltip formatting option. */
662
1164
  lineHeight?: number;
1165
+ /** Values rendered by the chart or DS. */
663
1166
  data?: Array<DeepPartial<ICommonDataValue> | null>;
664
1167
  [key: string]: unknown;
665
1168
  }) | object | null> | object;
666
1169
  };
1170
+ /** Configuration for this chart or generated element. */
667
1171
  options?: ILineChartOptionsInput;
668
1172
  }
669
1173
 
1174
+ /** Input DS for LineChart. Axis IDs bind values and tooltip units to the corresponding axes. */
670
1175
  export declare interface ILineChartDataset extends ICommonDataset {
1176
+ /** DS interpolation tension; overrides `options.graph.lineTension` when provided. */
671
1177
  lineTension?: number;
1178
+ /** Fill colour of the point marker. */
672
1179
  pointBackgroundColor?: string;
1180
+ /** Point marker radius in pixels. */
673
1181
  pointRadius?: number;
1182
+ /** Point radius while hovered, in pixels. */
674
1183
  pointHoverRadius?: number;
1184
+ /** Additional hit-test radius around a point, in pixels. */
675
1185
  pointHitRadius?: number;
1186
+ /** Controls filling beneath or between lines. */
676
1187
  fill?: boolean;
1188
+ /** Horizontal scale ID for this DS, such as `x` or `x2`. */
677
1189
  xAxisID?: string;
1190
+ /** Vertical scale ID for this DS, such as `y` or `y2`. */
678
1191
  yAxisID?: string;
1192
+ /** Legacy flag that clips the DS endpoints against the first axis bounds. */
679
1193
  formation?: boolean;
1194
+ /** Groups DS entries for legend display. */
680
1195
  displayGroup?: string | number;
1196
+ /** Point marker shape. */
681
1197
  pointStyle?: string;
682
1198
  }
683
1199
 
1200
+ /** LineChart interpolation, missing-value and grid rendering settings. */
684
1201
  export declare interface ILineChartGraph {
1202
+ /** Line interpolation tension; zero produces straight segments. */
685
1203
  lineTension?: number;
1204
+ /** Connects line segments across missing values. */
686
1205
  spanGaps?: boolean;
1206
+ /** Draws labels on data elements. */
687
1207
  showDataLabels?: boolean;
1208
+ /** Draws intermediate grid lines between the main ticks. */
688
1209
  showMinorGridlines?: boolean;
689
1210
  }
690
1211
 
1212
+ /** Resolved LineChart options. Consumers normally provide the partial {@link ILineChartOptionsInput}. */
691
1213
  export declare interface ILineChartOptions extends ICommonOptions {
1214
+ /** Chart title; an array represents multiple lines. */
692
1215
  title?: string | string[];
1216
+ /** Axis descriptions. Configure horizontal axes in `x` and vertical axes in `y`. */
693
1217
  axes: ILineChartAxes;
1218
+ /** Chart.js scale configuration keyed by scale ID. */
694
1219
  scales: ICommonScales;
1220
+ /** Scale behaviour, bounds and tick settings shared across the chart axes. */
695
1221
  additionalAxesOptions: ILineChartAdditionalAxesOptions;
1222
+ /** Chart sizing and visual layout settings. */
696
1223
  chartStyling: ILineChartStyling;
1224
+ /** Tooltip visibility, formatting and supported callbacks. */
697
1225
  tooltip: ILineChartTooltip;
1226
+ /** Geometry, grid and data-label rendering options. */
698
1227
  graph: ILineChartGraph;
1228
+ /** Annotation visibility, interaction and geometry configuration. */
699
1229
  annotations: ICommonAnnotations;
1230
+ /** Legend visibility, placement and custom rendering options. */
700
1231
  legend: ILineLegend;
1232
+ /** Initial interaction and rendering controls. */
701
1233
  chartOptions: ILChartOptions;
1234
+ /** Callbacks for legend and pointer interactions. */
702
1235
  interactions: ILineInteractions;
1236
+ /** Point-dragging options and lifecycle callbacks. */
703
1237
  dragData?: ICommonDragData;
1238
+ /** Legacy selector configuration passed to the LineChart axes controls. */
704
1239
  depthType?: IDepthType | object;
705
1240
  }
706
1241
 
1242
+ /**
1243
+ * Consumer-facing LineChart options with optional defaults and compatibility fields.
1244
+ * Unknown fields are accepted for compatibility, not guaranteed to be forwarded to Chart.js.
1245
+ */
707
1246
  export declare type ILineChartOptionsInput = Omit<DeepPartial<ILineChartOptions>, 'title' | 'axes' | 'legend' | 'chartStyling' | 'interactions' | 'graph' | 'annotations' | 'additionalAxesOptions' | 'scales' | 'plugins'> & {
708
1247
  [key: string]: unknown;
1248
+ /** Chart title; an array represents multiple lines. */
709
1249
  title?: unknown;
1250
+ /** Legacy input accepted for compatibility; LineChart does not use it to swap axes or tooltip values. */
710
1251
  direction?: string;
1252
+ /** Axis descriptions. Configure horizontal axes in `x` and vertical axes in `y`. */
711
1253
  axes?: {
1254
+ /** Horizontal axis definitions in order. */
712
1255
  x?: ILooseLineAxis[];
1256
+ /** Vertical axis definitions in order. */
713
1257
  y?: ILooseLineAxis[];
714
1258
  [key: string]: ILooseLineAxis[] | undefined;
715
1259
  };
1260
+ /** Chart.js scale overrides keyed by generated scale ID (`x`, `x2`, `y`, `y2`, ...). */
716
1261
  scales?: Record<string, unknown>;
1262
+ /** Compatibility input; not forwarded by the LineChart option normalizer. */
717
1263
  plugins?: Record<string, unknown>;
1264
+ /** Legend visibility, placement and custom rendering options. */
718
1265
  legend?: Omit<DeepPartial<ILineLegend>, 'position' | 'align'> & {
1266
+ /** Visual placement of this element. */
719
1267
  position?: string;
1268
+ /** Alignment within the available layout space. */
720
1269
  align?: string;
721
1270
  [key: string]: unknown;
722
1271
  };
1272
+ /** Chart sizing and visual layout settings. */
723
1273
  chartStyling?: DeepPartial<ILineChartStyling> & {
1274
+ /** Compatibility input; not currently consumed by the chart option normalizers. */
724
1275
  hideControls?: boolean;
1276
+ /** Compatibility input; not currently consumed by the chart option normalizers. */
725
1277
  minHeight?: number | string;
726
1278
  [key: string]: unknown;
727
1279
  };
1280
+ /** Callbacks for legend and pointer interactions. */
728
1281
  interactions?: DeepPartial<ILineInteractions> & {
1282
+ /** Compatibility interaction input; configure zoom through `chartOptions.enableZoom`. */
729
1283
  enableZoom?: boolean;
1284
+ /** Compatibility interaction input; configure pan through `chartOptions.enablePan`. */
730
1285
  enablePan?: boolean;
731
1286
  [key: string]: unknown;
732
1287
  };
1288
+ /** Geometry, grid and data-label rendering options. */
733
1289
  graph?: DeepPartial<ILineChartGraph> & {
1290
+ /** Legacy graph-level input; configure tooltips through `options.tooltip` instead. */
734
1291
  tooltip?: unknown;
735
1292
  [key: string]: unknown;
736
1293
  };
1294
+ /** Annotation visibility, interaction and geometry configuration. */
737
1295
  annotations?: (Omit<DeepPartial<ICommonAnnotations>, 'annotationsData'> & {
1296
+ /** Annotation definitions in drawing order. */
738
1297
  annotationsData?: ILooseLineAnnotation[];
739
1298
  }) | ILooseLineAnnotation[] | null;
1299
+ /** Scale behaviour, bounds and tick settings shared across the chart axes. */
740
1300
  additionalAxesOptions?: Omit<DeepPartial<ILineChartAdditionalAxesOptions>, 'chartScaleType'> & {
1301
+ /** Scale family used when constructing axes. */
741
1302
  chartScaleType?: string;
1303
+ /** Requested spacing between axis ticks, in scale units. */
742
1304
  stepSize?: unknown;
1305
+ /** Per-axis bounds keyed by scale ID, such as `x`, `y`, or `y2`. */
743
1306
  range?: ILineRange | ILineChartRange | Record<string, ILineChartRange | undefined>;
744
1307
  } & Record<string, unknown>;
745
1308
  };
746
1309
 
1310
+ /** Props accepted by the LineChart React component. */
747
1311
  export declare interface ILineChartProps {
1312
+ /** Chart data and options. Omitted optional settings are resolved by the component defaults. */
748
1313
  chart: ILineChartDataInput;
1314
+ /** React table content exposed through the LineChart controls. */
749
1315
  table?: ReactNode;
1316
+ /** React content rendered in the LineChart header. */
750
1317
  headerComponent?: ReactNode;
1318
+ /** React content rendered below the LineChart header. */
751
1319
  subheaderComponent?: ReactNode;
752
1320
  }
753
1321
 
1322
+ /** Optional lower and upper bounds for one scale. */
754
1323
  export declare interface ILineChartRange {
1324
+ /** Explicit lower bound in scale units. */
755
1325
  min?: number | string;
1326
+ /** Explicit upper bound in scale units. */
756
1327
  max?: number | string;
757
1328
  }
758
1329
 
1330
+ /** LineChart canvas size and chart-area padding. */
759
1331
  export declare interface ILineChartStyling extends ICommonStyling {
1332
+ /** Requests a square chart layout; LineChart also accepts a numeric layout value. */
760
1333
  squareAspectRatio?: number | boolean;
1334
+ /** Padding around the chart area, globally or per side. */
761
1335
  layoutPadding?: number | {
762
1336
  top: number;
763
1337
  bottom: number;
@@ -766,296 +1340,526 @@ export declare interface ILineChartStyling extends ICommonStyling {
766
1340
  };
767
1341
  }
768
1342
 
1343
+ /**
1344
+ * LineChart tooltip formatting and callback overrides, independent of axis placement.
1345
+ * By default the title uses X and the DS row uses Y; `titleAxis` swaps these coordinate roles.
1346
+ */
769
1347
  export declare interface ILineChartTooltip extends ICommonTooltip {
1348
+ /** Compatibility flag retained by LineChart; currently does not alter tooltip text. */
770
1349
  hideSimulationName?: boolean;
1350
+ /** Allows scientific notation when formatting tooltip numbers. Defaults to true. */
771
1351
  scientificNotation?: boolean;
1352
+ /**
1353
+ * Axis whose value and axis label appear in the default tooltip title.
1354
+ * The other axis supplies the value beside the DS name. Does not move or reverse axes.
1355
+ * Axis configuration is resolved from the hovered DS axis IDs (`x`, `x2`, `y`, `y2`, ...).
1356
+ * Time and category values use formatted scale values rather than raw numeric coordinates.
1357
+ * Custom title and label callbacks override their respective defaults independently.
1358
+ * Update this option when swapping data coordinates if the same quantity should remain in the title.
1359
+ * @defaultValue 'x'
1360
+ * @example
1361
+ * ```ts
1362
+ * const tooltip: ILineChartTooltip = { titleAxis: 'y' };
1363
+ * ```
1364
+ */
772
1365
  titleAxis?: `${AxisType}`;
773
1366
  }
774
1367
 
1368
+ /** LineChart pointer, legend and animation lifecycle callbacks. */
775
1369
  export declare interface ILineInteractions extends ICommonInteractions {
1370
+ /** Called after a LineChart animation completes. */
776
1371
  onAnimationComplete?: () => void;
777
1372
  }
778
1373
 
1374
+ /** LineChart legend options, including external legend integration. */
779
1375
  export declare interface ILineLegend extends ICommonLegend {
1376
+ /** Custom legend plugin and its target DOM container. */
780
1377
  customLegend?: ICommonCustomLegend<any>;
1378
+ /** Uses point symbols in legend entries. */
781
1379
  usePointStyle?: boolean;
782
1380
  }
783
1381
 
1382
+ /** Annotation configuration alias for the line-marker plugin. */
784
1383
  export declare type ILineMarkersAnnotation = TLineMarkersOptions;
785
1384
 
1385
+ /** LineChart bounds indexed by scale ID. */
786
1386
  export declare interface ILineRange {
787
1387
  [key: string]: ILineChartRange;
788
1388
  }
789
1389
 
1390
+ /** Compatibility annotation input normalized by BarChart. */
790
1391
  declare type ILooseBarAnnotation = Omit<DeepPartial<ICommonAnnotationsData>, 'annotationAxis'> & {
791
1392
  [key: string]: unknown;
1393
+ /** Axis on which `value` and `endValue` locate the annotation. */
792
1394
  annotationAxis?: string;
1395
+ /** Chart or annotation kind. */
793
1396
  type?: string;
1397
+ /** Numeric value or axis coordinate represented by this item. */
794
1398
  value?: number | string | null;
795
1399
  };
796
1400
 
1401
+ /** Compatibility input for a BarChart axis. */
797
1402
  declare type ILooseBarAxis = Omit<DeepPartial<ICommonAxis<string>>, 'gridLines'> & {
798
1403
  [key: string]: unknown;
1404
+ /** Grid-line configuration for this axis. */
799
1405
  gridLines?: unknown;
800
1406
  };
801
1407
 
1408
+ /** Permissive annotation input normalized by LineChart. */
802
1409
  declare type ILooseLineAnnotation = {
803
1410
  [key: string]: unknown;
1411
+ /** Identifier used to associate this configuration with its rendered element. */
804
1412
  id?: string;
1413
+ /** Display text associated with this element. */
805
1414
  label?: string;
1415
+ /** Canvas/CSS colour used by this element. */
806
1416
  color?: string;
1417
+ /** Canvas colour used for the element outline. */
807
1418
  borderColor?: string;
1419
+ /** Canvas fill colour; arrays provide per-element colours where supported. */
808
1420
  backgroundColor?: string;
1421
+ /** Outline width in canvas pixels. */
809
1422
  borderWidth?: number;
1423
+ /** Whether this element is visible. */
810
1424
  display?: boolean;
1425
+ /** Whether this annotation may expand the scale bounds to remain visible. */
811
1426
  adjustScaleRange?: boolean;
1427
+ /** Opacity multiplier between 0 (transparent) and 1 (opaque). */
812
1428
  opacity?: number;
1429
+ /** Excludes this entry from the legend where supported. */
813
1430
  hideLegend?: boolean;
1431
+ /** Pixel offset between the label and its associated geometry. */
814
1432
  labelOffsetPx?: number;
1433
+ /** Axis on which `value` and `endValue` locate the annotation. */
815
1434
  annotationAxis?: string;
1435
+ /** Chart or annotation kind. */
816
1436
  type?: string;
1437
+ /** Numeric value or axis coordinate represented by this item. */
817
1438
  value?: number | string | null;
1439
+ /** Lower X bound in scale units. */
818
1440
  xMin?: number | string | null;
1441
+ /** Upper X bound in scale units. */
819
1442
  xMax?: number | string | null;
1443
+ /** Lower Y bound in scale units. */
820
1444
  yMin?: number | string | null;
1445
+ /** Upper Y bound in scale units. */
821
1446
  yMax?: number | string | null;
1447
+ /** X coordinate in scale units. */
822
1448
  xValue?: number | string | null;
1449
+ /** Y coordinate in scale units. */
823
1450
  yValue?: number | string | null;
1451
+ /** Called when a drag starts. */
824
1452
  onDragStart?: (...args: unknown[]) => void;
1453
+ /** Called as the dragged value or annotation position changes. */
825
1454
  onDrag?: (...args: unknown[]) => void;
1455
+ /** Called when dragging ends. */
826
1456
  onDragEnd?: (...args: unknown[]) => void;
827
1457
  };
828
1458
 
1459
+ /** Compatibility input for a LineChart axis; known fields are normalized before rendering. */
829
1460
  declare type ILooseLineAxis = Omit<DeepPartial<ILineChartAxis<string>>, 'gridLines'> & {
830
1461
  [key: string]: unknown;
1462
+ /** Requested spacing between axis ticks, in scale units. */
831
1463
  stepSize?: unknown;
1464
+ /** Grid-line configuration for this axis. */
832
1465
  gridLines?: unknown;
833
1466
  };
834
1467
 
1468
+ /** Compatibility annotation input normalized by ScatterChart. */
835
1469
  declare type ILooseScatterAnnotation = Omit<DeepPartial<ICommonAnnotationsData>, 'annotationAxis'> & {
836
1470
  [key: string]: unknown;
1471
+ /** Axis on which `value` and `endValue` locate the annotation. */
837
1472
  annotationAxis?: string;
1473
+ /** Chart or annotation kind. */
838
1474
  type?: string;
1475
+ /** Numeric value or axis coordinate represented by this item. */
839
1476
  value?: number | string | null;
840
1477
  };
841
1478
 
1479
+ /** Compatibility input for a ScatterChart axis. */
842
1480
  declare type ILooseScatterAxis = DeepPartial<ICommonAxis<string>> & {
843
1481
  [key: string]: unknown;
844
1482
  };
845
1483
 
846
1484
  /**
847
- * Initialize the charts library with the provided configurations.
848
- * This function will store the configuration options in a config object.
849
- * @param {object} options - An object containing the configuration options for the library.
850
- * @param {object} options.translations - The translations to be used in the library.
851
- * @param {string} options.languageKey - The language key to be stored in the config object, used for translations.
852
- * @param {...object} options - Any additional options to be stored in the config object.
1485
+ * Updates the shared chart configuration, including the language and translated control labels.
1486
+ *
1487
+ * Call during application setup before rendering charts. Configuration is shared across chart instances;
1488
+ * this is not a per-chart configuration API. Each call sets the language key (default `en`) and updates
1489
+ * the supplied configuration entries. Non-primitive entries other than translations are shallow-copied.
1490
+ *
1491
+ * @param options - Language key, translations and other shared configuration entries.
1492
+ * @example
1493
+ * ```ts
1494
+ * initializeLineChart({ languageKey: 'en' });
1495
+ * ```
853
1496
  */
854
1497
  export declare const initializeLineChart: ({ languageKey, ...options }: {
855
1498
  [x: string]: any;
856
1499
  languageKey?: string | undefined;
857
1500
  }) => void;
858
1501
 
1502
+ /** Normalized PieChart input structure. */
859
1503
  export declare interface IPieChartData extends ICommonData {
1504
+ /** Values rendered by the chart or DS. */
860
1505
  data: IPieData;
1506
+ /** Configuration for this chart or generated element. */
861
1507
  options: IPieOptions;
862
1508
  }
863
1509
 
1510
+ /** Consumer-facing PieChart configuration; point input accepts numbers or partial value objects. */
864
1511
  export declare interface IPieChartDataInput extends Omit<IPieChartData, 'data' | 'options'> {
1512
+ /** Values rendered by the chart or DS. */
865
1513
  data?: Omit<DeepPartial<IPieChartData['data']>, 'datasets'> & {
1514
+ /** DS definitions in rendering order. */
866
1515
  datasets?: Array<(Omit<DeepPartial<IPieChartDataset>, 'data'> & {
1516
+ /** Values rendered by the chart or DS. */
867
1517
  data?: Array<DeepPartial<IPieDataValue> | number>;
868
1518
  [key: string]: unknown;
869
1519
  }) | object | null>;
870
1520
  };
1521
+ /** Configuration for this chart or generated element. */
871
1522
  options?: IPieOptionsInput;
872
1523
  }
873
1524
 
1525
+ /** Input pie DS containing object-form values. */
874
1526
  export declare interface IPieChartDataset extends ICommonDataset {
1527
+ /** Values rendered by the chart or DS. */
875
1528
  data: IPieDataValue[];
1529
+ /** Excludes this entry from the legend where supported. */
876
1530
  hideLegend?: boolean;
877
1531
  }
878
1532
 
1533
+ /** Props accepted by the PieChart React component. */
879
1534
  export declare interface IPieChartProps {
1535
+ /** Chart data and options. Omitted optional settings are resolved by the component defaults. */
880
1536
  chart: IPieChartDataInput;
1537
+ /** Legacy top-level field; use `chart.testId`, which is read by the component normalizer. */
881
1538
  testId?: string | null;
882
1539
  }
883
1540
 
1541
+ /** Pie labels, DS definitions and legacy unit metadata. */
884
1542
  export declare interface IPieData {
1543
+ /** Labels associated with the input data. */
885
1544
  labels?: string[];
1545
+ /** DS definitions in rendering order. */
886
1546
  datasets?: IPieChartDataset[];
1547
+ /** Legacy X-unit metadata on the input data object. */
887
1548
  xUnit?: string;
1549
+ /** Legacy Y-unit metadata on the input data object. */
888
1550
  yUnit?: string;
889
1551
  }
890
1552
 
1553
+ /** Object-form pie value with optional display styling and related labels. */
891
1554
  export declare interface IPieDataValue extends ICommonDataValue {
1555
+ /** Display text associated with this element. */
892
1556
  label: string;
1557
+ /** Outline width in canvas pixels. */
893
1558
  borderWidth: string | number;
1559
+ /** Numeric value or axis coordinate represented by this item. */
894
1560
  value: number;
1561
+ /** Canvas fill colour; arrays provide per-element colours where supported. */
895
1562
  backgroundColor?: string | string[];
1563
+ /** Canvas colour used for the element outline. */
896
1564
  borderColor?: string;
1565
+ /** Labels associated with the input data. */
897
1566
  labels: string[];
898
1567
  }
899
1568
 
1569
+ /** PieChart alias for generated legend label metadata. */
900
1570
  export declare type IPieGeneratedLabel = IChartGeneratedLabel;
901
1571
 
1572
+ /** Pie geometry and data-label rendering options. */
902
1573
  export declare interface IPieGraph {
1574
+ /** Draws labels on data elements. */
903
1575
  showDataLabels?: boolean;
1576
+ /** Enables stacked rendering where supported. */
904
1577
  stacked?: boolean;
1578
+ /** Inner radius of the pie: a pixel value or percentage string. Defaults to 0. */
905
1579
  cutout?: number | string;
906
1580
  }
907
1581
 
1582
+ /** PieChart legend configuration and DS-based visibility filtering. */
908
1583
  export declare interface IPieLegend extends ICommonLegend {
1584
+ /** Filters legend items using `hideLegend` on the DS at the corresponding item index. */
909
1585
  useDataset?: boolean;
910
1586
  }
911
1587
 
1588
+ /** PieChart alias for legend visibility metadata. */
912
1589
  export declare type IPieLegendItemFilter = IChartLegendItemFilter;
913
1590
 
1591
+ /** PieChart-specific options layered over the common chart options. */
914
1592
  export declare interface IPieOptions extends ICommonOptions {
1593
+ /** Geometry, grid and data-label rendering options. */
915
1594
  graph?: IPieGraph;
1595
+ /** Legend visibility, placement and custom rendering options. */
916
1596
  legend?: IPieLegend;
1597
+ /** Compatibility field; pie charts do not render Cartesian axes. */
917
1598
  axes?: unknown;
918
1599
  [key: string]: unknown;
919
1600
  }
920
1601
 
1602
+ /**
1603
+ * Partial PieChart options accepted at the component boundary.
1604
+ * Only settings supported by the pie normalizer affect rendering.
1605
+ */
921
1606
  export declare type IPieOptionsInput = Omit<DeepPartial<IPieOptions>, 'title' | 'graph' | 'legend' | 'chartStyling' | 'tooltip' | 'chartOptions' | 'interactions'> & {
922
1607
  [key: string]: unknown;
1608
+ /** Chart title; an array represents multiple lines. */
923
1609
  title?: unknown;
1610
+ /** Geometry, grid and data-label rendering options. */
924
1611
  graph?: DeepPartial<IPieGraph>;
1612
+ /** Legend visibility, placement and custom rendering options. */
925
1613
  legend?: Omit<DeepPartial<IPieLegend>, 'position' | 'align'> & {
1614
+ /** Visual placement of this element; does not select LineChart tooltip axes. */
926
1615
  position?: string;
1616
+ /** Alignment within the available layout space. */
927
1617
  align?: string;
928
1618
  [key: string]: unknown;
929
1619
  };
1620
+ /** Chart sizing and visual layout settings. */
930
1621
  chartStyling?: DeepPartial<ICommonStyling> & {
931
1622
  [key: string]: unknown;
932
1623
  };
1624
+ /** Tooltip visibility, formatting and supported callbacks. */
933
1625
  tooltip?: DeepPartial<ICommonTooltip>;
1626
+ /** Initial interaction and rendering controls. */
934
1627
  chartOptions?: DeepPartial<ICommonChartOptions>;
1628
+ /** Callbacks for legend and pointer interactions. */
935
1629
  interactions?: DeepPartial<ICommonOptions['interactions']> & {
936
1630
  [key: string]: unknown;
937
1631
  };
938
1632
  };
939
1633
 
1634
+ /** PieChart alias for data-label plugin settings. */
940
1635
  export declare type IPiesDataLabelsOptions = IChartDataLabelsOptions;
941
1636
 
1637
+ /** Ordered horizontal and vertical ScatterChart axis collections. */
942
1638
  export declare interface IScatterAxes {
1639
+ /** Horizontal axis definitions in order. */
943
1640
  x: ICommonAxis<'top' | 'bottom'>[];
1641
+ /** Vertical axis definitions in order. */
944
1642
  y: ICommonAxis<'left' | 'right'>[];
945
1643
  [key: string]: ICommonAxis[];
946
1644
  }
947
1645
 
1646
+ /** Normalized ScatterChart input structure. */
948
1647
  export declare interface IScatterChartData extends ICommonData {
1648
+ /** Values rendered by the chart or DS. */
949
1649
  data: IScatterData;
1650
+ /** Configuration for this chart or generated element. */
950
1651
  options: IScatterOptions;
951
1652
  }
952
1653
 
1654
+ /** Consumer-facing ScatterChart configuration with optional datasets and options. */
953
1655
  export declare interface IScatterChartDataInput extends Omit<IScatterChartData, 'data' | 'options'> {
1656
+ /** Values rendered by the chart or DS. */
954
1657
  data?: Omit<DeepPartial<IScatterChartData['data']>, 'datasets'> & {
1658
+ /** DS definitions in rendering order. */
955
1659
  datasets?: Array<DeepPartial<IScatterChartDataset> | object | null>;
956
1660
  };
1661
+ /** Configuration for this chart or generated element. */
957
1662
  options?: IScatterOptionsInput;
958
1663
  }
959
1664
 
1665
+ /** Input scatter DS and its legend visibility. */
960
1666
  export declare interface IScatterChartDataset extends ICommonDataset {
1667
+ /** Values rendered by the chart or DS. */
961
1668
  data: IScatterDataValue[];
1669
+ /** Excludes this entry from the legend where supported. */
962
1670
  hideLegend?: boolean;
963
1671
  }
964
1672
 
1673
+ /** Props accepted by the ScatterChart React component. */
965
1674
  export declare interface IScatterChartProps {
1675
+ /** Chart data and options. Omitted optional settings are resolved by the component defaults. */
966
1676
  chart: IScatterChartDataInput;
1677
+ /** Legacy top-level field; use `chart.testId`, which is read by the component normalizer. */
967
1678
  testId?: string | null;
968
1679
  }
969
1680
 
1681
+ /** Scatter labels, DS definitions and legacy unit metadata. */
970
1682
  export declare interface IScatterData {
1683
+ /** Labels associated with the input data. */
971
1684
  labels?: string[];
1685
+ /** DS definitions in rendering order. */
972
1686
  datasets?: IScatterChartDataset[];
1687
+ /** Legacy X-unit metadata on the input data object. */
973
1688
  xUnit?: string;
1689
+ /** Legacy Y-unit metadata on the input data object. */
974
1690
  yUnit?: string;
975
1691
  }
976
1692
 
1693
+ /** ScatterChart alias for data-label plugin settings. */
977
1694
  export declare type IScatterDataLabelsOptions = IChartDataLabelsOptions;
978
1695
 
1696
+ /** A scatter point with an optional display label. */
979
1697
  export declare interface IScatterDataValue extends ICommonDataValue {
1698
+ /** Display text associated with this element. */
980
1699
  label?: string;
981
1700
  }
982
1701
 
1702
+ /** ScatterChart alias for generated legend label metadata. */
983
1703
  export declare type IScatterGeneratedLabel = IChartGeneratedLabel;
984
1704
 
1705
+ /** ScatterChart grid and data-label rendering options. */
985
1706
  export declare interface IScatterGraph {
1707
+ /** Draws intermediate grid lines between the main ticks. */
986
1708
  showMinorGridlines?: boolean;
1709
+ /** Draws labels on data elements. */
987
1710
  showDataLabels?: boolean;
988
1711
  }
989
1712
 
1713
+ /** ScatterChart legend configuration and compatibility flags. */
990
1714
  export declare interface IScatterLegend extends ICommonLegend {
1715
+ /** Compatibility flag retained by the normalizer; currently does not change ScatterChart legend rendering. */
991
1716
  useDataset?: boolean;
992
1717
  }
993
1718
 
1719
+ /** ScatterChart alias for legend visibility metadata. */
994
1720
  export declare type IScatterLegendItemFilter = IChartLegendItemFilter;
995
1721
 
1722
+ /** ScatterChart options layered over common Cartesian settings. */
996
1723
  export declare interface IScatterOptions extends ICommonOptions {
1724
+ /** Geometry, grid and data-label rendering options. */
997
1725
  graph?: IScatterGraph;
1726
+ /** Legend visibility, placement and custom rendering options. */
998
1727
  legend?: IScatterLegend;
1728
+ /** Axis descriptions. Configure horizontal axes in `x` and vertical axes in `y`. */
999
1729
  axes?: IScatterAxes;
1730
+ /** Chart.js scale configuration keyed by scale ID. */
1000
1731
  scales?: ICommonScales;
1732
+ /** Scale behaviour, bounds and tick settings shared across the chart axes. */
1001
1733
  additionalAxesOptions?: ICommonAdditionalAxesOptions;
1734
+ /** Chart orientation. Support and interpretation depend on the chart component. */
1002
1735
  direction?: ChartDirection;
1003
1736
  }
1004
1737
 
1738
+ /**
1739
+ * Partial ScatterChart options accepted at the component boundary.
1740
+ * Unknown fields are accepted for compatibility, not guaranteed to be forwarded.
1741
+ */
1005
1742
  export declare type IScatterOptionsInput = Omit<DeepPartial<IScatterOptions>, 'title' | 'direction' | 'axes' | 'legend' | 'chartStyling' | 'interactions' | 'annotations' | 'scales'> & {
1006
1743
  [key: string]: unknown;
1744
+ /** Chart title; an array represents multiple lines. */
1007
1745
  title?: unknown;
1746
+ /** Chart orientation. Support and interpretation depend on the chart component. */
1008
1747
  direction?: string;
1748
+ /** Axis descriptions. Configure horizontal axes in `x` and vertical axes in `y`. */
1009
1749
  axes?: {
1750
+ /** Horizontal axis definitions in order. */
1010
1751
  x?: ILooseScatterAxis[];
1752
+ /** Vertical axis definitions in order. */
1011
1753
  y?: ILooseScatterAxis[];
1012
1754
  [key: string]: ILooseScatterAxis[] | undefined;
1013
1755
  };
1756
+ /** Chart.js scale configuration keyed by scale ID. */
1014
1757
  scales?: Record<string, unknown>;
1758
+ /** Legend visibility, placement and custom rendering options. */
1015
1759
  legend?: Omit<DeepPartial<IScatterLegend>, 'position' | 'align'> & {
1760
+ /** Visual placement of this element; does not select LineChart tooltip axes. */
1016
1761
  position?: string;
1762
+ /** Alignment within the available layout space. */
1017
1763
  align?: string;
1018
1764
  [key: string]: unknown;
1019
1765
  };
1766
+ /** Chart sizing and visual layout settings. */
1020
1767
  chartStyling?: {
1021
1768
  [key: string]: unknown;
1022
1769
  };
1770
+ /** Callbacks for legend and pointer interactions. */
1023
1771
  interactions?: DeepPartial<ICommonOptions['interactions']> & {
1772
+ /** Compatibility interaction input; configure zoom through `chartOptions.enableZoom`. */
1024
1773
  enableZoom?: boolean;
1774
+ /** Compatibility interaction input; configure pan through `chartOptions.enablePan`. */
1025
1775
  enablePan?: boolean;
1026
1776
  [key: string]: unknown;
1027
1777
  };
1778
+ /** Annotation visibility, interaction and geometry configuration. */
1028
1779
  annotations?: (Omit<DeepPartial<ICommonAnnotations>, 'annotationsData'> & {
1780
+ /** Annotation definitions in drawing order. */
1029
1781
  annotationsData?: ILooseScatterAnnotation[];
1030
1782
  }) | null;
1031
1783
  };
1032
1784
 
1785
+ /** ScatterChart tooltip settings resolved by its default-props helper. */
1033
1786
  export declare interface IScatterTooltip {
1787
+ /** Whether this feature is active. */
1034
1788
  enabled?: boolean;
1789
+ /** Enables hover tooltips. Defaults to true. */
1035
1790
  tooltips?: boolean;
1791
+ /** Includes the optional point label in supported tooltips. Defaults to false. */
1036
1792
  showLabelsInTooltips: boolean;
1793
+ /** Canvas fill colour; arrays provide per-element colours where supported. */
1037
1794
  backgroundColor?: string;
1795
+ /** Whether the tooltip includes colour swatches. */
1038
1796
  displayColors?: boolean;
1797
+ /** Allows scientific notation when formatting tooltip numbers. Defaults to true. */
1039
1798
  scientificNotation?: boolean;
1040
1799
  }
1041
1800
 
1801
+ /** Consumer-owned unit selector configuration. Selecting a unit does not itself convert input data. */
1042
1802
  export declare interface IUnitOptions {
1803
+ /** Available unit identifiers shown in the selector. */
1043
1804
  options: string[];
1805
+ /** Currently selected unit identifier. */
1044
1806
  selectedUnit: string;
1807
+ /** Notifies the consumer when another unit is selected; the consumer owns the selection. */
1045
1808
  setSelectedUnit: (value: string) => void;
1046
1809
  }
1047
1810
 
1811
+ /** Keyboard modifier identifiers used by chart interactions. */
1048
1812
  export declare enum Key {
1049
1813
  Shift = "Shift"
1050
1814
  }
1051
1815
 
1816
+ /**
1817
+ * Renders an interactive line chart with multiple axes, annotations, a legend and chart controls.
1818
+ *
1819
+ * Pass partial configuration through `chart`; omitted settings receive component defaults.
1820
+ * The example uses sample data, labels and a height of 320 pixels; these are not default values.
1821
+ *
1822
+ * @remarks
1823
+ * Defaults: bottom X axis, left Y axis, visible lines and points, bottom-left legend, and zoom enabled.
1824
+ * Pan, data labels, minor grid lines and annotations are disabled. No fixed width or height is assigned.
1825
+ * Performance mode is enabled by default, disabling animations.
1826
+ * The linked reference lists the complete normalized default configuration.
1827
+ *
1828
+ * @see https://gitlab.com/oliasoft-open-source/charts-library/-/blob/master/README.md#linechart
1829
+ *
1830
+ * @param props - Chart data and options, plus optional header, subheader and table content.
1831
+ * @returns The chart canvas and its associated UI.
1832
+ * @example
1833
+ * ```tsx
1834
+ * <LineChart chart={{
1835
+ * data: {
1836
+ * datasets: [{
1837
+ * label: 'DS A',
1838
+ * data: [{ x: 0, y: 10 }, { x: 1, y: 20 }, { x: 2, y: 15 }],
1839
+ * }],
1840
+ * },
1841
+ * options: {
1842
+ * axes: {
1843
+ * x: [{ label: 'X', position: 'bottom' }],
1844
+ * y: [{ label: 'Y', position: 'left' }],
1845
+ * },
1846
+ * chartStyling: { height: 320 },
1847
+ * legend: { display: true, position: 'bottom-left' },
1848
+ * graph: { lineTension: 0.01, showDataLabels: false },
1849
+ * chartOptions: { showLine: true, showPoints: true },
1850
+ * },
1851
+ * }} />
1852
+ * ```
1853
+ */
1052
1854
  export declare const LineChart: (props: ILineChartProps) => JSX.Element;
1053
1855
 
1856
+ /** Orientation of a line marker. */
1054
1857
  export declare enum LineMarkerDirection {
1055
1858
  Vertical = "vertical",
1056
1859
  Horizontal = "horizontal"
1057
1860
  }
1058
1861
 
1862
+ /** Label placement relative to a line marker. */
1059
1863
  export declare enum LineMarkerLabelPosition {
1060
1864
  Left = "left",
1061
1865
  Right = "right",
@@ -1064,17 +1868,20 @@ export declare enum LineMarkerLabelPosition {
1064
1868
  OnLine = "onLine"
1065
1869
  }
1066
1870
 
1871
+ /** Left/right attachment side for line markers. */
1067
1872
  export declare enum LineMarkerSide {
1068
1873
  Left = "left",
1069
1874
  Right = "right"
1070
1875
  }
1071
1876
 
1877
+ /** Horizontal alignment of marker label text. */
1072
1878
  export declare enum LineMarkerTextAlign {
1073
1879
  Left = "left",
1074
1880
  Right = "right",
1075
1881
  Center = "center"
1076
1882
  }
1077
1883
 
1884
+ /** Interaction mode identifiers; availability depends on the chart controls. */
1078
1885
  export declare enum PanZoomMode {
1079
1886
  X = "x",
1080
1887
  Y = "y",
@@ -1082,8 +1889,44 @@ export declare enum PanZoomMode {
1082
1889
  Z = "z"
1083
1890
  }
1084
1891
 
1892
+ /**
1893
+ * Renders pie segments with optional data labels, a legend and an inner cutout.
1894
+ *
1895
+ * Pass partial configuration through `chart`; omitted settings receive component defaults.
1896
+ * The example uses sample data, labels and a height of 320 pixels; these are not default values.
1897
+ *
1898
+ * @remarks
1899
+ * Defaults: a full pie (cutout 0), a bottom legend, and no fixed width or height.
1900
+ * Data labels, stacking, zoom and pan are disabled. Pie charts do not have Cartesian axes.
1901
+ * Performance mode is enabled by default, disabling animations.
1902
+ * The linked reference lists the complete normalized default configuration.
1903
+ *
1904
+ * @see https://gitlab.com/oliasoft-open-source/charts-library/-/blob/master/README.md#piechart
1905
+ *
1906
+ * @param props - Chart data and options.
1907
+ * @returns The chart canvas and its associated UI.
1908
+ * @example
1909
+ * ```tsx
1910
+ * <PieChart chart={{
1911
+ * data: {
1912
+ * labels: ['A', 'B', 'C'],
1913
+ * datasets: [{
1914
+ * label: 'DS A',
1915
+ * data: [10, 20, 15],
1916
+ * backgroundColor: ['#3366cc', '#dc3912', '#ff9900'],
1917
+ * }],
1918
+ * },
1919
+ * options: {
1920
+ * chartStyling: { height: 320 },
1921
+ * legend: { display: true, position: 'bottom' },
1922
+ * graph: { cutout: 0, showDataLabels: false },
1923
+ * },
1924
+ * }} />
1925
+ * ```
1926
+ */
1085
1927
  export declare const PieChart: (props: IPieChartProps) => JSX.Element;
1086
1928
 
1929
+ /** Point marker shapes compatible with Chart.js. */
1087
1930
  export declare enum PointStyle {
1088
1931
  Circle = "circle",
1089
1932
  Square = "rect",
@@ -1091,10 +1934,12 @@ export declare enum PointStyle {
1091
1934
  Triangle = "triangle"
1092
1935
  }
1093
1936
 
1937
+ /** Legacy point classification identifiers. */
1094
1938
  export declare enum PointType {
1095
1939
  Casing = "casing"
1096
1940
  }
1097
1941
 
1942
+ /** Legend/layout positions. Individual options accept only the positions relevant to their layout. */
1098
1943
  export declare enum Position {
1099
1944
  Bottom = "bottom",
1100
1945
  Top = "top",
@@ -1106,6 +1951,7 @@ export declare enum Position {
1106
1951
  BottomRight = "bottom-right"
1107
1952
  }
1108
1953
 
1954
+ /** Chart.js scale-family identifiers. */
1109
1955
  export declare enum ScaleType {
1110
1956
  Category = "category",
1111
1957
  Linear = "linear",
@@ -1114,123 +1960,259 @@ export declare enum ScaleType {
1114
1960
  TimeSeries = "timeseries"
1115
1961
  }
1116
1962
 
1963
+ /**
1964
+ * Renders Cartesian points with a legend, optional annotations and a background gradient.
1965
+ *
1966
+ * Pass partial configuration through `chart`; omitted settings receive component defaults.
1967
+ * The example uses sample data, labels and a height of 320 pixels; these are not default values.
1968
+ *
1969
+ * @remarks
1970
+ * Defaults: automatic width and height, a bottom-left legend, zero included in automatic scale bounds,
1971
+ * and annotations enabled. Zoom, pan, data labels, minor grid lines and the background gradient are disabled.
1972
+ * Performance mode is enabled by default, disabling animations.
1973
+ * The linked reference lists the complete normalized default configuration.
1974
+ *
1975
+ * @see https://gitlab.com/oliasoft-open-source/charts-library/-/blob/master/README.md#scatterchart
1976
+ *
1977
+ * @param props - Chart data and options.
1978
+ * @returns The chart canvas and its associated UI.
1979
+ * @example
1980
+ * ```tsx
1981
+ * <ScatterChart chart={{
1982
+ * data: {
1983
+ * datasets: [{
1984
+ * label: 'DS A',
1985
+ * data: [{ x: 1, y: 10 }, { x: 2, y: 20 }, { x: 3, y: 15 }],
1986
+ * }],
1987
+ * },
1988
+ * options: {
1989
+ * axes: {
1990
+ * x: [{ label: 'X', position: 'bottom' }],
1991
+ * y: [{ label: 'Y', position: 'left' }],
1992
+ * },
1993
+ * chartStyling: { height: 320 },
1994
+ * legend: { display: true, position: 'bottom-left' },
1995
+ * graph: { showDataLabels: false, showMinorGridlines: false },
1996
+ * },
1997
+ * }} />
1998
+ * ```
1999
+ */
1117
2000
  export declare const ScatterChart: (props: IScatterChartProps) => JSX.Element;
1118
2001
 
2002
+ /** Allowed positions for a Cartesian axis. */
1119
2003
  export declare type TAxisPosition = 'top' | 'bottom' | 'left' | 'right';
1120
2004
 
2005
+ /** Chart.js instance types used by the library's Cartesian chart helpers. */
1121
2006
  export declare type TChart = Chart<'bar', ICommonDataValue[]> | Chart<'line', ICommonDataValue[]> | Chart<'scatter', ICommonDataValue[]>;
1122
2007
 
2008
+ /** Generated BarChart DS collection. */
1123
2009
  export declare type TGenerateBarChartDatasets = IGenerateBarChartDataset[];
1124
2010
 
2011
+ /** Generated LineChart DS collection. */
1125
2012
  export declare type TGeneratedLineChartDatasets = IGeneratedLineChartDataset[];
1126
2013
 
2014
+ /** Generated PieChart DS collection. */
1127
2015
  export declare type TGeneratedPieChartDatasets = IGeneratedPieChartDataset[];
1128
2016
 
2017
+ /** Generated ScatterChart DS collection. */
1129
2018
  export declare type TGeneratedScatterChartDatasets = IGeneratedScatterChartDataset[];
1130
2019
 
2020
+ /** Orientation accepted by marker items. */
1131
2021
  export declare type TLineMarkerDirection = LineMarkerDirection;
1132
2022
 
2023
+ /**
2024
+ * One marker with optional endpoints, ticks and labels.
2025
+ * Item settings override the shared {@link TLineMarkersOptions} values.
2026
+ */
1133
2027
  export declare type TLineMarkerItem = {
2028
+ /** Identifier used to associate this configuration with its rendered element. */
1134
2029
  id?: string;
2030
+ /** Chart orientation. Support and interpretation depend on the chart component. */
1135
2031
  direction?: TLineMarkerDirection;
2032
+ /** Horizontal Chart.js scale ID used to resolve annotation coordinates. */
1136
2033
  xScaleID?: string;
2034
+ /** Vertical Chart.js scale ID used to resolve annotation coordinates. */
1137
2035
  yScaleID?: string;
2036
+ /** X coordinate in scale units. */
1138
2037
  xValue?: number;
2038
+ /** Y coordinate in scale units. */
1139
2039
  yValue?: number;
2040
+ /** Vertical start coordinate in scale units. */
1140
2041
  yStartValue?: number;
2042
+ /** Vertical end coordinate in scale units. */
1141
2043
  yEndValue?: number;
2044
+ /** Horizontal start coordinate in scale units. */
1142
2045
  xStartValue?: number;
2046
+ /** Horizontal end coordinate in scale units. */
1143
2047
  xEndValue?: number;
2048
+ /** Explicit marker length in pixels instead of a span derived from axis values. */
1144
2049
  lengthPx?: number;
2050
+ /** Numeric value or axis coordinate represented by this item. */
1145
2051
  value?: number;
2052
+ /** Display text associated with this element. */
1146
2053
  label?: string | string[];
2054
+ /** Canvas font specification used for the text. */
1147
2055
  font?: string;
2056
+ /** Pixel offset between the label and its associated geometry. */
1148
2057
  labelOffsetPx?: number;
2058
+ /** Attaches marker geometry to a chart edge. */
1149
2059
  stickToEdge?: boolean;
2060
+ /** Aligns marker geometry to the shared group anchor. */
1150
2061
  stickToGroup?: boolean;
2062
+ /** Chart edge used for attached markers. */
1151
2063
  stickSide?: TStickSide;
2064
+ /** Additional pixel offset from the shared marker group anchor. */
1152
2065
  groupOffsetPx?: number;
2066
+ /** Reverses the relevant scale or marker direction. */
1153
2067
  reverse?: boolean;
2068
+ /** Canvas/CSS colour used by this element. */
1154
2069
  color?: string;
2070
+ /** Opacity multiplier between 0 (transparent) and 1 (opaque). */
1155
2071
  opacity?: number;
2072
+ /** Stroke width in canvas pixels. */
1156
2073
  lineWidth?: number;
2074
+ /** Alternating marker dash and gap lengths in pixels. */
1157
2075
  lineDash?: number[];
2076
+ /** Tick and label configuration for the marker start. */
1158
2077
  startTick?: TLineMarkerTick;
2078
+ /** Tick and label configuration for the marker end. */
1159
2079
  endTick?: TLineMarkerTick;
2080
+ /** Additional ticks or branches attached to this marker. */
1160
2081
  extras?: TMarkerExtraItem[];
2082
+ /** Whether this element is visible. */
1161
2083
  display?: boolean;
1162
2084
  };
1163
2085
 
2086
+ /** Placement accepted by marker tick labels. */
1164
2087
  export declare type TLineMarkerLabelPosition = LineMarkerLabelPosition;
1165
2088
 
2089
+ /**
2090
+ * Shared marker defaults and marker items.
2091
+ * Configure through `options.annotations.lineMarkersAnnotation`.
2092
+ */
1166
2093
  export declare type TLineMarkersOptions = {
2094
+ /** Whether this feature is active. */
1167
2095
  enabled?: boolean;
2096
+ /** Spacing between grouped marker items in pixels. */
1168
2097
  itemGapPx?: number;
2098
+ /** Gap between edge-attached markers and the chart boundary, in pixels. */
1169
2099
  edgePaddingPx?: number;
2100
+ /** Default length of horizontal marker lines in pixels. */
1170
2101
  horizontalLineLengthPx?: number;
2102
+ /** Default orientation for marker items. */
1171
2103
  lineDirection?: TLineMarkerDirection;
2104
+ /** Vertical clearance used when resolving marker label overlaps, in pixels. */
1172
2105
  labelCollisionPx?: number;
2106
+ /** Horizontal distance used to cluster potentially overlapping marker labels, in pixels. */
1173
2107
  labelCollisionClusterXPx?: number;
2108
+ /** Adjusts marker label placement to reduce overlaps. */
1174
2109
  enableLabelCollisionResolver?: boolean;
2110
+ /** Attaches marker geometry to a chart edge. */
1175
2111
  stickToEdge?: boolean;
2112
+ /** Aligns marker geometry to the shared group anchor. */
1176
2113
  stickToGroup?: boolean;
2114
+ /** Chart edge used for attached markers. */
1177
2115
  stickSide?: TStickSide;
2116
+ /** Reverses the relevant scale or marker direction. */
1178
2117
  reverse?: boolean;
2118
+ /** X coordinate in scale units. */
1179
2119
  xValue?: number;
2120
+ /** Y coordinate in scale units. */
1180
2121
  yValue?: number;
2122
+ /** Vertical end coordinate in scale units. */
1181
2123
  yEndValue?: number;
2124
+ /** Horizontal start coordinate in scale units. */
1182
2125
  xStartValue?: number;
2126
+ /** Horizontal end coordinate in scale units. */
1183
2127
  xEndValue?: number;
2128
+ /** Explicit marker length in pixels instead of a span derived from axis values. */
1184
2129
  lengthPx?: number;
2130
+ /** Vertical start coordinate in scale units. */
1185
2131
  yStartValue?: number;
2132
+ /** Canvas/CSS colour used by this element. */
1186
2133
  color?: string;
2134
+ /** Opacity multiplier between 0 (transparent) and 1 (opaque). */
1187
2135
  opacity?: number;
2136
+ /** Stroke width in canvas pixels. */
1188
2137
  lineWidth?: number;
2138
+ /** Alternating marker dash and gap lengths in pixels. */
1189
2139
  lineDash?: number[];
2140
+ /** Tick and label configuration for the marker start. */
1190
2141
  startTick?: TLineMarkerTick;
2142
+ /** Tick and label configuration for the marker end. */
1191
2143
  endTick?: TLineMarkerTick;
2144
+ /** Marker definitions; item settings override the shared marker settings. */
1192
2145
  items?: TLineMarkerItem[];
1193
2146
  };
1194
2147
 
2148
+ /** Text alignment accepted by marker label helpers. */
1195
2149
  export declare type TLineMarkerTextAlign = LineMarkerTextAlign;
1196
2150
 
2151
+ /** Tick styling and optional text at a marker endpoint. */
1197
2152
  export declare type TLineMarkerTick = {
2153
+ /** Whether this feature is active. */
1198
2154
  enabled?: boolean;
2155
+ /** Display text associated with this element. */
1199
2156
  label?: string | string[];
2157
+ /** Canvas/CSS colour used by this element. */
1200
2158
  color?: string;
2159
+ /** Canvas font specification used for the text. */
1201
2160
  font?: string;
2161
+ /** Pixel offset between the label and its associated geometry. */
1202
2162
  labelOffsetPx?: number;
2163
+ /** Label placement relative to the marker or tick. */
1203
2164
  labelPosition?: TLineMarkerLabelPosition;
2165
+ /** Side on which the marker tick or branch is drawn. */
1204
2166
  side?: TStickSide;
2167
+ /** Reverses the relevant scale or marker direction. */
1205
2168
  reverse?: boolean;
2169
+ /** Tick size in pixels. */
1206
2170
  sizePx?: number;
1207
2171
  };
1208
2172
 
2173
+ /** Additional tick or branch attached to a line marker. */
1209
2174
  export declare type TMarkerExtraItem = {
2175
+ /** Identifier used to associate this configuration with its rendered element. */
1210
2176
  id?: string;
2177
+ /** Whether this element is visible. */
1211
2178
  display?: boolean;
2179
+ /** Vertical Chart.js scale ID used to resolve annotation coordinates. */
1212
2180
  yScaleID?: string;
2181
+ /** Y coordinate in scale units. */
1213
2182
  yValue?: number;
2183
+ /** Numeric value or axis coordinate represented by this item. */
1214
2184
  value?: number;
2185
+ /** Explicit marker length in pixels instead of a span derived from axis values. */
1215
2186
  lengthPx?: number;
2187
+ /** Side on which the marker tick or branch is drawn. */
1216
2188
  side?: TStickSide;
2189
+ /** Reverses the relevant scale or marker direction. */
1217
2190
  reverse?: boolean;
2191
+ /** Canvas/CSS colour used by this element. */
1218
2192
  color?: string;
2193
+ /** Opacity multiplier between 0 (transparent) and 1 (opaque). */
1219
2194
  opacity?: number;
2195
+ /** Stroke width in canvas pixels. */
1220
2196
  lineWidth?: number;
2197
+ /** Alternating marker dash and gap lengths in pixels. */
1221
2198
  lineDash?: number[];
2199
+ /** Tick and label settings for this extra marker branch. */
1222
2200
  tick?: TLineMarkerTick;
1223
2201
  };
1224
2202
 
2203
+ /** Legacy tooltip label keys. */
1225
2204
  export declare enum TooltipLabel {
1226
2205
  Y = "yLabel",
1227
2206
  X = "xLabel"
1228
2207
  }
1229
2208
 
2209
+ /** Primitive configuration values excluding undefined. */
1230
2210
  export declare type TPrimitive = string | number | boolean | null;
1231
2211
 
2212
+ /** Attachment side accepted by marker options. */
1232
2213
  export declare type TStickSide = LineMarkerSide;
1233
2214
 
2215
+ /** Placeholder for a callback parameter whose runtime value is intentionally unspecified. */
1234
2216
  export declare type UnusedParameter = unknown;
1235
2217
 
1236
2218
  export { }
@@ -1238,9 +2220,7 @@ export { }
1238
2220
 
1239
2221
  declare module 'chart.js' {
1240
2222
  interface PluginOptionsByType<TType extends ChartType> {
1241
- calloutConnectorPlugin?: {
1242
- enableCalloutAnnotation?: boolean;
1243
- };
2223
+ annotationDraggerPlugin?: AnnotationDraggerPluginOptions;
1244
2224
  }
1245
2225
  }
1246
2226
 
@@ -1256,7 +2236,9 @@ declare module 'chart.js' {
1256
2236
 
1257
2237
  declare module 'chart.js' {
1258
2238
  interface PluginOptionsByType<TType extends ChartType> {
1259
- annotationDraggerPlugin?: AnnotationDraggerPluginOptions;
2239
+ calloutConnectorPlugin?: {
2240
+ enableCalloutAnnotation?: boolean;
2241
+ };
1260
2242
  }
1261
2243
  }
1262
2244