win-chart 3.0.2 → 3.0.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.
Files changed (57) hide show
  1. package/dist/bun/index.js +5 -0
  2. package/dist/bun/index.js.map +25 -0
  3. package/dist/bun/types/components/ChartWrapper.d.ts +1 -0
  4. package/dist/bun/types/components/EarthChart.d.ts +15 -0
  5. package/dist/bun/types/components/GanttChart.d.ts +8 -0
  6. package/dist/bun/types/components/WinChart.d.ts +2 -0
  7. package/dist/bun/types/components/__tests__/Playground.test.d.ts +1 -0
  8. package/dist/bun/types/components/__tests__/WinChart.test.d.ts +1 -0
  9. package/dist/bun/types/index.d.ts +8 -0
  10. package/dist/bun/types/types/index.d.ts +126 -0
  11. package/dist/bun/types/utils/const.d.ts +14 -0
  12. package/dist/bun/types/utils/data.d.ts +20 -0
  13. package/dist/bun/types/utils/earthMockData.d.ts +7 -0
  14. package/dist/bun/types/utils/getAreaSpec.d.ts +14 -0
  15. package/dist/bun/types/utils/getBarSpec.d.ts +14 -0
  16. package/dist/bun/types/utils/getChartOptions.d.ts +7 -0
  17. package/dist/bun/types/utils/getColumnSpec.d.ts +14 -0
  18. package/dist/bun/types/utils/getDualSpec.d.ts +14 -0
  19. package/dist/bun/types/utils/getFunnelSpec.d.ts +8 -0
  20. package/dist/bun/types/utils/getLineSpec.d.ts +8 -0
  21. package/dist/bun/types/utils/getPieSpec.d.ts +13 -0
  22. package/dist/bun/types/utils/getRadarSpec.d.ts +7 -0
  23. package/dist/bun/types/utils/tool.d.ts +140 -0
  24. package/dist/cjs/components/__tests__/Playground.test.cjs +90 -0
  25. package/dist/cjs/components/__tests__/WinChart.test.cjs +112 -0
  26. package/dist/cjs/stories/WinChart.stories.cjs +524 -0
  27. package/dist/cjs/utils/const.cjs +21 -0
  28. package/dist/cjs/utils/getAreaSpec.cjs +2 -18
  29. package/dist/cjs/utils/getBarSpec.cjs +7 -21
  30. package/dist/cjs/utils/getColumnSpec.cjs +3 -18
  31. package/dist/cjs/utils/getDualSpec.cjs +3 -24
  32. package/dist/cjs/utils/getFunnelSpec.cjs +2 -3
  33. package/dist/cjs/utils/getLineSpec.cjs +2 -9
  34. package/dist/cjs/utils/getPieSpec.cjs +3 -6
  35. package/dist/cjs/utils/getRadarSpec.cjs +1 -3
  36. package/dist/cjs/utils/tool.cjs +7 -4
  37. package/dist/esm/components/__tests__/Playground.test.js +84 -0
  38. package/dist/esm/components/__tests__/WinChart.test.js +106 -0
  39. package/dist/esm/stories/WinChart.stories.js +466 -0
  40. package/dist/esm/utils/const.js +16 -1
  41. package/dist/esm/utils/getAreaSpec.js +3 -19
  42. package/dist/esm/utils/getBarSpec.js +8 -22
  43. package/dist/esm/utils/getColumnSpec.js +3 -18
  44. package/dist/esm/utils/getDualSpec.js +3 -24
  45. package/dist/esm/utils/getFunnelSpec.js +2 -3
  46. package/dist/esm/utils/getLineSpec.js +2 -9
  47. package/dist/esm/utils/getPieSpec.js +3 -6
  48. package/dist/esm/utils/getRadarSpec.js +2 -4
  49. package/dist/esm/utils/tool.js +7 -4
  50. package/dist/types/components/__tests__/Playground.test.d.ts +1 -0
  51. package/dist/types/components/__tests__/WinChart.test.d.ts +1 -0
  52. package/dist/types/index.d.ts +1 -1
  53. package/dist/types/types/index.d.ts +1 -2
  54. package/dist/types/utils/const.d.ts +6 -0
  55. package/dist/types/utils/getDualSpec.d.ts +1 -0
  56. package/dist/types/utils/tool.d.ts +2 -1
  57. package/package.json +28 -6
