vue-data-ui 2.16.4 → 2.16.6
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 -2
- package/dist/{Arrow-CQWVJ5sZ.js → Arrow-DCqxVwey.js} +1 -1
- package/dist/{BaseDraggableDialog-Fz8fA4VM.js → BaseDraggableDialog-6DIKXIBU.js} +2 -2
- package/dist/{BaseIcon-CfYrW3zO.js → BaseIcon-Bn996RXm.js} +1 -1
- package/dist/{ColorPicker-B2ITT7Lp.js → ColorPicker-OFfLkKNb.js} +2 -2
- package/dist/{DataTable-C6IBsdXI.js → DataTable-CHBLjKtZ.js} +2 -2
- package/dist/{Legend-bIoNrGWy.js → Legend-nBXoxXJH.js} +2 -2
- package/dist/{NonSvgPenAndPaper-BsSwoYpL.js → NonSvgPenAndPaper-Cls2idJS.js} +3 -3
- package/dist/{PackageVersion-DfefmcMg.js → PackageVersion-Bg_9KCU-.js} +1 -1
- package/dist/{PenAndPaper-CixPm-N0.js → PenAndPaper-BPTpbnay.js} +3 -3
- package/dist/{Shape-dKMmmbg5.js → Shape-Bnf512BA.js} +1 -1
- package/dist/{Slicer-szgfOkiL.js → Slicer-BrqtJG2E.js} +2 -2
- package/dist/{SparkTooltip-D_NmtqzO.js → SparkTooltip-C-rLATAw.js} +1 -1
- package/dist/{Title-DTuTBtAe.js → Title-Gi81VwUM.js} +1 -1
- package/dist/{Tooltip-CVPiPR9d.js → Tooltip-CJxVw7-T.js} +1 -1
- package/dist/{UserOptions-D8SRavqE.js → UserOptions-CBEK6_jo.js} +137 -129
- package/dist/{dom-to-png-Br5bL5eX.js → dom-to-png-CRHNL8VU.js} +1 -1
- package/dist/img-BgOg8opa.js +27 -0
- package/dist/{index-BsirVW_m.js → index-DvIXJm6t.js} +1 -1
- package/dist/{pdf-BBk37REU.js → pdf-DhTxBrbJ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +2 -2
- package/dist/types/vue-data-ui.d.ts +2 -2
- package/dist/{useNestedProp-Ej-oqNyf.js → useNestedProp-DrYHm61t.js} +1 -1
- package/dist/{usePrinter-Dpd-vZym.js → usePrinter-CWnXbGMb.js} +2 -2
- package/dist/{vue-data-ui-Bd_shukQ.js → vue-data-ui-B8EWlMIK.js} +63 -63
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-Baaeejpi.js → vue-ui-3d-bar-CtlB4p7i.js} +42 -41
- package/dist/{vue-ui-accordion-D2TcT2US.js → vue-ui-accordion-D55kCO5G.js} +3 -3
- package/dist/{vue-ui-age-pyramid-BW2q5yMT.js → vue-ui-age-pyramid-DSshyUn-.js} +39 -38
- package/dist/{vue-ui-annotator-DR6dXmoQ.js → vue-ui-annotator-DQSMv_k2.js} +2 -2
- package/dist/{vue-ui-bullet-BYvOXGoO.js → vue-ui-bullet-FeScjj7q.js} +23 -22
- package/dist/{vue-ui-candlestick-DXGY7-1u.js → vue-ui-candlestick-Drupgyoi.js} +100 -99
- package/dist/{vue-ui-carousel-table-DpRdTSdS.js → vue-ui-carousel-table-BTZQRZfO.js} +17 -16
- package/dist/{vue-ui-chestnut--uqQw5gd.js → vue-ui-chestnut-DLWjPwRL.js} +64 -63
- package/dist/{vue-ui-chord-C6z1Oi8y.js → vue-ui-chord-BgLbFBT9.js} +87 -86
- package/dist/{vue-ui-circle-pack-BgtFPkv2.js → vue-ui-circle-pack-VXcRh2gy.js} +31 -30
- package/dist/{vue-ui-cursor-C_KZ7SW0.js → vue-ui-cursor-DWmfnM25.js} +2 -2
- package/dist/{vue-ui-dashboard-YSzYS59X.js → vue-ui-dashboard-CGIocEHj.js} +62 -62
- package/dist/{vue-ui-digits-B6Ej5XbC.js → vue-ui-digits-BgQch3Fc.js} +2 -2
- package/dist/{vue-ui-donut-BYouj_X8.js → vue-ui-donut-B59bCV5_.js} +74 -73
- package/dist/{vue-ui-donut-evolution-DHIMoo_a.js → vue-ui-donut-evolution-CI8qBIQd.js} +44 -43
- package/dist/{vue-ui-dumbbell-rHe7aWF7.js → vue-ui-dumbbell-CXv7sk88.js} +9 -8
- package/dist/{vue-ui-flow-hV-6uTPS.js → vue-ui-flow-DxF0ELtv.js} +9 -8
- package/dist/{vue-ui-funnel-45FdkG1w.js → vue-ui-funnel-Bco8rqF8.js} +20 -19
- package/dist/{vue-ui-galaxy-yg-YRwYP.js → vue-ui-galaxy-CaPJwwOj.js} +22 -21
- package/dist/{vue-ui-gauge-Ccf__w06.js → vue-ui-gauge-D7arhDmb.js} +8 -7
- package/dist/{vue-ui-gizmo-CxSBWMgK.js → vue-ui-gizmo-Dwli-Mip.js} +3 -3
- package/dist/{vue-ui-heatmap-Cz1GzvLQ.js → vue-ui-heatmap-Cyn-ahGO.js} +10 -9
- package/dist/{vue-ui-history-plot-DChEbCv0.js → vue-ui-history-plot-C2AEToqx.js} +27 -26
- package/dist/{vue-ui-kpi-D1cHw1LD.js → vue-ui-kpi-DKDibSdl.js} +3 -3
- package/dist/{vue-ui-mini-loader-FxoEnicn.js → vue-ui-mini-loader-B8OVutUx.js} +2 -2
- package/dist/{vue-ui-molecule-BvGzvTQc.js → vue-ui-molecule-BVSrqIGw.js} +22 -21
- package/dist/{vue-ui-mood-radar-DomwWh69.js → vue-ui-mood-radar-DvlyS3RN.js} +9 -8
- package/dist/{vue-ui-nested-donuts-BrC9S0cw.js → vue-ui-nested-donuts-D9ssSus6.js} +89 -88
- package/dist/{vue-ui-onion-YvCPFGpJ.js → vue-ui-onion-Buu4VX3u.js} +40 -39
- package/dist/{vue-ui-parallel-coordinate-plot-D_ji0o1R.js → vue-ui-parallel-coordinate-plot-DFLUvhxD.js} +29 -28
- package/dist/{vue-ui-quadrant-B1xa2r0Q.js → vue-ui-quadrant-BMC7NBGd.js} +90 -89
- package/dist/{vue-ui-quick-chart-ClCOLJ5y.js → vue-ui-quick-chart-DB9RKUkb.js} +59 -58
- package/dist/{vue-ui-radar-B460wd0h.js → vue-ui-radar-68NMPxxQ.js} +26 -25
- package/dist/{vue-ui-rating-D1_WFLlk.js → vue-ui-rating-swH9kRr3.js} +2 -2
- package/dist/{vue-ui-relation-circle-ECKEkE2-.js → vue-ui-relation-circle-CT-EdSjO.js} +11 -10
- package/dist/{vue-ui-ridgeline-E-1Lcv1j.js → vue-ui-ridgeline-DftROPaX.js} +10 -9
- package/dist/{vue-ui-rings-BsSwSht6.js → vue-ui-rings-M-9dPI5D.js} +45 -44
- package/dist/{vue-ui-scatter-CVEd6_m1.js → vue-ui-scatter-CsGhaFJh.js} +44 -43
- package/dist/{vue-ui-skeleton-CchtfQiJ.js → vue-ui-skeleton-BAOt2neL.js} +3 -3
- package/dist/{vue-ui-smiley-CkedzX6d.js → vue-ui-smiley-7_kIgPg-.js} +2 -2
- package/dist/{vue-ui-spark-trend-ByPzMHci.js → vue-ui-spark-trend-DHlQQpwz.js} +3 -3
- package/dist/{vue-ui-sparkbar-DoVR95AR.js → vue-ui-sparkbar-BnHhzuKf.js} +3 -3
- package/dist/{vue-ui-sparkgauge-B9WEsmn8.js → vue-ui-sparkgauge-WtfkCK8g.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-B5Ub1nsA.js → vue-ui-sparkhistogram-B2u4XLVd.js} +4 -4
- package/dist/{vue-ui-sparkline-BqHPNt6h.js → vue-ui-sparkline-DKIyUlSm.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-BhL0IxK5.js → vue-ui-sparkstackbar-BLGz2qIb.js} +3 -3
- package/dist/{vue-ui-stackbar-CuSsigBj.js → vue-ui-stackbar-BDpMsTYe.js} +277 -275
- package/dist/{vue-ui-strip-plot-BTqp8p9u.js → vue-ui-strip-plot-5qDcYPnR.js} +22 -21
- package/dist/{vue-ui-table-Du7un5Fm.js → vue-ui-table-Bg5HIQ3O.js} +3 -3
- package/dist/{vue-ui-table-heatmap-YxGFfRC3.js → vue-ui-table-heatmap-DmjNy1q1.js} +26 -25
- package/dist/{vue-ui-table-sparkline-Bbt4GjUn.js → vue-ui-table-sparkline-CnkJkBk5.js} +8 -7
- package/dist/{vue-ui-thermometer-Cnc4zVKO.js → vue-ui-thermometer-RlD-9mJf.js} +30 -29
- package/dist/{vue-ui-timer-DgVQY-BQ.js → vue-ui-timer-Bes74INL.js} +5 -5
- package/dist/{vue-ui-tiremarks-BTHDxycu.js → vue-ui-tiremarks-DiLS3akQ.js} +29 -28
- package/dist/vue-ui-treemap-BG1Omm38.js +953 -0
- package/dist/{vue-ui-vertical-bar-C5aombcF.js → vue-ui-vertical-bar-CwqQyZFX.js} +39 -38
- package/dist/{vue-ui-waffle-DHDmy4xh.js → vue-ui-waffle-Ce3T4BPp.js} +10 -9
- package/dist/{vue-ui-wheel-DmPltDq0.js → vue-ui-wheel-6B0WTkf2.js} +34 -33
- package/dist/{vue-ui-word-cloud-D15rS85A.js → vue-ui-word-cloud-ByYZCOh7.js} +42 -41
- package/dist/{vue-ui-world-9lR_bov_.js → vue-ui-world-B9PxVO4n.js} +8 -7
- package/dist/{vue-ui-xy-DnEdi5Hn.js → vue-ui-xy-DtJ7qJib.js} +69 -68
- package/dist/{vue-ui-xy-canvas-BaZZ7r1e.js → vue-ui-xy-canvas-S6YpFgzs.js} +131 -130
- package/package.json +1 -1
- package/dist/img-BOi0vhPf.js +0 -20
- package/dist/vue-ui-treemap-B96LGRM_.js +0 -952
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineAsyncComponent as K, ref as d, computed as x, useSlots as Ba, onMounted as
|
|
2
|
-
import { u as Ja, c as Ka, t as Qa, p as B, a as el, C as me, b as al, D as Me, i as ee, f as ae, d as na, a2 as ll, G as tl, aj as ol, o as
|
|
1
|
+
import { defineAsyncComponent as K, ref as d, computed as x, useSlots as Ba, onMounted as ua, watch as A, nextTick as pe, shallowRef as Ie, onBeforeUnmount as Va, createElementBlock as ne, openBlock as S, unref as p, normalizeClass as Ga, normalizeStyle as Q, createCommentVNode as W, createBlock as D, createElementVNode as ie, createSlots as Za, withCtx as b, renderSlot as L, normalizeProps as X, guardReactiveProps as _, createVNode as ja, toDisplayString as sa, createTextVNode as qa } from "vue";
|
|
2
|
+
import { u as Ja, c as Ka, t as Qa, p as B, a as el, C as me, b as al, D as Me, i as ee, f as ae, d as na, a2 as ll, G as tl, aj as ol, o as rl, e as ul, x as ia, q as sl, r as nl, y as il, s as ve, l as vl } from "./index-DvIXJm6t.js";
|
|
3
3
|
import { d as cl, t as dl, u as hl, c as yl, a as va, l as k, r as Te, b as R, p as ca } from "./useResponsive-DfdjqQps.js";
|
|
4
|
-
import { u as da } from "./useNestedProp-
|
|
5
|
-
import { u as fl } from "./usePrinter-
|
|
4
|
+
import { u as da } from "./useNestedProp-DrYHm61t.js";
|
|
5
|
+
import { u as fl } from "./usePrinter-CWnXbGMb.js";
|
|
6
6
|
import { u as gl } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
7
|
import { u as pl } from "./useChartAccessibility-9icAAmYg.js";
|
|
8
|
-
import ml from "./Legend-
|
|
9
|
-
import bl from "./Title-
|
|
10
|
-
import { S as xl } from "./Slicer-
|
|
8
|
+
import ml from "./Legend-nBXoxXJH.js";
|
|
9
|
+
import bl from "./Title-Gi81VwUM.js";
|
|
10
|
+
import { S as xl } from "./Slicer-BrqtJG2E.js";
|
|
11
11
|
import { u as Ll } from "./useTimeLabels-Mrr0jrpL.js";
|
|
12
12
|
import { _ as kl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
-
const Cl = ["id"], wl = ["onClick"],
|
|
13
|
+
const Cl = ["id"], wl = ["onClick"], Sl = {
|
|
14
14
|
key: 2,
|
|
15
15
|
class: "vue-data-ui-watermark"
|
|
16
|
-
},
|
|
16
|
+
}, zl = ["innerHTML"], $l = {
|
|
17
17
|
__name: "vue-ui-xy-canvas",
|
|
18
18
|
props: {
|
|
19
19
|
dataset: {
|
|
@@ -31,14 +31,14 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
31
31
|
},
|
|
32
32
|
emits: ["selectLegend"],
|
|
33
33
|
setup(Oe, { expose: ha, emit: ya }) {
|
|
34
|
-
const fa = K(() => import("./vue-ui-accordion-
|
|
35
|
-
|
|
34
|
+
const fa = K(() => import("./vue-ui-accordion-D55kCO5G.js")), ga = K(() => import("./DataTable-CHBLjKtZ.js")), pa = K(() => import("./NonSvgPenAndPaper-Cls2idJS.js")), ma = K(() => import("./vue-ui-skeleton-BAOt2neL.js")), ba = K(() => import("./Tooltip-CJxVw7-T.js")), xa = K(() => import("./UserOptions-CBEK6_jo.js")), { vue_ui_xy_canvas: La } = Ja(), g = Oe, be = d(Ka()), le = d(null), te = d(null), s = d(null), y = d(1), P = d(1), ce = d(!1), c = d(null), de = d(""), Re = d(null), $ = d([]), V = d(1), N = d(!0), G = d(!0), xe = d(null), Pe = d(0), Fe = d(0), he = d(!1), Ee = d(null), Ae = d(null), De = d(null), Ne = d(null), Le = d(0), ke = d(0), Ce = d(0), M = d(null), we = x(() => !!g.dataset && g.dataset.length), ka = ya, Ca = Ba();
|
|
35
|
+
ua(() => {
|
|
36
36
|
Ca["chart-background"] && console.warn("VueUiXyCanvas does not support the #chart-background slot.");
|
|
37
37
|
});
|
|
38
38
|
const a = x({
|
|
39
39
|
get: () => Ue(),
|
|
40
40
|
set: (e) => e
|
|
41
|
-
}), { userOptionsVisible:
|
|
41
|
+
}), { userOptionsVisible: Se, setUserOptionsVisibility: He, keepUserOptionState: Ye } = gl({ config: a.value }), { svgRef: T } = pl({ config: a.value.style.chart.title });
|
|
42
42
|
function Ue() {
|
|
43
43
|
const e = da({
|
|
44
44
|
userConfig: g.config,
|
|
@@ -54,15 +54,15 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
54
54
|
} : t = e, g.config && me(g.config, "style.chart.scale.min") ? t.style.chart.scale.min = g.config.style.chart.scale.min : t.style.chart.scale.min = null, g.config && me(g.config, "style.chart.scale.max") ? t.style.chart.scale.max = g.config.style.chart.scale.max : t.style.chart.scale.max = null, g.config && me(g.config, "style.chart.zoom.startIndex") ? t.style.chart.zoom.startIndex = g.config.style.chart.zoom.startIndex : t.style.chart.zoom.startIndex = null, g.config && me(g.config, "style.chart.zoom.endIndex") ? t.style.chart.zoom.endIndex = g.config.style.chart.zoom.endIndex : t.style.chart.zoom.endIndex = null, t;
|
|
55
55
|
}
|
|
56
56
|
A(() => g.config, (e) => {
|
|
57
|
-
a.value = Ue(),
|
|
57
|
+
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;
|
|
58
58
|
}, { deep: !0 }), A(() => g.dataset, () => {
|
|
59
|
-
|
|
59
|
+
ze(), Le.value += 1, ke.value += 1, Ce.value += 1;
|
|
60
60
|
}, { deep: !0 });
|
|
61
61
|
const We = d(a.value.style.chart.aspectRatio), { isPrinting: Xe, isImaging: _e, generatePdf: Be, generateImage: Ve } = fl({
|
|
62
62
|
elementId: `xy_canvas_${be.value}`,
|
|
63
63
|
fileName: a.value.style.chart.title.text || "vue-ui-xy-canvas",
|
|
64
64
|
options: a.value.userOptions.print
|
|
65
|
-
}),
|
|
65
|
+
}), u = d({
|
|
66
66
|
showTable: a.value.table.show,
|
|
67
67
|
showDataLabels: a.value.style.chart.dataLabels.show,
|
|
68
68
|
stacked: a.value.style.chart.stacked,
|
|
@@ -82,27 +82,27 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
82
82
|
bottom: P.value - P.value * a.value.style.chart.paddingProportions.bottom,
|
|
83
83
|
width: e,
|
|
84
84
|
height: P.value - P.value * (a.value.style.chart.paddingProportions.top + a.value.style.chart.paddingProportions.bottom),
|
|
85
|
-
slot: e / (
|
|
85
|
+
slot: e / (r.value.end - r.value.start)
|
|
86
86
|
};
|
|
87
87
|
});
|
|
88
88
|
function Ze(e, t) {
|
|
89
89
|
return e / t;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
return t.map((Y,
|
|
91
|
+
function Sa({ hasAutoScale: e, series: t, min: o, max: n, scale: v, yOffset: C, individualHeight: i, stackIndex: f = null }) {
|
|
92
|
+
return t.map((Y, z) => {
|
|
93
93
|
const E = v.min < 0 ? Math.abs(v.min) : 0, U = Ze(Y + E, E + v.max);
|
|
94
|
-
let
|
|
95
|
-
e && (
|
|
94
|
+
let ue, se;
|
|
95
|
+
e && (ue = v.min, se = Ze(Y - ue, v.max - ue));
|
|
96
96
|
let O = 0;
|
|
97
97
|
return f === null ? O = l.value.bottom - l.value.height * (e ? se : U) : O = l.value.bottom - C - i * (e ? se : U), {
|
|
98
|
-
x: l.value.left + l.value.slot *
|
|
98
|
+
x: l.value.left + l.value.slot * z + l.value.slot / 2,
|
|
99
99
|
y: O,
|
|
100
100
|
value: Y
|
|
101
101
|
};
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
const m = x(() => {
|
|
105
|
-
const e = a.value.style.chart.scale.min !== null ? a.value.style.chart.scale.min : Math.min(...Z.value.filter((i, f) => !$.value.includes(i.absoluteIndex)).flatMap((i) => i.series.slice(
|
|
105
|
+
const e = a.value.style.chart.scale.min !== null ? a.value.style.chart.scale.min : Math.min(...Z.value.filter((i, f) => !$.value.includes(i.absoluteIndex)).flatMap((i) => i.series.slice(r.value.start, r.value.end))), t = a.value.style.chart.scale.max !== null ? a.value.style.chart.scale.max : Math.max(...Z.value.filter((i, f) => !$.value.includes(i.absoluteIndex)).flatMap((i) => i.series.slice(r.value.start, r.value.end))), o = Me(e < 0 ? e : 0, t === e ? e + 1 < 0 ? 0 : e + 1 : t < 0 ? 0 : t, a.value.style.chart.scale.ticks), n = o.min < 0 ? Math.abs(o.min) : 0, v = l.value.bottom - l.value.height * (n / (o.max + n)), C = o.ticks.map((i) => ({
|
|
106
106
|
y: l.value.bottom - l.value.height * ((i + n) / (o.max + n)),
|
|
107
107
|
x: l.value.left - 8,
|
|
108
108
|
value: i
|
|
@@ -115,7 +115,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
115
115
|
yLabels: C,
|
|
116
116
|
zero: v
|
|
117
117
|
};
|
|
118
|
-
}),
|
|
118
|
+
}), za = x(() => h.value.map((e) => `
|
|
119
119
|
<div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
|
|
120
120
|
<svg viewBox="0 0 10 10" height="12" width="12">
|
|
121
121
|
<circle cx="5" cy="5" r="5" fill="${e.color}"/>
|
|
@@ -147,7 +147,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
147
147
|
});
|
|
148
148
|
const h = x(() => ol(Z.value.filter((e, t) => !$.value.includes(e.absoluteIndex))).map((e, t) => ({
|
|
149
149
|
...e,
|
|
150
|
-
series: e.series.slice(
|
|
150
|
+
series: e.series.slice(r.value.start, r.value.end)
|
|
151
151
|
})).map((e, t) => {
|
|
152
152
|
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;
|
|
153
153
|
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));
|
|
@@ -157,22 +157,22 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
157
157
|
}, C = e.scaleSteps || a.value.style.chart.scale.ticks;
|
|
158
158
|
let i;
|
|
159
159
|
e.autoScaling ? i = Me(v.valueMin, v.valueMax, C) : i = Me(v.valueMin < 0 ? v.valueMin : 0, v.valueMax <= 0 ? 0 : v.valueMax, C);
|
|
160
|
-
const f =
|
|
160
|
+
const f = u.value.stacked ? l.value.height * (1 - e.cumulatedStackRatio) : 0, Y = u.value.stacked ? l.value.height / a.value.style.chart.stackGap : 0, z = u.value.stacked ? l.value.height * e.stackRatio - Y : l.value.height, E = i.min < 0 ? Math.abs(i.min) : 0;
|
|
161
161
|
let U;
|
|
162
|
-
e.autoScaling &&
|
|
163
|
-
const
|
|
164
|
-
y: l.value.bottom - f -
|
|
162
|
+
e.autoScaling && u.value.stacked && n <= 0 ? U = l.value.bottom - f - z : U = l.value.bottom - f - z * (E / (i.max + E));
|
|
163
|
+
const ue = i.ticks.map((O, _a) => ({
|
|
164
|
+
y: l.value.bottom - f - z * (_a / (i.ticks.length - 1)),
|
|
165
165
|
x: l.value.left - 8,
|
|
166
166
|
value: O
|
|
167
|
-
})), se =
|
|
168
|
-
hasAutoScale:
|
|
167
|
+
})), se = Sa({
|
|
168
|
+
hasAutoScale: u.value.stacked && e.autoScaling,
|
|
169
169
|
series: e.series,
|
|
170
|
-
min:
|
|
171
|
-
max:
|
|
172
|
-
scale:
|
|
170
|
+
min: u.value.stacked ? o : m.value.min,
|
|
171
|
+
max: u.value.stacked ? n : m.value.max,
|
|
172
|
+
scale: u.value.stacked ? i : m.value.scale,
|
|
173
173
|
yOffset: f,
|
|
174
|
-
individualHeight:
|
|
175
|
-
stackIndex:
|
|
174
|
+
individualHeight: z,
|
|
175
|
+
stackIndex: u.value.stacked ? t : null
|
|
176
176
|
});
|
|
177
177
|
return {
|
|
178
178
|
...e,
|
|
@@ -182,11 +182,11 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
182
182
|
localScale: i,
|
|
183
183
|
localZero: U,
|
|
184
184
|
localMin: E,
|
|
185
|
-
localYLabels:
|
|
185
|
+
localYLabels: ue,
|
|
186
186
|
yOffset: f,
|
|
187
|
-
individualHeight:
|
|
187
|
+
individualHeight: z
|
|
188
188
|
};
|
|
189
|
-
})),
|
|
189
|
+
})), r = d({
|
|
190
190
|
start: 0,
|
|
191
191
|
end: I.value
|
|
192
192
|
});
|
|
@@ -195,7 +195,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
195
195
|
}
|
|
196
196
|
const j = d(null);
|
|
197
197
|
async function qe() {
|
|
198
|
-
(a.value.style.chart.zoom.startIndex !== null || a.value.style.chart.zoom.endIndex !== null) && j.value ? (a.value.style.chart.zoom.startIndex !== null && (await pe(), await pe(), j.value && j.value.setStartValue(a.value.style.chart.zoom.startIndex)), a.value.style.chart.zoom.endIndex !== null && (await pe(), await pe(), j.value && j.value.setEndValue($a(a.value.style.chart.zoom.endIndex + 1)))) : (
|
|
198
|
+
(a.value.style.chart.zoom.startIndex !== null || a.value.style.chart.zoom.endIndex !== null) && j.value ? (a.value.style.chart.zoom.startIndex !== null && (await pe(), await pe(), j.value && j.value.setStartValue(a.value.style.chart.zoom.startIndex)), a.value.style.chart.zoom.endIndex !== null && (await pe(), await pe(), j.value && j.value.setEndValue($a(a.value.style.chart.zoom.endIndex + 1)))) : (r.value = {
|
|
199
199
|
start: 0,
|
|
200
200
|
end: I.value
|
|
201
201
|
}, Pe.value += 1);
|
|
@@ -212,9 +212,9 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
212
212
|
T.value.width = e * V.value * 2, T.value.height = t * V.value * 2, y.value = e * V.value * 2, P.value = t * V.value * 2, s.value.scale(V.value, V.value), oe();
|
|
213
213
|
}
|
|
214
214
|
function Ta() {
|
|
215
|
-
if (s.value.clearRect(0, 0, 1e4, 1e4), s.value.fillStyle = a.value.style.chart.backgroundColor, s.value.fillRect(0, 0, l.value.canvasWidth, l.value.canvasHeight),
|
|
216
|
-
a.value.style.chart.grid.y.verticalLines.show &&
|
|
217
|
-
for (let t = 0; t <
|
|
215
|
+
if (s.value.clearRect(0, 0, 1e4, 1e4), s.value.fillStyle = a.value.style.chart.backgroundColor, s.value.fillRect(0, 0, l.value.canvasWidth, l.value.canvasHeight), u.value.stacked)
|
|
216
|
+
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) => {
|
|
217
|
+
for (let t = 0; t < r.value.end - r.value.start + 1; t += 1)
|
|
218
218
|
k(
|
|
219
219
|
s.value,
|
|
220
220
|
[
|
|
@@ -231,17 +231,17 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
231
231
|
color: a.value.style.chart.grid.y.verticalLines.color
|
|
232
232
|
}
|
|
233
233
|
);
|
|
234
|
-
}) : a.value.style.chart.grid.y.verticalLines.show &&
|
|
235
|
-
for (let t =
|
|
236
|
-
t % Math.floor((
|
|
234
|
+
}) : 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) => {
|
|
235
|
+
for (let t = r.value.start; t < r.value.end; t += 1)
|
|
236
|
+
t % Math.floor((r.value.end - r.value.start) / a.value.style.chart.grid.y.timeLabels.modulo) === 0 && k(
|
|
237
237
|
s.value,
|
|
238
238
|
[
|
|
239
239
|
{
|
|
240
|
-
x: l.value.left + l.value.slot * (t -
|
|
240
|
+
x: l.value.left + l.value.slot * (t - r.value.start) + l.value.slot / 2,
|
|
241
241
|
y: l.value.bottom - e.yOffset - e.individualHeight
|
|
242
242
|
},
|
|
243
243
|
{
|
|
244
|
-
x: l.value.left + l.value.slot * (t -
|
|
244
|
+
x: l.value.left + l.value.slot * (t - r.value.start) + l.value.slot / 2,
|
|
245
245
|
y: l.value.bottom - e.yOffset
|
|
246
246
|
}
|
|
247
247
|
],
|
|
@@ -266,7 +266,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
266
266
|
);
|
|
267
267
|
});
|
|
268
268
|
}) : h.value.forEach((e) => {
|
|
269
|
-
e.localYLabels.slice(
|
|
269
|
+
e.localYLabels.slice(r.value.start, r.value.end).forEach((t) => {
|
|
270
270
|
k(
|
|
271
271
|
s.value,
|
|
272
272
|
[
|
|
@@ -325,8 +325,8 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
325
325
|
);
|
|
326
326
|
});
|
|
327
327
|
else {
|
|
328
|
-
if (a.value.style.chart.grid.y.verticalLines.show &&
|
|
329
|
-
for (let e = 0; e <
|
|
328
|
+
if (a.value.style.chart.grid.y.verticalLines.show && r.value.end - r.value.start < a.value.style.chart.grid.y.verticalLines.hideUnderXLength)
|
|
329
|
+
for (let e = 0; e < r.value.end - r.value.start + 1; e += 1)
|
|
330
330
|
k(
|
|
331
331
|
s.value,
|
|
332
332
|
[
|
|
@@ -337,13 +337,13 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
337
337
|
color: a.value.style.chart.grid.y.verticalLines.color
|
|
338
338
|
}
|
|
339
339
|
);
|
|
340
|
-
else if (a.value.style.chart.grid.y.verticalLines.show &&
|
|
341
|
-
for (let e =
|
|
342
|
-
e % Math.floor((
|
|
340
|
+
else if (a.value.style.chart.grid.y.verticalLines.show && r.value.end - r.value.start >= a.value.style.chart.grid.y.verticalLines.hideUnderXLength)
|
|
341
|
+
for (let e = r.value.start; e < r.value.end; e += 1)
|
|
342
|
+
e % Math.floor((r.value.end - r.value.start) / a.value.style.chart.grid.y.timeLabels.modulo) === 0 && k(
|
|
343
343
|
s.value,
|
|
344
344
|
[
|
|
345
|
-
{ x: l.value.left + l.value.slot * (e -
|
|
346
|
-
{ x: l.value.left + l.value.slot * (e -
|
|
345
|
+
{ x: l.value.left + l.value.slot * (e - r.value.start) + l.value.slot / 2, y: l.value.top },
|
|
346
|
+
{ x: l.value.left + l.value.slot * (e - r.value.start) + l.value.slot / 2, y: l.value.bottom }
|
|
347
347
|
],
|
|
348
348
|
{
|
|
349
349
|
color: a.value.style.chart.grid.y.verticalLines.color
|
|
@@ -445,21 +445,21 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
445
445
|
}
|
|
446
446
|
function Ra() {
|
|
447
447
|
h.value.forEach((e) => {
|
|
448
|
-
e.showYMarker &&
|
|
448
|
+
e.showYMarker && re(e) && R(
|
|
449
449
|
s.value,
|
|
450
450
|
ee(
|
|
451
451
|
a.value.style.chart.dataLabels.formatter,
|
|
452
|
-
|
|
452
|
+
re(e).value,
|
|
453
453
|
ae({
|
|
454
454
|
p: e.prefix || a.value.style.chart.grid.y.axisLabels.prefix || "",
|
|
455
|
-
v:
|
|
455
|
+
v: re(e).value,
|
|
456
456
|
s: e.suffix || a.value.style.chart.grid.y.axisLabels.suffix || "",
|
|
457
457
|
r: e.rounding || a.value.style.chart.grid.y.axisLabels.rounding || 0
|
|
458
458
|
}),
|
|
459
|
-
{ datapoint:
|
|
459
|
+
{ datapoint: re(e), seriesIndex: null }
|
|
460
460
|
),
|
|
461
461
|
l.value.left - 8 + a.value.style.chart.grid.y.axisLabels.offsetX,
|
|
462
|
-
|
|
462
|
+
re(e).y,
|
|
463
463
|
{
|
|
464
464
|
align: "right",
|
|
465
465
|
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}`,
|
|
@@ -469,7 +469,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
469
469
|
});
|
|
470
470
|
}
|
|
471
471
|
function Pa() {
|
|
472
|
-
a.value.style.chart.grid.y.axisLabels.show && (
|
|
472
|
+
a.value.style.chart.grid.y.axisLabels.show && (u.value.stacked ? h.value.forEach((e) => {
|
|
473
473
|
e.localYLabels.forEach((t, o) => {
|
|
474
474
|
R(
|
|
475
475
|
s.value,
|
|
@@ -551,16 +551,16 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
551
551
|
end: a.value.style.chart.grid.y.timeLabels.values.length
|
|
552
552
|
}));
|
|
553
553
|
function Ea() {
|
|
554
|
-
for (let e =
|
|
555
|
-
(
|
|
554
|
+
for (let e = r.value.start; e < r.value.end; e += 1)
|
|
555
|
+
(r.value.end - r.value.start < a.value.style.chart.grid.y.timeLabels.modulo || r.value.end - r.value.start >= a.value.style.chart.grid.y.timeLabels.modulo && (e % Math.floor((r.value.end - r.value.start) / a.value.style.chart.grid.y.timeLabels.modulo) === 0 || e === c.value + r.value.start && a.value.style.chart.grid.y.timeLabels.showMarker)) && R(
|
|
556
556
|
s.value,
|
|
557
557
|
H.value[e] ? H.value[e].text : e + 1,
|
|
558
|
-
l.value.left + l.value.slot * (e -
|
|
558
|
+
l.value.left + l.value.slot * (e - r.value.start) + l.value.slot / 2,
|
|
559
559
|
l.value.bottom + y.value / a.value.style.chart.grid.y.timeLabels.offsetY,
|
|
560
560
|
{
|
|
561
561
|
align: a.value.style.chart.grid.y.timeLabels.rotation === 0 ? "center" : a.value.style.chart.grid.y.timeLabels.rotation > 0 ? "left" : "right",
|
|
562
562
|
font: `${a.value.style.chart.grid.y.timeLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * a.value.style.chart.grid.y.timeLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
|
|
563
|
-
color: a.value.style.chart.grid.y.timeLabels.showMarker ? ve(a.value.style.chart.grid.y.timeLabels.color, c.value !== null ? c.value +
|
|
563
|
+
color: a.value.style.chart.grid.y.timeLabels.showMarker ? ve(a.value.style.chart.grid.y.timeLabels.color, c.value !== null ? c.value + r.value.start === e ? 100 : 20 : 100) : a.value.style.chart.grid.y.timeLabels.color,
|
|
564
564
|
rotation: a.value.style.chart.grid.y.timeLabels.rotation
|
|
565
565
|
}
|
|
566
566
|
);
|
|
@@ -600,19 +600,19 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
600
600
|
s.value,
|
|
601
601
|
[
|
|
602
602
|
{
|
|
603
|
-
x: l.value.left + l.value.slot * o + l.value.slot / 10 + (
|
|
604
|
-
y:
|
|
603
|
+
x: l.value.left + l.value.slot * o + l.value.slot / 10 + (u.value.stacked ? 0 : l.value.slot / w.value.length * t - (t === 0 ? 0 : l.value.slot / (5 * w.value.length) * t)),
|
|
604
|
+
y: u.value.stacked ? e.localZero : m.value.zero
|
|
605
605
|
},
|
|
606
606
|
{
|
|
607
|
-
x: l.value.left + l.value.slot * o + l.value.slot / 10 + (
|
|
608
|
-
y:
|
|
607
|
+
x: l.value.left + l.value.slot * o + l.value.slot / 10 + (u.value.stacked ? 0 : l.value.slot / w.value.length * t - (t === 0 ? 0 : l.value.slot / (5 * w.value.length) * t)) + l.value.slot * 0.8 / (u.value.stacked ? 1 : w.value.length),
|
|
608
|
+
y: u.value.stacked ? e.localZero : m.value.zero
|
|
609
609
|
},
|
|
610
610
|
{
|
|
611
|
-
x: l.value.left + l.value.slot * o + l.value.slot / 10 + (
|
|
611
|
+
x: l.value.left + l.value.slot * o + l.value.slot / 10 + (u.value.stacked ? 0 : l.value.slot / w.value.length * t - (t === 0 ? 0 : l.value.slot / (5 * w.value.length) * t)) + l.value.slot * 0.8 / (u.value.stacked ? 1 : w.value.length),
|
|
612
612
|
y: e.coordinatesLine[o].y
|
|
613
613
|
},
|
|
614
614
|
{
|
|
615
|
-
x: l.value.left + l.value.slot * o + l.value.slot / 10 + (
|
|
615
|
+
x: l.value.left + l.value.slot * o + l.value.slot / 10 + (u.value.stacked ? 0 : l.value.slot / w.value.length * t - (t === 0 ? 0 : l.value.slot / (5 * w.value.length) * t)),
|
|
616
616
|
y: e.coordinatesLine[o].y
|
|
617
617
|
}
|
|
618
618
|
],
|
|
@@ -626,7 +626,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
626
626
|
},
|
|
627
627
|
end: {
|
|
628
628
|
x: e.coordinatesLine[o].x,
|
|
629
|
-
y:
|
|
629
|
+
y: u.value.stacked ? e.localZero : m.value.zero
|
|
630
630
|
},
|
|
631
631
|
stops: [
|
|
632
632
|
{ offset: 0, color: e.color },
|
|
@@ -634,7 +634,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
634
634
|
]
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
|
-
),
|
|
637
|
+
), u.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && R(
|
|
638
638
|
s.value,
|
|
639
639
|
ee(
|
|
640
640
|
a.value.style.chart.dataLabels.formatter,
|
|
@@ -647,8 +647,8 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
647
647
|
}),
|
|
648
648
|
{ datapoint: e.coordinatesLine[o], seriesIndex: o }
|
|
649
649
|
),
|
|
650
|
-
l.value.left + l.value.slot * o + l.value.slot / 10 + (
|
|
651
|
-
(e.coordinatesLine[o].value < 0 ?
|
|
650
|
+
l.value.left + l.value.slot * o + l.value.slot / 10 + (u.value.stacked ? 0 : l.value.slot / w.value.length * t - (t === 0 ? 0 : l.value.slot / (5 * w.value.length) * t)) + l.value.slot * 0.4 / (u.value.stacked ? 1 : w.value.length),
|
|
651
|
+
(e.coordinatesLine[o].value < 0 ? u.value.stacked ? e.localZero : m.value.zero : e.coordinatesLine[o].y) + a.value.style.chart.dataLabels.offsetY,
|
|
652
652
|
{
|
|
653
653
|
align: "center",
|
|
654
654
|
font: `${Math.round(y.value / 40 * a.value.style.chart.dataLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
|
|
@@ -660,7 +660,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
660
660
|
});
|
|
661
661
|
}
|
|
662
662
|
function Na(e) {
|
|
663
|
-
e.useArea ?
|
|
663
|
+
e.useArea ? u.value.stacked ? ca(
|
|
664
664
|
s.value,
|
|
665
665
|
[{ x: e.coordinatesLine[0].x, y: e.localZero }, ...e.coordinatesLine, { x: e.coordinatesLine.at(-1).x, y: e.localZero }],
|
|
666
666
|
{
|
|
@@ -695,8 +695,8 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
695
695
|
});
|
|
696
696
|
}
|
|
697
697
|
function oe() {
|
|
698
|
-
Ta(), N.value ? (c.value !== null && a.value.style.chart.selector.show && Je(), Da(),
|
|
699
|
-
(e.type === "line" || !e.type) && Na(e), G.value && (Oa(e),
|
|
698
|
+
Ta(), N.value ? (c.value !== null && a.value.style.chart.selector.show && Je(), Da(), u.value.stacked && a.value.style.chart.grid.x.showAxis && Ha(), Ia.value.forEach((e) => {
|
|
699
|
+
(e.type === "line" || !e.type) && Na(e), G.value && (Oa(e), u.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && Fa(e));
|
|
700
700
|
}), xe.value = yl(T.value)) : (xe.value && (s.value.clearRect(0, 0, 1e4, 1e4), s.value.drawImage(xe.value, 0, 0)), c.value !== null && a.value.style.chart.selector.show && Je(), c.value !== null && h.value.forEach((e) => {
|
|
701
701
|
if (e.type === "line" || !e.type || e.type === "plot") {
|
|
702
702
|
if (!e.coordinatesLine[c.value]) return;
|
|
@@ -718,7 +718,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
718
718
|
const ye = cl(() => {
|
|
719
719
|
G.value = !0, Ma();
|
|
720
720
|
}, I.value > 200 ? 10 : 1, !G.value);
|
|
721
|
-
function
|
|
721
|
+
function re(e) {
|
|
722
722
|
if ([null, void 0].includes(c.value) || !e.coordinatesLine[c.value]) return !1;
|
|
723
723
|
const { y: t, value: o } = e.coordinatesLine[c.value];
|
|
724
724
|
return { y: t, value: o };
|
|
@@ -740,7 +740,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
740
740
|
name: f.name,
|
|
741
741
|
color: f.color,
|
|
742
742
|
type: f.type || "line",
|
|
743
|
-
value: f.series.find((Y,
|
|
743
|
+
value: f.series.find((Y, z) => z === c.value)
|
|
744
744
|
})),
|
|
745
745
|
series: h.value,
|
|
746
746
|
config: a.value
|
|
@@ -751,34 +751,34 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
751
751
|
name: f.name,
|
|
752
752
|
color: f.color,
|
|
753
753
|
type: f.type || "line",
|
|
754
|
-
value: f.series.find((Y,
|
|
754
|
+
value: f.series.find((Y, z) => z === c.value)
|
|
755
755
|
})),
|
|
756
756
|
series: h.value,
|
|
757
757
|
config: a.value
|
|
758
|
-
}) : (a.value.style.chart.grid.y.timeLabels.values.slice(
|
|
758
|
+
}) : (a.value.style.chart.grid.y.timeLabels.values.slice(r.value.start, r.value.end)[c.value] && (C += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${a.value.style.chart.tooltip.borderColor}; width:100%">${H.value.slice(r.value.start, r.value.end)[c.value].text}</div>`), C += za.value.join(""), de.value = C), G.value = !1;
|
|
759
759
|
}
|
|
760
760
|
A(() => c.value, (e) => {
|
|
761
761
|
ye();
|
|
762
|
-
}), A(() =>
|
|
762
|
+
}), A(() => r.value, (e) => {
|
|
763
763
|
N.value = !0, oe();
|
|
764
764
|
}, {
|
|
765
765
|
deep: !0
|
|
766
|
-
}), A(() =>
|
|
766
|
+
}), A(() => u.value.showDataLabels, (e) => {
|
|
767
767
|
N.value = !0, oe();
|
|
768
768
|
}), A(() => M.value, (e) => {
|
|
769
769
|
e && oe();
|
|
770
|
-
}), A(() =>
|
|
770
|
+
}), A(() => u.value.stacked, (e) => {
|
|
771
771
|
N.value = !0, G.value = !0, ye();
|
|
772
772
|
});
|
|
773
773
|
function Ua() {
|
|
774
774
|
ce.value = !1, c.value = null, de.value = "", M.value = null, oe();
|
|
775
775
|
}
|
|
776
776
|
const F = Ie(null), q = Ie(null), J = Ie(null);
|
|
777
|
-
|
|
778
|
-
|
|
777
|
+
ua(() => {
|
|
778
|
+
ze();
|
|
779
779
|
});
|
|
780
|
-
function
|
|
781
|
-
if (
|
|
780
|
+
function ze() {
|
|
781
|
+
if (rl(g.dataset) ? ul({
|
|
782
782
|
componentName: "VueUiXyCanvas",
|
|
783
783
|
type: "dataset"
|
|
784
784
|
}) : T.value && (s.value = T.value.getContext("2d", { willReadFrequently: !0 })), a.value.responsive) {
|
|
@@ -832,7 +832,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
832
832
|
let t = [];
|
|
833
833
|
for (let v = 0; v < I.value; v += 1) {
|
|
834
834
|
const C = h.value.map((i) => i.series[v] ?? 0).reduce((i, f) => i + f, 0);
|
|
835
|
-
t.push([a.value.style.chart.grid.y.timeLabels.values.slice(
|
|
835
|
+
t.push([a.value.style.chart.grid.y.timeLabels.values.slice(r.value.start, r.value.end)[v] ? H.value.slice(r.value.start, r.value.end)[v].text : v + 1].concat(h.value.map((i) => (i.series[v] ?? 0).toFixed(a.value.table.rounding))).concat((C ?? 0).toFixed(a.value.table.rounding)));
|
|
836
836
|
}
|
|
837
837
|
const o = {
|
|
838
838
|
th: {
|
|
@@ -847,7 +847,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
847
847
|
},
|
|
848
848
|
breakpoint: a.value.table.responsiveBreakpoint
|
|
849
849
|
}, n = [a.value.table.columnNames.period].concat(h.value.map((v) => v.name)).concat(a.value.table.columnNames.total);
|
|
850
|
-
return { head: e, body: t.slice(0,
|
|
850
|
+
return { head: e, body: t.slice(0, r.value.end - r.value.start), config: o, colNames: n };
|
|
851
851
|
}), ea = x(() => {
|
|
852
852
|
if (h.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
|
|
853
853
|
const e = h.value.map((o) => ({
|
|
@@ -855,7 +855,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
855
855
|
color: o.color,
|
|
856
856
|
type: o.type
|
|
857
857
|
})), t = [];
|
|
858
|
-
for (let o =
|
|
858
|
+
for (let o = r.value.start; o < r.value.end; o += 1) {
|
|
859
859
|
const n = [a.value.style.chart.grid.y.timeLabels.values[o] ? H.value[o].text : o + 1];
|
|
860
860
|
h.value.forEach((v) => {
|
|
861
861
|
n.push(Number((v.series[o] || 0).toFixed(a.value.table.rounding)));
|
|
@@ -871,16 +871,16 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
871
871
|
return h.value;
|
|
872
872
|
}
|
|
873
873
|
function la() {
|
|
874
|
-
|
|
874
|
+
u.value.showTable = !u.value.showTable;
|
|
875
875
|
}
|
|
876
876
|
function ta() {
|
|
877
|
-
|
|
877
|
+
u.value.showDataLabels = !u.value.showDataLabels;
|
|
878
878
|
}
|
|
879
879
|
function oa() {
|
|
880
|
-
|
|
880
|
+
u.value.stacked = !u.value.stacked;
|
|
881
881
|
}
|
|
882
|
-
function
|
|
883
|
-
|
|
882
|
+
function ra() {
|
|
883
|
+
u.value.showTooltip = !u.value.showTooltip;
|
|
884
884
|
}
|
|
885
885
|
const ge = d(!1);
|
|
886
886
|
function $e() {
|
|
@@ -894,9 +894,9 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
894
894
|
toggleTable: la,
|
|
895
895
|
toggleLabels: ta,
|
|
896
896
|
toggleStack: oa,
|
|
897
|
-
toggleTooltip:
|
|
897
|
+
toggleTooltip: ra,
|
|
898
898
|
toggleAnnotator: $e
|
|
899
|
-
}), (e, t) => (
|
|
899
|
+
}), (e, t) => (S(), ne("div", {
|
|
900
900
|
style: Q(`width:100%; position:relative; ${a.value.responsive ? "height: 100%" : ""}`),
|
|
901
901
|
ref_key: "xy",
|
|
902
902
|
ref: le,
|
|
@@ -905,13 +905,13 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
905
905
|
onMouseenter: t[5] || (t[5] = () => p(He)(!0)),
|
|
906
906
|
onMouseleave: t[6] || (t[6] = () => p(He)(!1))
|
|
907
907
|
}, [
|
|
908
|
-
a.value.style.chart.title.text ? (
|
|
908
|
+
a.value.style.chart.title.text ? (S(), ne("div", {
|
|
909
909
|
key: 0,
|
|
910
910
|
ref_key: "chartTitle",
|
|
911
911
|
ref: Ee,
|
|
912
912
|
style: Q(`width:100%;background:${a.value.style.chart.backgroundColor};`)
|
|
913
913
|
}, [
|
|
914
|
-
(
|
|
914
|
+
(S(), D(bl, {
|
|
915
915
|
key: `title_${Le.value}`,
|
|
916
916
|
config: {
|
|
917
917
|
title: {
|
|
@@ -925,7 +925,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
925
925
|
}
|
|
926
926
|
}, null, 8, ["config"]))
|
|
927
927
|
], 4)) : W("", !0),
|
|
928
|
-
a.value.userOptions.show && we.value && (p(Ye) || p(
|
|
928
|
+
a.value.userOptions.show && we.value && (p(Ye) || p(Se)) ? (S(), D(p(xa), {
|
|
929
929
|
ref: "details",
|
|
930
930
|
key: `user_option_${Fe.value}`,
|
|
931
931
|
backgroundColor: a.value.style.chart.backgroundColor,
|
|
@@ -940,16 +940,17 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
940
940
|
hasLabel: a.value.userOptions.buttons.labels,
|
|
941
941
|
hasStack: Oe.dataset.length > 1 && a.value.userOptions.buttons.stack,
|
|
942
942
|
hasFullscreen: a.value.userOptions.buttons.fullscreen,
|
|
943
|
-
hasTable:
|
|
943
|
+
hasTable: r.value.end - r.value.start < 200 && a.value.userOptions.buttons.table,
|
|
944
944
|
isFullscreen: he.value,
|
|
945
|
-
isTooltip:
|
|
946
|
-
isStacked:
|
|
945
|
+
isTooltip: u.value.showTooltip,
|
|
946
|
+
isStacked: u.value.stacked,
|
|
947
947
|
titles: { ...a.value.userOptions.buttonTitles },
|
|
948
948
|
chartElement: le.value,
|
|
949
949
|
position: a.value.userOptions.position,
|
|
950
950
|
hasAnnotator: a.value.userOptions.buttons.annotator,
|
|
951
951
|
isAnnotation: ge.value,
|
|
952
952
|
callbacks: a.value.userOptions.callbacks,
|
|
953
|
+
printScale: a.value.userOptions.print.scale,
|
|
953
954
|
onToggleFullscreen: wa,
|
|
954
955
|
onGeneratePdf: p(Be),
|
|
955
956
|
onGenerateCsv: aa,
|
|
@@ -957,10 +958,10 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
957
958
|
onToggleTable: la,
|
|
958
959
|
onToggleLabels: ta,
|
|
959
960
|
onToggleStack: oa,
|
|
960
|
-
onToggleTooltip:
|
|
961
|
+
onToggleTooltip: ra,
|
|
961
962
|
onToggleAnnotator: $e,
|
|
962
963
|
style: Q({
|
|
963
|
-
visibility: p(Ye) ? p(
|
|
964
|
+
visibility: p(Ye) ? p(Se) ? "visible" : "hidden" : "visible"
|
|
964
965
|
})
|
|
965
966
|
}, Za({ _: 2 }, [
|
|
966
967
|
e.$slots.menuIcon ? {
|
|
@@ -1033,21 +1034,21 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
1033
1034
|
]),
|
|
1034
1035
|
key: "9"
|
|
1035
1036
|
} : void 0
|
|
1036
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasLabel", "hasStack", "hasFullscreen", "hasTable", "isFullscreen", "isTooltip", "isStacked", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "onGeneratePdf", "onGenerateImage", "style"])) : W("", !0),
|
|
1037
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasLabel", "hasStack", "hasFullscreen", "hasTable", "isFullscreen", "isTooltip", "isStacked", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : W("", !0),
|
|
1037
1038
|
ie("div", {
|
|
1038
1039
|
class: "vue-ui-xy-canvas",
|
|
1039
1040
|
style: Q(`position: relative; aspect-ratio: ${We.value}`),
|
|
1040
1041
|
ref_key: "container",
|
|
1041
1042
|
ref: te
|
|
1042
1043
|
}, [
|
|
1043
|
-
we.value ? (
|
|
1044
|
+
we.value ? (S(), ne("canvas", {
|
|
1044
1045
|
key: 0,
|
|
1045
1046
|
ref_key: "canvas",
|
|
1046
1047
|
ref: T,
|
|
1047
1048
|
style: { width: "100%", height: "100%" },
|
|
1048
1049
|
onMousemove: t[0] || (t[0] = (o) => Ya(o)),
|
|
1049
1050
|
onMouseleave: Ua
|
|
1050
|
-
}, null, 544)) : (
|
|
1051
|
+
}, null, 544)) : (S(), D(p(ma), {
|
|
1051
1052
|
key: 1,
|
|
1052
1053
|
config: {
|
|
1053
1054
|
type: "line",
|
|
@@ -1066,7 +1067,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
1066
1067
|
}
|
|
1067
1068
|
}, null, 8, ["config"])),
|
|
1068
1069
|
ja(p(ba), {
|
|
1069
|
-
show:
|
|
1070
|
+
show: u.value.showTooltip && ce.value,
|
|
1070
1071
|
backgroundColor: a.value.style.chart.tooltip.backgroundColor,
|
|
1071
1072
|
color: a.value.style.chart.tooltip.color,
|
|
1072
1073
|
fontSize: a.value.style.chart.tooltip.fontSize,
|
|
@@ -1096,7 +1097,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
1096
1097
|
style: Q(`width:100%;background:${a.value.style.chart.backgroundColor}`),
|
|
1097
1098
|
"data-dom-to-png-ignore": ""
|
|
1098
1099
|
}, [
|
|
1099
|
-
a.value.style.chart.zoom.show && I.value > 1 ? (
|
|
1100
|
+
a.value.style.chart.zoom.show && I.value > 1 ? (S(), D(xl, {
|
|
1100
1101
|
ref_key: "slicerComponent",
|
|
1101
1102
|
ref: j,
|
|
1102
1103
|
key: `slicer_${Pe.value}`,
|
|
@@ -1104,19 +1105,19 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
1104
1105
|
borderColor: a.value.style.chart.backgroundColor,
|
|
1105
1106
|
fontSize: a.value.style.chart.zoom.fontSize,
|
|
1106
1107
|
useResetSlot: a.value.style.chart.zoom.useResetSlot,
|
|
1107
|
-
labelLeft: a.value.style.chart.grid.y.timeLabels.values[
|
|
1108
|
-
labelRight: a.value.style.chart.grid.y.timeLabels.values[
|
|
1108
|
+
labelLeft: a.value.style.chart.grid.y.timeLabels.values[r.value.start] ? H.value[r.value.start].text : "",
|
|
1109
|
+
labelRight: a.value.style.chart.grid.y.timeLabels.values[r.value.end - 1] ? H.value[r.value.end - 1].text : "",
|
|
1109
1110
|
textColor: a.value.style.chart.color,
|
|
1110
1111
|
inputColor: a.value.style.chart.zoom.color,
|
|
1111
1112
|
selectColor: a.value.style.chart.zoom.highlightColor,
|
|
1112
1113
|
max: I.value,
|
|
1113
1114
|
min: 0,
|
|
1114
|
-
valueStart:
|
|
1115
|
-
valueEnd:
|
|
1116
|
-
start:
|
|
1117
|
-
"onUpdate:start": t[1] || (t[1] = (o) =>
|
|
1118
|
-
end:
|
|
1119
|
-
"onUpdate:end": t[2] || (t[2] = (o) =>
|
|
1115
|
+
valueStart: r.value.start,
|
|
1116
|
+
valueEnd: r.value.end,
|
|
1117
|
+
start: r.value.start,
|
|
1118
|
+
"onUpdate:start": t[1] || (t[1] = (o) => r.value.start = o),
|
|
1119
|
+
end: r.value.end,
|
|
1120
|
+
"onUpdate:end": t[2] || (t[2] = (o) => r.value.end = o),
|
|
1120
1121
|
refreshStartPoint: a.value.style.chart.zoom.startIndex !== null ? a.value.style.chart.zoom.startIndex : 0,
|
|
1121
1122
|
refreshEndPoint: a.value.style.chart.zoom.endIndex !== null ? a.value.style.chart.zoom.endIndex + 1 : I.value,
|
|
1122
1123
|
enableRangeHandles: a.value.style.chart.zoom.enableRangeHandles,
|
|
@@ -1133,7 +1134,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
1133
1134
|
ref_key: "chartLegend",
|
|
1134
1135
|
ref: Ae
|
|
1135
1136
|
}, [
|
|
1136
|
-
a.value.style.chart.legend.show && we.value ? (
|
|
1137
|
+
a.value.style.chart.legend.show && we.value ? (S(), D(ml, {
|
|
1137
1138
|
legendSet: Qe.value,
|
|
1138
1139
|
config: Wa.value,
|
|
1139
1140
|
key: `legend_${Ce.value}`,
|
|
@@ -1151,10 +1152,10 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
1151
1152
|
legend: Qe.value
|
|
1152
1153
|
}, void 0, !0)
|
|
1153
1154
|
], 512),
|
|
1154
|
-
e.$slots.watermark ? (
|
|
1155
|
+
e.$slots.watermark ? (S(), ne("div", Sl, [
|
|
1155
1156
|
L(e.$slots, "watermark", X(_({ isPrinting: p(Xe) || p(_e) })), void 0, !0)
|
|
1156
1157
|
])) : W("", !0),
|
|
1157
|
-
e.$slots.source ? (
|
|
1158
|
+
e.$slots.source ? (S(), ne("div", {
|
|
1158
1159
|
key: 3,
|
|
1159
1160
|
ref_key: "source",
|
|
1160
1161
|
ref: Ne,
|
|
@@ -1162,11 +1163,11 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
1162
1163
|
}, [
|
|
1163
1164
|
L(e.$slots, "source", {}, void 0, !0)
|
|
1164
1165
|
], 512)) : W("", !0),
|
|
1165
|
-
|
|
1166
|
+
r.value.end - r.value.start < 200 ? (S(), D(p(fa), {
|
|
1166
1167
|
key: 4,
|
|
1167
1168
|
hideDetails: "",
|
|
1168
1169
|
config: {
|
|
1169
|
-
open:
|
|
1170
|
+
open: u.value.showTable,
|
|
1170
1171
|
maxHeight: 1e4,
|
|
1171
1172
|
body: {
|
|
1172
1173
|
backgroundColor: a.value.style.chart.backgroundColor,
|
|
@@ -1179,17 +1180,17 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
1179
1180
|
}
|
|
1180
1181
|
}, {
|
|
1181
1182
|
content: b(() => [
|
|
1182
|
-
(
|
|
1183
|
+
(S(), D(p(ga), {
|
|
1183
1184
|
key: `table_${ke.value}`,
|
|
1184
1185
|
colNames: fe.value.colNames,
|
|
1185
1186
|
head: fe.value.head,
|
|
1186
1187
|
body: fe.value.body,
|
|
1187
1188
|
config: fe.value.config,
|
|
1188
1189
|
title: `${a.value.style.chart.title.text}${a.value.style.chart.title.subtitle.text ? ` : ${a.value.style.chart.title.subtitle.text}` : ""}`,
|
|
1189
|
-
onClose: t[4] || (t[4] = (o) =>
|
|
1190
|
+
onClose: t[4] || (t[4] = (o) => u.value.showTable = !1)
|
|
1190
1191
|
}, {
|
|
1191
1192
|
th: b(({ th: o }) => [
|
|
1192
|
-
ie("div", { innerHTML: o }, null, 8,
|
|
1193
|
+
ie("div", { innerHTML: o }, null, 8, zl)
|
|
1193
1194
|
]),
|
|
1194
1195
|
td: b(({ td: o }) => [
|
|
1195
1196
|
qa(sa(o), 1)
|
|
@@ -1199,7 +1200,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
1199
1200
|
]),
|
|
1200
1201
|
_: 1
|
|
1201
1202
|
}, 8, ["config"])) : W("", !0),
|
|
1202
|
-
a.value.userOptions.buttons.annotator && h.value.length ? (
|
|
1203
|
+
a.value.userOptions.buttons.annotator && h.value.length ? (S(), D(p(pa), {
|
|
1203
1204
|
key: 5,
|
|
1204
1205
|
parent: le.value,
|
|
1205
1206
|
backgroundColor: a.value.style.chart.backgroundColor,
|
|
@@ -1209,7 +1210,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
1209
1210
|
}, null, 8, ["parent", "backgroundColor", "color", "active"])) : W("", !0)
|
|
1210
1211
|
], 46, Cl));
|
|
1211
1212
|
}
|
|
1212
|
-
}, Yl = /* @__PURE__ */ kl($l, [["__scopeId", "data-v-
|
|
1213
|
+
}, Yl = /* @__PURE__ */ kl($l, [["__scopeId", "data-v-6363bbe2"]]);
|
|
1213
1214
|
export {
|
|
1214
1215
|
Yl as default
|
|
1215
1216
|
};
|