@oliasoft-open-source/charts-library 4.1.11 → 4.2.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.js +666 -203
- package/dist/index.js.map +1 -1
- package/dist/src/components/common/common.interface.d.ts +1 -1
- package/dist/src/components/common/enums.d.ts +6 -1
- package/dist/src/components/common/helpers/custom-format-number.d.ts +1 -0
- package/dist/src/components/common/legend-component/legend-interface.d.ts +4 -3
- package/dist/src/components/pie-chart/pie-chart-defalut-props.interface.d.ts +1 -1
- package/dist/src/components/pie-chart/pie-chart.interface.d.ts +2 -2
- package/dist/src/components/pie-chart/use-pie-chart-config.d.ts +1 -1
- package/dist/src/components/scatter-chart/scatter-chart-default-props.interface.d.ts +69 -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 +80 -0
- package/dist/src/components/scatter-chart/scatter-chart.stories.d.ts +205 -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 +20 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const customFormatNumber: (labelNumber: number) => string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MouseEventHandler, RefObject } from 'react';
|
|
2
2
|
import { Chart, ChartArea } from 'chart.js';
|
|
3
|
+
import { IGeneratedScatterChartDataset, TGeneratedScatterChartDatasets, IScatterOptions } from '../../scatter-chart/scatter-chart.interface';
|
|
3
4
|
import { Position } from '../helpers/enums';
|
|
4
5
|
import { IGeneratedLineChartDataset, ILineChartOptions, TGeneratedLineChartDatasets } from '../../line-chart/line-chart.interface';
|
|
5
6
|
import { IBarOptions, IGenerateBarChartDataset, TGenerateBarChartDatasets } from '../../bar-chart/bar-chart.interface';
|
|
@@ -22,9 +23,9 @@ export interface ILegendDropZones {
|
|
|
22
23
|
height?: number;
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
|
-
export type TLegendDataset = IGeneratedLineChartDataset | IGenerateBarChartDataset | IGeneratedPieChartDataset;
|
|
26
|
-
export type TLegendDatasets = TGeneratedLineChartDatasets | TGenerateBarChartDatasets | TGeneratedPieChartDatasets;
|
|
27
|
-
export type TChartsOption = ILineChartOptions | IBarOptions | IPieOptions;
|
|
26
|
+
export type TLegendDataset = IGeneratedLineChartDataset | IGenerateBarChartDataset | IGeneratedPieChartDataset | IGeneratedScatterChartDataset;
|
|
27
|
+
export type TLegendDatasets = TGeneratedLineChartDatasets | TGenerateBarChartDatasets | TGeneratedPieChartDatasets | TGeneratedScatterChartDatasets;
|
|
28
|
+
export type TChartsOption = ILineChartOptions | IBarOptions | IPieOptions | IScatterOptions;
|
|
28
29
|
export interface ILegendItem {
|
|
29
30
|
hidden: boolean;
|
|
30
31
|
dataset: TLegendDataset;
|
|
@@ -30,7 +30,7 @@ interface IDefaultChartOptions {
|
|
|
30
30
|
interface IDefaultInteractions {
|
|
31
31
|
onLegendClick?: (text: string, hidden: boolean) => void;
|
|
32
32
|
onHover?: (event?: ChartEvent, datasetIndex?: number, index?: number, generatedDataset?: IPieChartDataset[]) => void;
|
|
33
|
-
onUnhover?: (event?: ChartEvent, datasetIndex?: number, index?: number, generatedDataset?:
|
|
33
|
+
onUnhover?: (event?: ChartEvent, datasetIndex?: number, index?: number, generatedDataset?: IPieChartDataset[]) => void;
|
|
34
34
|
}
|
|
35
35
|
interface IDefaultChartData {
|
|
36
36
|
labels: string[];
|
|
@@ -16,7 +16,7 @@ export interface IPieDataValue extends ICommonDataValue {
|
|
|
16
16
|
borderWidth: string | number;
|
|
17
17
|
value: number;
|
|
18
18
|
backgroundColor?: string | string[];
|
|
19
|
-
borderColor?: string
|
|
19
|
+
borderColor?: string;
|
|
20
20
|
labels: string[];
|
|
21
21
|
}
|
|
22
22
|
export interface IPieChartDataset extends ICommonDataset {
|
|
@@ -57,7 +57,7 @@ export interface IPiesDataLabelsOptions {
|
|
|
57
57
|
export interface IGeneratedPieChartDataset {
|
|
58
58
|
label: string;
|
|
59
59
|
backgroundColor: string[];
|
|
60
|
-
borderColor: string
|
|
60
|
+
borderColor: string;
|
|
61
61
|
borderWidth: number;
|
|
62
62
|
borderDash: number[];
|
|
63
63
|
annotationType?: string;
|
|
@@ -8,7 +8,7 @@ interface ILegendPlugin extends Plugin {
|
|
|
8
8
|
export declare const usePieChartConfig: (chart: IPieChartDefaultProps) => {
|
|
9
9
|
generatedDatasets: {
|
|
10
10
|
borderWidth: number;
|
|
11
|
-
borderColor: string
|
|
11
|
+
borderColor: string;
|
|
12
12
|
backgroundColor: string | string[];
|
|
13
13
|
data: IPieDataValue[];
|
|
14
14
|
hideLegend?: boolean | undefined;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ChartEvent } from 'chart.js';
|
|
2
|
+
import { ICommonAdditionalAxesOptions, ICommonAnnotations, ICommonCustomLegend, ICommonLegend } from '../common/common.interface';
|
|
3
|
+
import { ChartDirection } from '../common/enums';
|
|
4
|
+
import { IScatterAxes, IScatterChartDataset } from './scatter-chart.interface';
|
|
5
|
+
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
|
+
}
|
|
19
|
+
interface IDefaultScatterGraph {
|
|
20
|
+
showMinorGridlines: boolean;
|
|
21
|
+
showDataLabels: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface IDefaultScatterLegend extends ICommonLegend {
|
|
24
|
+
customLegend?: ICommonCustomLegend<any>;
|
|
25
|
+
}
|
|
26
|
+
interface IDefaultChartOptions {
|
|
27
|
+
enableZoom: boolean;
|
|
28
|
+
enablePan: boolean;
|
|
29
|
+
}
|
|
30
|
+
interface IDefaultInteractions {
|
|
31
|
+
onLegendClick?: (text: string, hidden: boolean) => void;
|
|
32
|
+
onHover?: (event?: ChartEvent, datasetIndex?: number, index?: number, generatedDataset?: IScatterChartDataset[]) => void;
|
|
33
|
+
onUnhover?: (event?: ChartEvent, datasetIndex?: number, index?: number, generatedDataset?: any[]) => void;
|
|
34
|
+
}
|
|
35
|
+
interface IDefaultChartData {
|
|
36
|
+
labels: string[];
|
|
37
|
+
datasets: IScatterChartDataset[];
|
|
38
|
+
}
|
|
39
|
+
export interface IDefaultScatterOptions {
|
|
40
|
+
title: string | string[];
|
|
41
|
+
chartStyling: IDefaultChartStyling;
|
|
42
|
+
tooltip: IDefaultTooltip;
|
|
43
|
+
graph: IDefaultScatterGraph;
|
|
44
|
+
axes: IScatterAxes;
|
|
45
|
+
additionalAxesOptions: ICommonAdditionalAxesOptions;
|
|
46
|
+
legend: IDefaultScatterLegend;
|
|
47
|
+
chartOptions: IDefaultChartOptions;
|
|
48
|
+
interactions: IDefaultInteractions;
|
|
49
|
+
annotations?: ICommonAnnotations;
|
|
50
|
+
direction: ChartDirection;
|
|
51
|
+
}
|
|
52
|
+
export interface IScatterChartDefaultProps {
|
|
53
|
+
testId: string | null;
|
|
54
|
+
data: IDefaultChartData;
|
|
55
|
+
options: {
|
|
56
|
+
title: string | string[];
|
|
57
|
+
chartStyling: IDefaultChartStyling;
|
|
58
|
+
tooltip: IDefaultTooltip;
|
|
59
|
+
graph: IDefaultScatterGraph;
|
|
60
|
+
axes: IScatterAxes;
|
|
61
|
+
additionalAxesOptions: ICommonAdditionalAxesOptions;
|
|
62
|
+
legend: IDefaultScatterLegend;
|
|
63
|
+
chartOptions: IDefaultChartOptions;
|
|
64
|
+
interactions: IDefaultInteractions;
|
|
65
|
+
annotations?: ICommonAnnotations;
|
|
66
|
+
direction: ChartDirection;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ChartDirection } from '../common/enums.ts';
|
|
2
|
+
import { ICommonAdditionalAxesOptions, ICommonAxis, ICommonData, ICommonDataset, ICommonDataValue, ICommonLegend, ICommonOptions } from '../common/common.interface';
|
|
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
|
+
}
|
|
17
|
+
export interface IScatterAxes {
|
|
18
|
+
x: ICommonAxis<'top' | 'bottom'>[];
|
|
19
|
+
y: ICommonAxis<'left' | 'right'>[];
|
|
20
|
+
[key: string]: ICommonAxis[];
|
|
21
|
+
}
|
|
22
|
+
export interface IScatterOptions extends ICommonOptions {
|
|
23
|
+
graph?: IScatterGraph;
|
|
24
|
+
legend?: IScatterLegend;
|
|
25
|
+
axes?: IScatterAxes;
|
|
26
|
+
additionalAxesOptions?: ICommonAdditionalAxesOptions;
|
|
27
|
+
direction: ChartDirection;
|
|
28
|
+
}
|
|
29
|
+
export interface IScatterDataValue extends ICommonDataValue {
|
|
30
|
+
label?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface IScatterChartDataset extends ICommonDataset {
|
|
33
|
+
data: IScatterDataValue[];
|
|
34
|
+
hideLegend?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface IScatterData {
|
|
37
|
+
labels?: string[];
|
|
38
|
+
datasets?: IScatterChartDataset[];
|
|
39
|
+
xUnit?: string;
|
|
40
|
+
yUnit?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface IScatterChartData extends ICommonData {
|
|
43
|
+
data: IScatterData;
|
|
44
|
+
options: IScatterOptions;
|
|
45
|
+
}
|
|
46
|
+
export interface IScatterChartProps {
|
|
47
|
+
chart: IScatterChartData;
|
|
48
|
+
testId?: string | null;
|
|
49
|
+
}
|
|
50
|
+
export interface IScatterGeneratedLabel {
|
|
51
|
+
text: string;
|
|
52
|
+
fillStyle: string;
|
|
53
|
+
strokeStyle: string;
|
|
54
|
+
index: number;
|
|
55
|
+
}
|
|
56
|
+
export interface IScatterLegendItemFilter {
|
|
57
|
+
index: number;
|
|
58
|
+
datasetIndex: number;
|
|
59
|
+
hidden: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface IScatterDataLabelsOptions {
|
|
62
|
+
display?: 'auto' | boolean;
|
|
63
|
+
align?: 'center';
|
|
64
|
+
anchor?: 'center';
|
|
65
|
+
formatter?: (_value: any, context: any) => any;
|
|
66
|
+
}
|
|
67
|
+
export interface IGeneratedScatterChartDataset {
|
|
68
|
+
label: string;
|
|
69
|
+
backgroundColor: string[];
|
|
70
|
+
borderColor: string;
|
|
71
|
+
borderWidth: number;
|
|
72
|
+
borderDash: number[];
|
|
73
|
+
annotationType?: string;
|
|
74
|
+
data: IScatterDataValue[];
|
|
75
|
+
hideLegend?: boolean;
|
|
76
|
+
displayGroup?: string | number;
|
|
77
|
+
isAnnotation?: boolean;
|
|
78
|
+
annotationIndex?: number;
|
|
79
|
+
}
|
|
80
|
+
export type TGeneratedScatterChartDatasets = IGeneratedScatterChartDataset[];
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export const title: string;
|
|
3
|
+
export { ScatterChart as component };
|
|
4
|
+
export namespace args {
|
|
5
|
+
export { singleScatterChart as chart };
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export default _default;
|
|
9
|
+
export function Default(args: any): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export namespace Default {
|
|
11
|
+
export namespace args_1 {
|
|
12
|
+
export { singleScatterChart as chart };
|
|
13
|
+
}
|
|
14
|
+
export { args_1 as args };
|
|
15
|
+
}
|
|
16
|
+
export function StyledChart(args: any): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export namespace StyledChart {
|
|
18
|
+
export namespace args_2 {
|
|
19
|
+
export { styledScatterChart as chart };
|
|
20
|
+
}
|
|
21
|
+
export { args_2 as args };
|
|
22
|
+
}
|
|
23
|
+
export function MultipleDatasets(args: any): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export namespace MultipleDatasets {
|
|
25
|
+
export namespace args_3 {
|
|
26
|
+
export { multipleScatterData as chart };
|
|
27
|
+
}
|
|
28
|
+
export { args_3 as args };
|
|
29
|
+
}
|
|
30
|
+
export function WithDataLabels(args: any): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export namespace WithDataLabels {
|
|
32
|
+
export namespace args_4 {
|
|
33
|
+
export { scatterWithDataLabels as chart };
|
|
34
|
+
}
|
|
35
|
+
export { args_4 as args };
|
|
36
|
+
}
|
|
37
|
+
export function WithTooltips(args: any): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export namespace WithTooltips {
|
|
39
|
+
export namespace args_5 {
|
|
40
|
+
export { scatterWithTooltips as chart };
|
|
41
|
+
}
|
|
42
|
+
export { args_5 as args };
|
|
43
|
+
}
|
|
44
|
+
export function WithAnnotation(args: any): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export namespace WithAnnotation {
|
|
46
|
+
export namespace args_6 {
|
|
47
|
+
export { scatterWithAnnotation as chart };
|
|
48
|
+
}
|
|
49
|
+
export { args_6 as args };
|
|
50
|
+
}
|
|
51
|
+
export function WithAxesLabels(args: any): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export namespace WithAxesLabels {
|
|
53
|
+
export namespace args_7 {
|
|
54
|
+
export { scatterWithAxesLabels as chart };
|
|
55
|
+
}
|
|
56
|
+
export { args_7 as args };
|
|
57
|
+
}
|
|
58
|
+
import { ScatterChart } from './scatter-chart';
|
|
59
|
+
declare namespace singleScatterChart {
|
|
60
|
+
namespace data {
|
|
61
|
+
export { labels1 as labels };
|
|
62
|
+
export const datasets: {
|
|
63
|
+
label: string;
|
|
64
|
+
data: {
|
|
65
|
+
x: number;
|
|
66
|
+
y: number;
|
|
67
|
+
}[];
|
|
68
|
+
}[];
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
declare namespace styledScatterChart {
|
|
72
|
+
export namespace data_1 {
|
|
73
|
+
export { labels1 as labels };
|
|
74
|
+
const datasets_1: {
|
|
75
|
+
label: string;
|
|
76
|
+
data: {
|
|
77
|
+
x: number;
|
|
78
|
+
y: number;
|
|
79
|
+
}[];
|
|
80
|
+
}[];
|
|
81
|
+
export { datasets_1 as datasets };
|
|
82
|
+
}
|
|
83
|
+
export { data_1 as data };
|
|
84
|
+
export namespace options {
|
|
85
|
+
namespace chartStyling {
|
|
86
|
+
const width: string;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
declare namespace multipleScatterData {
|
|
91
|
+
export namespace data_2 {
|
|
92
|
+
export { labels1 as labels };
|
|
93
|
+
const datasets_2: {
|
|
94
|
+
label: string;
|
|
95
|
+
data: {
|
|
96
|
+
x: number;
|
|
97
|
+
y: number;
|
|
98
|
+
}[];
|
|
99
|
+
}[];
|
|
100
|
+
export { datasets_2 as datasets };
|
|
101
|
+
}
|
|
102
|
+
export { data_2 as data };
|
|
103
|
+
}
|
|
104
|
+
declare namespace scatterWithDataLabels {
|
|
105
|
+
export namespace data_3 {
|
|
106
|
+
export { labels1 as labels };
|
|
107
|
+
const datasets_3: {
|
|
108
|
+
label: string;
|
|
109
|
+
data: {
|
|
110
|
+
x: number;
|
|
111
|
+
y: number;
|
|
112
|
+
}[];
|
|
113
|
+
}[];
|
|
114
|
+
export { datasets_3 as datasets };
|
|
115
|
+
}
|
|
116
|
+
export { data_3 as data };
|
|
117
|
+
export namespace options_1 {
|
|
118
|
+
const title_1: string;
|
|
119
|
+
export { title_1 as title };
|
|
120
|
+
export namespace graph {
|
|
121
|
+
const showDataLabels: boolean;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
export { options_1 as options };
|
|
125
|
+
}
|
|
126
|
+
declare namespace scatterWithTooltips {
|
|
127
|
+
export namespace data_4 {
|
|
128
|
+
export { labels1 as labels };
|
|
129
|
+
const datasets_4: {
|
|
130
|
+
label: string;
|
|
131
|
+
data: {
|
|
132
|
+
x: number;
|
|
133
|
+
y: number;
|
|
134
|
+
}[];
|
|
135
|
+
}[];
|
|
136
|
+
export { datasets_4 as datasets };
|
|
137
|
+
}
|
|
138
|
+
export { data_4 as data };
|
|
139
|
+
export namespace options_2 {
|
|
140
|
+
const title_2: string;
|
|
141
|
+
export { title_2 as title };
|
|
142
|
+
export namespace tooltip {
|
|
143
|
+
const title_3: string;
|
|
144
|
+
export { title_3 as title };
|
|
145
|
+
export const showLabelsInTooltips: boolean;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
export { options_2 as options };
|
|
149
|
+
}
|
|
150
|
+
declare namespace scatterWithAnnotation {
|
|
151
|
+
export namespace data_5 {
|
|
152
|
+
export { labels1 as labels };
|
|
153
|
+
const datasets_5: {
|
|
154
|
+
label: string;
|
|
155
|
+
data: {
|
|
156
|
+
x: number;
|
|
157
|
+
y: number;
|
|
158
|
+
}[];
|
|
159
|
+
}[];
|
|
160
|
+
export { datasets_5 as datasets };
|
|
161
|
+
}
|
|
162
|
+
export { data_5 as data };
|
|
163
|
+
export namespace options_3 {
|
|
164
|
+
const title_4: string;
|
|
165
|
+
export { title_4 as title };
|
|
166
|
+
export namespace annotations {
|
|
167
|
+
const showAnnotations: boolean;
|
|
168
|
+
const annotationsData: {
|
|
169
|
+
annotationAxis: string;
|
|
170
|
+
label: string;
|
|
171
|
+
value: number;
|
|
172
|
+
color: string;
|
|
173
|
+
}[];
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
export { options_3 as options };
|
|
177
|
+
}
|
|
178
|
+
declare namespace scatterWithAxesLabels {
|
|
179
|
+
export namespace data_6 {
|
|
180
|
+
export { labels1 as labels };
|
|
181
|
+
const datasets_6: {
|
|
182
|
+
label: string;
|
|
183
|
+
data: {
|
|
184
|
+
x: number;
|
|
185
|
+
y: number;
|
|
186
|
+
}[];
|
|
187
|
+
}[];
|
|
188
|
+
export { datasets_6 as datasets };
|
|
189
|
+
}
|
|
190
|
+
export { data_6 as data };
|
|
191
|
+
export namespace options_4 {
|
|
192
|
+
const title_5: string;
|
|
193
|
+
export { title_5 as title };
|
|
194
|
+
export namespace axes {
|
|
195
|
+
const x: {
|
|
196
|
+
label: string;
|
|
197
|
+
}[];
|
|
198
|
+
const y: {
|
|
199
|
+
label: string;
|
|
200
|
+
}[];
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
export { options_4 as options };
|
|
204
|
+
}
|
|
205
|
+
declare const labels1: string[];
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { IDefaultScatterOptions } from '../../scatter-chart/scatter-chart-default-props.interface';
|
|
2
|
+
export declare const getScatterChartScales: (options: IDefaultScatterOptions) => {
|
|
3
|
+
x: {
|
|
4
|
+
type: "linear";
|
|
5
|
+
position: any;
|
|
6
|
+
beginAtZero: boolean;
|
|
7
|
+
reverse: boolean;
|
|
8
|
+
suggestedMax: number | undefined;
|
|
9
|
+
suggestedMin: number | undefined;
|
|
10
|
+
min: number | undefined;
|
|
11
|
+
max: number | undefined;
|
|
12
|
+
title: {
|
|
13
|
+
display: boolean;
|
|
14
|
+
text: string | undefined;
|
|
15
|
+
padding: number;
|
|
16
|
+
};
|
|
17
|
+
ticks: {
|
|
18
|
+
includeBounds: boolean;
|
|
19
|
+
font: {
|
|
20
|
+
size: number;
|
|
21
|
+
};
|
|
22
|
+
stepSize: number | undefined;
|
|
23
|
+
};
|
|
24
|
+
grid: {};
|
|
25
|
+
};
|
|
26
|
+
y: {
|
|
27
|
+
type: "linear";
|
|
28
|
+
position: any;
|
|
29
|
+
beginAtZero: boolean;
|
|
30
|
+
reverse: boolean;
|
|
31
|
+
suggestedMax: number | undefined;
|
|
32
|
+
suggestedMin: number | undefined;
|
|
33
|
+
min: number | undefined;
|
|
34
|
+
max: number | undefined;
|
|
35
|
+
title: {
|
|
36
|
+
display: boolean;
|
|
37
|
+
text: string | undefined;
|
|
38
|
+
padding: number;
|
|
39
|
+
};
|
|
40
|
+
ticks: {
|
|
41
|
+
includeBounds: boolean;
|
|
42
|
+
font: {
|
|
43
|
+
size: number;
|
|
44
|
+
};
|
|
45
|
+
stepSize: number | undefined;
|
|
46
|
+
};
|
|
47
|
+
grid: {};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TooltipItem } from 'chart.js';
|
|
2
|
+
import { IDefaultScatterOptions } from '../../scatter-chart/scatter-chart-default-props.interface';
|
|
3
|
+
interface IRawData {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
}
|
|
7
|
+
interface IScatterTooltipItem extends TooltipItem<'scatter'> {
|
|
8
|
+
raw: IRawData;
|
|
9
|
+
}
|
|
10
|
+
export declare const getTooltipsConfig: (options: IDefaultScatterOptions) => {
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
callbacks: {
|
|
13
|
+
title: (tooltipItems: TooltipItem<'scatter'>[]) => string | undefined;
|
|
14
|
+
label: (tooltipItem: IScatterTooltipItem) => string;
|
|
15
|
+
};
|
|
16
|
+
backgroundColor: string;
|
|
17
|
+
displayColors: boolean;
|
|
18
|
+
padding: number;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oliasoft-open-source/charts-library",
|
|
3
|
-
"version": "4.1
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "React Chart Library (based on Chart.js and react-chart-js-2)",
|
|
5
5
|
"homepage": "https://gitlab.com/oliasoft-open-source/charts-library",
|
|
6
6
|
"resolutions": {
|