@ck-ui/component-library 0.3.0 → 1.0.1
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-Dm6aLDx8.js +89 -0
- package/dist/IconSlot-CPQsGPB-.js +33 -0
- package/dist/{OptionList-BNaH2PnX.js → OptionList-DN1xZbnV.js} +29 -29
- package/dist/assets/DropdownFooter-DjdPf69A.css +1 -0
- package/dist/assets/IconSlot-D8WWEHKb.css +1 -0
- package/dist/assets/index-B81zpOpq.css +1 -0
- package/dist/assets/index-BXwGxK7I.css +1 -0
- package/dist/assets/index-BZgvXFWW.css +1 -0
- package/dist/assets/index-BoQKDmZt.css +1 -0
- package/dist/assets/index-Cdmws__2.css +1 -0
- package/dist/assets/index-CtR-jzNi.css +1 -0
- package/dist/assets/index-PKpDB4Cl.css +1 -0
- package/dist/assets/index-UphWJR2V.css +1 -0
- package/dist/assets/index-i-aBFBOq.css +1 -0
- package/dist/assets/styles-Bj-7zn37.css +1 -0
- package/dist/assets/styles-CZCmGNUn.css +1 -0
- package/dist/assets/styles-DLJzdWsF.css +1 -0
- package/dist/assets/{styles-CbbBUzsN.css → styles-DngCqCGW.css} +1 -1
- package/dist/assets/styles-O-5pBCak.css +1 -0
- package/dist/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.js +53 -47
- 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/CKCheckbox/index.d.ts.map +1 -1
- package/dist/components/CKCheckbox/index.js +22 -21
- package/dist/components/CardBox/index.js +18 -18
- package/dist/components/CostComparatorTable/_helpers/CostCell.d.ts +3 -1
- package/dist/components/CostComparatorTable/_helpers/CostCell.d.ts.map +1 -1
- package/dist/components/CostComparatorTable/_helpers/CostCell.js +30 -28
- package/dist/components/CostComparatorTable/_helpers/HeaderCheckbox.js +1 -1
- package/dist/components/CostComparatorTable/_types/costComparatorTable.types.d.ts +7 -0
- package/dist/components/CostComparatorTable/_types/costComparatorTable.types.d.ts.map +1 -1
- package/dist/components/CostComparatorTable/index.d.ts +1 -1
- package/dist/components/CostComparatorTable/index.d.ts.map +1 -1
- package/dist/components/CostComparatorTable/index.js +93 -85
- package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +1685 -1651
- package/dist/components/DateRangePicker/_types/dateRangePicker.types.d.ts +10 -0
- package/dist/components/DateRangePicker/_types/dateRangePicker.types.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/builders.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/builders.js +141 -141
- package/dist/components/FusionChart/_config/helpers.js +2 -2
- package/dist/components/FusionChart/_helpers/doughnutHelper.d.ts.map +1 -1
- package/dist/components/FusionChart/_helpers/doughnutHelper.js +56 -43
- package/dist/components/FusionChart/index.d.ts.map +1 -1
- package/dist/components/FusionChart/index.js +356 -340
- package/dist/components/Loader/_types/loader.types.d.ts +10 -0
- package/dist/components/Loader/_types/loader.types.d.ts.map +1 -0
- package/dist/components/Loader/_types/loader.types.js +1 -0
- package/dist/components/Loader/index.d.ts +6 -0
- package/dist/components/Loader/index.d.ts.map +1 -0
- package/dist/components/Loader/index.js +37 -0
- package/dist/components/MAVDropdown/_types/mavDropdown.types.d.ts +27 -0
- package/dist/components/MAVDropdown/_types/mavDropdown.types.d.ts.map +1 -0
- package/dist/components/MAVDropdown/_types/mavDropdown.types.js +1 -0
- package/dist/components/MAVDropdown/index.d.ts +6 -0
- package/dist/components/MAVDropdown/index.d.ts.map +1 -0
- package/dist/components/MAVDropdown/index.js +162 -0
- package/dist/components/MetricCards/Component/CardWithIconAndForecast/index.js +33 -33
- package/dist/components/MultiSelect/SimpleMultiSelect.d.ts +22 -0
- package/dist/components/MultiSelect/SimpleMultiSelect.d.ts.map +1 -0
- package/dist/components/MultiSelect/SimpleMultiSelect.js +221 -0
- 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.d.ts.map +1 -1
- package/dist/components/MultiSelect/_helpers/TagContent.js +20 -19
- package/dist/components/MultiSelect/_helpers/TriggerButton.d.ts.map +1 -1
- package/dist/components/MultiSelect/_helpers/TriggerButton.js +39 -34
- package/dist/components/MultiSelect/_types/type.d.ts +4 -0
- package/dist/components/MultiSelect/_types/type.d.ts.map +1 -1
- 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 +148 -145
- package/dist/components/ProfileDropdown/_types/profileDropdown.types.d.ts +28 -0
- package/dist/components/ProfileDropdown/_types/profileDropdown.types.d.ts.map +1 -0
- package/dist/components/ProfileDropdown/_types/profileDropdown.types.js +13 -0
- package/dist/components/ProfileDropdown/constants.d.ts +3 -0
- package/dist/components/ProfileDropdown/constants.d.ts.map +1 -0
- package/dist/components/ProfileDropdown/constants.js +8 -0
- package/dist/components/ProfileDropdown/index.d.ts +6 -0
- package/dist/components/ProfileDropdown/index.d.ts.map +1 -0
- package/dist/components/ProfileDropdown/index.js +154 -0
- package/dist/components/RadioButton/index.js +34 -34
- package/dist/components/RadioGroup/_types/radioGroup.types.d.ts +1 -0
- package/dist/components/RadioGroup/_types/radioGroup.types.d.ts.map +1 -1
- package/dist/components/RadioGroup/index.d.ts +1 -1
- package/dist/components/RadioGroup/index.d.ts.map +1 -1
- package/dist/components/RadioGroup/index.js +19 -17
- package/dist/components/Search/index.js +35 -35
- package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.d.ts +2 -1
- package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.d.ts.map +1 -1
- package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +7 -3
- package/dist/components/SingleSelectDropdown/_types/singleSelectDropdown.types.d.ts +2 -2
- package/dist/components/SingleSelectDropdown/_types/singleSelectDropdown.types.d.ts.map +1 -1
- package/dist/components/SingleSelectDropdown/index.d.ts +1 -1
- package/dist/components/SingleSelectDropdown/index.d.ts.map +1 -1
- package/dist/components/SingleSelectDropdown/index.js +61 -57
- package/dist/components/Table/_helpers/ColumnManager/ColumnConfig.d.ts +1 -0
- package/dist/components/Table/_helpers/ColumnManager/ColumnConfig.d.ts.map +1 -1
- package/dist/components/Table/_helpers/ColumnManager/ColumnConfig.js +49 -47
- package/dist/components/Table/_helpers/ColumnManager/index.d.ts.map +1 -1
- package/dist/components/Table/_helpers/ColumnManager/index.js +393 -385
- package/dist/components/Table/_helpers/ExpandableRow/index.d.ts.map +1 -1
- package/dist/components/Table/_helpers/ExpandableRow/index.js +30 -20
- package/dist/components/Table/_helpers/GroupedHeader/index.d.ts +2 -2
- package/dist/components/Table/_helpers/GroupedHeader/index.d.ts.map +1 -1
- package/dist/components/Table/_helpers/GroupedHeader/index.js +79 -87
- package/dist/components/Table/_helpers/TableFilterModal/OptionList.js +1 -1
- package/dist/components/Table/_helpers/TableFilterModal/index.d.ts.map +1 -1
- package/dist/components/Table/_helpers/TableFilterModal/index.js +43 -42
- package/dist/components/Table/_helpers/TableRows.d.ts +1 -1
- package/dist/components/Table/_helpers/TableRows.d.ts.map +1 -1
- package/dist/components/Table/_helpers/TableRows.js +288 -283
- package/dist/components/Table/_types/table.types.d.ts +9 -3
- package/dist/components/Table/_types/table.types.d.ts.map +1 -1
- package/dist/components/Table/_utils/table.utils.d.ts +3 -0
- package/dist/components/Table/_utils/table.utils.d.ts.map +1 -1
- package/dist/components/Table/_utils/table.utils.js +73 -23
- 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 +388 -358
- package/dist/components/Typography/index.js +30 -30
- package/dist/main.d.ts +6 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +97 -85
- package/dist/styles.module-BXby6f8d.js +16 -0
- package/dist/styles.module-DakCndIP.js +42 -0
- package/package.json +1 -1
- package/dist/DropdownFooter-C20yRiDR.js +0 -84
- package/dist/IconSlot-CFKmSU2_.js +0 -33
- package/dist/assets/DropdownFooter-C7Cml53c.css +0 -1
- package/dist/assets/IconSlot-CLpdZgmb.css +0 -1
- package/dist/assets/index-BQ0m7FKV.css +0 -1
- package/dist/assets/index-BmQOtMhS.css +0 -1
- package/dist/assets/index-CaWXKQ7j.css +0 -1
- package/dist/assets/index-CiQd_iRw.css +0 -1
- package/dist/assets/index-Dudb2XKF.css +0 -1
- package/dist/assets/index-w7AdSPwF.css +0 -1
- package/dist/assets/styles-BA66-SUu.css +0 -1
- package/dist/assets/styles-BTZL03H2.css +0 -1
- package/dist/assets/styles-CflOKRvX.css +0 -1
- package/dist/assets/styles-D8sahtFb.css +0 -1
- package/dist/styles.module-CCyijXTv.js +0 -16
- package/dist/styles.module-CmWIIYpK.js +0 -41
|
@@ -4,6 +4,8 @@ export type { DateRange, DefinedRange };
|
|
|
4
4
|
export interface DateRangePickerProps {
|
|
5
5
|
/** Handler called when the date range changes */
|
|
6
6
|
onChange: (range: DateRange) => void;
|
|
7
|
+
/** Handler called when the selection is cleared */
|
|
8
|
+
onClear?: () => void;
|
|
7
9
|
/** Currently selected date range */
|
|
8
10
|
value?: DateRange;
|
|
9
11
|
/** Label for the toggle button */
|
|
@@ -27,6 +29,14 @@ export interface DateRangePickerProps {
|
|
|
27
29
|
size?: ButtonSize;
|
|
28
30
|
/** Horizontal alignment of the popup relative to the trigger button */
|
|
29
31
|
popupAlign?: "left" | "right";
|
|
32
|
+
/**
|
|
33
|
+
* Date display format string. Tokens: DD, MM, MMM, MMMM, YYYY, YY.
|
|
34
|
+
* @default "MMM D, YYYY" (e.g. "Jan 1, 2025")
|
|
35
|
+
* @example "DD-MM-YYYY" → "01-01-2025"
|
|
36
|
+
* @example "MM/DD/YYYY" → "01/01/2025"
|
|
37
|
+
* @example "YYYY-MM-DD" → "2025-01-01"
|
|
38
|
+
*/
|
|
39
|
+
dateFormat?: string;
|
|
30
40
|
}
|
|
31
41
|
export interface RangeSidebarProps {
|
|
32
42
|
ranges: DefinedRange[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateRangePicker.types.d.ts","sourceRoot":"","sources":["../../../../lib/components/DateRangePicker/_types/dateRangePicker.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAErE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;AAExC,MAAM,WAAW,oBAAoB;IACnC,iDAAiD;IACjD,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,oCAAoC;IACpC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACxB,iEAAiE;IACjE,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACxB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC1B,wDAAwD;IACxD,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACxB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,8FAA8F;IAC9F,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"dateRangePicker.types.d.ts","sourceRoot":"","sources":["../../../../lib/components/DateRangePicker/_types/dateRangePicker.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAErE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;AAExC,MAAM,WAAW,oBAAoB;IACnC,iDAAiD;IACjD,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,oCAAoC;IACpC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACxB,iEAAiE;IACjE,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACxB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC1B,wDAAwD;IACxD,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACxB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,8FAA8F;IAC9F,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;CACzC;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../../../lib/components/FusionChart/_config/builders.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../../../lib/components/FusionChart/_config/builders.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AA+0BpE,eAAO,MAAM,gBAAgB,GAAI,QAAO,OAAO,CAAC,gBAAgB,CAAM;;;;;;;QACD,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { EXTENDED_PALETTE as
|
|
2
|
-
import { getBaseConfig as
|
|
3
|
-
import { getCurrencyPrefix as m, getLabelStep as b, getCartesianPalette as
|
|
1
|
+
import { EXTENDED_PALETTE as $, DEFAULT_WIDTH as h, STACKED_AREA_PALETTE as z } from "../_constant/constants.js";
|
|
2
|
+
import { getBaseConfig as g, getStackedColumnChartShell as T, getStackedAreaChartShell as H, getStackedBarChartShell as R, getLineChartShell as V, getCommonChartShell as L, getScrollAreaChartShell as N, getMultipleLineChartShell as O, getMsCombiDy2dChartShell as W, getGroupChartShell as _, getDoughnutChartShell as G } from "./helpers.js";
|
|
3
|
+
import { getCurrencyPrefix as m, getLabelStep as b, getCartesianPalette as k, getGraphDataLength as U, getBarType as q, getCurrencySymbol as F } from "../_utils/chartHelpers.js";
|
|
4
4
|
const P = (e = {}) => {
|
|
5
|
-
const t = e.plotSpacePercent ?? (e.plotSpacePercent === 0 ? e.plotSpacePercent : 60), a = Array.isArray(e.graphData) ? e.graphData : [],
|
|
6
|
-
const x =
|
|
5
|
+
const t = e.plotSpacePercent ?? (e.plotSpacePercent === 0 ? e.plotSpacePercent : 60), a = Array.isArray(e.graphData) ? e.graphData : [], s = a.some((c) => !!c.color), l = k(e?.palettecolors)?.split(",")?.map((c) => c?.trim()), i = a?.map((c, d) => {
|
|
6
|
+
const x = c?.color || l[d % l.length];
|
|
7
7
|
return {
|
|
8
|
-
...
|
|
8
|
+
...c,
|
|
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'>${c.label || ""}</div><div style='display:flex;justify-content:space-between;align-items:center;padding:4px 0;min-width:180px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:${x};display:inline-block'></span>${c.label || ""}</span><b style='color:#2B2B2B'>${m(e.numberPrefix)}${c.value || ""}</b></div>`
|
|
11
11
|
};
|
|
12
|
-
}),
|
|
13
|
-
...
|
|
12
|
+
}), o = {
|
|
13
|
+
...L(e),
|
|
14
14
|
bgColor: e.bgColor || "#ffffff",
|
|
15
15
|
labelStep: b(U(e), e.labelStep),
|
|
16
16
|
xAxisName: e.xAxisName,
|
|
@@ -25,27 +25,27 @@ const P = (e = {}) => {
|
|
|
25
25
|
skipOverlapLabels: "0",
|
|
26
26
|
numberPrefix: m(e.numberPrefix),
|
|
27
27
|
// When per-item colors are set, don't use palettecolors (it overrides item colors)
|
|
28
|
-
palettecolors:
|
|
28
|
+
palettecolors: s ? void 0 : k(e.palettecolors),
|
|
29
29
|
maxLabelHeight: e.maxLabelHeight,
|
|
30
30
|
numbersuffix: e.numbersuffix || ""
|
|
31
|
-
},
|
|
32
|
-
chart:
|
|
33
|
-
categories:
|
|
34
|
-
dataset:
|
|
31
|
+
}, r = e.graphData, n = e?.hideScroll ? { chart: o, data: i?.length > 0 ? i : e?.graphData || [] } : {
|
|
32
|
+
chart: o,
|
|
33
|
+
categories: r?.categories,
|
|
34
|
+
dataset: r?.dataset
|
|
35
35
|
};
|
|
36
|
-
return
|
|
36
|
+
return g({
|
|
37
37
|
type: q(e),
|
|
38
|
-
width:
|
|
38
|
+
width: h,
|
|
39
39
|
height: e.height || "300",
|
|
40
|
-
dataSource:
|
|
40
|
+
dataSource: n
|
|
41
41
|
});
|
|
42
|
-
}, K = (e = {}) =>
|
|
42
|
+
}, K = (e = {}) => g({
|
|
43
43
|
type: "area2d",
|
|
44
|
-
width:
|
|
44
|
+
width: h,
|
|
45
45
|
height: "550",
|
|
46
46
|
dataSource: {
|
|
47
47
|
chart: {
|
|
48
|
-
...
|
|
48
|
+
...L({ ...e, decimals: "2" }),
|
|
49
49
|
xAxisName: e.xAxisName,
|
|
50
50
|
yAxisName: e.yAxisName,
|
|
51
51
|
labelFontSize: 12,
|
|
@@ -54,13 +54,13 @@ const P = (e = {}) => {
|
|
|
54
54
|
data: e.graphData || []
|
|
55
55
|
}
|
|
56
56
|
}), X = (e = {}) => {
|
|
57
|
-
const t = (e?.palettecolors || "#8ECFFF").split(",")[0].trim(), a = Array.isArray(e?.graphData) ? e.graphData : [],
|
|
57
|
+
const t = (e?.palettecolors || "#8ECFFF").split(",")[0].trim(), a = Array.isArray(e?.graphData) ? e.graphData : [], s = m(e?.numberPrefix), l = a?.map((i) => ({
|
|
58
58
|
...i,
|
|
59
|
-
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:
|
|
59
|
+
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${i?.label || ""}</div><div style='display:flex;justify-content:space-between;align-items:center;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:${t};display:inline-block'></span>${i?.label || ""}</span><b style='color:#2B2B2B'>${s}${i?.value || ""}</b></div>`
|
|
60
60
|
}));
|
|
61
|
-
return
|
|
61
|
+
return g({
|
|
62
62
|
type: "line",
|
|
63
|
-
width: e?.width ||
|
|
63
|
+
width: e?.width || h,
|
|
64
64
|
height: e?.height || "300",
|
|
65
65
|
dataSource: {
|
|
66
66
|
chart: {
|
|
@@ -76,14 +76,14 @@ const P = (e = {}) => {
|
|
|
76
76
|
}, J = (e = {}) => {
|
|
77
77
|
let t = F();
|
|
78
78
|
e.numberPrefix === "" ? t = "" : e.numberPrefix !== null && e.numberPrefix !== void 0 && (t = e.numberPrefix);
|
|
79
|
-
const a = e.graphData,
|
|
79
|
+
const a = e.graphData, s = (a?.dataset || []).some((i) => !!i.color), l = (a?.dataset || []).map((i, o) => ({
|
|
80
80
|
...i,
|
|
81
|
-
plotToolText:
|
|
81
|
+
plotToolText: o === 0 ? "<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>$label</div><div style='display:flex;justify-content:space-between;align-items:center;padding:4px 0;min-width:180px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:$color;display:inline-block'></span>$seriesName</span><b style='color:#2B2B2B'>$dataValue</b></div>" : "<div style='display:flex;justify-content:space-between;align-items:center;padding:4px 0;min-width:180px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:$color;display:inline-block'></span>$seriesName</span><b style='color:#2B2B2B'>$dataValue</b></div>"
|
|
82
82
|
}));
|
|
83
|
-
return
|
|
83
|
+
return g({
|
|
84
84
|
type: "mscolumn2d",
|
|
85
85
|
key: e.key,
|
|
86
|
-
width: e.width ||
|
|
86
|
+
width: e.width || h,
|
|
87
87
|
height: e.height || "400",
|
|
88
88
|
dataSource: {
|
|
89
89
|
chart: {
|
|
@@ -96,21 +96,21 @@ const P = (e = {}) => {
|
|
|
96
96
|
legendIconSides: e.legendIconSides,
|
|
97
97
|
numberPrefix: t,
|
|
98
98
|
labelStep: b(a?.category?.length, e.labelStep),
|
|
99
|
-
...
|
|
99
|
+
...s ? { palettecolors: void 0 } : {}
|
|
100
100
|
},
|
|
101
101
|
categories: [{ category: a?.category || [] }],
|
|
102
102
|
dataset: l
|
|
103
103
|
}
|
|
104
104
|
});
|
|
105
105
|
}, Q = (e = {}) => {
|
|
106
|
-
const t = e.graphLabel ? "" : m(e.numberPrefix), a = e.graphData,
|
|
107
|
-
...
|
|
108
|
-
plotToolText:
|
|
106
|
+
const t = e.graphLabel ? "" : m(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).some((o) => !!o.color), l = "<div class='stacked-tooltip-total' style='display:flex;justify-content:space-between;align-items:center;padding:8px 0 0;margin-top:4px;border-top:1px solid #eee;min-width:180px'><span style='color:#2B2B2B;font-weight:600'>Total</span><b style='color:#2B2B2B'>$sum</b></div>", i = (a?.dataset || []).map((o, r) => ({
|
|
107
|
+
...o,
|
|
108
|
+
plotToolText: r === 0 ? "<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>$label</div><div style='display:flex;justify-content:space-between;align-items:center;padding:4px 0;min-width:180px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:$color;display:inline-block'></span>$seriesName</span><b style='color:#2B2B2B'>$dataValue</b></div>" + l : "<div style='display:flex;justify-content:space-between;align-items:center;padding:4px 0;min-width:180px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:$color;display:inline-block'></span>$seriesName</span><b style='color:#2B2B2B'>$dataValue</b></div>" + l
|
|
109
109
|
}));
|
|
110
|
-
return
|
|
110
|
+
return g({
|
|
111
111
|
type: e.hideScroll ? "stackedcolumn2d" : "scrollstackedcolumn2d",
|
|
112
112
|
key: e.key,
|
|
113
|
-
width: e.width ||
|
|
113
|
+
width: e.width || h,
|
|
114
114
|
height: e.height || "400",
|
|
115
115
|
dataSource: {
|
|
116
116
|
chart: {
|
|
@@ -123,7 +123,7 @@ const P = (e = {}) => {
|
|
|
123
123
|
interactiveLegend: e.interactiveLegend || "1",
|
|
124
124
|
drawCrossLine: e.drawCrossLine || "1",
|
|
125
125
|
bgColor: e.bgColor || "#ffffff",
|
|
126
|
-
palettecolors:
|
|
126
|
+
palettecolors: s ? void 0 : e.palettecolors || $,
|
|
127
127
|
numberPrefix: t,
|
|
128
128
|
labelStep: b(a?.category?.length, e.labelStep),
|
|
129
129
|
showSum: e.showSum ? "1" : void 0
|
|
@@ -131,22 +131,22 @@ const P = (e = {}) => {
|
|
|
131
131
|
categories: [
|
|
132
132
|
{ category: a?.category || [] }
|
|
133
133
|
],
|
|
134
|
-
dataset:
|
|
134
|
+
dataset: i
|
|
135
135
|
}
|
|
136
136
|
});
|
|
137
137
|
}, Y = (e = {}) => {
|
|
138
|
-
const t = e.graphLabel ? "" : m(e.numberPrefix), a = e.graphData,
|
|
138
|
+
const t = e.graphLabel ? "" : m(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).map((l, i) => ({
|
|
139
139
|
...l,
|
|
140
140
|
drawCustomLegendIcon: "1",
|
|
141
141
|
legendIconSides: "4",
|
|
142
142
|
legendIconBorderThickness: "0",
|
|
143
143
|
legendIconBgAlpha: "100",
|
|
144
|
-
plotToolText: i === 0 ? "<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:
|
|
144
|
+
plotToolText: i === 0 ? "<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>$label</div><div style='display:flex;justify-content:space-between;align-items:center;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:$color;display:inline-block'></span>$seriesName</span><b style='color:#2B2B2B'>$dataValue</b></div>" : "<div style='display:flex;justify-content:space-between;align-items:center;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:$color;display:inline-block'></span>$seriesName</span><b style='color:#2B2B2B'>$dataValue</b></div>"
|
|
145
145
|
}));
|
|
146
|
-
return
|
|
146
|
+
return g({
|
|
147
147
|
type: "msline",
|
|
148
148
|
key: e.key,
|
|
149
|
-
width: e.width ||
|
|
149
|
+
width: e.width || h,
|
|
150
150
|
height: e.height || "400",
|
|
151
151
|
dataSource: {
|
|
152
152
|
chart: {
|
|
@@ -162,14 +162,14 @@ const P = (e = {}) => {
|
|
|
162
162
|
showValues: e.showValues === "1" ? "1" : "0"
|
|
163
163
|
},
|
|
164
164
|
categories: [{ category: a?.category || [] }],
|
|
165
|
-
dataset:
|
|
165
|
+
dataset: s
|
|
166
166
|
}
|
|
167
167
|
});
|
|
168
168
|
}, Z = (e = {}) => {
|
|
169
|
-
const t = e.graphLabel ? "" : m(e.numberPrefix), a = e.graphData, l = (e.palettecolors || z).split(",").map((
|
|
170
|
-
const x =
|
|
169
|
+
const t = e.graphLabel ? "" : m(e.numberPrefix), a = e.graphData, l = (e.palettecolors || z).split(",").map((n) => n.trim()), i = a?.category || [], o = a?.dataset || [], r = o.map((n, c) => {
|
|
170
|
+
const x = n.color || l[c % l.length], y = n.data || [];
|
|
171
171
|
return {
|
|
172
|
-
...
|
|
172
|
+
...n,
|
|
173
173
|
color: x,
|
|
174
174
|
plotBorderColor: x,
|
|
175
175
|
plotBorderThickness: "2",
|
|
@@ -177,30 +177,30 @@ const P = (e = {}) => {
|
|
|
177
177
|
anchorBgColor: x,
|
|
178
178
|
anchorBorderColor: x,
|
|
179
179
|
showPlotBorder: "1",
|
|
180
|
-
data:
|
|
181
|
-
const
|
|
182
|
-
if (
|
|
180
|
+
data: y.map((C, u) => {
|
|
181
|
+
const w = i[u]?.label || "";
|
|
182
|
+
if (c > 0)
|
|
183
183
|
return {
|
|
184
184
|
...C,
|
|
185
185
|
alpha: "60",
|
|
186
186
|
toolText: " "
|
|
187
187
|
};
|
|
188
|
-
const f =
|
|
189
|
-
const v =
|
|
190
|
-
return `<div style='display:flex;justify-content:space-between;align-items:center;padding:
|
|
188
|
+
const f = o.map((p, B) => {
|
|
189
|
+
const v = p.color || l[B % l.length], S = (p.data || [])[u]?.value ?? "", A = p.seriesname || "";
|
|
190
|
+
return `<div style='display:flex;justify-content:space-between;align-items:center;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:${v};display:inline-block'></span>${A}</span><b style='color:#2B2B2B'>${t}${S}</b></div>`;
|
|
191
191
|
}).join("");
|
|
192
192
|
return {
|
|
193
193
|
...C,
|
|
194
194
|
alpha: "60",
|
|
195
|
-
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:
|
|
195
|
+
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${w}</div>${f}`
|
|
196
196
|
};
|
|
197
197
|
})
|
|
198
198
|
};
|
|
199
199
|
});
|
|
200
|
-
return
|
|
200
|
+
return g({
|
|
201
201
|
type: "stackedarea2d",
|
|
202
202
|
key: e.key,
|
|
203
|
-
width: e.width ||
|
|
203
|
+
width: e.width || h,
|
|
204
204
|
height: e.height || "400",
|
|
205
205
|
dataSource: {
|
|
206
206
|
chart: {
|
|
@@ -217,43 +217,43 @@ const P = (e = {}) => {
|
|
|
217
217
|
labelStep: b(a?.category?.length, e.labelStep)
|
|
218
218
|
},
|
|
219
219
|
categories: [{ category: a?.category || [] }],
|
|
220
|
-
dataset:
|
|
220
|
+
dataset: r
|
|
221
221
|
}
|
|
222
222
|
});
|
|
223
223
|
}, ee = (e = {}) => {
|
|
224
|
-
const t = m(e.numberPrefix),
|
|
224
|
+
const t = m(e.numberPrefix), s = (e?.palettecolors || "#8ECFFF").split(",").map((d) => d.trim()), l = s[0];
|
|
225
225
|
if (!Array.isArray(e?.graphData) && e?.graphData?.dataset) {
|
|
226
|
-
const d = e.graphData, x = d?.category || [],
|
|
227
|
-
const f =
|
|
226
|
+
const d = e.graphData, x = d?.category || [], y = d?.dataset || [], C = y.map((u, w) => {
|
|
227
|
+
const f = u.color || s[w % s.length], p = u.data || [];
|
|
228
228
|
return {
|
|
229
|
-
...
|
|
229
|
+
...u,
|
|
230
230
|
color: f,
|
|
231
231
|
anchorRadius: "3",
|
|
232
232
|
anchorBgColor: "#FFFFFF",
|
|
233
233
|
anchorBorderColor: f,
|
|
234
234
|
anchorBorderThickness: "1",
|
|
235
|
-
data:
|
|
236
|
-
const
|
|
237
|
-
if (
|
|
238
|
-
return { ...
|
|
239
|
-
const S =
|
|
240
|
-
const j = A.color ||
|
|
241
|
-
return `<div style='display:flex;justify-content:space-between;align-items:center;padding:
|
|
235
|
+
data: p.map((B, v) => {
|
|
236
|
+
const D = x[v]?.label || "";
|
|
237
|
+
if (w > 0)
|
|
238
|
+
return { ...B, toolText: " " };
|
|
239
|
+
const S = y.map((A, M) => {
|
|
240
|
+
const j = A.color || s[M % s.length], E = (A.data || [])[v]?.value ?? "", I = A.seriesname || "";
|
|
241
|
+
return `<div style='display:flex;justify-content:space-between;align-items:center;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:${j};display:inline-block'></span>${I}</span><b style='color:#2B2B2B'>${t}${E}</b></div>`;
|
|
242
242
|
}).join("");
|
|
243
243
|
return {
|
|
244
|
-
...
|
|
245
|
-
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:
|
|
244
|
+
...B,
|
|
245
|
+
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${D}</div>${S}`
|
|
246
246
|
};
|
|
247
247
|
})
|
|
248
248
|
};
|
|
249
249
|
});
|
|
250
|
-
return
|
|
250
|
+
return g({
|
|
251
251
|
type: "scrollarea2d",
|
|
252
|
-
width: e?.width ||
|
|
252
|
+
width: e?.width || h,
|
|
253
253
|
height: e?.height || "400",
|
|
254
254
|
dataSource: {
|
|
255
255
|
chart: {
|
|
256
|
-
...
|
|
256
|
+
...N(e),
|
|
257
257
|
xAxisName: e?.xAxisName,
|
|
258
258
|
yAxisName: e?.yAxisName,
|
|
259
259
|
numberPrefix: t,
|
|
@@ -264,41 +264,41 @@ const P = (e = {}) => {
|
|
|
264
264
|
}
|
|
265
265
|
});
|
|
266
266
|
}
|
|
267
|
-
const
|
|
267
|
+
const o = Array.isArray(e?.graphData) ? e.graphData : [], r = o.map((d) => ({ label: d?.label || "" })), n = e.legendLabel || "Spend", c = o.map((d) => ({
|
|
268
268
|
value: d?.value,
|
|
269
|
-
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:
|
|
269
|
+
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${d?.label || ""}</div><div style='display:flex;justify-content:space-between;align-items:center;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:${l};display:inline-block'></span>${n}</span><b style='color:#2B2B2B'>${t}${d?.value || ""}</b></div>`
|
|
270
270
|
}));
|
|
271
|
-
return
|
|
271
|
+
return g({
|
|
272
272
|
type: "scrollarea2d",
|
|
273
|
-
width: e?.width ||
|
|
273
|
+
width: e?.width || h,
|
|
274
274
|
height: e?.height || "400",
|
|
275
275
|
dataSource: {
|
|
276
276
|
chart: {
|
|
277
|
-
...
|
|
277
|
+
...N(e),
|
|
278
278
|
xAxisName: e?.xAxisName,
|
|
279
279
|
yAxisName: e?.yAxisName,
|
|
280
280
|
numberPrefix: t,
|
|
281
281
|
...e?.chartConfig || {}
|
|
282
282
|
},
|
|
283
|
-
categories: [{ category:
|
|
283
|
+
categories: [{ category: r }],
|
|
284
284
|
dataset: [
|
|
285
285
|
{
|
|
286
|
-
seriesname:
|
|
286
|
+
seriesname: n,
|
|
287
287
|
color: l,
|
|
288
288
|
anchorRadius: "3",
|
|
289
289
|
anchorBgColor: "#FFFFFF",
|
|
290
290
|
anchorBorderColor: l,
|
|
291
291
|
anchorBorderThickness: "1",
|
|
292
|
-
data:
|
|
292
|
+
data: c
|
|
293
293
|
}
|
|
294
294
|
]
|
|
295
295
|
}
|
|
296
296
|
});
|
|
297
297
|
}, te = (e = {}) => {
|
|
298
298
|
const t = e.graphData;
|
|
299
|
-
return
|
|
299
|
+
return g({
|
|
300
300
|
type: "stackedbar2d",
|
|
301
|
-
width:
|
|
301
|
+
width: h,
|
|
302
302
|
height: e.height || "400",
|
|
303
303
|
dataSource: {
|
|
304
304
|
chart: {
|
|
@@ -312,9 +312,9 @@ const P = (e = {}) => {
|
|
|
312
312
|
});
|
|
313
313
|
}, ae = (e = {}) => {
|
|
314
314
|
const t = e.graphData;
|
|
315
|
-
return
|
|
315
|
+
return g({
|
|
316
316
|
type: "sankey",
|
|
317
|
-
width:
|
|
317
|
+
width: h,
|
|
318
318
|
height: e.height || "600",
|
|
319
319
|
dataSource: {
|
|
320
320
|
chart: {
|
|
@@ -339,36 +339,36 @@ const P = (e = {}) => {
|
|
|
339
339
|
}
|
|
340
340
|
});
|
|
341
341
|
}, le = (e = {}) => {
|
|
342
|
-
const a = e.graphData?.data || [],
|
|
343
|
-
if (!
|
|
344
|
-
|
|
345
|
-
else if (
|
|
346
|
-
const [
|
|
347
|
-
|
|
342
|
+
const a = e.graphData?.data || [], s = a.reduce((n, c) => n + (Number(c.value) || 0), 0), l = e.numberPrefix ?? "$", i = { ...e };
|
|
343
|
+
if (!i.defaultCenterLabel)
|
|
344
|
+
i.defaultCenterLabel = `Total{br}${l}${s}`;
|
|
345
|
+
else if (i.defaultCenterLabel.includes("{br}")) {
|
|
346
|
+
const [n] = i.defaultCenterLabel.split("{br}");
|
|
347
|
+
i.defaultCenterLabel = `${n}{br}${l}${s}`;
|
|
348
348
|
}
|
|
349
|
-
const
|
|
350
|
-
const d = Number(
|
|
349
|
+
const o = (e.palettecolors || $).split(",").map((n) => n.trim()), r = a.map((n, c) => {
|
|
350
|
+
const d = Number(n.value) || 0, x = s > 0 ? (d / s * 100).toFixed(2) : "0", y = n.color || o[c % o.length];
|
|
351
351
|
return {
|
|
352
|
-
...
|
|
353
|
-
displayValue: `${
|
|
354
|
-
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:
|
|
352
|
+
...n,
|
|
353
|
+
displayValue: `${l}${n.value} (${x}%){br}${n.label}`,
|
|
354
|
+
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${n.label}</div><div style='display:flex;justify-content:space-between;align-items:center;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:${y};display:inline-block'></span>${n.label}</span><b style='color:#2B2B2B'>${l}${d}</b></div>`
|
|
355
355
|
};
|
|
356
356
|
});
|
|
357
|
-
return
|
|
357
|
+
return g({
|
|
358
358
|
type: "doughnut2d",
|
|
359
359
|
width: e.width || "136",
|
|
360
360
|
height: e.height || "136",
|
|
361
361
|
dataSource: {
|
|
362
|
-
chart: G(
|
|
363
|
-
data:
|
|
362
|
+
chart: G(i),
|
|
363
|
+
data: r
|
|
364
364
|
}
|
|
365
365
|
});
|
|
366
366
|
}, ie = (e = {}) => {
|
|
367
367
|
const t = e.graphData;
|
|
368
|
-
return
|
|
368
|
+
return g({
|
|
369
369
|
type: "multiaxisline",
|
|
370
370
|
key: e.key,
|
|
371
|
-
width: e.width ||
|
|
371
|
+
width: e.width || h,
|
|
372
372
|
height: e.height || "400",
|
|
373
373
|
dataSource: {
|
|
374
374
|
chart: t?.chart || {},
|
|
@@ -378,7 +378,7 @@ const P = (e = {}) => {
|
|
|
378
378
|
});
|
|
379
379
|
}, oe = (e = {}) => {
|
|
380
380
|
const t = e.graphData;
|
|
381
|
-
return
|
|
381
|
+
return g({
|
|
382
382
|
type: "multilevelpie",
|
|
383
383
|
width: e.width || "550",
|
|
384
384
|
height: e.height || "350",
|
|
@@ -390,23 +390,23 @@ const P = (e = {}) => {
|
|
|
390
390
|
}, ne = (e = {}) => {
|
|
391
391
|
let t = [], a = [];
|
|
392
392
|
if (Array.isArray(e.graphData)) {
|
|
393
|
-
const
|
|
394
|
-
t =
|
|
393
|
+
const o = e.graphData;
|
|
394
|
+
t = o.map((r) => ({ label: r.label || "" })), a = [
|
|
395
395
|
{
|
|
396
396
|
seriesname: "Series 1",
|
|
397
|
-
data:
|
|
397
|
+
data: o.map((r) => ({ value: r.value }))
|
|
398
398
|
}
|
|
399
399
|
];
|
|
400
400
|
} else {
|
|
401
|
-
const
|
|
402
|
-
t =
|
|
403
|
-
...
|
|
404
|
-
seriesname:
|
|
405
|
-
data:
|
|
401
|
+
const o = e.graphData;
|
|
402
|
+
t = o?.category || [], a = (o?.dataset || []).map((r) => ({
|
|
403
|
+
...r,
|
|
404
|
+
seriesname: r.seriesname || "Series",
|
|
405
|
+
data: r.data || []
|
|
406
406
|
}));
|
|
407
407
|
}
|
|
408
|
-
const
|
|
409
|
-
...
|
|
408
|
+
const s = m(e.numberPrefix), l = a.some((o) => !!o.color), i = {
|
|
409
|
+
...L(e),
|
|
410
410
|
bgColor: e.bgColor || "#ffffff",
|
|
411
411
|
xAxisName: e.xAxisName,
|
|
412
412
|
yAxisName: e.yAxisName,
|
|
@@ -419,9 +419,9 @@ const P = (e = {}) => {
|
|
|
419
419
|
showLabels: e.showLabels || "1",
|
|
420
420
|
showLegend: "0",
|
|
421
421
|
skipOverlapLabels: "0",
|
|
422
|
-
numberPrefix:
|
|
422
|
+
numberPrefix: s,
|
|
423
423
|
numVDivLines: e.numVDivLines || "5",
|
|
424
|
-
palettecolors: l ? void 0 :
|
|
424
|
+
palettecolors: l ? void 0 : k(e.palettecolors),
|
|
425
425
|
maxLabelHeight: e.maxLabelHeight,
|
|
426
426
|
numbersuffix: e.numbersuffix || "",
|
|
427
427
|
labelStep: b(t.length, e.labelStep),
|
|
@@ -432,9 +432,9 @@ const P = (e = {}) => {
|
|
|
432
432
|
flatScrollBars: "1",
|
|
433
433
|
scrollPadding: "5"
|
|
434
434
|
};
|
|
435
|
-
return
|
|
435
|
+
return g({
|
|
436
436
|
type: "scrollcolumn2d",
|
|
437
|
-
width: e.width ||
|
|
437
|
+
width: e.width || h,
|
|
438
438
|
height: e.height || "400",
|
|
439
439
|
dataSource: {
|
|
440
440
|
chart: i,
|
|
@@ -443,14 +443,14 @@ const P = (e = {}) => {
|
|
|
443
443
|
}
|
|
444
444
|
});
|
|
445
445
|
}, se = (e = {}) => {
|
|
446
|
-
const t = e.graphLabel ? "" : m(e.numberPrefix), a = e.graphData,
|
|
447
|
-
...
|
|
448
|
-
plotToolText:
|
|
446
|
+
const t = e.graphLabel ? "" : m(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).some((o) => !!o.color), l = "<div class='stacked-tooltip-total' style='display:flex;justify-content:space-between;align-items:center;padding:8px 0 0;margin-top:4px;border-top:1px solid #eee;min-width:180px'><span style='color:#2B2B2B;font-weight:600'>Total</span><b style='color:#2B2B2B'>$sum</b></div>", i = (a?.dataset || []).map((o, r) => ({
|
|
447
|
+
...o,
|
|
448
|
+
plotToolText: r === 0 ? "<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:8px;border-bottom:1px solid #eee;margin-bottom:8px'>$label</div><div style='display:flex;justify-content:space-between;align-items:center;padding:4px 0;min-width:180px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:$color;display:inline-block'></span>$seriesName</span><b style='color:#2B2B2B'>$dataValue</b></div>" + l : "<div style='display:flex;justify-content:space-between;align-items:center;padding:4px 0;min-width:180px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:$color;display:inline-block'></span>$seriesName</span><b style='color:#2B2B2B'>$dataValue</b></div>" + l
|
|
449
449
|
}));
|
|
450
|
-
return
|
|
450
|
+
return g({
|
|
451
451
|
type: "scrollstackedcolumn2d",
|
|
452
452
|
key: e.key,
|
|
453
|
-
width: e.width ||
|
|
453
|
+
width: e.width || h,
|
|
454
454
|
height: e.height || "400",
|
|
455
455
|
dataSource: {
|
|
456
456
|
chart: {
|
|
@@ -463,7 +463,7 @@ const P = (e = {}) => {
|
|
|
463
463
|
interactiveLegend: e.interactiveLegend || "1",
|
|
464
464
|
drawCrossLine: e.drawCrossLine || "1",
|
|
465
465
|
bgColor: e.bgColor || "#ffffff",
|
|
466
|
-
palettecolors:
|
|
466
|
+
palettecolors: s ? void 0 : e.palettecolors || $,
|
|
467
467
|
numberPrefix: t,
|
|
468
468
|
numVDivLines: e.numVDivLines || "5",
|
|
469
469
|
labelStep: b(a?.category?.length, e.labelStep),
|
|
@@ -476,34 +476,34 @@ const P = (e = {}) => {
|
|
|
476
476
|
scrollPadding: "5"
|
|
477
477
|
},
|
|
478
478
|
categories: [{ category: a?.category || [] }],
|
|
479
|
-
dataset:
|
|
479
|
+
dataset: i
|
|
480
480
|
}
|
|
481
481
|
});
|
|
482
482
|
}, re = (e = {}) => {
|
|
483
|
-
const t = e.graphLabel ? "" : m(e.numberPrefix), a = e.graphData,
|
|
484
|
-
const d =
|
|
483
|
+
const t = e.graphLabel ? "" : m(e.numberPrefix), a = e.graphData, s = (a?.dataset || []).some((n) => !!n.color), l = (e.palettecolors || $).split(",").map((n) => n.trim()), i = a?.category || [], o = a?.dataset || [], r = o.map((n, c) => {
|
|
484
|
+
const d = n.color || l[c % l.length], x = n.data || [];
|
|
485
485
|
return {
|
|
486
|
-
...
|
|
486
|
+
...n,
|
|
487
487
|
color: d,
|
|
488
|
-
data: x.map((
|
|
489
|
-
const
|
|
490
|
-
if (
|
|
491
|
-
return { ...
|
|
492
|
-
const
|
|
493
|
-
const
|
|
494
|
-
return `<div style='display:flex;justify-content:space-between;align-items:center;padding:
|
|
488
|
+
data: x.map((y, C) => {
|
|
489
|
+
const u = i[C]?.label || "";
|
|
490
|
+
if (c > 0)
|
|
491
|
+
return { ...y, toolText: " " };
|
|
492
|
+
const w = o.map((f, p) => {
|
|
493
|
+
const B = f.color || l[p % l.length], D = (f.data || [])[C]?.value ?? "", S = f.seriesname || "";
|
|
494
|
+
return `<div style='display:flex;justify-content:space-between;align-items:center;padding:2px 0;min-width:200px'><span style='display:flex;align-items:center;gap:6px;color:#666'><span style='width:10px;height:10px;border-radius:2px;background-color:${B};display:inline-block'></span>${S}</span><b style='color:#2B2B2B'>${t}${D}</b></div>`;
|
|
495
495
|
}).join("");
|
|
496
496
|
return {
|
|
497
|
-
...
|
|
498
|
-
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:
|
|
497
|
+
...y,
|
|
498
|
+
toolText: `<div style='font-size:14px;font-weight:600;color:#2B2B2B;padding-bottom:4px;border-bottom:1px solid #eee;margin-bottom:4px'>${u}</div>${w}`
|
|
499
499
|
};
|
|
500
500
|
})
|
|
501
501
|
};
|
|
502
502
|
});
|
|
503
|
-
return
|
|
503
|
+
return g({
|
|
504
504
|
type: "mscombidy2d",
|
|
505
505
|
key: e.key,
|
|
506
|
-
width: e.width ||
|
|
506
|
+
width: e.width || h,
|
|
507
507
|
height: e.height || "400",
|
|
508
508
|
dataSource: {
|
|
509
509
|
chart: {
|
|
@@ -513,17 +513,17 @@ const P = (e = {}) => {
|
|
|
513
513
|
yAxisName: e.yAxisName,
|
|
514
514
|
numberPrefix: t,
|
|
515
515
|
labelStep: b(i.length, e.labelStep),
|
|
516
|
-
palettecolors:
|
|
516
|
+
palettecolors: s ? void 0 : e.palettecolors || $
|
|
517
517
|
},
|
|
518
518
|
categories: [{ category: i }],
|
|
519
|
-
dataset:
|
|
519
|
+
dataset: r
|
|
520
520
|
}
|
|
521
521
|
});
|
|
522
522
|
}, ce = (e = {}) => {
|
|
523
|
-
const t = e.graphLabel ? "" : m(e.numberPrefix), a = e.graphData,
|
|
524
|
-
return
|
|
523
|
+
const t = e.graphLabel ? "" : m(e.numberPrefix), a = e.graphData, s = a?.category || [], l = a?.dataset || [];
|
|
524
|
+
return g({
|
|
525
525
|
type: "scrollline2d",
|
|
526
|
-
width: e?.width ||
|
|
526
|
+
width: e?.width || h,
|
|
527
527
|
height: e?.height || "400",
|
|
528
528
|
dataSource: {
|
|
529
529
|
chart: {
|
|
@@ -541,10 +541,10 @@ const P = (e = {}) => {
|
|
|
541
541
|
flatScrollBars: "1",
|
|
542
542
|
scrollPadding: "5",
|
|
543
543
|
numDivLines: "5",
|
|
544
|
-
labelStep: b(
|
|
544
|
+
labelStep: b(s.length, e?.labelStep),
|
|
545
545
|
...e?.chartConfig || {}
|
|
546
546
|
},
|
|
547
|
-
categories: [{ category:
|
|
547
|
+
categories: [{ category: s }],
|
|
548
548
|
dataset: l
|
|
549
549
|
}
|
|
550
550
|
});
|