@ck-ui/component-library 1.0.1 → 1.0.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.
Files changed (97) hide show
  1. package/dist/DropdownFooter-CsDll1Tj.js +96 -0
  2. package/dist/{Grow-D08Iq1uH.js → Grow-wzNsNKt2.js} +41 -41
  3. package/dist/IconSlot-DvUwY6Do.js +33 -0
  4. package/dist/{OptionList-DN1xZbnV.js → OptionList-BM4AleXV.js} +361 -290
  5. package/dist/{Select-Cw96VEHD.js → Select-CiuwMSD7.js} +2366 -2427
  6. package/dist/assets/DropdownFooter-JrU15UnN.css +1 -0
  7. package/dist/assets/IconSlot-BWv5PQN_.css +1 -0
  8. package/dist/assets/ReactToastify-GNLSjkBZ.css +1 -0
  9. package/dist/assets/{ToastContent-PGkBxPUW.css → ToastContent-DpF5zCks.css} +1 -1
  10. package/dist/assets/index-0R9p-l95.css +1 -0
  11. package/dist/assets/index-B3yBTtVQ.css +1 -0
  12. package/dist/assets/index-BbJZjGLb.css +1 -0
  13. package/dist/assets/{main-Dv8QUU_o.css → main-3OqLSdPm.css} +1 -1
  14. package/dist/assets/{styles-Chhklrps.css → styles-C5uYY4fL.css} +1 -1
  15. package/dist/assets/styles-CEyiQgVQ.css +1 -0
  16. package/dist/components/CKButton/_helper/ComboLayout.js +1 -1
  17. package/dist/components/CKButton/_helper/IconSlot.js +1 -1
  18. package/dist/components/CKButton/_helper/StandardLayout.js +1 -1
  19. package/dist/components/CKButton/index.js +1 -1
  20. package/dist/components/DateRangePicker/DateRangePicker.js +703 -680
  21. package/dist/components/EmptyState/index.js +7 -7
  22. package/dist/components/FusionChart/_config/builders.d.ts.map +1 -1
  23. package/dist/components/FusionChart/_config/builders.js +207 -192
  24. package/dist/components/FusionChart/_config/helpers.d.ts +3 -0
  25. package/dist/components/FusionChart/_config/helpers.d.ts.map +1 -1
  26. package/dist/components/FusionChart/_config/helpers.js +61 -45
  27. package/dist/components/FusionChart/_types/fusionChart.types.d.ts +2 -0
  28. package/dist/components/FusionChart/_types/fusionChart.types.d.ts.map +1 -1
  29. package/dist/components/FusionChart/_utils/chartHelpers.js +1 -1
  30. package/dist/components/FusionChart/index.d.ts.map +1 -1
  31. package/dist/components/FusionChart/index.js +163 -130
  32. package/dist/components/MenuOptions/_utils/computeMenuPosition.js +1 -1
  33. package/dist/components/MenuOptions/_utils/computeSubmenuPosition.js +1 -1
  34. package/dist/components/MetricCards/Component/CardWithIconAndForecast/index.js +30 -30
  35. package/dist/components/MultiSelect/SimpleMultiSelect.d.ts +3 -1
  36. package/dist/components/MultiSelect/SimpleMultiSelect.d.ts.map +1 -1
  37. package/dist/components/MultiSelect/SimpleMultiSelect.js +150 -136
  38. package/dist/components/MultiSelect/_helpers/DropdownFooter.js +1 -1
  39. package/dist/components/MultiSelect/_helpers/OptionRow.js +1 -1
  40. package/dist/components/MultiSelect/_helpers/OverflowMenu.js +1 -1
  41. package/dist/components/MultiSelect/_helpers/OverflowMenuItem.js +1 -1
  42. package/dist/components/MultiSelect/_helpers/SearchResult.d.ts +1 -1
  43. package/dist/components/MultiSelect/_helpers/SearchResult.d.ts.map +1 -1
  44. package/dist/components/MultiSelect/_helpers/SearchResult.js +31 -21
  45. package/dist/components/MultiSelect/_helpers/TagContent.js +1 -1
  46. package/dist/components/MultiSelect/_helpers/TriggerButton.d.ts.map +1 -1
  47. package/dist/components/MultiSelect/_helpers/TriggerButton.js +95 -74
  48. package/dist/components/MultiSelect/_types/type.d.ts +6 -2
  49. package/dist/components/MultiSelect/_types/type.d.ts.map +1 -1
  50. package/dist/components/MultiSelect/_utils/useDropdownDirection.d.ts +18 -0
  51. package/dist/components/MultiSelect/_utils/useDropdownDirection.d.ts.map +1 -0
  52. package/dist/components/MultiSelect/_utils/useDropdownDirection.js +23 -0
  53. package/dist/components/MultiSelect/index.d.ts +1 -1
  54. package/dist/components/MultiSelect/index.d.ts.map +1 -1
  55. package/dist/components/MultiSelect/index.js +162 -151
  56. package/dist/components/PopupAndDialogBox/components/DialogContent.js +1 -1
  57. package/dist/components/PopupAndDialogBox/components/DialogFooter.js +1 -1
  58. package/dist/components/PopupAndDialogBox/components/DialogHeader.js +1 -1
  59. package/dist/components/PopupAndDialogBox/index.js +1 -1
  60. package/dist/components/Search/index.d.ts.map +1 -1
  61. package/dist/components/Search/index.js +63 -61
  62. package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +3 -3
  63. package/dist/components/SingleSelectDropdown/index.d.ts.map +1 -1
  64. package/dist/components/SingleSelectDropdown/index.js +83 -78
  65. package/dist/components/Table/_helpers/ColumnManager/index.js +3 -3
  66. package/dist/components/Table/_helpers/GroupedHeader/index.js +1 -1
  67. package/dist/components/Table/_helpers/TableFilterModal/OptionList.js +1 -1
  68. package/dist/components/Table/_helpers/TableFilterModal/RangeSelector.js +133 -142
  69. package/dist/components/Table/_helpers/TableFilterModal/index.js +1 -1
  70. package/dist/components/Table/_helpers/TableRows.js +1 -1
  71. package/dist/components/Table/index.js +2 -2
  72. package/dist/components/TextField/index.js +331 -328
  73. package/dist/components/Toast/_helper/ToastContent.js +25 -25
  74. package/dist/components/Toast/_helper/ToastProvider.js +9 -9
  75. package/dist/components/Toast/_hooks/useToast.js +1 -1
  76. package/dist/components/Tooltip/index.js +772 -697
  77. package/dist/createSimplePaletteValueFilter-BqxST_wX.js +24 -0
  78. package/dist/index-BR6M9zUI.js +382 -0
  79. package/dist/{index-f7TB87Mf.js → index-Bcvmezbu.js} +23 -3
  80. package/dist/main.js +1 -1
  81. package/dist/styles.module-yIHBMSTk.js +53 -0
  82. package/dist/styles.module-yNDMDNO-.js +14 -0
  83. package/dist/{useSlot-ylt7_lTY.js → useSlot-BiMlGawc.js} +656 -623
  84. package/package.json +3 -3
  85. package/dist/DropdownFooter-Dm6aLDx8.js +0 -89
  86. package/dist/IconSlot-CPQsGPB-.js +0 -33
  87. package/dist/assets/DropdownFooter-DjdPf69A.css +0 -1
  88. package/dist/assets/IconSlot-D8WWEHKb.css +0 -1
  89. package/dist/assets/ReactToastify-tlSLHgLC.css +0 -1
  90. package/dist/assets/index-B81zpOpq.css +0 -1
  91. package/dist/assets/index-DNhNBxL9.css +0 -1
  92. package/dist/assets/index-YHUWVH17.css +0 -1
  93. package/dist/assets/styles-Bj-7zn37.css +0 -1
  94. package/dist/contains-kLLEGdNH.js +0 -41
  95. package/dist/index-C8cPPHJD.js +0 -1196
  96. package/dist/styles.module-BZaUJMlf.js +0 -14
  97. package/dist/styles.module-DakCndIP.js +0 -42
