@oliasoft-open-source/charts-library 5.14.1 → 5.15.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.
@@ -11,178 +11,8 @@ export declare const useScatterChartConfig: (chart: IScatterChartDefaultProps, c
11
11
  onHover: (evt: ChartEvent, hoveredItems: ICommonHoveredItems[]) => void;
12
12
  };
13
13
  scales: {
14
- x: {
15
- type: "linear";
16
- position: import('chart.js').CartesianScaleOptions["position"];
17
- beginAtZero: boolean | undefined;
18
- reverse: boolean | undefined;
19
- suggestedMax: number | undefined;
20
- suggestedMin: number | undefined;
21
- min: number | undefined;
22
- max: number | undefined;
23
- title: {
24
- font: {
25
- size: number;
26
- } | {
27
- family?: string | undefined;
28
- size: number;
29
- style?: "initial" | "normal" | "italic" | "oblique" | "inherit" | undefined;
30
- weight?: number | "bold" | "normal" | "lighter" | "bolder" | null | undefined;
31
- lineHeight?: string | number | undefined;
32
- } | {
33
- size: number;
34
- } | {
35
- family?: import('chart.js').Scriptable<string | undefined, import('chart.js').ScriptableCartesianScaleContext>;
36
- size: number | ((ctx: import('chart.js').ScriptableCartesianScaleContext, options: import('node_modules/chart.js/dist/types/basic').AnyObject) => number | undefined);
37
- style?: import('chart.js').Scriptable<"initial" | "normal" | "italic" | "oblique" | "inherit" | undefined, import('chart.js').ScriptableCartesianScaleContext>;
38
- weight?: import('chart.js').Scriptable<number | "bold" | "normal" | "lighter" | "bolder" | null | undefined, import('chart.js').ScriptableCartesianScaleContext>;
39
- lineHeight?: import('chart.js').Scriptable<string | number | undefined, import('chart.js').ScriptableCartesianScaleContext>;
40
- };
41
- display: boolean;
42
- align?: import('chart.js').Align | undefined;
43
- text: string | string[] | undefined;
44
- color?: import('chart.js').Color | undefined;
45
- padding: number | {
46
- top: number;
47
- bottom: number;
48
- y: number;
49
- };
50
- };
51
- ticks: {
52
- font: {
53
- size: number;
54
- } | {
55
- family?: string | undefined;
56
- size: number;
57
- style?: "initial" | "normal" | "italic" | "oblique" | "inherit" | undefined;
58
- weight?: number | "bold" | "normal" | "lighter" | "bolder" | null | undefined;
59
- lineHeight?: string | number | undefined;
60
- } | {
61
- size: number;
62
- } | {
63
- family?: import('chart.js').Scriptable<string | undefined, import('chart.js').ScriptableScaleContext>;
64
- size: number | ((ctx: import('chart.js').ScriptableScaleContext, options: import('node_modules/chart.js/dist/types/basic').AnyObject) => number | undefined);
65
- style?: import('chart.js').Scriptable<"initial" | "normal" | "italic" | "oblique" | "inherit" | undefined, import('chart.js').ScriptableScaleContext>;
66
- weight?: import('chart.js').Scriptable<number | "bold" | "normal" | "lighter" | "bolder" | null | undefined, import('chart.js').ScriptableScaleContext>;
67
- lineHeight?: import('chart.js').Scriptable<string | number | undefined, import('chart.js').ScriptableScaleContext>;
68
- };
69
- backdropColor?: import('chart.js').Scriptable<import('chart.js').Color, import('chart.js').ScriptableScaleContext> | undefined;
70
- backdropPadding?: number | import('chart.js').ChartArea | undefined;
71
- callback?: ((this: import('chart.js').Scale, tickValue: number | string, index: number, ticks: import('chart.js').Tick[]) => string | string[] | number | number[] | null | undefined) | undefined;
72
- display?: boolean | undefined;
73
- color?: import('chart.js').ScriptableAndArray<import('chart.js').Color, import('chart.js').ScriptableScaleContext> | undefined;
74
- padding?: number | undefined;
75
- showLabelBackdrop?: import('chart.js').Scriptable<boolean, import('chart.js').ScriptableScaleContext> | undefined;
76
- textStrokeColor?: import('chart.js').Scriptable<import('chart.js').Color, import('chart.js').ScriptableScaleContext> | undefined;
77
- textStrokeWidth?: import('chart.js').Scriptable<number, import('chart.js').ScriptableScaleContext> | undefined;
78
- z?: number | undefined;
79
- major?: {
80
- enabled: boolean;
81
- } | undefined;
82
- sampleSize?: number | undefined;
83
- align?: import('chart.js').Align | "inner" | undefined;
84
- autoSkip?: boolean | undefined;
85
- autoSkipPadding?: number | undefined;
86
- crossAlign?: "center" | "near" | "far" | undefined;
87
- includeBounds: boolean;
88
- labelOffset?: number | undefined;
89
- minRotation?: number | undefined;
90
- maxRotation?: number | undefined;
91
- mirror?: boolean | undefined;
92
- maxTicksLimit?: number | undefined;
93
- format?: Intl.NumberFormatOptions | undefined;
94
- precision?: number | undefined;
95
- stepSize: number | undefined;
96
- count?: number | undefined;
97
- };
98
- grid: {};
99
- };
100
- y: {
101
- type: "linear";
102
- position: import('chart.js').CartesianScaleOptions["position"];
103
- beginAtZero: boolean | undefined;
104
- reverse: boolean | undefined;
105
- suggestedMax: number | undefined;
106
- suggestedMin: number | undefined;
107
- min: number | undefined;
108
- max: number | undefined;
109
- title: {
110
- font: {
111
- size: number;
112
- } | {
113
- family?: string | undefined;
114
- size: number;
115
- style?: "initial" | "normal" | "italic" | "oblique" | "inherit" | undefined;
116
- weight?: number | "bold" | "normal" | "lighter" | "bolder" | null | undefined;
117
- lineHeight?: string | number | undefined;
118
- } | {
119
- size: number;
120
- } | {
121
- family?: import('chart.js').Scriptable<string | undefined, import('chart.js').ScriptableCartesianScaleContext>;
122
- size: number | ((ctx: import('chart.js').ScriptableCartesianScaleContext, options: import('node_modules/chart.js/dist/types/basic').AnyObject) => number | undefined);
123
- style?: import('chart.js').Scriptable<"initial" | "normal" | "italic" | "oblique" | "inherit" | undefined, import('chart.js').ScriptableCartesianScaleContext>;
124
- weight?: import('chart.js').Scriptable<number | "bold" | "normal" | "lighter" | "bolder" | null | undefined, import('chart.js').ScriptableCartesianScaleContext>;
125
- lineHeight?: import('chart.js').Scriptable<string | number | undefined, import('chart.js').ScriptableCartesianScaleContext>;
126
- };
127
- display: boolean;
128
- align?: import('chart.js').Align | undefined;
129
- text: string | string[] | undefined;
130
- color?: import('chart.js').Color | undefined;
131
- padding: number | {
132
- top: number;
133
- bottom: number;
134
- y: number;
135
- };
136
- };
137
- ticks: {
138
- font: {
139
- size: number;
140
- } | {
141
- family?: string | undefined;
142
- size: number;
143
- style?: "initial" | "normal" | "italic" | "oblique" | "inherit" | undefined;
144
- weight?: number | "bold" | "normal" | "lighter" | "bolder" | null | undefined;
145
- lineHeight?: string | number | undefined;
146
- } | {
147
- size: number;
148
- } | {
149
- family?: import('chart.js').Scriptable<string | undefined, import('chart.js').ScriptableScaleContext>;
150
- size: number | ((ctx: import('chart.js').ScriptableScaleContext, options: import('node_modules/chart.js/dist/types/basic').AnyObject) => number | undefined);
151
- style?: import('chart.js').Scriptable<"initial" | "normal" | "italic" | "oblique" | "inherit" | undefined, import('chart.js').ScriptableScaleContext>;
152
- weight?: import('chart.js').Scriptable<number | "bold" | "normal" | "lighter" | "bolder" | null | undefined, import('chart.js').ScriptableScaleContext>;
153
- lineHeight?: import('chart.js').Scriptable<string | number | undefined, import('chart.js').ScriptableScaleContext>;
154
- };
155
- backdropColor?: import('chart.js').Scriptable<import('chart.js').Color, import('chart.js').ScriptableScaleContext> | undefined;
156
- backdropPadding?: number | import('chart.js').ChartArea | undefined;
157
- callback?: ((this: import('chart.js').Scale, tickValue: number | string, index: number, ticks: import('chart.js').Tick[]) => string | string[] | number | number[] | null | undefined) | undefined;
158
- display?: boolean | undefined;
159
- color?: import('chart.js').ScriptableAndArray<import('chart.js').Color, import('chart.js').ScriptableScaleContext> | undefined;
160
- padding?: number | undefined;
161
- showLabelBackdrop?: import('chart.js').Scriptable<boolean, import('chart.js').ScriptableScaleContext> | undefined;
162
- textStrokeColor?: import('chart.js').Scriptable<import('chart.js').Color, import('chart.js').ScriptableScaleContext> | undefined;
163
- textStrokeWidth?: import('chart.js').Scriptable<number, import('chart.js').ScriptableScaleContext> | undefined;
164
- z?: number | undefined;
165
- major?: {
166
- enabled: boolean;
167
- } | undefined;
168
- sampleSize?: number | undefined;
169
- align?: import('chart.js').Align | "inner" | undefined;
170
- autoSkip?: boolean | undefined;
171
- autoSkipPadding?: number | undefined;
172
- crossAlign?: "center" | "near" | "far" | undefined;
173
- includeBounds: boolean;
174
- labelOffset?: number | undefined;
175
- minRotation?: number | undefined;
176
- maxRotation?: number | undefined;
177
- mirror?: boolean | undefined;
178
- maxTicksLimit?: number | undefined;
179
- format?: Intl.NumberFormatOptions | undefined;
180
- precision?: number | undefined;
181
- stepSize: number | undefined;
182
- count?: number | undefined;
183
- };
184
- grid: {};
185
- };
14
+ x: import('../../common/common.interface').ICommonScaleOptions;
15
+ y: import('../../common/common.interface').ICommonScaleOptions;
186
16
  };
