@ck-ui/component-library 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DropdownFooter-B1d0HFxd.js → DropdownFooter-BmXLYRcE.js} +4 -3
- package/dist/{OptionList-BM4AleXV.js → OptionList-DU0iA8Y4.js} +206 -198
- package/dist/assets/index-CRlPQn7l.css +1 -0
- package/dist/assets/index-xlbz19JS.css +1 -0
- package/dist/assets/{index-CtR-jzNi.css → index-zWDnehqu.css} +1 -1
- package/dist/assets/styles-0GdZsGyi.css +1 -0
- package/dist/assets/styles-CwZG1jzB.css +1 -0
- package/dist/assets/{styles-DAqMiQ0N.css → styles-D2n8YjU_.css} +1 -1
- package/dist/components/Breadcrumb/index.js +39 -39
- package/dist/components/FusionChart/_config/builders.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/builders.js +147 -110
- package/dist/components/FusionChart/_config/events.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/events.js +52 -37
- package/dist/components/FusionChart/_types/fusionChart.types.d.ts +3 -0
- package/dist/components/FusionChart/_types/fusionChart.types.d.ts.map +1 -1
- package/dist/components/FusionChart/index.d.ts.map +1 -1
- package/dist/components/FusionChart/index.js +524 -506
- package/dist/components/Search/index.js +60 -60
- package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +4 -3
- package/dist/components/SingleSelectDropdown/index.js +12 -11
- package/dist/components/Table/_helpers/ColumnManager/index.d.ts +1 -1
- package/dist/components/Table/_helpers/ColumnManager/index.d.ts.map +1 -1
- package/dist/components/Table/_helpers/ColumnManager/index.js +803 -696
- package/dist/components/Table/_helpers/GroupedHeader/index.d.ts +3 -2
- package/dist/components/Table/_helpers/GroupedHeader/index.d.ts.map +1 -1
- package/dist/components/Table/_helpers/GroupedHeader/index.js +148 -147
- package/dist/components/Table/_helpers/TableFilterModal/OptionList.d.ts.map +1 -1
- package/dist/components/Table/_helpers/TableFilterModal/OptionList.js +3 -3
- package/dist/components/Table/_helpers/TableFilterModal/index.d.ts.map +1 -1
- package/dist/components/Table/_helpers/TableFilterModal/index.js +52 -50
- package/dist/components/Table/_helpers/TableRows.d.ts +1 -1
- package/dist/components/Table/_helpers/TableRows.d.ts.map +1 -1
- package/dist/components/Table/_helpers/TableRows.js +242 -243
- package/dist/components/Table/_hooks/useOverlayScrollbar.d.ts.map +1 -1
- package/dist/components/Table/_hooks/useOverlayScrollbar.js +63 -58
- package/dist/components/Table/_types/table.types.d.ts +1 -1
- package/dist/components/Table/_types/table.types.d.ts.map +1 -1
- package/dist/components/Table/_utils/table.utils.d.ts +1 -1
- package/dist/components/Table/_utils/table.utils.d.ts.map +1 -1
- package/dist/components/Table/_utils/table.utils.js +84 -46
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +395 -324
- package/dist/components/TextField/index.js +165 -165
- package/package.json +1 -1
- package/dist/assets/index-C8gvpfKZ.css +0 -1
- package/dist/assets/index-DewFIgpp.css +0 -1
- package/dist/assets/styles-DLJzdWsF.css +0 -1
- package/dist/assets/styles-O-5pBCak.css +0 -1
- package/dist/search-B_cup-NN.js +0 -5
|
@@ -1,19 +1,56 @@
|
|
|
1
|
-
import { EXTENDED_PALETTE as $, DEFAULT_WIDTH as x, STACKED_AREA_PALETTE as
|
|
2
|
-
import { getBaseConfig as
|
|
3
|
-
import { getCurrencyPrefix as y, getLabelStep as p, getCartesianPalette as
|
|
4
|
-
const
|
|
5
|
-
const t = e.plotSpacePercent ?? (e.plotSpacePercent === 0 ? e.plotSpacePercent : 60), a = Array.isArray(e.graphData) ? e.graphData : [],
|
|
6
|
-
|
|
1
|
+
import { EXTENDED_PALETTE as $, DEFAULT_WIDTH as x, STACKED_AREA_PALETTE as E } from "../_constant/constants.js";
|
|
2
|
+
import { getBaseConfig as g, getStackedColumnChartShell as B, getStackedAreaChartShell as I, getStackedBarChartShell as H, getLineChartShell as F, getCommonChartShell as k, getScrollAreaChartShell as V, getMultipleLineChartShell as O, getMsCombiDy2dChartShell as R, getGroupChartShell as W, getDoughnutChartShell as Y } from "./helpers.js";
|
|
3
|
+
import { getCurrencyPrefix as y, getLabelStep as p, getCartesianPalette as L, getCurrencySymbol as j, getBarType as M, getGraphDataLength as _ } from "../_utils/chartHelpers.js";
|
|
4
|
+
const z = (e = {}) => {
|
|
5
|
+
const t = e.plotSpacePercent ?? (e.plotSpacePercent === 0 ? e.plotSpacePercent : 60), a = Array.isArray(e.graphData) ? e.graphData : [], r = a.some((o) => !!o.color), l = L(e?.palettecolors)?.split(",")?.map((o) => o?.trim());
|
|
6
|
+
if (e.usePerBarColors && !Array.isArray(e.graphData)) {
|
|
7
|
+
const o = e.graphData, s = o?.category || [], h = o?.dataset || [];
|
|
8
|
+
if (h.length === 1) {
|
|
9
|
+
const b = (h[0].data || []).map((m, v) => {
|
|
10
|
+
const C = m.color || l[v % l.length], T = s[v]?.label || "";
|
|
11
|
+
return {
|
|
12
|
+
...m,
|
|
13
|
+
color: C,
|
|
14
|
+
toolText: e.plotToolText || `<div style='font-size: 10px;font-weight:500;color:#050505;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>${T}</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:4px 0;min-width:180px'><span style='display:flex;align-items:center;gap:6px'><span style='width:8px;height:8px;border-radius:2px;background-color:${C};display:inline-block;flex-shrink:0'></span><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#737373;'>${T}</label></span><b style='text-align:right;color:#050505;font-weight:500;font-size:10px;'>${y(e.numberPrefix)}${m.value || ""}</b></div>`
|
|
15
|
+
};
|
|
16
|
+
}), w = {
|
|
17
|
+
...k(e),
|
|
18
|
+
bgColor: e.bgColor || "#ffffff",
|
|
19
|
+
labelStep: p(s.length, e.labelStep),
|
|
20
|
+
xAxisName: e.xAxisName,
|
|
21
|
+
yAxisName: e.yAxisName,
|
|
22
|
+
chartBottomMargin: e.chartBottomMargin,
|
|
23
|
+
chartLeftMargin: e.chartLeftMargin,
|
|
24
|
+
plotSpacePercent: t,
|
|
25
|
+
labelDisplay: e.labelDisplay,
|
|
26
|
+
useEllipsesWhenOverflow: e.useEllipsesWhenOverflow,
|
|
27
|
+
showValues: e.showValues || "0",
|
|
28
|
+
showLabels: e.showLabels || "1",
|
|
29
|
+
skipOverlapLabels: "0",
|
|
30
|
+
numberPrefix: y(e.numberPrefix),
|
|
31
|
+
maxLabelHeight: e.maxLabelHeight,
|
|
32
|
+
numbersuffix: e.numbersuffix || ""
|
|
33
|
+
};
|
|
34
|
+
return g({
|
|
35
|
+
type: M(e),
|
|
36
|
+
width: x,
|
|
37
|
+
height: e.height || "300",
|
|
38
|
+
dataSource: { chart: w, data: b }
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const n = a?.map((o, s) => {
|
|
43
|
+
const h = o?.color || l[s % l.length];
|
|
7
44
|
return {
|
|
8
45
|
...o,
|
|
9
|
-
color:
|
|
10
|
-
toolText: e.plotToolText || `<div style='font-size: 10px;font-weight:500;color:#050505;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'><span style='display:flex;align-items:center;gap:6px'><span style='width:8px;height:8px;border-radius:2px;background-color:${
|
|
46
|
+
color: h,
|
|
47
|
+
toolText: e.plotToolText || `<div style='font-size: 10px;font-weight:500;color:#050505;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'><span style='display:flex;align-items:center;gap:6px'><span style='width:8px;height:8px;border-radius:2px;background-color:${h};display:inline-block;flex-shrink:0'></span><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#737373;'>${o.label || ""}</label></span><b style='text-align:right;color:#050505;font-weight:500;font-size:10px;'>${y(e.numberPrefix)}${o.value || ""}</b></div>`
|
|
11
48
|
// toolText: props.plotToolText || `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>${item.label || ""}</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:4px 0;min-width:180px'><span style='display:flex;align-items:center;gap:6px'><span style='width:8px;height:8px;border-radius:2px;background-color:${itemColor};display:inline-block;flex-shrink:0'></span><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>${item.label || ""}</label></span><b style='text-align:right;'>${getCurrencyPrefix(props.numberPrefix)}${item.value || ""}</b></div>`
|
|
12
49
|
};
|
|
13
50
|
}), i = {
|
|
14
51
|
...k(e),
|
|
15
52
|
bgColor: e.bgColor || "#ffffff",
|
|
16
|
-
labelStep: p(
|
|
53
|
+
labelStep: p(_(e), e.labelStep),
|
|
17
54
|
xAxisName: e.xAxisName,
|
|
18
55
|
yAxisName: e.yAxisName,
|
|
19
56
|
chartBottomMargin: e.chartBottomMargin,
|
|
@@ -26,7 +63,7 @@ const V = (e = {}) => {
|
|
|
26
63
|
skipOverlapLabels: "0",
|
|
27
64
|
numberPrefix: y(e.numberPrefix),
|
|
28
65
|
// When per-item colors are set, don't use palettecolors (it overrides item colors)
|
|
29
|
-
palettecolors:
|
|
66
|
+
palettecolors: r ? void 0 : L(e.palettecolors),
|
|
30
67
|
maxLabelHeight: e.maxLabelHeight,
|
|
31
68
|
numbersuffix: e.numbersuffix || ""
|
|
32
69
|
}, d = e.graphData, c = e?.hideScroll ? { chart: i, data: n?.length > 0 ? n : e?.graphData || [] } : {
|
|
@@ -34,13 +71,13 @@ const V = (e = {}) => {
|
|
|
34
71
|
categories: d?.categories,
|
|
35
72
|
dataset: d?.dataset
|
|
36
73
|
};
|
|
37
|
-
return
|
|
38
|
-
type:
|
|
74
|
+
return g({
|
|
75
|
+
type: M(e),
|
|
39
76
|
width: x,
|
|
40
77
|
height: e.height || "300",
|
|
41
78
|
dataSource: c
|
|
42
79
|
});
|
|
43
|
-
}, G = (e = {}) =>
|
|
80
|
+
}, G = (e = {}) => g({
|
|
44
81
|
type: "area2d",
|
|
45
82
|
width: x,
|
|
46
83
|
height: "550",
|
|
@@ -50,18 +87,18 @@ const V = (e = {}) => {
|
|
|
50
87
|
xAxisName: e.xAxisName,
|
|
51
88
|
yAxisName: e.yAxisName,
|
|
52
89
|
labelFontSize: 12,
|
|
53
|
-
plotToolText: e.plotToolText || `<div style='font-size: 10px;font-weight:500;color:#
|
|
90
|
+
plotToolText: e.plotToolText || `<div style='font-size: 10px;font-weight:500;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;color:#AAAAAA;'>$label</label><b style='text-align:right; color:#2b2b2b;font-weight:500;font-size:10px;'>${j()}$value</b></div>`
|
|
54
91
|
// plotToolText: props.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;'>${getCurrencySymbol()}$value</b></div>`,
|
|
55
92
|
},
|
|
56
93
|
data: e.graphData || []
|
|
57
94
|
}
|
|
58
95
|
}), U = (e = {}) => {
|
|
59
|
-
const t = Array.isArray(e?.graphData) ? e.graphData : [], a = y(e?.numberPrefix),
|
|
96
|
+
const t = Array.isArray(e?.graphData) ? e.graphData : [], a = y(e?.numberPrefix), r = (e?.palettecolors || "#8ECFFF").split(",")[0].trim(), l = t?.map((n) => ({
|
|
60
97
|
...n,
|
|
61
|
-
toolText: e?.plotToolText || `<div style='font-size: 10px;font-weight:500;color:#050505;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;gap:10px;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px'><span style='width:8px;height:8px;border-radius:2px;background-color:${
|
|
98
|
+
toolText: e?.plotToolText || `<div style='font-size: 10px;font-weight:500;color:#050505;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;gap:10px;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px'><span style='width:8px;height:8px;border-radius:2px;background-color:${r};display:inline-block;flex-shrink:0'></span><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#737373;'>${n?.label || ""}</label></span><b style='text-align:right; color:#050505;font-weight:500;font-size:10px;'>${a}${n?.value || ""}</b></div>`
|
|
62
99
|
// toolText: props?.plotToolText || `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${item?.label || ""}</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px'><span style='width:8px;height:8px;border-radius:2px;background-color:${lineColor};display:inline-block;flex-shrink:0'></span><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>${item?.label || ""}</label></span><b style='text-align:right;'>${numberPrefix}${item?.value || ""}</b></div>`
|
|
63
100
|
}));
|
|
64
|
-
return
|
|
101
|
+
return g({
|
|
65
102
|
type: "line",
|
|
66
103
|
width: e?.width || x,
|
|
67
104
|
height: e?.height || "300",
|
|
@@ -77,12 +114,12 @@ const V = (e = {}) => {
|
|
|
77
114
|
}
|
|
78
115
|
});
|
|
79
116
|
}, K = (e = {}) => {
|
|
80
|
-
let t =
|
|
117
|
+
let t = j();
|
|
81
118
|
e.numberPrefix === "" ? t = "" : e.numberPrefix !== null && e.numberPrefix !== void 0 && (t = e.numberPrefix);
|
|
82
|
-
const a = e.graphData,
|
|
119
|
+
const a = e.graphData, r = (a?.dataset || []).some((n) => !!n.color), l = (a?.dataset || []).map((n, i) => {
|
|
83
120
|
const c = n.data?.map((o) => {
|
|
84
|
-
const
|
|
85
|
-
return
|
|
121
|
+
const s = o.value;
|
|
122
|
+
return s == null || Number(s) === 0 || typeof s == "string" && s.trim() === "" ? { ...o, value: 0 } : o;
|
|
86
123
|
});
|
|
87
124
|
return {
|
|
88
125
|
...n,
|
|
@@ -91,17 +128,17 @@ const V = (e = {}) => {
|
|
|
91
128
|
// index === 0
|
|
92
129
|
// ? "<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>"
|
|
93
130
|
// : "<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>"
|
|
94
|
-
plotToolText: e.plotToolText || (i === 0 ? "<div style='font-size: 10px;font-weight:500;color:#050505;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;color:#737373;'>$seriesName</label><b style='text-align:right;color:#050505;font-weight:500;font-size:10px;'>$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;color:#737373;'>$seriesName</label><b style='text-align:right;color
|
|
131
|
+
plotToolText: e.plotToolText || (i === 0 ? "<div style='font-size: 10px;font-weight:500;color:#050505;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;color:#737373;'>$seriesName</label><b style='text-align:right;color:#050505;font-weight:500;font-size:10px;'>$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;color:#737373;'>$seriesName</label><b style='text-align:right;color:#050505;font-weight:500;font-size:10px;'>$dataValue</b></div>")
|
|
95
132
|
};
|
|
96
133
|
});
|
|
97
|
-
return
|
|
134
|
+
return g({
|
|
98
135
|
type: "mscolumn2d",
|
|
99
136
|
key: e.key,
|
|
100
137
|
width: e.width || x,
|
|
101
138
|
height: e.height || "400",
|
|
102
139
|
dataSource: {
|
|
103
140
|
chart: {
|
|
104
|
-
...
|
|
141
|
+
...W(e),
|
|
105
142
|
yAxisMaxValue: e.yAxisMaxValue,
|
|
106
143
|
xAxisName: e.xAxisName,
|
|
107
144
|
yAxisName: e.yAxisName,
|
|
@@ -110,14 +147,14 @@ const V = (e = {}) => {
|
|
|
110
147
|
legendIconSides: e.legendIconSides,
|
|
111
148
|
numberPrefix: t,
|
|
112
149
|
labelStep: p(a?.category?.length, e.labelStep),
|
|
113
|
-
...
|
|
150
|
+
...r ? { palettecolors: void 0 } : {}
|
|
114
151
|
},
|
|
115
152
|
categories: [{ category: a?.category || [] }],
|
|
116
153
|
dataset: l
|
|
117
154
|
}
|
|
118
155
|
});
|
|
119
156
|
}, X = (e = {}) => {
|
|
120
|
-
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData,
|
|
157
|
+
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, r = (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:#050505;font-weight:500'>Total</span><b style='color:#050505;font-weight:500;font-size:10px;'>$sum</b></div>", n = (a?.dataset || []).map((i, d) => ({
|
|
121
158
|
...i,
|
|
122
159
|
// plotToolText: props.plotToolText || (plotToolText: props.plotToolText || (
|
|
123
160
|
// index === 0
|
|
@@ -126,16 +163,16 @@ const V = (e = {}) => {
|
|
|
126
163
|
// index === 0
|
|
127
164
|
// ? "<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>" + totalRow
|
|
128
165
|
// : "<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>" + totalRow
|
|
129
|
-
plotToolText: e.plotToolText || (d === 0 ? "<div style='font-size: 10px;font-weight:500;color:#
|
|
166
|
+
plotToolText: e.plotToolText || (d === 0 ? "<div style='font-size: 10px;font-weight:500;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;color:#737373;'>$seriesName</label><b style='text-align:right;color:#2b2b2b;font-weight:500;font-size:10px;'>$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;color:#737373'>$seriesName</label><b style='text-align:right;color:#2b2b2b;font-weight:500;font-size:10px;'>$dataValue</b></div>" + l)
|
|
130
167
|
}));
|
|
131
|
-
return
|
|
168
|
+
return g({
|
|
132
169
|
type: e.hideScroll ? "stackedcolumn2d" : "scrollstackedcolumn2d",
|
|
133
170
|
key: e.key,
|
|
134
171
|
width: e.width || x,
|
|
135
172
|
height: e.height || "400",
|
|
136
173
|
dataSource: {
|
|
137
174
|
chart: {
|
|
138
|
-
...
|
|
175
|
+
...B(e),
|
|
139
176
|
yAxisMaxValue: e.yAxisMaxValue,
|
|
140
177
|
xAxisName: e.xAxisName,
|
|
141
178
|
yAxisName: e.yAxisName,
|
|
@@ -144,7 +181,7 @@ const V = (e = {}) => {
|
|
|
144
181
|
interactiveLegend: e.interactiveLegend || "1",
|
|
145
182
|
drawCrossLine: e.drawCrossLine || "1",
|
|
146
183
|
bgColor: e.bgColor || "#ffffff",
|
|
147
|
-
palettecolors:
|
|
184
|
+
palettecolors: r ? void 0 : e.palettecolors || $,
|
|
148
185
|
numberPrefix: t,
|
|
149
186
|
labelStep: p(a?.category?.length, e.labelStep),
|
|
150
187
|
showSum: e.showSum ? "1" : void 0
|
|
@@ -156,7 +193,7 @@ const V = (e = {}) => {
|
|
|
156
193
|
}
|
|
157
194
|
});
|
|
158
195
|
}, q = (e = {}) => {
|
|
159
|
-
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData,
|
|
196
|
+
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, r = (a?.dataset || []).map((l, n) => ({
|
|
160
197
|
...l,
|
|
161
198
|
drawCustomLegendIcon: "1",
|
|
162
199
|
legendIconSides: "4",
|
|
@@ -168,14 +205,14 @@ const V = (e = {}) => {
|
|
|
168
205
|
// : "<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>"
|
|
169
206
|
plotToolText: e.plotToolText || (n === 0 ? "<div style='font-size: 10px;font-weight:500;color:#050505;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;color:#737373;'>$seriesName</label><b style='text-align:right;color:#050505;font-weight:500;font-size:10px;'>$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;color:#737373;'>$seriesName</label><b style='text-align:right;font-weight:500;font-size:10px;color:#050505;'>$dataValue</b></div>")
|
|
170
207
|
}));
|
|
171
|
-
return
|
|
208
|
+
return g({
|
|
172
209
|
type: "msline",
|
|
173
210
|
key: e.key,
|
|
174
211
|
width: e.width || x,
|
|
175
212
|
height: e.height || "400",
|
|
176
213
|
dataSource: {
|
|
177
214
|
chart: {
|
|
178
|
-
...
|
|
215
|
+
...O(e),
|
|
179
216
|
yAxisMaxValue: e.yAxisMaxValue,
|
|
180
217
|
xAxisName: e.xAxisName,
|
|
181
218
|
yAxisName: e.yAxisName,
|
|
@@ -187,53 +224,53 @@ const V = (e = {}) => {
|
|
|
187
224
|
showValues: e.showValues === "1" ? "1" : "0"
|
|
188
225
|
},
|
|
189
226
|
categories: [{ category: a?.category || [] }],
|
|
190
|
-
dataset:
|
|
227
|
+
dataset: r
|
|
191
228
|
}
|
|
192
229
|
});
|
|
193
230
|
}, J = (e = {}) => {
|
|
194
|
-
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, l = (e.palettecolors ||
|
|
195
|
-
const
|
|
231
|
+
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, l = (e.palettecolors || E).split(",").map((c) => c.trim()), n = a?.category || [], i = a?.dataset || [], d = i.map((c, o) => {
|
|
232
|
+
const h = c.color || l[o % l.length], u = c.data || [];
|
|
196
233
|
return {
|
|
197
234
|
...c,
|
|
198
|
-
color:
|
|
199
|
-
plotBorderColor:
|
|
235
|
+
color: h,
|
|
236
|
+
plotBorderColor: h,
|
|
200
237
|
plotBorderThickness: "2",
|
|
201
238
|
plotBorderAlpha: "100",
|
|
202
|
-
anchorBgColor:
|
|
203
|
-
anchorBorderColor:
|
|
239
|
+
anchorBgColor: h,
|
|
240
|
+
anchorBorderColor: h,
|
|
204
241
|
showPlotBorder: "1",
|
|
205
242
|
...e.plotToolText ? { plotToolText: e.plotToolText } : {},
|
|
206
|
-
data: u.map((
|
|
207
|
-
const
|
|
243
|
+
data: u.map((f, b) => {
|
|
244
|
+
const w = n[b]?.label || "";
|
|
208
245
|
if (e.plotToolText)
|
|
209
|
-
return { ...
|
|
246
|
+
return { ...f, alpha: "60" };
|
|
210
247
|
if (o > 0)
|
|
211
248
|
return {
|
|
212
|
-
...
|
|
249
|
+
...f,
|
|
213
250
|
alpha: "60",
|
|
214
251
|
toolText: " "
|
|
215
252
|
};
|
|
216
|
-
const
|
|
217
|
-
const T = v.color || l[C % l.length],
|
|
218
|
-
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:#737373;'><span style='width:10px;height:10px;border-radius:2px;background-color:${T};display:inline-block'></span>${
|
|
253
|
+
const m = i.map((v, C) => {
|
|
254
|
+
const T = v.color || l[C % l.length], A = (v.data || [])[b]?.value ?? "", S = v.seriesname || "";
|
|
255
|
+
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:#737373;'><span style='width:10px;height:10px;border-radius:2px;background-color:${T};display:inline-block'></span>${S}</span><b style='color:#050505;font-weight:500;font-size:10px;'>${t}${A}</b></div>`;
|
|
219
256
|
}).join("");
|
|
220
257
|
return {
|
|
221
|
-
...
|
|
258
|
+
...f,
|
|
222
259
|
alpha: "60",
|
|
223
260
|
// toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${label}</div>${tooltipItems}`,
|
|
224
|
-
toolText: `<div style='font-size: 10px;font-weight:500;color:#050505;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${
|
|
261
|
+
toolText: `<div style='font-size: 10px;font-weight:500;color:#050505;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${w}</div>${m}`
|
|
225
262
|
};
|
|
226
263
|
})
|
|
227
264
|
};
|
|
228
265
|
});
|
|
229
|
-
return
|
|
266
|
+
return g({
|
|
230
267
|
type: "stackedarea2d",
|
|
231
268
|
key: e.key,
|
|
232
269
|
width: e.width || x,
|
|
233
270
|
height: e.height || "400",
|
|
234
271
|
dataSource: {
|
|
235
272
|
chart: {
|
|
236
|
-
...
|
|
273
|
+
...I(e),
|
|
237
274
|
yAxisMaxValue: e.yAxisMaxValue,
|
|
238
275
|
xAxisName: e.xAxisName,
|
|
239
276
|
yAxisName: e.yAxisName,
|
|
@@ -250,63 +287,63 @@ const V = (e = {}) => {
|
|
|
250
287
|
}
|
|
251
288
|
});
|
|
252
289
|
}, Q = (e = {}) => {
|
|
253
|
-
const t = y(e.numberPrefix),
|
|
290
|
+
const t = y(e.numberPrefix), r = (e?.palettecolors || "#8ECFFF").split(",").map((s) => s.trim()), l = r[0];
|
|
254
291
|
if (!Array.isArray(e?.graphData) && e?.graphData?.dataset) {
|
|
255
|
-
const
|
|
256
|
-
const
|
|
292
|
+
const s = e.graphData, h = s?.category || [], u = s?.dataset || [], f = u.map((b, w) => {
|
|
293
|
+
const m = b.color || r[w % r.length], v = b.data || [];
|
|
257
294
|
return {
|
|
258
|
-
...
|
|
259
|
-
color:
|
|
295
|
+
...b,
|
|
296
|
+
color: m,
|
|
260
297
|
anchorRadius: "3",
|
|
261
298
|
anchorBgColor: "#FFFFFF",
|
|
262
|
-
anchorBorderColor:
|
|
299
|
+
anchorBorderColor: m,
|
|
263
300
|
anchorBorderThickness: "1",
|
|
264
301
|
...e.plotToolText ? { plotToolText: e.plotToolText } : {},
|
|
265
302
|
data: v.map((C, T) => {
|
|
266
|
-
const D =
|
|
303
|
+
const D = h[T]?.label || "";
|
|
267
304
|
if (e.plotToolText)
|
|
268
305
|
return { ...C };
|
|
269
|
-
const
|
|
270
|
-
return
|
|
306
|
+
const A = u[w]?.seriesname || "", S = (u[w]?.data || [])[T]?.value ?? "", N = b.color || r[w % r.length], P = `<div class='scroll-area-tooltip-row' data-series-index='${w}' style='display:flex;align-items:center;gap:5px;padding:2px 0;min-width:200px'><span class='scroll-area-dot' style='width:8px;height:8px;border-radius:2px;background-color:${N};display:inline-block;flex-shrink:0'></span><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#737373;'>${A}</label><b style='text-align:right;margin-left:auto;color:#050505;font-weight:500;font-size:10px;'>${t}${S}</b></div>`;
|
|
307
|
+
return w === 0 ? {
|
|
271
308
|
...C,
|
|
272
309
|
// toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${label}</div>${row}`,
|
|
273
|
-
toolText: `<div style='font-size: 10px;font-weight:500;color:#050505;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${D}</div>${
|
|
310
|
+
toolText: `<div style='font-size: 10px;font-weight:500;color:#050505;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${D}</div>${P}`
|
|
274
311
|
} : {
|
|
275
312
|
...C,
|
|
276
|
-
toolText:
|
|
313
|
+
toolText: P
|
|
277
314
|
};
|
|
278
315
|
})
|
|
279
316
|
};
|
|
280
317
|
});
|
|
281
|
-
return
|
|
318
|
+
return g({
|
|
282
319
|
type: "scrollarea2d",
|
|
283
320
|
width: e?.width || x,
|
|
284
321
|
height: e?.height || "400",
|
|
285
322
|
dataSource: {
|
|
286
323
|
chart: {
|
|
287
|
-
...
|
|
324
|
+
...V(e),
|
|
288
325
|
xAxisName: e?.xAxisName,
|
|
289
326
|
yAxisName: e?.yAxisName,
|
|
290
327
|
numberPrefix: t,
|
|
291
328
|
...e?.chartConfig || {}
|
|
292
329
|
},
|
|
293
|
-
categories: [{ category:
|
|
294
|
-
dataset:
|
|
330
|
+
categories: [{ category: h }],
|
|
331
|
+
dataset: f
|
|
295
332
|
}
|
|
296
333
|
});
|
|
297
334
|
}
|
|
298
|
-
const i = Array.isArray(e?.graphData) ? e.graphData : [], d = i.map((
|
|
299
|
-
value:
|
|
335
|
+
const i = Array.isArray(e?.graphData) ? e.graphData : [], d = i.map((s) => ({ label: s?.label || "" })), c = e.legendLabel || "Spend", o = i.map((s) => ({
|
|
336
|
+
value: s?.value,
|
|
300
337
|
// toolText: props?.plotToolText || `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${item?.label || ""}</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px'><span style='width:8px;height:8px;border-radius:2px;background-color:${lineColor};display:inline-block;flex-shrink:0'></span><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>${seriesName}</label></span><b style='text-align:right;'>${numberPrefix}${item?.value || ""}</b></div>`,
|
|
301
|
-
toolText: e?.plotToolText || `<div style='font-size: 10px;font-weight:500;color:#050505;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${
|
|
338
|
+
toolText: e?.plotToolText || `<div style='font-size: 10px;font-weight:500;color:#050505;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${s?.label || ""}</div><div style='display:flex;justify-content:space-between;align-items:center;gap:10px;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px'><span style='width:8px;height:8px;border-radius:2px;background-color:${l};display:inline-block;flex-shrink:0'></span><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#737373;'>${c}</label></span><b style='text-align:right;color:#050505;font-weight:500;font-size:10px;'>${t}${s?.value || ""}</b></div>`
|
|
302
339
|
}));
|
|
303
|
-
return
|
|
340
|
+
return g({
|
|
304
341
|
type: "scrollarea2d",
|
|
305
342
|
width: e?.width || x,
|
|
306
343
|
height: e?.height || "400",
|
|
307
344
|
dataSource: {
|
|
308
345
|
chart: {
|
|
309
|
-
...
|
|
346
|
+
...V(e),
|
|
310
347
|
xAxisName: e?.xAxisName,
|
|
311
348
|
yAxisName: e?.yAxisName,
|
|
312
349
|
numberPrefix: t,
|
|
@@ -328,13 +365,13 @@ const V = (e = {}) => {
|
|
|
328
365
|
});
|
|
329
366
|
}, Z = (e = {}) => {
|
|
330
367
|
const t = e.graphData;
|
|
331
|
-
return
|
|
368
|
+
return g({
|
|
332
369
|
type: "stackedbar2d",
|
|
333
370
|
width: x,
|
|
334
371
|
height: e.height || "400",
|
|
335
372
|
dataSource: {
|
|
336
373
|
chart: {
|
|
337
|
-
...
|
|
374
|
+
...H(e),
|
|
338
375
|
xAxisName: e.xAxisName,
|
|
339
376
|
yAxisName: e.yAxisName,
|
|
340
377
|
...e.plotToolText ? { plotToolText: e.plotToolText } : {}
|
|
@@ -345,7 +382,7 @@ const V = (e = {}) => {
|
|
|
345
382
|
});
|
|
346
383
|
}, ee = (e = {}) => {
|
|
347
384
|
const t = e.graphData;
|
|
348
|
-
return
|
|
385
|
+
return g({
|
|
349
386
|
type: "sankey",
|
|
350
387
|
width: x,
|
|
351
388
|
height: e.height || "600",
|
|
@@ -376,35 +413,35 @@ const V = (e = {}) => {
|
|
|
376
413
|
}
|
|
377
414
|
});
|
|
378
415
|
}, te = (e = {}) => {
|
|
379
|
-
const a = e.graphData?.data || [],
|
|
416
|
+
const a = e.graphData?.data || [], r = a.reduce((o, s) => o + (Number(s.value) || 0), 0), l = Math.round(r * 100) / 100, n = e.numberPrefix ?? "$", i = { ...e };
|
|
380
417
|
if (!i.defaultCenterLabel)
|
|
381
418
|
i.defaultCenterLabel = `Total{br}${n}${l}`;
|
|
382
419
|
else if (i.defaultCenterLabel.includes("{br}")) {
|
|
383
420
|
const [o] = i.defaultCenterLabel.split("{br}");
|
|
384
421
|
i.defaultCenterLabel = `${o}{br}${n}${l}`;
|
|
385
422
|
}
|
|
386
|
-
const d = (e.palettecolors || $).split(",").map((o) => o.trim()), c = a.map((o,
|
|
387
|
-
const
|
|
388
|
-
let
|
|
389
|
-
return e.plotToolText ?
|
|
423
|
+
const d = (e.palettecolors || $).split(",").map((o) => o.trim()), c = a.map((o, s) => {
|
|
424
|
+
const h = Number(o.value) || 0, u = l > 0 ? (h / l * 100).toFixed(2) : "0", f = o.color || d[s % d.length];
|
|
425
|
+
let b;
|
|
426
|
+
return e.plotToolText ? b = e.plotToolText.replace(/\$plotFillColor/g, f).replace(/\$color/g, f).replace(/\$label/g, o.label || "").replace(/\$value/g, String(o.value ?? "")).replace(/\$dataValue/g, `${n}${h}`).replace(/\$percentValue/g, u).replace(/\$unformattedSum/g, String(l)).replace(/\$sum/g, `${n}${l}`) : b = `<div style='font-size: 10px;font-weight:500;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;font-size: 10px;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#737373'><span style='width:8px;height:8px;border-radius:2px;background-color:${f};display:inline-block;margin-right:5px;color:#AAAAAA;'></span>${o.label}</label><b style='text-align:right;color:#2b2b2b;font-weight:500;font-size:10px;'>${n}${h}</b></div>`, {
|
|
390
427
|
...o,
|
|
391
|
-
color:
|
|
428
|
+
color: f,
|
|
392
429
|
displayValue: `${n}${o.value} (${u}%){br}${o.label}`,
|
|
393
|
-
toolText:
|
|
430
|
+
toolText: b
|
|
394
431
|
};
|
|
395
432
|
});
|
|
396
|
-
return
|
|
433
|
+
return g({
|
|
397
434
|
type: "doughnut2d",
|
|
398
435
|
width: e.width || "136",
|
|
399
436
|
height: e.height || "136",
|
|
400
437
|
dataSource: {
|
|
401
|
-
chart:
|
|
438
|
+
chart: Y(i),
|
|
402
439
|
data: c
|
|
403
440
|
}
|
|
404
441
|
});
|
|
405
442
|
}, ae = (e = {}) => {
|
|
406
443
|
const t = e.graphData;
|
|
407
|
-
return
|
|
444
|
+
return g({
|
|
408
445
|
type: "multiaxisline",
|
|
409
446
|
key: e.key,
|
|
410
447
|
width: e.width || x,
|
|
@@ -417,7 +454,7 @@ const V = (e = {}) => {
|
|
|
417
454
|
});
|
|
418
455
|
}, le = (e = {}) => {
|
|
419
456
|
const t = e.graphData;
|
|
420
|
-
return
|
|
457
|
+
return g({
|
|
421
458
|
type: "multilevelpie",
|
|
422
459
|
width: e.width || "550",
|
|
423
460
|
height: e.height || "350",
|
|
@@ -444,7 +481,7 @@ const V = (e = {}) => {
|
|
|
444
481
|
data: d.data || []
|
|
445
482
|
}));
|
|
446
483
|
}
|
|
447
|
-
const
|
|
484
|
+
const r = y(e.numberPrefix), l = a.some((i) => !!i.color), n = {
|
|
448
485
|
...k(e),
|
|
449
486
|
bgColor: e.bgColor || "#ffffff",
|
|
450
487
|
xAxisName: e.xAxisName,
|
|
@@ -458,9 +495,9 @@ const V = (e = {}) => {
|
|
|
458
495
|
showLabels: e.showLabels || "1",
|
|
459
496
|
showLegend: "0",
|
|
460
497
|
skipOverlapLabels: "0",
|
|
461
|
-
numberPrefix:
|
|
498
|
+
numberPrefix: r,
|
|
462
499
|
numVDivLines: e.numVDivLines || "5",
|
|
463
|
-
palettecolors: l ? void 0 :
|
|
500
|
+
palettecolors: l ? void 0 : L(e.palettecolors),
|
|
464
501
|
maxLabelHeight: e.maxLabelHeight,
|
|
465
502
|
numbersuffix: e.numbersuffix || "",
|
|
466
503
|
labelStep: p(t.length, e.labelStep),
|
|
@@ -472,7 +509,7 @@ const V = (e = {}) => {
|
|
|
472
509
|
scrollPadding: "5",
|
|
473
510
|
...e.plotToolText ? { plotToolText: e.plotToolText } : {}
|
|
474
511
|
};
|
|
475
|
-
return
|
|
512
|
+
return g({
|
|
476
513
|
type: "scrollcolumn2d",
|
|
477
514
|
width: e.width || x,
|
|
478
515
|
height: e.height || "400",
|
|
@@ -483,7 +520,7 @@ const V = (e = {}) => {
|
|
|
483
520
|
}
|
|
484
521
|
});
|
|
485
522
|
}, ie = (e = {}) => {
|
|
486
|
-
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData,
|
|
523
|
+
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, r = (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:#050505;font-weight:500'>Total</span><b style='color:#050505;font-weight:500;font-size:10px'>$sum</b></div>", n = (a?.dataset || []).map((i, d) => ({
|
|
487
524
|
...i,
|
|
488
525
|
// plotToolText: props.plotToolText || (
|
|
489
526
|
// index === 0
|
|
@@ -491,14 +528,14 @@ const V = (e = {}) => {
|
|
|
491
528
|
// : "<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>" + totalRow
|
|
492
529
|
plotToolText: e.plotToolText || (d === 0 ? "<div style='font-size: 10px;font-weight:500;color:#050505;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;color:#737373;'>$seriesName</label><b style='text-align:right;color:#050505;font-weight:500;font-size:10px;'>$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;color:#737373;'>$seriesName</label><b style='text-align:right;color:#050505;font-weight:500;font-size:10px;'>$dataValue</b></div>" + l)
|
|
493
530
|
}));
|
|
494
|
-
return
|
|
531
|
+
return g({
|
|
495
532
|
type: "scrollstackedcolumn2d",
|
|
496
533
|
key: e.key,
|
|
497
534
|
width: e.width || x,
|
|
498
535
|
height: e.height || "400",
|
|
499
536
|
dataSource: {
|
|
500
537
|
chart: {
|
|
501
|
-
...
|
|
538
|
+
...B(e),
|
|
502
539
|
yAxisMaxValue: e.yAxisMaxValue,
|
|
503
540
|
xAxisName: e.xAxisName,
|
|
504
541
|
yAxisName: e.yAxisName,
|
|
@@ -507,7 +544,7 @@ const V = (e = {}) => {
|
|
|
507
544
|
interactiveLegend: e.interactiveLegend || "1",
|
|
508
545
|
drawCrossLine: e.drawCrossLine || "1",
|
|
509
546
|
bgColor: e.bgColor || "#ffffff",
|
|
510
|
-
palettecolors:
|
|
547
|
+
palettecolors: r ? void 0 : e.palettecolors || $,
|
|
511
548
|
numberPrefix: t,
|
|
512
549
|
numVDivLines: e.numVDivLines || "5",
|
|
513
550
|
labelStep: p(a?.category?.length, e.labelStep),
|
|
@@ -524,31 +561,31 @@ const V = (e = {}) => {
|
|
|
524
561
|
}
|
|
525
562
|
});
|
|
526
563
|
}, ne = (e = {}) => {
|
|
527
|
-
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData,
|
|
528
|
-
const
|
|
564
|
+
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, r = (a?.dataset || []).some((c) => !!c.color), l = (e.palettecolors || $).split(",").map((c) => c.trim()), n = a?.category || [], i = a?.dataset || [], d = i.map((c, o) => {
|
|
565
|
+
const s = c.color || l[o % l.length], h = c.data || [];
|
|
529
566
|
return {
|
|
530
567
|
...c,
|
|
531
|
-
color:
|
|
568
|
+
color: s,
|
|
532
569
|
...e.plotToolText ? { plotToolText: e.plotToolText } : {},
|
|
533
|
-
data:
|
|
534
|
-
const
|
|
570
|
+
data: h.map((u, f) => {
|
|
571
|
+
const b = n[f]?.label || "";
|
|
535
572
|
if (e.plotToolText)
|
|
536
573
|
return { ...u };
|
|
537
574
|
if (o > 0)
|
|
538
575
|
return { ...u, toolText: " " };
|
|
539
|
-
const
|
|
540
|
-
const C =
|
|
541
|
-
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:#737373;'><span style='width:8px;height:8px;border-radius:2px;background-color:${C};display:inline-block;margin-right:5px;'></span>${
|
|
576
|
+
const w = i.map((m, v) => {
|
|
577
|
+
const C = m.color || l[v % l.length], D = (m.data || [])[f]?.value ?? "", A = m.seriesname || "", S = m.tooltipPrefix !== void 0 ? m.tooltipPrefix : t, N = m.renderAs || "column";
|
|
578
|
+
return `<div class='mscombi-tooltip-row' data-series-index='${v}' data-render-as='${N}' 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:#737373;'><span class='mscombi-dot' style='width:8px;height:8px;border-radius:2px;background-color:${C};display:inline-block;margin-right:5px;'></span>${A}</label><b style='text-align:right;color:#050505;font-weight:500;font-size:10px;'>${S}${D}</b></div>`;
|
|
542
579
|
}).join("");
|
|
543
580
|
return {
|
|
544
581
|
...u,
|
|
545
582
|
// toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>${label}</div>${tooltipItems}`,
|
|
546
|
-
toolText: `<div style='font-size: 10px;font-weight:500;color:#050505;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>${
|
|
583
|
+
toolText: `<div style='font-size: 10px;font-weight:500;color:#050505;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>${b}</div>${w}`
|
|
547
584
|
};
|
|
548
585
|
})
|
|
549
586
|
};
|
|
550
587
|
});
|
|
551
|
-
return
|
|
588
|
+
return g({
|
|
552
589
|
type: "mscombidy2d",
|
|
553
590
|
key: e.key,
|
|
554
591
|
width: e.width || x,
|
|
@@ -563,15 +600,15 @@ const V = (e = {}) => {
|
|
|
563
600
|
sYAxisName: e.sYAxisName,
|
|
564
601
|
numberPrefix: t,
|
|
565
602
|
labelStep: p(n.length, e.labelStep),
|
|
566
|
-
palettecolors:
|
|
603
|
+
palettecolors: r ? void 0 : e.palettecolors || $
|
|
567
604
|
},
|
|
568
605
|
categories: [{ category: n }],
|
|
569
606
|
dataset: d
|
|
570
607
|
}
|
|
571
608
|
});
|
|
572
609
|
}, se = (e = {}) => {
|
|
573
|
-
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData,
|
|
574
|
-
return
|
|
610
|
+
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, r = a?.category || [], l = a?.dataset || [];
|
|
611
|
+
return g({
|
|
575
612
|
type: "scrollline2d",
|
|
576
613
|
width: e?.width || x,
|
|
577
614
|
height: e?.height || "400",
|
|
@@ -591,18 +628,18 @@ const V = (e = {}) => {
|
|
|
591
628
|
flatScrollBars: "1",
|
|
592
629
|
scrollPadding: "5",
|
|
593
630
|
numDivLines: "5",
|
|
594
|
-
labelStep: p(
|
|
631
|
+
labelStep: p(r.length, e?.labelStep),
|
|
595
632
|
...e?.plotToolText ? { plotToolText: e.plotToolText } : {},
|
|
596
633
|
...e?.chartConfig || {}
|
|
597
634
|
},
|
|
598
|
-
categories: [{ category:
|
|
635
|
+
categories: [{ category: r }],
|
|
599
636
|
dataset: l
|
|
600
637
|
}
|
|
601
638
|
});
|
|
602
639
|
}, re = {
|
|
603
640
|
area: G,
|
|
604
|
-
bar2d:
|
|
605
|
-
column2d:
|
|
641
|
+
bar2d: z,
|
|
642
|
+
column2d: z,
|
|
606
643
|
doughnutChart: te,
|
|
607
644
|
groupChart: K,
|
|
608
645
|
line: U,
|