@oliasoft-open-source/charts-library 5.0.0-beta-2 → 5.0.0-beta-3
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/bar-chart/bar-chart-const.d.ts +2 -0
- package/dist/bar-chart/bar-chart-default-props.d.ts +2 -0
- package/dist/bar-chart/bar-chart.d.ts +3 -0
- package/dist/bar-chart/bar-chart.interface.d.ts +96 -0
- package/dist/bar-chart/utils/get-bar-chart-data-labels.d.ts +10 -0
- package/dist/bar-chart/utils/get-bar-chart-scales.d.ts +3 -0
- package/dist/bar-chart/utils/get-bar-chart-tooltips.d.ts +6 -0
- package/dist/bar-chart/utils/use-bar-chart-config.d.ts +13 -0
- package/dist/bar-chart/utils/use-bar-chart-options.d.ts +55 -0
- package/dist/common/common.interface.d.ts +206 -0
- package/dist/common/controls-portal.d.ts +7 -0
- package/dist/common/enums.d.ts +10 -0
- package/dist/common/helpers/chart-border-plugin.d.ts +16 -0
- package/dist/common/helpers/chart-consts.d.ts +39 -0
- package/dist/common/helpers/chart-utils.d.ts +84 -0
- package/dist/common/helpers/container.d.ts +18 -0
- package/dist/common/helpers/custom-format-number.d.ts +1 -0
- package/dist/common/helpers/download-pgn.d.ts +4 -0
- package/dist/common/helpers/enums.d.ts +80 -0
- package/dist/common/helpers/get-chart-annotation.d.ts +90 -0
- package/dist/common/helpers/get-custom-legend-plugin-example.d.ts +8 -0
- package/dist/common/helpers/get-draggableData.d.ts +18 -0
- package/dist/common/helpers/range/estimate-data-series-have-close-values.d.ts +8 -0
- package/dist/common/helpers/range/range.d.ts +33 -0
- package/dist/common/helpers/text.d.ts +1 -0
- package/dist/common/helpers/to-annotation.d.ts +4 -0
- package/dist/common/hooks/use-generated-labels.d.ts +4 -0
- package/dist/common/hooks/use-legend-state.d.ts +28 -0
- package/dist/common/hooks/use-legend.d.ts +4 -0
- package/dist/common/hooks/use-reset.d.ts +3 -0
- package/dist/common/legend-component/legend-dropzone.d.ts +3 -0
- package/dist/common/legend-component/legend-interface.d.ts +48 -0
- package/dist/common/legend-component/legend-item/LegendItemLine.d.ts +5 -0
- package/dist/common/legend-component/legend-item/legend-item.d.ts +3 -0
- package/dist/common/legend-component/legend-panel.d.ts +3 -0
- package/dist/common/legend-component/legend.d.ts +3 -0
- package/dist/common/legend-component/state/legend-action-types.d.ts +2 -0
- package/dist/common/legend-component/state/legend-context.d.ts +12 -0
- package/dist/common/legend-component/state/legend-state-reducer.d.ts +26 -0
- package/dist/common/legend-component/utils/create-style-object.d.ts +27 -0
- package/dist/common/legend-component/utils/get-generated-labels.d.ts +2 -0
- package/dist/common/plugins/annotation-dragger-plugin/annotation-dragger-plugin.d.ts +15 -0
- package/dist/common/plugins/annotation-dragger-plugin/enums.d.ts +20 -0
- package/dist/common/plugins/annotation-dragger-plugin/event-helpers.d.ts +6 -0
- package/dist/common/plugins/annotation-dragger-plugin/helpers.d.ts +53 -0
- package/dist/common/plugins/annotation-dragger-plugin/point-annotation-label.d.ts +5 -0
- package/dist/common/plugins/gradient-background-plugin/enums.d.ts +10 -0
- package/dist/common/plugins/gradient-background-plugin/gradient-background-plugin.d.ts +2 -0
- package/dist/index.d.ts +1 -8
- package/dist/line-chart/constants/default-translations.d.ts +25 -0
- package/dist/line-chart/constants/line-chart-consts.d.ts +13 -0
- package/dist/line-chart/controls/axes-options/action-types.d.ts +5 -0
- package/dist/line-chart/controls/axes-options/axes-options-form-state.d.ts +23 -0
- package/dist/line-chart/controls/axes-options/axes-options-interfaces.d.ts +54 -0
- package/dist/line-chart/controls/axes-options/axes-options.d.ts +6 -0
- package/dist/line-chart/controls/controls-interfaces.d.ts +20 -0
- package/dist/line-chart/controls/controls.d.ts +6 -0
- package/dist/line-chart/controls/drag-options-interfaces.d.ts +14 -0
- package/dist/line-chart/controls/drag-options.d.ts +23 -0
- package/dist/line-chart/controls/line-options.d.ts +19 -0
- package/dist/line-chart/hooks/use-chart-functions.d.ts +32 -0
- package/dist/line-chart/hooks/use-chart-options.d.ts +16 -0
- package/dist/line-chart/hooks/use-chart-plugins.d.ts +7 -0
- package/dist/line-chart/hooks/use-chart-state.d.ts +17 -0
- package/dist/line-chart/hooks/use-toggle-handler.d.ts +12 -0
- package/dist/line-chart/initialize/config.d.ts +12 -0
- package/dist/line-chart/initialize/initialize-line-chart.d.ts +12 -0
- package/dist/line-chart/line-chart-get-default-props.d.ts +2 -0
- package/dist/line-chart/line-chart.d.ts +3 -0
- package/dist/line-chart/line-chart.interface.d.ts +146 -0
- package/dist/line-chart/plugins/chart-area-text-plugin.d.ts +17 -0
- package/dist/line-chart/plugins/line-chart.minor-gridlines-plugin.d.ts +8 -0
- package/dist/line-chart/plugins/plugin-constants.d.ts +11 -0
- package/dist/line-chart/plugins/plugins.interface.d.ts +9 -0
- package/dist/line-chart/state/action-types.d.ts +12 -0
- package/dist/line-chart/state/initial-state.d.ts +14 -0
- package/dist/line-chart/state/line-chart-reducer.d.ts +2 -0
- package/dist/line-chart/state/manage-state-in-local-storage.d.ts +15 -0
- package/dist/line-chart/state/state.interfaces.d.ts +34 -0
- package/dist/line-chart/utils/axis-formatting/axis-formatting.d.ts +2 -0
- package/dist/line-chart/utils/axis-scales/axis-scales.d.ts +11 -0
- package/dist/line-chart/utils/check-custom-option/check-custom-option.d.ts +12 -0
- package/dist/line-chart/utils/datalabels-alignment/datalabels-alignment.interface.d.ts +20 -0
- package/dist/line-chart/utils/datalabels-alignment/get-alignment-condition.d.ts +8 -0
- package/dist/line-chart/utils/datalabels-alignment/get-alignment-data.d.ts +11 -0
- package/dist/line-chart/utils/datalabels-alignment/get-datalabels-position.d.ts +6 -0
- package/dist/line-chart/utils/enums.d.ts +4 -0
- package/dist/line-chart/utils/generate-line-chart-datasets.d.ts +8 -0
- package/dist/line-chart/utils/get-annotations-data.d.ts +1 -0
- package/dist/line-chart/utils/get-axes-data-from-metasets.d.ts +1 -0
- package/dist/line-chart/utils/get-axes-ranges-from-chart.d.ts +9 -0
- package/dist/line-chart/utils/get-axis-range-by-type.d.ts +10 -0
- package/dist/line-chart/utils/get-generated-labels.d.ts +2 -0
- package/dist/line-chart/utils/get-line-chart-data-labels.d.ts +19 -0
- package/dist/line-chart/utils/get-line-chart-scales.d.ts +4 -0
- package/dist/line-chart/utils/get-line-chart-tooltips.d.ts +20 -0
- package/dist/line-chart/utils/line-chart-utils.d.ts +32 -0
- package/dist/line-chart/utils/translations/get-translations.d.ts +8 -0
- package/dist/pie-chart/pie-chart-defalut-props.interface.d.ts +50 -0
- package/dist/pie-chart/pie-chart-get-default-props.d.ts +3 -0
- package/dist/pie-chart/pie-chart.d.ts +3 -0
- package/dist/pie-chart/pie-chart.interface.d.ts +70 -0
- package/dist/pie-chart/use-pie-chart-config.d.ts +41 -0
- package/dist/project.json +1 -1
- package/dist/scatter-chart/hooks/use-scatter-chart-config.d.ts +113 -0
- package/dist/scatter-chart/scatter-chart-default-props.interface.d.ts +71 -0
- package/dist/scatter-chart/scatter-chart-get-default-props.d.ts +3 -0
- package/dist/scatter-chart/scatter-chart.d.ts +3 -0
- package/dist/scatter-chart/scatter-chart.interface.d.ts +81 -0
- package/dist/scatter-chart/utils/get-scales-config.d.ts +49 -0
- package/dist/scatter-chart/utils/get-tooltip-config.d.ts +21 -0
- 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 +2 -0
- package/dist/src/components/bar-chart/bar-chart.d.ts +3 -0
- package/dist/src/components/bar-chart/bar-chart.interface.d.ts +96 -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 +3 -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 +55 -0
- package/dist/src/components/common/common.interface.d.ts +206 -0
- package/dist/src/components/common/controls-portal.d.ts +7 -0
- package/dist/src/components/common/enums.d.ts +10 -0
- package/dist/src/components/common/helpers/chart-border-plugin.d.ts +16 -0
- package/dist/src/components/common/helpers/chart-consts.d.ts +39 -0
- package/dist/src/components/common/helpers/chart-utils.d.ts +84 -0
- package/dist/src/components/common/helpers/container.d.ts +18 -0
- package/dist/src/components/common/helpers/custom-format-number.d.ts +1 -0
- package/dist/src/components/common/helpers/download-pgn.d.ts +4 -0
- package/dist/src/components/common/helpers/enums.d.ts +80 -0
- package/dist/src/components/common/helpers/get-chart-annotation.d.ts +90 -0
- package/dist/src/components/common/helpers/get-custom-legend-plugin-example.d.ts +8 -0
- package/dist/src/components/common/helpers/get-draggableData.d.ts +18 -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/text.d.ts +1 -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-reset.d.ts +3 -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 +48 -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.d.ts +3 -0
- package/dist/src/components/common/legend-component/state/legend-action-types.d.ts +2 -0
- package/dist/src/components/common/legend-component/state/legend-context.d.ts +12 -0
- package/dist/src/components/common/legend-component/state/legend-state-reducer.d.ts +26 -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 +2 -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/enums.d.ts +20 -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/gradient-background-plugin/enums.d.ts +10 -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/action-types.d.ts +5 -0
- package/dist/src/components/line-chart/controls/axes-options/axes-options-form-state.d.ts +23 -0
- package/dist/src/components/line-chart/controls/axes-options/axes-options-interfaces.d.ts +54 -0
- package/dist/src/components/line-chart/controls/axes-options/axes-options.d.ts +6 -0
- package/dist/src/components/line-chart/controls/controls-interfaces.d.ts +20 -0
- package/dist/src/components/line-chart/controls/controls.d.ts +6 -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 +16 -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 +17 -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 +12 -0
- package/dist/src/components/line-chart/line-chart-get-default-props.d.ts +2 -0
- package/dist/src/components/line-chart/line-chart.d.ts +3 -0
- package/dist/src/components/line-chart/line-chart.interface.d.ts +146 -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/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/initial-state.d.ts +14 -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 +34 -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 +11 -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 +1 -0
- package/dist/src/components/line-chart/utils/get-axes-data-from-metasets.d.ts +1 -0
- package/dist/src/components/line-chart/utils/get-axes-ranges-from-chart.d.ts +9 -0
- package/dist/src/components/line-chart/utils/get-axis-range-by-type.d.ts +10 -0
- package/dist/src/components/line-chart/utils/get-generated-labels.d.ts +2 -0
- package/dist/src/components/line-chart/utils/get-line-chart-data-labels.d.ts +19 -0
- package/dist/src/components/line-chart/utils/get-line-chart-scales.d.ts +4 -0
- package/dist/src/components/line-chart/utils/get-line-chart-tooltips.d.ts +20 -0
- package/dist/src/components/line-chart/utils/line-chart-utils.d.ts +32 -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 +3 -0
- package/dist/src/components/pie-chart/pie-chart.interface.d.ts +70 -0
- package/dist/src/components/pie-chart/use-pie-chart-config.d.ts +41 -0
- package/dist/src/components/scatter-chart/hooks/use-scatter-chart-config.d.ts +113 -0
- package/dist/src/components/scatter-chart/scatter-chart-default-props.interface.d.ts +71 -0
- package/dist/src/components/scatter-chart/scatter-chart-get-default-props.d.ts +3 -0
- package/dist/src/components/scatter-chart/scatter-chart.d.ts +3 -0
- package/dist/src/components/scatter-chart/scatter-chart.interface.d.ts +81 -0
- package/dist/src/components/scatter-chart/utils/get-scales-config.d.ts +49 -0
- package/dist/src/components/scatter-chart/utils/get-tooltip-config.d.ts +21 -0
- package/package.json +3 -2
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { ChartDataset } from 'chart.js';
|
|
2
|
+
import { ICommonAdditionalAxesOptions, ICommonAnnotations, ICommonAnnotationsData, ICommonAxis, ICommonChartOptions, ICommonCustomLegend, ICommonData, ICommonDataset, ICommonDataValue, ICommonDragData, ICommonGraph, ICommonInteractions, ICommonLegend, ICommonOptions, ICommonScales, ICommonStyling, ICommonTooltip } from '../common/common.interface';
|
|
3
|
+
import { IChartGraph } from '../common/helpers/chart-utils';
|
|
4
|
+
import { ChartType } from '../common/helpers/enums';
|
|
5
|
+
export interface IBarStyling extends ICommonStyling {
|
|
6
|
+
squareAspectRatio?: boolean;
|
|
7
|
+
layoutPadding?: string | number | {
|
|
8
|
+
top: number;
|
|
9
|
+
bottom: number;
|
|
10
|
+
left: number;
|
|
11
|
+
right: number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface IBarLegend extends ICommonLegend {
|
|
15
|
+
customLegend?: ICommonCustomLegend<any>;
|
|
16
|
+
}
|
|
17
|
+
export interface IBarAxes {
|
|
18
|
+
x: ICommonAxis<'top' | 'bottom'>[];
|
|
19
|
+
y: ICommonAxis<'left' | 'right'>[];
|
|
20
|
+
[key: string]: ICommonAxis[];
|
|
21
|
+
}
|
|
22
|
+
export interface IBarAdditionalAxesOptions extends ICommonAdditionalAxesOptions {
|
|
23
|
+
stackedX?: boolean;
|
|
24
|
+
stackedY?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface IBarOptions extends ICommonOptions {
|
|
27
|
+
direction: 'vertical' | 'horizontal';
|
|
28
|
+
axes: IBarAxes;
|
|
29
|
+
scales?: ICommonScales;
|
|
30
|
+
additionalAxesOptions?: IBarAdditionalAxesOptions;
|
|
31
|
+
chartStyling: IBarStyling;
|
|
32
|
+
graph?: ICommonGraph;
|
|
33
|
+
annotations?: ICommonAnnotations;
|
|
34
|
+
legend?: IBarLegend;
|
|
35
|
+
dragData?: ICommonDragData;
|
|
36
|
+
}
|
|
37
|
+
export interface IBarChartDataset extends ICommonDataset {
|
|
38
|
+
isAnnotation?: boolean;
|
|
39
|
+
annotationIndex?: number;
|
|
40
|
+
borderSkipped?: boolean;
|
|
41
|
+
borderRadius?: number;
|
|
42
|
+
xAxisID?: string;
|
|
43
|
+
yAxisID?: string;
|
|
44
|
+
hidden?: boolean;
|
|
45
|
+
displayGroup?: string | number;
|
|
46
|
+
type?: ChartType.Bar;
|
|
47
|
+
}
|
|
48
|
+
export interface IBarChartBaseData {
|
|
49
|
+
labels: string[];
|
|
50
|
+
datasets: IBarChartDataset[];
|
|
51
|
+
}
|
|
52
|
+
export interface IBarChartData extends ICommonData {
|
|
53
|
+
testId?: string;
|
|
54
|
+
controlsPortalId?: string;
|
|
55
|
+
data: IBarChartBaseData;
|
|
56
|
+
options: IBarOptions;
|
|
57
|
+
}
|
|
58
|
+
export interface IBarChartProps {
|
|
59
|
+
chart: IBarChartData;
|
|
60
|
+
}
|
|
61
|
+
export interface IBarDefaultProps {
|
|
62
|
+
testId: string;
|
|
63
|
+
controlsPortalId: string;
|
|
64
|
+
data: IBarChartBaseData;
|
|
65
|
+
options: {
|
|
66
|
+
title?: string | string[];
|
|
67
|
+
direction: 'vertical' | 'horizontal';
|
|
68
|
+
axes: IBarAxes;
|
|
69
|
+
additionalAxesOptions: IBarAdditionalAxesOptions;
|
|
70
|
+
chartStyling: IBarStyling;
|
|
71
|
+
tooltip: ICommonTooltip;
|
|
72
|
+
graph: IChartGraph;
|
|
73
|
+
scales?: ICommonScales;
|
|
74
|
+
annotations: {
|
|
75
|
+
showAnnotations: boolean;
|
|
76
|
+
controlAnnotation: boolean;
|
|
77
|
+
annotationsData: ICommonAnnotationsData[];
|
|
78
|
+
};
|
|
79
|
+
legend: IBarLegend;
|
|
80
|
+
chartOptions: ICommonChartOptions;
|
|
81
|
+
interactions: ICommonInteractions;
|
|
82
|
+
dragData: ICommonDragData;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
export interface IGenerateBarChartDataset extends ChartDataset<'bar', ICommonDataValue[]> {
|
|
86
|
+
borderColor: string;
|
|
87
|
+
backgroundColor: string | string[];
|
|
88
|
+
borderDash?: number[];
|
|
89
|
+
borderWidth?: number;
|
|
90
|
+
annotationType?: string;
|
|
91
|
+
hideLegend?: boolean;
|
|
92
|
+
displayGroup?: string | number;
|
|
93
|
+
isAnnotation?: boolean;
|
|
94
|
+
annotationIndex?: number;
|
|
95
|
+
}
|
|
96
|
+
export type TGenerateBarChartDatasets = IGenerateBarChartDataset[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IBarOptions } from '../bar-chart.interface.ts';
|
|
2
|
+
type ExtendedDisplayOptions = 'auto' | boolean;
|
|
3
|
+
export interface IExtendedDataLabelsOptions {
|
|
4
|
+
display: ExtendedDisplayOptions;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Returns the data labels configuration for a bar chart.
|
|
8
|
+
*/
|
|
9
|
+
declare const getBarChartDataLabels: (options: IBarOptions) => IExtendedDataLabelsOptions;
|
|
10
|
+
export default getBarChartDataLabels;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RefObject } from '../../../../node_modules/react';
|
|
2
|
+
import { ActiveElement, Chart, ChartEvent } from 'chart.js';
|
|
3
|
+
import { IBarDefaultProps, IBarOptions, TGenerateBarChartDatasets } from '../bar-chart.interface';
|
|
4
|
+
import { ICommonHoveredItems } from '../../common/common.interface';
|
|
5
|
+
export interface IGenerateBarChartDatasetsProps {
|
|
6
|
+
datasets: TGenerateBarChartDatasets;
|
|
7
|
+
options: IBarOptions;
|
|
8
|
+
}
|
|
9
|
+
export declare const useBarChartConfig: (chartRef: RefObject<Chart>, chart: IBarDefaultProps) => {
|
|
10
|
+
generatedDatasets: TGenerateBarChartDatasets;
|
|
11
|
+
onClick: (_evt: ChartEvent, _elements: ActiveElement[], chartInstance: Chart) => void;
|
|
12
|
+
onHover: (evt: ChartEvent, hoveredItems: ICommonHoveredItems[]) => void;
|
|
13
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { MutableRefObject } from '../../../../node_modules/react';
|
|
2
|
+
import { Chart } from 'chart.js';
|
|
3
|
+
import { AxisType, ChartHoverMode } from '../../common/helpers/enums';
|
|
4
|
+
import { IBarDefaultProps } from '../bar-chart.interface';
|
|
5
|
+
export interface IUseBarChartOptionsProps {
|
|
6
|
+
chart: IBarDefaultProps;
|
|
7
|
+
chartRef: MutableRefObject<Chart | null>;
|
|
8
|
+
}
|
|
9
|
+
export declare const useBarChartOptions: ({ chart, chartRef, }: IUseBarChartOptionsProps) => {
|
|
10
|
+
onClick: (_evt: import('chart.js').ChartEvent, _elements: import('chart.js').ActiveElement[], chartInstance: Chart) => void;
|
|
11
|
+
onHover: (evt: import('chart.js').ChartEvent, hoveredItems: import('../../common/common.interface').ICommonHoveredItems[]) => void;
|
|
12
|
+
indexAxis: AxisType;
|
|
13
|
+
maintainAspectRatio: boolean | undefined;
|
|
14
|
+
animation: false | {
|
|
15
|
+
duration: number;
|
|
16
|
+
} | undefined;
|
|
17
|
+
hover: {
|
|
18
|
+
mode: ChartHoverMode;
|
|
19
|
+
intersect: boolean;
|
|
20
|
+
};
|
|
21
|
+
scales: any;
|
|
22
|
+
plugins: {
|
|
23
|
+
title: {
|
|
24
|
+
display: boolean;
|
|
25
|
+
text: string | string[] | undefined;
|
|
26
|
+
} | {
|
|
27
|
+
display?: undefined;
|
|
28
|
+
text?: undefined;
|
|
29
|
+
};
|
|
30
|
+
datalabels: import('./get-bar-chart-data-labels').IExtendedDataLabelsOptions;
|
|
31
|
+
annotation: {
|
|
32
|
+
annotations: {};
|
|
33
|
+
};
|
|
34
|
+
tooltip: Record<string, any>;
|
|
35
|
+
legend: {
|
|
36
|
+
display: boolean;
|
|
37
|
+
events: never[];
|
|
38
|
+
position: any;
|
|
39
|
+
align: "center" | "start" | "end";
|
|
40
|
+
labels: {
|
|
41
|
+
boxHeight: number;
|
|
42
|
+
boxWidth: number | undefined;
|
|
43
|
+
usePointStyle: boolean | undefined;
|
|
44
|
+
};
|
|
45
|
+
onClick: (_: import('../../common/common.interface').UnusedParameter, legendItem: import('chart.js').LegendItem) => void;
|
|
46
|
+
};
|
|
47
|
+
customLegendPlugin: {
|
|
48
|
+
htmlLegend: any;
|
|
49
|
+
};
|
|
50
|
+
chartAreaBorder: {
|
|
51
|
+
borderColor: string;
|
|
52
|
+
};
|
|
53
|
+
dragData: false | object | import('../../common/helpers/get-draggableData').IDraggableData | undefined;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { ChartEvent, ChartTypeRegistry, LinearScaleOptions, Plugin } from 'chart.js';
|
|
2
|
+
import { LabelOptions } from 'chartjs-plugin-annotation';
|
|
3
|
+
import { GradientDirection } from './plugins/gradient-background-plugin/enums';
|
|
4
|
+
import { AnnotationType, DragAxis } from './plugins/annotation-dragger-plugin/enums';
|
|
5
|
+
import { AlignOptions, Position } from './helpers/enums';
|
|
6
|
+
export type TAxisPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
7
|
+
export interface ICommonDataValue {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ICommonDataset {
|
|
13
|
+
label?: string;
|
|
14
|
+
borderColor?: string;
|
|
15
|
+
backgroundColor?: string | string[];
|
|
16
|
+
borderWidth?: number;
|
|
17
|
+
data: ICommonDataValue[];
|
|
18
|
+
}
|
|
19
|
+
export interface ICommonScales extends Partial<Record<string, LinearScaleOptions>> {
|
|
20
|
+
x: LinearScaleOptions;
|
|
21
|
+
y: LinearScaleOptions;
|
|
22
|
+
}
|
|
23
|
+
export interface ICommonAnnotationElement {
|
|
24
|
+
display: boolean;
|
|
25
|
+
annotationIndex: number;
|
|
26
|
+
label: {
|
|
27
|
+
options: LabelOptions;
|
|
28
|
+
content: string;
|
|
29
|
+
};
|
|
30
|
+
options: {
|
|
31
|
+
id?: string;
|
|
32
|
+
scaleID?: string;
|
|
33
|
+
borderColor?: string;
|
|
34
|
+
borderWidth?: number;
|
|
35
|
+
radius?: number;
|
|
36
|
+
label?: {
|
|
37
|
+
content?: string;
|
|
38
|
+
position?: string;
|
|
39
|
+
enabled?: boolean;
|
|
40
|
+
xAdjust?: number;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export interface ICoordinates {
|
|
45
|
+
x: number;
|
|
46
|
+
y: number;
|
|
47
|
+
}
|
|
48
|
+
export interface ICommonAnnotationsData {
|
|
49
|
+
display?: boolean;
|
|
50
|
+
hideLegend?: boolean;
|
|
51
|
+
id?: string;
|
|
52
|
+
adjustScaleRange: boolean;
|
|
53
|
+
annotationAxis: 'x' | 'y';
|
|
54
|
+
color: string;
|
|
55
|
+
endValue: number;
|
|
56
|
+
label: string;
|
|
57
|
+
labelConfig?: Record<string, any>;
|
|
58
|
+
type: AnnotationType;
|
|
59
|
+
value: number;
|
|
60
|
+
xMin: number;
|
|
61
|
+
xMax: number;
|
|
62
|
+
yMin: number;
|
|
63
|
+
yMax: number;
|
|
64
|
+
xValue?: number;
|
|
65
|
+
yValue?: number;
|
|
66
|
+
radius?: number;
|
|
67
|
+
enableDrag?: boolean;
|
|
68
|
+
onDragStart?: (coordinates: ICoordinates, annotation: ICommonAnnotationsData) => void;
|
|
69
|
+
onDrag?: (coordinates: ICoordinates, annotation: ICommonAnnotationsData) => void;
|
|
70
|
+
onDragEnd?: (coordinates: ICoordinates, annotation: ICommonAnnotationsData) => void;
|
|
71
|
+
dragAxis?: DragAxis;
|
|
72
|
+
pointStyle?: string;
|
|
73
|
+
resizable?: boolean;
|
|
74
|
+
dragRange?: {
|
|
75
|
+
x?: [number, number];
|
|
76
|
+
y?: [number, number];
|
|
77
|
+
};
|
|
78
|
+
displayDragCoordinates?: boolean;
|
|
79
|
+
xScaleID?: string;
|
|
80
|
+
yScaleID?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface ICommonGradientColor {
|
|
83
|
+
offset: number;
|
|
84
|
+
color: string;
|
|
85
|
+
}
|
|
86
|
+
export interface ICommonGradient {
|
|
87
|
+
display: boolean;
|
|
88
|
+
gradientColors?: ICommonGradientColor[];
|
|
89
|
+
direction?: GradientDirection;
|
|
90
|
+
}
|
|
91
|
+
export interface ICommonStyling {
|
|
92
|
+
width?: number | string;
|
|
93
|
+
height?: number | string;
|
|
94
|
+
maintainAspectRatio?: boolean;
|
|
95
|
+
staticChartHeight?: boolean;
|
|
96
|
+
performanceMode?: boolean;
|
|
97
|
+
gradient?: ICommonGradient;
|
|
98
|
+
}
|
|
99
|
+
export interface ICommonLegend {
|
|
100
|
+
display: boolean;
|
|
101
|
+
position: Position;
|
|
102
|
+
align: AlignOptions;
|
|
103
|
+
}
|
|
104
|
+
export interface ICommonTooltip {
|
|
105
|
+
tooltips: boolean;
|
|
106
|
+
showLabelsInTooltips: boolean;
|
|
107
|
+
scientificNotation: boolean;
|
|
108
|
+
}
|
|
109
|
+
export interface ICommonAdditionalAxesOptions {
|
|
110
|
+
chartScaleType?: 'linear' | 'logarithmic';
|
|
111
|
+
reverse: boolean;
|
|
112
|
+
beginAtZero: boolean;
|
|
113
|
+
stepSize?: number;
|
|
114
|
+
stacked?: boolean;
|
|
115
|
+
suggestedMin?: number;
|
|
116
|
+
suggestedMax?: number;
|
|
117
|
+
min?: number;
|
|
118
|
+
max?: number;
|
|
119
|
+
}
|
|
120
|
+
export interface ICommonAnnotation {
|
|
121
|
+
showLabel: boolean;
|
|
122
|
+
text: string | string[];
|
|
123
|
+
position: string;
|
|
124
|
+
fontSize: number;
|
|
125
|
+
xOffset: number;
|
|
126
|
+
yOffset: number;
|
|
127
|
+
maxWidth: number;
|
|
128
|
+
lineHeight: number;
|
|
129
|
+
}
|
|
130
|
+
export interface ICommonAnnotations {
|
|
131
|
+
showAnnotations?: boolean;
|
|
132
|
+
controlAnnotation?: boolean;
|
|
133
|
+
enableDragAnnotation?: boolean;
|
|
134
|
+
annotationsData?: ICommonAnnotationsData[];
|
|
135
|
+
labelAnnotation?: ICommonAnnotation;
|
|
136
|
+
}
|
|
137
|
+
export interface ICommonGraph {
|
|
138
|
+
lineTension?: number;
|
|
139
|
+
spanGaps?: boolean;
|
|
140
|
+
showDataLabels?: boolean;
|
|
141
|
+
showMinorGridlines?: boolean;
|
|
142
|
+
}
|
|
143
|
+
export interface ICommonInteractions {
|
|
144
|
+
onLegendClick?: (text: string, hidden: boolean) => void;
|
|
145
|
+
onHover?: (event?: ChartEvent, datasetIndex?: number, index?: number, generatedDataset?: any[]) => void;
|
|
146
|
+
onUnhover?: (event?: ChartEvent, datasetIndex?: number, index?: number, generatedDataset?: any[]) => void;
|
|
147
|
+
}
|
|
148
|
+
export interface ICommonCustomLegend<T extends keyof ChartTypeRegistry> {
|
|
149
|
+
customLegendPlugin: Plugin<T> | null;
|
|
150
|
+
customLegendContainerID: string;
|
|
151
|
+
}
|
|
152
|
+
export interface ICommonChartOptions {
|
|
153
|
+
enableZoom: boolean;
|
|
154
|
+
enablePan: boolean;
|
|
155
|
+
}
|
|
156
|
+
export interface ICommonDragData {
|
|
157
|
+
enableDragData?: boolean;
|
|
158
|
+
showTooltip?: boolean;
|
|
159
|
+
roundPoints?: boolean;
|
|
160
|
+
dragX?: boolean;
|
|
161
|
+
dragY?: boolean;
|
|
162
|
+
onDragStart?: () => void;
|
|
163
|
+
onDrag?: () => void;
|
|
164
|
+
onDragEnd?: () => void;
|
|
165
|
+
}
|
|
166
|
+
export interface ICommonOptions {
|
|
167
|
+
title?: string | string[];
|
|
168
|
+
chartStyling?: ICommonStyling;
|
|
169
|
+
tooltip?: ICommonTooltip;
|
|
170
|
+
legend?: ICommonLegend;
|
|
171
|
+
chartOptions?: ICommonChartOptions;
|
|
172
|
+
interactions?: ICommonInteractions;
|
|
173
|
+
dragData?: ICommonDragData;
|
|
174
|
+
annotations?: ICommonAnnotations;
|
|
175
|
+
}
|
|
176
|
+
export interface ICommonData {
|
|
177
|
+
testId?: string;
|
|
178
|
+
data?: {
|
|
179
|
+
labels?: string[];
|
|
180
|
+
datasets?: ICommonDataset[];
|
|
181
|
+
};
|
|
182
|
+
options: ICommonOptions;
|
|
183
|
+
}
|
|
184
|
+
export interface ICommonHoveredItems {
|
|
185
|
+
index: number;
|
|
186
|
+
datasetIndex: number;
|
|
187
|
+
}
|
|
188
|
+
export interface ICommonChartPlugins {
|
|
189
|
+
legend: {
|
|
190
|
+
position: TAxisPosition;
|
|
191
|
+
};
|
|
192
|
+
title: {
|
|
193
|
+
display: boolean;
|
|
194
|
+
text: string;
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
export interface ICommonAxis<PositionType = any> {
|
|
198
|
+
label: string;
|
|
199
|
+
position: PositionType;
|
|
200
|
+
color: string | string[];
|
|
201
|
+
unit?: string;
|
|
202
|
+
gridLines?: boolean;
|
|
203
|
+
stepSize?: number;
|
|
204
|
+
}
|
|
205
|
+
export type UnusedParameter = unknown | any;
|
|
206
|
+
export type TPrimitive = string | number | boolean | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactElement } from '../../../node_modules/react';
|
|
2
|
+
interface ControlsPortalProps {
|
|
3
|
+
children: ReactElement;
|
|
4
|
+
controlsPortalId: string;
|
|
5
|
+
}
|
|
6
|
+
declare const ControlsPortal: ({ children, controlsPortalId, }: ControlsPortalProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default ControlsPortal;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Chart } from 'chart.js';
|
|
2
|
+
import { UnusedParameter } from '../common.interface';
|
|
3
|
+
interface IChartAreaBorderPluginOptions {
|
|
4
|
+
borderColor: string;
|
|
5
|
+
borderWidth: number;
|
|
6
|
+
borderDash: number[];
|
|
7
|
+
borderDashOffset?: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Chart border plugin config
|
|
11
|
+
*/
|
|
12
|
+
export declare const chartAreaBorderPlugin: {
|
|
13
|
+
id: string;
|
|
14
|
+
beforeDraw(chart: Chart, _: UnusedParameter, options: IChartAreaBorderPluginOptions): void;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ICommonGradientColor } from '../common.interface';
|
|
2
|
+
export declare const BORDER_WIDTH: {
|
|
3
|
+
ZERO: number;
|
|
4
|
+
INITIAL: number;
|
|
5
|
+
HOVERED: number;
|
|
6
|
+
POINT_HOVERED: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const BORDER_COLOR = "rgba(0,0,0,0.1)";
|
|
9
|
+
export declare const ANNOTATION_DASH: number[];
|
|
10
|
+
export declare const DEFAULT_FONT_SIZE = 12;
|
|
11
|
+
export declare const DEFAULT_FONT_FAMILY = "\"Roobert\", \"Noto Sans\", sans-serif";
|
|
12
|
+
export declare const DEFAULT_COLOR = "hsl(60, 10.34482759%, 12.5%)";
|
|
13
|
+
export declare const LEGEND_LABEL_BOX_SIZE = 12;
|
|
14
|
+
export declare const TOOLTIP_PADDING = 8;
|
|
15
|
+
export declare const TOOLTIP_BOX_PADDING = 4;
|
|
16
|
+
export declare const TRANSPARENT = "transparent";
|
|
17
|
+
export declare const LOGARITHMIC_STEPS: number[];
|
|
18
|
+
export declare const COLORS: string[];
|
|
19
|
+
/**
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @desc equivalent of 0.6 rgba alpha chanel
|
|
22
|
+
*/
|
|
23
|
+
export declare const ALPHA_CHANEL = "99";
|
|
24
|
+
/**
|
|
25
|
+
* @type {number}
|
|
26
|
+
* @desc #FFFFFF as decimal number
|
|
27
|
+
*/
|
|
28
|
+
export declare const WHITE_COLOR_AS_DECIMAL = 16777215;
|
|
29
|
+
export declare const AUTO = "auto";
|
|
30
|
+
export declare const ANIMATION_DURATION: {
|
|
31
|
+
NO: number;
|
|
32
|
+
SLOW: number;
|
|
33
|
+
FAST: number;
|
|
34
|
+
};
|
|
35
|
+
export declare const DEFAULT_CHART_NAME = "new_chart";
|
|
36
|
+
export declare const CUSTOM_LEGEND_PLUGIN_NAME = "htmlLegend";
|
|
37
|
+
export declare const DECIMAL_POINT_TOLERANCE = 9;
|
|
38
|
+
export declare const MAX_DECIMAL_DIFF: number;
|
|
39
|
+
export declare const GRADIENT_COLORS: ICommonGradientColor[];
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { ChartTypeRegistry, LegendItem, Plugin } from 'chart.js';
|
|
2
|
+
import { ICommonCustomLegend, UnusedParameter } from '../common.interface';
|
|
3
|
+
import { Position } from './enums';
|
|
4
|
+
export interface IChartGraph {
|
|
5
|
+
showMinorGridlines: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface IOptions {
|
|
8
|
+
title?: string | string[];
|
|
9
|
+
legend?: {
|
|
10
|
+
position: Position;
|
|
11
|
+
display?: boolean;
|
|
12
|
+
align?: string;
|
|
13
|
+
usePointStyle?: boolean;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
interface IStyling {
|
|
17
|
+
width?: string | number;
|
|
18
|
+
height?: string | number;
|
|
19
|
+
squareAspectRatio?: number | boolean;
|
|
20
|
+
maintainAspectRatio?: boolean;
|
|
21
|
+
staticChartHeight?: boolean;
|
|
22
|
+
performanceMode?: boolean;
|
|
23
|
+
}
|
|
24
|
+
interface IAxis {
|
|
25
|
+
label?: string;
|
|
26
|
+
}
|
|
27
|
+
interface ILegend {
|
|
28
|
+
customLegend?: ICommonCustomLegend<any>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @param { graph } graph - graph data from chart options
|
|
32
|
+
* @param { legend } legend
|
|
33
|
+
* @return {[]}
|
|
34
|
+
*/
|
|
35
|
+
export declare const getPlugins: <T extends keyof ChartTypeRegistry>(graph: IChartGraph, legend: ILegend) => Plugin<T>[] | any;
|
|
36
|
+
/**
|
|
37
|
+
* @param {string[]} colors - color schema
|
|
38
|
+
* @return {string} - random color
|
|
39
|
+
*/
|
|
40
|
+
export declare const generateRandomColor: (colors: string[]) => string[];
|
|
41
|
+
/**
|
|
42
|
+
* @param {ICommonChartOptions} options - chart options object
|
|
43
|
+
* @return {{color: (string|undefined), display: boolean, text}|{}}
|
|
44
|
+
*/
|
|
45
|
+
export declare const getTitle: (options: IOptions) => {
|
|
46
|
+
display: boolean;
|
|
47
|
+
text: string | string[] | undefined;
|
|
48
|
+
} | {
|
|
49
|
+
display?: undefined;
|
|
50
|
+
text?: undefined;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* @function isVertical
|
|
54
|
+
*/
|
|
55
|
+
export declare const isVertical: (direction: "vertical" | "horizontal") => direction is "vertical";
|
|
56
|
+
/**
|
|
57
|
+
* @param {'x'|'y'} axisType
|
|
58
|
+
* @param {number} i - index
|
|
59
|
+
* @return {'top'|'bottom'|'left'|'right'|*}
|
|
60
|
+
*/
|
|
61
|
+
export declare const getAxisPosition: (axisType: string, i: number) => Position;
|
|
62
|
+
/**
|
|
63
|
+
* @param {chartStyling} chartStyling
|
|
64
|
+
* @param {Object} styles - styles imported form .less file
|
|
65
|
+
* @return {string} - class name
|
|
66
|
+
*/
|
|
67
|
+
export declare const getClassName: (chartStyling: IStyling, styles: Record<string, string>) => string;
|
|
68
|
+
export declare const getLegend: (options: IOptions, clickHandler: (_: UnusedParameter, legendItem: LegendItem) => void) => {
|
|
69
|
+
position: any;
|
|
70
|
+
display: boolean | undefined;
|
|
71
|
+
align: "center" | "start" | "end";
|
|
72
|
+
labels: {
|
|
73
|
+
boxHeight: number;
|
|
74
|
+
boxWidth: number | undefined;
|
|
75
|
+
usePointStyle: boolean | undefined;
|
|
76
|
+
};
|
|
77
|
+
onClick: (_: UnusedParameter, legendItem: LegendItem) => void;
|
|
78
|
+
};
|
|
79
|
+
export declare const afterLabelCallback: (tooltipItem: Record<string, any>) => string;
|
|
80
|
+
export declare const getTooltipLabel: (tooltipItem: Record<string, any>, showLabelsInTooltips: boolean) => string;
|
|
81
|
+
export declare const getChartFileName: (axes?: IAxis[]) => string;
|
|
82
|
+
export declare const setDefaultTheme: () => void;
|
|
83
|
+
export declare const isNilOrEmpty: <T>(value: T | null | undefined) => boolean;
|
|
84
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from '../../../../node_modules/react';
|
|
2
|
+
interface ContainerProps {
|
|
3
|
+
style?: CSSProperties;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
margin?: boolean;
|
|
6
|
+
deprecatedMessage?: string;
|
|
7
|
+
warningMessage?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Container: {
|
|
10
|
+
({ style, children, margin, deprecatedMessage, warningMessage, }: ContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
defaultProps: {
|
|
12
|
+
style: {};
|
|
13
|
+
margin: boolean;
|
|
14
|
+
deprecatedMessage: null;
|
|
15
|
+
warningMessage: null;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const customFormatNumber: (labelNumber: number, scientificNotation: boolean) => string;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export declare enum AxisType {
|
|
2
|
+
X = "x",
|
|
3
|
+
Y = "y"
|
|
4
|
+
}
|
|
5
|
+
export declare enum Position {
|
|
6
|
+
Bottom = "bottom",
|
|
7
|
+
Top = "top",
|
|
8
|
+
Left = "left",
|
|
9
|
+
Right = "right",
|
|
10
|
+
TopRight = "top-right",
|
|
11
|
+
TopLeft = "top-left",
|
|
12
|
+
BottomLeft = "bottom-left",
|
|
13
|
+
BottomRight = "bottom-right"
|
|
14
|
+
}
|
|
15
|
+
export declare enum ChartType {
|
|
16
|
+
Line = "line",
|
|
17
|
+
Bar = "bar"
|
|
18
|
+
}
|
|
19
|
+
export declare enum CursorStyle {
|
|
20
|
+
Pointer = "pointer",
|
|
21
|
+
Initial = "initial",
|
|
22
|
+
Grab = "grab",
|
|
23
|
+
Grabbing = "grabbing",
|
|
24
|
+
Crosshair = "crosshair",
|
|
25
|
+
Move = "move"
|
|
26
|
+
}
|
|
27
|
+
export declare enum ScaleType {
|
|
28
|
+
Category = "category",
|
|
29
|
+
Linear = "linear",
|
|
30
|
+
Logarithmic = "logarithmic"
|
|
31
|
+
}
|
|
32
|
+
export declare enum ChartDirection {
|
|
33
|
+
Vertical = "vertical"
|
|
34
|
+
}
|
|
35
|
+
export declare enum TooltipLabel {
|
|
36
|
+
Y = "yLabel",
|
|
37
|
+
X = "xLabel"
|
|
38
|
+
}
|
|
39
|
+
export declare enum AlignOptions {
|
|
40
|
+
End = "end",
|
|
41
|
+
Start = "start",
|
|
42
|
+
Center = "center",
|
|
43
|
+
Right = "right",
|
|
44
|
+
Left = "left"
|
|
45
|
+
}
|
|
46
|
+
export declare enum PointType {
|
|
47
|
+
Casing = "casing"
|
|
48
|
+
}
|
|
49
|
+
export declare enum AnnotationType {
|
|
50
|
+
Box = "box",
|
|
51
|
+
Ellipse = "ellipse",
|
|
52
|
+
Line = "line",
|
|
53
|
+
Text = "text"
|
|
54
|
+
}
|
|
55
|
+
export declare enum PointStyle {
|
|
56
|
+
Circle = "circle",
|
|
57
|
+
Square = "rect",
|
|
58
|
+
Diamond = "rectRot",
|
|
59
|
+
Triangle = "triangle"
|
|
60
|
+
}
|
|
61
|
+
export declare enum ChartHoverMode {
|
|
62
|
+
Nearest = "nearest"
|
|
63
|
+
}
|
|
64
|
+
export declare enum PanZoomMode {
|
|
65
|
+
X = "x",
|
|
66
|
+
Y = "y",
|
|
67
|
+
XY = "xy",
|
|
68
|
+
Z = "z"
|
|
69
|
+
}
|
|
70
|
+
export declare enum Key {
|
|
71
|
+
Shift = "Shift"
|
|
72
|
+
}
|
|
73
|
+
export declare enum Events {
|
|
74
|
+
Mousemove = "mousemove",
|
|
75
|
+
Mouseout = "mouseout",
|
|
76
|
+
Click = "click",
|
|
77
|
+
Touchstart = "touchstart",
|
|
78
|
+
Touchmove = "touchmove",
|
|
79
|
+
Dblclick = "dblclick"
|
|
80
|
+
}
|