cats4u-charts 0.0.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.
Files changed (54) hide show
  1. package/.editorconfig +17 -0
  2. package/.vscode/extensions.json +4 -0
  3. package/.vscode/launch.json +20 -0
  4. package/.vscode/tasks.json +42 -0
  5. package/README.md +59 -0
  6. package/angular.json +118 -0
  7. package/dist/charts-lib/README.md +63 -0
  8. package/dist/charts-lib/fesm2022/charts-lib.mjs +3418 -0
  9. package/dist/charts-lib/fesm2022/charts-lib.mjs.map +1 -0
  10. package/dist/charts-lib/index.d.ts +110 -0
  11. package/package.json +58 -0
  12. package/projects/charts-lib/README.md +63 -0
  13. package/projects/charts-lib/ng-package.json +8 -0
  14. package/projects/charts-lib/package.json +12 -0
  15. package/projects/charts-lib/src/lib/charts-lib.html +1 -0
  16. package/projects/charts-lib/src/lib/charts-lib.spec.ts +23 -0
  17. package/projects/charts-lib/src/lib/charts-lib.ts +121 -0
  18. package/projects/charts-lib/src/lib/component/area-chart/area-chart.html +1 -0
  19. package/projects/charts-lib/src/lib/component/area-chart/area-chart.scss +0 -0
  20. package/projects/charts-lib/src/lib/component/area-chart/area-chart.spec.ts +23 -0
  21. package/projects/charts-lib/src/lib/component/area-chart/area-chart.ts +266 -0
  22. package/projects/charts-lib/src/lib/component/bar-chart/bar-chart.html +1 -0
  23. package/projects/charts-lib/src/lib/component/bar-chart/bar-chart.scss +0 -0
  24. package/projects/charts-lib/src/lib/component/bar-chart/bar-chart.spec.ts +23 -0
  25. package/projects/charts-lib/src/lib/component/bar-chart/bar-chart.ts +301 -0
  26. package/projects/charts-lib/src/lib/component/line-chart/line-chart.html +1 -0
  27. package/projects/charts-lib/src/lib/component/line-chart/line-chart.scss +0 -0
  28. package/projects/charts-lib/src/lib/component/line-chart/line-chart.spec.ts +23 -0
  29. package/projects/charts-lib/src/lib/component/line-chart/line-chart.ts +266 -0
  30. package/projects/charts-lib/src/lib/modal/charts-lib.modal.ts +79 -0
  31. package/projects/charts-lib/src/lib/services/chart.service.ts +296 -0
  32. package/projects/charts-lib/src/lib/themes/chalk.ts +357 -0
  33. package/projects/charts-lib/src/lib/themes/dark.ts +380 -0
  34. package/projects/charts-lib/src/lib/themes/default.ts +377 -0
  35. package/projects/charts-lib/src/lib/themes/essos.ts +357 -0
  36. package/projects/charts-lib/src/lib/themes/roma.ts +399 -0
  37. package/projects/charts-lib/src/lib/themes/vintage.ts +378 -0
  38. package/projects/charts-lib/src/public-api.ts +2 -0
  39. package/projects/charts-lib/tsconfig.lib.json +14 -0
  40. package/projects/charts-lib/tsconfig.lib.prod.json +11 -0
  41. package/projects/charts-lib/tsconfig.spec.json +15 -0
  42. package/projects/demo-app/public/favicon.ico +0 -0
  43. package/projects/demo-app/src/app/app.config.ts +16 -0
  44. package/projects/demo-app/src/app/app.html +43 -0
  45. package/projects/demo-app/src/app/app.routes.ts +3 -0
  46. package/projects/demo-app/src/app/app.scss +47 -0
  47. package/projects/demo-app/src/app/app.spec.ts +25 -0
  48. package/projects/demo-app/src/app/app.ts +98 -0
  49. package/projects/demo-app/src/index.html +13 -0
  50. package/projects/demo-app/src/main.ts +6 -0
  51. package/projects/demo-app/src/styles.scss +4 -0
  52. package/projects/demo-app/tsconfig.app.json +15 -0
  53. package/projects/demo-app/tsconfig.spec.json +15 -0
  54. package/tsconfig.json +43 -0