@@ -1,18 +1,18 @@
1
- import { EXTENDED_PALETTE as $, DEFAULT_WIDTH as h, STACKED_AREA_PALETTE as z } from "../_constant/constants.js";
2
- import { getBaseConfig as g, getStackedColumnChartShell as T, getStackedAreaChartShell as H, getStackedBarChartShell as R, getLineChartShell as V, getCommonChartShell as L, getScrollAreaChartShell as N, getMultipleLineChartShell as O, getMsCombiDy2dChartShell as W, getGroupChartShell as _, getDoughnutChartShell as G } from "./helpers.js";
3
- import { getCurrencyPrefix as m, getLabelStep as b, getCartesianPalette as k, getGraphDataLength as U, getBarType as q, getCurrencySymbol as F } from "../_utils/chartHelpers.js";
4
- const P = (e = {}) => {
5
- const t = e.plotSpacePercent ?? (e.plotSpacePercent === 0 ? e.plotSpacePercent : 60), a = Array.isArray(e.graphData) ? e.graphData : [], s = a.some((c) => !!c.color), l = k(e?.palettecolors)?.split(",")?.map((c) => c?.trim()), i = a?.map((c, d) => {
6
- const x = c?.color || l[d % l.length];
1
+ import { EXTENDED_PALETTE as $, DEFAULT_WIDTH as g, STACKED_AREA_PALETTE as H } from "../_constant/constants.js";
2
+ import { getBaseConfig as h, getStackedColumnChartShell as F, getStackedAreaChartShell as R, getStackedBarChartShell as O, getLineChartShell as j, getCommonChartShell as P, getScrollAreaChartShell as V, getMultipleLineChartShell as W, getMsCombiDy2dChartShell as Y, getGroupChartShell as _, getDoughnutChartShell as G } from "./helpers.js";
3
+ import { getCurrencyPrefix as u, getLabelStep as f, getCartesianPalette as L, getCurrencySymbol as E, getGraphDataLength as U, getBarType as K } from "../_utils/chartHelpers.js";
4
+ const M = (e = {}) => {
5
+ const t = e.plotSpacePercent ?? (e.plotSpacePercent === 0 ? e.plotSpacePercent : 60), a = Array.isArray(e.graphData) ? e.graphData : [], s = a.some((o) => !!o.color), l = L(e?.palettecolors)?.split(",")?.map((o) => o?.trim()), n = a?.map((o, c) => {
6
+ const x = o?.color || l[c % l.length];
7
7
  return {
8
- ...c,
8
+ ...o,
9
9
  color: x,
10
- toolText: e.plotToolText || `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>${c.label || ""}</div><div style='display:flex;justify-content:space-between;align-items:center;padding:4px 0;min-width:180px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:${x};display:inline-block'></span>${c.label || ""}</span><b style='color:#2B2B2B'>${m(e.numberPrefix)}${c.value || ""}</b></div>`
10
+ toolText: e.plotToolText || `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>${o.label || ""}</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:4px 0;min-width:180px'><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>${o.label || ""}</label><b style='text-align:right;'>${u(e.numberPrefix)}${o.value || ""}</b></div>`
11
11
  };
12
- }), o = {
13
- ...L(e),
12
+ }), i = {
13
+ ...P(e),
14
14
  bgColor: e.bgColor || "#ffffff",
15
- labelStep: b(U(e), e.labelStep),
15
+ labelStep: f(U(e), e.labelStep),
16
16
  xAxisName: e.xAxisName,
17
17
  yAxisName: e.yAxisName,
18
18
  chartBottomMargin: e.chartBottomMargin,
@@ -23,67 +23,67 @@ const P = (e = {}) => {
23
23
  showValues: e.showValues || "0",
24
24
  showLabels: e.showLabels || "1",
25
25
  skipOverlapLabels: "0",
26
- numberPrefix: m(e.numberPrefix),
26
+ numberPrefix: u(e.numberPrefix),
27
27
  // When per-item colors are set, don't use palettecolors (it overrides item colors)
28
- palettecolors: s ? void 0 : k(e.palettecolors),
28
+ palettecolors: s ? void 0 : L(e.palettecolors),
29
29
  maxLabelHeight: e.maxLabelHeight,
30
30
  numbersuffix: e.numbersuffix || ""
31
- }, r = e.graphData, n = e?.hideScroll ? { chart: o, data: i?.length > 0 ? i : e?.graphData || [] } : {
32
- chart: o,
31
+ }, r = e.graphData, d = e?.hideScroll ? { chart: i, data: n?.length > 0 ? n : e?.graphData || [] } : {
32
+ chart: i,
33
33
  categories: r?.categories,
34
34
  dataset: r?.dataset
35
35
  };
36
- return g({
37
- type: q(e),
38
- width: h,
36
+ return h({
37
+ type: K(e),
38
+ width: g,
39
39
  height: e.height || "300",
40
- dataSource: n
40
+ dataSource: d
41
41
  });
42
- }, K = (e = {}) => g({
42
+ }, X = (e = {}) => h({
43
43
  type: "area2d",
44
- width: h,
44
+ width: g,
45
45
  height: "550",
46
46
  dataSource: {
47
47
  chart: {
48
- ...L({ ...e, decimals: "2" }),
48
+ ...P({ ...e, decimals: "2" }),
49
49
  xAxisName: e.xAxisName,
50
50
  yAxisName: e.yAxisName,
51
51
  labelFontSize: 12,
52
- plotToolText: `<div class='headingCont'>$label</div><div class='tooltipListCont'><div class='tooltipItem'><span class='colorSquare'></span><span>$label</span><b>${F()}$value</b></div></div>`
52
+ plotToolText: e.plotToolText || `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>$label</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:2px 0;min-width:200px'><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>$label</label><b style='text-align:right;'>${E()}$value</b></div>`
53
53
  },
54
54
  data: e.graphData || []
55
55
  }
56
- }), X = (e = {}) => {
57
- const t = (e?.palettecolors || "#8ECFFF").split(",")[0].trim(), a = Array.isArray(e?.graphData) ? e.graphData : [], s = m(e?.numberPrefix), l = a?.map((i) => ({
58
- ...i,
59
- toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${i?.label || ""}</div><div style='display:flex;justify-content:space-between;align-items:center;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:${t};display:inline-block'></span>${i?.label || ""}</span><b style='color:#2B2B2B'>${s}${i?.value || ""}</b></div>`
56
+ }), q = (e = {}) => {
57
+ const t = Array.isArray(e?.graphData) ? e.graphData : [], a = u(e?.numberPrefix), s = t?.map((l) => ({
58
+ ...l,
59
+ toolText: e?.plotToolText || `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${l?.label || ""}</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:2px 0;min-width:200px'><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>${l?.label || ""}</label><b style='text-align:right;'>${a}${l?.value || ""}</b></div>`
60
60
  }));
61
- return g({
61
+ return h({
62
62
  type: "line",
63
- width: e?.width || h,
63
+ width: e?.width || g,
64
64
  height: e?.height || "300",
65
65
  dataSource: {
66
66
  chart: {
67
- ...V(e),
67
+ ...j(e),
68
68
  xAxisName: e?.xAxisName,
69
69
  yAxisName: e?.yAxisName,
70
- labelStep: b(a.length, void 0),
70
+ labelStep: f(t.length, void 0),
71
71
  ...e?.chartConfig || {}
72
72
  },
73
- data: l.length > 0 ? l : e?.graphData || []
73
+ data: s.length > 0 ? s : e?.graphData || []
74
74
  }
75
75
  });
76
76
  }, J = (e = {}) => {
77
- let t = F();
77
+ let t = E();
78
78
  e.numberPrefix === "" ? t = "" : e.numberPrefix !== null && e.numberPrefix !== void 0 && (t = e.numberPrefix);
79
- const a = e.graphData, s = (a?.dataset || []).some((i) => !!i.color), l = (a?.dataset || []).map((i, o) => ({
80
- ...i,
81
- plotToolText: o === 0 ? "<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>$label</div><div style='display:flex;justify-content:space-between;align-items:center;padding:4px 0;min-width:180px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:$color;display:inline-block'></span>$seriesName</span><b style='color:#2B2B2B'>$dataValue</b></div>" : "<div style='display:flex;justify-content:space-between;align-items:center;padding:4px 0;min-width:180px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:$color;display:inline-block'></span>$seriesName</span><b style='color:#2B2B2B'>$dataValue</b></div>"
79
+ const a = e.graphData, s = (a?.dataset || []).some((n) => !!n.color), l = (a?.dataset || []).map((n, i) => ({
80
+ ...n,
81
+ plotToolText: e.plotToolText || (i === 0 ? "<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>$label</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:4px 0;min-width:180px'><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>$seriesName</label><b style='text-align:right;'>$dataValue</b></div>" : "<div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:4px 0;min-width:180px'><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>$seriesName</label><b style='text-align:right;'>$dataValue</b></div>")
82
82
  }));
83
- return g({
83
+ return h({
84
84
  type: "mscolumn2d",
85
85
  key: e.key,
86
- width: e.width || h,
86
+ width: e.width || g,
87
87
  height: e.height || "400",
88
88
  dataSource: {
89
89
  chart: {
@@ -95,7 +95,7 @@ const P = (e = {}) => {
95
95
  showLegend: "0",
96
96
  legendIconSides: e.legendIconSides,
97
97
  numberPrefix: t,
98
- labelStep: b(a?.category?.length, e.labelStep),
98
+ labelStep: f(a?.category?.length, e.labelStep),
99
99
  ...s ? { palettecolors: void 0 } : {}
100
100
  },
101
101
  categories: [{ category: a?.category || [] }],
@@ -103,18 +103,18 @@ const P = (e = {}) => {
103
103
  }
104
104
  });
105
105
  }, Q = (e = {}) => {
106
- const t = e.graphLabel ? "" : m(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).some((o) => !!o.color), l = "<div class='stacked-tooltip-total' style='display:flex;justify-content:space-between;align-items:center;padding:8px 0 0;margin-top:4px;border-top:1px solid #eee;min-width:180px'><span style='color:#2B2B2B;font-weight:600'>Total</span><b style='color:#2B2B2B'>$sum</b></div>", i = (a?.dataset || []).map((o, r) => ({
107
- ...o,
108
- plotToolText: r === 0 ? "<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>$label</div><div style='display:flex;justify-content:space-between;align-items:center;padding:4px 0;min-width:180px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:$color;display:inline-block'></span>$seriesName</span><b style='color:#2B2B2B'>$dataValue</b></div>" + l : "<div style='display:flex;justify-content:space-between;align-items:center;padding:4px 0;min-width:180px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:$color;display:inline-block'></span>$seriesName</span><b style='color:#2B2B2B'>$dataValue</b></div>" + l
106
+ const t = e.graphLabel ? "" : u(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).some((i) => !!i.color), l = "<div class='stacked-tooltip-total' style='display:flex;justify-content:space-between;align-items:center;padding:8px 0 0;margin-top:4px;border-top:1px solid #eee;min-width:180px'><span style='color:#2B2B2B;font-weight:600'>Total</span><b style='color:#2B2B2B'>$sum</b></div>", n = (a?.dataset || []).map((i, r) => ({
107
+ ...i,
108
+ plotToolText: e.plotToolText || (r === 0 ? "<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>$label</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:4px 0;min-width:180px'><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>$seriesName</label><b style='text-align:right;'>$dataValue</b></div>" + l : "<div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:4px 0;min-width:180px'><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>$seriesName</label><b style='text-align:right;'>$dataValue</b></div>" + l)
109
109
  }));
110
- return g({
110
+ return h({
111
111
  type: e.hideScroll ? "stackedcolumn2d" : "scrollstackedcolumn2d",
112
112
  key: e.key,
113
- width: e.width || h,
113
+ width: e.width || g,
114
114
  height: e.height || "400",
115
115
  dataSource: {
116
116
  chart: {
117
- ...T(e),
117
+ ...F(e),
118
118
  yAxisMaxValue: e.yAxisMaxValue,
119
119
  xAxisName: e.xAxisName,
120
120
  yAxisName: e.yAxisName,
@@ -125,32 +125,32 @@ const P = (e = {}) => {
125
125
  bgColor: e.bgColor || "#ffffff",
126
126
  palettecolors: s ? void 0 : e.palettecolors || $,
127
127
  numberPrefix: t,
128
- labelStep: b(a?.category?.length, e.labelStep),
128
+ labelStep: f(a?.category?.length, e.labelStep),
129
129
  showSum: e.showSum ? "1" : void 0
130
130
  },
131
131
  categories: [
132
132
  { category: a?.category || [] }
133
133
  ],
134
- dataset: i
134
+ dataset: n
135
135
  }
136
136
  });
137
- }, Y = (e = {}) => {
138
- const t = e.graphLabel ? "" : m(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).map((l, i) => ({
137
+ }, Z = (e = {}) => {
138
+ const t = e.graphLabel ? "" : u(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).map((l, n) => ({
139
139
  ...l,
140
140
  drawCustomLegendIcon: "1",
141
141
  legendIconSides: "4",
142
142
  legendIconBorderThickness: "0",
143
143
  legendIconBgAlpha: "100",
144
- plotToolText: i === 0 ? "<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>$label</div><div style='display:flex;justify-content:space-between;align-items:center;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:$color;display:inline-block'></span>$seriesName</span><b style='color:#2B2B2B'>$dataValue</b></div>" : "<div style='display:flex;justify-content:space-between;align-items:center;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:$color;display:inline-block'></span>$seriesName</span><b style='color:#2B2B2B'>$dataValue</b></div>"
144
+ plotToolText: e.plotToolText || (n === 0 ? "<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>$label</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:2px 0;min-width:200px'><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>$seriesName</label><b style='text-align:right;'>$dataValue</b></div>" : "<div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:2px 0;min-width:200px'><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>$seriesName</label><b style='text-align:right;'>$dataValue</b></div>")
145
145
  }));
146
- return g({
146
+ return h({
147
147
  type: "msline",
148
148
  key: e.key,
149
- width: e.width || h,
149
+ width: e.width || g,
150
150
  height: e.height || "400",
151
151
  dataSource: {
152
152
  chart: {
153
- ...O(e),
153
+ ...W(e),
154
154
  yAxisMaxValue: e.yAxisMaxValue,
155
155
  xAxisName: e.xAxisName,
156
156
  yAxisName: e.yAxisName,
@@ -158,18 +158,18 @@ const P = (e = {}) => {
158
158
  legendPosition: e.legendRight ? void 0 : e.legendPosition,
159
159
  numberPrefix: t,
160
160
  chartLeftMargin: e.chartLeftMargin || "20",
161
- labelStep: b(a?.category?.length, e.labelStep),
161
+ labelStep: f(a?.category?.length, e.labelStep),
162
162
  showValues: e.showValues === "1" ? "1" : "0"
163
163
  },
164
164
  categories: [{ category: a?.category || [] }],
165
165
  dataset: s
166
166
  }
167
167
  });
168
- }, Z = (e = {}) => {
169
- const t = e.graphLabel ? "" : m(e.numberPrefix), a = e.graphData, l = (e.palettecolors || z).split(",").map((n) => n.trim()), i = a?.category || [], o = a?.dataset || [], r = o.map((n, c) => {
170
- const x = n.color || l[c % l.length], y = n.data || [];
168
+ }, ee = (e = {}) => {
169
+ const t = e.graphLabel ? "" : u(e.numberPrefix), a = e.graphData, l = (e.palettecolors || H).split(",").map((d) => d.trim()), n = a?.category || [], i = a?.dataset || [], r = i.map((d, o) => {
170
+ const x = d.color || l[o % l.length], y = d.data || [];
171
171
  return {
172
- ...n,
172
+ ...d,
173
173
  color: x,
174
174
  plotBorderColor: x,
175
175
  plotBorderThickness: "2",
@@ -177,34 +177,37 @@ const P = (e = {}) => {
177
177
  anchorBgColor: x,
178
178
  anchorBorderColor: x,
179
179
  showPlotBorder: "1",
180
- data: y.map((C, u) => {
181
- const w = i[u]?.label || "";
182
- if (c > 0)
180
+ ...e.plotToolText ? { plotToolText: e.plotToolText } : {},
181
+ data: y.map((b, m) => {
182
+ const T = n[m]?.label || "";
183
+ if (e.plotToolText)
184
+ return { ...b, alpha: "60" };
185
+ if (o > 0)
183
186
  return {
184
- ...C,
187
+ ...b,
185
188
  alpha: "60",
186
189
  toolText: " "
187
190
  };
188
- const f = o.map((p, B) => {
189
- const v = p.color || l[B % l.length], S = (p.data || [])[u]?.value ?? "", A = p.seriesname || "";
190
- return `<div style='display:flex;justify-content:space-between;align-items:center;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:${v};display:inline-block'></span>${A}</span><b style='color:#2B2B2B'>${t}${S}</b></div>`;
191
+ const w = i.map((C, v) => {
192
+ const S = C.color || l[v % l.length], A = (C.data || [])[m]?.value ?? "", B = C.seriesname || "", N = v === o ? "#2B2B2B" : "#666";
193
+ return `<div style='display:flex;justify-content:space-between;align-items:center;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px;color:${N}'><span style='width:10px;height:10px;border-radius:2px;background-color:${S};display:inline-block'></span>${B}</span><b style='color:${N}'>${t}${A}</b></div>`;
191
194
  }).join("");
192
195
  return {
193
- ...C,
196
+ ...b,
194
197
  alpha: "60",
195
- toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${w}</div>${f}`
198
+ toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${T}</div>${w}`
196
199
  };
197
200
  })
198
201
  };
199
202
  });
200
- return g({
203
+ return h({
201
204
  type: "stackedarea2d",
202
205
  key: e.key,
203
- width: e.width || h,
206
+ width: e.width || g,
204
207
  height: e.height || "400",
205
208
  dataSource: {
206
209
  chart: {
207
- ...H(e),
210
+ ...R(e),
208
211
  yAxisMaxValue: e.yAxisMaxValue,
209
212
  xAxisName: e.xAxisName,
210
213
  yAxisName: e.yAxisName,
@@ -214,67 +217,70 @@ const P = (e = {}) => {
214
217
  drawCrossLine: "1",
215
218
  crossLineColor: "#f2f5fa",
216
219
  numberPrefix: t,
217
- labelStep: b(a?.category?.length, e.labelStep)
220
+ labelStep: f(a?.category?.length, e.labelStep)
218
221
  },
219
222
  categories: [{ category: a?.category || [] }],
220
223
  dataset: r
221
224
  }
222
225
  });
223
- }, ee = (e = {}) => {
224
- const t = m(e.numberPrefix), s = (e?.palettecolors || "#8ECFFF").split(",").map((d) => d.trim()), l = s[0];
226
+ }, te = (e = {}) => {
227
+ const t = u(e.numberPrefix), s = (e?.palettecolors || "#8ECFFF").split(",").map((c) => c.trim()), l = s[0];
225
228
  if (!Array.isArray(e?.graphData) && e?.graphData?.dataset) {
226
- const d = e.graphData, x = d?.category || [], y = d?.dataset || [], C = y.map((u, w) => {
227
- const f = u.color || s[w % s.length], p = u.data || [];
229
+ const c = e.graphData, x = c?.category || [], y = c?.dataset || [], b = y.map((m, T) => {
230
+ const w = m.color || s[T % s.length], C = m.data || [];
228
231
  return {
229
- ...u,
230
- color: f,
232
+ ...m,
233
+ color: w,
231
234
  anchorRadius: "3",
232
235
  anchorBgColor: "#FFFFFF",
233
- anchorBorderColor: f,
236
+ anchorBorderColor: w,
234
237
  anchorBorderThickness: "1",
235
- data: p.map((B, v) => {
236
- const D = x[v]?.label || "";
237
- if (w > 0)
238
- return { ...B, toolText: " " };
239
- const S = y.map((A, M) => {
240
- const j = A.color || s[M % s.length], E = (A.data || [])[v]?.value ?? "", I = A.seriesname || "";
241
- return `<div style='display:flex;justify-content:space-between;align-items:center;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:${j};display:inline-block'></span>${I}</span><b style='color:#2B2B2B'>${t}${E}</b></div>`;
238
+ ...e.plotToolText ? { plotToolText: e.plotToolText } : {},
239
+ data: C.map((v, S) => {
240
+ const D = x[S]?.label || "";
241
+ if (e.plotToolText)
242
+ return { ...v };
243
+ if (T > 0)
244
+ return { ...v, toolText: " " };
245
+ const A = y.map((B, p) => {
246
+ const I = (B.data || [])[S]?.value ?? "", z = B.seriesname || "", k = p === T ? "#2B2B2B" : "#666";
247
+ return `<div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:2px 0;min-width:200px'><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:${k}'>${z}</label><b style='text-align:right;color:${k}'>${t}${I}</b></div>`;
242
248
  }).join("");
243
249
  return {
244
- ...B,
245
- toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${D}</div>${S}`
250
+ ...v,
251
+ toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${D}</div>${A}`
246
252
  };
247
253
  })
248
254
  };
249
255
  });
250
- return g({
256
+ return h({
251
257
  type: "scrollarea2d",
252
- width: e?.width || h,
258
+ width: e?.width || g,
253
259
  height: e?.height || "400",
254
260
  dataSource: {
255
261
  chart: {
256
- ...N(e),
262
+ ...V(e),
257
263
  xAxisName: e?.xAxisName,
258
264
  yAxisName: e?.yAxisName,
259
265
  numberPrefix: t,
260
266
  ...e?.chartConfig || {}
261
267
  },
262
268
  categories: [{ category: x }],
263
- dataset: C
269
+ dataset: b
264
270
  }
265
271
  });
266
272
  }
267
- const o = Array.isArray(e?.graphData) ? e.graphData : [], r = o.map((d) => ({ label: d?.label || "" })), n = e.legendLabel || "Spend", c = o.map((d) => ({
268
- value: d?.value,
269
- toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${d?.label || ""}</div><div style='display:flex;justify-content:space-between;align-items:center;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:${l};display:inline-block'></span>${n}</span><b style='color:#2B2B2B'>${t}${d?.value || ""}</b></div>`
273
+ const i = Array.isArray(e?.graphData) ? e.graphData : [], r = i.map((c) => ({ label: c?.label || "" })), d = e.legendLabel || "Spend", o = i.map((c) => ({
274
+ value: c?.value,
275
+ toolText: e?.plotToolText || `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${c?.label || ""}</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:2px 0;min-width:200px'><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>${d}</label><b style='text-align:right;'>${t}${c?.value || ""}</b></div>`
270
276
  }));
271
- return g({
277
+ return h({
272
278
  type: "scrollarea2d",
273
- width: e?.width || h,
279
+ width: e?.width || g,
274
280
  height: e?.height || "400",
275
281
  dataSource: {
276
282
  chart: {
277
- ...N(e),
283
+ ...V(e),
278
284
  xAxisName: e?.xAxisName,
279
285
  yAxisName: e?.yAxisName,
280
286
  numberPrefix: t,
@@ -283,38 +289,39 @@ const P = (e = {}) => {
283
289
  categories: [{ category: r }],
284
290
  dataset: [
285
291
  {
286
- seriesname: n,
292
+ seriesname: d,
287
293
  color: l,
288
294
  anchorRadius: "3",
289
295
  anchorBgColor: "#FFFFFF",
290
296
  anchorBorderColor: l,
291
297
  anchorBorderThickness: "1",
292
- data: c
298
+ data: o
293
299
  }
294
300
  ]
295
301
  }
296
302
  });
297
- }, te = (e = {}) => {
303
+ }, ae = (e = {}) => {
298
304
  const t = e.graphData;
299
- return g({
305
+ return h({
300
306
  type: "stackedbar2d",
301
- width: h,
307
+ width: g,
302
308
  height: e.height || "400",
303
309
  dataSource: {
304
310
  chart: {
305
- ...R(e),
311
+ ...O(e),
306
312
  xAxisName: e.xAxisName,
307
- yAxisName: e.yAxisName
313
+ yAxisName: e.yAxisName,
314
+ ...e.plotToolText ? { plotToolText: e.plotToolText } : {}
308
315
  },
309
316
  categories: [{ category: t?.category || [] }],
310
317
  dataset: t?.dataset || []
311
318
  }
312
319
  });
313
- }, ae = (e = {}) => {
320
+ }, le = (e = {}) => {
314
321
  const t = e.graphData;
315
- return g({
322
+ return h({
316
323
  type: "sankey",
317
- width: h,
324
+ width: g,
318
325
  height: e.height || "600",
319
326
  dataSource: {
320
327
  chart: {
@@ -332,81 +339,84 @@ const P = (e = {}) => {
332
339
  nodeLabelPadding: "20px",
333
340
  legendItemFontSize: 9,
334
341
  nodeLabelFontBold: 0.5,
335
- yAxisName: e.yAxisName
342
+ yAxisName: e.yAxisName,
343
+ ...e.plotToolText ? { plotToolText: e.plotToolText } : {}
336
344
  },
337
345
  nodes: t?.nodes || [],
338
346
  links: t?.links || []
339
347
  }
340
348
  });
341
- }, le = (e = {}) => {
342
- const a = e.graphData?.data || [], s = a.reduce((n, c) => n + (Number(c.value) || 0), 0), l = e.numberPrefix ?? "$", i = { ...e };
349
+ }, ie = (e = {}) => {
350
+ const a = e.graphData?.data || [], s = a.reduce((o, c) => o + (Number(c.value) || 0), 0), l = Math.round(s * 100) / 100, n = e.numberPrefix ?? "$", i = { ...e };
343
351
  if (!i.defaultCenterLabel)
344
- i.defaultCenterLabel = `Total{br}${l}${s}`;
352
+ i.defaultCenterLabel = `Total{br}${n}${l}`;
345
353
  else if (i.defaultCenterLabel.includes("{br}")) {
346
- const [n] = i.defaultCenterLabel.split("{br}");
347
- i.defaultCenterLabel = `${n}{br}${l}${s}`;
354
+ const [o] = i.defaultCenterLabel.split("{br}");
355
+ i.defaultCenterLabel = `${o}{br}${n}${l}`;
348
356
  }
349
- const o = (e.palettecolors || $).split(",").map((n) => n.trim()), r = a.map((n, c) => {
350
- const d = Number(n.value) || 0, x = s > 0 ? (d / s * 100).toFixed(2) : "0", y = n.color || o[c % o.length];
351
- return {
352
- ...n,
353
- displayValue: `${l}${n.value} (${x}%){br}${n.label}`,
354
- toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${n.label}</div><div style='display:flex;justify-content:space-between;align-items:center;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:${y};display:inline-block'></span>${n.label}</span><b style='color:#2B2B2B'>${l}${d}</b></div>`
357
+ const r = (e.palettecolors || $).split(",").map((o) => o.trim()), d = a.map((o, c) => {
358
+ const x = Number(o.value) || 0, y = l > 0 ? (x / l * 100).toFixed(2) : "0", b = o.color || r[c % r.length];
359
+ let m;
360
+ return e.plotToolText ? m = e.plotToolText.replace(/\$plotFillColor/g, b).replace(/\$color/g, b).replace(/\$label/g, o.label || "").replace(/\$value/g, String(o.value ?? "")).replace(/\$dataValue/g, `${n}${x}`).replace(/\$percentValue/g, y).replace(/\$unformattedSum/g, String(l)).replace(/\$sum/g, `${n}${l}`) : m = `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>${o.label}</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:2px 0;min-width:200px'><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'><span style='width:8px;height:8px;border-radius:2px;background-color:${b};display:inline-block;margin-right:5px'></span>${o.label}</label><b style='text-align:right;'>${n}${x}</b></div>`, {
361
+ ...o,
362
+ color: b,
363
+ displayValue: `${n}${o.value} (${y}%){br}${o.label}`,
364
+ toolText: m
355
365
  };
356
366
  });
357
- return g({
367
+ return h({
358
368
  type: "doughnut2d",
359
369
  width: e.width || "136",
360
370
  height: e.height || "136",
361
371
  dataSource: {
362
372
  chart: G(i),
363
- data: r
373
+ data: d
364
374
  }
365
375
  });
366
- }, ie = (e = {}) => {
376
+ }, oe = (e = {}) => {
367
377
  const t = e.graphData;
368
- return g({
378
+ return h({
369
379
  type: "multiaxisline",
370
380
  key: e.key,
371
- width: e.width || h,
381
+ width: e.width || g,
372
382
  height: e.height || "400",
373
383
  dataSource: {
374
- chart: t?.chart || {},
384
+ chart: { ...t?.chart || {}, ...e.plotToolText ? { plotToolText: e.plotToolText } : {} },
375
385
  categories: t?.categories || [],
376
386
  axis: t?.axis || []
377
387
  }
378
388
  });
379
- }, oe = (e = {}) => {
389
+ }, ne = (e = {}) => {
380
390
  const t = e.graphData;
381
- return g({
391
+ return h({
382
392
  type: "multilevelpie",
383
393
  width: e.width || "550",
384
394
  height: e.height || "350",
385
395
  dataSource: {
386
- chart: t?.data?.chart,
396
+ chart: { ...t?.data?.chart || {}, ...e.plotToolText ? { plotToolText: e.plotToolText } : {} },
387
397
  category: t?.data?.category
388
398
  }
389
399
  });
390
- }, ne = (e = {}) => {
400
+ }, se = (e = {}) => {
391
401
  let t = [], a = [];
392
402
  if (Array.isArray(e.graphData)) {
393
- const o = e.graphData;
394
- t = o.map((r) => ({ label: r.label || "" })), a = [
403
+ const i = e.graphData;
404
+ t = i.map((r) => ({ label: r.label || "" })), a = [
395
405
  {
396
406
  seriesname: "Series 1",
397
- data: o.map((r) => ({ value: r.value }))
407
+ data: i.map((r) => ({ value: r.value }))
398
408
  }
399
409
  ];
400
410
  } else {
401
- const o = e.graphData;
402
- t = o?.category || [], a = (o?.dataset || []).map((r) => ({
411
+ const i = e.graphData;
412
+ t = i?.category || [], a = (i?.dataset || []).map((r) => ({
403
413
  ...r,
404
414
  seriesname: r.seriesname || "Series",
405
415
  data: r.data || []
406
416
  }));
407
417
  }
408
- const s = m(e.numberPrefix), l = a.some((o) => !!o.color), i = {
409
- ...L(e),
418
+ const s = u(e.numberPrefix), l = a.some((i) => !!i.color), n = {
419
+ ...P(e),
410
420
  bgColor: e.bgColor || "#ffffff",
411
421
  xAxisName: e.xAxisName,
412
422
  yAxisName: e.yAxisName,
@@ -421,40 +431,41 @@ const P = (e = {}) => {
421
431
  skipOverlapLabels: "0",
422
432
  numberPrefix: s,
423
433
  numVDivLines: e.numVDivLines || "5",
424
- palettecolors: l ? void 0 : k(e.palettecolors),
434
+ palettecolors: l ? void 0 : L(e.palettecolors),
425
435
  maxLabelHeight: e.maxLabelHeight,
426
436
  numbersuffix: e.numbersuffix || "",
427
- labelStep: b(t.length, e.labelStep),
437
+ labelStep: f(t.length, e.labelStep),
428
438
  numVisiblePlot: e.numVisiblePlot || "8",
429
439
  scrollShowButtons: "0",
430
440
  scrollColor: "#CCCCCC",
431
441
  scrollHeight: "10",
432
442
  flatScrollBars: "1",
433
- scrollPadding: "5"
443
+ scrollPadding: "5",
444
+ ...e.plotToolText ? { plotToolText: e.plotToolText } : {}
434
445
  };
435
- return g({
446
+ return h({
436
447
  type: "scrollcolumn2d",
437
- width: e.width || h,
448
+ width: e.width || g,
438
449
  height: e.height || "400",
439
450
  dataSource: {
440
- chart: i,
451
+ chart: n,
441
452
  categories: [{ category: t }],
442
453
  dataset: a
443
454
  }
444
455
  });
445
- }, se = (e = {}) => {
446
- const t = e.graphLabel ? "" : m(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).some((o) => !!o.color), l = "<div class='stacked-tooltip-total' style='display:flex;justify-content:space-between;align-items:center;padding:8px 0 0;margin-top:4px;border-top:1px solid #eee;min-width:180px'><span style='color:#2B2B2B;font-weight:600'>Total</span><b style='color:#2B2B2B'>$sum</b></div>", i = (a?.dataset || []).map((o, r) => ({
447
- ...o,
448
- plotToolText: r === 0 ? "<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>$label</div><div style='display:flex;justify-content:space-between;align-items:center;padding:4px 0;min-width:180px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:$color;display:inline-block'></span>$seriesName</span><b style='color:#2B2B2B'>$dataValue</b></div>" + l : "<div style='display:flex;justify-content:space-between;align-items:center;padding:4px 0;min-width:180px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:$color;display:inline-block'></span>$seriesName</span><b style='color:#2B2B2B'>$dataValue</b></div>" + l
456
+ }, re = (e = {}) => {
457
+ const t = e.graphLabel ? "" : u(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).some((i) => !!i.color), l = "<div class='stacked-tooltip-total' style='display:flex;justify-content:space-between;align-items:center;padding:8px 0 0;margin-top:4px;border-top:1px solid #eee;min-width:180px'><span style='color:#2B2B2B;font-weight:600'>Total</span><b style='color:#2B2B2B'>$sum</b></div>", n = (a?.dataset || []).map((i, r) => ({
458
+ ...i,
459
+ plotToolText: e.plotToolText || (r === 0 ? "<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>$label</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:4px 0;min-width:180px'><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>$seriesName</label><b style='text-align:right;'>$dataValue</b></div>" + l : "<div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:4px 0;min-width:180px'><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>$seriesName</label><b style='text-align:right;'>$dataValue</b></div>" + l)
449
460
  }));
450
- return g({
461
+ return h({
451
462
  type: "scrollstackedcolumn2d",
452
463
  key: e.key,
453
- width: e.width || h,
464
+ width: e.width || g,
454
465
  height: e.height || "400",
455
466
  dataSource: {
456
467
  chart: {
457
- ...T(e),
468
+ ...F(e),
458
469
  yAxisMaxValue: e.yAxisMaxValue,
459
470
  xAxisName: e.xAxisName,
460
471
  yAxisName: e.yAxisName,
@@ -466,7 +477,7 @@ const P = (e = {}) => {
466
477
  palettecolors: s ? void 0 : e.palettecolors || $,
467
478
  numberPrefix: t,
468
479
  numVDivLines: e.numVDivLines || "5",
469
- labelStep: b(a?.category?.length, e.labelStep),
480
+ labelStep: f(a?.category?.length, e.labelStep),
470
481
  showSum: e.showSum ? "1" : void 0,
471
482
  numVisiblePlot: e.numVisiblePlot || "6",
472
483
  scrollShowButtons: "0",
@@ -476,58 +487,61 @@ const P = (e = {}) => {
476
487
  scrollPadding: "5"
477
488
  },
478
489
  categories: [{ category: a?.category || [] }],
479
- dataset: i
490
+ dataset: n
480
491
  }
481
492
  });
482
- }, re = (e = {}) => {
483
- const t = e.graphLabel ? "" : m(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).some((n) => !!n.color), l = (e.palettecolors || $).split(",").map((n) => n.trim()), i = a?.category || [], o = a?.dataset || [], r = o.map((n, c) => {
484
- const d = n.color || l[c % l.length], x = n.data || [];
493
+ }, de = (e = {}) => {
494
+ const t = e.graphLabel ? "" : u(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).some((d) => !!d.color), l = (e.palettecolors || $).split(",").map((d) => d.trim()), n = a?.category || [], i = a?.dataset || [], r = i.map((d, o) => {
495
+ const c = d.color || l[o % l.length], x = d.data || [];
485
496
  return {
486
- ...n,
487
- color: d,
488
- data: x.map((y, C) => {
489
- const u = i[C]?.label || "";
490
- if (c > 0)
491
- return { ...y, toolText: " " };
492
- const w = o.map((f, p) => {
493
- const B = f.color || l[p % l.length], D = (f.data || [])[C]?.value ?? "", S = f.seriesname || "";
494
- return `<div style='display:flex;justify-content:space-between;align-items:center;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:${B};display:inline-block'></span>${S}</span><b style='color:#2B2B2B'>${t}${D}</b></div>`;
497
+ ...d,
498
+ color: c,
499
+ ...e.plotToolText ? { plotToolText: e.plotToolText } : {},
500
+ data: x.map((y, b) => {
501
+ const m = n[b]?.label || "";
502
+ if (e.plotToolText)
503
+ return { ...y };
504
+ const T = i.map((w, C) => {
505
+ const v = w.color || l[C % l.length], D = (w.data || [])[b]?.value ?? "", A = w.seriesname || "", p = C === o ? "#2B2B2B" : "#666";
506
+ return `<div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:2px 0;min-width:200px'><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:${p}'><span style='width:8px;height:8px;border-radius:2px;background-color:${v};display:inline-block;margin-right:5px;'></span>${A}</label><b style='text-align:right;color:${p}'>${t}${D}</b></div>`;
495
507
  }).join("");
496
508
  return {
497
509
  ...y,
498
- toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${u}</div>${w}`
510
+ toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>${m}</div>${T}`
499
511
  };
500
512
  })
501
513
  };
502
514
  });
503
- return g({
515
+ return h({
504
516
  type: "mscombidy2d",
505
517
  key: e.key,
506
- width: e.width || h,
518
+ width: e.width || g,
507
519
  height: e.height || "400",
508
520
  dataSource: {
509
521
  chart: {
510
- ...W(e),
522
+ ...Y(e),
511
523
  yAxisMaxValue: e.yAxisMaxValue,
512
524
  xAxisName: e.xAxisName,
513
525
  yAxisName: e.yAxisName,
526
+ pYAxisName: e.pYAxisName,
527
+ sYAxisName: e.sYAxisName,
514
528
  numberPrefix: t,
515
- labelStep: b(i.length, e.labelStep),
529
+ labelStep: f(n.length, e.labelStep),
516
530
  palettecolors: s ? void 0 : e.palettecolors || $
517
531
  },
518
- categories: [{ category: i }],
532
+ categories: [{ category: n }],
519
533
  dataset: r
520
534
  }
521
535
  });
522
536
  }, ce = (e = {}) => {
523
- const t = e.graphLabel ? "" : m(e.numberPrefix), a = e.graphData, s = a?.category || [], l = a?.dataset || [];
524
- return g({
537
+ const t = e.graphLabel ? "" : u(e.numberPrefix), a = e.graphData, s = a?.category || [], l = a?.dataset || [];
538
+ return h({
525
539
  type: "scrollline2d",
526
- width: e?.width || h,
540
+ width: e?.width || g,
527
541
  height: e?.height || "400",
528
542
  dataSource: {
529
543
  chart: {
530
- ...V(e),
544
+ ...j(e),
531
545
  xAxisName: e?.xAxisName,
532
546
  yAxisName: e?.yAxisName,
533
547
  numberPrefix: t,
@@ -541,33 +555,34 @@ const P = (e = {}) => {
541
555
  flatScrollBars: "1",
542
556
  scrollPadding: "5",
543
557
  numDivLines: "5",
544
- labelStep: b(s.length, e?.labelStep),
558
+ labelStep: f(s.length, e?.labelStep),
559
+ ...e?.plotToolText ? { plotToolText: e.plotToolText } : {},
545
560
  ...e?.chartConfig || {}
546
561
  },
547
562
  categories: [{ category: s }],
548
563
  dataset: l
549
564
  }
550
565
  });
551
- }, de = {
552
- area: K,
553
- bar2d: P,
554
- column2d: P,
555
- doughnutChart: le,
566
+ }, he = {
567
+ area: X,
568
+ bar2d: M,
569
+ column2d: M,
570
+ doughnutChart: ie,
556
571
  groupChart: J,
557
- line: X,
558
- msCombiDy2d: re,
559
- multiAxisLineChart: ie,
560
- multilevelpie: oe,
561
- multipleLineChart: Y,
562
- sankey: ae,
563
- scrollArea: ee,
564
- scrollColumn2d: ne,
572
+ line: q,
573
+ msCombiDy2d: de,
574
+ multiAxisLineChart: oe,
575
+ multilevelpie: ne,
576
+ multipleLineChart: Z,
577
+ sankey: le,
578
+ scrollArea: te,
579
+ scrollColumn2d: se,
565
580
  scrollLine2d: ce,
566
- scrollStackedColumn2d: se,
567
- stackBarChart: te,
568
- stackedArea: Z,
581
+ scrollStackedColumn2d: re,
582
+ stackBarChart: ae,
583
+ stackedArea: ee,
569
584
  stackedcolumn2d: Q
570
- }, be = (e = {}) => e.chartType ? de[e.chartType]?.(e) ?? null : null;
585
+ }, ue = (e = {}) => e.chartType ? he[e.chartType]?.(e) ?? null : null;
571
586
  export {
572
- be as buildChartConfig
587
+ ue as buildChartConfig
573
588
  };