@@ -0,0 +1,524 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ DualAxisChart: ()=>DualAxisChart,
28
+ LineChart: ()=>LineChart,
29
+ FunnelChart: ()=>FunnelChart,
30
+ default: ()=>WinChart_stories,
31
+ RadarChart: ()=>RadarChart,
32
+ PieChart: ()=>PieChart,
33
+ ColumnChart: ()=>ColumnChart,
34
+ StackColumnChart: ()=>StackColumnChart,
35
+ BarChart: ()=>BarChart
36
+ });
37
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
38
+ const WinChart_cjs_namespaceObject = require("../components/WinChart.cjs");
39
+ const index_cjs_namespaceObject = require("../types/index.cjs");
40
+ const meta = {
41
+ title: '图表组件/WinChart',
42
+ component: WinChart_cjs_namespaceObject.WinChart,
43
+ parameters: {
44
+ layout: 'centered'
45
+ },
46
+ tags: [
47
+ 'autodocs'
48
+ ],
49
+ argTypes: {
50
+ chartType: {
51
+ control: 'select',
52
+ options: Object.values(index_cjs_namespaceObject.WinChartType),
53
+ description: '图表类型',
54
+ table: {
55
+ type: {
56
+ summary: 'string'
57
+ },
58
+ defaultValue: {
59
+ summary: 'line'
60
+ }
61
+ }
62
+ },
63
+ theme: {
64
+ control: 'radio',
65
+ options: [
66
+ 'light',
67
+ 'dark'
68
+ ],
69
+ description: '主题',
70
+ table: {
71
+ type: {
72
+ summary: 'string'
73
+ },
74
+ defaultValue: {
75
+ summary: 'light'
76
+ }
77
+ }
78
+ },
79
+ data: {
80
+ description: '图表数据'
81
+ },
82
+ extraOption: {
83
+ description: 'ECharts 扩展配置'
84
+ },
85
+ color: {
86
+ description: '颜色列表'
87
+ }
88
+ },
89
+ decorators: [
90
+ (Story)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
91
+ style: {
92
+ width: '800px',
93
+ height: '500px'
94
+ },
95
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Story, {})
96
+ })
97
+ ]
98
+ };
99
+ const WinChart_stories = meta;
100
+ const LineChart = {
101
+ args: {
102
+ chartType: index_cjs_namespaceObject.WinChartType.LINE,
103
+ data: [
104
+ {
105
+ label: '1961',
106
+ value: 0,
107
+ type: '统考认可州数(个)'
108
+ },
109
+ {
110
+ label: '2000',
111
+ value: 0,
112
+ type: '统考认可州数(个)'
113
+ },
114
+ {
115
+ label: '2019',
116
+ value: 5,
117
+ type: '统考认可州数(个)'
118
+ },
119
+ {
120
+ label: '2025',
121
+ value: 5,
122
+ type: '统考认可州数(个)'
123
+ },
124
+ {
125
+ label: '1961',
126
+ value: 22,
127
+ type: '国中华语开课率(%)'
128
+ },
129
+ {
130
+ label: '2000',
131
+ value: 40,
132
+ type: '国中华语开课率(%)'
133
+ },
134
+ {
135
+ label: '2019',
136
+ value: 65,
137
+ type: '国中华语开课率(%)'
138
+ },
139
+ {
140
+ label: '2025',
141
+ value: 88,
142
+ type: '国中华语开课率(%)'
143
+ }
144
+ ],
145
+ color: [
146
+ '#ff4d4f',
147
+ '#52c41a'
148
+ ],
149
+ extraOption: {
150
+ title: {
151
+ text: '中文政策核心指标增长趋势',
152
+ left: 'center'
153
+ }
154
+ }
155
+ }
156
+ };
157
+ const BarChart = {
158
+ args: {
159
+ chartType: index_cjs_namespaceObject.WinChartType.BAR,
160
+ data: [
161
+ {
162
+ label: '政府经费依赖度',
163
+ value: 0,
164
+ type: '华文独立体系(独中)(%)'
165
+ },
166
+ {
167
+ label: '非华裔参与率',
168
+ value: 12,
169
+ type: '华文独立体系(独中)(%)'
170
+ },
171
+ {
172
+ label: '政府经费依赖度',
173
+ value: 85,
174
+ type: '国民教育体系(国中)(%)'
175
+ },
176
+ {
177
+ label: '非华裔参与率',
178
+ value: 38,
179
+ type: '国民教育体系(国中)(%)'
180
+ }
181
+ ],
182
+ extraOption: {
183
+ title: {
184
+ text: '双轨体系核心数据对比',
185
+ left: 'center'
186
+ }
187
+ }
188
+ }
189
+ };
190
+ const ColumnChart = {
191
+ args: {
192
+ chartType: index_cjs_namespaceObject.WinChartType.COLUMN,
193
+ data: [
194
+ {
195
+ label: 'Jan',
196
+ value: 100,
197
+ type: 'Sales'
198
+ },
199
+ {
200
+ label: 'Feb',
201
+ value: 120,
202
+ type: 'Sales'
203
+ },
204
+ {
205
+ label: 'Mar',
206
+ value: 150,
207
+ type: 'Sales'
208
+ },
209
+ {
210
+ label: 'Jan',
211
+ value: 80,
212
+ type: 'Profit'
213
+ },
214
+ {
215
+ label: 'Feb',
216
+ value: 90,
217
+ type: 'Profit'
218
+ },
219
+ {
220
+ label: 'Mar',
221
+ value: 110,
222
+ type: 'Profit'
223
+ }
224
+ ],
225
+ extraOption: {
226
+ title: {
227
+ text: 'Monthly Sales & Profit',
228
+ left: 'center'
229
+ }
230
+ }
231
+ }
232
+ };
233
+ const StackColumnChart = {
234
+ args: {
235
+ chartType: index_cjs_namespaceObject.WinChartType.STACK_COLUMN,
236
+ data: [
237
+ {
238
+ label: 'Mon',
239
+ value: 120,
240
+ type: 'Email'
241
+ },
242
+ {
243
+ label: 'Tue',
244
+ value: 132,
245
+ type: 'Email'
246
+ },
247
+ {
248
+ label: 'Wed',
249
+ value: 101,
250
+ type: 'Email'
251
+ },
252
+ {
253
+ label: 'Mon',
254
+ value: 220,
255
+ type: 'Ad'
256
+ },
257
+ {
258
+ label: 'Tue',
259
+ value: 182,
260
+ type: 'Ad'
261
+ },
262
+ {
263
+ label: 'Wed',
264
+ value: 191,
265
+ type: 'Ad'
266
+ }
267
+ ],
268
+ extraOption: {
269
+ title: {
270
+ text: 'Traffic Sources',
271
+ left: 'center'
272
+ }
273
+ }
274
+ }
275
+ };
276
+ const PieChart = {
277
+ args: {
278
+ chartType: index_cjs_namespaceObject.WinChartType.PIE,
279
+ data: [
280
+ {
281
+ label: 'Search Engine',
282
+ value: 1048,
283
+ type: 'Search Engine'
284
+ },
285
+ {
286
+ label: 'Direct',
287
+ value: 735,
288
+ type: 'Direct'
289
+ },
290
+ {
291
+ label: 'Email',
292
+ value: 580,
293
+ type: 'Email'
294
+ },
295
+ {
296
+ label: 'Union Ads',
297
+ value: 484,
298
+ type: 'Union Ads'
299
+ },
300
+ {
301
+ label: 'Video Ads',
302
+ value: 300,
303
+ type: 'Video Ads'
304
+ }
305
+ ],
306
+ extraOption: {
307
+ title: {
308
+ text: 'Referer of a Website',
309
+ left: 'center'
310
+ }
311
+ }
312
+ }
313
+ };
314
+ const RadarChart = {
315
+ args: {
316
+ chartType: index_cjs_namespaceObject.WinChartType.RADAR,
317
+ data: [
318
+ {
319
+ label: 'Sales',
320
+ value: 4200,
321
+ type: 'Allocated Budget'
322
+ },
323
+ {
324
+ label: 'Administration',
325
+ value: 3000,
326
+ type: 'Allocated Budget'
327
+ },
328
+ {
329
+ label: 'IT',
330
+ value: 20000,
331
+ type: 'Allocated Budget'
332
+ },
333
+ {
334
+ label: 'Customer Support',
335
+ value: 35000,
336
+ type: 'Allocated Budget'
337
+ },
338
+ {
339
+ label: 'Development',
340
+ value: 50000,
341
+ type: 'Allocated Budget'
342
+ },
343
+ {
344
+ label: 'Marketing',
345
+ value: 18000,
346
+ type: 'Allocated Budget'
347
+ },
348
+ {
349
+ label: 'Sales',
350
+ value: 5000,
351
+ type: 'Actual Spending'
352
+ },
353
+ {
354
+ label: 'Administration',
355
+ value: 14000,
356
+ type: 'Actual Spending'
357
+ },
358
+ {
359
+ label: 'IT',
360
+ value: 28000,
361
+ type: 'Actual Spending'
362
+ },
363
+ {
364
+ label: 'Customer Support',
365
+ value: 26000,
366
+ type: 'Actual Spending'
367
+ },
368
+ {
369
+ label: 'Development',
370
+ value: 42000,
371
+ type: 'Actual Spending'
372
+ },
373
+ {
374
+ label: 'Marketing',
375
+ value: 21000,
376
+ type: 'Actual Spending'
377
+ }
378
+ ],
379
+ extraOption: {
380
+ title: {
381
+ text: 'Budget vs Spending',
382
+ left: 'center'
383
+ }
384
+ }
385
+ }
386
+ };
387
+ const FunnelChart = {
388
+ args: {
389
+ chartType: index_cjs_namespaceObject.WinChartType.FUNNEL,
390
+ data: [
391
+ {
392
+ label: 'Visit',
393
+ value: 60,
394
+ type: 'Visit'
395
+ },
396
+ {
397
+ label: 'Inquiry',
398
+ value: 40,
399
+ type: 'Inquiry'
400
+ },
401
+ {
402
+ label: 'Order',
403
+ value: 20,
404
+ type: 'Order'
405
+ },
406
+ {
407
+ label: 'Click',
408
+ value: 80,
409
+ type: 'Click'
410
+ },
411
+ {
412
+ label: 'Show',
413
+ value: 100,
414
+ type: 'Show'
415
+ }
416
+ ],
417
+ extraOption: {
418
+ title: {
419
+ text: 'Funnel',
420
+ left: 'center'
421
+ }
422
+ }
423
+ }
424
+ };
425
+ const DualAxisChart = {
426
+ args: {
427
+ chartType: index_cjs_namespaceObject.WinChartType.DUAL_LINE_BAR,
428
+ data: [
429
+ {
430
+ label: '2015',
431
+ value: 2.0,
432
+ type: 'Evaporation'
433
+ },
434
+ {
435
+ label: '2016',
436
+ value: 4.9,
437
+ type: 'Evaporation'
438
+ },
439
+ {
440
+ label: '2017',
441
+ value: 7.0,
442
+ type: 'Evaporation'
443
+ },
444
+ {
445
+ label: '2018',
446
+ value: 23.2,
447
+ type: 'Evaporation'
448
+ }
449
+ ],
450
+ extraData: [
451
+ {
452
+ label: '2015',
453
+ value: 2.6,
454
+ type: 'Temperature'
455
+ },
456
+ {
457
+ label: '2016',
458
+ value: 5.9,
459
+ type: 'Temperature'
460
+ },
461
+ {
462
+ label: '2017',
463
+ value: 9.0,
464
+ type: 'Temperature'
465
+ },
466
+ {
467
+ label: '2018',
468
+ value: 26.4,
469
+ type: 'Temperature'
470
+ }
471
+ ],
472
+ extraOption: {
473
+ title: {
474
+ text: 'Rainfall vs Evaporation',
475
+ left: 'center'
476
+ },
477
+ yAxis: [
478
+ {
479
+ type: 'value',
480
+ name: 'Evaporation',
481
+ min: 0,
482
+ max: 250,
483
+ interval: 50,
484
+ axisLabel: {
485
+ formatter: '{value} ml'
486
+ }
487
+ },
488
+ {
489
+ type: 'value',
490
+ name: 'Temperature',
491
+ min: 0,
492
+ max: 25,
493
+ interval: 5,
494
+ axisLabel: {
495
+ formatter: '{value} °C'
496
+ }
497
+ }
498
+ ]
499
+ }
500
+ }
501
+ };
502
+ exports.BarChart = __webpack_exports__.BarChart;
503
+ exports.ColumnChart = __webpack_exports__.ColumnChart;
504
+ exports.DualAxisChart = __webpack_exports__.DualAxisChart;
505
+ exports.FunnelChart = __webpack_exports__.FunnelChart;
506
+ exports.LineChart = __webpack_exports__.LineChart;
507
+ exports.PieChart = __webpack_exports__.PieChart;
508
+ exports.RadarChart = __webpack_exports__.RadarChart;
509
+ exports.StackColumnChart = __webpack_exports__.StackColumnChart;
510
+ exports["default"] = __webpack_exports__["default"];
511
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
512
+ "BarChart",
513
+ "ColumnChart",
514
+ "DualAxisChart",
515
+ "FunnelChart",
516
+ "LineChart",
517
+ "PieChart",
518
+ "RadarChart",
519
+ "StackColumnChart",
520
+ "default"
521
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
522
+ Object.defineProperty(exports, '__esModule', {
523
+ value: true
524
+ });
@@ -25,6 +25,8 @@ var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
27
  COLOR_LIST: ()=>COLOR_LIST,
