@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.
- package/dist/DropdownFooter-CsDll1Tj.js +96 -0
- package/dist/{Grow-D08Iq1uH.js → Grow-wzNsNKt2.js} +41 -41
- package/dist/IconSlot-DvUwY6Do.js +33 -0
- package/dist/{OptionList-DN1xZbnV.js → OptionList-BM4AleXV.js} +361 -290
- package/dist/{Select-Cw96VEHD.js → Select-CiuwMSD7.js} +2366 -2427
- package/dist/assets/DropdownFooter-JrU15UnN.css +1 -0
- package/dist/assets/IconSlot-BWv5PQN_.css +1 -0
- package/dist/assets/ReactToastify-GNLSjkBZ.css +1 -0
- package/dist/assets/{ToastContent-PGkBxPUW.css → ToastContent-DpF5zCks.css} +1 -1
- package/dist/assets/index-0R9p-l95.css +1 -0
- package/dist/assets/index-B3yBTtVQ.css +1 -0
- package/dist/assets/index-BbJZjGLb.css +1 -0
- package/dist/assets/{main-Dv8QUU_o.css → main-3OqLSdPm.css} +1 -1
- package/dist/assets/{styles-Chhklrps.css → styles-C5uYY4fL.css} +1 -1
- package/dist/assets/styles-CEyiQgVQ.css +1 -0
- package/dist/components/CKButton/_helper/ComboLayout.js +1 -1
- package/dist/components/CKButton/_helper/IconSlot.js +1 -1
- package/dist/components/CKButton/_helper/StandardLayout.js +1 -1
- package/dist/components/CKButton/index.js +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +703 -680
- package/dist/components/EmptyState/index.js +7 -7
- package/dist/components/FusionChart/_config/builders.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/builders.js +207 -192
- package/dist/components/FusionChart/_config/helpers.d.ts +3 -0
- package/dist/components/FusionChart/_config/helpers.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/helpers.js +61 -45
- package/dist/components/FusionChart/_types/fusionChart.types.d.ts +2 -0
- package/dist/components/FusionChart/_types/fusionChart.types.d.ts.map +1 -1
- package/dist/components/FusionChart/_utils/chartHelpers.js +1 -1
- package/dist/components/FusionChart/index.d.ts.map +1 -1
- package/dist/components/FusionChart/index.js +163 -130
- package/dist/components/MenuOptions/_utils/computeMenuPosition.js +1 -1
- package/dist/components/MenuOptions/_utils/computeSubmenuPosition.js +1 -1
- package/dist/components/MetricCards/Component/CardWithIconAndForecast/index.js +30 -30
- package/dist/components/MultiSelect/SimpleMultiSelect.d.ts +3 -1
- package/dist/components/MultiSelect/SimpleMultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/SimpleMultiSelect.js +150 -136
- package/dist/components/MultiSelect/_helpers/DropdownFooter.js +1 -1
- package/dist/components/MultiSelect/_helpers/OptionRow.js +1 -1
- package/dist/components/MultiSelect/_helpers/OverflowMenu.js +1 -1
- package/dist/components/MultiSelect/_helpers/OverflowMenuItem.js +1 -1
- package/dist/components/MultiSelect/_helpers/SearchResult.d.ts +1 -1
- package/dist/components/MultiSelect/_helpers/SearchResult.d.ts.map +1 -1
- package/dist/components/MultiSelect/_helpers/SearchResult.js +31 -21
- package/dist/components/MultiSelect/_helpers/TagContent.js +1 -1
- package/dist/components/MultiSelect/_helpers/TriggerButton.d.ts.map +1 -1
- package/dist/components/MultiSelect/_helpers/TriggerButton.js +95 -74
- package/dist/components/MultiSelect/_types/type.d.ts +6 -2
- package/dist/components/MultiSelect/_types/type.d.ts.map +1 -1
- package/dist/components/MultiSelect/_utils/useDropdownDirection.d.ts +18 -0
- package/dist/components/MultiSelect/_utils/useDropdownDirection.d.ts.map +1 -0
- package/dist/components/MultiSelect/_utils/useDropdownDirection.js +23 -0
- package/dist/components/MultiSelect/index.d.ts +1 -1
- package/dist/components/MultiSelect/index.d.ts.map +1 -1
- package/dist/components/MultiSelect/index.js +162 -151
- package/dist/components/PopupAndDialogBox/components/DialogContent.js +1 -1
- package/dist/components/PopupAndDialogBox/components/DialogFooter.js +1 -1
- package/dist/components/PopupAndDialogBox/components/DialogHeader.js +1 -1
- package/dist/components/PopupAndDialogBox/index.js +1 -1
- package/dist/components/Search/index.d.ts.map +1 -1
- package/dist/components/Search/index.js +63 -61
- package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +3 -3
- package/dist/components/SingleSelectDropdown/index.d.ts.map +1 -1
- package/dist/components/SingleSelectDropdown/index.js +83 -78
- package/dist/components/Table/_helpers/ColumnManager/index.js +3 -3
- package/dist/components/Table/_helpers/GroupedHeader/index.js +1 -1
- package/dist/components/Table/_helpers/TableFilterModal/OptionList.js +1 -1
- package/dist/components/Table/_helpers/TableFilterModal/RangeSelector.js +133 -142
- package/dist/components/Table/_helpers/TableFilterModal/index.js +1 -1
- package/dist/components/Table/_helpers/TableRows.js +1 -1
- package/dist/components/Table/index.js +2 -2
- package/dist/components/TextField/index.js +331 -328
- package/dist/components/Toast/_helper/ToastContent.js +25 -25
- package/dist/components/Toast/_helper/ToastProvider.js +9 -9
- package/dist/components/Toast/_hooks/useToast.js +1 -1
- package/dist/components/Tooltip/index.js +772 -697
- package/dist/createSimplePaletteValueFilter-BqxST_wX.js +24 -0
- package/dist/index-BR6M9zUI.js +382 -0
- package/dist/{index-f7TB87Mf.js → index-Bcvmezbu.js} +23 -3
- package/dist/main.js +1 -1
- package/dist/styles.module-yIHBMSTk.js +53 -0
- package/dist/styles.module-yNDMDNO-.js +14 -0
- package/dist/{useSlot-ylt7_lTY.js → useSlot-BiMlGawc.js} +656 -623
- package/package.json +3 -3
- package/dist/DropdownFooter-Dm6aLDx8.js +0 -89
- package/dist/IconSlot-CPQsGPB-.js +0 -33
- package/dist/assets/DropdownFooter-DjdPf69A.css +0 -1
- package/dist/assets/IconSlot-D8WWEHKb.css +0 -1
- package/dist/assets/ReactToastify-tlSLHgLC.css +0 -1
- package/dist/assets/index-B81zpOpq.css +0 -1
- package/dist/assets/index-DNhNBxL9.css +0 -1
- package/dist/assets/index-YHUWVH17.css +0 -1
- package/dist/assets/styles-Bj-7zn37.css +0 -1
- package/dist/contains-kLLEGdNH.js +0 -41
- package/dist/index-C8cPPHJD.js +0 -1196
- package/dist/styles.module-BZaUJMlf.js +0 -14
- package/dist/styles.module-DakCndIP.js +0 -42
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { EXTENDED_PALETTE as $, DEFAULT_WIDTH as
|
|
2
|
-
import { getBaseConfig as
|
|
3
|
-
import { getCurrencyPrefix 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 x =
|
|
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
|
-
...
|
|
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'>${
|
|
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
|
-
}),
|
|
13
|
-
...
|
|
12
|
+
}), i = {
|
|
13
|
+
...P(e),
|
|
14
14
|
bgColor: e.bgColor || "#ffffff",
|
|
15
|
-
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:
|
|
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 :
|
|
28
|
+
palettecolors: s ? void 0 : L(e.palettecolors),
|
|
29
29
|
maxLabelHeight: e.maxLabelHeight,
|
|
30
30
|
numbersuffix: e.numbersuffix || ""
|
|
31
|
-
}, r = e.graphData,
|
|
32
|
-
chart:
|
|
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
|
|
37
|
-
type:
|
|
38
|
-
width:
|
|
36
|
+
return h({
|
|
37
|
+
type: K(e),
|
|
38
|
+
width: g,
|
|
39
39
|
height: e.height || "300",
|
|
40
|
-
dataSource:
|
|
40
|
+
dataSource: d
|
|
41
41
|
});
|
|
42
|
-
},
|
|
42
|
+
}, X = (e = {}) => h({
|
|
43
43
|
type: "area2d",
|
|
44
|
-
width:
|
|
44
|
+
width: g,
|
|
45
45
|
height: "550",
|
|
46
46
|
dataSource: {
|
|
47
47
|
chart: {
|
|
48
|
-
...
|
|
48
|
+
...P({ ...e, decimals: "2" }),
|
|
49
49
|
xAxisName: e.xAxisName,
|
|
50
50
|
yAxisName: e.yAxisName,
|
|
51
51
|
labelFontSize: 12,
|
|
52
|
-
plotToolText: `<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
|
-
}),
|
|
57
|
-
const t =
|
|
58
|
-
...
|
|
59
|
-
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${
|
|
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
|
|
61
|
+
return h({
|
|
62
62
|
type: "line",
|
|
63
|
-
width: e?.width ||
|
|
63
|
+
width: e?.width || g,
|
|
64
64
|
height: e?.height || "300",
|
|
65
65
|
dataSource: {
|
|
66
66
|
chart: {
|
|
67
|
-
...
|
|
67
|
+
...j(e),
|
|
68
68
|
xAxisName: e?.xAxisName,
|
|
69
69
|
yAxisName: e?.yAxisName,
|
|
70
|
-
labelStep:
|
|
70
|
+
labelStep: f(t.length, void 0),
|
|
71
71
|
...e?.chartConfig || {}
|
|
72
72
|
},
|
|
73
|
-
data:
|
|
73
|
+
data: s.length > 0 ? s : e?.graphData || []
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
76
|
}, J = (e = {}) => {
|
|
77
|
-
let t =
|
|
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((
|
|
80
|
-
...
|
|
81
|
-
plotToolText:
|
|
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
|
|
83
|
+
return h({
|
|
84
84
|
type: "mscolumn2d",
|
|
85
85
|
key: e.key,
|
|
86
|
-
width: e.width ||
|
|
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:
|
|
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 ? "" :
|
|
107
|
-
...
|
|
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'><
|
|
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
|
|
110
|
+
return h({
|
|
111
111
|
type: e.hideScroll ? "stackedcolumn2d" : "scrollstackedcolumn2d",
|
|
112
112
|
key: e.key,
|
|
113
|
-
width: e.width ||
|
|
113
|
+
width: e.width || g,
|
|
114
114
|
height: e.height || "400",
|
|
115
115
|
dataSource: {
|
|
116
116
|
chart: {
|
|
117
|
-
...
|
|
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:
|
|
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:
|
|
134
|
+
dataset: n
|
|
135
135
|
}
|
|
136
136
|
});
|
|
137
|
-
},
|
|
138
|
-
const t = e.graphLabel ? "" :
|
|
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:
|
|
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
|
|
146
|
+
return h({
|
|
147
147
|
type: "msline",
|
|
148
148
|
key: e.key,
|
|
149
|
-
width: e.width ||
|
|
149
|
+
width: e.width || g,
|
|
150
150
|
height: e.height || "400",
|
|
151
151
|
dataSource: {
|
|
152
152
|
chart: {
|
|
153
|
-
...
|
|
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:
|
|
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
|
-
},
|
|
169
|
-
const t = e.graphLabel ? "" :
|
|
170
|
-
const x =
|
|
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
|
-
...
|
|
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
|
-
|
|
181
|
-
|
|
182
|
-
|
|
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
|
-
...
|
|
187
|
+
...b,
|
|
185
188
|
alpha: "60",
|
|
186
189
|
toolText: " "
|
|
187
190
|
};
|
|
188
|
-
const
|
|
189
|
-
const
|
|
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
|
|
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
|
-
...
|
|
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'>${
|
|
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
|
|
203
|
+
return h({
|
|
201
204
|
type: "stackedarea2d",
|
|
202
205
|
key: e.key,
|
|
203
|
-
width: e.width ||
|
|
206
|
+
width: e.width || g,
|
|
204
207
|
height: e.height || "400",
|
|
205
208
|
dataSource: {
|
|
206
209
|
chart: {
|
|
207
|
-
...
|
|
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:
|
|
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
|
-
},
|
|
224
|
-
const t =
|
|
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
|
|
227
|
-
const
|
|
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
|
-
...
|
|
230
|
-
color:
|
|
232
|
+
...m,
|
|
233
|
+
color: w,
|
|
231
234
|
anchorRadius: "3",
|
|
232
235
|
anchorBgColor: "#FFFFFF",
|
|
233
|
-
anchorBorderColor:
|
|
236
|
+
anchorBorderColor: w,
|
|
234
237
|
anchorBorderThickness: "1",
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
return
|
|
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
|
-
...
|
|
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>${
|
|
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
|
|
256
|
+
return h({
|
|
251
257
|
type: "scrollarea2d",
|
|
252
|
-
width: e?.width ||
|
|
258
|
+
width: e?.width || g,
|
|
253
259
|
height: e?.height || "400",
|
|
254
260
|
dataSource: {
|
|
255
261
|
chart: {
|
|
256
|
-
...
|
|
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:
|
|
269
|
+
dataset: b
|
|
264
270
|
}
|
|
265
271
|
});
|
|
266
272
|
}
|
|
267
|
-
const
|
|
268
|
-
value:
|
|
269
|
-
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${
|
|
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
|
|
277
|
+
return h({
|
|
272
278
|
type: "scrollarea2d",
|
|
273
|
-
width: e?.width ||
|
|
279
|
+
width: e?.width || g,
|
|
274
280
|
height: e?.height || "400",
|
|
275
281
|
dataSource: {
|
|
276
282
|
chart: {
|
|
277
|
-
...
|
|
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:
|
|
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:
|
|
298
|
+
data: o
|
|
293
299
|
}
|
|
294
300
|
]
|
|
295
301
|
}
|
|
296
302
|
});
|
|
297
|
-
},
|
|
303
|
+
}, ae = (e = {}) => {
|
|
298
304
|
const t = e.graphData;
|
|
299
|
-
return
|
|
305
|
+
return h({
|
|
300
306
|
type: "stackedbar2d",
|
|
301
|
-
width:
|
|
307
|
+
width: g,
|
|
302
308
|
height: e.height || "400",
|
|
303
309
|
dataSource: {
|
|
304
310
|
chart: {
|
|
305
|
-
...
|
|
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
|
-
},
|
|
320
|
+
}, le = (e = {}) => {
|
|
314
321
|
const t = e.graphData;
|
|
315
|
-
return
|
|
322
|
+
return h({
|
|
316
323
|
type: "sankey",
|
|
317
|
-
width:
|
|
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
|
-
},
|
|
342
|
-
const a = e.graphData?.data || [], s = a.reduce((
|
|
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}${
|
|
352
|
+
i.defaultCenterLabel = `Total{br}${n}${l}`;
|
|
345
353
|
else if (i.defaultCenterLabel.includes("{br}")) {
|
|
346
|
-
const [
|
|
347
|
-
i.defaultCenterLabel = `${
|
|
354
|
+
const [o] = i.defaultCenterLabel.split("{br}");
|
|
355
|
+
i.defaultCenterLabel = `${o}{br}${n}${l}`;
|
|
348
356
|
}
|
|
349
|
-
const
|
|
350
|
-
const
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
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
|
|
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:
|
|
373
|
+
data: d
|
|
364
374
|
}
|
|
365
375
|
});
|
|
366
|
-
},
|
|
376
|
+
}, oe = (e = {}) => {
|
|
367
377
|
const t = e.graphData;
|
|
368
|
-
return
|
|
378
|
+
return h({
|
|
369
379
|
type: "multiaxisline",
|
|
370
380
|
key: e.key,
|
|
371
|
-
width: e.width ||
|
|
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
|
-
},
|
|
389
|
+
}, ne = (e = {}) => {
|
|
380
390
|
const t = e.graphData;
|
|
381
|
-
return
|
|
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
|
-
},
|
|
400
|
+
}, se = (e = {}) => {
|
|
391
401
|
let t = [], a = [];
|
|
392
402
|
if (Array.isArray(e.graphData)) {
|
|
393
|
-
const
|
|
394
|
-
t =
|
|
403
|
+
const i = e.graphData;
|
|
404
|
+
t = i.map((r) => ({ label: r.label || "" })), a = [
|
|
395
405
|
{
|
|
396
406
|
seriesname: "Series 1",
|
|
397
|
-
data:
|
|
407
|
+
data: i.map((r) => ({ value: r.value }))
|
|
398
408
|
}
|
|
399
409
|
];
|
|
400
410
|
} else {
|
|
401
|
-
const
|
|
402
|
-
t =
|
|
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 =
|
|
409
|
-
...
|
|
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 :
|
|
434
|
+
palettecolors: l ? void 0 : L(e.palettecolors),
|
|
425
435
|
maxLabelHeight: e.maxLabelHeight,
|
|
426
436
|
numbersuffix: e.numbersuffix || "",
|
|
427
|
-
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
|
|
446
|
+
return h({
|
|
436
447
|
type: "scrollcolumn2d",
|
|
437
|
-
width: e.width ||
|
|
448
|
+
width: e.width || g,
|
|
438
449
|
height: e.height || "400",
|
|
439
450
|
dataSource: {
|
|
440
|
-
chart:
|
|
451
|
+
chart: n,
|
|
441
452
|
categories: [{ category: t }],
|
|
442
453
|
dataset: a
|
|
443
454
|
}
|
|
444
455
|
});
|
|
445
|
-
},
|
|
446
|
-
const t = e.graphLabel ? "" :
|
|
447
|
-
...
|
|
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'><
|
|
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
|
|
461
|
+
return h({
|
|
451
462
|
type: "scrollstackedcolumn2d",
|
|
452
463
|
key: e.key,
|
|
453
|
-
width: e.width ||
|
|
464
|
+
width: e.width || g,
|
|
454
465
|
height: e.height || "400",
|
|
455
466
|
dataSource: {
|
|
456
467
|
chart: {
|
|
457
|
-
...
|
|
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:
|
|
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:
|
|
490
|
+
dataset: n
|
|
480
491
|
}
|
|
481
492
|
});
|
|
482
|
-
},
|
|
483
|
-
const t = e.graphLabel ? "" :
|
|
484
|
-
const
|
|
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
|
-
...
|
|
487
|
-
color:
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
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:
|
|
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
|
|
515
|
+
return h({
|
|
504
516
|
type: "mscombidy2d",
|
|
505
517
|
key: e.key,
|
|
506
|
-
width: e.width ||
|
|
518
|
+
width: e.width || g,
|
|
507
519
|
height: e.height || "400",
|
|
508
520
|
dataSource: {
|
|
509
521
|
chart: {
|
|
510
|
-
...
|
|
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:
|
|
529
|
+
labelStep: f(n.length, e.labelStep),
|
|
516
530
|
palettecolors: s ? void 0 : e.palettecolors || $
|
|
517
531
|
},
|
|
518
|
-
categories: [{ category:
|
|
532
|
+
categories: [{ category: n }],
|
|
519
533
|
dataset: r
|
|
520
534
|
}
|
|
521
535
|
});
|
|
522
536
|
}, ce = (e = {}) => {
|
|
523
|
-
const t = e.graphLabel ? "" :
|
|
524
|
-
return
|
|
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 ||
|
|
540
|
+
width: e?.width || g,
|
|
527
541
|
height: e?.height || "400",
|
|
528
542
|
dataSource: {
|
|
529
543
|
chart: {
|
|
530
|
-
...
|
|
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:
|
|
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
|
-
},
|
|
552
|
-
area:
|
|
553
|
-
bar2d:
|
|
554
|
-
column2d:
|
|
555
|
-
doughnutChart:
|
|
566
|
+
}, he = {
|
|
567
|
+
area: X,
|
|
568
|
+
bar2d: M,
|
|
569
|
+
column2d: M,
|
|
570
|
+
doughnutChart: ie,
|
|
556
571
|
groupChart: J,
|
|
557
|
-
line:
|
|
558
|
-
msCombiDy2d:
|
|
559
|
-
multiAxisLineChart:
|
|
560
|
-
multilevelpie:
|
|
561
|
-
multipleLineChart:
|
|
562
|
-
sankey:
|
|
563
|
-
scrollArea:
|
|
564
|
-
scrollColumn2d:
|
|
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:
|
|
567
|
-
stackBarChart:
|
|
568
|
-
stackedArea:
|
|
581
|
+
scrollStackedColumn2d: re,
|
|
582
|
+
stackBarChart: ae,
|
|
583
|
+
stackedArea: ee,
|
|
569
584
|
stackedcolumn2d: Q
|
|
570
|
-
},
|
|
585
|
+
}, ue = (e = {}) => e.chartType ? he[e.chartType]?.(e) ?? null : null;
|
|
571
586
|
export {
|
|
572
|
-
|
|
587
|
+
ue as buildChartConfig
|
|
573
588
|
};
|