@ck-ui/component-library 1.0.2 → 1.0.4
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-B63OOZOS.js +96 -0
- package/dist/assets/{DropdownFooter-JrU15UnN.css → DropdownFooter-tfY7sg47.css} +1 -1
- package/dist/assets/index-DyCyrZSK.css +1 -0
- package/dist/assets/{styles-CEyiQgVQ.css → styles-Nuwxl0ex.css} +1 -1
- package/dist/components/FusionChart/_config/builders.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/builders.js +145 -136
- package/dist/components/FusionChart/_config/events.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/events.js +37 -23
- package/dist/components/FusionChart/_config/helpers.js +4 -4
- package/dist/components/FusionChart/_types/fusionChart.types.d.ts +7 -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 +733 -711
- package/dist/components/MultiSelect/SimpleMultiSelect.js +1 -1
- 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.js +1 -1
- package/dist/components/MultiSelect/_helpers/TagContent.js +1 -1
- package/dist/components/MultiSelect/_helpers/TriggerButton.js +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +1 -1
- package/dist/components/SingleSelectDropdown/index.js +1 -1
- package/dist/components/Table/_types/table.types.d.ts +10 -0
- package/dist/components/Table/_types/table.types.d.ts.map +1 -1
- package/dist/components/Table/index.d.ts +1 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +266 -252
- package/dist/styles.module-CdFoY0cE.js +53 -0
- package/package.json +1 -1
- package/dist/DropdownFooter-CsDll1Tj.js +0 -96
- package/dist/assets/index-B3yBTtVQ.css +0 -1
- package/dist/styles.module-yIHBMSTk.js +0 -53
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { EXTENDED_PALETTE as
|
|
2
|
-
import { getBaseConfig as h, getStackedColumnChartShell 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
|
|
1
|
+
import { EXTENDED_PALETTE as B, DEFAULT_WIDTH as x, STACKED_AREA_PALETTE as H } from "../_constant/constants.js";
|
|
2
|
+
import { getBaseConfig as h, getStackedColumnChartShell as M, getStackedAreaChartShell as R, getStackedBarChartShell as O, getLineChartShell as j, getCommonChartShell as k, getScrollAreaChartShell as V, getMultipleLineChartShell as W, getMsCombiDy2dChartShell as Y, getGroupChartShell as _, getDoughnutChartShell as G } from "./helpers.js";
|
|
3
|
+
import { getCurrencyPrefix as y, getLabelStep as w, getCartesianPalette as L, getCurrencySymbol as E, getGraphDataLength as U, getBarType as K } from "../_utils/chartHelpers.js";
|
|
4
|
+
const F = (e = {}) => {
|
|
5
|
+
const t = e.plotSpacePercent ?? (e.plotSpacePercent === 0 ? e.plotSpacePercent : 60), a = Array.isArray(e.graphData) ? e.graphData : [], s = a.some((i) => !!i.color), l = L(e?.palettecolors)?.split(",")?.map((i) => i?.trim()), n = a?.map((i, r) => {
|
|
6
|
+
const g = i?.color || l[r % l.length];
|
|
7
7
|
return {
|
|
8
|
-
...
|
|
9
|
-
color:
|
|
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'>${
|
|
8
|
+
...i,
|
|
9
|
+
color: g,
|
|
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'>${i.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:10px;height:10px;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;'>${i.label || ""}</label></span><b style='text-align:right;'>${y(e.numberPrefix)}${i.value || ""}</b></div>`
|
|
11
11
|
};
|
|
12
|
-
}),
|
|
13
|
-
...
|
|
12
|
+
}), o = {
|
|
13
|
+
...k(e),
|
|
14
14
|
bgColor: e.bgColor || "#ffffff",
|
|
15
|
-
labelStep:
|
|
15
|
+
labelStep: w(U(e), e.labelStep),
|
|
16
16
|
xAxisName: e.xAxisName,
|
|
17
17
|
yAxisName: e.yAxisName,
|
|
18
18
|
chartBottomMargin: e.chartBottomMargin,
|
|
@@ -23,29 +23,29 @@ const M = (e = {}) => {
|
|
|
23
23
|
showValues: e.showValues || "0",
|
|
24
24
|
showLabels: e.showLabels || "1",
|
|
25
25
|
skipOverlapLabels: "0",
|
|
26
|
-
numberPrefix:
|
|
26
|
+
numberPrefix: y(e.numberPrefix),
|
|
27
27
|
// When per-item colors are set, don't use palettecolors (it overrides item colors)
|
|
28
28
|
palettecolors: s ? void 0 : L(e.palettecolors),
|
|
29
29
|
maxLabelHeight: e.maxLabelHeight,
|
|
30
30
|
numbersuffix: e.numbersuffix || ""
|
|
31
|
-
},
|
|
32
|
-
chart:
|
|
33
|
-
categories:
|
|
34
|
-
dataset:
|
|
31
|
+
}, d = e.graphData, c = e?.hideScroll ? { chart: o, data: n?.length > 0 ? n : e?.graphData || [] } : {
|
|
32
|
+
chart: o,
|
|
33
|
+
categories: d?.categories,
|
|
34
|
+
dataset: d?.dataset
|
|
35
35
|
};
|
|
36
36
|
return h({
|
|
37
37
|
type: K(e),
|
|
38
|
-
width:
|
|
38
|
+
width: x,
|
|
39
39
|
height: e.height || "300",
|
|
40
|
-
dataSource:
|
|
40
|
+
dataSource: c
|
|
41
41
|
});
|
|
42
42
|
}, X = (e = {}) => h({
|
|
43
43
|
type: "area2d",
|
|
44
|
-
width:
|
|
44
|
+
width: x,
|
|
45
45
|
height: "550",
|
|
46
46
|
dataSource: {
|
|
47
47
|
chart: {
|
|
48
|
-
...
|
|
48
|
+
...k({ ...e, decimals: "2" }),
|
|
49
49
|
xAxisName: e.xAxisName,
|
|
50
50
|
yAxisName: e.yAxisName,
|
|
51
51
|
labelFontSize: 12,
|
|
@@ -54,36 +54,43 @@ const M = (e = {}) => {
|
|
|
54
54
|
data: e.graphData || []
|
|
55
55
|
}
|
|
56
56
|
}), q = (e = {}) => {
|
|
57
|
-
const t = Array.isArray(e?.graphData) ? e.graphData : [], a =
|
|
58
|
-
...
|
|
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'>${
|
|
57
|
+
const t = Array.isArray(e?.graphData) ? e.graphData : [], a = y(e?.numberPrefix), s = (e?.palettecolors || "#8ECFFF").split(",")[0].trim(), l = t?.map((n) => ({
|
|
58
|
+
...n,
|
|
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'>${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:10px;height:10px;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;'>${n?.label || ""}</label></span><b style='text-align:right;'>${a}${n?.value || ""}</b></div>`
|
|
60
60
|
}));
|
|
61
61
|
return h({
|
|
62
62
|
type: "line",
|
|
63
|
-
width: e?.width ||
|
|
63
|
+
width: e?.width || x,
|
|
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: w(t.length, void 0),
|
|
71
71
|
...e?.chartConfig || {}
|
|
72
72
|
},
|
|
73
|
-
data:
|
|
73
|
+
data: l.length > 0 ? l : e?.graphData || []
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
76
|
}, J = (e = {}) => {
|
|
77
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((n) => !!n.color), l = (a?.dataset || []).map((n,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
const a = e.graphData, s = (a?.dataset || []).some((n) => !!n.color), l = (a?.dataset || []).map((n, o) => {
|
|
80
|
+
const c = n.data?.map((i) => {
|
|
81
|
+
const r = i.value;
|
|
82
|
+
return r == null || Number(r) === 0 || typeof r == "string" && r.trim() === "" ? { ...i, value: 0 } : i;
|
|
83
|
+
});
|
|
84
|
+
return {
|
|
85
|
+
...n,
|
|
86
|
+
...c ? { data: c } : {},
|
|
87
|
+
plotToolText: e.plotToolText || (o === 0 ? "<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>$label</div><div style='display:flex;justify-content:space-between;align-items:center;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>")
|
|
88
|
+
};
|
|
89
|
+
});
|
|
83
90
|
return h({
|
|
84
91
|
type: "mscolumn2d",
|
|
85
92
|
key: e.key,
|
|
86
|
-
width: e.width ||
|
|
93
|
+
width: e.width || x,
|
|
87
94
|
height: e.height || "400",
|
|
88
95
|
dataSource: {
|
|
89
96
|
chart: {
|
|
@@ -95,7 +102,7 @@ const M = (e = {}) => {
|
|
|
95
102
|
showLegend: "0",
|
|
96
103
|
legendIconSides: e.legendIconSides,
|
|
97
104
|
numberPrefix: t,
|
|
98
|
-
labelStep:
|
|
105
|
+
labelStep: w(a?.category?.length, e.labelStep),
|
|
99
106
|
...s ? { palettecolors: void 0 } : {}
|
|
100
107
|
},
|
|
101
108
|
categories: [{ category: a?.category || [] }],
|
|
@@ -103,18 +110,18 @@ const M = (e = {}) => {
|
|
|
103
110
|
}
|
|
104
111
|
});
|
|
105
112
|
}, Q = (e = {}) => {
|
|
106
|
-
const t = e.graphLabel ? "" :
|
|
107
|
-
...
|
|
108
|
-
plotToolText: e.plotToolText || (
|
|
113
|
+
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).some((o) => !!o.color), l = "<div class='stacked-tooltip-total' style='display:flex;justify-content:space-between;align-items:center;padding:8px 0 0;margin-top:4px;border-top:1px solid #eee;min-width:180px'><span style='color:#2B2B2B;font-weight:600'>Total</span><b style='color:#2B2B2B'>$sum</b></div>", n = (a?.dataset || []).map((o, d) => ({
|
|
114
|
+
...o,
|
|
115
|
+
plotToolText: e.plotToolText || (d === 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
116
|
}));
|
|
110
117
|
return h({
|
|
111
118
|
type: e.hideScroll ? "stackedcolumn2d" : "scrollstackedcolumn2d",
|
|
112
119
|
key: e.key,
|
|
113
|
-
width: e.width ||
|
|
120
|
+
width: e.width || x,
|
|
114
121
|
height: e.height || "400",
|
|
115
122
|
dataSource: {
|
|
116
123
|
chart: {
|
|
117
|
-
...
|
|
124
|
+
...M(e),
|
|
118
125
|
yAxisMaxValue: e.yAxisMaxValue,
|
|
119
126
|
xAxisName: e.xAxisName,
|
|
120
127
|
yAxisName: e.yAxisName,
|
|
@@ -123,9 +130,9 @@ const M = (e = {}) => {
|
|
|
123
130
|
interactiveLegend: e.interactiveLegend || "1",
|
|
124
131
|
drawCrossLine: e.drawCrossLine || "1",
|
|
125
132
|
bgColor: e.bgColor || "#ffffff",
|
|
126
|
-
palettecolors: s ? void 0 : e.palettecolors ||
|
|
133
|
+
palettecolors: s ? void 0 : e.palettecolors || B,
|
|
127
134
|
numberPrefix: t,
|
|
128
|
-
labelStep:
|
|
135
|
+
labelStep: w(a?.category?.length, e.labelStep),
|
|
129
136
|
showSum: e.showSum ? "1" : void 0
|
|
130
137
|
},
|
|
131
138
|
categories: [
|
|
@@ -135,7 +142,7 @@ const M = (e = {}) => {
|
|
|
135
142
|
}
|
|
136
143
|
});
|
|
137
144
|
}, Z = (e = {}) => {
|
|
138
|
-
const t = e.graphLabel ? "" :
|
|
145
|
+
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).map((l, n) => ({
|
|
139
146
|
...l,
|
|
140
147
|
drawCustomLegendIcon: "1",
|
|
141
148
|
legendIconSides: "4",
|
|
@@ -146,7 +153,7 @@ const M = (e = {}) => {
|
|
|
146
153
|
return h({
|
|
147
154
|
type: "msline",
|
|
148
155
|
key: e.key,
|
|
149
|
-
width: e.width ||
|
|
156
|
+
width: e.width || x,
|
|
150
157
|
height: e.height || "400",
|
|
151
158
|
dataSource: {
|
|
152
159
|
chart: {
|
|
@@ -158,7 +165,7 @@ const M = (e = {}) => {
|
|
|
158
165
|
legendPosition: e.legendRight ? void 0 : e.legendPosition,
|
|
159
166
|
numberPrefix: t,
|
|
160
167
|
chartLeftMargin: e.chartLeftMargin || "20",
|
|
161
|
-
labelStep:
|
|
168
|
+
labelStep: w(a?.category?.length, e.labelStep),
|
|
162
169
|
showValues: e.showValues === "1" ? "1" : "0"
|
|
163
170
|
},
|
|
164
171
|
categories: [{ category: a?.category || [] }],
|
|
@@ -166,36 +173,36 @@ const M = (e = {}) => {
|
|
|
166
173
|
}
|
|
167
174
|
});
|
|
168
175
|
}, ee = (e = {}) => {
|
|
169
|
-
const t = e.graphLabel ? "" :
|
|
170
|
-
const
|
|
176
|
+
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, l = (e.palettecolors || H).split(",").map((c) => c.trim()), n = a?.category || [], o = a?.dataset || [], d = o.map((c, i) => {
|
|
177
|
+
const g = c.color || l[i % l.length], u = c.data || [];
|
|
171
178
|
return {
|
|
172
|
-
...
|
|
173
|
-
color:
|
|
174
|
-
plotBorderColor:
|
|
179
|
+
...c,
|
|
180
|
+
color: g,
|
|
181
|
+
plotBorderColor: g,
|
|
175
182
|
plotBorderThickness: "2",
|
|
176
183
|
plotBorderAlpha: "100",
|
|
177
|
-
anchorBgColor:
|
|
178
|
-
anchorBorderColor:
|
|
184
|
+
anchorBgColor: g,
|
|
185
|
+
anchorBorderColor: g,
|
|
179
186
|
showPlotBorder: "1",
|
|
180
187
|
...e.plotToolText ? { plotToolText: e.plotToolText } : {},
|
|
181
|
-
data:
|
|
182
|
-
const
|
|
188
|
+
data: u.map((b, m) => {
|
|
189
|
+
const C = n[m]?.label || "";
|
|
183
190
|
if (e.plotToolText)
|
|
184
191
|
return { ...b, alpha: "60" };
|
|
185
|
-
if (
|
|
192
|
+
if (i > 0)
|
|
186
193
|
return {
|
|
187
194
|
...b,
|
|
188
195
|
alpha: "60",
|
|
189
196
|
toolText: " "
|
|
190
197
|
};
|
|
191
|
-
const
|
|
192
|
-
const S =
|
|
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>${
|
|
198
|
+
const f = o.map((T, v) => {
|
|
199
|
+
const S = T.color || l[v % l.length], A = (T.data || [])[m]?.value ?? "", p = T.seriesname || "", N = v === i ? "#2B2B2B" : "#666";
|
|
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:${N}'><span style='width:10px;height:10px;border-radius:2px;background-color:${S};display:inline-block'></span>${p}</span><b style='color:${N}'>${t}${A}</b></div>`;
|
|
194
201
|
}).join("");
|
|
195
202
|
return {
|
|
196
203
|
...b,
|
|
197
204
|
alpha: "60",
|
|
198
|
-
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${
|
|
205
|
+
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${C}</div>${f}`
|
|
199
206
|
};
|
|
200
207
|
})
|
|
201
208
|
};
|
|
@@ -203,7 +210,7 @@ const M = (e = {}) => {
|
|
|
203
210
|
return h({
|
|
204
211
|
type: "stackedarea2d",
|
|
205
212
|
key: e.key,
|
|
206
|
-
width: e.width ||
|
|
213
|
+
width: e.width || x,
|
|
207
214
|
height: e.height || "400",
|
|
208
215
|
dataSource: {
|
|
209
216
|
chart: {
|
|
@@ -217,45 +224,45 @@ const M = (e = {}) => {
|
|
|
217
224
|
drawCrossLine: "1",
|
|
218
225
|
crossLineColor: "#f2f5fa",
|
|
219
226
|
numberPrefix: t,
|
|
220
|
-
labelStep:
|
|
227
|
+
labelStep: w(a?.category?.length, e.labelStep)
|
|
221
228
|
},
|
|
222
229
|
categories: [{ category: a?.category || [] }],
|
|
223
|
-
dataset:
|
|
230
|
+
dataset: d
|
|
224
231
|
}
|
|
225
232
|
});
|
|
226
233
|
}, te = (e = {}) => {
|
|
227
|
-
const t =
|
|
234
|
+
const t = y(e.numberPrefix), s = (e?.palettecolors || "#8ECFFF").split(",").map((r) => r.trim()), l = s[0];
|
|
228
235
|
if (!Array.isArray(e?.graphData) && e?.graphData?.dataset) {
|
|
229
|
-
const
|
|
230
|
-
const
|
|
236
|
+
const r = e.graphData, g = r?.category || [], u = r?.dataset || [], b = u.map((m, C) => {
|
|
237
|
+
const f = m.color || s[C % s.length], T = m.data || [];
|
|
231
238
|
return {
|
|
232
239
|
...m,
|
|
233
|
-
color:
|
|
240
|
+
color: f,
|
|
234
241
|
anchorRadius: "3",
|
|
235
242
|
anchorBgColor: "#FFFFFF",
|
|
236
|
-
anchorBorderColor:
|
|
243
|
+
anchorBorderColor: f,
|
|
237
244
|
anchorBorderThickness: "1",
|
|
238
245
|
...e.plotToolText ? { plotToolText: e.plotToolText } : {},
|
|
239
|
-
data:
|
|
240
|
-
const
|
|
246
|
+
data: T.map((v, S) => {
|
|
247
|
+
const $ = g[S]?.label || "";
|
|
241
248
|
if (e.plotToolText)
|
|
242
249
|
return { ...v };
|
|
243
|
-
if (
|
|
250
|
+
if (C > 0)
|
|
244
251
|
return { ...v, toolText: " " };
|
|
245
|
-
const A =
|
|
246
|
-
const I = (
|
|
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:${
|
|
252
|
+
const A = u.map((p, D) => {
|
|
253
|
+
const I = (p.data || [])[S]?.value ?? "", z = p.seriesname || "", P = D === C ? "#2B2B2B" : "#666";
|
|
254
|
+
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}'>${z}</label><b style='text-align:right;color:${P}'>${t}${I}</b></div>`;
|
|
248
255
|
}).join("");
|
|
249
256
|
return {
|
|
250
257
|
...v,
|
|
251
|
-
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${
|
|
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}`
|
|
252
259
|
};
|
|
253
260
|
})
|
|
254
261
|
};
|
|
255
262
|
});
|
|
256
263
|
return h({
|
|
257
264
|
type: "scrollarea2d",
|
|
258
|
-
width: e?.width ||
|
|
265
|
+
width: e?.width || x,
|
|
259
266
|
height: e?.height || "400",
|
|
260
267
|
dataSource: {
|
|
261
268
|
chart: {
|
|
@@ -265,18 +272,18 @@ const M = (e = {}) => {
|
|
|
265
272
|
numberPrefix: t,
|
|
266
273
|
...e?.chartConfig || {}
|
|
267
274
|
},
|
|
268
|
-
categories: [{ category:
|
|
275
|
+
categories: [{ category: g }],
|
|
269
276
|
dataset: b
|
|
270
277
|
}
|
|
271
278
|
});
|
|
272
279
|
}
|
|
273
|
-
const
|
|
274
|
-
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'>${
|
|
280
|
+
const o = Array.isArray(e?.graphData) ? e.graphData : [], d = o.map((r) => ({ label: r?.label || "" })), c = e.legendLabel || "Spend", i = o.map((r) => ({
|
|
281
|
+
value: r?.value,
|
|
282
|
+
toolText: e?.plotToolText || `<div style='font-size:14px;font-weight:600;color:#2B2B2B;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'><label style='display:inline-block;width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>${c}</label><b style='text-align:right;'>${t}${r?.value || ""}</b></div>`
|
|
276
283
|
}));
|
|
277
284
|
return h({
|
|
278
285
|
type: "scrollarea2d",
|
|
279
|
-
width: e?.width ||
|
|
286
|
+
width: e?.width || x,
|
|
280
287
|
height: e?.height || "400",
|
|
281
288
|
dataSource: {
|
|
282
289
|
chart: {
|
|
@@ -286,16 +293,16 @@ const M = (e = {}) => {
|
|
|
286
293
|
numberPrefix: t,
|
|
287
294
|
...e?.chartConfig || {}
|
|
288
295
|
},
|
|
289
|
-
categories: [{ category:
|
|
296
|
+
categories: [{ category: d }],
|
|
290
297
|
dataset: [
|
|
291
298
|
{
|
|
292
|
-
seriesname:
|
|
299
|
+
seriesname: c,
|
|
293
300
|
color: l,
|
|
294
301
|
anchorRadius: "3",
|
|
295
302
|
anchorBgColor: "#FFFFFF",
|
|
296
303
|
anchorBorderColor: l,
|
|
297
304
|
anchorBorderThickness: "1",
|
|
298
|
-
data:
|
|
305
|
+
data: i
|
|
299
306
|
}
|
|
300
307
|
]
|
|
301
308
|
}
|
|
@@ -304,7 +311,7 @@ const M = (e = {}) => {
|
|
|
304
311
|
const t = e.graphData;
|
|
305
312
|
return h({
|
|
306
313
|
type: "stackedbar2d",
|
|
307
|
-
width:
|
|
314
|
+
width: x,
|
|
308
315
|
height: e.height || "400",
|
|
309
316
|
dataSource: {
|
|
310
317
|
chart: {
|
|
@@ -321,7 +328,7 @@ const M = (e = {}) => {
|
|
|
321
328
|
const t = e.graphData;
|
|
322
329
|
return h({
|
|
323
330
|
type: "sankey",
|
|
324
|
-
width:
|
|
331
|
+
width: x,
|
|
325
332
|
height: e.height || "600",
|
|
326
333
|
dataSource: {
|
|
327
334
|
chart: {
|
|
@@ -347,20 +354,20 @@ const M = (e = {}) => {
|
|
|
347
354
|
}
|
|
348
355
|
});
|
|
349
356
|
}, ie = (e = {}) => {
|
|
350
|
-
const a = e.graphData?.data || [], s = a.reduce((
|
|
351
|
-
if (!
|
|
352
|
-
|
|
353
|
-
else if (
|
|
354
|
-
const [
|
|
355
|
-
|
|
357
|
+
const a = e.graphData?.data || [], s = a.reduce((i, r) => i + (Number(r.value) || 0), 0), l = Math.round(s * 100) / 100, n = e.numberPrefix ?? "$", o = { ...e };
|
|
358
|
+
if (!o.defaultCenterLabel)
|
|
359
|
+
o.defaultCenterLabel = `Total{br}${n}${l}`;
|
|
360
|
+
else if (o.defaultCenterLabel.includes("{br}")) {
|
|
361
|
+
const [i] = o.defaultCenterLabel.split("{br}");
|
|
362
|
+
o.defaultCenterLabel = `${i}{br}${n}${l}`;
|
|
356
363
|
}
|
|
357
|
-
const
|
|
358
|
-
const
|
|
364
|
+
const d = (e.palettecolors || B).split(",").map((i) => i.trim()), c = a.map((i, r) => {
|
|
365
|
+
const g = Number(i.value) || 0, u = l > 0 ? (g / l * 100).toFixed(2) : "0", b = i.color || d[r % d.length];
|
|
359
366
|
let m;
|
|
360
|
-
return e.plotToolText ? m = e.plotToolText.replace(/\$plotFillColor/g, b).replace(/\$color/g, b).replace(/\$label/g,
|
|
361
|
-
...
|
|
367
|
+
return e.plotToolText ? m = e.plotToolText.replace(/\$plotFillColor/g, b).replace(/\$color/g, b).replace(/\$label/g, i.label || "").replace(/\$value/g, String(i.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:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>${i.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>${i.label}</label><b style='text-align:right;'>${n}${g}</b></div>`, {
|
|
368
|
+
...i,
|
|
362
369
|
color: b,
|
|
363
|
-
displayValue: `${n}${
|
|
370
|
+
displayValue: `${n}${i.value} (${u}%){br}${i.label}`,
|
|
364
371
|
toolText: m
|
|
365
372
|
};
|
|
366
373
|
});
|
|
@@ -369,8 +376,8 @@ const M = (e = {}) => {
|
|
|
369
376
|
width: e.width || "136",
|
|
370
377
|
height: e.height || "136",
|
|
371
378
|
dataSource: {
|
|
372
|
-
chart: G(
|
|
373
|
-
data:
|
|
379
|
+
chart: G(o),
|
|
380
|
+
data: c
|
|
374
381
|
}
|
|
375
382
|
});
|
|
376
383
|
}, oe = (e = {}) => {
|
|
@@ -378,7 +385,7 @@ const M = (e = {}) => {
|
|
|
378
385
|
return h({
|
|
379
386
|
type: "multiaxisline",
|
|
380
387
|
key: e.key,
|
|
381
|
-
width: e.width ||
|
|
388
|
+
width: e.width || x,
|
|
382
389
|
height: e.height || "400",
|
|
383
390
|
dataSource: {
|
|
384
391
|
chart: { ...t?.chart || {}, ...e.plotToolText ? { plotToolText: e.plotToolText } : {} },
|
|
@@ -400,23 +407,23 @@ const M = (e = {}) => {
|
|
|
400
407
|
}, se = (e = {}) => {
|
|
401
408
|
let t = [], a = [];
|
|
402
409
|
if (Array.isArray(e.graphData)) {
|
|
403
|
-
const
|
|
404
|
-
t =
|
|
410
|
+
const o = e.graphData;
|
|
411
|
+
t = o.map((d) => ({ label: d.label || "" })), a = [
|
|
405
412
|
{
|
|
406
413
|
seriesname: "Series 1",
|
|
407
|
-
data:
|
|
414
|
+
data: o.map((d) => ({ value: d.value }))
|
|
408
415
|
}
|
|
409
416
|
];
|
|
410
417
|
} else {
|
|
411
|
-
const
|
|
412
|
-
t =
|
|
413
|
-
...
|
|
414
|
-
seriesname:
|
|
415
|
-
data:
|
|
418
|
+
const o = e.graphData;
|
|
419
|
+
t = o?.category || [], a = (o?.dataset || []).map((d) => ({
|
|
420
|
+
...d,
|
|
421
|
+
seriesname: d.seriesname || "Series",
|
|
422
|
+
data: d.data || []
|
|
416
423
|
}));
|
|
417
424
|
}
|
|
418
|
-
const s =
|
|
419
|
-
...
|
|
425
|
+
const s = y(e.numberPrefix), l = a.some((o) => !!o.color), n = {
|
|
426
|
+
...k(e),
|
|
420
427
|
bgColor: e.bgColor || "#ffffff",
|
|
421
428
|
xAxisName: e.xAxisName,
|
|
422
429
|
yAxisName: e.yAxisName,
|
|
@@ -434,7 +441,7 @@ const M = (e = {}) => {
|
|
|
434
441
|
palettecolors: l ? void 0 : L(e.palettecolors),
|
|
435
442
|
maxLabelHeight: e.maxLabelHeight,
|
|
436
443
|
numbersuffix: e.numbersuffix || "",
|
|
437
|
-
labelStep:
|
|
444
|
+
labelStep: w(t.length, e.labelStep),
|
|
438
445
|
numVisiblePlot: e.numVisiblePlot || "8",
|
|
439
446
|
scrollShowButtons: "0",
|
|
440
447
|
scrollColor: "#CCCCCC",
|
|
@@ -445,7 +452,7 @@ const M = (e = {}) => {
|
|
|
445
452
|
};
|
|
446
453
|
return h({
|
|
447
454
|
type: "scrollcolumn2d",
|
|
448
|
-
width: e.width ||
|
|
455
|
+
width: e.width || x,
|
|
449
456
|
height: e.height || "400",
|
|
450
457
|
dataSource: {
|
|
451
458
|
chart: n,
|
|
@@ -454,18 +461,18 @@ const M = (e = {}) => {
|
|
|
454
461
|
}
|
|
455
462
|
});
|
|
456
463
|
}, re = (e = {}) => {
|
|
457
|
-
const t = e.graphLabel ? "" :
|
|
458
|
-
...
|
|
459
|
-
plotToolText: e.plotToolText || (
|
|
464
|
+
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).some((o) => !!o.color), l = "<div class='stacked-tooltip-total' style='display:flex;justify-content:space-between;align-items:center;padding:8px 0 0;margin-top:4px;border-top:1px solid #eee;min-width:180px'><span style='color:#2B2B2B;font-weight:600'>Total</span><b style='color:#2B2B2B'>$sum</b></div>", n = (a?.dataset || []).map((o, d) => ({
|
|
465
|
+
...o,
|
|
466
|
+
plotToolText: e.plotToolText || (d === 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)
|
|
460
467
|
}));
|
|
461
468
|
return h({
|
|
462
469
|
type: "scrollstackedcolumn2d",
|
|
463
470
|
key: e.key,
|
|
464
|
-
width: e.width ||
|
|
471
|
+
width: e.width || x,
|
|
465
472
|
height: e.height || "400",
|
|
466
473
|
dataSource: {
|
|
467
474
|
chart: {
|
|
468
|
-
...
|
|
475
|
+
...M(e),
|
|
469
476
|
yAxisMaxValue: e.yAxisMaxValue,
|
|
470
477
|
xAxisName: e.xAxisName,
|
|
471
478
|
yAxisName: e.yAxisName,
|
|
@@ -474,10 +481,10 @@ const M = (e = {}) => {
|
|
|
474
481
|
interactiveLegend: e.interactiveLegend || "1",
|
|
475
482
|
drawCrossLine: e.drawCrossLine || "1",
|
|
476
483
|
bgColor: e.bgColor || "#ffffff",
|
|
477
|
-
palettecolors: s ? void 0 : e.palettecolors ||
|
|
484
|
+
palettecolors: s ? void 0 : e.palettecolors || B,
|
|
478
485
|
numberPrefix: t,
|
|
479
486
|
numVDivLines: e.numVDivLines || "5",
|
|
480
|
-
labelStep:
|
|
487
|
+
labelStep: w(a?.category?.length, e.labelStep),
|
|
481
488
|
showSum: e.showSum ? "1" : void 0,
|
|
482
489
|
numVisiblePlot: e.numVisiblePlot || "6",
|
|
483
490
|
scrollShowButtons: "0",
|
|
@@ -491,23 +498,25 @@ const M = (e = {}) => {
|
|
|
491
498
|
}
|
|
492
499
|
});
|
|
493
500
|
}, de = (e = {}) => {
|
|
494
|
-
const t = e.graphLabel ? "" :
|
|
495
|
-
const
|
|
501
|
+
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).some((c) => !!c.color), l = (e.palettecolors || B).split(",").map((c) => c.trim()), n = a?.category || [], o = a?.dataset || [], d = o.map((c, i) => {
|
|
502
|
+
const r = c.color || l[i % l.length], g = c.data || [];
|
|
496
503
|
return {
|
|
497
|
-
...
|
|
498
|
-
color:
|
|
504
|
+
...c,
|
|
505
|
+
color: r,
|
|
499
506
|
...e.plotToolText ? { plotToolText: e.plotToolText } : {},
|
|
500
|
-
data:
|
|
507
|
+
data: g.map((u, b) => {
|
|
501
508
|
const m = n[b]?.label || "";
|
|
502
509
|
if (e.plotToolText)
|
|
503
|
-
return { ...
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
510
|
+
return { ...u };
|
|
511
|
+
if (i > 0)
|
|
512
|
+
return { ...u, toolText: " " };
|
|
513
|
+
const C = o.map((f, T) => {
|
|
514
|
+
const v = f.color || l[T % l.length], $ = (f.data || [])[b]?.value ?? "", A = f.seriesname || "", p = "#2B2B2B", D = f.tooltipPrefix !== void 0 ? f.tooltipPrefix : t;
|
|
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:${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}'>${D}${$}</b></div>`;
|
|
507
516
|
}).join("");
|
|
508
517
|
return {
|
|
509
|
-
...
|
|
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>${
|
|
518
|
+
...u,
|
|
519
|
+
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>${m}</div>${C}`
|
|
511
520
|
};
|
|
512
521
|
})
|
|
513
522
|
};
|
|
@@ -515,7 +524,7 @@ const M = (e = {}) => {
|
|
|
515
524
|
return h({
|
|
516
525
|
type: "mscombidy2d",
|
|
517
526
|
key: e.key,
|
|
518
|
-
width: e.width ||
|
|
527
|
+
width: e.width || x,
|
|
519
528
|
height: e.height || "400",
|
|
520
529
|
dataSource: {
|
|
521
530
|
chart: {
|
|
@@ -526,18 +535,18 @@ const M = (e = {}) => {
|
|
|
526
535
|
pYAxisName: e.pYAxisName,
|
|
527
536
|
sYAxisName: e.sYAxisName,
|
|
528
537
|
numberPrefix: t,
|
|
529
|
-
labelStep:
|
|
530
|
-
palettecolors: s ? void 0 : e.palettecolors ||
|
|
538
|
+
labelStep: w(n.length, e.labelStep),
|
|
539
|
+
palettecolors: s ? void 0 : e.palettecolors || B
|
|
531
540
|
},
|
|
532
541
|
categories: [{ category: n }],
|
|
533
|
-
dataset:
|
|
542
|
+
dataset: d
|
|
534
543
|
}
|
|
535
544
|
});
|
|
536
545
|
}, ce = (e = {}) => {
|
|
537
|
-
const t = e.graphLabel ? "" :
|
|
546
|
+
const t = e.graphLabel ? "" : y(e.numberPrefix), a = e.graphData, s = a?.category || [], l = a?.dataset || [];
|
|
538
547
|
return h({
|
|
539
548
|
type: "scrollline2d",
|
|
540
|
-
width: e?.width ||
|
|
549
|
+
width: e?.width || x,
|
|
541
550
|
height: e?.height || "400",
|
|
542
551
|
dataSource: {
|
|
543
552
|
chart: {
|
|
@@ -555,7 +564,7 @@ const M = (e = {}) => {
|
|
|
555
564
|
flatScrollBars: "1",
|
|
556
565
|
scrollPadding: "5",
|
|
557
566
|
numDivLines: "5",
|
|
558
|
-
labelStep:
|
|
567
|
+
labelStep: w(s.length, e?.labelStep),
|
|
559
568
|
...e?.plotToolText ? { plotToolText: e.plotToolText } : {},
|
|
560
569
|
...e?.chartConfig || {}
|
|
561
570
|
},
|
|
@@ -565,8 +574,8 @@ const M = (e = {}) => {
|
|
|
565
574
|
});
|
|
566
575
|
}, he = {
|
|
567
576
|
area: X,
|
|
568
|
-
bar2d:
|
|
569
|
-
column2d:
|
|
577
|
+
bar2d: F,
|
|
578
|
+
column2d: F,
|
|
570
579
|
doughnutChart: ie,
|
|
571
580
|
groupChart: J,
|
|
572
581
|
line: q,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../lib/components/FusionChart/_config/events.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../lib/components/FusionChart/_config/events.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAoB,MAAM,6BAA6B,CAAC;AAEtF,KAAK,UAAU,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;AAE3D,QAAA,MAAM,mBAAmB,GACtB,SAAS,UAAU,EAAE,cAAS,MAC5B,OAAO,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,mBACU,CAAC;AAE9C,eAAO,MAAM,cAAc,GACzB,QAAO,OAAO,CAAC,gBAAgB,CAAM,KACpC,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,GAAG,SAwDxE,CAAC;AAEF,eAAO,MAAM,WAAW,GACtB,QAAO,OAAO,CAAC,gBAAgB,CAAM,KACpC,CAAC,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAS/B,CAAC"}
|