vue-data-ui 2.17.0 → 2.17.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/README.md +2 -1
- package/dist/{Arrow-BAEkZGzL.js → Arrow-Dr2lyXds.js} +1 -1
- package/dist/{BaseDraggableDialog-ChCkcmj_.js → BaseDraggableDialog-DQ6yA8di.js} +2 -2
- package/dist/{BaseIcon-naqtCxVi.js → BaseIcon-C2f-EcZc.js} +1 -1
- package/dist/{ColorPicker-CfIPgxcj.js → ColorPicker-D-JmDe31.js} +2 -2
- package/dist/{DataTable-D0VYDhfx.js → DataTable-6BxhjBzt.js} +2 -2
- package/dist/{Legend-Bxlv67uY.js → Legend-1R-B-7st.js} +11 -11
- package/dist/{NonSvgPenAndPaper-b_oVy-Dd.js → NonSvgPenAndPaper-CLNy5uCL.js} +3 -3
- package/dist/{PackageVersion-5TR4ocqp.js → PackageVersion-CIX1W_aa.js} +1 -1
- package/dist/{PenAndPaper-D6AqipIO.js → PenAndPaper-CqJ4wudB.js} +3 -3
- package/dist/{Shape-DtFT5EJa.js → Shape-DJKQgAbU.js} +1 -1
- package/dist/{Slicer-CL6-MRI6.js → Slicer-Dju6LE-h.js} +2 -2
- package/dist/{SparkTooltip-Bcv1aoA5.js → SparkTooltip-D2mROH3o.js} +1 -1
- package/dist/{Title-B-2bV0SW.js → Title-BQb7X_OR.js} +1 -1
- package/dist/{Tooltip-CoQnTnr-.js → Tooltip-BTnTpPdO.js} +1 -1
- package/dist/{UserOptions-Dd34lEKb.js → UserOptions-lneAyZKu.js} +2 -2
- package/dist/{dom-to-png-2AA0wHlX.js → dom-to-png-C-9BWdwN.js} +1 -1
- package/dist/{img-Y_hYz-ZC.js → img-D0DpKcFX.js} +1 -1
- package/dist/{index-pPGk-uhD.js → index-JzUbx__y.js} +22 -8
- package/dist/{pdf-yfk3d1is.js → pdf-BgVDfZPT.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +65 -160
- package/dist/types/vue-data-ui.d.ts +65 -160
- package/dist/{useNestedProp-DjACxgdZ.js → useNestedProp-D_jd2dz9.js} +1 -1
- package/dist/{usePrinter-DDHcrl0A.js → usePrinter-CsyliflB.js} +2 -2
- package/dist/{vue-data-ui-CIWxgKjd.js → vue-data-ui-BMv8hEcb.js} +99 -97
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-D5Wpdqfk.js → vue-ui-3d-bar-CrdssfKx.js} +41 -34
- package/dist/{vue-ui-accordion-CVnA550V.js → vue-ui-accordion-CcTUbiHq.js} +3 -3
- package/dist/{vue-ui-age-pyramid-BuAl-zC5.js → vue-ui-age-pyramid-ZYFAAcwc.js} +134 -127
- package/dist/{vue-ui-annotator-gl2A20m3.js → vue-ui-annotator-BEgBoRWQ.js} +2 -2
- package/dist/{vue-ui-bullet-D-VMKpwe.js → vue-ui-bullet-DYzLfkYB.js} +90 -83
- package/dist/{vue-ui-candlestick-1r6YwiUV.js → vue-ui-candlestick-Cdu2ozig.js} +101 -94
- package/dist/{vue-ui-carousel-table-B6UJoNtP.js → vue-ui-carousel-table-Dce2wfVw.js} +4 -4
- package/dist/{vue-ui-chestnut-DnlBYpC5.js → vue-ui-chestnut-CCMAbLrw.js} +270 -263
- package/dist/{vue-ui-chord-D3kpzYjp.js → vue-ui-chord-B8Sl_FwD.js} +60 -53
- package/dist/{vue-ui-circle-pack-CHgdpoYu.js → vue-ui-circle-pack-BX6_ToJl.js} +121 -114
- package/dist/{vue-ui-cursor-63EAvElT.js → vue-ui-cursor-CyaF0qp7.js} +2 -2
- package/dist/{vue-ui-dashboard-Da6CPET-.js → vue-ui-dashboard-BmL_vnj5.js} +62 -62
- package/dist/{vue-ui-digits-CA8pUKej.js → vue-ui-digits-BRKjd-LQ.js} +2 -2
- package/dist/vue-ui-donut-LZR-vpdS.js +1338 -0
- package/dist/{vue-ui-donut-evolution-qeBEA4W8.js → vue-ui-donut-evolution-dax3dN9r.js} +215 -211
- package/dist/{vue-ui-dumbbell-Bm0PvAKT.js → vue-ui-dumbbell-C7ZNBVSy.js} +117 -110
- package/dist/{vue-ui-flow-C2dqXvrU.js → vue-ui-flow-BeLwkeHo.js} +105 -98
- package/dist/{vue-ui-funnel-Dvy5rRld.js → vue-ui-funnel-BywaRLZR.js} +138 -131
- package/dist/{vue-ui-galaxy-Y8LYp5n2.js → vue-ui-galaxy-DYavEd4o.js} +150 -146
- package/dist/{vue-ui-gauge-BBo0jWAP.js → vue-ui-gauge-DwQRlRWp.js} +125 -118
- package/dist/{vue-ui-gizmo-DjXfTOWn.js → vue-ui-gizmo-CjRczit6.js} +3 -3
- package/dist/{vue-ui-heatmap-BbxRpltP.js → vue-ui-heatmap-cRy0tcES.js} +155 -148
- package/dist/{vue-ui-history-plot-ChYf3Nvc.js → vue-ui-history-plot-D8aTdU23.js} +141 -134
- package/dist/{vue-ui-kpi-Vfc5-JnE.js → vue-ui-kpi-B10h_Hbt.js} +3 -3
- package/dist/{vue-ui-mini-loader-C0-Nsz8K.js → vue-ui-mini-loader-DNhr_0fr.js} +2 -2
- package/dist/{vue-ui-molecule-B7Yu7vzF.js → vue-ui-molecule-4MeyWn0c.js} +141 -134
- package/dist/{vue-ui-mood-radar-C8JUTwNw.js → vue-ui-mood-radar-DJmgRVT2.js} +126 -119
- package/dist/vue-ui-nested-donuts-CgaPLxV2.js +1177 -0
- package/dist/{vue-ui-onion-D4U7TL_N.js → vue-ui-onion-swDxtTT3.js} +88 -81
- package/dist/{vue-ui-parallel-coordinate-plot-CXMT7Rjr.js → vue-ui-parallel-coordinate-plot-DayzzOmK.js} +123 -116
- package/dist/{vue-ui-quadrant-B13pTVVZ.js → vue-ui-quadrant-CLf81ioF.js} +151 -144
- package/dist/{vue-ui-quick-chart-C0UL4o63.js → vue-ui-quick-chart-smKrpIwq.js} +39 -32
- package/dist/{vue-ui-radar-XpdiXnhz.js → vue-ui-radar-D8CIvG2q.js} +58 -51
- package/dist/{vue-ui-rating-CM8ZrUb1.js → vue-ui-rating-YZivkWBI.js} +2 -2
- package/dist/{vue-ui-relation-circle-CYoFNekk.js → vue-ui-relation-circle-DsEYbNs_.js} +127 -120
- package/dist/{vue-ui-ridgeline-QUquE6ck.js → vue-ui-ridgeline-Do6C5lMY.js} +98 -91
- package/dist/{vue-ui-rings-DwT0IfOh.js → vue-ui-rings-CMryJR1g.js} +208 -204
- package/dist/{vue-ui-scatter-zDpy1udm.js → vue-ui-scatter-BtLKWQbX.js} +172 -165
- package/dist/{vue-ui-skeleton-DJPjyNYn.js → vue-ui-skeleton-B4KQLEQy.js} +3 -3
- package/dist/{vue-ui-smiley-DoDXl6k0.js → vue-ui-smiley-CZBuA-1x.js} +2 -2
- package/dist/{vue-ui-spark-trend-CniV6Cpr.js → vue-ui-spark-trend-CdgyexDu.js} +3 -3
- package/dist/{vue-ui-sparkbar-Ds2ITgwn.js → vue-ui-sparkbar-DuZulYgD.js} +3 -3
- package/dist/{vue-ui-sparkgauge-CosfK-kw.js → vue-ui-sparkgauge-Di0FmUXs.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-C7O1wPAJ.js → vue-ui-sparkhistogram-CHNHz9Gm.js} +4 -4
- package/dist/{vue-ui-sparkline-B_iUj3F2.js → vue-ui-sparkline-TaWMi8gF.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-DBhWrysr.js → vue-ui-sparkstackbar-Bv2HEegT.js} +3 -3
- package/dist/{vue-ui-stackbar-C3aV4IcL.js → vue-ui-stackbar-Bk3Bbzjk.js} +61 -54
- package/dist/{vue-ui-strip-plot-Bvr1GAzH.js → vue-ui-strip-plot-BNMDY4GI.js} +116 -109
- package/dist/{vue-ui-table-DQKKRgyo.js → vue-ui-table-JG0B8HuS.js} +3 -3
- package/dist/{vue-ui-table-heatmap-Dyqj5XJC.js → vue-ui-table-heatmap-CCdWeNZj.js} +5 -5
- package/dist/{vue-ui-table-sparkline-D4RubyLj.js → vue-ui-table-sparkline-C1u_b0RG.js} +4 -4
- package/dist/{vue-ui-thermometer-B0FKI5cG.js → vue-ui-thermometer-DkldIXw7.js} +88 -81
- package/dist/{vue-ui-timer-DUCBRIl-.js → vue-ui-timer-0KDTN-Gt.js} +5 -5
- package/dist/{vue-ui-tiremarks-CRt4UQZD.js → vue-ui-tiremarks-FPtGzTGi.js} +127 -120
- package/dist/vue-ui-treemap-BA5wC5Bs.js +965 -0
- package/dist/{vue-ui-vertical-bar-C5fPYltO.js → vue-ui-vertical-bar-DUJWYMRn.js} +233 -226
- package/dist/{vue-ui-waffle-BpWLlfpg.js → vue-ui-waffle-BIngg99N.js} +183 -179
- package/dist/{vue-ui-wheel-CTzuCroy.js → vue-ui-wheel-l5U2UH9c.js} +121 -114
- package/dist/{vue-ui-word-cloud-BPokdaP1.js → vue-ui-word-cloud-CTKuxhFY.js} +152 -145
- package/dist/{vue-ui-world-CS6k-oil.js → vue-ui-world-Dx5O9Is5.js} +77 -70
- package/dist/{vue-ui-xy-CQ425kLR.js → vue-ui-xy-JjA1CMAo.js} +229 -222
- package/dist/{vue-ui-xy-canvas-D2IFwAr7.js → vue-ui-xy-canvas-CH82b2Lp.js} +154 -147
- package/package.json +1 -1
- package/dist/vue-ui-donut-CKa7nFjt.js +0 -1324
- package/dist/vue-ui-nested-donuts-D0RgFifU.js +0 -1163
- package/dist/vue-ui-treemap-CWP5nYDx.js +0 -961
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineAsyncComponent as Q, ref as d, computed as
|
|
2
|
-
import { u as Ka, c as Qa, t as el, p as V, a as al, C as me, b as ll, D as Me, i as ae, f as le, d as ia, a2 as tl, G as ol, aj as rl, o as ul, e as sl, x as va, q as nl, r as il, y as vl, s as ve, l as cl } from "./index-
|
|
3
|
-
import { d as dl, t as hl, u as yl, c as fl, a as ca, l as
|
|
4
|
-
import { u as ha } from "./useNestedProp-
|
|
5
|
-
import { u as gl } from "./usePrinter-
|
|
1
|
+
import { defineAsyncComponent as Q, ref as d, computed as L, useSlots as Va, onMounted as sa, watch as D, nextTick as pe, shallowRef as Ie, onBeforeUnmount as Ga, createElementBlock as ne, openBlock as S, unref as p, normalizeClass as Za, normalizeStyle as ee, createCommentVNode as X, createBlock as N, createElementVNode as ie, createSlots as ja, withCtx as x, renderSlot as k, normalizeProps as B, guardReactiveProps as _, createVNode as qa, toDisplayString as na, createTextVNode as Ja } from "vue";
|
|
2
|
+
import { u as Ka, c as Qa, t as el, p as V, a as al, C as me, b as ll, D as Me, i as ae, f as le, d as ia, a2 as tl, G as ol, aj as rl, o as ul, e as sl, x as va, q as nl, r as il, y as vl, s as ve, l as cl } from "./index-JzUbx__y.js";
|
|
3
|
+
import { d as dl, t as hl, u as yl, c as fl, a as ca, l as C, r as Te, b as R, p as da } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as ha } from "./useNestedProp-D_jd2dz9.js";
|
|
5
|
+
import { u as gl } from "./usePrinter-CsyliflB.js";
|
|
6
6
|
import { u as pl } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
7
|
import { u as ml } from "./useChartAccessibility-9icAAmYg.js";
|
|
8
|
-
import bl from "./Legend-
|
|
9
|
-
import xl from "./Title-
|
|
10
|
-
import { S as Ll } from "./Slicer-
|
|
8
|
+
import bl from "./Legend-1R-B-7st.js";
|
|
9
|
+
import xl from "./Title-BQb7X_OR.js";
|
|
10
|
+
import { S as Ll } from "./Slicer-Dju6LE-h.js";
|
|
11
11
|
import { u as kl } from "./useTimeLabels-Mrr0jrpL.js";
|
|
12
|
-
import Cl from "./img-
|
|
12
|
+
import Cl from "./img-D0DpKcFX.js";
|
|
13
13
|
import { _ as wl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const Sl = ["id"], zl = ["onClick"], $l = {
|
|
15
15
|
key: 2,
|
|
@@ -32,11 +32,11 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
32
32
|
},
|
|
33
33
|
emits: ["selectLegend"],
|
|
34
34
|
setup(Oe, { expose: ya, emit: fa }) {
|
|
35
|
-
const ga = Q(() => import("./vue-ui-accordion-
|
|
35
|
+
const ga = Q(() => import("./vue-ui-accordion-CcTUbiHq.js")), pa = Q(() => import("./DataTable-6BxhjBzt.js")), ma = Q(() => import("./NonSvgPenAndPaper-CLNy5uCL.js")), ba = Q(() => import("./vue-ui-skeleton-B4KQLEQy.js")), xa = Q(() => import("./Tooltip-BTnTpPdO.js")), La = Q(() => import("./UserOptions-lneAyZKu.js")), { vue_ui_xy_canvas: ka } = Ka(), g = Oe, be = d(Qa()), P = d(null), te = d(null), s = d(null), y = d(1), E = d(1), ce = d(!1), c = d(null), de = d(""), Re = d(null), $ = d([]), G = d(1), H = d(!0), Z = d(!0), xe = d(null), Pe = d(0), Ee = d(0), he = d(!1), Fe = d(null), Ae = d(null), De = d(null), Ne = d(null), Le = d(0), ke = d(0), Ce = d(0), M = d(null), we = L(() => !!g.dataset && g.dataset.length), Ca = fa, wa = Va();
|
|
36
36
|
sa(() => {
|
|
37
37
|
wa["chart-background"] && console.warn("VueUiXyCanvas does not support the #chart-background slot.");
|
|
38
38
|
});
|
|
39
|
-
const a =
|
|
39
|
+
const a = L({
|
|
40
40
|
get: () => Ue(),
|
|
41
41
|
set: (e) => e
|
|
42
42
|
}), { userOptionsVisible: Se, setUserOptionsVisibility: He, keepUserOptionState: Ye } = pl({ config: a.value }), { svgRef: T } = ml({ config: a.value.style.chart.title });
|
|
@@ -54,12 +54,12 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
54
54
|
customPalette: el[e.theme] || V
|
|
55
55
|
} : l = e, g.config && me(g.config, "style.chart.scale.min") ? l.style.chart.scale.min = g.config.style.chart.scale.min : l.style.chart.scale.min = null, g.config && me(g.config, "style.chart.scale.max") ? l.style.chart.scale.max = g.config.style.chart.scale.max : l.style.chart.scale.max = null, g.config && me(g.config, "style.chart.zoom.startIndex") ? l.style.chart.zoom.startIndex = g.config.style.chart.zoom.startIndex : l.style.chart.zoom.startIndex = null, g.config && me(g.config, "style.chart.zoom.endIndex") ? l.style.chart.zoom.endIndex = g.config.style.chart.zoom.endIndex : l.style.chart.zoom.endIndex = null, l;
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
D(() => g.config, (e) => {
|
|
58
58
|
a.value = Ue(), Se.value = !a.value.userOptions.showOnChartHover, ze(), Le.value += 1, ke.value += 1, Ce.value += 1, u.value.showTable = a.value.table.show, u.value.showDataLabels = a.value.style.chart.dataLabels.show, u.value.stacked = a.value.style.chart.stacked, u.value.showTooltip = a.value.style.chart.tooltip.show;
|
|
59
|
-
}, { deep: !0 }),
|
|
59
|
+
}, { deep: !0 }), D(() => g.dataset, () => {
|
|
60
60
|
ze(), Le.value += 1, ke.value += 1, Ce.value += 1;
|
|
61
61
|
}, { deep: !0 });
|
|
62
|
-
const We = d(a.value.style.chart.aspectRatio), { isPrinting: Xe, isImaging:
|
|
62
|
+
const We = d(a.value.style.chart.aspectRatio), { isPrinting: Xe, isImaging: Be, generatePdf: _e, generateImage: Ve } = gl({
|
|
63
63
|
elementId: `xy_canvas_${be.value}`,
|
|
64
64
|
fileName: a.value.style.chart.title.text || "vue-ui-xy-canvas",
|
|
65
65
|
options: a.value.userOptions.print
|
|
@@ -72,51 +72,51 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
72
72
|
function Ge(e) {
|
|
73
73
|
he.value = e, Ee.value += 1;
|
|
74
74
|
}
|
|
75
|
-
const Ze =
|
|
75
|
+
const Ze = L(() => ll(a.value.customPalette)), I = L(() => j.value ? Math.max(...j.value.filter((e, l) => !$.value.includes(e.absoluteIndex)).map((e) => e.series.length)) : 0), t = L(() => {
|
|
76
76
|
const e = y.value - y.value * (a.value.style.chart.paddingProportions.left + a.value.style.chart.paddingProportions.right);
|
|
77
77
|
return {
|
|
78
78
|
canvasWidth: y.value,
|
|
79
|
-
canvasHeight:
|
|
79
|
+
canvasHeight: E.value,
|
|
80
80
|
left: y.value * a.value.style.chart.paddingProportions.left,
|
|
81
|
-
top:
|
|
81
|
+
top: E.value * a.value.style.chart.paddingProportions.top,
|
|
82
82
|
right: y.value - y.value * a.value.style.chart.paddingProportions.right,
|
|
83
|
-
bottom:
|
|
83
|
+
bottom: E.value - E.value * a.value.style.chart.paddingProportions.bottom,
|
|
84
84
|
width: e,
|
|
85
|
-
height:
|
|
85
|
+
height: E.value - E.value * (a.value.style.chart.paddingProportions.top + a.value.style.chart.paddingProportions.bottom),
|
|
86
86
|
slot: e / (r.value.end - r.value.start)
|
|
87
87
|
};
|
|
88
88
|
});
|
|
89
89
|
function je(e, l) {
|
|
90
90
|
return e / l;
|
|
91
91
|
}
|
|
92
|
-
function Sa({ hasAutoScale: e, series: l, min: o, max: n, scale:
|
|
92
|
+
function Sa({ hasAutoScale: e, series: l, min: o, max: n, scale: i, yOffset: b, individualHeight: v, stackIndex: f = null }) {
|
|
93
93
|
return l.map((U, z) => {
|
|
94
|
-
const
|
|
94
|
+
const A = i.min < 0 ? Math.abs(i.min) : 0, W = je(U + A, A + i.max);
|
|
95
95
|
let ue, se;
|
|
96
|
-
e && (ue =
|
|
96
|
+
e && (ue = i.min, se = je(U - ue, i.max - ue));
|
|
97
97
|
let O = 0;
|
|
98
|
-
return f === null ? O = t.value.bottom - t.value.height * (e ? se : W) : O = t.value.bottom -
|
|
98
|
+
return f === null ? O = t.value.bottom - t.value.height * (e ? se : W) : O = t.value.bottom - b - v * (e ? se : W), {
|
|
99
99
|
x: t.value.left + t.value.slot * z + t.value.slot / 2,
|
|
100
100
|
y: O,
|
|
101
101
|
value: U
|
|
102
102
|
};
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
-
const m =
|
|
106
|
-
const e = a.value.style.chart.scale.min !== null ? a.value.style.chart.scale.min : Math.min(...j.value.filter((
|
|
107
|
-
y: t.value.bottom - t.value.height * ((
|
|
105
|
+
const m = L(() => {
|
|
106
|
+
const e = a.value.style.chart.scale.min !== null ? a.value.style.chart.scale.min : Math.min(...j.value.filter((v, f) => !$.value.includes(v.absoluteIndex)).flatMap((v) => v.series.slice(r.value.start, r.value.end))), l = a.value.style.chart.scale.max !== null ? a.value.style.chart.scale.max : Math.max(...j.value.filter((v, f) => !$.value.includes(v.absoluteIndex)).flatMap((v) => v.series.slice(r.value.start, r.value.end))), o = Me(e < 0 ? e : 0, l === e ? e + 1 < 0 ? 0 : e + 1 : l < 0 ? 0 : l, a.value.style.chart.scale.ticks), n = o.min < 0 ? Math.abs(o.min) : 0, i = t.value.bottom - t.value.height * (n / (o.max + n)), b = o.ticks.map((v) => ({
|
|
107
|
+
y: t.value.bottom - t.value.height * ((v + n) / (o.max + n)),
|
|
108
108
|
x: t.value.left - 8,
|
|
109
|
-
value:
|
|
109
|
+
value: v
|
|
110
110
|
}));
|
|
111
111
|
return {
|
|
112
112
|
absoluteMin: n,
|
|
113
113
|
max: l,
|
|
114
114
|
min: e,
|
|
115
115
|
scale: o,
|
|
116
|
-
yLabels:
|
|
117
|
-
zero:
|
|
116
|
+
yLabels: b,
|
|
117
|
+
zero: i
|
|
118
118
|
};
|
|
119
|
-
}), za =
|
|
119
|
+
}), za = L(() => h.value.map((e) => `
|
|
120
120
|
<div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
|
|
121
121
|
<svg viewBox="0 0 10 10" height="12" width="12">
|
|
122
122
|
<circle cx="5" cy="5" r="5" fill="${e.color}"/>
|
|
@@ -134,7 +134,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
134
134
|
{ datapoint: e, seriesIndex: c.value }
|
|
135
135
|
)}</span>
|
|
136
136
|
</div>
|
|
137
|
-
`)), j =
|
|
137
|
+
`)), j = L(() => g.dataset.map((e, l) => ({
|
|
138
138
|
...e,
|
|
139
139
|
series: tl({
|
|
140
140
|
data: ol(e.series),
|
|
@@ -143,26 +143,26 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
143
143
|
absoluteIndex: l,
|
|
144
144
|
color: ia(e.color || Ze.value[l] || V[l] || V[l % V.length])
|
|
145
145
|
})));
|
|
146
|
-
|
|
146
|
+
D(I, (e) => {
|
|
147
147
|
e && qe();
|
|
148
148
|
});
|
|
149
|
-
const h =
|
|
149
|
+
const h = L(() => rl(j.value.filter((e, l) => !$.value.includes(e.absoluteIndex))).map((e, l) => ({
|
|
150
150
|
...e,
|
|
151
151
|
series: e.series.slice(r.value.start, r.value.end)
|
|
152
152
|
})).map((e, l) => {
|
|
153
153
|
let o = [null, void 0].includes(e.scaleMin) ? Math.min(...e.series) || 0 : e.scaleMin, n = [null, void 0].includes(e.scaleMax) ? Math.max(...e.series) || 1 : e.scaleMax;
|
|
154
154
|
o === n && (o = o >= 0 ? n - 1 : o, n = n >= 0 ? n : o + 1), e.series.filter((O) => ![null, void 0].includes(O)).map((O) => (O - o) / (n - o));
|
|
155
|
-
const
|
|
155
|
+
const i = {
|
|
156
156
|
valueMin: o,
|
|
157
157
|
valueMax: n
|
|
158
|
-
},
|
|
159
|
-
let
|
|
160
|
-
e.autoScaling ?
|
|
161
|
-
const f = u.value.stacked ? t.value.height * (1 - e.cumulatedStackRatio) : 0, U = u.value.stacked ? t.value.height / a.value.style.chart.stackGap : 0, z = u.value.stacked ? t.value.height * e.stackRatio - U : t.value.height,
|
|
158
|
+
}, b = e.scaleSteps || a.value.style.chart.scale.ticks;
|
|
159
|
+
let v;
|
|
160
|
+
e.autoScaling ? v = Me(i.valueMin, i.valueMax, b) : v = Me(i.valueMin < 0 ? i.valueMin : 0, i.valueMax <= 0 ? 0 : i.valueMax, b);
|
|
161
|
+
const f = u.value.stacked ? t.value.height * (1 - e.cumulatedStackRatio) : 0, U = u.value.stacked ? t.value.height / a.value.style.chart.stackGap : 0, z = u.value.stacked ? t.value.height * e.stackRatio - U : t.value.height, A = v.min < 0 ? Math.abs(v.min) : 0;
|
|
162
162
|
let W;
|
|
163
|
-
e.autoScaling && u.value.stacked && n <= 0 ? W = t.value.bottom - f - z : W = t.value.bottom - f - z * (
|
|
164
|
-
const ue =
|
|
165
|
-
y: t.value.bottom - f - z * (
|
|
163
|
+
e.autoScaling && u.value.stacked && n <= 0 ? W = t.value.bottom - f - z : W = t.value.bottom - f - z * (A / (v.max + A));
|
|
164
|
+
const ue = v.ticks.map((O, _a) => ({
|
|
165
|
+
y: t.value.bottom - f - z * (_a / (v.ticks.length - 1)),
|
|
166
166
|
x: t.value.left - 8,
|
|
167
167
|
value: O
|
|
168
168
|
})), se = Sa({
|
|
@@ -170,7 +170,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
170
170
|
series: e.series,
|
|
171
171
|
min: u.value.stacked ? o : m.value.min,
|
|
172
172
|
max: u.value.stacked ? n : m.value.max,
|
|
173
|
-
scale: u.value.stacked ?
|
|
173
|
+
scale: u.value.stacked ? v : m.value.scale,
|
|
174
174
|
yOffset: f,
|
|
175
175
|
individualHeight: z,
|
|
176
176
|
stackIndex: u.value.stacked ? l : null
|
|
@@ -180,9 +180,9 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
180
180
|
coordinatesLine: se,
|
|
181
181
|
min: o,
|
|
182
182
|
max: n,
|
|
183
|
-
localScale:
|
|
183
|
+
localScale: v,
|
|
184
184
|
localZero: W,
|
|
185
|
-
localMin:
|
|
185
|
+
localMin: A,
|
|
186
186
|
localYLabels: ue,
|
|
187
187
|
yOffset: f,
|
|
188
188
|
individualHeight: z
|
|
@@ -205,18 +205,18 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
205
205
|
const l = I.value;
|
|
206
206
|
return e > l ? l : e < 0 || a.value.style.chart.zoom.startIndex !== null && e < a.value.style.chart.zoom.startIndex ? a.value.style.chart.zoom.startIndex !== null ? a.value.style.chart.zoom.startIndex + 1 : 1 : e;
|
|
207
207
|
}
|
|
208
|
-
const Ia =
|
|
208
|
+
const Ia = L(() => h.value.filter((e) => ["line", "plot", void 0].includes(e.type))), w = L(() => h.value.filter((e) => e.type === "bar"));
|
|
209
209
|
function Ma() {
|
|
210
210
|
if (!T.value)
|
|
211
211
|
return;
|
|
212
212
|
const e = te.value.offsetWidth, l = te.value.offsetHeight;
|
|
213
|
-
T.value.width = e * G.value * 2, T.value.height = l * G.value * 2, y.value = e * G.value * 2,
|
|
213
|
+
T.value.width = e * G.value * 2, T.value.height = l * G.value * 2, y.value = e * G.value * 2, E.value = l * G.value * 2, s.value.scale(G.value, G.value), oe();
|
|
214
214
|
}
|
|
215
215
|
function Ta() {
|
|
216
216
|
if (s.value.clearRect(0, 0, 1e4, 1e4), s.value.fillStyle = a.value.style.chart.backgroundColor, s.value.fillRect(0, 0, t.value.canvasWidth, t.value.canvasHeight), u.value.stacked)
|
|
217
217
|
a.value.style.chart.grid.y.verticalLines.show && r.value.end - r.value.start < a.value.style.chart.grid.y.verticalLines.hideUnderXLength ? h.value.forEach((e) => {
|
|
218
218
|
for (let l = 0; l < r.value.end - r.value.start + 1; l += 1)
|
|
219
|
-
|
|
219
|
+
C(
|
|
220
220
|
s.value,
|
|
221
221
|
[
|
|
222
222
|
{
|
|
@@ -234,7 +234,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
234
234
|
);
|
|
235
235
|
}) : a.value.style.chart.grid.y.verticalLines.show && r.value.end - r.value.start >= a.value.style.chart.grid.y.verticalLines.hideUnderXLength && h.value.forEach((e) => {
|
|
236
236
|
for (let l = r.value.start; l < r.value.end; l += 1)
|
|
237
|
-
l % Math.floor((r.value.end - r.value.start) / a.value.style.chart.grid.y.timeLabels.modulo) === 0 &&
|
|
237
|
+
l % Math.floor((r.value.end - r.value.start) / a.value.style.chart.grid.y.timeLabels.modulo) === 0 && C(
|
|
238
238
|
s.value,
|
|
239
239
|
[
|
|
240
240
|
{
|
|
@@ -268,7 +268,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
268
268
|
});
|
|
269
269
|
}) : h.value.forEach((e) => {
|
|
270
270
|
e.localYLabels.slice(r.value.start, r.value.end).forEach((l) => {
|
|
271
|
-
|
|
271
|
+
C(
|
|
272
272
|
s.value,
|
|
273
273
|
[
|
|
274
274
|
{ x: t.value.left, y: l.y },
|
|
@@ -280,7 +280,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
280
280
|
);
|
|
281
281
|
});
|
|
282
282
|
})), a.value.style.chart.grid.zeroLine.show && h.value.forEach((e) => {
|
|
283
|
-
|
|
283
|
+
C(
|
|
284
284
|
s.value,
|
|
285
285
|
[
|
|
286
286
|
{ x: t.value.left, y: e.localZero },
|
|
@@ -292,7 +292,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
292
292
|
}
|
|
293
293
|
);
|
|
294
294
|
}), a.value.style.chart.grid.y.axisLabels.show && h.value.forEach((e) => {
|
|
295
|
-
|
|
295
|
+
C(
|
|
296
296
|
s.value,
|
|
297
297
|
[
|
|
298
298
|
{ x: t.value.left, y: t.value.bottom - e.yOffset },
|
|
@@ -301,7 +301,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
301
301
|
{
|
|
302
302
|
color: e.color
|
|
303
303
|
}
|
|
304
|
-
),
|
|
304
|
+
), C(
|
|
305
305
|
s.value,
|
|
306
306
|
[
|
|
307
307
|
{ x: t.value.right, y: t.value.bottom - e.yOffset },
|
|
@@ -328,7 +328,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
328
328
|
else {
|
|
329
329
|
if (a.value.style.chart.grid.y.verticalLines.show && r.value.end - r.value.start < a.value.style.chart.grid.y.verticalLines.hideUnderXLength)
|
|
330
330
|
for (let e = 0; e < r.value.end - r.value.start + 1; e += 1)
|
|
331
|
-
|
|
331
|
+
C(
|
|
332
332
|
s.value,
|
|
333
333
|
[
|
|
334
334
|
{ x: t.value.left + t.value.slot * e, y: t.value.top },
|
|
@@ -340,7 +340,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
340
340
|
);
|
|
341
341
|
else if (a.value.style.chart.grid.y.verticalLines.show && r.value.end - r.value.start >= a.value.style.chart.grid.y.verticalLines.hideUnderXLength)
|
|
342
342
|
for (let e = r.value.start; e < r.value.end; e += 1)
|
|
343
|
-
e % Math.floor((r.value.end - r.value.start) / a.value.style.chart.grid.y.timeLabels.modulo) === 0 &&
|
|
343
|
+
e % Math.floor((r.value.end - r.value.start) / a.value.style.chart.grid.y.timeLabels.modulo) === 0 && C(
|
|
344
344
|
s.value,
|
|
345
345
|
[
|
|
346
346
|
{ x: t.value.left + t.value.slot * (e - r.value.start) + t.value.slot / 2, y: t.value.top },
|
|
@@ -365,7 +365,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
365
365
|
}
|
|
366
366
|
);
|
|
367
367
|
}) : m.value.yLabels.forEach((e) => {
|
|
368
|
-
|
|
368
|
+
C(
|
|
369
369
|
s.value,
|
|
370
370
|
[
|
|
371
371
|
{ x: t.value.left, y: e.y },
|
|
@@ -375,7 +375,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
375
375
|
color: a.value.style.chart.grid.x.horizontalLines.color
|
|
376
376
|
}
|
|
377
377
|
);
|
|
378
|
-
})), a.value.style.chart.grid.y.showAxis &&
|
|
378
|
+
})), a.value.style.chart.grid.y.showAxis && C(
|
|
379
379
|
s.value,
|
|
380
380
|
[
|
|
381
381
|
{ x: t.value.left, y: t.value.top },
|
|
@@ -385,7 +385,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
385
385
|
color: a.value.style.chart.grid.y.axisColor,
|
|
386
386
|
lineWidth: a.value.style.chart.grid.y.axisThickness
|
|
387
387
|
}
|
|
388
|
-
), a.value.style.chart.grid.x.showAxis &&
|
|
388
|
+
), a.value.style.chart.grid.x.showAxis && C(
|
|
389
389
|
s.value,
|
|
390
390
|
[
|
|
391
391
|
{ x: t.value.left, y: t.value.bottom },
|
|
@@ -395,7 +395,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
395
395
|
color: a.value.style.chart.grid.x.axisColor,
|
|
396
396
|
lineWidth: a.value.style.chart.grid.x.axisThickness
|
|
397
397
|
}
|
|
398
|
-
), a.value.style.chart.grid.zeroLine.show &&
|
|
398
|
+
), a.value.style.chart.grid.zeroLine.show && C(
|
|
399
399
|
s.value,
|
|
400
400
|
[
|
|
401
401
|
{ x: t.value.left, y: m.value.zero },
|
|
@@ -422,7 +422,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
422
422
|
s.value,
|
|
423
423
|
a.value.style.chart.grid.x.axisName,
|
|
424
424
|
y.value / 2,
|
|
425
|
-
|
|
425
|
+
E.value,
|
|
426
426
|
{
|
|
427
427
|
font: `${a.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
|
|
428
428
|
color: a.value.style.chart.color,
|
|
@@ -544,7 +544,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
544
544
|
}
|
|
545
545
|
);
|
|
546
546
|
}
|
|
547
|
-
const Y =
|
|
547
|
+
const Y = L(() => kl({
|
|
548
548
|
values: a.value.style.chart.grid.y.timeLabels.values,
|
|
549
549
|
maxDatapoints: I.value,
|
|
550
550
|
formatter: a.value.style.chart.grid.y.timeLabels.datetimeFormatter,
|
|
@@ -567,7 +567,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
567
567
|
);
|
|
568
568
|
}
|
|
569
569
|
function Ke() {
|
|
570
|
-
|
|
570
|
+
C(
|
|
571
571
|
s.value,
|
|
572
572
|
[
|
|
573
573
|
{ x: t.value.left + t.value.slot * c.value + t.value.slot / 2, y: t.value.top },
|
|
@@ -581,7 +581,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
581
581
|
);
|
|
582
582
|
}
|
|
583
583
|
function Aa() {
|
|
584
|
-
M.value &&
|
|
584
|
+
M.value && C(
|
|
585
585
|
s.value,
|
|
586
586
|
[
|
|
587
587
|
{ x: t.value.left, y: M.value },
|
|
@@ -675,14 +675,14 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
675
675
|
fillColor: ve(e.color, a.value.style.chart.area.opacity),
|
|
676
676
|
strokeColor: "transparent"
|
|
677
677
|
}
|
|
678
|
-
) :
|
|
678
|
+
) : C(s.value, e.coordinatesLine, {
|
|
679
679
|
color: e.color,
|
|
680
680
|
lineWidth: 3
|
|
681
681
|
});
|
|
682
682
|
}
|
|
683
683
|
function Ha() {
|
|
684
684
|
h.value.forEach((e, l) => {
|
|
685
|
-
|
|
685
|
+
C(
|
|
686
686
|
s.value,
|
|
687
687
|
[
|
|
688
688
|
{ x: t.value.left, y: t.value.bottom - e.yOffset },
|
|
@@ -730,11 +730,11 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
730
730
|
ce.value = !1, c.value = null;
|
|
731
731
|
return;
|
|
732
732
|
}
|
|
733
|
-
const
|
|
734
|
-
if (c.value = Math.floor(
|
|
735
|
-
let
|
|
736
|
-
const
|
|
737
|
-
va(
|
|
733
|
+
const i = n * 2 - t.value.left;
|
|
734
|
+
if (c.value = Math.floor(i / t.value.slot), ce.value = !0, !Z.value) return;
|
|
735
|
+
let b = "";
|
|
736
|
+
const v = a.value.style.chart.tooltip.customFormat;
|
|
737
|
+
va(v) && vl(() => v({
|
|
738
738
|
seriesIndex: c.value,
|
|
739
739
|
datapoint: h.value.map((f) => ({
|
|
740
740
|
shape: f.shape || null,
|
|
@@ -745,7 +745,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
745
745
|
})),
|
|
746
746
|
series: h.value,
|
|
747
747
|
config: a.value
|
|
748
|
-
})) ? de.value =
|
|
748
|
+
})) ? de.value = v({
|
|
749
749
|
seriesIndex: c.value,
|
|
750
750
|
datapoint: h.value.map((f) => ({
|
|
751
751
|
shape: f.shape || null,
|
|
@@ -756,25 +756,25 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
756
756
|
})),
|
|
757
757
|
series: h.value,
|
|
758
758
|
config: a.value
|
|
759
|
-
}) : (a.value.style.chart.grid.y.timeLabels.values.slice(r.value.start, r.value.end)[c.value] && (
|
|
759
|
+
}) : (a.value.style.chart.grid.y.timeLabels.values.slice(r.value.start, r.value.end)[c.value] && (b += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${a.value.style.chart.tooltip.borderColor}; width:100%">${Y.value.slice(r.value.start, r.value.end)[c.value].text}</div>`), b += za.value.join(""), de.value = b), Z.value = !1;
|
|
760
760
|
}
|
|
761
|
-
|
|
761
|
+
D(() => c.value, (e) => {
|
|
762
762
|
ye();
|
|
763
|
-
}),
|
|
763
|
+
}), D(() => r.value, (e) => {
|
|
764
764
|
H.value = !0, oe();
|
|
765
765
|
}, {
|
|
766
766
|
deep: !0
|
|
767
|
-
}),
|
|
767
|
+
}), D(() => u.value.showDataLabels, (e) => {
|
|
768
768
|
H.value = !0, oe();
|
|
769
|
-
}),
|
|
769
|
+
}), D(() => M.value, (e) => {
|
|
770
770
|
e && oe();
|
|
771
|
-
}),
|
|
771
|
+
}), D(() => u.value.stacked, (e) => {
|
|
772
772
|
H.value = !0, Z.value = !0, ye();
|
|
773
773
|
});
|
|
774
774
|
function Ua() {
|
|
775
775
|
ce.value = !1, c.value = null, de.value = "", M.value = null, oe();
|
|
776
776
|
}
|
|
777
|
-
const
|
|
777
|
+
const F = Ie(null), J = Ie(null), K = Ie(null);
|
|
778
778
|
sa(() => {
|
|
779
779
|
ze();
|
|
780
780
|
});
|
|
@@ -785,7 +785,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
785
785
|
}) : T.value && (s.value = T.value.getContext("2d", { willReadFrequently: !0 })), a.value.responsive) {
|
|
786
786
|
const e = hl(() => {
|
|
787
787
|
const { width: l, height: o } = yl({
|
|
788
|
-
chart:
|
|
788
|
+
chart: P.value,
|
|
789
789
|
title: a.value.style.chart.title.text ? Fe.value : null,
|
|
790
790
|
legend: a.value.style.chart.legend.show ? Ae.value : null,
|
|
791
791
|
slicer: a.value.style.chart.zoom.show && I.value > 1 ? De.value : null,
|
|
@@ -795,7 +795,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
795
795
|
We.value = `${l} / ${o}`;
|
|
796
796
|
});
|
|
797
797
|
});
|
|
798
|
-
|
|
798
|
+
F.value && (J.value && F.value.unobserve(J.value), F.value.disconnect()), F.value = new ResizeObserver(e), J.value = P.value.parentNode, F.value.observe(J.value);
|
|
799
799
|
}
|
|
800
800
|
K.value && K.value.disconnect(), K.value = new ResizeObserver((e) => {
|
|
801
801
|
for (const l of e)
|
|
@@ -803,12 +803,12 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
803
803
|
}), K.value.observe(te.value), Je();
|
|
804
804
|
}
|
|
805
805
|
Ga(() => {
|
|
806
|
-
K.value && K.value.disconnect(),
|
|
806
|
+
K.value && K.value.disconnect(), F.value && (J.value && F.value.unobserve(J.value), F.value.disconnect());
|
|
807
807
|
});
|
|
808
808
|
function Qe(e) {
|
|
809
809
|
Ca("selectLegend", h.value.find((l) => l.absoluteIndex === e)), $.value.includes(e) ? $.value = $.value.filter((l) => l !== e) : $.value.push(e), H.value = !0, ye();
|
|
810
810
|
}
|
|
811
|
-
const ea =
|
|
811
|
+
const ea = L(() => j.value.map((e, l) => ({
|
|
812
812
|
...e,
|
|
813
813
|
name: e.name,
|
|
814
814
|
color: ia(e.color) || Ze.value[l] || V[l] || V[l % V.length],
|
|
@@ -821,19 +821,19 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
821
821
|
opacity: $.value.includes(e.absoluteIndex) ? 0.5 : 1,
|
|
822
822
|
segregate: () => Qe(e.absoluteIndex),
|
|
823
823
|
isSegregated: $.value.includes(e.absoluteIndex)
|
|
824
|
-
}))), Wa =
|
|
824
|
+
}))), Wa = L(() => ({
|
|
825
825
|
cy: "donut-div-legend",
|
|
826
826
|
backgroundColor: a.value.style.chart.legend.backgroundColor,
|
|
827
827
|
color: a.value.style.chart.legend.color,
|
|
828
828
|
fontSize: a.value.style.chart.legend.fontSize,
|
|
829
829
|
paddingBottom: 12,
|
|
830
830
|
fontWeight: a.value.style.chart.legend.bold ? "bold" : ""
|
|
831
|
-
})), fe =
|
|
832
|
-
const e = [""].concat(h.value.map((
|
|
831
|
+
})), fe = L(() => {
|
|
832
|
+
const e = [""].concat(h.value.map((i) => i.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');
|
|
833
833
|
let l = [];
|
|
834
|
-
for (let
|
|
835
|
-
const
|
|
836
|
-
l.push([a.value.style.chart.grid.y.timeLabels.values.slice(r.value.start, r.value.end)[
|
|
834
|
+
for (let i = 0; i < I.value; i += 1) {
|
|
835
|
+
const b = h.value.map((v) => v.series[i] ?? 0).reduce((v, f) => v + f, 0);
|
|
836
|
+
l.push([a.value.style.chart.grid.y.timeLabels.values.slice(r.value.start, r.value.end)[i] ? Y.value.slice(r.value.start, r.value.end)[i].text : i + 1].concat(h.value.map((v) => (v.series[i] ?? 0).toFixed(a.value.table.rounding))).concat((b ?? 0).toFixed(a.value.table.rounding)));
|
|
837
837
|
}
|
|
838
838
|
const o = {
|
|
839
839
|
th: {
|
|
@@ -847,9 +847,9 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
847
847
|
outline: a.value.table.td.outline
|
|
848
848
|
},
|
|
849
849
|
breakpoint: a.value.table.responsiveBreakpoint
|
|
850
|
-
}, n = [a.value.table.columnNames.period].concat(h.value.map((
|
|
850
|
+
}, n = [a.value.table.columnNames.period].concat(h.value.map((i) => i.name)).concat(a.value.table.columnNames.total);
|
|
851
851
|
return { head: e, body: l.slice(0, r.value.end - r.value.start), config: o, colNames: n };
|
|
852
|
-
}), aa =
|
|
852
|
+
}), aa = L(() => {
|
|
853
853
|
if (h.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
|
|
854
854
|
const e = h.value.map((o) => ({
|
|
855
855
|
label: o.name,
|
|
@@ -858,15 +858,15 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
858
858
|
})), l = [];
|
|
859
859
|
for (let o = r.value.start; o < r.value.end; o += 1) {
|
|
860
860
|
const n = [a.value.style.chart.grid.y.timeLabels.values[o] ? Y.value[o].text : o + 1];
|
|
861
|
-
h.value.forEach((
|
|
862
|
-
n.push(Number((
|
|
861
|
+
h.value.forEach((i) => {
|
|
862
|
+
n.push(Number((i.series[o] || 0).toFixed(a.value.table.rounding)));
|
|
863
863
|
}), l.push(n);
|
|
864
864
|
}
|
|
865
865
|
return { head: e, body: l };
|
|
866
866
|
});
|
|
867
867
|
function la(e = null) {
|
|
868
|
-
const l = [[a.value.style.chart.title.text], [a.value.style.chart.title.subtitle.text], [""]], o = ["", ...aa.value.head.map((
|
|
869
|
-
e ? e(
|
|
868
|
+
const l = [[a.value.style.chart.title.text], [a.value.style.chart.title.subtitle.text], [""]], o = ["", ...aa.value.head.map((v) => v.label)], n = aa.value.body, i = l.concat([o]).concat(n), b = nl(i);
|
|
869
|
+
e ? e(b) : il({ csvContent: b, title: a.value.style.chart.title.text || "vue-ui-xy-canvas" });
|
|
870
870
|
}
|
|
871
871
|
function Xa() {
|
|
872
872
|
return h.value;
|
|
@@ -887,16 +887,23 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
887
887
|
function $e() {
|
|
888
888
|
ge.value = !ge.value;
|
|
889
889
|
}
|
|
890
|
-
async function
|
|
891
|
-
if (!
|
|
892
|
-
const {
|
|
893
|
-
return {
|
|
890
|
+
async function Ba({ scale: e = 2 } = {}) {
|
|
891
|
+
if (!P.value) return;
|
|
892
|
+
const { width: l, height: o } = P.value.getBoundingClientRect(), n = l / o, { imageUri: i, base64: b } = await Cl({ domElement: P.value, base64: !0, img: !0, scale: e });
|
|
893
|
+
return {
|
|
894
|
+
imageUri: i,
|
|
895
|
+
base64: b,
|
|
896
|
+
title: a.value.style.chart.title.text,
|
|
897
|
+
width: l,
|
|
898
|
+
height: o,
|
|
899
|
+
aspectRatio: n
|
|
900
|
+
};
|
|
894
901
|
}
|
|
895
902
|
return ya({
|
|
896
903
|
getData: Xa,
|
|
897
|
-
getImage:
|
|
904
|
+
getImage: Ba,
|
|
898
905
|
generateCsv: la,
|
|
899
|
-
generatePdf:
|
|
906
|
+
generatePdf: _e,
|
|
900
907
|
generateImage: Ve,
|
|
901
908
|
toggleTable: ta,
|
|
902
909
|
toggleLabels: oa,
|
|
@@ -907,7 +914,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
907
914
|
}), (e, l) => (S(), ne("div", {
|
|
908
915
|
style: ee(`width:100%; position:relative; ${a.value.responsive ? "height: 100%" : ""}`),
|
|
909
916
|
ref_key: "xy",
|
|
910
|
-
ref:
|
|
917
|
+
ref: P,
|
|
911
918
|
id: `xy_canvas_${be.value}`,
|
|
912
919
|
class: Za(`vue-ui-donut ${he.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
913
920
|
onMouseenter: l[5] || (l[5] = () => p(He)(!0)),
|
|
@@ -919,7 +926,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
919
926
|
ref: Fe,
|
|
920
927
|
style: ee(`width:100%;background:${a.value.style.chart.backgroundColor};`)
|
|
921
928
|
}, [
|
|
922
|
-
(S(),
|
|
929
|
+
(S(), N(xl, {
|
|
923
930
|
key: `title_${Le.value}`,
|
|
924
931
|
config: {
|
|
925
932
|
title: {
|
|
@@ -933,13 +940,13 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
933
940
|
}
|
|
934
941
|
}, null, 8, ["config"]))
|
|
935
942
|
], 4)) : X("", !0),
|
|
936
|
-
a.value.userOptions.show && we.value && (p(Ye) || p(Se)) ? (S(),
|
|
943
|
+
a.value.userOptions.show && we.value && (p(Ye) || p(Se)) ? (S(), N(p(La), {
|
|
937
944
|
ref: "details",
|
|
938
945
|
key: `user_option_${Ee.value}`,
|
|
939
946
|
backgroundColor: a.value.style.chart.backgroundColor,
|
|
940
947
|
color: a.value.style.chart.color,
|
|
941
948
|
isPrinting: p(Xe),
|
|
942
|
-
isImaging: p(
|
|
949
|
+
isImaging: p(Be),
|
|
943
950
|
uid: be.value,
|
|
944
951
|
hasTooltip: a.value.userOptions.buttons.tooltip && a.value.style.chart.tooltip.show,
|
|
945
952
|
hasPdf: a.value.userOptions.buttons.pdf,
|
|
@@ -953,14 +960,14 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
953
960
|
isTooltip: u.value.showTooltip,
|
|
954
961
|
isStacked: u.value.stacked,
|
|
955
962
|
titles: { ...a.value.userOptions.buttonTitles },
|
|
956
|
-
chartElement:
|
|
963
|
+
chartElement: P.value,
|
|
957
964
|
position: a.value.userOptions.position,
|
|
958
965
|
hasAnnotator: a.value.userOptions.buttons.annotator,
|
|
959
966
|
isAnnotation: ge.value,
|
|
960
967
|
callbacks: a.value.userOptions.callbacks,
|
|
961
968
|
printScale: a.value.userOptions.print.scale,
|
|
962
969
|
onToggleFullscreen: Ge,
|
|
963
|
-
onGeneratePdf: p(
|
|
970
|
+
onGeneratePdf: p(_e),
|
|
964
971
|
onGenerateCsv: la,
|
|
965
972
|
onGenerateImage: p(Ve),
|
|
966
973
|
onToggleTable: ta,
|
|
@@ -974,71 +981,71 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
974
981
|
}, ja({ _: 2 }, [
|
|
975
982
|
e.$slots.menuIcon ? {
|
|
976
983
|
name: "menuIcon",
|
|
977
|
-
fn:
|
|
978
|
-
|
|
984
|
+
fn: x(({ isOpen: o, color: n }) => [
|
|
985
|
+
k(e.$slots, "menuIcon", B(_({ isOpen: o, color: n })), void 0, !0)
|
|
979
986
|
]),
|
|
980
987
|
key: "0"
|
|
981
988
|
} : void 0,
|
|
982
989
|
e.$slots.optionTooltip ? {
|
|
983
990
|
name: "optionTooltip",
|
|
984
|
-
fn:
|
|
985
|
-
|
|
991
|
+
fn: x(() => [
|
|
992
|
+
k(e.$slots, "optionTooltip", {}, void 0, !0)
|
|
986
993
|
]),
|
|
987
994
|
key: "1"
|
|
988
995
|
} : void 0,
|
|
989
996
|
e.$slots.optionPdf ? {
|
|
990
997
|
name: "optionPdf",
|
|
991
|
-
fn:
|
|
992
|
-
|
|
998
|
+
fn: x(() => [
|
|
999
|
+
k(e.$slots, "optionPdf", {}, void 0, !0)
|
|
993
1000
|
]),
|
|
994
1001
|
key: "2"
|
|
995
1002
|
} : void 0,
|
|
996
1003
|
e.$slots.optionCsv ? {
|
|
997
1004
|
name: "optionCsv",
|
|
998
|
-
fn:
|
|
999
|
-
|
|
1005
|
+
fn: x(() => [
|
|
1006
|
+
k(e.$slots, "optionCsv", {}, void 0, !0)
|
|
1000
1007
|
]),
|
|
1001
1008
|
key: "3"
|
|
1002
1009
|
} : void 0,
|
|
1003
1010
|
e.$slots.optionImg ? {
|
|
1004
1011
|
name: "optionImg",
|
|
1005
|
-
fn:
|
|
1006
|
-
|
|
1012
|
+
fn: x(() => [
|
|
1013
|
+
k(e.$slots, "optionImg", {}, void 0, !0)
|
|
1007
1014
|
]),
|
|
1008
1015
|
key: "4"
|
|
1009
1016
|
} : void 0,
|
|
1010
1017
|
e.$slots.optionTable ? {
|
|
1011
1018
|
name: "optionTable",
|
|
1012
|
-
fn:
|
|
1013
|
-
|
|
1019
|
+
fn: x(() => [
|
|
1020
|
+
k(e.$slots, "optionTable", {}, void 0, !0)
|
|
1014
1021
|
]),
|
|
1015
1022
|
key: "5"
|
|
1016
1023
|
} : void 0,
|
|
1017
1024
|
e.$slots.optionLabels ? {
|
|
1018
1025
|
name: "optionLabels",
|
|
1019
|
-
fn:
|
|
1020
|
-
|
|
1026
|
+
fn: x(() => [
|
|
1027
|
+
k(e.$slots, "optionLabels", {}, void 0, !0)
|
|
1021
1028
|
]),
|
|
1022
1029
|
key: "6"
|
|
1023
1030
|
} : void 0,
|
|
1024
1031
|
e.$slots.optionStack ? {
|
|
1025
1032
|
name: "optionStack",
|
|
1026
|
-
fn:
|
|
1027
|
-
|
|
1033
|
+
fn: x(() => [
|
|
1034
|
+
k(e.$slots, "optionStack", {}, void 0, !0)
|
|
1028
1035
|
]),
|
|
1029
1036
|
key: "7"
|
|
1030
1037
|
} : void 0,
|
|
1031
1038
|
e.$slots.optionFullscreen ? {
|
|
1032
1039
|
name: "optionFullscreen",
|
|
1033
|
-
fn:
|
|
1034
|
-
|
|
1040
|
+
fn: x(({ toggleFullscreen: o, isFullscreen: n }) => [
|
|
1041
|
+
k(e.$slots, "optionFullscreen", B(_({ toggleFullscreen: o, isFullscreen: n })), void 0, !0)
|
|
1035
1042
|
]),
|
|
1036
1043
|
key: "8"
|
|
1037
1044
|
} : void 0,
|
|
1038
1045
|
e.$slots.optionAnnotator ? {
|
|
1039
1046
|
name: "optionAnnotator",
|
|
1040
|
-
fn:
|
|
1041
|
-
|
|
1047
|
+
fn: x(({ toggleAnnotator: o, isAnnotator: n }) => [
|
|
1048
|
+
k(e.$slots, "optionAnnotator", B(_({ toggleAnnotator: o, isAnnotator: n })), void 0, !0)
|
|
1042
1049
|
]),
|
|
1043
1050
|
key: "9"
|
|
1044
1051
|
} : void 0
|
|
@@ -1056,7 +1063,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
1056
1063
|
style: { width: "100%", height: "100%" },
|
|
1057
1064
|
onMousemove: l[0] || (l[0] = (o) => Ya(o)),
|
|
1058
1065
|
onMouseleave: Ua
|
|
1059
|
-
}, null, 544)) : (S(),
|
|
1066
|
+
}, null, 544)) : (S(), N(p(ba), {
|
|
1060
1067
|
key: 1,
|
|
1061
1068
|
config: {
|
|
1062
1069
|
type: "line",
|
|
@@ -1090,11 +1097,11 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
1090
1097
|
backgroundOpacity: a.value.style.chart.tooltip.backgroundOpacity,
|
|
1091
1098
|
isCustom: p(va)(a.value.style.chart.tooltip.customFormat)
|
|
1092
1099
|
}, {
|
|
1093
|
-
"tooltip-before":
|
|
1094
|
-
|
|
1100
|
+
"tooltip-before": x(() => [
|
|
1101
|
+
k(e.$slots, "tooltip-before", B(_({ ...Re.value })), void 0, !0)
|
|
1095
1102
|
]),
|
|
1096
|
-
"tooltip-after":
|
|
1097
|
-
|
|
1103
|
+
"tooltip-after": x(() => [
|
|
1104
|
+
k(e.$slots, "tooltip-after", B(_({ ...Re.value })), void 0, !0)
|
|
1098
1105
|
]),
|
|
1099
1106
|
_: 3
|
|
1100
1107
|
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "position", "offsetY", "parent", "content", "isFullscreen", "backgroundOpacity", "isCustom"])
|
|
@@ -1105,7 +1112,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
1105
1112
|
style: ee(`width:100%;background:${a.value.style.chart.backgroundColor}`),
|
|
1106
1113
|
"data-dom-to-png-ignore": ""
|
|
1107
1114
|
}, [
|
|
1108
|
-
a.value.style.chart.zoom.show && I.value > 1 ? (S(),
|
|
1115
|
+
a.value.style.chart.zoom.show && I.value > 1 ? (S(), N(Ll, {
|
|
1109
1116
|
ref_key: "slicerComponent",
|
|
1110
1117
|
ref: q,
|
|
1111
1118
|
key: `slicer_${Pe.value}`,
|
|
@@ -1132,8 +1139,8 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
1132
1139
|
enableSelectionDrag: a.value.style.chart.zoom.enableSelectionDrag,
|
|
1133
1140
|
onReset: qe
|
|
1134
1141
|
}, {
|
|
1135
|
-
"reset-action":
|
|
1136
|
-
|
|
1142
|
+
"reset-action": x(({ reset: o }) => [
|
|
1143
|
+
k(e.$slots, "reset-action", B(_({ reset: o })), void 0, !0)
|
|
1137
1144
|
]),
|
|
1138
1145
|
_: 3
|
|
1139
1146
|
}, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"])) : X("", !0)
|
|
@@ -1142,26 +1149,26 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
1142
1149
|
ref_key: "chartLegend",
|
|
1143
1150
|
ref: Ae
|
|
1144
1151
|
}, [
|
|
1145
|
-
a.value.style.chart.legend.show && we.value ? (S(),
|
|
1152
|
+
a.value.style.chart.legend.show && we.value ? (S(), N(bl, {
|
|
1146
1153
|
legendSet: ea.value,
|
|
1147
1154
|
config: Wa.value,
|
|
1148
1155
|
key: `legend_${Ce.value}`,
|
|
1149
1156
|
onClickMarker: l[3] || (l[3] = ({ i: o }) => Qe(o))
|
|
1150
1157
|
}, {
|
|
1151
|
-
item:
|
|
1158
|
+
item: x(({ legend: o, index: n }) => [
|
|
1152
1159
|
ie("div", {
|
|
1153
|
-
onClick: (
|
|
1160
|
+
onClick: (i) => o.segregate(),
|
|
1154
1161
|
style: ee(`opacity:${$.value.includes(n) ? 0.5 : 1}`)
|
|
1155
1162
|
}, na(o.name), 13, zl)
|
|
1156
1163
|
]),
|
|
1157
1164
|
_: 1
|
|
1158
|
-
}, 8, ["legendSet", "config"])) :
|
|
1165
|
+
}, 8, ["legendSet", "config"])) : k(e.$slots, "legend", {
|
|
1159
1166
|
key: 1,
|
|
1160
1167
|
legend: ea.value
|
|
1161
1168
|
}, void 0, !0)
|
|
1162
1169
|
], 512),
|
|
1163
1170
|
e.$slots.watermark ? (S(), ne("div", $l, [
|
|
1164
|
-
|
|
1171
|
+
k(e.$slots, "watermark", B(_({ isPrinting: p(Xe) || p(Be) })), void 0, !0)
|
|
1165
1172
|
])) : X("", !0),
|
|
1166
1173
|
e.$slots.source ? (S(), ne("div", {
|
|
1167
1174
|
key: 3,
|
|
@@ -1169,9 +1176,9 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
1169
1176
|
ref: Ne,
|
|
1170
1177
|
dir: "auto"
|
|
1171
1178
|
}, [
|
|
1172
|
-
|
|
1179
|
+
k(e.$slots, "source", {}, void 0, !0)
|
|
1173
1180
|
], 512)) : X("", !0),
|
|
1174
|
-
r.value.end - r.value.start < 200 ? (S(),
|
|
1181
|
+
r.value.end - r.value.start < 200 ? (S(), N(p(ga), {
|
|
1175
1182
|
key: 4,
|
|
1176
1183
|
hideDetails: "",
|
|
1177
1184
|
config: {
|
|
@@ -1187,8 +1194,8 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
1187
1194
|
}
|
|
1188
1195
|
}
|
|
1189
1196
|
}, {
|
|
1190
|
-
content:
|
|
1191
|
-
(S(),
|
|
1197
|
+
content: x(() => [
|
|
1198
|
+
(S(), N(p(pa), {
|
|
1192
1199
|
key: `table_${ke.value}`,
|
|
1193
1200
|
colNames: fe.value.colNames,
|
|
1194
1201
|
head: fe.value.head,
|
|
@@ -1197,10 +1204,10 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
1197
1204
|
title: `${a.value.style.chart.title.text}${a.value.style.chart.title.subtitle.text ? ` : ${a.value.style.chart.title.subtitle.text}` : ""}`,
|
|
1198
1205
|
onClose: l[4] || (l[4] = (o) => u.value.showTable = !1)
|
|
1199
1206
|
}, {
|
|
1200
|
-
th:
|
|
1207
|
+
th: x(({ th: o }) => [
|
|
1201
1208
|
ie("div", { innerHTML: o }, null, 8, Il)
|
|
1202
1209
|
]),
|
|
1203
|
-
td:
|
|
1210
|
+
td: x(({ td: o }) => [
|
|
1204
1211
|
Ja(na(o), 1)
|
|
1205
1212
|
]),
|
|
1206
1213
|
_: 1
|
|
@@ -1208,9 +1215,9 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
1208
1215
|
]),
|
|
1209
1216
|
_: 1
|
|
1210
1217
|
}, 8, ["config"])) : X("", !0),
|
|
1211
|
-
a.value.userOptions.buttons.annotator && h.value.length ? (S(),
|
|
1218
|
+
a.value.userOptions.buttons.annotator && h.value.length ? (S(), N(p(ma), {
|
|
1212
1219
|
key: 5,
|
|
1213
|
-
parent:
|
|
1220
|
+
parent: P.value,
|
|
1214
1221
|
backgroundColor: a.value.style.chart.backgroundColor,
|
|
1215
1222
|
color: a.value.style.chart.color,
|
|
1216
1223
|
active: ge.value,
|
|
@@ -1218,7 +1225,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
|
|
|
1218
1225
|
}, null, 8, ["parent", "backgroundColor", "color", "active"])) : X("", !0)
|
|
1219
1226
|
], 46, Sl));
|
|
1220
1227
|
}
|
|
1221
|
-
}, Xl = /* @__PURE__ */ wl(Ml, [["__scopeId", "data-v-
|
|
1228
|
+
}, Xl = /* @__PURE__ */ wl(Ml, [["__scopeId", "data-v-4c744dba"]]);
|
|
1222
1229
|
export {
|
|
1223
1230
|
Xl as default
|
|
1224
1231
|
};
|