28
+ COMMON_TOOLTIP_OPT: ()=>COMMON_TOOLTIP_OPT,
29
+ ITEM_TOOLTIP_OPT: ()=>ITEM_TOOLTIP_OPT,
28
30
  commonOpt: ()=>commonOpt
29
31
  });
30
32
  const COLOR_LIST = [
@@ -57,10 +59,29 @@ const commonOpt = {
57
59
  icon: 'circle'
58
60
  }
59
61
  };
62
+ const COMMON_TOOLTIP_OPT = {
63
+ trigger: 'axis',
64
+ axisPointer: {
65
+ type: 'cross',
66
+ crossStyle: {
67
+ color: '#999'
68
+ },
69
+ label: {
70
+ backgroundColor: '#999'
71
+ }
72
+ }
73
+ };
74
+ const ITEM_TOOLTIP_OPT = {
75
+ trigger: 'item'
76
+ };
60
77
  exports.COLOR_LIST = __webpack_exports__.COLOR_LIST;
78
+ exports.COMMON_TOOLTIP_OPT = __webpack_exports__.COMMON_TOOLTIP_OPT;
79
+ exports.ITEM_TOOLTIP_OPT = __webpack_exports__.ITEM_TOOLTIP_OPT;
61
80
  exports.commonOpt = __webpack_exports__.commonOpt;