@@ -0,0 +1,296 @@
1
+ import { Injectable, signal, computed, ElementRef, EventEmitter } from '@angular/core';
2
+ import { ECElementEvent } from 'echarts';
3
+ import { Subject } from 'rxjs';
4
+ import {
5
+ ChartsLibType,
6
+ ClickEvent,
7
+ ContextMenuListItem,
8
+ OptionsConfig,
9
+ } from '../modal/charts-lib.modal';
10
+
11
+ @Injectable({
12
+ providedIn: 'root',
13
+ })
14
+ export class ChartService {
15
+ private themeSignal = signal<ChartsLibType['themeName']>('default');
16
+ public theme = this.themeSignal.asReadonly();
17
+ newsubject = new Subject();
18
+
19
+ private dataSignal = signal<any[][]>([]);
20
+ public data = this.dataSignal.asReadonly();
21
+
22
+ private columnsSignal = signal<string[]>([]);
23
+ public columns = this.columnsSignal.asReadonly();
24
+
25
+ private chartOptionsConfigSignal = signal<OptionsConfig>({});
26
+ public chartOptionsConfig = this.chartOptionsConfigSignal.asReadonly();
27
+
28
+ private eventSignal = signal<ClickEvent>(new ClickEvent());
29
+ public clickEvent = this.eventSignal.asReadonly();
30
+
31
+ private contextMenuEventSignal = signal<ClickEvent>(new ClickEvent());
32
+ public contextMenuEvent = this.contextMenuEventSignal.asReadonly();
33
+
34
+ private contextMenuListSignal = signal<ContextMenuListItem[]>([]);
35
+ public contextMenuList = this.contextMenuListSignal.asReadonly();
36
+
37
+ private drillByConfigSignal = signal<ClickEvent>(new ClickEvent());
38
+ public drillByConfig = this.drillByConfigSignal.asReadonly();
39
+
40
+ private loadingSignal = signal<boolean>(false);
41
+ public loading = this.loadingSignal.asReadonly();
42
+
43
+ private contextMenu: HTMLElement | null = null;
44
+
45
+ public isDarkTheme = computed(() => this.theme() === 'dark');
46
+
47
+ constructor() {}
48
+
49
+ setTheme(themeName: ChartsLibType['themeName']): void {
50
+ this.themeSignal.set(themeName);
51
+ }
52
+
53
+ setData(data: any[][]): void {
54
+ this.dataSignal.set(data);
55
+ }
56
+
57
+ setColumns(columns: string[]): void {
58
+ this.columnsSignal.set(columns);
59
+ }
60
+
61
+ setChartOptionsConfig(config: OptionsConfig) {
62
+ this.chartOptionsConfigSignal.set(config);
63
+ }
64
+
65
+ setContextMenuList(contextMenu: ContextMenuListItem[]) {
66
+ this.contextMenuListSignal.set(contextMenu);
67
+ }
68
+
69
+ setLoading(isLoading: boolean): void {
70
+ this.loadingSignal.set(isLoading);
71
+ }
72
+
73
+ getCurrentTheme(): ChartsLibType['themeName'] {
74
+ return this.themeSignal();
75
+ }
76
+
77
+ getCurrentData(): any[][] {
78
+ return this.dataSignal();
79
+ }
80
+ getCurrentColumns(): string[] {
81
+ return this.columnsSignal();
82
+ }
83
+ handleClick(event: ECElementEvent): void {
84
+ this.eventSignal.set({
85
+ seriesName: event?.seriesName,
86
+ value: event?.value,
87
+ name: event?.name,
88
+ dataIndex: event?.dataIndex,
89
+ seriesIndex: event?.seriesIndex,
90
+ } as ClickEvent);
91
+ }
92
+
93
+ getClickEvent(): ClickEvent {
94
+ return this.eventSignal();
95
+ }
96
+
97
+ showContextMenu(
98
+ x: number,
99
+ y: number,
100
+ params: ECElementEvent | null,
101
+ chartContainer: ElementRef<HTMLDivElement>
102
+ ): void {
103
+ // Remove existing menu
104
+ this.hideContextMenu();
105
+ // Create menu element
106
+ this.contextMenu = document.createElement('div');
107
+ this.contextMenu.style.position = 'absolute';
108
+ this.contextMenu.style.left = `${x}px`;
109
+ this.contextMenu.style.top = `${y}px`;
110
+ this.contextMenu.style.background = 'white';
111
+ this.contextMenu.style.border = '1px solid #ccc';
112
+ this.contextMenu.style.borderRadius = '6px';
113
+ this.contextMenu.style.boxShadow = '0 2px 10px rgba(0,0,0,0.2)';
114
+ this.contextMenu.style.zIndex = '10000000';
115
+ this.contextMenu.style.padding = '5px 0';
116
+ this.contextMenu.style.minWidth = '120px';
117
+
118
+ // Define menu options (customize as needed)
119
+ const options: ContextMenuListItem[] = [
120
+ {
121
+ label: 'Drill By',
122
+ options: this.columns().map((column) => ({
123
+ label: column,
124
+ action: () => {
125
+ this.drillByHandler(column);
126
+ },
127
+ })),
128
+ action: () => {},
129
+ },
130
+ {
131
+ label: 'Drill Down',
132
+ action: () => this.drillDownHandler(params),
133
+ disabled: !params,
134
+ },
135
+ ...this.contextMenuList(),
136
+ ];
137
+ let activeSubMenu: HTMLElement | null = null;
138
+ // Add options to menu
139
+ options.forEach((option, index) => {
140
+ const item = document.createElement('div');
141
+ item.innerHTML = option.options
142
+ ? `<div style="display: flex; justify-content: space-between;align-items:center;"><label>${option.label}</label><label style="font-weight:600; margin-left: 1rem;">></label></div>`
143
+ : `<label>${option.label}</label>`;
144
+ item.style.padding = '8px 12px';
145
+ item.style.cursor = 'pointer';
146
+ if (option.disabled) {
147
+ item.style.opacity = '0.5';
148
+ item.style.cursor = 'not-allowed';
149
+ }
150
+ if (index < options.length - 1) {
151
+ item.style.borderBottom = '1px solid #e1e1e1';
152
+ }
153
+ item.style.fontSize = '14px';
154
+ item.style.position = 'relative';
155
+ item.onmouseover = (event: MouseEvent) => {
156
+ if (!option.disabled) {
157
+ item.style.background = '#cee2ff';
158
+
159
+ if (activeSubMenu) {
160
+ activeSubMenu.remove();
161
+ activeSubMenu = null;
162
+ }
163
+ if (option.options) {
164
+ activeSubMenu = document.createElement('div');
165
+ activeSubMenu.style.position = 'absolute';
166
+ activeSubMenu.style.left = `${item.offsetWidth + 4}px`; // Position to the right of the item
167
+ activeSubMenu.style.top = '0px'; // Align with the top of the item
168
+ activeSubMenu.style.background = 'white';
169
+ activeSubMenu.style.border = '1px solid #ccc';
170
+ activeSubMenu.style.borderRadius = '6px';
171
+ activeSubMenu.style.boxShadow = '0 2px 10px rgba(0,0,0,0.2)';
172
+ activeSubMenu.style.zIndex = '10000001'; // Higher than main menu
173
+ activeSubMenu.style.padding = '5px 0';
174
+ activeSubMenu.style.minWidth = '120px';
175
+ // Add submenu items
176
+ option.options.forEach((subOption, idx) => {
177
+ const subItem = document.createElement('div');
178
+ subItem.textContent = subOption.label;
179
+ subItem.style.padding = '8px 12px';
180
+ subItem.style.cursor = 'pointer';
181
+ if (option.options && idx < option.options.length - 1) {
182
+ subItem.style.borderBottom = '1px solid #e1e1e1';
183
+ }
184
+ subItem.style.fontSize = '14px';
185
+ subItem.onmouseover = () => {
186
+ subItem.style.background = '#cee2ff';
187
+ };
188
+ subItem.onmouseout = () => (subItem.style.background = 'white');
189
+ subItem.onclick = () => {
190
+ if (subOption.action) {
191
+ subOption.action(
192
+ params
193
+ ? ({
194
+ seriesName: params?.seriesName,
195
+ value: params?.value,
196
+ name: params?.name,
197
+ dataIndex: params?.dataIndex,
198
+ seriesIndex: params?.seriesIndex,
199
+ } as ClickEvent)
200
+ : undefined
201
+ );
202
+ }
203
+ this.hideContextMenu();
204
+ this.resetContextEvent();
205
+ };
206
+ activeSubMenu!.appendChild(subItem);
207
+ });
208
+ if (this.contextMenu) {
209
+ this.contextMenu.appendChild(activeSubMenu);
210
+ }
211
+ }
212
+ }
213
+ };
214
+ item.onmouseout = (event: MouseEvent) => {
215
+ if (!option.disabled) {
216
+ item.style.background = 'white';
217
+ }
218
+ };
219
+
220
+ item.onclick = () => {
221
+ if (!option.options && !option.disabled) {
222
+ if (option.action) {
223
+ option.action();
224
+ }
225
+ this.hideContextMenu();
226
+ this.resetContextEvent();
227
+ }
228
+ };
229
+ if (this.contextMenu) {
230
+ this.contextMenu.appendChild(item);
231
+ }
232
+ });
233
+ // Append to chart container
234
+ chartContainer.nativeElement.appendChild(this.contextMenu);
235
+ }
236
+
237
+ openContextMenu(
238
+ params: ECElementEvent | null,
239
+ chartContainer: ElementRef<HTMLDivElement>,
240
+ mouseEvent?: MouseEvent
241
+ ): void {
242
+ if (params) {
243
+ this.contextMenuEventSignal.set({
244
+ seriesName: params?.seriesName,
245
+ value: params?.value,
246
+ name: params?.name,
247
+ dataIndex: params?.dataIndex,
248
+ seriesIndex: params?.seriesIndex,
249
+ } as ClickEvent);
250
+ } else {
251
+ this.resetContextEvent();
252
+ }
253
+ const event = mouseEvent || (params?.event?.event as MouseEvent);
254
+ event?.preventDefault();
255
+
256
+ if (!event) return;
257
+ const rect = chartContainer.nativeElement.getBoundingClientRect();
258
+ const x = event.clientX - rect.left;
259
+ const y = event.clientY - rect.top;
260
+ // Create or update the menu
261
+ this.showContextMenu(x, y, params, chartContainer);
262
+ }
263
+ hideContextMenu(): void {
264
+ if (this.contextMenu) {
265
+ this.contextMenu.remove();
266
+ this.contextMenu = null;
267
+ }
268
+ }
269
+
270
+ resetContextEvent(): void {
271
+ this.contextMenuEventSignal.set(new ClickEvent());
272
+ }
273
+
274
+ drillDownHandler(params: ECElementEvent | null): void {
275
+ if (params) {
276
+ this.eventSignal.set({
277
+ seriesName: params?.seriesName,
278
+ value: params?.value,
279
+ name: params?.name,
280
+ dataIndex: params?.dataIndex,
281
+ seriesIndex: params?.seriesIndex,
282
+ } as ClickEvent);
283
+ }
284
+ }
285
+
286
+ drillByHandler(columnName: string = ''): void {
287
+ const params = {
288
+ seriesName: columnName,
289
+ value: undefined,
290
+ name: '',
291
+ dataIndex: -1,
292
+ seriesIndex: -1,
293
+ } as ClickEvent;
294
+ this.drillByConfigSignal.set(params);
295
+ }
296
+ }
@@ -0,0 +1,357 @@
1
+ import * as echarts from 'echarts';
2
+
3
+ const chalkTheme = {
4
+ color: ['#fc97af', '#87f7cf', '#f7f494', '#72ccff', '#f7c5a0', '#d4a4eb', '#d2f5a6', '#76f2f2'],
5
+ backgroundColor: 'rgba(41,52,65,1)',
6
+ textStyle: {},
7
+ title: {
8
+ textStyle: {
9
+ color: '#ffffff',
10
+ },
11
+ subtextStyle: {
12
+ color: '#dddddd',
13
+ },
14
+ },
15
+ line: {
16
+ itemStyle: {
17
+ borderWidth: '4',
18
+ },
19
+ lineStyle: {
20
+ width: '3',
21
+ },
22
+ symbolSize: '0',
23
+ symbol: 'circle',
24
+ smooth: true,
25
+ },
26
+ radar: {
27
+ itemStyle: {
28
+ borderWidth: '4',
29
+ },
30
+ lineStyle: {
31
+ width: '3',
32
+ },
33
+ symbolSize: '0',
34
+ symbol: 'circle',
35
+ smooth: true,
36
+ },
37
+ bar: {
38
+ itemStyle: {
39
+ barBorderWidth: 0,
40
+ barBorderColor: '#ccc',
41
+ },
42
+ },
43
+ pie: {
44
+ itemStyle: {
45
+ borderWidth: 0,
46
+ borderColor: '#ccc',
47
+ },
48
+ },
49
+ scatter: {
50
+ itemStyle: {
51
+ borderWidth: 0,
52
+ borderColor: '#ccc',
53
+ },
54
+ },
55
+ boxplot: {
56
+ itemStyle: {
57
+ borderWidth: 0,
58
+ borderColor: '#ccc',
59
+ },
60
+ },
61
+ parallel: {
62
+ itemStyle: {
63
+ borderWidth: 0,
64
+ borderColor: '#ccc',
65
+ },
66
+ },
67
+ sankey: {
68
+ itemStyle: {
69
+ borderWidth: 0,
70
+ borderColor: '#ccc',
71
+ },
72
+ },
73
+ funnel: {
74
+ itemStyle: {
75
+ borderWidth: 0,
76
+ borderColor: '#ccc',
77
+ },
78
+ },
79
+ gauge: {
80
+ itemStyle: {
81
+ borderWidth: 0,
82
+ borderColor: '#ccc',
83
+ },
84
+ },
85
+ candlestick: {
86
+ itemStyle: {
87
+ color: '#fc97af',
88
+ color0: 'transparent',
89
+ borderColor: '#fc97af',
90
+ borderColor0: '#87f7cf',
91
+ borderWidth: '2',
92
+ },
93
+ },
94
+ graph: {
95
+ itemStyle: {
96
+ borderWidth: 0,
97
+ borderColor: '#ccc',
98
+ },
99
+ lineStyle: {
100
+ width: '1',
101
+ color: '#ffffff',
102
+ },
103
+ symbolSize: '0',
104
+ symbol: 'circle',
105
+ smooth: true,
106
+ color: ['#fc97af', '#87f7cf', '#f7f494', '#72ccff', '#f7c5a0', '#d4a4eb', '#d2f5a6', '#76f2f2'],
107
+ label: {
108
+ color: '#293441',
109
+ },
110
+ },
111
+ map: {
112
+ itemStyle: {
113
+ areaColor: '#f3f3f3',
114
+ borderColor: '#999999',
115
+ borderWidth: 0.5,
116
+ },
117
+ label: {
118
+ color: '#893448',
119
+ },
120
+ emphasis: {
121
+ itemStyle: {
122
+ areaColor: 'rgba(255,178,72,1)',
123
+ borderColor: '#eb8146',
124
+ borderWidth: 1,
125
+ },
126
+ label: {
127
+ color: 'rgb(137,52,72)',
128
+ },
129
+ },
130
+ },
131
+ geo: {
132
+ itemStyle: {
133
+ areaColor: '#f3f3f3',
134
+ borderColor: '#999999',
135
+ borderWidth: 0.5,
136
+ },
137
+ label: {
138
+ color: '#893448',
139
+ },
140
+ emphasis: {
141
+ itemStyle: {
142
+ areaColor: 'rgba(255,178,72,1)',
143
+ borderColor: '#eb8146',
144
+ borderWidth: 1,
145
+ },
146
+ label: {
147
+ color: 'rgb(137,52,72)',
148
+ },
149
+ },
150
+ },
151
+ categoryAxis: {
152
+ axisLine: {
153
+ show: true,
154
+ lineStyle: {
155
+ color: '#666666',
156
+ },
157
+ },
158
+ axisTick: {
159
+ show: false,
160
+ lineStyle: {
161
+ color: '#333',
162
+ },
163
+ },
164
+ axisLabel: {
165
+ show: true,
166
+ color: '#aaaaaa',
167
+ },
168
+ splitLine: {
169
+ show: false,
170
+ lineStyle: {
171
+ color: ['#e6e6e6'],
172
+ },
173
+ },
174
+ splitArea: {
175
+ show: false,
176
+ areaStyle: {
177
+ color: ['rgba(250,250,250,0.05)', 'rgba(200,200,200,0.02)'],
178
+ },
179
+ },
180
+ },
181
+ valueAxis: {
182
+ axisLine: {
183
+ show: true,
184
+ lineStyle: {
185
+ color: '#666666',
186
+ },
187
+ },
188
+ axisTick: {
189
+ show: false,
190
+ lineStyle: {
191
+ color: '#333',
192
+ },
193
+ },
194
+ axisLabel: {
195
+ show: true,
196
+ color: '#aaaaaa',
197
+ },
198
+ splitLine: {
199
+ show: false,
200
+ lineStyle: {
201
+ color: ['#e6e6e6'],
202
+ },
203
+ },
204
+ splitArea: {
205
+ show: false,
206
+ areaStyle: {
207
+ color: ['rgba(250,250,250,0.05)', 'rgba(200,200,200,0.02)'],
208
+ },
209
+ },
210
+ },
211
+ logAxis: {
212
+ axisLine: {
213
+ show: true,
214
+ lineStyle: {
215
+ color: '#666666',
216
+ },
217
+ },
218
+ axisTick: {
219
+ show: false,
220
+ lineStyle: {
221
+ color: '#333',
222
+ },
223
+ },
224
+ axisLabel: {
225
+ show: true,
226
+ color: '#aaaaaa',
227
+ },
228
+ splitLine: {
229
+ show: false,
230
+ lineStyle: {
231
+ color: ['#e6e6e6'],
232
+ },
233
+ },
234
+ splitArea: {
235
+ show: false,
236
+ areaStyle: {
237
+ color: ['rgba(250,250,250,0.05)', 'rgba(200,200,200,0.02)'],
238
+ },
239
+ },
240
+ },
241
+ timeAxis: {
242
+ axisLine: {
243
+ show: true,
244
+ lineStyle: {
245
+ color: '#666666',
246
+ },
247
+ },
248
+ axisTick: {
249
+ show: false,
250
+ lineStyle: {
251
+ color: '#333',
252
+ },
253
+ },
254
+ axisLabel: {
255
+ show: true,
256
+ color: '#aaaaaa',
257
+ },
258
+ splitLine: {
259
+ show: false,
260
+ lineStyle: {
261
+ color: ['#e6e6e6'],
262
+ },
263
+ },
264
+ splitArea: {
265
+ show: false,
266
+ areaStyle: {
267
+ color: ['rgba(250,250,250,0.05)', 'rgba(200,200,200,0.02)'],
268
+ },
269
+ },
270
+ },
271
+ toolbox: {
272
+ iconStyle: {
273
+ borderColor: '#999999',
274
+ },
275
+ emphasis: {
276
+ iconStyle: {
277
+ borderColor: '#666666',
278
+ },
279
+ },
280
+ },
281
+ legend: {
282
+ textStyle: {
283
+ color: '#999999',
284
+ },
285
+ left: 'center',
286
+ right: 'auto',
287
+ top: 'auto',
288
+ bottom: 15,
289
+ },
290
+ tooltip: {
291
+ axisPointer: {
292
+ lineStyle: {
293
+ color: '#cccccc',
294
+ width: 1,
295
+ },
296
+ crossStyle: {
297
+ color: '#cccccc',
298
+ width: 1,
299
+ },
300
+ },
301
+ },
302
+ timeline: {
303
+ lineStyle: {
304
+ color: '#87f7cf',
305
+ width: 1,
306
+ },
307
+ itemStyle: {
308
+ color: '#87f7cf',
309
+ borderWidth: 1,
310
+ },
311
+ controlStyle: {
312
+ color: '#87f7cf',
313
+ borderColor: '#87f7cf',
314
+ borderWidth: 0.5,
315
+ },
316
+ checkpointStyle: {
317
+ color: '#fc97af',
318
+ borderColor: 'rgba(252,151,175,0.3)',
319
+ },
320
+ label: {
321
+ color: '#87f7cf',
322
+ },
323
+ emphasis: {
324
+ itemStyle: {
325
+ color: '#f7f494',
326
+ },
327
+ controlStyle: {
328
+ color: '#87f7cf',
329
+ borderColor: '#87f7cf',
330
+ borderWidth: 0.5,
331
+ },
332
+ label: {
333
+ color: '#87f7cf',
334
+ },
335
+ },
336
+ },
337
+ visualMap: {
338
+ color: ['#fc97af', '#87f7cf'],
339
+ },
340
+ markPoint: {
341
+ label: {
342
+ color: '#293441',
343
+ },
344
+ emphasis: {
345
+ label: {
346
+ color: '#293441',
347
+ },
348
+ },
349
+ },
350
+ grid: {
351
+ left: '15%',
352
+ right: '10%',
353
+ top: 65,
354
+ bottom: 80,
355
+ },
356
+ };
357
+ echarts.registerTheme('chalk', (chalkTheme as any).default ?? chalkTheme);