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