@oliasoft-open-source/charts-library 6.1.0 → 7.0.0-beta-2
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 +1266 -15
- package/dist/index.js +33 -21
- package/package.json +12 -11
- package/dist/src/components/bar-chart/bar-chart-const.d.ts +0 -2
- package/dist/src/components/bar-chart/bar-chart-default-props.d.ts +0 -3
- package/dist/src/components/bar-chart/bar-chart.d.ts +0 -3
- package/dist/src/components/bar-chart/bar-chart.interface.d.ts +0 -146
- package/dist/src/components/bar-chart/utils/get-bar-chart-data-labels.d.ts +0 -10
- package/dist/src/components/bar-chart/utils/get-bar-chart-scales.d.ts +0 -4
- package/dist/src/components/bar-chart/utils/get-bar-chart-tooltips.d.ts +0 -6
- package/dist/src/components/bar-chart/utils/use-bar-chart-config.d.ts +0 -13
- package/dist/src/components/bar-chart/utils/use-bar-chart-options.d.ts +0 -54
- package/dist/src/components/common/common.interface.d.ts +0 -273
- package/dist/src/components/common/controls-portal.d.ts +0 -7
- package/dist/src/components/common/enums.d.ts +0 -89
- package/dist/src/components/common/helpers/add-transparency/add-transparency.d.ts +0 -1
- package/dist/src/components/common/helpers/callout-helpers/callout-helpers.d.ts +0 -25
- package/dist/src/components/common/helpers/chart-border-plugin.d.ts +0 -16
- package/dist/src/components/common/helpers/chart-consts.d.ts +0 -39
- package/dist/src/components/common/helpers/chart-utils.d.ts +0 -86
- package/dist/src/components/common/helpers/container.d.ts +0 -18
- package/dist/src/components/common/helpers/custom-format-number.d.ts +0 -1
- package/dist/src/components/common/helpers/download-pgn.d.ts +0 -3
- package/dist/src/components/common/helpers/get-cartesian-scale-options.d.ts +0 -28
- package/dist/src/components/common/helpers/get-chart-annotation.d.ts +0 -139
- package/dist/src/components/common/helpers/get-chart-from-ctx.d.ts +0 -1
- package/dist/src/components/common/helpers/get-custom-legend-plugin-example.d.ts +0 -6
- package/dist/src/components/common/helpers/get-draggableData.d.ts +0 -18
- package/dist/src/components/common/helpers/get-grouped-color-scheme/get-grouped-color-scheme.d.ts +0 -1
- package/dist/src/components/common/helpers/input-normalizers.d.ts +0 -15
- package/dist/src/components/common/helpers/range/estimate-data-series-have-close-values.d.ts +0 -8
- package/dist/src/components/common/helpers/range/range.d.ts +0 -33
- package/dist/src/components/common/helpers/text.d.ts +0 -1
- package/dist/src/components/common/helpers/to-annotation.d.ts +0 -4
- package/dist/src/components/common/hooks/use-generated-labels.d.ts +0 -4
- package/dist/src/components/common/hooks/use-legend-state.d.ts +0 -28
- package/dist/src/components/common/hooks/use-legend.d.ts +0 -4
- package/dist/src/components/common/hooks/use-update-annotations.d.ts +0 -4
- package/dist/src/components/common/legend-component/legend-dropzone.d.ts +0 -3
- package/dist/src/components/common/legend-component/legend-interface.d.ts +0 -47
- package/dist/src/components/common/legend-component/legend-item/LegendItemLine.d.ts +0 -5
- package/dist/src/components/common/legend-component/legend-item/legend-item.d.ts +0 -3
- package/dist/src/components/common/legend-component/legend-panel.d.ts +0 -3
- package/dist/src/components/common/legend-component/legend.d.ts +0 -3
- package/dist/src/components/common/legend-component/state/legend-action-types.d.ts +0 -3
- package/dist/src/components/common/legend-component/state/legend-context.d.ts +0 -14
- package/dist/src/components/common/legend-component/state/legend-state-reducer.d.ts +0 -30
- package/dist/src/components/common/legend-component/utils/create-style-object.d.ts +0 -27
- package/dist/src/components/common/legend-component/utils/get-generated-labels.d.ts +0 -2
- package/dist/src/components/common/plugins/annotation-dragger-plugin/annotation-dragger-plugin.d.ts +0 -15
- package/dist/src/components/common/plugins/annotation-dragger-plugin/annotation-position-storage.d.ts +0 -7
- package/dist/src/components/common/plugins/annotation-dragger-plugin/enums.d.ts +0 -21
- package/dist/src/components/common/plugins/annotation-dragger-plugin/event-helpers.d.ts +0 -6
- package/dist/src/components/common/plugins/annotation-dragger-plugin/helpers.d.ts +0 -53
- package/dist/src/components/common/plugins/annotation-dragger-plugin/point-annotation-label.d.ts +0 -5
- package/dist/src/components/common/plugins/ellipsis-annotation-plugin/compute-ellipse-geometry.d.ts +0 -9
- package/dist/src/components/common/plugins/ellipsis-annotation-plugin/ellipsis-annotation-plugin.d.ts +0 -18
- package/dist/src/components/common/plugins/gradient-background-plugin/enums.d.ts +0 -10
- package/dist/src/components/common/plugins/gradient-background-plugin/gradient-background-plugin.d.ts +0 -2
- package/dist/src/components/line-chart/constants/default-translations.d.ts +0 -25
- package/dist/src/components/line-chart/constants/line-chart-consts.d.ts +0 -13
- package/dist/src/components/line-chart/controls/axes-options/axes-options-interfaces.d.ts +0 -57
- package/dist/src/components/line-chart/controls/axes-options/axes-options.d.ts +0 -6
- package/dist/src/components/line-chart/controls/axes-options/axes-validation.d.ts +0 -8
- package/dist/src/components/line-chart/controls/controls-interfaces.d.ts +0 -19
- package/dist/src/components/line-chart/controls/controls.d.ts +0 -3
- package/dist/src/components/line-chart/controls/drag-options-interfaces.d.ts +0 -14
- package/dist/src/components/line-chart/controls/drag-options.d.ts +0 -23
- package/dist/src/components/line-chart/controls/line-options.d.ts +0 -19
- package/dist/src/components/line-chart/hooks/use-chart-functions.d.ts +0 -32
- package/dist/src/components/line-chart/hooks/use-chart-options.d.ts +0 -19
- package/dist/src/components/line-chart/hooks/use-chart-plugins.d.ts +0 -7
- package/dist/src/components/line-chart/hooks/use-chart-state.d.ts +0 -12
- package/dist/src/components/line-chart/hooks/use-toggle-handler.d.ts +0 -12
- package/dist/src/components/line-chart/initialize/config.d.ts +0 -12
- package/dist/src/components/line-chart/initialize/initialize-line-chart.d.ts +0 -12
- package/dist/src/components/line-chart/line-chart-get-default-props.d.ts +0 -3
- package/dist/src/components/line-chart/line-chart.d.ts +0 -3
- package/dist/src/components/line-chart/line-chart.interface.d.ts +0 -241
- package/dist/src/components/line-chart/plugins/callout-plugin/callout-plugin.d.ts +0 -11
- package/dist/src/components/line-chart/plugins/callout-plugin/helpers.d.ts +0 -42
- package/dist/src/components/line-chart/plugins/chart-area-text-plugin.d.ts +0 -17
- package/dist/src/components/line-chart/plugins/line-chart.minor-gridlines-plugin.d.ts +0 -8
- package/dist/src/components/line-chart/plugins/line-markers-plugin/draw.d.ts +0 -39
- package/dist/src/components/line-chart/plugins/line-markers-plugin/line-markers-plugin.d.ts +0 -10
- package/dist/src/components/line-chart/plugins/line-markers-plugin/types.d.ts +0 -109
- package/dist/src/components/line-chart/plugins/line-markers-plugin/utils.d.ts +0 -40
- package/dist/src/components/line-chart/plugins/plugin-constants.d.ts +0 -11
- package/dist/src/components/line-chart/plugins/plugins.interface.d.ts +0 -9
- package/dist/src/components/line-chart/state/action-types.d.ts +0 -12
- package/dist/src/components/line-chart/state/helpers.d.ts +0 -13
- package/dist/src/components/line-chart/state/initial-state.d.ts +0 -11
- package/dist/src/components/line-chart/state/line-chart-reducer.d.ts +0 -2
- package/dist/src/components/line-chart/state/manage-state-in-local-storage.d.ts +0 -15
- package/dist/src/components/line-chart/state/state.interfaces.d.ts +0 -26
- package/dist/src/components/line-chart/utils/axis-formatting/axis-formatting.d.ts +0 -2
- package/dist/src/components/line-chart/utils/axis-scales/axis-scales.d.ts +0 -18
- package/dist/src/components/line-chart/utils/check-custom-option/check-custom-option.d.ts +0 -12
- package/dist/src/components/line-chart/utils/datalabels-alignment/datalabels-alignment.interface.d.ts +0 -20
- package/dist/src/components/line-chart/utils/datalabels-alignment/get-alignment-condition.d.ts +0 -8
- package/dist/src/components/line-chart/utils/datalabels-alignment/get-alignment-data.d.ts +0 -11
- package/dist/src/components/line-chart/utils/datalabels-alignment/get-datalabels-position.d.ts +0 -6
- package/dist/src/components/line-chart/utils/enums.d.ts +0 -4
- package/dist/src/components/line-chart/utils/generate-line-chart-datasets.d.ts +0 -8
- package/dist/src/components/line-chart/utils/get-annotations-data.d.ts +0 -1
- package/dist/src/components/line-chart/utils/get-axes-data-from-metasets.d.ts +0 -1
- package/dist/src/components/line-chart/utils/get-axes-ranges-from-chart.d.ts +0 -9
- package/dist/src/components/line-chart/utils/get-axis-range-by-type.d.ts +0 -10
- package/dist/src/components/line-chart/utils/get-generated-labels.d.ts +0 -2
- package/dist/src/components/line-chart/utils/get-line-chart-data-labels.d.ts +0 -16
- package/dist/src/components/line-chart/utils/get-line-chart-scales.d.ts +0 -5
- package/dist/src/components/line-chart/utils/get-line-chart-tooltips.d.ts +0 -30
- package/dist/src/components/line-chart/utils/line-chart-utils.d.ts +0 -24
- package/dist/src/components/line-chart/utils/translations/get-translations.d.ts +0 -8
- package/dist/src/components/pie-chart/pie-chart-defalut-props.interface.d.ts +0 -50
- package/dist/src/components/pie-chart/pie-chart-get-default-props.d.ts +0 -3
- package/dist/src/components/pie-chart/pie-chart.d.ts +0 -3
- package/dist/src/components/pie-chart/pie-chart.interface.d.ts +0 -85
- package/dist/src/components/pie-chart/use-pie-chart-config.d.ts +0 -42
- package/dist/src/components/scatter-chart/hooks/use-scatter-chart-config.d.ts +0 -69
- package/dist/src/components/scatter-chart/scatter-chart-default-props.interface.d.ts +0 -73
- package/dist/src/components/scatter-chart/scatter-chart-get-default-props.d.ts +0 -4
- package/dist/src/components/scatter-chart/scatter-chart.d.ts +0 -3
- package/dist/src/components/scatter-chart/scatter-chart.interface.d.ts +0 -111
- package/dist/src/components/scatter-chart/utils/get-scales-config.d.ts +0 -5
- package/dist/src/components/scatter-chart/utils/get-tooltip-config.d.ts +0 -21
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ActiveElement, Chart, Chart as ChartJS, ChartEvent, LegendItem, Plugin, TooltipItem } from 'chart.js';
|
|
2
|
-
import { IGeneratedPieChartDataset, IPieDataValue, IPiesDataLabelsOptions } from './pie-chart.interface';
|
|
3
|
-
import { IPieChartDefaultProps } from './pie-chart-defalut-props.interface';
|
|
4
|
-
import { UnusedParameter } from '../common/common.interface';
|
|
5
|
-
interface ILegendPlugin extends Plugin {
|
|
6
|
-
chart?: Chart;
|
|
7
|
-
}
|
|
8
|
-
export declare const usePieChartConfig: (chart: IPieChartDefaultProps) => {
|
|
9
|
-
generatedDatasets: IGeneratedPieChartDataset[] | {
|
|
10
|
-
borderWidth: number;
|
|
11
|
-
borderColor: string;
|
|
12
|
-
backgroundColor: string | string[];
|
|
13
|
-
data: IPieDataValue[];
|
|
14
|
-
hideLegend?: boolean;
|
|
15
|
-
label?: string;
|
|
16
|
-
hidden?: boolean;
|
|
17
|
-
}[];
|
|
18
|
-
getTitle: () => {
|
|
19
|
-
display: boolean;
|
|
20
|
-
text: string | string[];
|
|
21
|
-
} | {
|
|
22
|
-
display?: undefined;
|
|
23
|
-
text?: undefined;
|
|
24
|
-
};
|
|
25
|
-
legendClick: (_: UnusedParameter, legendItem?: LegendItem, legend?: ILegendPlugin) => void;
|
|
26
|
-
onClick: (_evt: ChartEvent, _elements: ActiveElement[], chartInstance: ChartJS) => void;
|
|
27
|
-
onHover: (evt: ChartEvent, hoveredItems: ActiveElement[]) => void;
|
|
28
|
-
getDatalabels: () => IPiesDataLabelsOptions;
|
|
29
|
-
getLegend: () => object;
|
|
30
|
-
getToolTips: () => {
|
|
31
|
-
callbacks: {
|
|
32
|
-
title: (tooltipItem: TooltipItem<any>[]) => string;
|
|
33
|
-
label: (tooltipItem: TooltipItem<any>) => string;
|
|
34
|
-
};
|
|
35
|
-
padding: number;
|
|
36
|
-
boxWidth: number;
|
|
37
|
-
boxHeight: number;
|
|
38
|
-
boxPadding: number;
|
|
39
|
-
usePointStyle: boolean;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
export {};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { ActiveElement, AnimationSpec, Chart, ChartEvent } from 'chart.js';
|
|
2
|
-
import { IScatterChartDefaultProps } from '../scatter-chart-default-props.interface';
|
|
3
|
-
import { MutableRefObject } from 'react';
|
|
4
|
-
import { ICommonHoveredItems } from '../../common/common.interface';
|
|
5
|
-
import { TGeneratedScatterChartDatasets } from '../scatter-chart.interface';
|
|
6
|
-
export declare const useScatterChartConfig: (chart: IScatterChartDefaultProps, chartRef: MutableRefObject<Chart | null>) => {
|
|
7
|
-
generatedDatasets: TGeneratedScatterChartDatasets;
|
|
8
|
-
scatterOptions: {
|
|
9
|
-
interactions: {
|
|
10
|
-
onLegendClick: (_: import('../../common/common.interface').UnusedParameter, legendItem: import('chart.js').LegendItem) => void;
|
|
11
|
-
onHover: (evt: ChartEvent, hoveredItems: ICommonHoveredItems[]) => void;
|
|
12
|
-
};
|
|
13
|
-
scales: {
|
|
14
|
-
x: import('../../common/common.interface').ICommonScaleOptions;
|
|
15
|
-
y: import('../../common/common.interface').ICommonScaleOptions;
|
|
16
|
-
};
|
|
17
|
-
animation: Partial<AnimationSpec<"scatter">>;
|
|
18
|
-
plugins: {
|
|
19
|
-
legend: {
|
|
20
|
-
display: boolean;
|
|
21
|
-
events: never[];
|
|
22
|
-
position: any;
|
|
23
|
-
align: "center" | "start" | "end";
|
|
24
|
-
labels: {
|
|
25
|
-
boxHeight: number;
|
|
26
|
-
boxWidth: number | undefined;
|
|
27
|
-
usePointStyle: boolean | undefined;
|
|
28
|
-
};
|
|
29
|
-
onClick: (_: import('../../common/common.interface').UnusedParameter, legendItem: import('chart.js').LegendItem) => void;
|
|
30
|
-
};
|
|
31
|
-
customLegendPlugin: {
|
|
32
|
-
htmlLegend: any;
|
|
33
|
-
};
|
|
34
|
-
title: {
|
|
35
|
-
display: boolean;
|
|
36
|
-
text: string | string[];
|
|
37
|
-
} | {
|
|
38
|
-
display?: undefined;
|
|
39
|
-
text?: undefined;
|
|
40
|
-
};
|
|
41
|
-
annotation: {
|
|
42
|
-
annotations: {};
|
|
43
|
-
};
|
|
44
|
-
chartAreaBorder: {
|
|
45
|
-
borderColor: string;
|
|
46
|
-
};
|
|
47
|
-
datalabels: {
|
|
48
|
-
display: boolean;
|
|
49
|
-
};
|
|
50
|
-
tooltip: {
|
|
51
|
-
enabled: boolean;
|
|
52
|
-
callbacks: {
|
|
53
|
-
title: (tooltipItems: import('chart.js').TooltipItem<"scatter">[]) => string | undefined;
|
|
54
|
-
label: (tooltipItems: import('../utils/get-tooltip-config').IScatterTooltipItem) => string;
|
|
55
|
-
};
|
|
56
|
-
backgroundColor: string;
|
|
57
|
-
displayColors: boolean;
|
|
58
|
-
padding: number;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
width?: number | string;
|
|
62
|
-
height?: number | string;
|
|
63
|
-
maintainAspectRatio: boolean;
|
|
64
|
-
staticChartHeight: boolean;
|
|
65
|
-
performanceMode: boolean;
|
|
66
|
-
onClick: (_evt: ChartEvent, _elements: ActiveElement[], chartInstance: Chart) => void;
|
|
67
|
-
onHover: (evt: ChartEvent, hoveredItems: ICommonHoveredItems[]) => void;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { ChartEvent } from 'chart.js';
|
|
2
|
-
import { ICommonAdditionalAxesOptions, ICommonAnnotations, ICommonCustomLegend, ICommonLegend, ICommonScales } from '../common/common.interface';
|
|
3
|
-
import { ChartDirection } from '../common/enums';
|
|
4
|
-
import { IScatterAxes, IScatterChartDataset } from './scatter-chart.interface';
|
|
5
|
-
export interface IDefaultChartStyling {
|
|
6
|
-
width?: number | string;
|
|
7
|
-
height?: number | string;
|
|
8
|
-
maintainAspectRatio: boolean;
|
|
9
|
-
staticChartHeight: boolean;
|
|
10
|
-
performanceMode: boolean;
|
|
11
|
-
}
|
|
12
|
-
interface IDefaultTooltip {
|
|
13
|
-
enabled: boolean;
|
|
14
|
-
tooltips: boolean;
|
|
15
|
-
showLabelsInTooltips: boolean;
|
|
16
|
-
backgroundColor: string;
|
|
17
|
-
displayColors: boolean;
|
|
18
|
-
scientificNotation: boolean;
|
|
19
|
-
}
|
|
20
|
-
interface IDefaultScatterGraph {
|
|
21
|
-
showMinorGridlines: boolean;
|
|
22
|
-
showDataLabels: boolean;
|
|
23
|
-
}
|
|
24
|
-
export interface IDefaultScatterLegend extends ICommonLegend {
|
|
25
|
-
customLegend?: ICommonCustomLegend<any>;
|
|
26
|
-
}
|
|
27
|
-
interface IDefaultChartOptions {
|
|
28
|
-
enableZoom: boolean;
|
|
29
|
-
enablePan: boolean;
|
|
30
|
-
}
|
|
31
|
-
export interface IDefaultInteractions {
|
|
32
|
-
onLegendClick?: (text: string, hidden: boolean) => void;
|
|
33
|
-
onHover?: (event: ChartEvent, datasetIndex: number, index: number, generatedDataset: IScatterChartDataset[]) => void;
|
|
34
|
-
onUnhover?: (event?: ChartEvent, datasetIndex?: number, index?: number, generatedDataset?: IScatterChartDataset[]) => void;
|
|
35
|
-
onAnimationComplete?: () => void;
|
|
36
|
-
}
|
|
37
|
-
interface IDefaultChartData {
|
|
38
|
-
labels: string[];
|
|
39
|
-
datasets: IScatterChartDataset[];
|
|
40
|
-
}
|
|
41
|
-
export interface IDefaultScatterOptions {
|
|
42
|
-
title: string | string[];
|
|
43
|
-
chartStyling: IDefaultChartStyling;
|
|
44
|
-
tooltip: IDefaultTooltip;
|
|
45
|
-
graph: IDefaultScatterGraph;
|
|
46
|
-
axes: IScatterAxes;
|
|
47
|
-
scales?: ICommonScales;
|
|
48
|
-
additionalAxesOptions: ICommonAdditionalAxesOptions;
|
|
49
|
-
legend: IDefaultScatterLegend;
|
|
50
|
-
chartOptions: IDefaultChartOptions;
|
|
51
|
-
interactions: IDefaultInteractions;
|
|
52
|
-
annotations?: ICommonAnnotations;
|
|
53
|
-
direction: ChartDirection;
|
|
54
|
-
}
|
|
55
|
-
export interface IScatterChartDefaultProps {
|
|
56
|
-
testId: string | null;
|
|
57
|
-
data: IDefaultChartData;
|
|
58
|
-
options: {
|
|
59
|
-
title: string | string[];
|
|
60
|
-
chartStyling: IDefaultChartStyling;
|
|
61
|
-
tooltip: IDefaultTooltip;
|
|
62
|
-
graph: IDefaultScatterGraph;
|
|
63
|
-
axes: IScatterAxes;
|
|
64
|
-
scales?: ICommonScales;
|
|
65
|
-
additionalAxesOptions: ICommonAdditionalAxesOptions;
|
|
66
|
-
legend: IDefaultScatterLegend;
|
|
67
|
-
chartOptions: IDefaultChartOptions;
|
|
68
|
-
interactions: IDefaultInteractions;
|
|
69
|
-
annotations?: ICommonAnnotations;
|
|
70
|
-
direction: ChartDirection;
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { IScatterChartDefaultProps } from './scatter-chart-default-props.interface';
|
|
2
|
-
import { IScatterChartProps, IScatterOptionsInput } from './scatter-chart.interface';
|
|
3
|
-
export declare const normalizeScatterOptions: (options?: IScatterOptionsInput) => IScatterChartDefaultProps["options"];
|
|
4
|
-
export declare const getDefaultProps: (props: IScatterChartProps) => IScatterChartDefaultProps;
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { DeepPartial, IChartDataLabelsOptions, IChartGeneratedLabel, IChartLegendItemFilter, ICommonAdditionalAxesOptions, ICommonAnnotations, ICommonAnnotationsData, ICommonAxis, ICommonData, ICommonDataValue, ICommonDataset, ICommonLegend, ICommonOptions, ICommonScales } from '../common/common.interface';
|
|
2
|
-
import { ChartDirection } from '../common/enums.ts';
|
|
3
|
-
export interface IScatterLegend extends ICommonLegend {
|
|
4
|
-
useDataset?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export interface IScatterGraph {
|
|
7
|
-
showMinorGridlines?: boolean;
|
|
8
|
-
showDataLabels?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface IScatterTooltip {
|
|
11
|
-
enabled?: boolean;
|
|
12
|
-
tooltips?: boolean;
|
|
13
|
-
showLabelsInTooltips: boolean;
|
|
14
|
-
backgroundColor?: string;
|
|
15
|
-
displayColors?: boolean;
|
|
16
|
-
scientificNotation?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export interface IScatterAxes {
|
|
19
|
-
x: ICommonAxis<'top' | 'bottom'>[];
|
|
20
|
-
y: ICommonAxis<'left' | 'right'>[];
|
|
21
|
-
[key: string]: ICommonAxis[];
|
|
22
|
-
}
|
|
23
|
-
export interface IScatterOptions extends ICommonOptions {
|
|
24
|
-
graph?: IScatterGraph;
|
|
25
|
-
legend?: IScatterLegend;
|
|
26
|
-
axes?: IScatterAxes;
|
|
27
|
-
scales?: ICommonScales;
|
|
28
|
-
additionalAxesOptions?: ICommonAdditionalAxesOptions;
|
|
29
|
-
direction?: ChartDirection;
|
|
30
|
-
}
|
|
31
|
-
export interface IScatterDataValue extends ICommonDataValue {
|
|
32
|
-
label?: string;
|
|
33
|
-
}
|
|
34
|
-
export interface IScatterChartDataset extends ICommonDataset {
|
|
35
|
-
data: IScatterDataValue[];
|
|
36
|
-
hideLegend?: boolean;
|
|
37
|
-
}
|
|
38
|
-
export interface IScatterData {
|
|
39
|
-
labels?: string[];
|
|
40
|
-
datasets?: IScatterChartDataset[];
|
|
41
|
-
xUnit?: string;
|
|
42
|
-
yUnit?: string;
|
|
43
|
-
}
|
|
44
|
-
export interface IScatterChartData extends ICommonData {
|
|
45
|
-
data: IScatterData;
|
|
46
|
-
options: IScatterOptions;
|
|
47
|
-
}
|
|
48
|
-
type ILooseScatterAxis = DeepPartial<ICommonAxis<string>> & {
|
|
49
|
-
[key: string]: unknown;
|
|
50
|
-
};
|
|
51
|
-
type ILooseScatterAnnotation = Omit<DeepPartial<ICommonAnnotationsData>, 'annotationAxis'> & {
|
|
52
|
-
[key: string]: unknown;
|
|
53
|
-
annotationAxis?: string;
|
|
54
|
-
type?: string;
|
|
55
|
-
value?: number | string | null;
|
|
56
|
-
};
|
|
57
|
-
export type IScatterOptionsInput = Omit<DeepPartial<IScatterOptions>, 'title' | 'direction' | 'axes' | 'legend' | 'chartStyling' | 'interactions' | 'annotations' | 'scales'> & {
|
|
58
|
-
[key: string]: unknown;
|
|
59
|
-
title?: unknown;
|
|
60
|
-
direction?: string;
|
|
61
|
-
axes?: {
|
|
62
|
-
x?: ILooseScatterAxis[];
|
|
63
|
-
y?: ILooseScatterAxis[];
|
|
64
|
-
[key: string]: ILooseScatterAxis[] | undefined;
|
|
65
|
-
};
|
|
66
|
-
scales?: Record<string, unknown>;
|
|
67
|
-
legend?: Omit<DeepPartial<IScatterLegend>, 'position' | 'align'> & {
|
|
68
|
-
position?: string;
|
|
69
|
-
align?: string;
|
|
70
|
-
[key: string]: unknown;
|
|
71
|
-
};
|
|
72
|
-
chartStyling?: {
|
|
73
|
-
[key: string]: unknown;
|
|
74
|
-
};
|
|
75
|
-
interactions?: DeepPartial<ICommonOptions['interactions']> & {
|
|
76
|
-
enableZoom?: boolean;
|
|
77
|
-
enablePan?: boolean;
|
|
78
|
-
[key: string]: unknown;
|
|
79
|
-
};
|
|
80
|
-
annotations?: (Omit<DeepPartial<ICommonAnnotations>, 'annotationsData'> & {
|
|
81
|
-
annotationsData?: ILooseScatterAnnotation[];
|
|
82
|
-
}) | null;
|
|
83
|
-
};
|
|
84
|
-
export interface IScatterChartDataInput extends Omit<IScatterChartData, 'data' | 'options'> {
|
|
85
|
-
data?: Omit<DeepPartial<IScatterChartData['data']>, 'datasets'> & {
|
|
86
|
-
datasets?: Array<DeepPartial<IScatterChartDataset> | object | null>;
|
|
87
|
-
};
|
|
88
|
-
options?: IScatterOptionsInput;
|
|
89
|
-
}
|
|
90
|
-
export interface IScatterChartProps {
|
|
91
|
-
chart: IScatterChartDataInput;
|
|
92
|
-
testId?: string | null;
|
|
93
|
-
}
|
|
94
|
-
export type IScatterGeneratedLabel = IChartGeneratedLabel;
|
|
95
|
-
export type IScatterLegendItemFilter = IChartLegendItemFilter;
|
|
96
|
-
export type IScatterDataLabelsOptions = IChartDataLabelsOptions;
|
|
97
|
-
export interface IGeneratedScatterChartDataset {
|
|
98
|
-
label: string;
|
|
99
|
-
backgroundColor: string[];
|
|
100
|
-
borderColor: string;
|
|
101
|
-
borderWidth: number;
|
|
102
|
-
borderDash: number[];
|
|
103
|
-
annotationType?: string;
|
|
104
|
-
data: IScatterDataValue[];
|
|
105
|
-
hideLegend?: boolean;
|
|
106
|
-
displayGroup?: string | number;
|
|
107
|
-
isAnnotation?: boolean;
|
|
108
|
-
annotationIndex?: number;
|
|
109
|
-
}
|
|
110
|
-
export type TGeneratedScatterChartDatasets = IGeneratedScatterChartDataset[];
|
|
111
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { IDefaultScatterOptions } from '../scatter-chart-default-props.interface';
|
|
2
|
-
export declare const getScatterChartScales: (options: IDefaultScatterOptions) => {
|
|
3
|
-
x: import('../../common/common.interface').ICommonScaleOptions;
|
|
4
|
-
y: import('../../common/common.interface').ICommonScaleOptions;
|
|
5
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { TooltipItem } from 'chart.js';
|
|
2
|
-
import { IDefaultScatterOptions } from '../scatter-chart-default-props.interface';
|
|
3
|
-
interface IRawData {
|
|
4
|
-
x: number | string;
|
|
5
|
-
y: number | string;
|
|
6
|
-
label?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface IScatterTooltipItem extends TooltipItem<'scatter'> {
|
|
9
|
-
raw: IRawData;
|
|
10
|
-
}
|
|
11
|
-
export declare const getTooltipsConfig: (options: IDefaultScatterOptions) => {
|
|
12
|
-
enabled: boolean;
|
|
13
|
-
callbacks: {
|
|
14
|
-
title: (tooltipItems: TooltipItem<"scatter">[]) => string | undefined;
|
|
15
|
-
label: (tooltipItems: IScatterTooltipItem) => string;
|
|
16
|
-
};
|
|
17
|
-
backgroundColor: string;
|
|
18
|
-
displayColors: boolean;
|
|
19
|
-
padding: number;
|
|
20
|
-
};
|
|
21
|
-
export {};
|