187
17
  animation: Partial<AnimationSpec<"scatter">>;
188
18
  plugins: {
@@ -61,6 +61,7 @@ export interface IScatterChartDefaultProps {
61
61
  tooltip: IDefaultTooltip;
62
62
  graph: IDefaultScatterGraph;
63
63
  axes: IScatterAxes;
64
+ scales?: ICommonScales;
64
65
  additionalAxesOptions: ICommonAdditionalAxesOptions;
65
66
  legend: IDefaultScatterLegend;
66
67
  chartOptions: IDefaultChartOptions;
@@ -1,176 +1,5 @@
1
1
  import { IDefaultScatterOptions } from '../scatter-chart-default-props.interface';
2
- import { CartesianScaleOptions } from 'chart.js';
3
2
  export declare const getScatterChartScales: (options: IDefaultScatterOptions) => {
4
- x: {
5
- type: "linear";
6
- position: CartesianScaleOptions["position"];
7
- beginAtZero: boolean | undefined;
8
- reverse: boolean | undefined;
9
- suggestedMax: number | undefined;
10
- suggestedMin: number | undefined;
11
- min: number | undefined;
12
- max: number | undefined;
13
- title: {
14
- font: {
15
- size: number;
16
- } | {
17
- family?: string | undefined;
18
- size: number;
19
- style?: "initial" | "normal" | "italic" | "oblique" | "inherit" | undefined;
20
- weight?: number | "bold" | "normal" | "lighter" | "bolder" | null | undefined;
21
- lineHeight?: string | number | undefined;
22
- } | {
23
- size: number;
24
- } | {
25
- family?: import('chart.js').Scriptable<string | undefined, import('chart.js').ScriptableCartesianScaleContext>;
26
- size: number | ((ctx: import('chart.js').ScriptableCartesianScaleContext, options: import('node_modules/chart.js/dist/types/basic').AnyObject) => number | undefined);
27
- style?: import('chart.js').Scriptable<"initial" | "normal" | "italic" | "oblique" | "inherit" | undefined, import('chart.js').ScriptableCartesianScaleContext>;
28
- weight?: import('chart.js').Scriptable<number | "bold" | "normal" | "lighter" | "bolder" | null | undefined, import('chart.js').ScriptableCartesianScaleContext>;
29
- lineHeight?: import('chart.js').Scriptable<string | number | undefined, import('chart.js').ScriptableCartesianScaleContext>;
30
- };
31
- display: boolean;
32
- align?: import('chart.js').Align | undefined;
33
- text: string | string[] | undefined;
34
- color?: import('chart.js').Color | undefined;
35
- padding: number | {
36
- top: number;
37
- bottom: number;
38
- y: number;
39
- };
40
- };
41
- ticks: {
42
- font: {
43
- size: number;
44
- } | {
45
- family?: string | undefined;
46
- size: number;
47
- style?: "initial" | "normal" | "italic" | "oblique" | "inherit" | undefined;
48
- weight?: number | "bold" | "normal" | "lighter" | "bolder" | null | undefined;
49
- lineHeight?: string | number | undefined;
50
- } | {
51
- size: number;
52
- } | {
53
- family?: import('chart.js').Scriptable<string | undefined, import('chart.js').ScriptableScaleContext>;
54
- size: number | ((ctx: import('chart.js').ScriptableScaleContext, options: import('node_modules/chart.js/dist/types/basic').AnyObject) => number | undefined);
55
- style?: import('chart.js').Scriptable<"initial" | "normal" | "italic" | "oblique" | "inherit" | undefined, import('chart.js').ScriptableScaleContext>;
56
- weight?: import('chart.js').Scriptable<number | "bold" | "normal" | "lighter" | "bolder" | null | undefined, import('chart.js').ScriptableScaleContext>;
57
- lineHeight?: import('chart.js').Scriptable<string | number | undefined, import('chart.js').ScriptableScaleContext>;
58
- };
59
- backdropColor?: import('chart.js').Scriptable<import('chart.js').Color, import('chart.js').ScriptableScaleContext> | undefined;
60
- backdropPadding?: number | import('chart.js').ChartArea | undefined;
61
- callback?: ((this: import('chart.js').Scale, tickValue: number | string, index: number, ticks: import('chart.js').Tick[]) => string | string[] | number | number[] | null | undefined) | undefined;
62
- display?: boolean | undefined;
63
- color?: import('chart.js').ScriptableAndArray<import('chart.js').Color, import('chart.js').ScriptableScaleContext> | undefined;
64
- padding?: number | undefined;
65
- showLabelBackdrop?: import('chart.js').Scriptable<boolean, import('chart.js').ScriptableScaleContext> | undefined;
66
- textStrokeColor?: import('chart.js').Scriptable<import('chart.js').Color, import('chart.js').ScriptableScaleContext> | undefined;
67
- textStrokeWidth?: import('chart.js').Scriptable<number, import('chart.js').ScriptableScaleContext> | undefined;
68
- z?: number | undefined;
69
- major?: {
70
- enabled: boolean;
71
- } | undefined;
72
- sampleSize?: number | undefined;
73
- align?: import('chart.js').Align | "inner" | undefined;
74
- autoSkip?: boolean | undefined;
75
- autoSkipPadding?: number | undefined;
76
- crossAlign?: "center" | "near" | "far" | undefined;
77
- includeBounds: boolean;
78
- labelOffset?: number | undefined;
79
- minRotation?: number | undefined;
80
- maxRotation?: number | undefined;
81
- mirror?: boolean | undefined;
82
- maxTicksLimit?: number | undefined;
83
- format?: Intl.NumberFormatOptions | undefined;
84
- precision?: number | undefined;
85
- stepSize: number | undefined;
86
- count?: number | undefined;
87
- };
88
- grid: {};
89
- };
90
- y: {
91
- type: "linear";
92
- position: CartesianScaleOptions["position"];
93
- beginAtZero: boolean | undefined;
94
- reverse: boolean | undefined;
95
- suggestedMax: number | undefined;
96
- suggestedMin: number | undefined;
97
- min: number | undefined;
98
- max: number | undefined;
99
- title: {
100
- font: {
101
- size: number;
102
- } | {
103
- family?: string | undefined;
104
- size: number;
105
- style?: "initial" | "normal" | "italic" | "oblique" | "inherit" | undefined;
106
- weight?: number | "bold" | "normal" | "lighter" | "bolder" | null | undefined;
107
- lineHeight?: string | number | undefined;
108
- } | {
109
- size: number;
110
- } | {
111
- family?: import('chart.js').Scriptable<string | undefined, import('chart.js').ScriptableCartesianScaleContext>;
112
- size: number | ((ctx: import('chart.js').ScriptableCartesianScaleContext, options: import('node_modules/chart.js/dist/types/basic').AnyObject) => number | undefined);
113
- style?: import('chart.js').Scriptable<"initial" | "normal" | "italic" | "oblique" | "inherit" | undefined, import('chart.js').ScriptableCartesianScaleContext>;
114
- weight?: import('chart.js').Scriptable<number | "bold" | "normal" | "lighter" | "bolder" | null | undefined, import('chart.js').ScriptableCartesianScaleContext>;
115
- lineHeight?: import('chart.js').Scriptable<string | number | undefined, import('chart.js').ScriptableCartesianScaleContext>;
116
- };
117
- display: boolean;
118
- align?: import('chart.js').Align | undefined;
119
- text: string | string[] | undefined;
120
- color?: import('chart.js').Color | undefined;
121
- padding: number | {
122
- top: number;
123
- bottom: number;
124
- y: number;
125
- };
126
- };
127
- ticks: {
128
- font: {
129
- size: number;
130
- } | {
131
- family?: string | undefined;
132
- size: number;
133
- style?: "initial" | "normal" | "italic" | "oblique" | "inherit" | undefined;
134
- weight?: number | "bold" | "normal" | "lighter" | "bolder" | null | undefined;
135
- lineHeight?: string | number | undefined;
136
- } | {
137
- size: number;
138
- } | {
139
- family?: import('chart.js').Scriptable<string | undefined, import('chart.js').ScriptableScaleContext>;
140
- size: number | ((ctx: import('chart.js').ScriptableScaleContext, options: import('node_modules/chart.js/dist/types/basic').AnyObject) => number | undefined);
141
- style?: import('chart.js').Scriptable<"initial" | "normal" | "italic" | "oblique" | "inherit" | undefined, import('chart.js').ScriptableScaleContext>;
142
- weight?: import('chart.js').Scriptable<number | "bold" | "normal" | "lighter" | "bolder" | null | undefined, import('chart.js').ScriptableScaleContext>;
143
- lineHeight?: import('chart.js').Scriptable<string | number | undefined, import('chart.js').ScriptableScaleContext>;
144
- };
145
- backdropColor?: import('chart.js').Scriptable<import('chart.js').Color, import('chart.js').ScriptableScaleContext> | undefined;
146
- backdropPadding?: number | import('chart.js').ChartArea | undefined;
147
- callback?: ((this: import('chart.js').Scale, tickValue: number | string, index: number, ticks: import('chart.js').Tick[]) => string | string[] | number | number[] | null | undefined) | undefined;
148
- display?: boolean | undefined;
149
- color?: import('chart.js').ScriptableAndArray<import('chart.js').Color, import('chart.js').ScriptableScaleContext> | undefined;
150
- padding?: number | undefined;
151
- showLabelBackdrop?: import('chart.js').Scriptable<boolean, import('chart.js').ScriptableScaleContext> | undefined;
152
- textStrokeColor?: import('chart.js').Scriptable<import('chart.js').Color, import('chart.js').ScriptableScaleContext> | undefined;
153
- textStrokeWidth?: import('chart.js').Scriptable<number, import('chart.js').ScriptableScaleContext> | undefined;
154
- z?: number | undefined;
155
- major?: {
156
- enabled: boolean;
157
- } | undefined;
158
- sampleSize?: number | undefined;
159
- align?: import('chart.js').Align | "inner" | undefined;
160
- autoSkip?: boolean | undefined;
161
- autoSkipPadding?: number | undefined;
162
- crossAlign?: "center" | "near" | "far" | undefined;
163
- includeBounds: boolean;
164
- labelOffset?: number | undefined;
165
- minRotation?: number | undefined;
166
- maxRotation?: number | undefined;
167
- mirror?: boolean | undefined;
168
- maxTicksLimit?: number | undefined;
169
- format?: Intl.NumberFormatOptions | undefined;
170
- precision?: number | undefined;
171
- stepSize: number | undefined;
172
- count?: number | undefined;
173
- };
174
- grid: {};
175
- };
3
+ x: import('../../common/common.interface').ICommonScaleOptions;
4
+ y: import('../../common/common.interface').ICommonScaleOptions;
176
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/charts-library",
3
- "version": "5.14.1",
3
+ "version": "5.15.0-beta-2",
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
  "bugs": {
@@ -28,11 +28,13 @@
28
28
  "dependencies": {
29
29
  "@fontsource/noto-sans": "^5.2.7",
30
30
  "chart.js": "^4.4.9",
31
+ "chartjs-adapter-date-fns": "^3.0.0",
31
32
  "chartjs-plugin-annotation": "^3.1.0",
32
33
  "chartjs-plugin-datalabels": "^2.2.0",
33
34
  "chartjs-plugin-dragdata": "2.2.5",
34
35
  "chartjs-plugin-zoom": "2.2.0",
35
36
  "colord": "^2.9.3",
37
+ "date-fns": "^4.1.0",
36
38
  "fast-deep-equal": "^3.1.3",
37
39
  "html-to-image": "^1.11.13",
38
40
  "object-hash": "^3.0.0",
@@ -73,10 +75,10 @@
73
75
  "react-dom": "^18.2.0",
74
76
  "rollup-plugin-peer-deps-external": "^2.2.4",
75
77
  "storybook": "^10.2.17",
78
+ "typescript": "^5.9.3",
76
79
  "vite": "8.0.12",
77
80
  "vite-plugin-css-injected-by-js": "^5.0.1",
78
81
  "vite-plugin-dts": "^5.0.0",
79
- "typescript": "^5.9.3",
80
82
  "vite-plugin-optimize-persist": "^0.1.2",
81
83
  "vite-plugin-svgr": "^5.2.0",
82
84
  "vitest": "^4.1.6"