62
81
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
63
82
  "COLOR_LIST",
83
+ "COMMON_TOOLTIP_OPT",
84
+ "ITEM_TOOLTIP_OPT",
64
85
  "commonOpt"
65
86
  ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
66
87
  Object.defineProperty(exports, '__esModule', {
@@ -41,15 +41,7 @@ const getMiniAreaOpt = (winChartProps)=>{
41
41
  bottom: 0,
42
42
  containLabel: true
43
43
  },
44
- tooltip: {
45
- trigger: 'axis',
46
- axisPointer: {
47
- type: 'cross',
48
- label: {
49
- backgroundColor: '#999'
50
- }
51
- }
52
- },
44
+ tooltip: external_const_cjs_namespaceObject.COMMON_TOOLTIP_OPT,
53
45
  legend: {
54
46
  show: false
55
47
  },
@@ -90,15 +82,7 @@ const getMiniAreaOpt = (winChartProps)=>{
90
82
  const getAreaOpt = (winChartProps)=>{
91
83
  const areaTypeList = (0, external_tool_cjs_namespaceObject.getDataTypes)(winChartProps);
92
84
  return {
93
- tooltip: {
94
- trigger: 'axis',
95
- axisPointer: {
96
- type: 'cross',
97
- label: {
98
- backgroundColor: '#999'
99
- }
100
- }
101
- },
85
+ tooltip: external_const_cjs_namespaceObject.COMMON_TOOLTIP_OPT,
102
86
  legend: {
103
87
  bottom: 0,
104
88
  type: 'scroll'
@@ -28,16 +28,9 @@ __webpack_require__.d(__webpack_exports__, {
28
28
  getStackBarOpt: ()=>getStackBarOpt
29
29
  });
30
30
  const external_tool_cjs_namespaceObject = require("./tool.cjs");
31
+ const external_const_cjs_namespaceObject = require("./const.cjs");
31
32
  const getBarOpt = (winChartProps)=>({
32
- tooltip: {
33
- trigger: 'axis',
34
- axisPointer: {
35
- type: 'cross',
36
- label: {
37
- backgroundColor: '#999'
38
- }
39
- }
40
- },
33
+ tooltip: external_const_cjs_namespaceObject.COMMON_TOOLTIP_OPT,
41
34
  legend: {
42
35
  bottom: 0,
43
36
  type: 'scroll'
@@ -82,21 +75,14 @@ const getBarOpt = (winChartProps)=>({
82
75
  });
83
76
  const getStackBarOpt = (winChartProps)=>{
84
77
  const barTypeList = (0, external_tool_cjs_namespaceObject.getDataTypes)(winChartProps);
78
+ const axisLabels = (0, external_tool_cjs_namespaceObject.getMainAxisLabels)(winChartProps);
85
79
  return {
86
80
  grid: {
87
81
  ...winChartProps.showStackTotal && {
88
82
  right: 32
89
83
  }
90
84
  },
91
- tooltip: {
92
- trigger: 'axis',
93
- axisPointer: {
94
- type: 'cross',
95
- label: {
96
- backgroundColor: '#999'
97
- }
98
- }
99
- },
85
+ tooltip: external_const_cjs_namespaceObject.COMMON_TOOLTIP_OPT,
100
86
  legend: {
101
87
  bottom: 0,
102
88
  type: 'scroll',
@@ -104,7 +90,7 @@ const getStackBarOpt = (winChartProps)=>{
104
90
  },
105
91
  xAxis: {},
106
92
  yAxis: {
107
- data: (0, external_tool_cjs_namespaceObject.getMainAxisLabels)(winChartProps),
93
+ data: axisLabels,
108
94
  axisTick: {
109
95
  alignWithLabel: true
110
96
  },
@@ -153,9 +139,9 @@ const getStackBarOpt = (winChartProps)=>{
153
139
  position: 'right',
154
140
  color: '#000'
155
141
  },
156
- formatter: (params)=>String(Number((0, external_tool_cjs_namespaceObject.arraySum)(winChartProps.data?.filter((item)=>item.label === params.name).map((item)=>item.value)).toFixed(2)))
142
+ formatter: '{c}'
157
143
  },
158
- data: (0, external_tool_cjs_namespaceObject.aggregateStackData)(winChartProps.data ?? [])
144
+ data: (0, external_tool_cjs_namespaceObject.aggregateStackData)(winChartProps.data ?? [], axisLabels)
159
145
  }
160
146
  ]
161
147
  };
@@ -28,18 +28,11 @@ __webpack_require__.d(__webpack_exports__, {
28
28
  getColumnStackOpt: ()=>getColumnStackOpt
29
29
  });
30
30
  const external_tool_cjs_namespaceObject = require("./tool.cjs");
31
+ const external_const_cjs_namespaceObject = require("./const.cjs");
31
32
  const getColumnOpt = (winChartProps)=>{
32
33
  const barTypeList = (0, external_tool_cjs_namespaceObject.getDataTypes)(winChartProps);
33
34
  return {
34
- tooltip: {
35
- trigger: 'axis',
36
- axisPointer: {
37
- type: 'cross',
38
- label: {
39
- backgroundColor: '#999'
40
- }
41
- }
42
- },
35
+ tooltip: external_const_cjs_namespaceObject.COMMON_TOOLTIP_OPT,
43
36
  legend: {
44
37
  bottom: 0,
45
38
  type: 'scroll'
@@ -82,15 +75,7 @@ const getColumnOpt = (winChartProps)=>{
82
75
  const getColumnStackOpt = (winChartProps)=>{
83
76
  const barTypeList = (0, external_tool_cjs_namespaceObject.getDataTypes)(winChartProps);
84
77
  return {
85
- tooltip: {
86
- trigger: 'axis',
87
- axisPointer: {
88
- type: 'cross',
89
- label: {
90
- backgroundColor: '#999'
91
- }
92
- }
93
- },
78
+ tooltip: external_const_cjs_namespaceObject.COMMON_TOOLTIP_OPT,
94
79
  legend: {
95
80
  bottom: 0,
96
81
  type: 'scroll'