vue-data-ui 3.0.0-next.0 → 3.0.0-next.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 +108 -67
- package/dist/{Arrow-CzFtSJ1v.js → Arrow-Dck2Ea5K.js} +1 -1
- package/dist/{BaseDraggableDialog-0S5xhs2P.js → BaseDraggableDialog-CatHZ1ns.js} +2 -2
- package/dist/{BaseIcon-DoDjTdD5.js → BaseIcon-BmZ4MREl.js} +1 -1
- package/dist/{ColorPicker-BGRchgqQ.js → ColorPicker-C1MXyD9Q.js} +2 -2
- package/dist/{DataTable-BBbOgI-a.js → DataTable-CgL0Rz0x.js} +2 -2
- package/dist/{Legend-Q4bOb-Nf.js → Legend-CYbP3Kfg.js} +12 -11
- package/dist/{NonSvgPenAndPaper-DNKRvsBB.js → NonSvgPenAndPaper-CcbcJm_U.js} +3 -3
- package/dist/{PackageVersion-D0VPY8-5.js → PackageVersion-CAkNkiIG.js} +1 -1
- package/dist/{PenAndPaper-DhBJsnob.js → PenAndPaper-Cx1-5zdD.js} +32 -32
- package/dist/{Shape-DbsLJ-SE.js → Shape-DBXkGxKt.js} +1 -1
- package/dist/{Slicer-DZEFp2GU.js → Slicer-nrMi5hzj.js} +2 -2
- package/dist/{SparkTooltip-CoOJR62O.js → SparkTooltip-fNzL4pIU.js} +1 -1
- package/dist/{Title-D29apS4l.js → Title-pVYRzQXY.js} +1 -1
- package/dist/Tooltip-NwATo4ZJ.js +157 -0
- package/dist/{UserOptions-Bdit7AWO.js → UserOptions-DAsRxxrf.js} +137 -129
- package/dist/{dom-to-png-BdPIrHOF.js → dom-to-png-BF_4H_6u.js} +1 -1
- package/dist/img-ku4zevVD.js +33 -0
- package/dist/{index-DMqAxz7R.js → index-BzfnuLnw.js} +1199 -1135
- package/dist/pdf-CguiIsUc.js +58 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +1051 -217
- package/dist/types/vue-data-ui.d.ts +1051 -217
- package/dist/useLoading-Bt5Doa8m.js +28 -0
- package/dist/{useNestedProp-YgN3FV_8.js → useNestedProp-DorElw91.js} +1 -1
- package/dist/{usePrinter-COkTjv6C.js → usePrinter-C9qkgv0r.js} +2 -2
- package/dist/vue-data-ui-DQef_oFO.js +314 -0
- package/dist/vue-data-ui.js +13 -13
- package/dist/{vue-ui-3d-bar-Ojgjl20n.js → vue-ui-3d-bar-DPSamIA-.js} +261 -245
- package/dist/{vue-ui-accordion-P6eFHGQp.js → vue-ui-accordion-DgZK-qDz.js} +3 -3
- package/dist/{vue-ui-age-pyramid-IcMpAhiw.js → vue-ui-age-pyramid-DVeGKvf9.js} +233 -217
- package/dist/{vue-ui-annotator-Bk7d86-x.js → vue-ui-annotator-6ikkK-FK.js} +2 -2
- package/dist/{vue-ui-bullet-DCvWbCPk.js → vue-ui-bullet-Bg4hfFk2.js} +172 -156
- package/dist/{vue-ui-candlestick-DCf-88Yv.js → vue-ui-candlestick-Bi59FGXn.js} +271 -254
- package/dist/{vue-ui-carousel-table-DEsl0XUh.js → vue-ui-carousel-table-DitKhrFT.js} +17 -16
- package/dist/{vue-ui-chestnut-Cg10-3wu.js → vue-ui-chestnut-D8wGAZod.js} +419 -403
- package/dist/{vue-ui-chord-BWYzR6vf.js → vue-ui-chord-C-uTVCDP.js} +256 -240
- package/dist/{vue-ui-circle-pack-CO2Ra2-5.js → vue-ui-circle-pack-CPy6xcxv.js} +230 -214
- package/dist/{vue-ui-cursor-BbYHJDbV.js → vue-ui-cursor-Dd7vUd0q.js} +2 -2
- package/dist/{vue-ui-dashboard-DkCnNuse.js → vue-ui-dashboard-CKurbu8M.js} +62 -62
- package/dist/{vue-ui-digits-DRsphHt2.js → vue-ui-digits-DfdZI11G.js} +2 -2
- package/dist/{vue-ui-donut-evolution-B5F2-0bh.js → vue-ui-donut-evolution-CKbLO8yR.js} +370 -357
- package/dist/vue-ui-donut-tECBFvud.js +1532 -0
- package/dist/{vue-ui-dumbbell-DqqSxoSh.js → vue-ui-dumbbell-DI5Lj3r_.js} +216 -200
- package/dist/{vue-ui-flow-CTIcUJgV.js → vue-ui-flow-CjU48s9z.js} +217 -201
- package/dist/{vue-ui-funnel-k7KD7Xoc.js → vue-ui-funnel-DM_5vHZ4.js} +213 -197
- package/dist/{vue-ui-galaxy-C9EHaP4I.js → vue-ui-galaxy-ocvZgZJx.js} +215 -202
- package/dist/{vue-ui-gauge-CBiM_1-n.js → vue-ui-gauge-DajNoY-D.js} +220 -204
- package/dist/{vue-ui-gizmo-CAc7b2oK.js → vue-ui-gizmo-DTnzeQbm.js} +3 -3
- package/dist/{vue-ui-heatmap-B3ubrP2v.js → vue-ui-heatmap-CfBS8jQe.js} +244 -224
- package/dist/{vue-ui-history-plot-XCqccO3b.js → vue-ui-history-plot-BuOPWQoP.js} +268 -252
- package/dist/{vue-ui-kpi-DTGMDjaZ.js → vue-ui-kpi-DLGHOIRj.js} +3 -3
- package/dist/{vue-ui-mini-loader-Cn_7nvVq.js → vue-ui-mini-loader-CHAHi4c9.js} +2 -2
- package/dist/{vue-ui-molecule-BugMXFAK.js → vue-ui-molecule-R5-oDFeW.js} +204 -188
- package/dist/{vue-ui-mood-radar-Cv4dHZPL.js → vue-ui-mood-radar-Ddf2gaES.js} +206 -190
- package/dist/vue-ui-nested-donuts-CksklV83.js +1177 -0
- package/dist/{vue-ui-onion-Bha2hRAb.js → vue-ui-onion-D2n4zUkV.js} +196 -180
- package/dist/{vue-ui-parallel-coordinate-plot-DWJ2DWx4.js → vue-ui-parallel-coordinate-plot-CNWQqlxf.js} +194 -178
- package/dist/{vue-ui-quadrant-BKHZoTml.js → vue-ui-quadrant-CxNj2FEx.js} +321 -305
- package/dist/{vue-ui-quick-chart-D_k3lbU8.js → vue-ui-quick-chart-Bm_VmhJR.js} +347 -331
- package/dist/{vue-ui-radar-Co4EOjSk.js → vue-ui-radar-DSYMQJ6K.js} +193 -177
- package/dist/{vue-ui-rating-dtNN0EdX.js → vue-ui-rating-BiQpwXnc.js} +2 -2
- package/dist/{vue-ui-relation-circle-CR4UpQzM.js → vue-ui-relation-circle-Cdxe78Bm.js} +188 -172
- package/dist/{vue-ui-ridgeline-BKX97EnR.js → vue-ui-ridgeline-DpeM2hRi.js} +212 -196
- package/dist/{vue-ui-rings-EPTwyt6D.js → vue-ui-rings-BenmQHKv.js} +223 -210
- package/dist/{vue-ui-scatter-BlxzblSR.js → vue-ui-scatter-mDMY1H6U.js} +288 -273
- package/dist/{vue-ui-skeleton-CjN2ZdgT.js → vue-ui-skeleton-Ch_XkFuP.js} +3 -3
- package/dist/{vue-ui-smiley-DdF_ErYG.js → vue-ui-smiley-DTig5lTU.js} +2 -2
- package/dist/{vue-ui-spark-trend-RdOlCuT9.js → vue-ui-spark-trend-BkDsp8E0.js} +3 -3
- package/dist/{vue-ui-sparkbar-DWufRGcN.js → vue-ui-sparkbar-CgqoyBOm.js} +3 -3
- package/dist/{vue-ui-sparkgauge-IP1O3qyT.js → vue-ui-sparkgauge-B4jR_Y62.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-Cnv9xZ8H.js → vue-ui-sparkhistogram-DfxjglLy.js} +4 -4
- package/dist/{vue-ui-sparkline-CYgeD5V3.js → vue-ui-sparkline-M3QR8xJE.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-BCwoK9xd.js → vue-ui-sparkstackbar-B2Ls-Mb8.js} +3 -3
- package/dist/{vue-ui-stackbar-CqFIvfrK.js → vue-ui-stackbar-DIHkn6__.js} +497 -474
- package/dist/{vue-ui-strip-plot-Dq-kDRai.js → vue-ui-strip-plot-B_ZLbu2D.js} +241 -225
- package/dist/{vue-ui-table-vaIdQnPl.js → vue-ui-table-BhymhDOh.js} +3 -3
- package/dist/{vue-ui-table-heatmap-U_Td0cdh.js → vue-ui-table-heatmap-DokRh4dS.js} +26 -25
- package/dist/{vue-ui-table-sparkline-DkOaHx5L.js → vue-ui-table-sparkline-DxBZGKZJ.js} +8 -7
- package/dist/{vue-ui-thermometer-CzckBZgs.js → vue-ui-thermometer-e2L6IdF-.js} +170 -154
- package/dist/{vue-ui-timer-DSdUshUs.js → vue-ui-timer-BG2EwK3o.js} +5 -5
- package/dist/vue-ui-tiremarks-nzQH7woJ.js +358 -0
- package/dist/vue-ui-treemap-CZxyi6fl.js +965 -0
- package/dist/{vue-ui-vertical-bar-Dd4sYeAC.js → vue-ui-vertical-bar-DahdX1Sn.js} +382 -360
- package/dist/{vue-ui-waffle-DusUVY6y.js → vue-ui-waffle-D399D4UE.js} +234 -221
- package/dist/vue-ui-wheel-DtcwtHzJ.js +352 -0
- package/dist/{vue-ui-word-cloud-_7uYjJ5A.js → vue-ui-word-cloud-CTDceQsf.js} +249 -233
- package/dist/{vue-ui-world-COIyBHII.js → vue-ui-world-BjNSbqMZ.js} +239 -223
- package/dist/vue-ui-xy-BkTP-JpK.js +2958 -0
- package/dist/{vue-ui-xy-canvas-CuYRyub2.js → vue-ui-xy-canvas-BKAowbe0.js} +447 -431
- package/package.json +2 -2
- package/dist/Tooltip-hVZUY_s5.js +0 -149
- package/dist/img-BeMVTwmF.js +0 -20
- package/dist/pdf-DPxOdzfi.js +0 -51
- package/dist/useMouse-AicQS8Vf.js +0 -13
- package/dist/vue-data-ui-nceqWRts.js +0 -301
- package/dist/vue-ui-donut-DSE7ubVv.js +0 -1315
- package/dist/vue-ui-nested-donuts-CYe0Are_.js +0 -1154
- package/dist/vue-ui-tiremarks-B2WWklqG.js +0 -342
- package/dist/vue-ui-treemap-D1dgDhjG.js +0 -952
- package/dist/vue-ui-wheel-ClsKBh52.js +0 -336
- package/dist/vue-ui-xy-C_OUyzTC.js +0 -3135
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { defineAsyncComponent as
|
|
2
|
-
import { u as
|
|
3
|
-
import { d as
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { S as
|
|
11
|
-
import { u as
|
|
12
|
-
import
|
|
13
|
-
|
|
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, a5 as tl, G as ol, ad 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-BzfnuLnw.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-DorElw91.js";
|
|
5
|
+
import { u as gl } from "./usePrinter-C9qkgv0r.js";
|
|
6
|
+
import { u as pl } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
|
+
import { u as ml } from "./useChartAccessibility-9icAAmYg.js";
|
|
8
|
+
import bl from "./Legend-CYbP3Kfg.js";
|
|
9
|
+
import xl from "./Title-pVYRzQXY.js";
|
|
10
|
+
import { S as Ll } from "./Slicer-nrMi5hzj.js";
|
|
11
|
+
import { u as kl } from "./useTimeLabels-Mrr0jrpL.js";
|
|
12
|
+
import Cl from "./img-ku4zevVD.js";
|
|
13
|
+
import { _ as wl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const Sl = ["id"], zl = ["onClick"], $l = {
|
|
14
15
|
key: 2,
|
|
15
16
|
class: "vue-data-ui-watermark"
|
|
16
|
-
},
|
|
17
|
+
}, Il = ["innerHTML"], Ml = {
|
|
17
18
|
__name: "vue-ui-xy-canvas",
|
|
18
19
|
props: {
|
|
19
20
|
dataset: {
|
|
@@ -30,101 +31,101 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
30
31
|
}
|
|
31
32
|
},
|
|
32
33
|
emits: ["selectLegend"],
|
|
33
|
-
setup(Oe, { expose:
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
setup(Oe, { expose: ya, emit: fa }) {
|
|
35
|
+
const ga = Q(() => import("./vue-ui-accordion-DgZK-qDz.js")), pa = Q(() => import("./DataTable-CgL0Rz0x.js")), ma = Q(() => import("./NonSvgPenAndPaper-CcbcJm_U.js")), ba = Q(() => import("./vue-ui-skeleton-Ch_XkFuP.js")), xa = Q(() => import("./Tooltip-NwATo4ZJ.js")), La = Q(() => import("./UserOptions-DAsRxxrf.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
|
+
sa(() => {
|
|
37
|
+
wa["chart-background"] && console.warn("VueUiXyCanvas does not support the #chart-background slot.");
|
|
37
38
|
});
|
|
38
|
-
const a =
|
|
39
|
+
const a = L({
|
|
39
40
|
get: () => Ue(),
|
|
40
41
|
set: (e) => e
|
|
41
|
-
}), { userOptionsVisible:
|
|
42
|
+
}), { userOptionsVisible: Se, setUserOptionsVisibility: He, keepUserOptionState: Ye } = pl({ config: a.value }), { svgRef: T } = ml({ config: a.value.style.chart.title });
|
|
42
43
|
function Ue() {
|
|
43
|
-
const e =
|
|
44
|
+
const e = ha({
|
|
44
45
|
userConfig: g.config,
|
|
45
|
-
defaultConfig:
|
|
46
|
+
defaultConfig: ka
|
|
46
47
|
});
|
|
47
|
-
let
|
|
48
|
-
return e.theme ?
|
|
49
|
-
...
|
|
50
|
-
userConfig:
|
|
48
|
+
let l = {};
|
|
49
|
+
return e.theme ? l = {
|
|
50
|
+
...ha({
|
|
51
|
+
userConfig: al.vue_ui_xy_canvas[e.theme] || g.config,
|
|
51
52
|
defaultConfig: e
|
|
52
53
|
}),
|
|
53
|
-
customPalette:
|
|
54
|
-
} :
|
|
54
|
+
customPalette: el[e.theme] || V
|
|
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;
|
|
55
56
|
}
|
|
56
|
-
|
|
57
|
-
a.value = Ue(),
|
|
58
|
-
}, { deep: !0 }),
|
|
59
|
-
|
|
57
|
+
D(() => g.config, (e) => {
|
|
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 }), D(() => g.dataset, () => {
|
|
60
|
+
ze(), Le.value += 1, ke.value += 1, Ce.value += 1;
|
|
60
61
|
}, { deep: !0 });
|
|
61
|
-
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({
|
|
62
63
|
elementId: `xy_canvas_${be.value}`,
|
|
63
64
|
fileName: a.value.style.chart.title.text || "vue-ui-xy-canvas",
|
|
64
65
|
options: a.value.userOptions.print
|
|
65
|
-
}),
|
|
66
|
+
}), u = d({
|
|
66
67
|
showTable: a.value.table.show,
|
|
67
68
|
showDataLabels: a.value.style.chart.dataLabels.show,
|
|
68
69
|
stacked: a.value.style.chart.stacked,
|
|
69
70
|
showTooltip: a.value.style.chart.tooltip.show
|
|
70
71
|
});
|
|
71
|
-
function
|
|
72
|
-
he.value = e,
|
|
72
|
+
function Ge(e) {
|
|
73
|
+
he.value = e, Ee.value += 1;
|
|
73
74
|
}
|
|
74
|
-
const
|
|
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(() => {
|
|
75
76
|
const e = y.value - y.value * (a.value.style.chart.paddingProportions.left + a.value.style.chart.paddingProportions.right);
|
|
76
77
|
return {
|
|
77
78
|
canvasWidth: y.value,
|
|
78
|
-
canvasHeight:
|
|
79
|
+
canvasHeight: E.value,
|
|
79
80
|
left: y.value * a.value.style.chart.paddingProportions.left,
|
|
80
|
-
top:
|
|
81
|
+
top: E.value * a.value.style.chart.paddingProportions.top,
|
|
81
82
|
right: y.value - y.value * a.value.style.chart.paddingProportions.right,
|
|
82
|
-
bottom:
|
|
83
|
+
bottom: E.value - E.value * a.value.style.chart.paddingProportions.bottom,
|
|
83
84
|
width: e,
|
|
84
|
-
height:
|
|
85
|
-
slot: e / (
|
|
85
|
+
height: E.value - E.value * (a.value.style.chart.paddingProportions.top + a.value.style.chart.paddingProportions.bottom),
|
|
86
|
+
slot: e / (r.value.end - r.value.start)
|
|
86
87
|
};
|
|
87
88
|
});
|
|
88
|
-
function
|
|
89
|
-
return e /
|
|
89
|
+
function je(e, l) {
|
|
90
|
+
return e / l;
|
|
90
91
|
}
|
|
91
|
-
function
|
|
92
|
-
return
|
|
93
|
-
const
|
|
94
|
-
let
|
|
95
|
-
e && (
|
|
92
|
+
function Sa({ hasAutoScale: e, series: l, min: o, max: n, scale: i, yOffset: b, individualHeight: v, stackIndex: f = null }) {
|
|
93
|
+
return l.map((U, z) => {
|
|
94
|
+
const A = i.min < 0 ? Math.abs(i.min) : 0, W = je(U + A, A + i.max);
|
|
95
|
+
let ue, se;
|
|
96
|
+
e && (ue = i.min, se = je(U - ue, i.max - ue));
|
|
96
97
|
let O = 0;
|
|
97
|
-
return f === null ? O =
|
|
98
|
-
x:
|
|
98
|
+
return f === null ? O = t.value.bottom - t.value.height * (e ? se : W) : O = t.value.bottom - b - v * (e ? se : W), {
|
|
99
|
+
x: t.value.left + t.value.slot * z + t.value.slot / 2,
|
|
99
100
|
y: O,
|
|
100
|
-
value:
|
|
101
|
+
value: U
|
|
101
102
|
};
|
|
102
103
|
});
|
|
103
104
|
}
|
|
104
|
-
const m =
|
|
105
|
-
const e = a.value.style.chart.scale.min !== null ? a.value.style.chart.scale.min : Math.min(...
|
|
106
|
-
y:
|
|
107
|
-
x:
|
|
108
|
-
value:
|
|
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
|
+
x: t.value.left - 8,
|
|
109
|
+
value: v
|
|
109
110
|
}));
|
|
110
111
|
return {
|
|
111
112
|
absoluteMin: n,
|
|
112
|
-
max:
|
|
113
|
+
max: l,
|
|
113
114
|
min: e,
|
|
114
115
|
scale: o,
|
|
115
|
-
yLabels:
|
|
116
|
-
zero:
|
|
116
|
+
yLabels: b,
|
|
117
|
+
zero: i
|
|
117
118
|
};
|
|
118
|
-
}),
|
|
119
|
+
}), za = L(() => h.value.map((e) => `
|
|
119
120
|
<div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
|
|
120
121
|
<svg viewBox="0 0 10 10" height="12" width="12">
|
|
121
122
|
<circle cx="5" cy="5" r="5" fill="${e.color}"/>
|
|
122
123
|
</svg>
|
|
123
124
|
<span>${e.name ? e.name + ": " : ""}</span>
|
|
124
|
-
<span>${
|
|
125
|
+
<span>${ae(
|
|
125
126
|
a.value.style.chart.dataLabels.formatter,
|
|
126
127
|
e.series[c.value],
|
|
127
|
-
|
|
128
|
+
le({
|
|
128
129
|
p: e.prefix || "",
|
|
129
130
|
v: e.series[c.value],
|
|
130
131
|
s: e.suffix || "",
|
|
@@ -133,116 +134,116 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
133
134
|
{ datapoint: e, seriesIndex: c.value }
|
|
134
135
|
)}</span>
|
|
135
136
|
</div>
|
|
136
|
-
`)),
|
|
137
|
+
`)), j = L(() => g.dataset.map((e, l) => ({
|
|
137
138
|
...e,
|
|
138
|
-
series:
|
|
139
|
-
data:
|
|
139
|
+
series: tl({
|
|
140
|
+
data: ol(e.series),
|
|
140
141
|
threshold: a.value.downsample.threshold
|
|
141
142
|
}),
|
|
142
|
-
absoluteIndex:
|
|
143
|
-
color:
|
|
143
|
+
absoluteIndex: l,
|
|
144
|
+
color: ia(e.color || Ze.value[l] || V[l] || V[l % V.length])
|
|
144
145
|
})));
|
|
145
|
-
|
|
146
|
-
e &&
|
|
146
|
+
D(I, (e) => {
|
|
147
|
+
e && qe();
|
|
147
148
|
});
|
|
148
|
-
const h =
|
|
149
|
+
const h = L(() => rl(j.value.filter((e, l) => !$.value.includes(e.absoluteIndex))).map((e, l) => ({
|
|
149
150
|
...e,
|
|
150
|
-
series: e.series.slice(
|
|
151
|
-
})).map((e,
|
|
151
|
+
series: e.series.slice(r.value.start, r.value.end)
|
|
152
|
+
})).map((e, l) => {
|
|
152
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;
|
|
153
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));
|
|
154
|
-
const
|
|
155
|
+
const i = {
|
|
155
156
|
valueMin: o,
|
|
156
157
|
valueMax: n
|
|
157
|
-
},
|
|
158
|
-
let
|
|
159
|
-
e.autoScaling ?
|
|
160
|
-
const f =
|
|
161
|
-
let
|
|
162
|
-
e.autoScaling &&
|
|
163
|
-
const
|
|
164
|
-
y:
|
|
165
|
-
x:
|
|
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
|
+
let W;
|
|
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
|
+
x: t.value.left - 8,
|
|
166
167
|
value: O
|
|
167
|
-
})), se =
|
|
168
|
-
hasAutoScale:
|
|
168
|
+
})), se = Sa({
|
|
169
|
+
hasAutoScale: u.value.stacked && e.autoScaling,
|
|
169
170
|
series: e.series,
|
|
170
|
-
min:
|
|
171
|
-
max:
|
|
172
|
-
scale:
|
|
171
|
+
min: u.value.stacked ? o : m.value.min,
|
|
172
|
+
max: u.value.stacked ? n : m.value.max,
|
|
173
|
+
scale: u.value.stacked ? v : m.value.scale,
|
|
173
174
|
yOffset: f,
|
|
174
|
-
individualHeight:
|
|
175
|
-
stackIndex:
|
|
175
|
+
individualHeight: z,
|
|
176
|
+
stackIndex: u.value.stacked ? l : null
|
|
176
177
|
});
|
|
177
178
|
return {
|
|
178
179
|
...e,
|
|
179
180
|
coordinatesLine: se,
|
|
180
181
|
min: o,
|
|
181
182
|
max: n,
|
|
182
|
-
localScale:
|
|
183
|
-
localZero:
|
|
184
|
-
localMin:
|
|
185
|
-
localYLabels:
|
|
183
|
+
localScale: v,
|
|
184
|
+
localZero: W,
|
|
185
|
+
localMin: A,
|
|
186
|
+
localYLabels: ue,
|
|
186
187
|
yOffset: f,
|
|
187
|
-
individualHeight:
|
|
188
|
+
individualHeight: z
|
|
188
189
|
};
|
|
189
|
-
})),
|
|
190
|
+
})), r = d({
|
|
190
191
|
start: 0,
|
|
191
192
|
end: I.value
|
|
192
193
|
});
|
|
193
|
-
function
|
|
194
|
-
|
|
194
|
+
function qe() {
|
|
195
|
+
Je();
|
|
195
196
|
}
|
|
196
|
-
const
|
|
197
|
-
async function
|
|
198
|
-
(a.value.style.chart.zoom.startIndex !== null || a.value.style.chart.zoom.endIndex !== null) &&
|
|
197
|
+
const q = d(null);
|
|
198
|
+
async function Je() {
|
|
199
|
+
(a.value.style.chart.zoom.startIndex !== null || a.value.style.chart.zoom.endIndex !== null) && q.value ? (a.value.style.chart.zoom.startIndex !== null && (await pe(), await pe(), q.value && q.value.setStartValue(a.value.style.chart.zoom.startIndex)), a.value.style.chart.zoom.endIndex !== null && (await pe(), await pe(), q.value && q.value.setEndValue($a(a.value.style.chart.zoom.endIndex + 1)))) : (r.value = {
|
|
199
200
|
start: 0,
|
|
200
201
|
end: I.value
|
|
201
202
|
}, Pe.value += 1);
|
|
202
203
|
}
|
|
203
204
|
function $a(e) {
|
|
204
|
-
const
|
|
205
|
-
return e >
|
|
205
|
+
const l = I.value;
|
|
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;
|
|
206
207
|
}
|
|
207
|
-
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"));
|
|
208
209
|
function Ma() {
|
|
209
210
|
if (!T.value)
|
|
210
211
|
return;
|
|
211
|
-
const e = te.value.offsetWidth,
|
|
212
|
-
T.value.width = e *
|
|
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, E.value = l * G.value * 2, s.value.scale(G.value, G.value), oe();
|
|
213
214
|
}
|
|
214
215
|
function Ta() {
|
|
215
|
-
if (s.value.clearRect(0, 0, 1e4, 1e4), s.value.fillStyle = a.value.style.chart.backgroundColor, s.value.fillRect(0, 0,
|
|
216
|
-
a.value.style.chart.grid.y.verticalLines.show &&
|
|
217
|
-
for (let
|
|
218
|
-
|
|
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
|
+
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
|
+
for (let l = 0; l < r.value.end - r.value.start + 1; l += 1)
|
|
219
|
+
C(
|
|
219
220
|
s.value,
|
|
220
221
|
[
|
|
221
222
|
{
|
|
222
|
-
x:
|
|
223
|
-
y:
|
|
223
|
+
x: t.value.left + t.value.slot * l,
|
|
224
|
+
y: t.value.bottom - e.yOffset - e.individualHeight
|
|
224
225
|
},
|
|
225
226
|
{
|
|
226
|
-
x:
|
|
227
|
-
y:
|
|
227
|
+
x: t.value.left + t.value.slot * l,
|
|
228
|
+
y: t.value.bottom - e.yOffset
|
|
228
229
|
}
|
|
229
230
|
],
|
|
230
231
|
{
|
|
231
232
|
color: a.value.style.chart.grid.y.verticalLines.color
|
|
232
233
|
}
|
|
233
234
|
);
|
|
234
|
-
}) : a.value.style.chart.grid.y.verticalLines.show &&
|
|
235
|
-
for (let
|
|
236
|
-
|
|
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
|
+
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 && C(
|
|
237
238
|
s.value,
|
|
238
239
|
[
|
|
239
240
|
{
|
|
240
|
-
x:
|
|
241
|
-
y:
|
|
241
|
+
x: t.value.left + t.value.slot * (l - r.value.start) + t.value.slot / 2,
|
|
242
|
+
y: t.value.bottom - e.yOffset - e.individualHeight
|
|
242
243
|
},
|
|
243
244
|
{
|
|
244
|
-
x:
|
|
245
|
-
y:
|
|
245
|
+
x: t.value.left + t.value.slot * (l - r.value.start) + t.value.slot / 2,
|
|
246
|
+
y: t.value.bottom - e.yOffset
|
|
246
247
|
}
|
|
247
248
|
],
|
|
248
249
|
{
|
|
@@ -250,14 +251,14 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
250
251
|
}
|
|
251
252
|
);
|
|
252
253
|
}), a.value.style.chart.grid.x.horizontalLines.show && (a.value.style.chart.grid.x.horizontalLines.alternate ? h.value.forEach((e) => {
|
|
253
|
-
e.localYLabels.forEach((
|
|
254
|
+
e.localYLabels.forEach((l, o) => {
|
|
254
255
|
o < e.localYLabels.length - 1 && Te(
|
|
255
256
|
s.value,
|
|
256
257
|
[
|
|
257
|
-
{ x:
|
|
258
|
-
{ x:
|
|
259
|
-
{ x:
|
|
260
|
-
{ x:
|
|
258
|
+
{ x: t.value.left, y: l.y },
|
|
259
|
+
{ x: t.value.right, y: l.y },
|
|
260
|
+
{ x: t.value.right, y: e.localYLabels[o + 1].y },
|
|
261
|
+
{ x: t.value.left, y: e.localYLabels[o + 1].y }
|
|
261
262
|
],
|
|
262
263
|
{
|
|
263
264
|
fillColor: o % 2 === 0 ? "transparent" : ve(a.value.style.chart.grid.x.horizontalLines.color, a.value.style.chart.grid.x.horizontalLines.opacity),
|
|
@@ -266,12 +267,12 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
266
267
|
);
|
|
267
268
|
});
|
|
268
269
|
}) : h.value.forEach((e) => {
|
|
269
|
-
e.localYLabels.slice(
|
|
270
|
-
|
|
270
|
+
e.localYLabels.slice(r.value.start, r.value.end).forEach((l) => {
|
|
271
|
+
C(
|
|
271
272
|
s.value,
|
|
272
273
|
[
|
|
273
|
-
{ x:
|
|
274
|
-
{ x:
|
|
274
|
+
{ x: t.value.left, y: l.y },
|
|
275
|
+
{ x: t.value.right, y: l.y }
|
|
275
276
|
],
|
|
276
277
|
{
|
|
277
278
|
color: a.value.style.chart.grid.x.horizontalLines.color
|
|
@@ -279,11 +280,11 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
279
280
|
);
|
|
280
281
|
});
|
|
281
282
|
})), a.value.style.chart.grid.zeroLine.show && h.value.forEach((e) => {
|
|
282
|
-
|
|
283
|
+
C(
|
|
283
284
|
s.value,
|
|
284
285
|
[
|
|
285
|
-
{ x:
|
|
286
|
-
{ x:
|
|
286
|
+
{ x: t.value.left, y: e.localZero },
|
|
287
|
+
{ x: t.value.right, y: e.localZero }
|
|
287
288
|
],
|
|
288
289
|
{
|
|
289
290
|
color: a.value.style.chart.grid.zeroLine.color,
|
|
@@ -291,20 +292,20 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
291
292
|
}
|
|
292
293
|
);
|
|
293
294
|
}), a.value.style.chart.grid.y.axisLabels.show && h.value.forEach((e) => {
|
|
294
|
-
|
|
295
|
+
C(
|
|
295
296
|
s.value,
|
|
296
297
|
[
|
|
297
|
-
{ x:
|
|
298
|
-
{ x:
|
|
298
|
+
{ x: t.value.left, y: t.value.bottom - e.yOffset },
|
|
299
|
+
{ x: t.value.left, y: t.value.bottom - e.yOffset - e.individualHeight }
|
|
299
300
|
],
|
|
300
301
|
{
|
|
301
302
|
color: e.color
|
|
302
303
|
}
|
|
303
|
-
),
|
|
304
|
+
), C(
|
|
304
305
|
s.value,
|
|
305
306
|
[
|
|
306
|
-
{ x:
|
|
307
|
-
{ x:
|
|
307
|
+
{ x: t.value.right, y: t.value.bottom - e.yOffset },
|
|
308
|
+
{ x: t.value.right, y: t.value.bottom - e.yOffset - e.individualHeight }
|
|
308
309
|
],
|
|
309
310
|
{
|
|
310
311
|
color: e.color
|
|
@@ -315,7 +316,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
315
316
|
s.value,
|
|
316
317
|
e.name,
|
|
317
318
|
y.value / 35,
|
|
318
|
-
|
|
319
|
+
t.value.bottom - e.yOffset - e.individualHeight / 2,
|
|
319
320
|
{
|
|
320
321
|
align: "center",
|
|
321
322
|
rotation: -90,
|
|
@@ -325,80 +326,80 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
325
326
|
);
|
|
326
327
|
});
|
|
327
328
|
else {
|
|
328
|
-
if (a.value.style.chart.grid.y.verticalLines.show &&
|
|
329
|
-
for (let e = 0; e <
|
|
330
|
-
|
|
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
|
+
for (let e = 0; e < r.value.end - r.value.start + 1; e += 1)
|
|
331
|
+
C(
|
|
331
332
|
s.value,
|
|
332
333
|
[
|
|
333
|
-
{ x:
|
|
334
|
-
{ x:
|
|
334
|
+
{ x: t.value.left + t.value.slot * e, y: t.value.top },
|
|
335
|
+
{ x: t.value.left + t.value.slot * e, y: t.value.bottom }
|
|
335
336
|
],
|
|
336
337
|
{
|
|
337
338
|
color: a.value.style.chart.grid.y.verticalLines.color
|
|
338
339
|
}
|
|
339
340
|
);
|
|
340
|
-
else if (a.value.style.chart.grid.y.verticalLines.show &&
|
|
341
|
-
for (let e =
|
|
342
|
-
e % Math.floor((
|
|
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
|
+
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 && C(
|
|
343
344
|
s.value,
|
|
344
345
|
[
|
|
345
|
-
{ x:
|
|
346
|
-
{ x:
|
|
346
|
+
{ x: t.value.left + t.value.slot * (e - r.value.start) + t.value.slot / 2, y: t.value.top },
|
|
347
|
+
{ x: t.value.left + t.value.slot * (e - r.value.start) + t.value.slot / 2, y: t.value.bottom }
|
|
347
348
|
],
|
|
348
349
|
{
|
|
349
350
|
color: a.value.style.chart.grid.y.verticalLines.color
|
|
350
351
|
}
|
|
351
352
|
);
|
|
352
|
-
a.value.style.chart.grid.x.horizontalLines.show && (a.value.style.chart.grid.x.horizontalLines.alternate ? m.value.yLabels.forEach((e,
|
|
353
|
-
|
|
353
|
+
a.value.style.chart.grid.x.horizontalLines.show && (a.value.style.chart.grid.x.horizontalLines.alternate ? m.value.yLabels.forEach((e, l) => {
|
|
354
|
+
l < m.value.yLabels.length - 1 && Te(
|
|
354
355
|
s.value,
|
|
355
356
|
[
|
|
356
|
-
{ x:
|
|
357
|
-
{ x:
|
|
358
|
-
{ x:
|
|
359
|
-
{ x:
|
|
357
|
+
{ x: t.value.left, y: e.y },
|
|
358
|
+
{ x: t.value.right, y: e.y },
|
|
359
|
+
{ x: t.value.right, y: m.value.yLabels[l + 1].y },
|
|
360
|
+
{ x: t.value.left, y: m.value.yLabels[l + 1].y }
|
|
360
361
|
],
|
|
361
362
|
{
|
|
362
|
-
fillColor:
|
|
363
|
+
fillColor: l % 2 === 0 ? "transparent" : ve(a.value.style.chart.grid.x.horizontalLines.color, a.value.style.chart.grid.x.horizontalLines.opacity),
|
|
363
364
|
strokeColor: "transparent"
|
|
364
365
|
}
|
|
365
366
|
);
|
|
366
367
|
}) : m.value.yLabels.forEach((e) => {
|
|
367
|
-
|
|
368
|
+
C(
|
|
368
369
|
s.value,
|
|
369
370
|
[
|
|
370
|
-
{ x:
|
|
371
|
-
{ x:
|
|
371
|
+
{ x: t.value.left, y: e.y },
|
|
372
|
+
{ x: t.value.right, y: e.y }
|
|
372
373
|
],
|
|
373
374
|
{
|
|
374
375
|
color: a.value.style.chart.grid.x.horizontalLines.color
|
|
375
376
|
}
|
|
376
377
|
);
|
|
377
|
-
})), a.value.style.chart.grid.y.showAxis &&
|
|
378
|
+
})), a.value.style.chart.grid.y.showAxis && C(
|
|
378
379
|
s.value,
|
|
379
380
|
[
|
|
380
|
-
{ x:
|
|
381
|
-
{ x:
|
|
381
|
+
{ x: t.value.left, y: t.value.top },
|
|
382
|
+
{ x: t.value.left, y: t.value.bottom }
|
|
382
383
|
],
|
|
383
384
|
{
|
|
384
385
|
color: a.value.style.chart.grid.y.axisColor,
|
|
385
386
|
lineWidth: a.value.style.chart.grid.y.axisThickness
|
|
386
387
|
}
|
|
387
|
-
), a.value.style.chart.grid.x.showAxis &&
|
|
388
|
+
), a.value.style.chart.grid.x.showAxis && C(
|
|
388
389
|
s.value,
|
|
389
390
|
[
|
|
390
|
-
{ x:
|
|
391
|
-
{ x:
|
|
391
|
+
{ x: t.value.left, y: t.value.bottom },
|
|
392
|
+
{ x: t.value.right, y: t.value.bottom }
|
|
392
393
|
],
|
|
393
394
|
{
|
|
394
395
|
color: a.value.style.chart.grid.x.axisColor,
|
|
395
396
|
lineWidth: a.value.style.chart.grid.x.axisThickness
|
|
396
397
|
}
|
|
397
|
-
), a.value.style.chart.grid.zeroLine.show &&
|
|
398
|
+
), a.value.style.chart.grid.zeroLine.show && C(
|
|
398
399
|
s.value,
|
|
399
400
|
[
|
|
400
|
-
{ x:
|
|
401
|
-
{ x:
|
|
401
|
+
{ x: t.value.left, y: m.value.zero },
|
|
402
|
+
{ x: t.value.right, y: m.value.zero }
|
|
402
403
|
],
|
|
403
404
|
{
|
|
404
405
|
color: a.value.style.chart.grid.zeroLine.color,
|
|
@@ -410,7 +411,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
410
411
|
s.value,
|
|
411
412
|
a.value.style.chart.grid.y.axisName,
|
|
412
413
|
y.value - y.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio * 1.2,
|
|
413
|
-
|
|
414
|
+
t.value.bottom - t.value.height / 2,
|
|
414
415
|
{
|
|
415
416
|
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}`,
|
|
416
417
|
color: a.value.style.chart.color,
|
|
@@ -421,7 +422,7 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
421
422
|
s.value,
|
|
422
423
|
a.value.style.chart.grid.x.axisName,
|
|
423
424
|
y.value / 2,
|
|
424
|
-
|
|
425
|
+
E.value,
|
|
425
426
|
{
|
|
426
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}`,
|
|
427
428
|
color: a.value.style.chart.color,
|
|
@@ -430,11 +431,11 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
430
431
|
);
|
|
431
432
|
}
|
|
432
433
|
function Oa(e) {
|
|
433
|
-
for (let
|
|
434
|
-
const o = (c.value ===
|
|
435
|
-
|
|
434
|
+
for (let l = 0; l < e.coordinatesLine.length; l += 1) {
|
|
435
|
+
const o = (c.value === l ? y.value / 150 : a.value.style.chart.line.plots.show ? y.value / 200 : 0) * a.value.style.chart.line.plots.radiusRatio;
|
|
436
|
+
ca(
|
|
436
437
|
s.value,
|
|
437
|
-
{ x: e.coordinatesLine[
|
|
438
|
+
{ x: e.coordinatesLine[l].x, y: e.coordinatesLine[l].y },
|
|
438
439
|
o,
|
|
439
440
|
{
|
|
440
441
|
color: a.value.style.chart.backgroundColor,
|
|
@@ -445,21 +446,21 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
445
446
|
}
|
|
446
447
|
function Ra() {
|
|
447
448
|
h.value.forEach((e) => {
|
|
448
|
-
e.showYMarker &&
|
|
449
|
+
e.showYMarker && re(e) && R(
|
|
449
450
|
s.value,
|
|
450
|
-
|
|
451
|
+
ae(
|
|
451
452
|
a.value.style.chart.dataLabels.formatter,
|
|
452
|
-
|
|
453
|
-
|
|
453
|
+
re(e).value,
|
|
454
|
+
le({
|
|
454
455
|
p: e.prefix || a.value.style.chart.grid.y.axisLabels.prefix || "",
|
|
455
|
-
v:
|
|
456
|
+
v: re(e).value,
|
|
456
457
|
s: e.suffix || a.value.style.chart.grid.y.axisLabels.suffix || "",
|
|
457
458
|
r: e.rounding || a.value.style.chart.grid.y.axisLabels.rounding || 0
|
|
458
459
|
}),
|
|
459
|
-
{ datapoint:
|
|
460
|
+
{ datapoint: re(e), seriesIndex: null }
|
|
460
461
|
),
|
|
461
|
-
|
|
462
|
-
|
|
462
|
+
t.value.left - 8 + a.value.style.chart.grid.y.axisLabels.offsetX,
|
|
463
|
+
re(e).y,
|
|
463
464
|
{
|
|
464
465
|
align: "right",
|
|
465
466
|
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,23 +470,23 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
469
470
|
});
|
|
470
471
|
}
|
|
471
472
|
function Pa() {
|
|
472
|
-
a.value.style.chart.grid.y.axisLabels.show && (
|
|
473
|
-
e.localYLabels.forEach((
|
|
473
|
+
a.value.style.chart.grid.y.axisLabels.show && (u.value.stacked ? h.value.forEach((e) => {
|
|
474
|
+
e.localYLabels.forEach((l, o) => {
|
|
474
475
|
R(
|
|
475
476
|
s.value,
|
|
476
|
-
|
|
477
|
+
ae(
|
|
477
478
|
a.value.style.chart.dataLabels.formatter,
|
|
478
|
-
|
|
479
|
-
|
|
479
|
+
l.value,
|
|
480
|
+
le({
|
|
480
481
|
p: e.prefix || a.value.style.chart.grid.y.axisLabels.prefix || "",
|
|
481
|
-
v:
|
|
482
|
+
v: l.value,
|
|
482
483
|
s: e.suffix || a.value.style.chart.grid.y.axisLabels.suffix || "",
|
|
483
484
|
r: e.rounding || a.value.style.chart.grid.y.axisLabels.rounding || 0
|
|
484
485
|
}),
|
|
485
|
-
{ datapoint:
|
|
486
|
+
{ datapoint: l, seriesIndex: o }
|
|
486
487
|
),
|
|
487
|
-
|
|
488
|
-
|
|
488
|
+
l.x + a.value.style.chart.grid.y.axisLabels.offsetX,
|
|
489
|
+
l.y,
|
|
489
490
|
{
|
|
490
491
|
align: "right",
|
|
491
492
|
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}`,
|
|
@@ -494,19 +495,19 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
494
495
|
}
|
|
495
496
|
);
|
|
496
497
|
});
|
|
497
|
-
}) : m.value.yLabels.forEach((e,
|
|
498
|
+
}) : m.value.yLabels.forEach((e, l) => {
|
|
498
499
|
R(
|
|
499
500
|
s.value,
|
|
500
|
-
|
|
501
|
+
ae(
|
|
501
502
|
a.value.style.chart.dataLabels.formatter,
|
|
502
503
|
e.value,
|
|
503
|
-
|
|
504
|
+
le({
|
|
504
505
|
p: a.value.style.chart.grid.y.axisLabels.prefix || "",
|
|
505
506
|
v: e.value,
|
|
506
507
|
s: a.value.style.chart.grid.y.axisLabels.suffix || "",
|
|
507
508
|
r: a.value.style.chart.grid.y.axisLabels.rounding || 0
|
|
508
509
|
}),
|
|
509
|
-
{ datapoint: e, seriesIndex:
|
|
510
|
+
{ datapoint: e, seriesIndex: l }
|
|
510
511
|
),
|
|
511
512
|
e.x + a.value.style.chart.grid.y.axisLabels.offsetX,
|
|
512
513
|
e.y,
|
|
@@ -519,23 +520,23 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
519
520
|
);
|
|
520
521
|
}));
|
|
521
522
|
}
|
|
522
|
-
function
|
|
523
|
-
for (let
|
|
523
|
+
function Ea(e) {
|
|
524
|
+
for (let l = 0; l < e.coordinatesLine.length; l += 1)
|
|
524
525
|
R(
|
|
525
526
|
s.value,
|
|
526
|
-
|
|
527
|
+
ae(
|
|
527
528
|
a.value.style.chart.dataLabels.formatter,
|
|
528
|
-
e.coordinatesLine[
|
|
529
|
-
|
|
529
|
+
e.coordinatesLine[l].value,
|
|
530
|
+
le({
|
|
530
531
|
p: e.prefix || "",
|
|
531
|
-
v: e.coordinatesLine[
|
|
532
|
+
v: e.coordinatesLine[l].value,
|
|
532
533
|
s: e.suffix || "",
|
|
533
534
|
r: e.rounding || 0
|
|
534
535
|
}),
|
|
535
|
-
{ datapoint: e.coordinatesLine[
|
|
536
|
+
{ datapoint: e.coordinatesLine[l], seriesIndex: l }
|
|
536
537
|
),
|
|
537
|
-
e.coordinatesLine[
|
|
538
|
-
e.coordinatesLine[
|
|
538
|
+
e.coordinatesLine[l].x,
|
|
539
|
+
e.coordinatesLine[l].y + a.value.style.chart.dataLabels.offsetY,
|
|
539
540
|
{
|
|
540
541
|
align: "center",
|
|
541
542
|
font: `${a.value.style.chart.dataLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * a.value.style.chart.dataLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
|
|
@@ -543,34 +544,34 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
543
544
|
}
|
|
544
545
|
);
|
|
545
546
|
}
|
|
546
|
-
const
|
|
547
|
+
const Y = L(() => kl({
|
|
547
548
|
values: a.value.style.chart.grid.y.timeLabels.values,
|
|
548
549
|
maxDatapoints: I.value,
|
|
549
550
|
formatter: a.value.style.chart.grid.y.timeLabels.datetimeFormatter,
|
|
550
551
|
start: 0,
|
|
551
552
|
end: a.value.style.chart.grid.y.timeLabels.values.length
|
|
552
553
|
}));
|
|
553
|
-
function
|
|
554
|
-
for (let e =
|
|
555
|
-
(
|
|
554
|
+
function Fa() {
|
|
555
|
+
for (let e = r.value.start; e < r.value.end; e += 1)
|
|
556
|
+
(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
557
|
s.value,
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
558
|
+
Y.value[e] ? Y.value[e].text : e + 1,
|
|
559
|
+
t.value.left + t.value.slot * (e - r.value.start) + t.value.slot / 2,
|
|
560
|
+
t.value.bottom + y.value / a.value.style.chart.grid.y.timeLabels.offsetY,
|
|
560
561
|
{
|
|
561
562
|
align: a.value.style.chart.grid.y.timeLabels.rotation === 0 ? "center" : a.value.style.chart.grid.y.timeLabels.rotation > 0 ? "left" : "right",
|
|
562
563
|
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 +
|
|
564
|
+
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
565
|
rotation: a.value.style.chart.grid.y.timeLabels.rotation
|
|
565
566
|
}
|
|
566
567
|
);
|
|
567
568
|
}
|
|
568
|
-
function
|
|
569
|
-
|
|
569
|
+
function Ke() {
|
|
570
|
+
C(
|
|
570
571
|
s.value,
|
|
571
572
|
[
|
|
572
|
-
{ x:
|
|
573
|
-
{ x:
|
|
573
|
+
{ x: t.value.left + t.value.slot * c.value + t.value.slot / 2, y: t.value.top },
|
|
574
|
+
{ x: t.value.left + t.value.slot * c.value + t.value.slot / 2, y: t.value.bottom }
|
|
574
575
|
],
|
|
575
576
|
{
|
|
576
577
|
color: a.value.style.chart.selector.color,
|
|
@@ -580,11 +581,11 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
580
581
|
);
|
|
581
582
|
}
|
|
582
583
|
function Aa() {
|
|
583
|
-
M.value &&
|
|
584
|
+
M.value && C(
|
|
584
585
|
s.value,
|
|
585
586
|
[
|
|
586
|
-
{ x:
|
|
587
|
-
{ x:
|
|
587
|
+
{ x: t.value.left, y: M.value },
|
|
588
|
+
{ x: t.value.right, y: M.value }
|
|
588
589
|
],
|
|
589
590
|
{
|
|
590
591
|
color: a.value.style.chart.selector.color,
|
|
@@ -594,25 +595,25 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
594
595
|
);
|
|
595
596
|
}
|
|
596
597
|
function Da() {
|
|
597
|
-
w.value.forEach((e,
|
|
598
|
+
w.value.forEach((e, l) => {
|
|
598
599
|
for (let o = 0; o < e.coordinatesLine.length; o += 1)
|
|
599
600
|
Te(
|
|
600
601
|
s.value,
|
|
601
602
|
[
|
|
602
603
|
{
|
|
603
|
-
x:
|
|
604
|
-
y:
|
|
604
|
+
x: t.value.left + t.value.slot * o + t.value.slot / 10 + (u.value.stacked ? 0 : t.value.slot / w.value.length * l - (l === 0 ? 0 : t.value.slot / (5 * w.value.length) * l)),
|
|
605
|
+
y: u.value.stacked ? e.localZero : m.value.zero
|
|
605
606
|
},
|
|
606
607
|
{
|
|
607
|
-
x:
|
|
608
|
-
y:
|
|
608
|
+
x: t.value.left + t.value.slot * o + t.value.slot / 10 + (u.value.stacked ? 0 : t.value.slot / w.value.length * l - (l === 0 ? 0 : t.value.slot / (5 * w.value.length) * l)) + t.value.slot * 0.8 / (u.value.stacked ? 1 : w.value.length),
|
|
609
|
+
y: u.value.stacked ? e.localZero : m.value.zero
|
|
609
610
|
},
|
|
610
611
|
{
|
|
611
|
-
x:
|
|
612
|
+
x: t.value.left + t.value.slot * o + t.value.slot / 10 + (u.value.stacked ? 0 : t.value.slot / w.value.length * l - (l === 0 ? 0 : t.value.slot / (5 * w.value.length) * l)) + t.value.slot * 0.8 / (u.value.stacked ? 1 : w.value.length),
|
|
612
613
|
y: e.coordinatesLine[o].y
|
|
613
614
|
},
|
|
614
615
|
{
|
|
615
|
-
x:
|
|
616
|
+
x: t.value.left + t.value.slot * o + t.value.slot / 10 + (u.value.stacked ? 0 : t.value.slot / w.value.length * l - (l === 0 ? 0 : t.value.slot / (5 * w.value.length) * l)),
|
|
616
617
|
y: e.coordinatesLine[o].y
|
|
617
618
|
}
|
|
618
619
|
],
|
|
@@ -626,20 +627,20 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
626
627
|
},
|
|
627
628
|
end: {
|
|
628
629
|
x: e.coordinatesLine[o].x,
|
|
629
|
-
y:
|
|
630
|
+
y: u.value.stacked ? e.localZero : m.value.zero
|
|
630
631
|
},
|
|
631
632
|
stops: [
|
|
632
633
|
{ offset: 0, color: e.color },
|
|
633
|
-
{ offset: 1, color: a.value.style.chart.bar.gradient.show ?
|
|
634
|
+
{ offset: 1, color: a.value.style.chart.bar.gradient.show ? cl(e.color, 0.5) : e.color }
|
|
634
635
|
]
|
|
635
636
|
}
|
|
636
637
|
}
|
|
637
|
-
),
|
|
638
|
+
), u.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && R(
|
|
638
639
|
s.value,
|
|
639
|
-
|
|
640
|
+
ae(
|
|
640
641
|
a.value.style.chart.dataLabels.formatter,
|
|
641
642
|
e.coordinatesLine[o].value,
|
|
642
|
-
|
|
643
|
+
le({
|
|
643
644
|
p: e.prefix || "",
|
|
644
645
|
v: e.coordinatesLine[o].value,
|
|
645
646
|
s: e.suffix || "",
|
|
@@ -647,8 +648,8 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
647
648
|
}),
|
|
648
649
|
{ datapoint: e.coordinatesLine[o], seriesIndex: o }
|
|
649
650
|
),
|
|
650
|
-
|
|
651
|
-
(e.coordinatesLine[o].value < 0 ?
|
|
651
|
+
t.value.left + t.value.slot * o + t.value.slot / 10 + (u.value.stacked ? 0 : t.value.slot / w.value.length * l - (l === 0 ? 0 : t.value.slot / (5 * w.value.length) * l)) + t.value.slot * 0.4 / (u.value.stacked ? 1 : w.value.length),
|
|
652
|
+
(e.coordinatesLine[o].value < 0 ? u.value.stacked ? e.localZero : m.value.zero : e.coordinatesLine[o].y) + a.value.style.chart.dataLabels.offsetY,
|
|
652
653
|
{
|
|
653
654
|
align: "center",
|
|
654
655
|
font: `${Math.round(y.value / 40 * a.value.style.chart.dataLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
|
|
@@ -660,32 +661,32 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
660
661
|
});
|
|
661
662
|
}
|
|
662
663
|
function Na(e) {
|
|
663
|
-
e.useArea ?
|
|
664
|
+
e.useArea ? u.value.stacked ? da(
|
|
664
665
|
s.value,
|
|
665
666
|
[{ x: e.coordinatesLine[0].x, y: e.localZero }, ...e.coordinatesLine, { x: e.coordinatesLine.at(-1).x, y: e.localZero }],
|
|
666
667
|
{
|
|
667
668
|
fillColor: ve(e.color, a.value.style.chart.area.opacity),
|
|
668
669
|
strokeColor: "transparent"
|
|
669
670
|
}
|
|
670
|
-
) :
|
|
671
|
+
) : da(
|
|
671
672
|
s.value,
|
|
672
673
|
[{ x: e.coordinatesLine[0].x, y: m.value.zero }, ...e.coordinatesLine, { x: e.coordinatesLine.at(-1).x, y: m.value.zero }],
|
|
673
674
|
{
|
|
674
675
|
fillColor: ve(e.color, a.value.style.chart.area.opacity),
|
|
675
676
|
strokeColor: "transparent"
|
|
676
677
|
}
|
|
677
|
-
) :
|
|
678
|
+
) : C(s.value, e.coordinatesLine, {
|
|
678
679
|
color: e.color,
|
|
679
680
|
lineWidth: 3
|
|
680
681
|
});
|
|
681
682
|
}
|
|
682
683
|
function Ha() {
|
|
683
|
-
h.value.forEach((e,
|
|
684
|
-
|
|
684
|
+
h.value.forEach((e, l) => {
|
|
685
|
+
C(
|
|
685
686
|
s.value,
|
|
686
687
|
[
|
|
687
|
-
{ x:
|
|
688
|
-
{ x:
|
|
688
|
+
{ x: t.value.left, y: t.value.bottom - e.yOffset },
|
|
689
|
+
{ x: t.value.right, y: t.value.bottom - e.yOffset }
|
|
689
690
|
],
|
|
690
691
|
{
|
|
691
692
|
color: a.value.style.chart.grid.x.horizontalLines.color,
|
|
@@ -695,12 +696,12 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
695
696
|
});
|
|
696
697
|
}
|
|
697
698
|
function oe() {
|
|
698
|
-
Ta(),
|
|
699
|
-
(e.type === "line" || !e.type) && Na(e),
|
|
700
|
-
}), xe.value =
|
|
699
|
+
Ta(), H.value ? (c.value !== null && a.value.style.chart.selector.show && Ke(), Da(), u.value.stacked && a.value.style.chart.grid.x.showAxis && Ha(), Ia.value.forEach((e) => {
|
|
700
|
+
(e.type === "line" || !e.type) && Na(e), Z.value && (Oa(e), u.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && Ea(e));
|
|
701
|
+
}), xe.value = fl(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 && Ke(), c.value !== null && h.value.forEach((e) => {
|
|
701
702
|
if (e.type === "line" || !e.type || e.type === "plot") {
|
|
702
703
|
if (!e.coordinatesLine[c.value]) return;
|
|
703
|
-
e.coordinatesLine[c.value].x !== void 0 && e.coordinatesLine[c.value].y !== void 0 &&
|
|
704
|
+
e.coordinatesLine[c.value].x !== void 0 && e.coordinatesLine[c.value].y !== void 0 && ca(
|
|
704
705
|
s.value,
|
|
705
706
|
{
|
|
706
707
|
x: e.coordinatesLine[c.value].x,
|
|
@@ -713,104 +714,104 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
713
714
|
}
|
|
714
715
|
);
|
|
715
716
|
}
|
|
716
|
-
})), a.value.style.chart.grid.y.timeLabels.show &&
|
|
717
|
+
})), a.value.style.chart.grid.y.timeLabels.show && Fa(), a.value.style.chart.selector.show && a.value.style.chart.selector.showHorizontalSelector && Aa(), Pa(), Ra(), H.value = !1;
|
|
717
718
|
}
|
|
718
|
-
const ye =
|
|
719
|
-
|
|
720
|
-
}, I.value > 200 ? 10 : 1, !
|
|
721
|
-
function
|
|
719
|
+
const ye = dl(() => {
|
|
720
|
+
Z.value = !0, Ma();
|
|
721
|
+
}, I.value > 200 ? 10 : 1, !Z.value);
|
|
722
|
+
function re(e) {
|
|
722
723
|
if ([null, void 0].includes(c.value) || !e.coordinatesLine[c.value]) return !1;
|
|
723
|
-
const { y:
|
|
724
|
-
return { y:
|
|
724
|
+
const { y: l, value: o } = e.coordinatesLine[c.value];
|
|
725
|
+
return { y: l, value: o };
|
|
725
726
|
}
|
|
726
727
|
function Ya(e) {
|
|
727
|
-
const { left:
|
|
728
|
-
if (M.value = (e.clientY - o) * 2, (M.value <
|
|
728
|
+
const { left: l, top: o } = T.value.getBoundingClientRect(), n = e.clientX - l;
|
|
729
|
+
if (M.value = (e.clientY - o) * 2, (M.value < t.value.top || M.value > t.value.bottom) && (M.value = null), n * 2 < t.value.left || n * 2 > t.value.right) {
|
|
729
730
|
ce.value = !1, c.value = null;
|
|
730
731
|
return;
|
|
731
732
|
}
|
|
732
|
-
const
|
|
733
|
-
if (c.value = Math.floor(
|
|
734
|
-
let
|
|
735
|
-
const
|
|
736
|
-
|
|
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({
|
|
737
738
|
seriesIndex: c.value,
|
|
738
739
|
datapoint: h.value.map((f) => ({
|
|
739
740
|
shape: f.shape || null,
|
|
740
741
|
name: f.name,
|
|
741
742
|
color: f.color,
|
|
742
743
|
type: f.type || "line",
|
|
743
|
-
value: f.series.find((
|
|
744
|
+
value: f.series.find((U, z) => z === c.value)
|
|
744
745
|
})),
|
|
745
746
|
series: h.value,
|
|
746
747
|
config: a.value
|
|
747
|
-
})) ? de.value =
|
|
748
|
+
})) ? de.value = v({
|
|
748
749
|
seriesIndex: c.value,
|
|
749
750
|
datapoint: h.value.map((f) => ({
|
|
750
751
|
shape: f.shape || null,
|
|
751
752
|
name: f.name,
|
|
752
753
|
color: f.color,
|
|
753
754
|
type: f.type || "line",
|
|
754
|
-
value: f.series.find((
|
|
755
|
+
value: f.series.find((U, z) => z === c.value)
|
|
755
756
|
})),
|
|
756
757
|
series: h.value,
|
|
757
758
|
config: a.value
|
|
758
|
-
}) : (a.value.style.chart.grid.y.timeLabels.values.slice(
|
|
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;
|
|
759
760
|
}
|
|
760
|
-
|
|
761
|
+
D(() => c.value, (e) => {
|
|
761
762
|
ye();
|
|
762
|
-
}),
|
|
763
|
-
|
|
763
|
+
}), D(() => r.value, (e) => {
|
|
764
|
+
H.value = !0, oe();
|
|
764
765
|
}, {
|
|
765
766
|
deep: !0
|
|
766
|
-
}),
|
|
767
|
-
|
|
768
|
-
}),
|
|
767
|
+
}), D(() => u.value.showDataLabels, (e) => {
|
|
768
|
+
H.value = !0, oe();
|
|
769
|
+
}), D(() => M.value, (e) => {
|
|
769
770
|
e && oe();
|
|
770
|
-
}),
|
|
771
|
-
|
|
771
|
+
}), D(() => u.value.stacked, (e) => {
|
|
772
|
+
H.value = !0, Z.value = !0, ye();
|
|
772
773
|
});
|
|
773
774
|
function Ua() {
|
|
774
775
|
ce.value = !1, c.value = null, de.value = "", M.value = null, oe();
|
|
775
776
|
}
|
|
776
|
-
const F = Ie(null),
|
|
777
|
-
|
|
778
|
-
|
|
777
|
+
const F = Ie(null), J = Ie(null), K = Ie(null);
|
|
778
|
+
sa(() => {
|
|
779
|
+
ze();
|
|
779
780
|
});
|
|
780
|
-
function
|
|
781
|
-
if (ul(g.dataset) ?
|
|
781
|
+
function ze() {
|
|
782
|
+
if (ul(g.dataset) ? sl({
|
|
782
783
|
componentName: "VueUiXyCanvas",
|
|
783
784
|
type: "dataset"
|
|
784
785
|
}) : T.value && (s.value = T.value.getContext("2d", { willReadFrequently: !0 })), a.value.responsive) {
|
|
785
|
-
const e =
|
|
786
|
-
const { width:
|
|
787
|
-
chart:
|
|
788
|
-
title: a.value.style.chart.title.text ?
|
|
786
|
+
const e = hl(() => {
|
|
787
|
+
const { width: l, height: o } = yl({
|
|
788
|
+
chart: P.value,
|
|
789
|
+
title: a.value.style.chart.title.text ? Fe.value : null,
|
|
789
790
|
legend: a.value.style.chart.legend.show ? Ae.value : null,
|
|
790
791
|
slicer: a.value.style.chart.zoom.show && I.value > 1 ? De.value : null,
|
|
791
792
|
source: Ne.value
|
|
792
793
|
});
|
|
793
794
|
requestAnimationFrame(() => {
|
|
794
|
-
We.value = `${
|
|
795
|
+
We.value = `${l} / ${o}`;
|
|
795
796
|
});
|
|
796
797
|
});
|
|
797
|
-
F.value && (
|
|
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);
|
|
798
799
|
}
|
|
799
|
-
|
|
800
|
-
for (const
|
|
801
|
-
|
|
802
|
-
}),
|
|
800
|
+
K.value && K.value.disconnect(), K.value = new ResizeObserver((e) => {
|
|
801
|
+
for (const l of e)
|
|
802
|
+
l.contentBoxSize && te.value && (H.value = !0, ye());
|
|
803
|
+
}), K.value.observe(te.value), Je();
|
|
803
804
|
}
|
|
804
|
-
|
|
805
|
-
|
|
805
|
+
Ga(() => {
|
|
806
|
+
K.value && K.value.disconnect(), F.value && (J.value && F.value.unobserve(J.value), F.value.disconnect());
|
|
806
807
|
});
|
|
807
|
-
function
|
|
808
|
-
|
|
808
|
+
function Qe(e) {
|
|
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();
|
|
809
810
|
}
|
|
810
|
-
const
|
|
811
|
+
const ea = L(() => j.value.map((e, l) => ({
|
|
811
812
|
...e,
|
|
812
813
|
name: e.name,
|
|
813
|
-
color:
|
|
814
|
+
color: ia(e.color) || Ze.value[l] || V[l] || V[l % V.length],
|
|
814
815
|
shape: e.shape || "circle",
|
|
815
816
|
prefix: e.prefix || "",
|
|
816
817
|
suffix: e.suffix || "",
|
|
@@ -818,21 +819,21 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
818
819
|
})).map((e) => ({
|
|
819
820
|
...e,
|
|
820
821
|
opacity: $.value.includes(e.absoluteIndex) ? 0.5 : 1,
|
|
821
|
-
segregate: () =>
|
|
822
|
+
segregate: () => Qe(e.absoluteIndex),
|
|
822
823
|
isSegregated: $.value.includes(e.absoluteIndex)
|
|
823
|
-
}))), Wa =
|
|
824
|
+
}))), Wa = L(() => ({
|
|
824
825
|
cy: "donut-div-legend",
|
|
825
826
|
backgroundColor: a.value.style.chart.legend.backgroundColor,
|
|
826
827
|
color: a.value.style.chart.legend.color,
|
|
827
828
|
fontSize: a.value.style.chart.legend.fontSize,
|
|
828
829
|
paddingBottom: 12,
|
|
829
830
|
fontWeight: a.value.style.chart.legend.bold ? "bold" : ""
|
|
830
|
-
})), fe =
|
|
831
|
-
const e = [""].concat(h.value.map((
|
|
832
|
-
let
|
|
833
|
-
for (let
|
|
834
|
-
const
|
|
835
|
-
|
|
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
|
+
let l = [];
|
|
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)));
|
|
836
837
|
}
|
|
837
838
|
const o = {
|
|
838
839
|
th: {
|
|
@@ -846,72 +847,86 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
846
847
|
outline: a.value.table.td.outline
|
|
847
848
|
},
|
|
848
849
|
breakpoint: a.value.table.responsiveBreakpoint
|
|
849
|
-
}, n = [a.value.table.columnNames.period].concat(h.value.map((
|
|
850
|
-
return { head: e, body:
|
|
851
|
-
}),
|
|
850
|
+
}, n = [a.value.table.columnNames.period].concat(h.value.map((i) => i.name)).concat(a.value.table.columnNames.total);
|
|
851
|
+
return { head: e, body: l.slice(0, r.value.end - r.value.start), config: o, colNames: n };
|
|
852
|
+
}), aa = L(() => {
|
|
852
853
|
if (h.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
|
|
853
854
|
const e = h.value.map((o) => ({
|
|
854
855
|
label: o.name,
|
|
855
856
|
color: o.color,
|
|
856
857
|
type: o.type
|
|
857
|
-
})),
|
|
858
|
-
for (let o =
|
|
859
|
-
const n = [a.value.style.chart.grid.y.timeLabels.values[o] ?
|
|
860
|
-
h.value.forEach((
|
|
861
|
-
n.push(Number((
|
|
862
|
-
}),
|
|
858
|
+
})), l = [];
|
|
859
|
+
for (let o = r.value.start; o < r.value.end; o += 1) {
|
|
860
|
+
const n = [a.value.style.chart.grid.y.timeLabels.values[o] ? Y.value[o].text : o + 1];
|
|
861
|
+
h.value.forEach((i) => {
|
|
862
|
+
n.push(Number((i.series[o] || 0).toFixed(a.value.table.rounding)));
|
|
863
|
+
}), l.push(n);
|
|
863
864
|
}
|
|
864
|
-
return { head: e, body:
|
|
865
|
+
return { head: e, body: l };
|
|
865
866
|
});
|
|
866
|
-
function
|
|
867
|
-
const
|
|
868
|
-
e ? e(
|
|
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((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" });
|
|
869
870
|
}
|
|
870
871
|
function Xa() {
|
|
871
872
|
return h.value;
|
|
872
873
|
}
|
|
873
|
-
function la() {
|
|
874
|
-
r.value.showTable = !r.value.showTable;
|
|
875
|
-
}
|
|
876
874
|
function ta() {
|
|
877
|
-
|
|
875
|
+
u.value.showTable = !u.value.showTable;
|
|
878
876
|
}
|
|
879
877
|
function oa() {
|
|
880
|
-
|
|
878
|
+
u.value.showDataLabels = !u.value.showDataLabels;
|
|
879
|
+
}
|
|
880
|
+
function ra() {
|
|
881
|
+
u.value.stacked = !u.value.stacked;
|
|
881
882
|
}
|
|
882
883
|
function ua() {
|
|
883
|
-
|
|
884
|
+
u.value.showTooltip = !u.value.showTooltip;
|
|
884
885
|
}
|
|
885
886
|
const ge = d(!1);
|
|
886
887
|
function $e() {
|
|
887
888
|
ge.value = !ge.value;
|
|
888
889
|
}
|
|
889
|
-
|
|
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
|
+
};
|
|
901
|
+
}
|
|
902
|
+
return ya({
|
|
890
903
|
getData: Xa,
|
|
891
|
-
|
|
892
|
-
|
|
904
|
+
getImage: Ba,
|
|
905
|
+
generateCsv: la,
|
|
906
|
+
generatePdf: _e,
|
|
893
907
|
generateImage: Ve,
|
|
894
|
-
toggleTable:
|
|
895
|
-
toggleLabels:
|
|
896
|
-
toggleStack:
|
|
908
|
+
toggleTable: ta,
|
|
909
|
+
toggleLabels: oa,
|
|
910
|
+
toggleStack: ra,
|
|
897
911
|
toggleTooltip: ua,
|
|
898
|
-
toggleAnnotator: $e
|
|
899
|
-
|
|
900
|
-
|
|
912
|
+
toggleAnnotator: $e,
|
|
913
|
+
toggleFullscreen: Ge
|
|
914
|
+
}), (e, l) => (S(), ne("div", {
|
|
915
|
+
style: ee(`width:100%; position:relative; ${a.value.responsive ? "height: 100%" : ""}`),
|
|
901
916
|
ref_key: "xy",
|
|
902
|
-
ref:
|
|
917
|
+
ref: P,
|
|
903
918
|
id: `xy_canvas_${be.value}`,
|
|
904
|
-
class:
|
|
905
|
-
onMouseenter:
|
|
906
|
-
onMouseleave:
|
|
919
|
+
class: Za(`vue-ui-donut ${he.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
920
|
+
onMouseenter: l[5] || (l[5] = () => p(He)(!0)),
|
|
921
|
+
onMouseleave: l[6] || (l[6] = () => p(He)(!1))
|
|
907
922
|
}, [
|
|
908
|
-
a.value.style.chart.title.text ? (
|
|
923
|
+
a.value.style.chart.title.text ? (S(), ne("div", {
|
|
909
924
|
key: 0,
|
|
910
925
|
ref_key: "chartTitle",
|
|
911
|
-
ref:
|
|
912
|
-
style:
|
|
926
|
+
ref: Fe,
|
|
927
|
+
style: ee(`width:100%;background:${a.value.style.chart.backgroundColor};`)
|
|
913
928
|
}, [
|
|
914
|
-
(
|
|
929
|
+
(S(), N(xl, {
|
|
915
930
|
key: `title_${Le.value}`,
|
|
916
931
|
config: {
|
|
917
932
|
title: {
|
|
@@ -924,14 +939,14 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
924
939
|
}
|
|
925
940
|
}
|
|
926
941
|
}, null, 8, ["config"]))
|
|
927
|
-
], 4)) :
|
|
928
|
-
a.value.userOptions.show && we.value && (p(Ye) || p(
|
|
942
|
+
], 4)) : X("", !0),
|
|
943
|
+
a.value.userOptions.show && we.value && (p(Ye) || p(Se)) ? (S(), N(p(La), {
|
|
929
944
|
ref: "details",
|
|
930
|
-
key: `user_option_${
|
|
945
|
+
key: `user_option_${Ee.value}`,
|
|
931
946
|
backgroundColor: a.value.style.chart.backgroundColor,
|
|
932
947
|
color: a.value.style.chart.color,
|
|
933
948
|
isPrinting: p(Xe),
|
|
934
|
-
isImaging: p(
|
|
949
|
+
isImaging: p(Be),
|
|
935
950
|
uid: be.value,
|
|
936
951
|
hasTooltip: a.value.userOptions.buttons.tooltip && a.value.style.chart.tooltip.show,
|
|
937
952
|
hasPdf: a.value.userOptions.buttons.pdf,
|
|
@@ -940,114 +955,115 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
940
955
|
hasLabel: a.value.userOptions.buttons.labels,
|
|
941
956
|
hasStack: Oe.dataset.length > 1 && a.value.userOptions.buttons.stack,
|
|
942
957
|
hasFullscreen: a.value.userOptions.buttons.fullscreen,
|
|
943
|
-
hasTable:
|
|
958
|
+
hasTable: r.value.end - r.value.start < 200 && a.value.userOptions.buttons.table,
|
|
944
959
|
isFullscreen: he.value,
|
|
945
|
-
isTooltip:
|
|
946
|
-
isStacked:
|
|
960
|
+
isTooltip: u.value.showTooltip,
|
|
961
|
+
isStacked: u.value.stacked,
|
|
947
962
|
titles: { ...a.value.userOptions.buttonTitles },
|
|
948
|
-
chartElement:
|
|
963
|
+
chartElement: P.value,
|
|
949
964
|
position: a.value.userOptions.position,
|
|
950
965
|
hasAnnotator: a.value.userOptions.buttons.annotator,
|
|
951
966
|
isAnnotation: ge.value,
|
|
952
967
|
callbacks: a.value.userOptions.callbacks,
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
968
|
+
printScale: a.value.userOptions.print.scale,
|
|
969
|
+
onToggleFullscreen: Ge,
|
|
970
|
+
onGeneratePdf: p(_e),
|
|
971
|
+
onGenerateCsv: la,
|
|
956
972
|
onGenerateImage: p(Ve),
|
|
957
|
-
onToggleTable:
|
|
958
|
-
onToggleLabels:
|
|
959
|
-
onToggleStack:
|
|
973
|
+
onToggleTable: ta,
|
|
974
|
+
onToggleLabels: oa,
|
|
975
|
+
onToggleStack: ra,
|
|
960
976
|
onToggleTooltip: ua,
|
|
961
977
|
onToggleAnnotator: $e,
|
|
962
|
-
style:
|
|
963
|
-
visibility: p(Ye) ? p(
|
|
978
|
+
style: ee({
|
|
979
|
+
visibility: p(Ye) ? p(Se) ? "visible" : "hidden" : "visible"
|
|
964
980
|
})
|
|
965
|
-
},
|
|
981
|
+
}, ja({ _: 2 }, [
|
|
966
982
|
e.$slots.menuIcon ? {
|
|
967
983
|
name: "menuIcon",
|
|
968
|
-
fn:
|
|
969
|
-
|
|
984
|
+
fn: x(({ isOpen: o, color: n }) => [
|
|
985
|
+
k(e.$slots, "menuIcon", B(_({ isOpen: o, color: n })), void 0, !0)
|
|
970
986
|
]),
|
|
971
987
|
key: "0"
|
|
972
988
|
} : void 0,
|
|
973
989
|
e.$slots.optionTooltip ? {
|
|
974
990
|
name: "optionTooltip",
|
|
975
|
-
fn:
|
|
976
|
-
|
|
991
|
+
fn: x(() => [
|
|
992
|
+
k(e.$slots, "optionTooltip", {}, void 0, !0)
|
|
977
993
|
]),
|
|
978
994
|
key: "1"
|
|
979
995
|
} : void 0,
|
|
980
996
|
e.$slots.optionPdf ? {
|
|
981
997
|
name: "optionPdf",
|
|
982
|
-
fn:
|
|
983
|
-
|
|
998
|
+
fn: x(() => [
|
|
999
|
+
k(e.$slots, "optionPdf", {}, void 0, !0)
|
|
984
1000
|
]),
|
|
985
1001
|
key: "2"
|
|
986
1002
|
} : void 0,
|
|
987
1003
|
e.$slots.optionCsv ? {
|
|
988
1004
|
name: "optionCsv",
|
|
989
|
-
fn:
|
|
990
|
-
|
|
1005
|
+
fn: x(() => [
|
|
1006
|
+
k(e.$slots, "optionCsv", {}, void 0, !0)
|
|
991
1007
|
]),
|
|
992
1008
|
key: "3"
|
|
993
1009
|
} : void 0,
|
|
994
1010
|
e.$slots.optionImg ? {
|
|
995
1011
|
name: "optionImg",
|
|
996
|
-
fn:
|
|
997
|
-
|
|
1012
|
+
fn: x(() => [
|
|
1013
|
+
k(e.$slots, "optionImg", {}, void 0, !0)
|
|
998
1014
|
]),
|
|
999
1015
|
key: "4"
|
|
1000
1016
|
} : void 0,
|
|
1001
1017
|
e.$slots.optionTable ? {
|
|
1002
1018
|
name: "optionTable",
|
|
1003
|
-
fn:
|
|
1004
|
-
|
|
1019
|
+
fn: x(() => [
|
|
1020
|
+
k(e.$slots, "optionTable", {}, void 0, !0)
|
|
1005
1021
|
]),
|
|
1006
1022
|
key: "5"
|
|
1007
1023
|
} : void 0,
|
|
1008
1024
|
e.$slots.optionLabels ? {
|
|
1009
1025
|
name: "optionLabels",
|
|
1010
|
-
fn:
|
|
1011
|
-
|
|
1026
|
+
fn: x(() => [
|
|
1027
|
+
k(e.$slots, "optionLabels", {}, void 0, !0)
|
|
1012
1028
|
]),
|
|
1013
1029
|
key: "6"
|
|
1014
1030
|
} : void 0,
|
|
1015
1031
|
e.$slots.optionStack ? {
|
|
1016
1032
|
name: "optionStack",
|
|
1017
|
-
fn:
|
|
1018
|
-
|
|
1033
|
+
fn: x(() => [
|
|
1034
|
+
k(e.$slots, "optionStack", {}, void 0, !0)
|
|
1019
1035
|
]),
|
|
1020
1036
|
key: "7"
|
|
1021
1037
|
} : void 0,
|
|
1022
1038
|
e.$slots.optionFullscreen ? {
|
|
1023
1039
|
name: "optionFullscreen",
|
|
1024
|
-
fn:
|
|
1025
|
-
|
|
1040
|
+
fn: x(({ toggleFullscreen: o, isFullscreen: n }) => [
|
|
1041
|
+
k(e.$slots, "optionFullscreen", B(_({ toggleFullscreen: o, isFullscreen: n })), void 0, !0)
|
|
1026
1042
|
]),
|
|
1027
1043
|
key: "8"
|
|
1028
1044
|
} : void 0,
|
|
1029
1045
|
e.$slots.optionAnnotator ? {
|
|
1030
1046
|
name: "optionAnnotator",
|
|
1031
|
-
fn:
|
|
1032
|
-
|
|
1047
|
+
fn: x(({ toggleAnnotator: o, isAnnotator: n }) => [
|
|
1048
|
+
k(e.$slots, "optionAnnotator", B(_({ toggleAnnotator: o, isAnnotator: n })), void 0, !0)
|
|
1033
1049
|
]),
|
|
1034
1050
|
key: "9"
|
|
1035
1051
|
} : 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"])) :
|
|
1052
|
+
]), 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"])) : X("", !0),
|
|
1037
1053
|
ie("div", {
|
|
1038
1054
|
class: "vue-ui-xy-canvas",
|
|
1039
|
-
style:
|
|
1055
|
+
style: ee(`position: relative; aspect-ratio: ${We.value}`),
|
|
1040
1056
|
ref_key: "container",
|
|
1041
1057
|
ref: te
|
|
1042
1058
|
}, [
|
|
1043
|
-
we.value ? (
|
|
1059
|
+
we.value ? (S(), ne("canvas", {
|
|
1044
1060
|
key: 0,
|
|
1045
1061
|
ref_key: "canvas",
|
|
1046
1062
|
ref: T,
|
|
1047
1063
|
style: { width: "100%", height: "100%" },
|
|
1048
|
-
onMousemove:
|
|
1064
|
+
onMousemove: l[0] || (l[0] = (o) => Ya(o)),
|
|
1049
1065
|
onMouseleave: Ua
|
|
1050
|
-
}, null, 544)) : (
|
|
1066
|
+
}, null, 544)) : (S(), N(p(ba), {
|
|
1051
1067
|
key: 1,
|
|
1052
1068
|
config: {
|
|
1053
1069
|
type: "line",
|
|
@@ -1065,8 +1081,8 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
1065
1081
|
}
|
|
1066
1082
|
}
|
|
1067
1083
|
}, null, 8, ["config"])),
|
|
1068
|
-
|
|
1069
|
-
show:
|
|
1084
|
+
qa(p(xa), {
|
|
1085
|
+
show: u.value.showTooltip && ce.value,
|
|
1070
1086
|
backgroundColor: a.value.style.chart.tooltip.backgroundColor,
|
|
1071
1087
|
color: a.value.style.chart.tooltip.color,
|
|
1072
1088
|
fontSize: a.value.style.chart.tooltip.fontSize,
|
|
@@ -1079,13 +1095,13 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
1079
1095
|
content: de.value,
|
|
1080
1096
|
isFullscreen: he.value,
|
|
1081
1097
|
backgroundOpacity: a.value.style.chart.tooltip.backgroundOpacity,
|
|
1082
|
-
isCustom: p(
|
|
1098
|
+
isCustom: p(va)(a.value.style.chart.tooltip.customFormat)
|
|
1083
1099
|
}, {
|
|
1084
|
-
"tooltip-before":
|
|
1085
|
-
|
|
1100
|
+
"tooltip-before": x(() => [
|
|
1101
|
+
k(e.$slots, "tooltip-before", B(_({ ...Re.value })), void 0, !0)
|
|
1086
1102
|
]),
|
|
1087
|
-
"tooltip-after":
|
|
1088
|
-
|
|
1103
|
+
"tooltip-after": x(() => [
|
|
1104
|
+
k(e.$slots, "tooltip-after", B(_({ ...Re.value })), void 0, !0)
|
|
1089
1105
|
]),
|
|
1090
1106
|
_: 3
|
|
1091
1107
|
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "position", "offsetY", "parent", "content", "isFullscreen", "backgroundOpacity", "isCustom"])
|
|
@@ -1093,80 +1109,80 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
1093
1109
|
ie("div", {
|
|
1094
1110
|
ref_key: "chartSlicer",
|
|
1095
1111
|
ref: De,
|
|
1096
|
-
style:
|
|
1112
|
+
style: ee(`width:100%;background:${a.value.style.chart.backgroundColor}`),
|
|
1097
1113
|
"data-dom-to-png-ignore": ""
|
|
1098
1114
|
}, [
|
|
1099
|
-
a.value.style.chart.zoom.show && I.value > 1 ? (
|
|
1115
|
+
a.value.style.chart.zoom.show && I.value > 1 ? (S(), N(Ll, {
|
|
1100
1116
|
ref_key: "slicerComponent",
|
|
1101
|
-
ref:
|
|
1117
|
+
ref: q,
|
|
1102
1118
|
key: `slicer_${Pe.value}`,
|
|
1103
1119
|
background: a.value.style.chart.zoom.color,
|
|
1104
1120
|
borderColor: a.value.style.chart.backgroundColor,
|
|
1105
1121
|
fontSize: a.value.style.chart.zoom.fontSize,
|
|
1106
1122
|
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[
|
|
1123
|
+
labelLeft: a.value.style.chart.grid.y.timeLabels.values[r.value.start] ? Y.value[r.value.start].text : "",
|
|
1124
|
+
labelRight: a.value.style.chart.grid.y.timeLabels.values[r.value.end - 1] ? Y.value[r.value.end - 1].text : "",
|
|
1109
1125
|
textColor: a.value.style.chart.color,
|
|
1110
1126
|
inputColor: a.value.style.chart.zoom.color,
|
|
1111
1127
|
selectColor: a.value.style.chart.zoom.highlightColor,
|
|
1112
1128
|
max: I.value,
|
|
1113
1129
|
min: 0,
|
|
1114
|
-
valueStart:
|
|
1115
|
-
valueEnd:
|
|
1116
|
-
start:
|
|
1117
|
-
"onUpdate:start":
|
|
1118
|
-
end:
|
|
1119
|
-
"onUpdate:end":
|
|
1130
|
+
valueStart: r.value.start,
|
|
1131
|
+
valueEnd: r.value.end,
|
|
1132
|
+
start: r.value.start,
|
|
1133
|
+
"onUpdate:start": l[1] || (l[1] = (o) => r.value.start = o),
|
|
1134
|
+
end: r.value.end,
|
|
1135
|
+
"onUpdate:end": l[2] || (l[2] = (o) => r.value.end = o),
|
|
1120
1136
|
refreshStartPoint: a.value.style.chart.zoom.startIndex !== null ? a.value.style.chart.zoom.startIndex : 0,
|
|
1121
1137
|
refreshEndPoint: a.value.style.chart.zoom.endIndex !== null ? a.value.style.chart.zoom.endIndex + 1 : I.value,
|
|
1122
1138
|
enableRangeHandles: a.value.style.chart.zoom.enableRangeHandles,
|
|
1123
1139
|
enableSelectionDrag: a.value.style.chart.zoom.enableSelectionDrag,
|
|
1124
|
-
onReset:
|
|
1140
|
+
onReset: qe
|
|
1125
1141
|
}, {
|
|
1126
|
-
"reset-action":
|
|
1127
|
-
|
|
1142
|
+
"reset-action": x(({ reset: o }) => [
|
|
1143
|
+
k(e.$slots, "reset-action", B(_({ reset: o })), void 0, !0)
|
|
1128
1144
|
]),
|
|
1129
1145
|
_: 3
|
|
1130
|
-
}, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"])) :
|
|
1146
|
+
}, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"])) : X("", !0)
|
|
1131
1147
|
], 4),
|
|
1132
1148
|
ie("div", {
|
|
1133
1149
|
ref_key: "chartLegend",
|
|
1134
1150
|
ref: Ae
|
|
1135
1151
|
}, [
|
|
1136
|
-
a.value.style.chart.legend.show && we.value ? (
|
|
1137
|
-
legendSet:
|
|
1152
|
+
a.value.style.chart.legend.show && we.value ? (S(), N(bl, {
|
|
1153
|
+
legendSet: ea.value,
|
|
1138
1154
|
config: Wa.value,
|
|
1139
1155
|
key: `legend_${Ce.value}`,
|
|
1140
|
-
onClickMarker:
|
|
1156
|
+
onClickMarker: l[3] || (l[3] = ({ i: o }) => Qe(o))
|
|
1141
1157
|
}, {
|
|
1142
|
-
item:
|
|
1158
|
+
item: x(({ legend: o, index: n }) => [
|
|
1143
1159
|
ie("div", {
|
|
1144
|
-
onClick: (
|
|
1145
|
-
style:
|
|
1146
|
-
},
|
|
1160
|
+
onClick: (i) => o.segregate(),
|
|
1161
|
+
style: ee(`opacity:${$.value.includes(n) ? 0.5 : 1}`)
|
|
1162
|
+
}, na(o.name), 13, zl)
|
|
1147
1163
|
]),
|
|
1148
1164
|
_: 1
|
|
1149
|
-
}, 8, ["legendSet", "config"])) :
|
|
1165
|
+
}, 8, ["legendSet", "config"])) : k(e.$slots, "legend", {
|
|
1150
1166
|
key: 1,
|
|
1151
|
-
legend:
|
|
1167
|
+
legend: ea.value
|
|
1152
1168
|
}, void 0, !0)
|
|
1153
1169
|
], 512),
|
|
1154
|
-
e.$slots.watermark ? (
|
|
1155
|
-
|
|
1156
|
-
])) :
|
|
1157
|
-
e.$slots.source ? (
|
|
1170
|
+
e.$slots.watermark ? (S(), ne("div", $l, [
|
|
1171
|
+
k(e.$slots, "watermark", B(_({ isPrinting: p(Xe) || p(Be) })), void 0, !0)
|
|
1172
|
+
])) : X("", !0),
|
|
1173
|
+
e.$slots.source ? (S(), ne("div", {
|
|
1158
1174
|
key: 3,
|
|
1159
1175
|
ref_key: "source",
|
|
1160
1176
|
ref: Ne,
|
|
1161
1177
|
dir: "auto"
|
|
1162
1178
|
}, [
|
|
1163
|
-
|
|
1164
|
-
], 512)) :
|
|
1165
|
-
|
|
1179
|
+
k(e.$slots, "source", {}, void 0, !0)
|
|
1180
|
+
], 512)) : X("", !0),
|
|
1181
|
+
r.value.end - r.value.start < 200 ? (S(), N(p(ga), {
|
|
1166
1182
|
key: 4,
|
|
1167
1183
|
hideDetails: "",
|
|
1168
1184
|
config: {
|
|
1169
|
-
open:
|
|
1185
|
+
open: u.value.showTable,
|
|
1170
1186
|
maxHeight: 1e4,
|
|
1171
1187
|
body: {
|
|
1172
1188
|
backgroundColor: a.value.style.chart.backgroundColor,
|
|
@@ -1178,38 +1194,38 @@ const Cl = ["id"], wl = ["onClick"], zl = {
|
|
|
1178
1194
|
}
|
|
1179
1195
|
}
|
|
1180
1196
|
}, {
|
|
1181
|
-
content:
|
|
1182
|
-
(
|
|
1197
|
+
content: x(() => [
|
|
1198
|
+
(S(), N(p(pa), {
|
|
1183
1199
|
key: `table_${ke.value}`,
|
|
1184
1200
|
colNames: fe.value.colNames,
|
|
1185
1201
|
head: fe.value.head,
|
|
1186
1202
|
body: fe.value.body,
|
|
1187
1203
|
config: fe.value.config,
|
|
1188
1204
|
title: `${a.value.style.chart.title.text}${a.value.style.chart.title.subtitle.text ? ` : ${a.value.style.chart.title.subtitle.text}` : ""}`,
|
|
1189
|
-
onClose:
|
|
1205
|
+
onClose: l[4] || (l[4] = (o) => u.value.showTable = !1)
|
|
1190
1206
|
}, {
|
|
1191
|
-
th:
|
|
1192
|
-
ie("div", { innerHTML: o }, null, 8,
|
|
1207
|
+
th: x(({ th: o }) => [
|
|
1208
|
+
ie("div", { innerHTML: o }, null, 8, Il)
|
|
1193
1209
|
]),
|
|
1194
|
-
td:
|
|
1195
|
-
|
|
1210
|
+
td: x(({ td: o }) => [
|
|
1211
|
+
Ja(na(o), 1)
|
|
1196
1212
|
]),
|
|
1197
1213
|
_: 1
|
|
1198
1214
|
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
1199
1215
|
]),
|
|
1200
1216
|
_: 1
|
|
1201
|
-
}, 8, ["config"])) :
|
|
1202
|
-
a.value.userOptions.buttons.annotator && h.value.length ? (
|
|
1217
|
+
}, 8, ["config"])) : X("", !0),
|
|
1218
|
+
a.value.userOptions.buttons.annotator && h.value.length ? (S(), N(p(ma), {
|
|
1203
1219
|
key: 5,
|
|
1204
|
-
parent:
|
|
1220
|
+
parent: P.value,
|
|
1205
1221
|
backgroundColor: a.value.style.chart.backgroundColor,
|
|
1206
1222
|
color: a.value.style.chart.color,
|
|
1207
1223
|
active: ge.value,
|
|
1208
1224
|
onClose: $e
|
|
1209
|
-
}, null, 8, ["parent", "backgroundColor", "color", "active"])) :
|
|
1210
|
-
], 46,
|
|
1225
|
+
}, null, 8, ["parent", "backgroundColor", "color", "active"])) : X("", !0)
|
|
1226
|
+
], 46, Sl));
|
|
1211
1227
|
}
|
|
1212
|
-
},
|
|
1228
|
+
}, Xl = /* @__PURE__ */ wl(Ml, [["__scopeId", "data-v-8ed41bd5"]]);
|
|
1213
1229
|
export {
|
|
1214
|
-
|
|
1230
|
+
Xl as default
|
|
1215
1231
|
};
|