@ck-ui/component-library 1.0.6 → 1.0.7
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 +96 -0
- package/dist/assets/{DropdownFooter-tfY7sg47.css → DropdownFooter-CRxQRvLY.css} +1 -1
- package/dist/assets/{index-BpRKr5z7.css → index-31u7i502.css} +1 -1
- package/dist/assets/index-C8gvpfKZ.css +1 -0
- package/dist/assets/index-D5sFw3XA.css +1 -0
- package/dist/assets/styles-BATmGmYA.css +1 -0
- package/dist/assets/styles-DAqMiQ0N.css +1 -0
- package/dist/components/FusionChart/_config/builders.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/builders.js +172 -145
- package/dist/components/FusionChart/_config/events.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/events.js +44 -30
- package/dist/components/FusionChart/_config/helpers.d.ts +10 -0
- package/dist/components/FusionChart/_config/helpers.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/helpers.js +6 -3
- package/dist/components/FusionChart/_helpers/doughnutHelper.d.ts.map +1 -1
- package/dist/components/FusionChart/_helpers/doughnutHelper.js +63 -53
- package/dist/components/FusionChart/index.js +34 -34
- package/dist/components/IconButton/index.js +20 -20
- package/dist/components/MultiSelect/SimpleMultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/SimpleMultiSelect.js +30 -30
- package/dist/components/MultiSelect/_helpers/DropdownFooter.js +1 -1
- package/dist/components/MultiSelect/_helpers/OptionRow.js +1 -1
- package/dist/components/MultiSelect/_helpers/OverflowMenu.d.ts.map +1 -1
- package/dist/components/MultiSelect/_helpers/OverflowMenu.js +5 -33
- package/dist/components/MultiSelect/_helpers/OverflowMenuItem.js +1 -1
- package/dist/components/MultiSelect/_helpers/SearchResult.js +1 -1
- package/dist/components/MultiSelect/_helpers/TagContent.js +1 -1
- package/dist/components/MultiSelect/_helpers/TriggerButton.d.ts +1 -1
- package/dist/components/MultiSelect/_helpers/TriggerButton.d.ts.map +1 -1
- package/dist/components/MultiSelect/_helpers/TriggerButton.js +99 -73
- package/dist/components/MultiSelect/index.d.ts.map +1 -1
- package/dist/components/MultiSelect/index.js +27 -27
- package/dist/components/Pagination/index.d.ts.map +1 -1
- package/dist/components/Pagination/index.js +101 -92
- package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +2 -2
- package/dist/components/SingleSelectDropdown/index.js +2 -2
- package/dist/components/Table/_hooks/useOverlayScrollbar.d.ts +7 -0
- package/dist/components/Table/_hooks/useOverlayScrollbar.d.ts.map +1 -0
- package/dist/components/Table/_hooks/useOverlayScrollbar.js +90 -0
- package/dist/components/Table/_utils/table.utils.d.ts.map +1 -1
- package/dist/components/Table/_utils/table.utils.js +32 -37
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +290 -273
- package/dist/styles.module-BJEFZA32.js +56 -0
- package/package.json +1 -1
- package/dist/DropdownFooter-B63OOZOS.js +0 -96
- package/dist/assets/index-DyCyrZSK.css +0 -1
- package/dist/assets/index-nXJu3Pq0.css +0 -1
- package/dist/assets/styles-DngCqCGW.css +0 -1
- package/dist/assets/styles-infyYXuZ.css +0 -1
- package/dist/styles.module-DlIBNC4w.js +0 -55
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { EXTENDED_PALETTE as
|
|
2
|
-
import { getBaseConfig as h, getStackedColumnChartShell as
|
|
3
|
-
import { getCurrencyPrefix as y, getLabelStep as
|
|
4
|
-
const
|
|
5
|
-
const t = e.plotSpacePercent ?? (e.plotSpacePercent === 0 ? e.plotSpacePercent : 60), a = Array.isArray(e.graphData) ? e.graphData : [], s = a.some((
|
|
6
|
-
const g =
|
|
1
|
+
import { EXTENDED_PALETTE as $, DEFAULT_WIDTH as x, STACKED_AREA_PALETTE as j } from "../_constant/constants.js";
|
|
2
|
+
import { getBaseConfig as h, getStackedColumnChartShell as z, getStackedAreaChartShell as E, getStackedBarChartShell as I, getLineChartShell as F, getCommonChartShell as k, getScrollAreaChartShell as P, getMultipleLineChartShell as H, getMsCombiDy2dChartShell as R, getGroupChartShell as O, getDoughnutChartShell as W } from "./helpers.js";
|
|
3
|
+
import { getCurrencyPrefix as y, getLabelStep as p, getCartesianPalette as N, getCurrencySymbol as M, getGraphDataLength as Y, getBarType as _ } from "../_utils/chartHelpers.js";
|
|
4
|
+
const V = (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 = N(e?.palettecolors)?.split(",")?.map((o) => o?.trim()), n = a?.map((o, r) => {
|
|
6
|
+
const g = o?.color || l[r % l.length];
|
|
7
7
|
return {
|
|
8
|
-
...
|
|
8
|
+
...o,
|
|
9
9
|
color: g,
|
|
10
|
-
toolText: e.plotToolText || `<div style='font-size:
|
|
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:${g};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
|
+
// 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>`
|
|
11
12
|
};
|
|
12
|
-
}),
|
|
13
|
+
}), i = {
|
|
13
14
|
...k(e),
|
|
14
15
|
bgColor: e.bgColor || "#ffffff",
|
|
15
|
-
labelStep:
|
|
16
|
+
labelStep: p(Y(e), e.labelStep),
|
|
16
17
|
xAxisName: e.xAxisName,
|
|
17
18
|
yAxisName: e.yAxisName,
|
|
18
19
|
chartBottomMargin: e.chartBottomMargin,
|
|
@@ -25,21 +26,21 @@ const F = (e = {}) => {
|
|
|
25
26
|
skipOverlapLabels: "0",
|
|
26
27
|
numberPrefix: y(e.numberPrefix),
|
|
27
28
|
// When per-item colors are set, don't use palettecolors (it overrides item colors)
|
|
28
|
-
palettecolors: s ? void 0 :
|
|
29
|
+
palettecolors: s ? void 0 : N(e.palettecolors),
|
|
29
30
|
maxLabelHeight: e.maxLabelHeight,
|
|
30
31
|
numbersuffix: e.numbersuffix || ""
|
|
31
|
-
}, d = e.graphData, c = e?.hideScroll ? { chart:
|
|
32
|
-
chart:
|
|
32
|
+
}, d = e.graphData, c = e?.hideScroll ? { chart: i, data: n?.length > 0 ? n : e?.graphData || [] } : {
|
|
33
|
+
chart: i,
|
|
33
34
|
categories: d?.categories,
|
|
34
35
|
dataset: d?.dataset
|
|
35
36
|
};
|
|
36
37
|
return h({
|
|
37
|
-
type:
|
|
38
|
+
type: _(e),
|
|
38
39
|
width: x,
|
|
39
40
|
height: e.height || "300",
|
|
40
41
|
dataSource: c
|
|
41
42
|
});
|
|
42
|
-
},
|
|
43
|
+
}, G = (e = {}) => h({
|
|
43
44
|
type: "area2d",
|
|
44
45
|
width: x,
|
|
45
46
|
height: "550",
|
|
@@ -49,14 +50,16 @@ const F = (e = {}) => {
|
|
|
49
50
|
xAxisName: e.xAxisName,
|
|
50
51
|
yAxisName: e.yAxisName,
|
|
51
52
|
labelFontSize: 12,
|
|
52
|
-
plotToolText: e.plotToolText || `<div style='font-size:
|
|
53
|
+
plotToolText: e.plotToolText || `<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;'>$label</label><b style='text-align:right; color:#050505;font-weight:500;font-size:10px;'>${M()}$value</b></div>`
|
|
54
|
+
// 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>`,
|
|
53
55
|
},
|
|
54
56
|
data: e.graphData || []
|
|
55
57
|
}
|
|
56
|
-
}),
|
|
58
|
+
}), U = (e = {}) => {
|
|
57
59
|
const t = Array.isArray(e?.graphData) ? e.graphData : [], a = y(e?.numberPrefix), s = (e?.palettecolors || "#8ECFFF").split(",")[0].trim(), l = t?.map((n) => ({
|
|
58
60
|
...n,
|
|
59
|
-
toolText: e?.plotToolText || `<div style='font-size:
|
|
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:${s};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
|
+
// 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>`
|
|
60
63
|
}));
|
|
61
64
|
return h({
|
|
62
65
|
type: "line",
|
|
@@ -64,27 +67,31 @@ const F = (e = {}) => {
|
|
|
64
67
|
height: e?.height || "300",
|
|
65
68
|
dataSource: {
|
|
66
69
|
chart: {
|
|
67
|
-
...
|
|
70
|
+
...F(e),
|
|
68
71
|
xAxisName: e?.xAxisName,
|
|
69
72
|
yAxisName: e?.yAxisName,
|
|
70
|
-
labelStep:
|
|
73
|
+
labelStep: p(t.length, void 0),
|
|
71
74
|
...e?.chartConfig || {}
|
|
72
75
|
},
|
|
73
76
|
data: l.length > 0 ? l : e?.graphData || []
|
|
74
77
|
}
|
|
75
78
|
});
|
|
76
|
-
},
|
|
77
|
-
let t =
|
|
79
|
+
}, K = (e = {}) => {
|
|
80
|
+
let t = M();
|
|
78
81
|
e.numberPrefix === "" ? t = "" : e.numberPrefix !== null && e.numberPrefix !== void 0 && (t = e.numberPrefix);
|
|
79
|
-
const a = e.graphData, s = (a?.dataset || []).some((n) => !!n.color), l = (a?.dataset || []).map((n,
|
|
80
|
-
const c = n.data?.map((
|
|
81
|
-
const r =
|
|
82
|
-
return r == null || Number(r) === 0 || typeof r == "string" && r.trim() === "" ? { ...
|
|
82
|
+
const a = e.graphData, s = (a?.dataset || []).some((n) => !!n.color), l = (a?.dataset || []).map((n, i) => {
|
|
83
|
+
const c = n.data?.map((o) => {
|
|
84
|
+
const r = o.value;
|
|
85
|
+
return r == null || Number(r) === 0 || typeof r == "string" && r.trim() === "" ? { ...o, value: 0 } : o;
|
|
83
86
|
});
|
|
84
87
|
return {
|
|
85
88
|
...n,
|
|
86
89
|
...c ? { data: c } : {},
|
|
87
|
-
plotToolText:
|
|
90
|
+
// plotToolText: props.plotToolText || (
|
|
91
|
+
// index === 0
|
|
92
|
+
// ? "<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
|
+
// : "<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:050505;font-weight:500;font-size:10px;'>$dataValue</b></div>")
|
|
88
95
|
};
|
|
89
96
|
});
|
|
90
97
|
return h({
|
|
@@ -94,7 +101,7 @@ const F = (e = {}) => {
|
|
|
94
101
|
height: e.height || "400",
|
|
95
102
|
dataSource: {
|
|
96
103
|
chart: {
|
|
97
|
-
...
|
|
104
|
+
...O(e),
|
|
98
105
|
yAxisMaxValue: e.yAxisMaxValue,
|
|
99
106
|
xAxisName: e.xAxisName,
|
|
100
107
|
yAxisName: e.yAxisName,
|
|
@@ -102,17 +109,24 @@ const F = (e = {}) => {
|
|
|
102
109
|
showLegend: "0",
|
|
103
110
|
legendIconSides: e.legendIconSides,
|
|
104
111
|
numberPrefix: t,
|
|
105
|
-
labelStep:
|
|
112
|
+
labelStep: p(a?.category?.length, e.labelStep),
|
|
106
113
|
...s ? { palettecolors: void 0 } : {}
|
|
107
114
|
},
|
|
108
115
|
categories: [{ category: a?.category || [] }],
|
|
109
116
|
dataset: l
|
|
110
117
|
}
|
|
111
118
|
});
|
|
112
|
-
},
|
|
113
|
-
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).some((
|
|
114
|
-
...
|
|
115
|
-
plotToolText:
|
|
119
|
+
}, X = (e = {}) => {
|
|
120
|
+
const t = e.graphLabel ? "" : y(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:#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
|
+
...i,
|
|
122
|
+
// plotToolText: props.plotToolText || (plotToolText: props.plotToolText || (
|
|
123
|
+
// index === 0
|
|
124
|
+
// ? "<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
|
|
125
|
+
// : "<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
|
|
126
|
+
// index === 0
|
|
127
|
+
// ? "<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
|
+
// : "<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:#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)
|
|
116
130
|
}));
|
|
117
131
|
return h({
|
|
118
132
|
type: e.hideScroll ? "stackedcolumn2d" : "scrollstackedcolumn2d",
|
|
@@ -121,7 +135,7 @@ const F = (e = {}) => {
|
|
|
121
135
|
height: e.height || "400",
|
|
122
136
|
dataSource: {
|
|
123
137
|
chart: {
|
|
124
|
-
...
|
|
138
|
+
...z(e),
|
|
125
139
|
yAxisMaxValue: e.yAxisMaxValue,
|
|
126
140
|
xAxisName: e.xAxisName,
|
|
127
141
|
yAxisName: e.yAxisName,
|
|
@@ -130,9 +144,9 @@ const F = (e = {}) => {
|
|
|
130
144
|
interactiveLegend: e.interactiveLegend || "1",
|
|
131
145
|
drawCrossLine: e.drawCrossLine || "1",
|
|
132
146
|
bgColor: e.bgColor || "#ffffff",
|
|
133
|
-
palettecolors: s ? void 0 : e.palettecolors ||
|
|
147
|
+
palettecolors: s ? void 0 : e.palettecolors || $,
|
|
134
148
|
numberPrefix: t,
|
|
135
|
-
labelStep:
|
|
149
|
+
labelStep: p(a?.category?.length, e.labelStep),
|
|
136
150
|
showSum: e.showSum ? "1" : void 0
|
|
137
151
|
},
|
|
138
152
|
categories: [
|
|
@@ -141,14 +155,18 @@ const F = (e = {}) => {
|
|
|
141
155
|
dataset: n
|
|
142
156
|
}
|
|
143
157
|
});
|
|
144
|
-
},
|
|
158
|
+
}, q = (e = {}) => {
|
|
145
159
|
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).map((l, n) => ({
|
|
146
160
|
...l,
|
|
147
161
|
drawCustomLegendIcon: "1",
|
|
148
162
|
legendIconSides: "4",
|
|
149
163
|
legendIconBorderThickness: "0",
|
|
150
164
|
legendIconBgAlpha: "100",
|
|
151
|
-
plotToolText:
|
|
165
|
+
// plotToolText: props.plotToolText || (
|
|
166
|
+
// index === 0
|
|
167
|
+
// ? "<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>"
|
|
168
|
+
// : "<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
|
+
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>")
|
|
152
170
|
}));
|
|
153
171
|
return h({
|
|
154
172
|
type: "msline",
|
|
@@ -157,7 +175,7 @@ const F = (e = {}) => {
|
|
|
157
175
|
height: e.height || "400",
|
|
158
176
|
dataSource: {
|
|
159
177
|
chart: {
|
|
160
|
-
...
|
|
178
|
+
...H(e),
|
|
161
179
|
yAxisMaxValue: e.yAxisMaxValue,
|
|
162
180
|
xAxisName: e.xAxisName,
|
|
163
181
|
yAxisName: e.yAxisName,
|
|
@@ -165,16 +183,16 @@ const F = (e = {}) => {
|
|
|
165
183
|
legendPosition: e.legendRight ? void 0 : e.legendPosition,
|
|
166
184
|
numberPrefix: t,
|
|
167
185
|
chartLeftMargin: e.chartLeftMargin || "20",
|
|
168
|
-
labelStep:
|
|
186
|
+
labelStep: p(a?.category?.length, e.labelStep),
|
|
169
187
|
showValues: e.showValues === "1" ? "1" : "0"
|
|
170
188
|
},
|
|
171
189
|
categories: [{ category: a?.category || [] }],
|
|
172
190
|
dataset: s
|
|
173
191
|
}
|
|
174
192
|
});
|
|
175
|
-
},
|
|
176
|
-
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, l = (e.palettecolors ||
|
|
177
|
-
const g = c.color || l[
|
|
193
|
+
}, J = (e = {}) => {
|
|
194
|
+
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, l = (e.palettecolors || j).split(",").map((c) => c.trim()), n = a?.category || [], i = a?.dataset || [], d = i.map((c, o) => {
|
|
195
|
+
const g = c.color || l[o % l.length], u = c.data || [];
|
|
178
196
|
return {
|
|
179
197
|
...c,
|
|
180
198
|
color: g,
|
|
@@ -186,23 +204,24 @@ const F = (e = {}) => {
|
|
|
186
204
|
showPlotBorder: "1",
|
|
187
205
|
...e.plotToolText ? { plotToolText: e.plotToolText } : {},
|
|
188
206
|
data: u.map((b, m) => {
|
|
189
|
-
const
|
|
207
|
+
const f = n[m]?.label || "";
|
|
190
208
|
if (e.plotToolText)
|
|
191
209
|
return { ...b, alpha: "60" };
|
|
192
|
-
if (
|
|
210
|
+
if (o > 0)
|
|
193
211
|
return {
|
|
194
212
|
...b,
|
|
195
213
|
alpha: "60",
|
|
196
214
|
toolText: " "
|
|
197
215
|
};
|
|
198
|
-
const
|
|
199
|
-
const
|
|
200
|
-
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
|
|
216
|
+
const w = i.map((v, C) => {
|
|
217
|
+
const T = v.color || l[C % l.length], S = (v.data || [])[m]?.value ?? "", A = v.seriesname || "";
|
|
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>${A}</span><b style='color:#050505;font-weight:500;font-size:10px;'>${t}${S}</b></div>`;
|
|
201
219
|
}).join("");
|
|
202
220
|
return {
|
|
203
221
|
...b,
|
|
204
222
|
alpha: "60",
|
|
205
|
-
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${
|
|
223
|
+
// 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'>${f}</div>${w}`
|
|
206
225
|
};
|
|
207
226
|
})
|
|
208
227
|
};
|
|
@@ -214,7 +233,7 @@ const F = (e = {}) => {
|
|
|
214
233
|
height: e.height || "400",
|
|
215
234
|
dataSource: {
|
|
216
235
|
chart: {
|
|
217
|
-
...
|
|
236
|
+
...E(e),
|
|
218
237
|
yAxisMaxValue: e.yAxisMaxValue,
|
|
219
238
|
xAxisName: e.xAxisName,
|
|
220
239
|
yAxisName: e.yAxisName,
|
|
@@ -224,38 +243,37 @@ const F = (e = {}) => {
|
|
|
224
243
|
drawCrossLine: "1",
|
|
225
244
|
crossLineColor: "#f2f5fa",
|
|
226
245
|
numberPrefix: t,
|
|
227
|
-
labelStep:
|
|
246
|
+
labelStep: p(a?.category?.length, e.labelStep)
|
|
228
247
|
},
|
|
229
248
|
categories: [{ category: a?.category || [] }],
|
|
230
249
|
dataset: d
|
|
231
250
|
}
|
|
232
251
|
});
|
|
233
|
-
},
|
|
252
|
+
}, Q = (e = {}) => {
|
|
234
253
|
const t = y(e.numberPrefix), s = (e?.palettecolors || "#8ECFFF").split(",").map((r) => r.trim()), l = s[0];
|
|
235
254
|
if (!Array.isArray(e?.graphData) && e?.graphData?.dataset) {
|
|
236
|
-
const r = e.graphData, g = r?.category || [], u = r?.dataset || [], b = u.map((m,
|
|
237
|
-
const
|
|
255
|
+
const r = e.graphData, g = r?.category || [], u = r?.dataset || [], b = u.map((m, f) => {
|
|
256
|
+
const w = m.color || s[f % s.length], v = m.data || [];
|
|
238
257
|
return {
|
|
239
258
|
...m,
|
|
240
|
-
color:
|
|
259
|
+
color: w,
|
|
241
260
|
anchorRadius: "3",
|
|
242
261
|
anchorBgColor: "#FFFFFF",
|
|
243
|
-
anchorBorderColor:
|
|
262
|
+
anchorBorderColor: w,
|
|
244
263
|
anchorBorderThickness: "1",
|
|
245
264
|
...e.plotToolText ? { plotToolText: e.plotToolText } : {},
|
|
246
|
-
data:
|
|
247
|
-
const
|
|
265
|
+
data: v.map((C, T) => {
|
|
266
|
+
const D = g[T]?.label || "";
|
|
248
267
|
if (e.plotToolText)
|
|
249
|
-
return { ...
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${$}</div>${A}`
|
|
268
|
+
return { ...C };
|
|
269
|
+
const S = u[f]?.seriesname || "", A = (u[f]?.data || [])[T]?.value ?? "", B = m.color || s[f % s.length], L = `<div class='scroll-area-tooltip-row' data-series-index='${f}' 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:${B};display:inline-block;flex-shrink:0'></span><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#737373;'>${S}</label><b style='text-align:right;margin-left:auto;color:#050505;font-weight:500;font-size:10px;'>${t}${A}</b></div>`;
|
|
270
|
+
return f === 0 ? {
|
|
271
|
+
...C,
|
|
272
|
+
// 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>${L}`
|
|
274
|
+
} : {
|
|
275
|
+
...C,
|
|
276
|
+
toolText: L
|
|
259
277
|
};
|
|
260
278
|
})
|
|
261
279
|
};
|
|
@@ -266,7 +284,7 @@ const F = (e = {}) => {
|
|
|
266
284
|
height: e?.height || "400",
|
|
267
285
|
dataSource: {
|
|
268
286
|
chart: {
|
|
269
|
-
...
|
|
287
|
+
...P(e),
|
|
270
288
|
xAxisName: e?.xAxisName,
|
|
271
289
|
yAxisName: e?.yAxisName,
|
|
272
290
|
numberPrefix: t,
|
|
@@ -277,9 +295,10 @@ const F = (e = {}) => {
|
|
|
277
295
|
}
|
|
278
296
|
});
|
|
279
297
|
}
|
|
280
|
-
const
|
|
298
|
+
const i = Array.isArray(e?.graphData) ? e.graphData : [], d = i.map((r) => ({ label: r?.label || "" })), c = e.legendLabel || "Spend", o = i.map((r) => ({
|
|
281
299
|
value: r?.value,
|
|
282
|
-
toolText:
|
|
300
|
+
// 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'>${r?.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}${r?.value || ""}</b></div>`
|
|
283
302
|
}));
|
|
284
303
|
return h({
|
|
285
304
|
type: "scrollarea2d",
|
|
@@ -287,7 +306,7 @@ const F = (e = {}) => {
|
|
|
287
306
|
height: e?.height || "400",
|
|
288
307
|
dataSource: {
|
|
289
308
|
chart: {
|
|
290
|
-
...
|
|
309
|
+
...P(e),
|
|
291
310
|
xAxisName: e?.xAxisName,
|
|
292
311
|
yAxisName: e?.yAxisName,
|
|
293
312
|
numberPrefix: t,
|
|
@@ -302,12 +321,12 @@ const F = (e = {}) => {
|
|
|
302
321
|
anchorBgColor: "#FFFFFF",
|
|
303
322
|
anchorBorderColor: l,
|
|
304
323
|
anchorBorderThickness: "1",
|
|
305
|
-
data:
|
|
324
|
+
data: o
|
|
306
325
|
}
|
|
307
326
|
]
|
|
308
327
|
}
|
|
309
328
|
});
|
|
310
|
-
},
|
|
329
|
+
}, Z = (e = {}) => {
|
|
311
330
|
const t = e.graphData;
|
|
312
331
|
return h({
|
|
313
332
|
type: "stackedbar2d",
|
|
@@ -315,7 +334,7 @@ const F = (e = {}) => {
|
|
|
315
334
|
height: e.height || "400",
|
|
316
335
|
dataSource: {
|
|
317
336
|
chart: {
|
|
318
|
-
...
|
|
337
|
+
...I(e),
|
|
319
338
|
xAxisName: e.xAxisName,
|
|
320
339
|
yAxisName: e.yAxisName,
|
|
321
340
|
...e.plotToolText ? { plotToolText: e.plotToolText } : {}
|
|
@@ -324,7 +343,7 @@ const F = (e = {}) => {
|
|
|
324
343
|
dataset: t?.dataset || []
|
|
325
344
|
}
|
|
326
345
|
});
|
|
327
|
-
},
|
|
346
|
+
}, ee = (e = {}) => {
|
|
328
347
|
const t = e.graphData;
|
|
329
348
|
return h({
|
|
330
349
|
type: "sankey",
|
|
@@ -335,9 +354,12 @@ const F = (e = {}) => {
|
|
|
335
354
|
yAxisMaxValue: e.yAxisMaxValue,
|
|
336
355
|
theme: "fusion",
|
|
337
356
|
nodelabelposition: "start",
|
|
338
|
-
legendItemFontColor: "#2B2B2B",
|
|
339
|
-
nodeLabelFontColor: "#2B2B2B",
|
|
340
|
-
nodeLabelFont: "#2B2B2B",
|
|
357
|
+
// legendItemFontColor: "#2B2B2B",
|
|
358
|
+
// nodeLabelFontColor: "#2B2B2B",
|
|
359
|
+
// nodeLabelFont: "#2B2B2B",
|
|
360
|
+
legendItemFontColor: "#050505",
|
|
361
|
+
nodeLabelFontColor: "#050505",
|
|
362
|
+
nodeLabelFont: "#050505",
|
|
341
363
|
legendItemHoverFontColor: "#0a3ca2",
|
|
342
364
|
labelFontColor: "#0a3ca2",
|
|
343
365
|
nodeLabelFontSize: 9,
|
|
@@ -353,21 +375,21 @@ const F = (e = {}) => {
|
|
|
353
375
|
links: t?.links || []
|
|
354
376
|
}
|
|
355
377
|
});
|
|
356
|
-
},
|
|
357
|
-
const a = e.graphData?.data || [], s = a.reduce((
|
|
358
|
-
if (!
|
|
359
|
-
|
|
360
|
-
else if (
|
|
361
|
-
const [
|
|
362
|
-
|
|
378
|
+
}, te = (e = {}) => {
|
|
379
|
+
const a = e.graphData?.data || [], s = a.reduce((o, r) => o + (Number(r.value) || 0), 0), l = Math.round(s * 100) / 100, n = e.numberPrefix ?? "$", i = { ...e };
|
|
380
|
+
if (!i.defaultCenterLabel)
|
|
381
|
+
i.defaultCenterLabel = `Total{br}${n}${l}`;
|
|
382
|
+
else if (i.defaultCenterLabel.includes("{br}")) {
|
|
383
|
+
const [o] = i.defaultCenterLabel.split("{br}");
|
|
384
|
+
i.defaultCenterLabel = `${o}{br}${n}${l}`;
|
|
363
385
|
}
|
|
364
|
-
const d = (e.palettecolors ||
|
|
365
|
-
const g = Number(
|
|
386
|
+
const d = (e.palettecolors || $).split(",").map((o) => o.trim()), c = a.map((o, r) => {
|
|
387
|
+
const g = Number(o.value) || 0, u = l > 0 ? (g / l * 100).toFixed(2) : "0", b = o.color || d[r % d.length];
|
|
366
388
|
let m;
|
|
367
|
-
return e.plotToolText ? m = e.plotToolText.replace(/\$plotFillColor/g, b).replace(/\$color/g, b).replace(/\$label/g,
|
|
368
|
-
...
|
|
389
|
+
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}${g}`).replace(/\$percentValue/g, u).replace(/\$unformattedSum/g, String(l)).replace(/\$sum/g, `${n}${l}`) : m = `<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: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:${b};display:inline-block;margin-right:5px;color:#737373;'></span>${o.label}</label><b style='text-align:right;color:#050505;font-weight:500;font-size:10px;'>${n}${g}</b></div>`, {
|
|
390
|
+
...o,
|
|
369
391
|
color: b,
|
|
370
|
-
displayValue: `${n}${
|
|
392
|
+
displayValue: `${n}${o.value} (${u}%){br}${o.label}`,
|
|
371
393
|
toolText: m
|
|
372
394
|
};
|
|
373
395
|
});
|
|
@@ -376,11 +398,11 @@ const F = (e = {}) => {
|
|
|
376
398
|
width: e.width || "136",
|
|
377
399
|
height: e.height || "136",
|
|
378
400
|
dataSource: {
|
|
379
|
-
chart:
|
|
401
|
+
chart: W(i),
|
|
380
402
|
data: c
|
|
381
403
|
}
|
|
382
404
|
});
|
|
383
|
-
},
|
|
405
|
+
}, ae = (e = {}) => {
|
|
384
406
|
const t = e.graphData;
|
|
385
407
|
return h({
|
|
386
408
|
type: "multiaxisline",
|
|
@@ -393,7 +415,7 @@ const F = (e = {}) => {
|
|
|
393
415
|
axis: t?.axis || []
|
|
394
416
|
}
|
|
395
417
|
});
|
|
396
|
-
},
|
|
418
|
+
}, le = (e = {}) => {
|
|
397
419
|
const t = e.graphData;
|
|
398
420
|
return h({
|
|
399
421
|
type: "multilevelpie",
|
|
@@ -404,25 +426,25 @@ const F = (e = {}) => {
|
|
|
404
426
|
category: t?.data?.category
|
|
405
427
|
}
|
|
406
428
|
});
|
|
407
|
-
},
|
|
429
|
+
}, oe = (e = {}) => {
|
|
408
430
|
let t = [], a = [];
|
|
409
431
|
if (Array.isArray(e.graphData)) {
|
|
410
|
-
const
|
|
411
|
-
t =
|
|
432
|
+
const i = e.graphData;
|
|
433
|
+
t = i.map((d) => ({ label: d.label || "" })), a = [
|
|
412
434
|
{
|
|
413
435
|
seriesname: "Series 1",
|
|
414
|
-
data:
|
|
436
|
+
data: i.map((d) => ({ value: d.value }))
|
|
415
437
|
}
|
|
416
438
|
];
|
|
417
439
|
} else {
|
|
418
|
-
const
|
|
419
|
-
t =
|
|
440
|
+
const i = e.graphData;
|
|
441
|
+
t = i?.category || [], a = (i?.dataset || []).map((d) => ({
|
|
420
442
|
...d,
|
|
421
443
|
seriesname: d.seriesname || "Series",
|
|
422
444
|
data: d.data || []
|
|
423
445
|
}));
|
|
424
446
|
}
|
|
425
|
-
const s = y(e.numberPrefix), l = a.some((
|
|
447
|
+
const s = y(e.numberPrefix), l = a.some((i) => !!i.color), n = {
|
|
426
448
|
...k(e),
|
|
427
449
|
bgColor: e.bgColor || "#ffffff",
|
|
428
450
|
xAxisName: e.xAxisName,
|
|
@@ -438,10 +460,10 @@ const F = (e = {}) => {
|
|
|
438
460
|
skipOverlapLabels: "0",
|
|
439
461
|
numberPrefix: s,
|
|
440
462
|
numVDivLines: e.numVDivLines || "5",
|
|
441
|
-
palettecolors: l ? void 0 :
|
|
463
|
+
palettecolors: l ? void 0 : N(e.palettecolors),
|
|
442
464
|
maxLabelHeight: e.maxLabelHeight,
|
|
443
465
|
numbersuffix: e.numbersuffix || "",
|
|
444
|
-
labelStep:
|
|
466
|
+
labelStep: p(t.length, e.labelStep),
|
|
445
467
|
numVisiblePlot: e.numVisiblePlot || "8",
|
|
446
468
|
scrollShowButtons: "0",
|
|
447
469
|
scrollColor: "#CCCCCC",
|
|
@@ -460,10 +482,14 @@ const F = (e = {}) => {
|
|
|
460
482
|
dataset: a
|
|
461
483
|
}
|
|
462
484
|
});
|
|
463
|
-
},
|
|
464
|
-
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).some((
|
|
465
|
-
...
|
|
466
|
-
plotToolText:
|
|
485
|
+
}, ie = (e = {}) => {
|
|
486
|
+
const t = e.graphLabel ? "" : y(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:#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
|
+
...i,
|
|
488
|
+
// plotToolText: props.plotToolText || (
|
|
489
|
+
// index === 0
|
|
490
|
+
// ? "<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
|
|
491
|
+
// : "<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
|
+
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)
|
|
467
493
|
}));
|
|
468
494
|
return h({
|
|
469
495
|
type: "scrollstackedcolumn2d",
|
|
@@ -472,7 +498,7 @@ const F = (e = {}) => {
|
|
|
472
498
|
height: e.height || "400",
|
|
473
499
|
dataSource: {
|
|
474
500
|
chart: {
|
|
475
|
-
...
|
|
501
|
+
...z(e),
|
|
476
502
|
yAxisMaxValue: e.yAxisMaxValue,
|
|
477
503
|
xAxisName: e.xAxisName,
|
|
478
504
|
yAxisName: e.yAxisName,
|
|
@@ -481,10 +507,10 @@ const F = (e = {}) => {
|
|
|
481
507
|
interactiveLegend: e.interactiveLegend || "1",
|
|
482
508
|
drawCrossLine: e.drawCrossLine || "1",
|
|
483
509
|
bgColor: e.bgColor || "#ffffff",
|
|
484
|
-
palettecolors: s ? void 0 : e.palettecolors ||
|
|
510
|
+
palettecolors: s ? void 0 : e.palettecolors || $,
|
|
485
511
|
numberPrefix: t,
|
|
486
512
|
numVDivLines: e.numVDivLines || "5",
|
|
487
|
-
labelStep:
|
|
513
|
+
labelStep: p(a?.category?.length, e.labelStep),
|
|
488
514
|
showSum: e.showSum ? "1" : void 0,
|
|
489
515
|
numVisiblePlot: e.numVisiblePlot || "6",
|
|
490
516
|
scrollShowButtons: "0",
|
|
@@ -497,9 +523,9 @@ const F = (e = {}) => {
|
|
|
497
523
|
dataset: n
|
|
498
524
|
}
|
|
499
525
|
});
|
|
500
|
-
},
|
|
501
|
-
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).some((c) => !!c.color), l = (e.palettecolors ||
|
|
502
|
-
const r = c.color || l[
|
|
526
|
+
}, ne = (e = {}) => {
|
|
527
|
+
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, s = (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) => {
|
|
528
|
+
const r = c.color || l[o % l.length], g = c.data || [];
|
|
503
529
|
return {
|
|
504
530
|
...c,
|
|
505
531
|
color: r,
|
|
@@ -508,15 +534,16 @@ const F = (e = {}) => {
|
|
|
508
534
|
const m = n[b]?.label || "";
|
|
509
535
|
if (e.plotToolText)
|
|
510
536
|
return { ...u };
|
|
511
|
-
if (
|
|
537
|
+
if (o > 0)
|
|
512
538
|
return { ...u, toolText: " " };
|
|
513
|
-
const
|
|
514
|
-
const
|
|
515
|
-
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
|
|
539
|
+
const f = i.map((w, v) => {
|
|
540
|
+
const C = w.color || l[v % l.length], D = (w.data || [])[b]?.value ?? "", S = w.seriesname || "", A = w.tooltipPrefix !== void 0 ? w.tooltipPrefix : t;
|
|
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>${S}</label><b style='text-align:right;color:#050505;font-weight:500;font-size:10px;'>${A}${D}</b></div>`;
|
|
516
542
|
}).join("");
|
|
517
543
|
return {
|
|
518
544
|
...u,
|
|
519
|
-
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>${
|
|
545
|
+
// 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'>${m}</div>${f}`
|
|
520
547
|
};
|
|
521
548
|
})
|
|
522
549
|
};
|
|
@@ -528,21 +555,21 @@ const F = (e = {}) => {
|
|
|
528
555
|
height: e.height || "400",
|
|
529
556
|
dataSource: {
|
|
530
557
|
chart: {
|
|
531
|
-
...
|
|
558
|
+
...R(e),
|
|
532
559
|
yAxisMaxValue: e.yAxisMaxValue,
|
|
533
560
|
xAxisName: e.xAxisName,
|
|
534
561
|
yAxisName: e.yAxisName,
|
|
535
562
|
pYAxisName: e.pYAxisName,
|
|
536
563
|
sYAxisName: e.sYAxisName,
|
|
537
564
|
numberPrefix: t,
|
|
538
|
-
labelStep:
|
|
539
|
-
palettecolors: s ? void 0 : e.palettecolors ||
|
|
565
|
+
labelStep: p(n.length, e.labelStep),
|
|
566
|
+
palettecolors: s ? void 0 : e.palettecolors || $
|
|
540
567
|
},
|
|
541
568
|
categories: [{ category: n }],
|
|
542
569
|
dataset: d
|
|
543
570
|
}
|
|
544
571
|
});
|
|
545
|
-
},
|
|
572
|
+
}, se = (e = {}) => {
|
|
546
573
|
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, s = a?.category || [], l = a?.dataset || [];
|
|
547
574
|
return h({
|
|
548
575
|
type: "scrollline2d",
|
|
@@ -550,7 +577,7 @@ const F = (e = {}) => {
|
|
|
550
577
|
height: e?.height || "400",
|
|
551
578
|
dataSource: {
|
|
552
579
|
chart: {
|
|
553
|
-
...
|
|
580
|
+
...F(e),
|
|
554
581
|
xAxisName: e?.xAxisName,
|
|
555
582
|
yAxisName: e?.yAxisName,
|
|
556
583
|
numberPrefix: t,
|
|
@@ -564,7 +591,7 @@ const F = (e = {}) => {
|
|
|
564
591
|
flatScrollBars: "1",
|
|
565
592
|
scrollPadding: "5",
|
|
566
593
|
numDivLines: "5",
|
|
567
|
-
labelStep:
|
|
594
|
+
labelStep: p(s.length, e?.labelStep),
|
|
568
595
|
...e?.plotToolText ? { plotToolText: e.plotToolText } : {},
|
|
569
596
|
...e?.chartConfig || {}
|
|
570
597
|
},
|
|
@@ -572,26 +599,26 @@ const F = (e = {}) => {
|
|
|
572
599
|
dataset: l
|
|
573
600
|
}
|
|
574
601
|
});
|
|
575
|
-
},
|
|
576
|
-
area:
|
|
577
|
-
bar2d:
|
|
578
|
-
column2d:
|
|
579
|
-
doughnutChart:
|
|
580
|
-
groupChart:
|
|
581
|
-
line:
|
|
582
|
-
msCombiDy2d:
|
|
583
|
-
multiAxisLineChart:
|
|
584
|
-
multilevelpie:
|
|
585
|
-
multipleLineChart:
|
|
586
|
-
sankey:
|
|
587
|
-
scrollArea:
|
|
588
|
-
scrollColumn2d:
|
|
589
|
-
scrollLine2d:
|
|
590
|
-
scrollStackedColumn2d:
|
|
591
|
-
stackBarChart:
|
|
592
|
-
stackedArea:
|
|
593
|
-
stackedcolumn2d:
|
|
594
|
-
},
|
|
602
|
+
}, re = {
|
|
603
|
+
area: G,
|
|
604
|
+
bar2d: V,
|
|
605
|
+
column2d: V,
|
|
606
|
+
doughnutChart: te,
|
|
607
|
+
groupChart: K,
|
|
608
|
+
line: U,
|
|
609
|
+
msCombiDy2d: ne,
|
|
610
|
+
multiAxisLineChart: ae,
|
|
611
|
+
multilevelpie: le,
|
|
612
|
+
multipleLineChart: q,
|
|
613
|
+
sankey: ee,
|
|
614
|
+
scrollArea: Q,
|
|
615
|
+
scrollColumn2d: oe,
|
|
616
|
+
scrollLine2d: se,
|
|
617
|
+
scrollStackedColumn2d: ie,
|
|
618
|
+
stackBarChart: Z,
|
|
619
|
+
stackedArea: J,
|
|
620
|
+
stackedcolumn2d: X
|
|
621
|
+
}, ge = (e = {}) => e.chartType ? re[e.chartType]?.(e) ?? null : null;
|
|
595
622
|
export {
|
|
596
|
-
|
|
623
|
+
ge as buildChartConfig
|
|
597
624
|
};
|