vue-data-ui 3.6.0 → 3.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -26
- package/dist/{Arrow-BGVin3AS.js → Arrow-CWYIBV-7.js} +1 -1
- package/dist/{BaseDraggableDialog-DhKIof09.js → BaseDraggableDialog-CRF94NJQ.js} +2 -2
- package/dist/{BaseIcon-DLFL0M4-.js → BaseIcon-CofSxalQ.js} +1 -1
- package/dist/{ColorPicker-CjIJvLdc.js → ColorPicker-e1-OSGlQ.js} +10 -10
- package/dist/{DataTable-UCyd_BQI.js → DataTable-CHaOCmsE.js} +2 -2
- package/dist/{Legend-D9ZTJKjh.js → Legend-Web3GjlR.js} +2 -2
- package/dist/{NonSvgPenAndPaper-a2UzZL0y.js → NonSvgPenAndPaper-CjYFLlns.js} +3 -3
- package/dist/{PackageVersion-D_4Hr4S4.js → PackageVersion-C82JCJOX.js} +1 -1
- package/dist/{PenAndPaper-BJSMejV9.js → PenAndPaper-HCZQTkqi.js} +20 -20
- package/dist/{Shape-CNXKB8O0.js → Shape-DE6X_t31.js} +3 -3
- package/dist/{Slicer-CJfhtoVn.js → Slicer-BFBBG6xv.js} +23 -23
- package/dist/{SlicerPreview-wXjV4LWO.js → SlicerPreview-D76aSViW.js} +2 -2
- package/dist/{SparkTooltip-BEewz-_Q.js → SparkTooltip-B2rpVWE1.js} +6 -6
- package/dist/{Title-Bb1VWCtR.js → Title-DfFUb9hd.js} +1 -1
- package/dist/{Tooltip-oWCO1HKy.js → Tooltip-WD0Ros6G.js} +1 -1
- package/dist/{UserOptions-BqmUW9Kp.js → UserOptions-B3I-s3Lw.js} +2 -2
- package/dist/components/arrow.js +1 -1
- package/dist/components/vue-ui-3d-bar.js +3 -3
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +3 -3
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +3 -3
- package/dist/components/vue-ui-candlestick.js +3 -3
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +3 -3
- package/dist/components/vue-ui-chord.js +3 -3
- package/dist/components/vue-ui-circle-pack.js +3 -3
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +2 -2
- package/dist/components/vue-ui-donut.js +3 -3
- package/dist/components/vue-ui-dumbbell.js +3 -3
- package/dist/components/vue-ui-flow.js +3 -3
- package/dist/components/vue-ui-funnel.js +2 -2
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-history-plot.js +3 -3
- package/dist/components/vue-ui-horizontal-bar.js +3 -3
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +3 -3
- package/dist/components/vue-ui-mood-radar.js +3 -3
- package/dist/components/vue-ui-nested-donuts.js +2 -2
- package/dist/components/vue-ui-onion.js +3 -3
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +3 -3
- package/dist/components/vue-ui-quick-chart.js +3 -3
- package/dist/components/vue-ui-radar.js +3 -3
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +3 -3
- package/dist/components/vue-ui-ridgeline.js +3 -3
- package/dist/components/vue-ui-rings.js +3 -3
- package/dist/components/vue-ui-scatter.js +3 -3
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +2 -2
- package/dist/components/vue-ui-sparkgauge.js +3 -3
- package/dist/components/vue-ui-sparkhistogram.js +3 -3
- package/dist/components/vue-ui-sparkline.js +3 -3
- package/dist/components/vue-ui-sparkstackbar.js +2 -2
- package/dist/components/vue-ui-stackbar.js +3 -3
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +3 -3
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +2 -2
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +3 -3
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +2 -2
- package/dist/components/vue-ui-treemap.js +3 -3
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +2 -2
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +3 -3
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +3 -3
- package/dist/components/vue-ui-xy.js +3 -3
- package/dist/{dom-to-png--BNgrTZV.js → dom-to-png-CH2DfsJe.js} +1 -1
- package/dist/{img-BecE5qXd.js → img-DUzJeMlr.js} +1 -1
- package/dist/{lib-C_mNZmhD.js → lib-C5BH09_g.js} +111 -110
- package/dist/{pdf-DuG5j3Wv.js → pdf-BSWQncok.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +2 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-BhzfwQ_k.js → useAutoSizeLabelsInsideViewbox-DOALwU4q.js} +7 -7
- package/dist/{useNestedProp-CIoDlpHu.js → useNestedProp-CWo6bftQ.js} +1 -1
- package/dist/{usePrinter-DTzqpYKF.js → usePrinter-DCJzEiS8.js} +2 -2
- package/dist/useThemeCheck-DGJ31Vi5.js +32 -0
- package/dist/{useTimeLabels-BGFjWgrv.js → useTimeLabels-C5qMhpbe.js} +50 -49
- package/dist/{vue-data-ui-BWuOXu_s.js → vue-data-ui-d-OXgGG3.js} +78 -78
- package/dist/vue-data-ui.js +225 -205
- package/dist/{vue-ui-3d-bar-BNQAuLqF.js → vue-ui-3d-bar-BLbSbx2V.js} +546 -517
- package/dist/{vue-ui-accordion-SSLXLlNz.js → vue-ui-accordion-DSdZUn2C.js} +3 -3
- package/dist/vue-ui-age-pyramid-DQ-xc-if.js +960 -0
- package/dist/{vue-ui-annotator-34Ld0u5M.js → vue-ui-annotator-DRaH8hXn.js} +7 -7
- package/dist/vue-ui-bullet-BvMdxLkK.js +657 -0
- package/dist/{vue-ui-candlestick-BcChw-8c.js → vue-ui-candlestick-DIWeygxV.js} +596 -561
- package/dist/{vue-ui-carousel-table-Cp_od0lI.js → vue-ui-carousel-table-DM2HJFMH.js} +48 -48
- package/dist/{vue-ui-chestnut-DTaIsP72.js → vue-ui-chestnut-DNOG6dqY.js} +534 -505
- package/dist/vue-ui-chord-D2wPt2JV.js +1182 -0
- package/dist/vue-ui-circle-pack-D_GDv7OV.js +832 -0
- package/dist/{vue-ui-cursor-lW-dVs_k.js → vue-ui-cursor-BMe8ZiV6.js} +2 -2
- package/dist/{vue-ui-dashboard-DIymn9Cx.js → vue-ui-dashboard-BMby447A.js} +140 -140
- package/dist/{vue-ui-digits-YHA3fA0j.js → vue-ui-digits-D382I0-w.js} +2 -2
- package/dist/{vue-ui-donut-BaDmbWLh.js → vue-ui-donut-BqiNPW3q.js} +634 -602
- package/dist/vue-ui-donut-evolution-BL7HtdsP.js +1243 -0
- package/dist/vue-ui-dumbbell-BlTDnM8L.js +1258 -0
- package/dist/vue-ui-flow-BxIv20FH.js +1026 -0
- package/dist/vue-ui-funnel-Tnjg4srR.js +743 -0
- package/dist/vue-ui-galaxy-CYDVXdNj.js +837 -0
- package/dist/vue-ui-gauge-DAcpazK7.js +864 -0
- package/dist/{vue-ui-gizmo-E33_xZte.js → vue-ui-gizmo-Bg2TpPwm.js} +3 -3
- package/dist/{vue-ui-heatmap-DJXMvFPp.js → vue-ui-heatmap-BPEE_cLi.js} +501 -466
- package/dist/vue-ui-history-plot-BhfbLer8.js +1239 -0
- package/dist/{vue-ui-kpi-C-XuLBVQ.js → vue-ui-kpi-CKMZDc3n.js} +3 -3
- package/dist/{vue-ui-mini-loader-DawncJvl.js → vue-ui-mini-loader-BN72OfS0.js} +2 -2
- package/dist/vue-ui-molecule-DnzXYuUi.js +782 -0
- package/dist/vue-ui-mood-radar-CXyQEfeM.js +930 -0
- package/dist/vue-ui-nested-donuts-Dq8JoU5d.js +1454 -0
- package/dist/vue-ui-onion-D0KUHi-Z.js +944 -0
- package/dist/vue-ui-parallel-coordinate-plot-DNc2L4Rg.js +1080 -0
- package/dist/{vue-ui-quadrant-B2bLWyCm.js → vue-ui-quadrant-Cp8loNVN.js} +510 -481
- package/dist/{vue-ui-quick-chart-J_RmCwI_.js → vue-ui-quick-chart-kuTdgAKG.js} +795 -758
- package/dist/vue-ui-radar-x2Ry_IGa.js +1013 -0
- package/dist/{vue-ui-rating-CBS8zaQd.js → vue-ui-rating-DtzmtJwF.js} +26 -26
- package/dist/vue-ui-relation-circle-DbYE9UHq.js +671 -0
- package/dist/vue-ui-ridgeline-yaMl8iIE.js +1302 -0
- package/dist/vue-ui-rings-BowsO9I8.js +884 -0
- package/dist/vue-ui-scatter-C_nz0A4x.js +1619 -0
- package/dist/{vue-ui-skeleton-DsrlMELy.js → vue-ui-skeleton-DdXq2gl1.js} +3 -3
- package/dist/{vue-ui-smiley-P_8WIBDD.js → vue-ui-smiley-OYyM-ukP.js} +2 -2
- package/dist/vue-ui-spark-trend-BLticwHl.js +364 -0
- package/dist/vue-ui-sparkbar-DC2sDr9_.js +381 -0
- package/dist/vue-ui-sparkgauge-BENUfyuR.js +260 -0
- package/dist/vue-ui-sparkhistogram-BY0jsNsc.js +411 -0
- package/dist/vue-ui-sparkline-fS36LGCB.js +549 -0
- package/dist/vue-ui-sparkstackbar-C59ocU83.js +470 -0
- package/dist/vue-ui-stackbar-BtWWtzDp.js +1867 -0
- package/dist/vue-ui-stackline-CsGEHOOr.js +1963 -0
- package/dist/{vue-ui-strip-plot-CTtivaxm.js → vue-ui-strip-plot-n_rEdwkM.js} +343 -314
- package/dist/{vue-ui-table-CHt3AQiq.js → vue-ui-table-Kv2YL5OU.js} +5 -5
- package/dist/vue-ui-table-heatmap-vQEFrjCX.js +307 -0
- package/dist/{vue-ui-table-sparkline-D5MckwMl.js → vue-ui-table-sparkline-B8CCAdco.js} +292 -263
- package/dist/vue-ui-thermometer-C1Hr_LrY.js +613 -0
- package/dist/{vue-ui-timer-B-Xa6ALH.js → vue-ui-timer-CmnO99_j.js} +25 -25
- package/dist/vue-ui-tiremarks-DbZbhw6Q.js +477 -0
- package/dist/vue-ui-treemap-BGMpUu5v.js +1359 -0
- package/dist/{vue-ui-vertical-bar-D9XQe_ud.js → vue-ui-vertical-bar-CWlGQoB3.js} +520 -485
- package/dist/{vue-ui-waffle-Bk98w86A.js → vue-ui-waffle-BVVrMghT.js} +376 -347
- package/dist/vue-ui-wheel-B2pFBeKR.js +690 -0
- package/dist/vue-ui-word-cloud-BqKSDn2J.js +904 -0
- package/dist/{vue-ui-world-xOY__pp8.js → vue-ui-world-glj9mQAg.js} +57 -57
- package/dist/vue-ui-xy-BdXV4naK.js +3455 -0
- package/dist/vue-ui-xy-canvas-Cr13t9M5.js +1599 -0
- package/dist/vue_ui_vertical_bar-CELc39b8.js +18 -0
- package/package.json +5 -5
- package/dist/themes-DH-N_ePR.js +0 -54
- package/dist/vue-ui-age-pyramid-DsOlpJBh.js +0 -933
- package/dist/vue-ui-bullet-Ci4lO4_W.js +0 -630
- package/dist/vue-ui-chord-BKC--Nbq.js +0 -1153
- package/dist/vue-ui-circle-pack-B3sfU0Vo.js +0 -803
- package/dist/vue-ui-donut-evolution-BqUzmyW2.js +0 -1208
- package/dist/vue-ui-dumbbell-CWKTrzsm.js +0 -1231
- package/dist/vue-ui-flow-SMbuDPdL.js +0 -991
- package/dist/vue-ui-funnel-3fRlMBzq.js +0 -716
- package/dist/vue-ui-galaxy-CFZ1xYD5.js +0 -808
- package/dist/vue-ui-gauge-DJpbjfpL.js +0 -835
- package/dist/vue-ui-history-plot-CvPMx5Lg.js +0 -1204
- package/dist/vue-ui-molecule-CasngKZI.js +0 -753
- package/dist/vue-ui-mood-radar-DGz2TQi4.js +0 -903
- package/dist/vue-ui-nested-donuts-Bjjz2sWG.js +0 -1419
- package/dist/vue-ui-onion-DwTIY6i1.js +0 -915
- package/dist/vue-ui-parallel-coordinate-plot-DedxvtPN.js +0 -1051
- package/dist/vue-ui-radar-D1rz2RnH.js +0 -984
- package/dist/vue-ui-relation-circle-DUfRwwo1.js +0 -641
- package/dist/vue-ui-ridgeline-DKPWMWRc.js +0 -1273
- package/dist/vue-ui-rings-BY0EQGLb.js +0 -855
- package/dist/vue-ui-scatter-ky9p5Pgh.js +0 -1590
- package/dist/vue-ui-spark-trend-DkJn_3FI.js +0 -337
- package/dist/vue-ui-sparkbar-qB1fmgej.js +0 -352
- package/dist/vue-ui-sparkgauge-BezFN_Rc.js +0 -233
- package/dist/vue-ui-sparkhistogram-DGt5b8FR.js +0 -384
- package/dist/vue-ui-sparkline-D7Wx1ejg.js +0 -514
- package/dist/vue-ui-sparkstackbar-DtO7-yim.js +0 -441
- package/dist/vue-ui-stackbar-Dr48I48D.js +0 -1832
- package/dist/vue-ui-stackline-Juns5Yh4.js +0 -1928
- package/dist/vue-ui-table-heatmap-Cn-56b5F.js +0 -282
- package/dist/vue-ui-thermometer-BOidpwAZ.js +0 -584
- package/dist/vue-ui-tiremarks-BsTyVS2P.js +0 -450
- package/dist/vue-ui-treemap-BWTaY91B.js +0 -1330
- package/dist/vue-ui-wheel-nj73b_Dc.js +0 -663
- package/dist/vue-ui-word-cloud-Dcaogr-D.js +0 -875
- package/dist/vue-ui-xy-BT67faLv.js +0 -3424
- package/dist/vue-ui-xy-canvas-BoB7-4QK.js +0 -1564
|
@@ -0,0 +1,1599 @@
|
|
|
1
|
+
import { defineAsyncComponent as pe, ref as d, computed as p, useSlots as Na, onMounted as $l, toRefs as _a, watch as R, nextTick as be, onBeforeUnmount as Tl, shallowRef as je, createElementBlock as Te, openBlock as I, normalizeClass as Ha, normalizeStyle as xe, createCommentVNode as W, createElementVNode as J, createBlock as V, unref as C, createSlots as Il, withCtx as b, renderSlot as S, normalizeProps as Q, guardReactiveProps as ee, createVNode as El, Teleport as Xa, toDisplayString as qe, resolveDynamicComponent as Ua, mergeProps as Wa, createTextVNode as Rl } from "vue";
|
|
2
|
+
import { c as Va, t as Ya, i as ja, p as le, W as Ce, j as qa, F as Ge, a as se, d as ue, l as Ol, J as Ga, a5 as Za, L as Ja, o as Ka, g as Qa, x as Pl, s as Le, n as et, u as lt, q as at, R as tt } from "./lib-C5BH09_g.js";
|
|
3
|
+
import { c as ot, a as Ze, d as rt, t as st, u as ut, l as k, r as Ie, b as Y, p as Bl } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as nt, a as Ee } from "./useNestedProp-CWo6bftQ.js";
|
|
5
|
+
import { u as it, B as ct } from "./BaseScanner-BgWxam9d.js";
|
|
6
|
+
import { u as vt } from "./usePrinter-DCJzEiS8.js";
|
|
7
|
+
import { u as dt, a as ht, l as ft } from "./useTimeLabels-C5qMhpbe.js";
|
|
8
|
+
import { u as yt } from "./useThemeCheck-DGJ31Vi5.js";
|
|
9
|
+
import { u as mt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
10
|
+
import { u as gt } from "./useChartAccessibility-9icAAmYg.js";
|
|
11
|
+
import pt from "./img-DUzJeMlr.js";
|
|
12
|
+
import bt from "./Legend-Web3GjlR.js";
|
|
13
|
+
import xt from "./Title-DfFUb9hd.js";
|
|
14
|
+
import Ct from "./BaseIcon-CofSxalQ.js";
|
|
15
|
+
import Lt from "./vue-ui-accordion-DSdZUn2C.js";
|
|
16
|
+
import { S as kt } from "./SlicerPreview-D76aSViW.js";
|
|
17
|
+
import { _ as At } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
18
|
+
const Nl = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", zoom: { color: "#4A4A4A", highlightColor: "#9A9A9A", minimap: { selectedColor: "#8A8A8A", lineColor: "#424242", indicatorColor: "#CCCCCC" } }, selector: { color: "#CCCCCC" }, legend: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, title: { color: "#CCCCCC", subtitle: { color: "#757575" } }, tooltip: { backgroundColor: "#1A1A1A", backgroundOpacity: 70, color: "#CCCCCC", borderColor: "#5A5A5A" }, grid: { y: { axisColor: "#5A5A5A", axisLabels: { color: "#CCCCCC" }, verticalLines: { color: "#4A4A4A" } }, x: { axisColor: "#5A5A5A", horizontalLines: { color: "#4A4A4A" }, timeLabels: { color: "#CCCCCC" } }, zeroLine: { color: "#5A5A5A" } }, dataLabels: { color: "#CCCCCC" } } }, table: { th: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, td: { backgroundColor: "#1A1A1A", color: "#CCCCCC" } } }, _l = { style: { chart: { backgroundColor: "#FFF8E1", color: "#424242", zoom: { color: "#5D4037", highlightColor: "#FF8A65" }, selector: { color: "#5D4037" }, legend: { backgroundColor: "#FFF8E1", color: "#424242" }, title: { color: "#424242", subtitle: { color: "#757575" } }, tooltip: { backgroundColor: "#FFECB3", backgroundOpacity: 30, color: "#424242", borderColor: "#FF8A65" }, grid: { y: { axisColor: "#5D4037", axisLabels: { color: "#424242" }, verticalLines: { show: !1 } }, x: { axisColor: "#5D4037", horizontalLines: { color: "#9A9A9A" }, timeLabels: { color: "#424242" } }, zeroLine: { color: "#424242" } }, dataLabels: { color: "#424242" } } }, table: { th: { backgroundColor: "#FFF8E1", color: "#424242" }, td: { backgroundColor: "#FFF8E1", color: "#424242" } } }, Hl = { style: { chart: { backgroundColor: "#1E1E1E", color: "#BDBDBD", zoom: { color: "#5D4037", highlightColor: "#FF8A65" }, selector: { color: "#BDBDBD" }, legend: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, title: { color: "#FFF8E1", subtitle: { color: "#BDBDBD" } }, tooltip: { backgroundColor: "#1E1E1E", backgroundOpacity: 30, color: "#FFF8E1", borderColor: "#FF8A65" }, grid: { y: { axisColor: "#5D4037", axisLabels: { color: "#BDBDBD" }, verticalLines: { show: !1 } }, x: { axisColor: "#5D4037", horizontalLines: { color: "#3A3A3A" }, timeLabels: { color: "#BDBDBD" } }, zeroLine: { color: "#5D4037" } }, dataLabels: { color: "#BDBDBD" } } }, table: { th: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, td: { backgroundColor: "#1E1E1E", color: "#BDBDBD" } } }, Xl = { style: { chart: { backgroundColor: "#1A1A1A", color: "#99AA99", zoom: { color: "#5F6A5F", highlightColor: "#66CC66" }, selector: { color: "#66CC66" }, legend: { backgroundColor: "#1A1A1A", color: "#99AA99" }, title: { color: "#66CC66", subtitle: { color: "#99AA99" } }, tooltip: { backgroundColor: "#2A2F2A", color: "#AACCAA", borderColor: "#66CC66", borderRadius: 0 }, grid: { y: { axisColor: "#5F6A5F", axisLabels: { color: "#99AA99" }, verticalLines: { show: !1 } }, x: { axisColor: "#5F6A5F", horizontalLines: { color: "#3A3A3A" }, timeLabels: { color: "#99AA99" } }, zeroLine: { color: "#444444" } }, dataLabels: { color: "#99AA99" } } }, table: { th: { backgroundColor: "#1A1A1A", color: "#99AA99" }, td: { backgroundColor: "#1A1A1A", color: "#AACCAA" } } }, Ul = { style: { chart: { backgroundColor: "#fbfafa", color: "#8A9892", zoom: { color: "#E0CFC3", highlightColor: "#8F837A" }, selector: { color: "#8F837A" }, legend: { backgroundColor: "#fbfafa", color: "#99AA99" }, title: { color: "#8A9892", subtitle: { color: "#99AA99" } }, tooltip: { backgroundColor: "#fbfafa", color: "#8A9892" }, grid: { y: { axisColor: "#8F837A", axisLabels: { color: "#8F837A" }, verticalLines: { show: !1 } }, x: { axisColor: "#8F837A", horizontalLines: { show: !1, alternate: !1 }, timeLabels: { color: "#8F837A" } }, zeroLine: { color: "#444444" } }, dataLabels: { color: "#8F837A" } } }, table: { th: { backgroundColor: "#fbfafa", color: "#8F837A" }, td: { backgroundColor: "#fbfafa", color: "#8F837A" } } }, Wl = { style: { chart: { backgroundColor: "#f6f6fb", color: "#50606C", zoom: { color: "#92B0AB", highlightColor: "#50606C" }, selector: { color: "#7DA9B5" }, legend: { backgroundColor: "#f6f6fb", color: "#61747E" }, title: { color: "#50606C", subtitle: { color: "#718890" } }, tooltip: { backgroundColor: "#f6f6fb", color: "#50606C" }, grid: { y: { axisColor: "#829C98", axisLabels: { color: "#50606C" }, verticalLines: { show: !1 } }, x: { axisColor: "#829C98", timeLabels: { color: "#50606C" } }, zeroLine: { color: "#444444" } }, dataLabels: { color: "#50606C" } } }, table: { th: { backgroundColor: "#f6f6fb", color: "#50606C" }, td: { backgroundColor: "#f6f6fb", color: "#50606C" } } }, Vl = {
|
|
19
|
+
default: {},
|
|
20
|
+
dark: Nl,
|
|
21
|
+
celebration: _l,
|
|
22
|
+
celebrationNight: Hl,
|
|
23
|
+
hack: Xl,
|
|
24
|
+
zen: Ul,
|
|
25
|
+
concrete: Wl
|
|
26
|
+
}, Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
27
|
+
__proto__: null,
|
|
28
|
+
celebration: _l,
|
|
29
|
+
celebrationNight: Hl,
|
|
30
|
+
concrete: Wl,
|
|
31
|
+
dark: Nl,
|
|
32
|
+
default: Vl,
|
|
33
|
+
hack: Xl,
|
|
34
|
+
zen: Ul
|
|
35
|
+
}, Symbol.toStringTag, { value: "Module" })), wt = ["id"], zt = ["id"], St = ["id"], Ft = ["onClick"], Dt = {
|
|
36
|
+
key: 4,
|
|
37
|
+
class: "vue-data-ui-watermark"
|
|
38
|
+
}, Mt = ["innerHTML"], $t = {
|
|
39
|
+
__name: "vue-ui-xy-canvas",
|
|
40
|
+
props: {
|
|
41
|
+
dataset: {
|
|
42
|
+
type: Array,
|
|
43
|
+
default() {
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
config: {
|
|
48
|
+
type: Object,
|
|
49
|
+
default() {
|
|
50
|
+
return {};
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
selectedXIndex: {
|
|
54
|
+
type: Number,
|
|
55
|
+
default: void 0
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
emits: ["selectLegend", "selectX"],
|
|
59
|
+
setup(Je, { expose: Yl, emit: jl }) {
|
|
60
|
+
const ql = pe(() => import("./Tooltip-WD0Ros6G.js")), Gl = pe(() => import("./DataTable-CHaOCmsE.js")), Zl = pe(() => import("./UserOptions-B3I-s3Lw.js")), Jl = pe(() => import("./NonSvgPenAndPaper-CjYFLlns.js")), Kl = pe(() => import("./BaseDraggableDialog-CRF94NJQ.js")), { vue_ui_xy_canvas: Ql } = nt(), { isThemeValid: ea, warnInvalidTheme: la } = yt(), g = Je, K = d(Va()), _ = d(null), ae = d(null), c = d(null), m = d(1), j = d(1), ne = d(!1), h = d(null), ke = d(""), Ke = d(null), F = d([]), te = d(1), O = d(!0), H = d(!0), Ae = d(null), Qe = d(0), ie = d(!1), el = d(null), ll = d(null), q = d(null), al = d(null), Re = d(0), Oe = d(0), Pe = d(0), P = d(null), tl = d(!1), ce = d(null), Be = d(null), ve = d(!1), ol = d(!1), we = d(!1), A = d(null), X = p(() => Array.isArray(He.value) && He.value.length > 0), Ne = jl, aa = Na();
|
|
61
|
+
$l(() => {
|
|
62
|
+
aa["chart-background"] && console.warn("VueUiXyCanvas does not support the #chart-background slot.");
|
|
63
|
+
});
|
|
64
|
+
const l = d(Ue()), ta = p(() => !!l.value.debug), { loading: _e, FINAL_DATASET: He } = it({
|
|
65
|
+
..._a(g),
|
|
66
|
+
FINAL_CONFIG: l,
|
|
67
|
+
prepareConfig: Ue,
|
|
68
|
+
skeletonDataset: [
|
|
69
|
+
{
|
|
70
|
+
name: "",
|
|
71
|
+
series: [0, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 134],
|
|
72
|
+
type: "line",
|
|
73
|
+
smooth: !0,
|
|
74
|
+
color: "#BABABA"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: "",
|
|
78
|
+
series: [0, 0.5, 1, 1.5, 2.5, 4, 6.5, 10.5, 17, 27.5, 44.5, 67],
|
|
79
|
+
type: "bar",
|
|
80
|
+
color: "#AAAAAA"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
skeletonConfig: Ya({
|
|
84
|
+
defaultConfig: l.value,
|
|
85
|
+
userConfig: {
|
|
86
|
+
userOptions: { show: !1 },
|
|
87
|
+
table: { show: !1 },
|
|
88
|
+
style: {
|
|
89
|
+
chart: {
|
|
90
|
+
backgroundColor: "#99999930",
|
|
91
|
+
grid: {
|
|
92
|
+
x: {
|
|
93
|
+
axisColor: "#6A6A6A",
|
|
94
|
+
timeLabels: { show: !1 },
|
|
95
|
+
axisName: "",
|
|
96
|
+
horizontalLines: {
|
|
97
|
+
color: "#6A6A6A"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
y: {
|
|
101
|
+
axisColor: "#6A6A6A",
|
|
102
|
+
axisLabels: { show: !1 },
|
|
103
|
+
axisName: "",
|
|
104
|
+
verticalLines: {
|
|
105
|
+
color: "#6A6A6A"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
zeroLine: {
|
|
109
|
+
color: "#6A6A6A"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
legend: {
|
|
113
|
+
backgroundColor: "#99999930"
|
|
114
|
+
},
|
|
115
|
+
paddingProportions: {
|
|
116
|
+
left: 0.05
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
})
|
|
122
|
+
}), { userOptionsVisible: Xe, setUserOptionsVisibility: rl, keepUserOptionState: sl } = mt({ config: l.value }), { svgRef: w } = gt({ config: l.value.style.chart.title });
|
|
123
|
+
function oa() {
|
|
124
|
+
rl(!0);
|
|
125
|
+
}
|
|
126
|
+
function ra() {
|
|
127
|
+
rl(!1), Ne("selectX", { seriesIndex: null, datapoint: null }), h.value = null;
|
|
128
|
+
}
|
|
129
|
+
function Ue() {
|
|
130
|
+
const e = Ee({
|
|
131
|
+
userConfig: g.config,
|
|
132
|
+
defaultConfig: Ql
|
|
133
|
+
});
|
|
134
|
+
let a = {};
|
|
135
|
+
const t = e.theme;
|
|
136
|
+
if (t)
|
|
137
|
+
if (!ea.value(e))
|
|
138
|
+
la(e), a = e;
|
|
139
|
+
else {
|
|
140
|
+
const s = Ee({
|
|
141
|
+
userConfig: Vl[t] || g.config,
|
|
142
|
+
defaultConfig: e
|
|
143
|
+
});
|
|
144
|
+
a = {
|
|
145
|
+
...Ee({
|
|
146
|
+
userConfig: g.config,
|
|
147
|
+
defaultConfig: s
|
|
148
|
+
}),
|
|
149
|
+
customPalette: e.customPalette.length ? e.customPalette : ja[t] || le
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
else
|
|
153
|
+
a = e;
|
|
154
|
+
return g.config && Ce(g.config, "style.chart.scale.min") ? a.style.chart.scale.min = g.config.style.chart.scale.min : a.style.chart.scale.min = null, g.config && Ce(g.config, "style.chart.scale.max") ? a.style.chart.scale.max = g.config.style.chart.scale.max : a.style.chart.scale.max = null, g.config && Ce(g.config, "style.chart.zoom.startIndex") ? a.style.chart.zoom.startIndex = g.config.style.chart.zoom.startIndex : a.style.chart.zoom.startIndex = null, g.config && Ce(g.config, "style.chart.zoom.endIndex") ? a.style.chart.zoom.endIndex = g.config.style.chart.zoom.endIndex : a.style.chart.zoom.endIndex = null, g.config && Ce(g.config, "style.chart.grid.y.timeLabels") && (console.warn("VueUiXyCanvas: you are using the deprecated config.style.chart.grid.y.timeLabels. It is recommended to move this configuration to config.style.chart.grid.x.timeLabels."), a.style.chart.grid.x.timeLabels = Ee({
|
|
155
|
+
defaultConfig: a.style.chart.grid.x.timeLabels,
|
|
156
|
+
userConfig: g.config.style.chart.grid.y.timeLabels
|
|
157
|
+
})), a;
|
|
158
|
+
}
|
|
159
|
+
R(() => g.config, (e) => {
|
|
160
|
+
_e.value || (l.value = Ue()), Xe.value = !l.value.userOptions.showOnChartHover, Ll(), Re.value += 1, Oe.value += 1, Pe.value += 1, v.value.showTable = l.value.table.show, v.value.showDataLabels = l.value.style.chart.dataLabels.show, v.value.stacked = l.value.style.chart.stacked, v.value.showTooltip = l.value.style.chart.tooltip.show;
|
|
161
|
+
}, { deep: !0 }), R(() => g.dataset, async (e) => {
|
|
162
|
+
!Array.isArray(e) || e.length === 0 || (await be(), w.value && !c.value && (c.value = w.value.getContext("2d", { willReadFrequently: !0 })), O.value = !0, H.value = !0, await he(), Se(), Re.value += 1, Oe.value += 1, Pe.value += 1);
|
|
163
|
+
}, { deep: !0 });
|
|
164
|
+
const ul = d(l.value.style.chart.aspectRatio), { isPrinting: nl, isImaging: il, generatePdf: cl, generateImage: vl } = vt({
|
|
165
|
+
elementId: `xy_canvas_${K.value}`,
|
|
166
|
+
fileName: l.value.style.chart.title.text || "vue-ui-xy-canvas",
|
|
167
|
+
options: l.value.userOptions.print
|
|
168
|
+
}), v = d({
|
|
169
|
+
showTable: l.value.table.show,
|
|
170
|
+
showDataLabels: l.value.style.chart.dataLabels.show,
|
|
171
|
+
stacked: l.value.style.chart.stacked,
|
|
172
|
+
showTooltip: l.value.style.chart.tooltip.show
|
|
173
|
+
});
|
|
174
|
+
function dl(e) {
|
|
175
|
+
ie.value = e, Qe.value += 1;
|
|
176
|
+
}
|
|
177
|
+
const hl = p(() => qa(l.value.customPalette)), E = p(() => T.value ? Math.max(...T.value.filter((e, a) => !F.value.includes(e.absoluteIndex)).map((e) => e.series.length)) : 0);
|
|
178
|
+
function sa(e) {
|
|
179
|
+
A.value = e, G();
|
|
180
|
+
}
|
|
181
|
+
const o = p(() => {
|
|
182
|
+
const e = m.value - m.value * (l.value.style.chart.paddingProportions.left + l.value.style.chart.paddingProportions.right);
|
|
183
|
+
return {
|
|
184
|
+
canvasWidth: m.value,
|
|
185
|
+
canvasHeight: j.value,
|
|
186
|
+
left: m.value * l.value.style.chart.paddingProportions.left,
|
|
187
|
+
top: j.value * l.value.style.chart.paddingProportions.top,
|
|
188
|
+
right: m.value - m.value * l.value.style.chart.paddingProportions.right,
|
|
189
|
+
bottom: j.value - j.value * l.value.style.chart.paddingProportions.bottom,
|
|
190
|
+
width: e,
|
|
191
|
+
height: j.value - j.value * (l.value.style.chart.paddingProportions.top + l.value.style.chart.paddingProportions.bottom),
|
|
192
|
+
slot: e / (r.value.end - r.value.start)
|
|
193
|
+
};
|
|
194
|
+
});
|
|
195
|
+
function fl(e, a) {
|
|
196
|
+
return e / a;
|
|
197
|
+
}
|
|
198
|
+
function ua({ hasAutoScale: e, series: a, min: t, max: s, scale: u, yOffset: i, individualHeight: n, stackIndex: f = null }) {
|
|
199
|
+
return a.map((x, $) => {
|
|
200
|
+
const L = u.min < 0 ? Math.abs(u.min) : 0, N = fl(x + L, L + u.max);
|
|
201
|
+
let me, ge;
|
|
202
|
+
e && (me = u.min, ge = fl(x - me, u.max - me));
|
|
203
|
+
let U = 0;
|
|
204
|
+
return f === null ? U = o.value.bottom - o.value.height * (e ? ge : N) : U = o.value.bottom - i - n * (e ? ge : N), {
|
|
205
|
+
x: o.value.left + o.value.slot * $ + o.value.slot / 2,
|
|
206
|
+
y: U,
|
|
207
|
+
value: x
|
|
208
|
+
};
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
const z = p(() => {
|
|
212
|
+
const e = l.value.style.chart.scale.min !== null ? l.value.style.chart.scale.min : Math.min(...T.value.filter((n, f) => !F.value.includes(n.absoluteIndex)).flatMap((n) => n.series.slice(r.value.start, r.value.end))), a = l.value.style.chart.scale.max !== null ? l.value.style.chart.scale.max : Math.max(...T.value.filter((n, f) => !F.value.includes(n.absoluteIndex)).flatMap((n) => n.series.slice(r.value.start, r.value.end))), t = Ge(e < 0 ? e : 0, a === e ? e + 1 < 0 ? 0 : e + 1 : a < 0 ? 0 : a, l.value.style.chart.scale.ticks), s = t.min < 0 ? Math.abs(t.min) : 0, u = o.value.bottom - o.value.height * (s / (t.max + s)), i = t.ticks.map((n) => ({
|
|
213
|
+
y: o.value.bottom - o.value.height * ((n + s) / (t.max + s)),
|
|
214
|
+
x: o.value.left - 8,
|
|
215
|
+
value: n
|
|
216
|
+
}));
|
|
217
|
+
return {
|
|
218
|
+
absoluteMin: s,
|
|
219
|
+
max: a,
|
|
220
|
+
min: e,
|
|
221
|
+
scale: t,
|
|
222
|
+
yLabels: i,
|
|
223
|
+
zero: u
|
|
224
|
+
};
|
|
225
|
+
}), na = p(() => y.value.map((e) => `
|
|
226
|
+
<div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
|
|
227
|
+
<svg viewBox="0 0 10 10" height="12" width="12">
|
|
228
|
+
<circle cx="5" cy="5" r="5" fill="${e.color}"/>
|
|
229
|
+
</svg>
|
|
230
|
+
<span>${e.name ? e.name + ": " : ""}</span>
|
|
231
|
+
<span>${se(
|
|
232
|
+
l.value.style.chart.dataLabels.formatter,
|
|
233
|
+
e.series[h.value] ?? "-",
|
|
234
|
+
ue({
|
|
235
|
+
p: e.prefix || "",
|
|
236
|
+
v: e.series[h.value] ?? "-",
|
|
237
|
+
s: e.suffix || "",
|
|
238
|
+
r: e.rounding || 0
|
|
239
|
+
}),
|
|
240
|
+
{ datapoint: e, seriesIndex: h.value }
|
|
241
|
+
)}</span>
|
|
242
|
+
</div>
|
|
243
|
+
`)), ze = p(() => l.value.style.chart.line.cutNullValues), T = p(() => He.value.map((e, a) => ({
|
|
244
|
+
...e,
|
|
245
|
+
series: Ga({
|
|
246
|
+
data: Za(e.series, [], ze.value),
|
|
247
|
+
threshold: l.value.downsample.threshold
|
|
248
|
+
}),
|
|
249
|
+
absoluteIndex: a,
|
|
250
|
+
color: Ol(e.color || hl.value[a] || le[a] || le[a % le.length])
|
|
251
|
+
}))), ia = p(() => {
|
|
252
|
+
if (!l.value.style.chart.zoom.minimap.show) return [];
|
|
253
|
+
const e = T.value.filter((u) => !F.value.includes(u.absoluteIndex)), a = Math.max(...e.map((u) => u.series.length)), t = [];
|
|
254
|
+
for (let u = 0; u < a; u += 1)
|
|
255
|
+
t.push(e.map((i) => i.series[u] || 0).reduce((i, n) => (i || 0) + (n || 0), 0));
|
|
256
|
+
const s = Math.min(...t);
|
|
257
|
+
return t.map((u) => u + (s < 0 ? Math.abs(s) : 0));
|
|
258
|
+
}), ca = p(() => l.value.style.chart.zoom.minimap.show ? T.value.map((a) => ({
|
|
259
|
+
...a,
|
|
260
|
+
isVisible: !F.value.includes(a.absoluteIndex)
|
|
261
|
+
})) : []);
|
|
262
|
+
R(E, (e) => {
|
|
263
|
+
e && he();
|
|
264
|
+
});
|
|
265
|
+
const y = p(() => Ja(T.value.filter((e, a) => !F.value.includes(e.absoluteIndex))).map((e, a) => ({
|
|
266
|
+
...e,
|
|
267
|
+
series: e.series.slice(r.value.start, r.value.end)
|
|
268
|
+
})).map((e, a) => {
|
|
269
|
+
let t = [null, void 0].includes(e.scaleMin) ? Math.min(...e.series) || 0 : e.scaleMin, s = [null, void 0].includes(e.scaleMax) ? Math.max(...e.series) || 1 : e.scaleMax;
|
|
270
|
+
t === s && (t = t >= 0 ? s - 1 : t, s = s >= 0 ? s : t + 1), e.series.filter((U) => ![null, void 0].includes(U)).map((U) => (U - t) / (s - t));
|
|
271
|
+
const u = {
|
|
272
|
+
valueMin: t,
|
|
273
|
+
valueMax: s
|
|
274
|
+
}, i = e.scaleSteps || l.value.style.chart.scale.ticks;
|
|
275
|
+
let n;
|
|
276
|
+
e.autoScaling ? n = Ge(u.valueMin, u.valueMax, i) : n = Ge(u.valueMin < 0 ? u.valueMin : 0, u.valueMax <= 0 ? 0 : u.valueMax, i);
|
|
277
|
+
const f = v.value.stacked ? o.value.height * (1 - e.cumulatedStackRatio) : 0, x = v.value.stacked ? o.value.height / l.value.style.chart.stackGap : 0, $ = v.value.stacked ? o.value.height * e.stackRatio - x : o.value.height, L = n.min < 0 ? Math.abs(n.min) : 0;
|
|
278
|
+
let N;
|
|
279
|
+
e.autoScaling && v.value.stacked && s <= 0 ? N = o.value.bottom - f - $ : N = o.value.bottom - f - $ * (L / (n.max + L));
|
|
280
|
+
const me = n.ticks.map((U, Ba) => ({
|
|
281
|
+
y: o.value.bottom - f - $ * (Ba / (n.ticks.length - 1)),
|
|
282
|
+
x: o.value.left - 8,
|
|
283
|
+
value: U
|
|
284
|
+
})), ge = ua({
|
|
285
|
+
hasAutoScale: v.value.stacked && e.autoScaling,
|
|
286
|
+
series: e.series,
|
|
287
|
+
min: v.value.stacked ? t : z.value.min,
|
|
288
|
+
max: v.value.stacked ? s : z.value.max,
|
|
289
|
+
scale: v.value.stacked ? n : z.value.scale,
|
|
290
|
+
yOffset: f,
|
|
291
|
+
individualHeight: $,
|
|
292
|
+
stackIndex: v.value.stacked ? a : null
|
|
293
|
+
});
|
|
294
|
+
return {
|
|
295
|
+
...e,
|
|
296
|
+
coordinatesLine: ge,
|
|
297
|
+
min: t,
|
|
298
|
+
max: s,
|
|
299
|
+
localScale: n,
|
|
300
|
+
localZero: N,
|
|
301
|
+
localMin: L,
|
|
302
|
+
localYLabels: me,
|
|
303
|
+
yOffset: f,
|
|
304
|
+
individualHeight: $
|
|
305
|
+
};
|
|
306
|
+
})), r = d({
|
|
307
|
+
start: 0,
|
|
308
|
+
end: E.value
|
|
309
|
+
}), D = d({ start: 0, end: E.value }), de = d(null);
|
|
310
|
+
function va() {
|
|
311
|
+
return new Promise((e) => requestAnimationFrame(
|
|
312
|
+
() => requestAnimationFrame(() => e())
|
|
313
|
+
));
|
|
314
|
+
}
|
|
315
|
+
Tl(() => {
|
|
316
|
+
de.value && cancelAnimationFrame(de.value);
|
|
317
|
+
});
|
|
318
|
+
async function he() {
|
|
319
|
+
ml(), await be(), de.value && cancelAnimationFrame(de.value), de.value = requestAnimationFrame(async () => {
|
|
320
|
+
await va(), ml();
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
const da = p(() => l.value.style.chart.zoom.preview.enable && (D.value.start !== r.value.start || D.value.end !== r.value.end));
|
|
324
|
+
function yl(e, a) {
|
|
325
|
+
D.value[e] = a;
|
|
326
|
+
}
|
|
327
|
+
async function ml() {
|
|
328
|
+
if (!ve.value) {
|
|
329
|
+
ve.value = !0;
|
|
330
|
+
try {
|
|
331
|
+
const { startIndex: e, endIndex: a } = l.value.style.chart.zoom, t = Math.max(...T.value.map((i) => i.series.length)), s = e ?? 0, u = a != null ? Math.min(gl(a + 1), t) : t;
|
|
332
|
+
we.value = !0, r.value.start = s, r.value.end = u, D.value.start = s, D.value.end = u, We(), ol.value = !0, await be(), q.value && (q.value.setStartValue(r.value.start), q.value.setEndValue(r.value.end));
|
|
333
|
+
} finally {
|
|
334
|
+
queueMicrotask(() => {
|
|
335
|
+
we.value = !1;
|
|
336
|
+
}), ve.value = !1;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
function ha(e) {
|
|
341
|
+
ve.value || we.value || e !== r.value.start && (r.value.start = e, D.value.start = e, We());
|
|
342
|
+
}
|
|
343
|
+
function fa(e) {
|
|
344
|
+
if (ve.value || we.value) return;
|
|
345
|
+
const a = gl(e);
|
|
346
|
+
a !== r.value.end && (r.value.end = a, D.value.end = a, We());
|
|
347
|
+
}
|
|
348
|
+
function gl(e) {
|
|
349
|
+
const a = E.value;
|
|
350
|
+
return e > a ? a : e < 0 || e < r.value.start ? l.value.style.chart.zoom.startIndex !== null ? l.value.style.chart.zoom.startIndex + 1 : 1 : e;
|
|
351
|
+
}
|
|
352
|
+
function We() {
|
|
353
|
+
const e = Math.max(
|
|
354
|
+
1,
|
|
355
|
+
Math.max(...T.value.map((s) => s.series.length))
|
|
356
|
+
);
|
|
357
|
+
let a = Math.max(0, Math.min(r.value.start ?? 0, e - 1)), t = Math.max(a + 1, Math.min(r.value.end ?? e, e));
|
|
358
|
+
(!Number.isFinite(a) || !Number.isFinite(t) || t <= a) && (a = 0, t = e), r.value = { start: a, end: t }, D.value.start = a, D.value.end = t, q.value && (q.value.setStartValue(a), q.value.setEndValue(t));
|
|
359
|
+
}
|
|
360
|
+
const ya = p(() => y.value.filter((e) => ["line", "plot", void 0].includes(e.type))), M = p(() => y.value.filter((e) => e.type === "bar"));
|
|
361
|
+
function Se() {
|
|
362
|
+
if (!w.value || !ae.value) return;
|
|
363
|
+
const e = ae.value.offsetWidth, a = ae.value.offsetHeight;
|
|
364
|
+
w.value.width = e * te.value * 2, w.value.height = a * te.value * 2, m.value = e * te.value * 2, j.value = a * te.value * 2, c.value?.scale(te.value, te.value), G();
|
|
365
|
+
}
|
|
366
|
+
R(X, async (e) => {
|
|
367
|
+
if (!e) {
|
|
368
|
+
Ae.value = null, ne.value = !1, h.value = null, P.value = null;
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
await be(), w.value && !c.value && (c.value = w.value.getContext("2d", { willReadFrequently: !0 })), O.value = !0, H.value = !0, await he(), Se(), G();
|
|
372
|
+
});
|
|
373
|
+
function ma() {
|
|
374
|
+
if (c.value && (c.value.clearRect(0, 0, 1e4, 1e4), c.value.fillStyle = l.value.style.chart.backgroundColor, c.value.fillRect(0, 0, o.value.canvasWidth, o.value.canvasHeight), !!X.value)) {
|
|
375
|
+
if (v.value.stacked)
|
|
376
|
+
l.value.style.chart.grid.y.verticalLines.show && r.value.end - r.value.start < l.value.style.chart.grid.y.verticalLines.hideUnderXLength ? y.value.forEach((e) => {
|
|
377
|
+
for (let a = 0; a < r.value.end - r.value.start + 1; a += 1)
|
|
378
|
+
k(
|
|
379
|
+
c.value,
|
|
380
|
+
[
|
|
381
|
+
{
|
|
382
|
+
x: o.value.left + o.value.slot * a,
|
|
383
|
+
y: o.value.bottom - e.yOffset - e.individualHeight
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
x: o.value.left + o.value.slot * a,
|
|
387
|
+
y: o.value.bottom - e.yOffset
|
|
388
|
+
}
|
|
389
|
+
],
|
|
390
|
+
{
|
|
391
|
+
color: l.value.style.chart.grid.y.verticalLines.color
|
|
392
|
+
}
|
|
393
|
+
);
|
|
394
|
+
}) : l.value.style.chart.grid.y.verticalLines.show && r.value.end - r.value.start >= l.value.style.chart.grid.y.verticalLines.hideUnderXLength && y.value.forEach((e) => {
|
|
395
|
+
for (let a = r.value.start; a < r.value.end; a += 1)
|
|
396
|
+
a % Math.floor((r.value.end - r.value.start) / l.value.style.chart.grid.x.timeLabels.modulo) === 0 && k(
|
|
397
|
+
c.value,
|
|
398
|
+
[
|
|
399
|
+
{
|
|
400
|
+
x: o.value.left + o.value.slot * (a - r.value.start) + o.value.slot / 2,
|
|
401
|
+
y: o.value.bottom - e.yOffset - e.individualHeight
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
x: o.value.left + o.value.slot * (a - r.value.start) + o.value.slot / 2,
|
|
405
|
+
y: o.value.bottom - e.yOffset
|
|
406
|
+
}
|
|
407
|
+
],
|
|
408
|
+
{
|
|
409
|
+
color: l.value.style.chart.grid.y.verticalLines.color
|
|
410
|
+
}
|
|
411
|
+
);
|
|
412
|
+
}), l.value.style.chart.grid.x.horizontalLines.show && (l.value.style.chart.grid.x.horizontalLines.alternate ? y.value.forEach((e) => {
|
|
413
|
+
e.localYLabels.forEach((a, t) => {
|
|
414
|
+
t < e.localYLabels.length - 1 && Ie(
|
|
415
|
+
c.value,
|
|
416
|
+
[
|
|
417
|
+
{ x: o.value.left, y: a.y },
|
|
418
|
+
{ x: o.value.right, y: a.y },
|
|
419
|
+
{ x: o.value.right, y: e.localYLabels[t + 1].y },
|
|
420
|
+
{ x: o.value.left, y: e.localYLabels[t + 1].y }
|
|
421
|
+
],
|
|
422
|
+
{
|
|
423
|
+
fillColor: t % 2 === 0 ? "transparent" : Le(l.value.style.chart.grid.x.horizontalLines.color, l.value.style.chart.grid.x.horizontalLines.opacity),
|
|
424
|
+
strokeColor: "transparent"
|
|
425
|
+
}
|
|
426
|
+
);
|
|
427
|
+
});
|
|
428
|
+
}) : y.value.forEach((e) => {
|
|
429
|
+
e.localYLabels.slice(r.value.start, r.value.end).forEach((a) => {
|
|
430
|
+
k(
|
|
431
|
+
c.value,
|
|
432
|
+
[
|
|
433
|
+
{ x: o.value.left, y: a.y },
|
|
434
|
+
{ x: o.value.right, y: a.y }
|
|
435
|
+
],
|
|
436
|
+
{
|
|
437
|
+
color: l.value.style.chart.grid.x.horizontalLines.color
|
|
438
|
+
}
|
|
439
|
+
);
|
|
440
|
+
});
|
|
441
|
+
})), l.value.style.chart.grid.zeroLine.show && y.value.forEach((e) => {
|
|
442
|
+
k(
|
|
443
|
+
c.value,
|
|
444
|
+
[
|
|
445
|
+
{ x: o.value.left, y: e.localZero },
|
|
446
|
+
{ x: o.value.right, y: e.localZero }
|
|
447
|
+
],
|
|
448
|
+
{
|
|
449
|
+
color: l.value.style.chart.grid.zeroLine.color,
|
|
450
|
+
lineDash: l.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
|
|
451
|
+
}
|
|
452
|
+
);
|
|
453
|
+
}), l.value.style.chart.grid.y.axisLabels.show && y.value.forEach((e) => {
|
|
454
|
+
k(
|
|
455
|
+
c.value,
|
|
456
|
+
[
|
|
457
|
+
{ x: o.value.left, y: o.value.bottom - e.yOffset },
|
|
458
|
+
{ x: o.value.left, y: o.value.bottom - e.yOffset - e.individualHeight }
|
|
459
|
+
],
|
|
460
|
+
{
|
|
461
|
+
color: e.color
|
|
462
|
+
}
|
|
463
|
+
), k(
|
|
464
|
+
c.value,
|
|
465
|
+
[
|
|
466
|
+
{ x: o.value.right, y: o.value.bottom - e.yOffset },
|
|
467
|
+
{ x: o.value.right, y: o.value.bottom - e.yOffset - e.individualHeight }
|
|
468
|
+
],
|
|
469
|
+
{
|
|
470
|
+
color: e.color
|
|
471
|
+
}
|
|
472
|
+
);
|
|
473
|
+
}), y.value.forEach((e) => {
|
|
474
|
+
Y(
|
|
475
|
+
c.value,
|
|
476
|
+
e.name,
|
|
477
|
+
m.value / 35,
|
|
478
|
+
o.value.bottom - e.yOffset - e.individualHeight / 2,
|
|
479
|
+
{
|
|
480
|
+
align: "center",
|
|
481
|
+
rotation: -90,
|
|
482
|
+
color: e.color,
|
|
483
|
+
font: `${Math.round(m.value / 40 * l.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`
|
|
484
|
+
}
|
|
485
|
+
);
|
|
486
|
+
});
|
|
487
|
+
else {
|
|
488
|
+
if (l.value.style.chart.grid.y.verticalLines.show && r.value.end - r.value.start < l.value.style.chart.grid.y.verticalLines.hideUnderXLength)
|
|
489
|
+
for (let e = 0; e < r.value.end - r.value.start + 1; e += 1)
|
|
490
|
+
k(
|
|
491
|
+
c.value,
|
|
492
|
+
[
|
|
493
|
+
{ x: o.value.left + o.value.slot * e, y: o.value.top },
|
|
494
|
+
{ x: o.value.left + o.value.slot * e, y: o.value.bottom }
|
|
495
|
+
],
|
|
496
|
+
{
|
|
497
|
+
color: l.value.style.chart.grid.y.verticalLines.color
|
|
498
|
+
}
|
|
499
|
+
);
|
|
500
|
+
else if (l.value.style.chart.grid.y.verticalLines.show && r.value.end - r.value.start >= l.value.style.chart.grid.y.verticalLines.hideUnderXLength)
|
|
501
|
+
for (let e = r.value.start; e < r.value.end; e += 1)
|
|
502
|
+
e % Math.floor((r.value.end - r.value.start) / l.value.style.chart.grid.x.timeLabels.modulo) === 0 && k(
|
|
503
|
+
c.value,
|
|
504
|
+
[
|
|
505
|
+
{ x: o.value.left + o.value.slot * (e - r.value.start) + o.value.slot / 2, y: o.value.top },
|
|
506
|
+
{ x: o.value.left + o.value.slot * (e - r.value.start) + o.value.slot / 2, y: o.value.bottom }
|
|
507
|
+
],
|
|
508
|
+
{
|
|
509
|
+
color: l.value.style.chart.grid.y.verticalLines.color
|
|
510
|
+
}
|
|
511
|
+
);
|
|
512
|
+
l.value.style.chart.grid.x.horizontalLines.show && (l.value.style.chart.grid.x.horizontalLines.alternate ? z.value.yLabels.forEach((e, a) => {
|
|
513
|
+
a < z.value.yLabels.length - 1 && Ie(
|
|
514
|
+
c.value,
|
|
515
|
+
[
|
|
516
|
+
{ x: o.value.left, y: e.y },
|
|
517
|
+
{ x: o.value.right, y: e.y },
|
|
518
|
+
{ x: o.value.right, y: z.value.yLabels[a + 1].y },
|
|
519
|
+
{ x: o.value.left, y: z.value.yLabels[a + 1].y }
|
|
520
|
+
],
|
|
521
|
+
{
|
|
522
|
+
fillColor: a % 2 === 0 ? "transparent" : Le(l.value.style.chart.grid.x.horizontalLines.color, l.value.style.chart.grid.x.horizontalLines.opacity),
|
|
523
|
+
strokeColor: "transparent"
|
|
524
|
+
}
|
|
525
|
+
);
|
|
526
|
+
}) : z.value.yLabels.forEach((e) => {
|
|
527
|
+
k(
|
|
528
|
+
c.value,
|
|
529
|
+
[
|
|
530
|
+
{ x: o.value.left, y: e.y },
|
|
531
|
+
{ x: o.value.right, y: e.y }
|
|
532
|
+
],
|
|
533
|
+
{
|
|
534
|
+
color: l.value.style.chart.grid.x.horizontalLines.color
|
|
535
|
+
}
|
|
536
|
+
);
|
|
537
|
+
})), l.value.style.chart.grid.y.showAxis && k(
|
|
538
|
+
c.value,
|
|
539
|
+
[
|
|
540
|
+
{ x: o.value.left, y: o.value.top },
|
|
541
|
+
{ x: o.value.left, y: o.value.bottom }
|
|
542
|
+
],
|
|
543
|
+
{
|
|
544
|
+
color: l.value.style.chart.grid.y.axisColor,
|
|
545
|
+
lineWidth: l.value.style.chart.grid.y.axisThickness
|
|
546
|
+
}
|
|
547
|
+
), l.value.style.chart.grid.x.showAxis && k(
|
|
548
|
+
c.value,
|
|
549
|
+
[
|
|
550
|
+
{ x: o.value.left, y: o.value.bottom },
|
|
551
|
+
{ x: o.value.right, y: o.value.bottom }
|
|
552
|
+
],
|
|
553
|
+
{
|
|
554
|
+
color: l.value.style.chart.grid.x.axisColor,
|
|
555
|
+
lineWidth: l.value.style.chart.grid.x.axisThickness
|
|
556
|
+
}
|
|
557
|
+
), l.value.style.chart.grid.zeroLine.show && k(
|
|
558
|
+
c.value,
|
|
559
|
+
[
|
|
560
|
+
{ x: o.value.left, y: z.value.zero },
|
|
561
|
+
{ x: o.value.right, y: z.value.zero }
|
|
562
|
+
],
|
|
563
|
+
{
|
|
564
|
+
color: l.value.style.chart.grid.zeroLine.color,
|
|
565
|
+
lineDash: l.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
|
|
566
|
+
}
|
|
567
|
+
);
|
|
568
|
+
}
|
|
569
|
+
l.value.style.chart.grid.y.axisName && Y(
|
|
570
|
+
c.value,
|
|
571
|
+
l.value.style.chart.grid.y.axisName,
|
|
572
|
+
m.value - m.value / 40 * l.value.style.chart.grid.y.axisLabels.fontSizeRatio * 1.2,
|
|
573
|
+
o.value.bottom - o.value.height / 2,
|
|
574
|
+
{
|
|
575
|
+
font: `${l.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(m.value / 40 * l.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,
|
|
576
|
+
color: l.value.style.chart.color,
|
|
577
|
+
align: "center",
|
|
578
|
+
rotation: 90
|
|
579
|
+
}
|
|
580
|
+
), l.value.style.chart.grid.x.axisName && Y(
|
|
581
|
+
c.value,
|
|
582
|
+
l.value.style.chart.grid.x.axisName,
|
|
583
|
+
m.value / 2,
|
|
584
|
+
j.value,
|
|
585
|
+
{
|
|
586
|
+
font: `${l.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(m.value / 40 * l.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,
|
|
587
|
+
color: l.value.style.chart.color,
|
|
588
|
+
align: "center"
|
|
589
|
+
}
|
|
590
|
+
);
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
function ga(e) {
|
|
594
|
+
for (let a = 0; a < e.coordinatesLine.length; a += 1) {
|
|
595
|
+
const t = (h.value === a || A.value === a ? m.value / 150 : l.value.style.chart.line.plots.show || e.type === "plot" ? m.value / 200 : 0) * l.value.style.chart.line.plots.radiusRatio;
|
|
596
|
+
Ze(
|
|
597
|
+
c.value,
|
|
598
|
+
{ x: e.coordinatesLine[a].x, y: e.coordinatesLine[a].y },
|
|
599
|
+
t,
|
|
600
|
+
{
|
|
601
|
+
color: l.value.style.chart.backgroundColor,
|
|
602
|
+
fillStyle: e.color
|
|
603
|
+
}
|
|
604
|
+
);
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
function pa() {
|
|
608
|
+
y.value.forEach((e) => {
|
|
609
|
+
e.showYMarker && fe(e) && Y(
|
|
610
|
+
c.value,
|
|
611
|
+
se(
|
|
612
|
+
l.value.style.chart.dataLabels.formatter,
|
|
613
|
+
fe(e).value,
|
|
614
|
+
ue({
|
|
615
|
+
p: e.prefix || l.value.style.chart.grid.y.axisLabels.prefix || "",
|
|
616
|
+
v: fe(e).value,
|
|
617
|
+
s: e.suffix || l.value.style.chart.grid.y.axisLabels.suffix || "",
|
|
618
|
+
r: e.rounding || l.value.style.chart.grid.y.axisLabels.rounding || 0
|
|
619
|
+
}),
|
|
620
|
+
{ datapoint: fe(e), seriesIndex: null }
|
|
621
|
+
),
|
|
622
|
+
o.value.left - 8 + l.value.style.chart.grid.y.axisLabels.offsetX,
|
|
623
|
+
fe(e).y,
|
|
624
|
+
{
|
|
625
|
+
align: "right",
|
|
626
|
+
font: `${l.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(m.value / 40 * l.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,
|
|
627
|
+
color: e.color
|
|
628
|
+
}
|
|
629
|
+
);
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
function ba() {
|
|
633
|
+
l.value.style.chart.grid.y.axisLabels.show && (v.value.stacked ? y.value.forEach((e) => {
|
|
634
|
+
e.localYLabels.forEach((a, t) => {
|
|
635
|
+
Y(
|
|
636
|
+
c.value,
|
|
637
|
+
se(
|
|
638
|
+
l.value.style.chart.dataLabels.formatter,
|
|
639
|
+
a.value,
|
|
640
|
+
ue({
|
|
641
|
+
p: e.prefix || l.value.style.chart.grid.y.axisLabels.prefix || "",
|
|
642
|
+
v: a.value,
|
|
643
|
+
s: e.suffix || l.value.style.chart.grid.y.axisLabels.suffix || "",
|
|
644
|
+
r: e.rounding || l.value.style.chart.grid.y.axisLabels.rounding || 0
|
|
645
|
+
}),
|
|
646
|
+
{ datapoint: a, seriesIndex: t }
|
|
647
|
+
),
|
|
648
|
+
a.x + l.value.style.chart.grid.y.axisLabels.offsetX,
|
|
649
|
+
a.y,
|
|
650
|
+
{
|
|
651
|
+
align: "right",
|
|
652
|
+
font: `${l.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(m.value / 40 * l.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,
|
|
653
|
+
color: e.color,
|
|
654
|
+
globalAlpha: e.showYMarker && ![null, void 0].includes(h.value ?? A.value) ? 0.2 : 1
|
|
655
|
+
}
|
|
656
|
+
);
|
|
657
|
+
});
|
|
658
|
+
}) : z.value.yLabels.forEach((e, a) => {
|
|
659
|
+
Y(
|
|
660
|
+
c.value,
|
|
661
|
+
se(
|
|
662
|
+
l.value.style.chart.dataLabels.formatter,
|
|
663
|
+
e.value,
|
|
664
|
+
ue({
|
|
665
|
+
p: l.value.style.chart.grid.y.axisLabels.prefix || "",
|
|
666
|
+
v: e.value,
|
|
667
|
+
s: l.value.style.chart.grid.y.axisLabels.suffix || "",
|
|
668
|
+
r: l.value.style.chart.grid.y.axisLabels.rounding || 0
|
|
669
|
+
}),
|
|
670
|
+
{ datapoint: e, seriesIndex: a }
|
|
671
|
+
),
|
|
672
|
+
e.x + l.value.style.chart.grid.y.axisLabels.offsetX,
|
|
673
|
+
e.y,
|
|
674
|
+
{
|
|
675
|
+
align: "right",
|
|
676
|
+
font: `${l.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(m.value / 40 * l.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,
|
|
677
|
+
color: l.value.style.chart.grid.y.axisLabels.color,
|
|
678
|
+
globalAlpha: y.value.some((t) => t.showYMarker) && ![null, void 0].includes(h.value ?? A.value) ? 0.2 : 1
|
|
679
|
+
}
|
|
680
|
+
);
|
|
681
|
+
}));
|
|
682
|
+
}
|
|
683
|
+
function xa(e) {
|
|
684
|
+
for (let a = 0; a < e.coordinatesLine.length; a += 1)
|
|
685
|
+
Y(
|
|
686
|
+
c.value,
|
|
687
|
+
se(
|
|
688
|
+
l.value.style.chart.dataLabels.formatter,
|
|
689
|
+
e.coordinatesLine[a].value,
|
|
690
|
+
ue({
|
|
691
|
+
p: e.prefix || "",
|
|
692
|
+
v: e.coordinatesLine[a].value,
|
|
693
|
+
s: e.suffix || "",
|
|
694
|
+
r: e.rounding || 0
|
|
695
|
+
}),
|
|
696
|
+
{ datapoint: e.coordinatesLine[a], seriesIndex: a }
|
|
697
|
+
),
|
|
698
|
+
e.coordinatesLine[a].x,
|
|
699
|
+
e.coordinatesLine[a].y + l.value.style.chart.dataLabels.offsetY,
|
|
700
|
+
{
|
|
701
|
+
align: "center",
|
|
702
|
+
font: `${l.value.style.chart.dataLabels.bold ? "bold " : ""}${Math.round(m.value / 40 * l.value.style.chart.dataLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,
|
|
703
|
+
color: l.value.style.chart.dataLabels.useSerieColor ? e.color : l.value.style.chart.dataLabels.color,
|
|
704
|
+
strokeColor: l.value.style.chart.backgroundColor,
|
|
705
|
+
lineWidth: 0.5
|
|
706
|
+
}
|
|
707
|
+
);
|
|
708
|
+
}
|
|
709
|
+
const B = p(() => dt({
|
|
710
|
+
values: l.value.style.chart.grid.x.timeLabels.values,
|
|
711
|
+
maxDatapoints: E.value,
|
|
712
|
+
formatter: l.value.style.chart.grid.x.timeLabels.datetimeFormatter,
|
|
713
|
+
start: 0,
|
|
714
|
+
end: E.value
|
|
715
|
+
})), pl = p(() => {
|
|
716
|
+
const e = l.value.style.chart.grid.x.timeLabels.datetimeFormatter, a = ht({
|
|
717
|
+
useUTC: e.useUTC,
|
|
718
|
+
locale: ft[e.locale] || { months: [], shortMonths: [], days: [], shortDays: [] },
|
|
719
|
+
januaryAsYear: e.januaryAsYear
|
|
720
|
+
});
|
|
721
|
+
return (t, s) => {
|
|
722
|
+
const i = l.value.style.chart.grid.x.timeLabels.values?.[t];
|
|
723
|
+
return i == null ? "" : a.formatDate(new Date(i), s);
|
|
724
|
+
};
|
|
725
|
+
}), bl = p(() => (l.value.style.chart.grid.x.timeLabels.values || []).map((a, t) => ({
|
|
726
|
+
text: pl.value(t, l.value.style.chart.zoom.timeFormat),
|
|
727
|
+
absoluteIndex: t
|
|
728
|
+
}))), Ca = p(() => (l.value.style.chart.grid.x.timeLabels.values || []).map((a, t) => ({
|
|
729
|
+
text: pl.value(t, l.value.style.chart.tooltip.timeFormat),
|
|
730
|
+
absoluteIndex: t
|
|
731
|
+
})));
|
|
732
|
+
function La() {
|
|
733
|
+
for (let e = r.value.start; e < r.value.end; e += 1)
|
|
734
|
+
(r.value.end - r.value.start < l.value.style.chart.grid.x.timeLabels.modulo || r.value.end - r.value.start >= l.value.style.chart.grid.x.timeLabels.modulo && (e % Math.floor((r.value.end - r.value.start) / l.value.style.chart.grid.x.timeLabels.modulo) === 0 || (e === h.value + r.value.start || e === A.value) && l.value.style.chart.grid.x.timeLabels.showMarker)) && Y(
|
|
735
|
+
c.value,
|
|
736
|
+
B.value[e] ? B.value[e].text : e + 1,
|
|
737
|
+
o.value.left + o.value.slot * (e - r.value.start) + o.value.slot / 2,
|
|
738
|
+
o.value.bottom + m.value / l.value.style.chart.grid.x.timeLabels.offsetY,
|
|
739
|
+
{
|
|
740
|
+
align: l.value.style.chart.grid.x.timeLabels.rotation === 0 ? "center" : l.value.style.chart.grid.x.timeLabels.rotation > 0 ? "left" : "right",
|
|
741
|
+
font: `${l.value.style.chart.grid.x.timeLabels.bold ? "bold " : ""}${Math.round(m.value / 40 * l.value.style.chart.grid.x.timeLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,
|
|
742
|
+
color: l.value.style.chart.grid.x.timeLabels.showMarker ? Le(l.value.style.chart.grid.x.timeLabels.color, h.value !== null || A.value !== null ? h.value + r.value.start === e || A.value === e ? 100 : 20 : 100) : l.value.style.chart.grid.x.timeLabels.color,
|
|
743
|
+
rotation: l.value.style.chart.grid.x.timeLabels.rotation
|
|
744
|
+
}
|
|
745
|
+
);
|
|
746
|
+
}
|
|
747
|
+
function xl() {
|
|
748
|
+
k(
|
|
749
|
+
c.value,
|
|
750
|
+
[
|
|
751
|
+
{ x: o.value.left + o.value.slot * (h.value ?? A.value) + o.value.slot / 2, y: o.value.top },
|
|
752
|
+
{ x: o.value.left + o.value.slot * (h.value ?? A.value) + o.value.slot / 2, y: o.value.bottom }
|
|
753
|
+
],
|
|
754
|
+
{
|
|
755
|
+
color: l.value.style.chart.selector.color,
|
|
756
|
+
lineDash: l.value.style.chart.selector.dashed ? [8, 8] : [0, 0],
|
|
757
|
+
lineWidth: 2
|
|
758
|
+
}
|
|
759
|
+
);
|
|
760
|
+
}
|
|
761
|
+
function ka() {
|
|
762
|
+
P.value && k(
|
|
763
|
+
c.value,
|
|
764
|
+
[
|
|
765
|
+
{ x: o.value.left, y: P.value },
|
|
766
|
+
{ x: o.value.right, y: P.value }
|
|
767
|
+
],
|
|
768
|
+
{
|
|
769
|
+
color: l.value.style.chart.selector.color,
|
|
770
|
+
lineDash: l.value.style.chart.selector.dashed ? [8, 8] : [0, 0],
|
|
771
|
+
lineWidth: 2
|
|
772
|
+
}
|
|
773
|
+
);
|
|
774
|
+
}
|
|
775
|
+
function Aa() {
|
|
776
|
+
M.value.forEach((e, a) => {
|
|
777
|
+
for (let t = 0; t < e.coordinatesLine.length; t += 1)
|
|
778
|
+
Ie(
|
|
779
|
+
c.value,
|
|
780
|
+
[
|
|
781
|
+
{
|
|
782
|
+
x: o.value.left + o.value.slot * t + o.value.slot / 10 + (v.value.stacked ? 0 : o.value.slot / M.value.length * a - (a === 0 ? 0 : o.value.slot / (5 * M.value.length) * a)),
|
|
783
|
+
y: v.value.stacked ? e.localZero : z.value.zero
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
x: o.value.left + o.value.slot * t + o.value.slot / 10 + (v.value.stacked ? 0 : o.value.slot / M.value.length * a - (a === 0 ? 0 : o.value.slot / (5 * M.value.length) * a)) + o.value.slot * 0.8 / (v.value.stacked ? 1 : M.value.length),
|
|
787
|
+
y: v.value.stacked ? e.localZero : z.value.zero
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
x: o.value.left + o.value.slot * t + o.value.slot / 10 + (v.value.stacked ? 0 : o.value.slot / M.value.length * a - (a === 0 ? 0 : o.value.slot / (5 * M.value.length) * a)) + o.value.slot * 0.8 / (v.value.stacked ? 1 : M.value.length),
|
|
791
|
+
y: e.coordinatesLine[t].y
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
x: o.value.left + o.value.slot * t + o.value.slot / 10 + (v.value.stacked ? 0 : o.value.slot / M.value.length * a - (a === 0 ? 0 : o.value.slot / (5 * M.value.length) * a)),
|
|
795
|
+
y: e.coordinatesLine[t].y
|
|
796
|
+
}
|
|
797
|
+
],
|
|
798
|
+
{
|
|
799
|
+
strokeColor: l.value.style.chart.backgroundColor,
|
|
800
|
+
gradient: {
|
|
801
|
+
type: "linear",
|
|
802
|
+
start: {
|
|
803
|
+
x: e.coordinatesLine[t].x,
|
|
804
|
+
y: e.coordinatesLine[t].y
|
|
805
|
+
},
|
|
806
|
+
end: {
|
|
807
|
+
x: e.coordinatesLine[t].x,
|
|
808
|
+
y: v.value.stacked ? e.localZero : z.value.zero
|
|
809
|
+
},
|
|
810
|
+
stops: [
|
|
811
|
+
{ offset: 0, color: e.color },
|
|
812
|
+
{ offset: 1, color: l.value.style.chart.bar.gradient.show ? et(e.color, 0.5) : e.color }
|
|
813
|
+
]
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
), v.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && Y(
|
|
817
|
+
c.value,
|
|
818
|
+
se(
|
|
819
|
+
l.value.style.chart.dataLabels.formatter,
|
|
820
|
+
e.coordinatesLine[t].value,
|
|
821
|
+
ue({
|
|
822
|
+
p: e.prefix || "",
|
|
823
|
+
v: e.coordinatesLine[t].value,
|
|
824
|
+
s: e.suffix || "",
|
|
825
|
+
r: e.rounding || 0
|
|
826
|
+
}),
|
|
827
|
+
{ datapoint: e.coordinatesLine[t], seriesIndex: t }
|
|
828
|
+
),
|
|
829
|
+
o.value.left + o.value.slot * t + o.value.slot / 10 + (v.value.stacked ? 0 : o.value.slot / M.value.length * a - (a === 0 ? 0 : o.value.slot / (5 * M.value.length) * a)) + o.value.slot * 0.4 / (v.value.stacked ? 1 : M.value.length),
|
|
830
|
+
(e.coordinatesLine[t].value < 0 ? v.value.stacked ? e.localZero : z.value.zero : e.coordinatesLine[t].y) + l.value.style.chart.dataLabels.offsetY,
|
|
831
|
+
{
|
|
832
|
+
align: "center",
|
|
833
|
+
font: `${Math.round(m.value / 40 * l.value.style.chart.dataLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,
|
|
834
|
+
color: l.value.style.chart.dataLabels.useSerieColor ? e.color : l.value.style.chart.dataLabels.color,
|
|
835
|
+
strokeColor: l.value.style.chart.backgroundColor,
|
|
836
|
+
lineWidth: 0.8
|
|
837
|
+
}
|
|
838
|
+
);
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
function wa(e, a) {
|
|
842
|
+
const t = e.coordinatesLine.map((n, f) => {
|
|
843
|
+
const x = e.series[f];
|
|
844
|
+
return x != null && Number.isFinite(n?.y) ? n : null;
|
|
845
|
+
}), s = [], u = [];
|
|
846
|
+
let i = [];
|
|
847
|
+
for (let n = 0; n < t.length; n += 1) {
|
|
848
|
+
const f = t[n];
|
|
849
|
+
if (f)
|
|
850
|
+
i.push(f);
|
|
851
|
+
else {
|
|
852
|
+
if (i.length >= 2) {
|
|
853
|
+
const x = i[0], $ = i[i.length - 1];
|
|
854
|
+
s.push([
|
|
855
|
+
{ x: x.x, y: a },
|
|
856
|
+
...i,
|
|
857
|
+
{ x: $.x, y: a }
|
|
858
|
+
]);
|
|
859
|
+
} else i.length === 1 && u.push(i[0]);
|
|
860
|
+
i = [];
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
if (i.length >= 2) {
|
|
864
|
+
const n = i[0], f = i[i.length - 1];
|
|
865
|
+
s.push([
|
|
866
|
+
{ x: n.x, y: a },
|
|
867
|
+
...i,
|
|
868
|
+
{ x: f.x, y: a }
|
|
869
|
+
]);
|
|
870
|
+
} else i.length === 1 && u.push(i[0]);
|
|
871
|
+
return { polygons: s, singles: u };
|
|
872
|
+
}
|
|
873
|
+
function za(e) {
|
|
874
|
+
const a = e.coordinatesLine.map((u, i) => {
|
|
875
|
+
const n = e.series[i];
|
|
876
|
+
return n != null && Number.isFinite(u?.y) ? u : null;
|
|
877
|
+
}), t = [];
|
|
878
|
+
let s = [];
|
|
879
|
+
for (let u = 0; u < a.length; u += 1) {
|
|
880
|
+
const i = a[u];
|
|
881
|
+
i ? s.push(i) : (s.length >= 2 && t.push(s), s = []);
|
|
882
|
+
}
|
|
883
|
+
return s.length >= 2 && t.push(s), t;
|
|
884
|
+
}
|
|
885
|
+
function Cl(e) {
|
|
886
|
+
if (ze.value) {
|
|
887
|
+
const a = za(e);
|
|
888
|
+
for (const t of a)
|
|
889
|
+
k(c.value, t, {
|
|
890
|
+
color: e.color,
|
|
891
|
+
lineWidth: 3
|
|
892
|
+
});
|
|
893
|
+
} else
|
|
894
|
+
k(c.value, e.coordinatesLine, {
|
|
895
|
+
color: e.color,
|
|
896
|
+
lineWidth: 3
|
|
897
|
+
});
|
|
898
|
+
}
|
|
899
|
+
function Sa(e) {
|
|
900
|
+
const a = !!ze.value;
|
|
901
|
+
if (e.useArea) {
|
|
902
|
+
const t = v.value.stacked ? e.localZero : z.value.zero;
|
|
903
|
+
if (a) {
|
|
904
|
+
const { polygons: s, singles: u } = wa(e, t);
|
|
905
|
+
for (const n of s)
|
|
906
|
+
Bl(c.value, n, {
|
|
907
|
+
fillColor: Le(e.color, l.value.style.chart.area.opacity),
|
|
908
|
+
strokeColor: "transparent"
|
|
909
|
+
});
|
|
910
|
+
const i = m.value / 200 * l.value.style.chart.line.plots.radiusRatio;
|
|
911
|
+
for (const n of u)
|
|
912
|
+
Ze(
|
|
913
|
+
c.value,
|
|
914
|
+
{ x: n.x, y: n.y },
|
|
915
|
+
i,
|
|
916
|
+
{
|
|
917
|
+
color: l.value.style.chart.backgroundColor,
|
|
918
|
+
fillStyle: e.color
|
|
919
|
+
}
|
|
920
|
+
);
|
|
921
|
+
} else {
|
|
922
|
+
const s = { x: e.coordinatesLine[0].x, y: t }, u = { x: e.coordinatesLine.at(-1).x, y: t };
|
|
923
|
+
Bl(
|
|
924
|
+
c.value,
|
|
925
|
+
[s, ...e.coordinatesLine, u],
|
|
926
|
+
{
|
|
927
|
+
fillColor: Le(e.color, l.value.style.chart.area.opacity),
|
|
928
|
+
strokeColor: "transparent"
|
|
929
|
+
}
|
|
930
|
+
);
|
|
931
|
+
}
|
|
932
|
+
Cl(e);
|
|
933
|
+
return;
|
|
934
|
+
}
|
|
935
|
+
Cl(e);
|
|
936
|
+
}
|
|
937
|
+
function Fa() {
|
|
938
|
+
y.value.forEach((e, a) => {
|
|
939
|
+
k(
|
|
940
|
+
c.value,
|
|
941
|
+
[
|
|
942
|
+
{ x: o.value.left, y: o.value.bottom - e.yOffset },
|
|
943
|
+
{ x: o.value.right, y: o.value.bottom - e.yOffset }
|
|
944
|
+
],
|
|
945
|
+
{
|
|
946
|
+
color: l.value.style.chart.grid.x.horizontalLines.color,
|
|
947
|
+
lineWidth: 1
|
|
948
|
+
}
|
|
949
|
+
);
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
function Da() {
|
|
953
|
+
const { left: e, top: a, width: t, height: s } = o.value, u = r.value.start, n = r.value.end - u, f = t / n, x = D.value.start - u, $ = D.value.end - u, L = Math.max(0, Math.min(n, x)), N = Math.max(0, Math.min(n, $));
|
|
954
|
+
Ie(
|
|
955
|
+
c.value,
|
|
956
|
+
[
|
|
957
|
+
{ x: e + L * f, y: a },
|
|
958
|
+
{ x: e + L * f + (N - L) * f, y: a },
|
|
959
|
+
{ x: e + L * f + (N - L) * f, y: a + s },
|
|
960
|
+
{ x: e + L * f, y: a + s }
|
|
961
|
+
],
|
|
962
|
+
{
|
|
963
|
+
fillColor: l.value.style.chart.zoom.preview.fill,
|
|
964
|
+
strokeColor: l.value.style.chart.zoom.preview.stroke,
|
|
965
|
+
lineDash: Array(4).fill(l.value.style.chart.zoom.preview.strokeDasharray),
|
|
966
|
+
lineWidth: l.value.style.chart.zoom.preview.strokeWidth
|
|
967
|
+
}
|
|
968
|
+
);
|
|
969
|
+
}
|
|
970
|
+
function G() {
|
|
971
|
+
!X.value || !w.value || !c.value || (ma(), O.value ? ((h.value !== null || A.value !== null) && l.value.style.chart.selector.show && xl(), Aa(), v.value.stacked && l.value.style.chart.grid.x.showAxis && Fa(), ya.value.forEach((e) => {
|
|
972
|
+
(e.type === "line" || !e.type) && Sa(e), H.value && (ga(e), v.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && xa(e));
|
|
973
|
+
}), w.value && (Ae.value = ot(w.value))) : (Ae.value && (c.value.clearRect(0, 0, 1e4, 1e4), c.value.drawImage(Ae.value, 0, 0)), (h.value !== null || A.value !== null) && l.value.style.chart.selector.show && xl(), (h.value !== null || A.value !== null) && y.value.forEach((e) => {
|
|
974
|
+
const a = h.value ?? A.value, t = e.coordinatesLine[a];
|
|
975
|
+
(e.type === "line" || !e.type || e.type === "plot") && t && Number.isFinite(t.x) && Number.isFinite(t.y) && Ze(
|
|
976
|
+
c.value,
|
|
977
|
+
{ x: t.x, y: t.y },
|
|
978
|
+
m.value / 150 * l.value.style.chart.line.plots.radiusRatio,
|
|
979
|
+
{
|
|
980
|
+
color: l.value.style.chart.backgroundColor,
|
|
981
|
+
fillStyle: e.color
|
|
982
|
+
}
|
|
983
|
+
);
|
|
984
|
+
})), l.value.style.chart.grid.x.timeLabels.show && La(), l.value.style.chart.selector.show && l.value.style.chart.selector.showHorizontalSelector && ka(), ba(), pa(), l.value.style.chart.zoom.preview.enable && (r.value.start !== D.value.start || r.value.end !== D.value.end) && Da(), O.value = !1);
|
|
985
|
+
}
|
|
986
|
+
const Fe = rt(() => {
|
|
987
|
+
H.value = !0, Se();
|
|
988
|
+
}, E.value > 200 ? 10 : 1, !H.value);
|
|
989
|
+
function fe(e) {
|
|
990
|
+
if ([null, void 0].includes(h.value ?? A.value) || !e.coordinatesLine[h.value ?? A.value]) return !1;
|
|
991
|
+
const { y: a, value: t } = e.coordinatesLine[h.value ?? A.value];
|
|
992
|
+
return { y: a, value: t };
|
|
993
|
+
}
|
|
994
|
+
function Ma(e) {
|
|
995
|
+
if (!X.value || !w.value) return;
|
|
996
|
+
const { left: a, top: t } = w.value.getBoundingClientRect(), s = e.clientX - a;
|
|
997
|
+
if (P.value = (e.clientY - t) * 2, (P.value < o.value.top || P.value > o.value.bottom) && (P.value = null), s * 2 < o.value.left || s * 2 > o.value.right) {
|
|
998
|
+
ne.value = !1, h.value = null;
|
|
999
|
+
return;
|
|
1000
|
+
}
|
|
1001
|
+
const u = s * 2 - o.value.left;
|
|
1002
|
+
if (h.value = Math.floor(u / o.value.slot), ne.value = !0, !H.value) return;
|
|
1003
|
+
let i = "";
|
|
1004
|
+
const n = l.value.style.chart.tooltip.customFormat, f = y.value.map((x) => ({
|
|
1005
|
+
shape: x.shape || null,
|
|
1006
|
+
name: x.name,
|
|
1007
|
+
color: x.color,
|
|
1008
|
+
type: x.type || "line",
|
|
1009
|
+
value: x.series.find(($, L) => L === h.value)
|
|
1010
|
+
}));
|
|
1011
|
+
$a({ seriesIndex: h.value, datapoint: f }), Pl(n) && tt(() => n({
|
|
1012
|
+
seriesIndex: h.value,
|
|
1013
|
+
datapoint: f,
|
|
1014
|
+
series: y.value,
|
|
1015
|
+
config: l.value
|
|
1016
|
+
})) ? ke.value = n({
|
|
1017
|
+
seriesIndex: h.value,
|
|
1018
|
+
datapoint: f,
|
|
1019
|
+
series: y.value,
|
|
1020
|
+
config: l.value
|
|
1021
|
+
}) : (l.value.style.chart.grid.x.timeLabels.values.slice(r.value.start, r.value.end)[h.value] ? i += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${l.value.style.chart.tooltip.borderColor}; width:100%">${l.value.style.chart.tooltip.useDefaultTimeFormat ? B.value.slice(r.value.start, r.value.end)[h.value]?.text : Ca.value[h.value]?.text}</div>` : i += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${l.value.style.chart.tooltip.borderColor}; width:100%">${B.value[h.value + r.value.start]?.text ?? ""}</div>`, i += na.value.join(""), ke.value = i), H.value = !1;
|
|
1022
|
+
}
|
|
1023
|
+
function $a({ seriesIndex: e, datapoint: a }) {
|
|
1024
|
+
const t = r.value.start + e;
|
|
1025
|
+
Ne("selectX", {
|
|
1026
|
+
dataset: a,
|
|
1027
|
+
index: t,
|
|
1028
|
+
indexLabel: ""
|
|
1029
|
+
});
|
|
1030
|
+
}
|
|
1031
|
+
R(() => g.selectedXIndex, (e) => {
|
|
1032
|
+
if ([null, void 0].includes(g.selectedXIndex)) {
|
|
1033
|
+
h.value = null;
|
|
1034
|
+
return;
|
|
1035
|
+
}
|
|
1036
|
+
const a = e - r.value.start;
|
|
1037
|
+
a < 0 || e >= r.value.end ? h.value = null : h.value = a ?? null;
|
|
1038
|
+
}, { immediate: !0 }), R(() => h.value, (e) => {
|
|
1039
|
+
Fe();
|
|
1040
|
+
}), R(() => r.value, (e) => {
|
|
1041
|
+
O.value = !0, G();
|
|
1042
|
+
}, {
|
|
1043
|
+
deep: !0
|
|
1044
|
+
}), R(() => D.value, (e) => {
|
|
1045
|
+
G();
|
|
1046
|
+
}, { deep: !0 }), R(() => v.value.showDataLabels, (e) => {
|
|
1047
|
+
O.value = !0, G();
|
|
1048
|
+
}), R(() => P.value, (e) => {
|
|
1049
|
+
e && G();
|
|
1050
|
+
}), R(() => v.value.stacked, (e) => {
|
|
1051
|
+
O.value = !0, H.value = !0, Fe();
|
|
1052
|
+
});
|
|
1053
|
+
function Ta() {
|
|
1054
|
+
ne.value = !1, h.value = null, ke.value = "", P.value = null, G();
|
|
1055
|
+
}
|
|
1056
|
+
const Z = je(null), oe = je(null), re = je(null);
|
|
1057
|
+
$l(() => {
|
|
1058
|
+
tl.value = !0, Ll();
|
|
1059
|
+
});
|
|
1060
|
+
function Ll() {
|
|
1061
|
+
if (Ka(g.dataset) && ta.value && Qa({ componentName: "VueUiXyCanvas", type: "dataset" }), be(() => {
|
|
1062
|
+
w.value && !c.value && (c.value = w.value.getContext("2d", { willReadFrequently: !0 })), c.value && X.value && (O.value = !0, H.value = !0, Se());
|
|
1063
|
+
}), l.value.responsive) {
|
|
1064
|
+
const e = st(() => {
|
|
1065
|
+
const { width: a, height: t } = ut({
|
|
1066
|
+
chart: _.value,
|
|
1067
|
+
title: l.value.style.chart.title.text ? el.value : null,
|
|
1068
|
+
legend: l.value.style.chart.legend.show ? ll.value : null,
|
|
1069
|
+
slicer: l.value.style.chart.zoom.show && E.value > 6 ? q.value?.$el : null,
|
|
1070
|
+
source: al.value
|
|
1071
|
+
});
|
|
1072
|
+
requestAnimationFrame(() => {
|
|
1073
|
+
ul.value = `${a} / ${t}`;
|
|
1074
|
+
});
|
|
1075
|
+
});
|
|
1076
|
+
Z.value && (oe.value && Z.value.unobserve(oe.value), Z.value.disconnect()), Z.value = new ResizeObserver(e), oe.value = _.value.parentNode, Z.value.observe(oe.value);
|
|
1077
|
+
}
|
|
1078
|
+
re.value && re.value.disconnect(), re.value = new ResizeObserver((e) => {
|
|
1079
|
+
for (const a of e)
|
|
1080
|
+
a.contentBoxSize && ae.value && (O.value = !0, Fe());
|
|
1081
|
+
}), re.value.observe(ae.value), he();
|
|
1082
|
+
}
|
|
1083
|
+
Tl(() => {
|
|
1084
|
+
re.value && re.value.disconnect(), Z.value && (oe.value && Z.value.unobserve(oe.value), Z.value.disconnect());
|
|
1085
|
+
});
|
|
1086
|
+
function De(e) {
|
|
1087
|
+
Ne("selectLegend", y.value.find((a) => a.absoluteIndex === e)), F.value.includes(e) ? F.value = F.value.filter((a) => a !== e) : F.value.push(e), O.value = !0, Fe();
|
|
1088
|
+
}
|
|
1089
|
+
function kl(e) {
|
|
1090
|
+
if (!T.value.length)
|
|
1091
|
+
return l.value.debug && console.warn("VueUiXyCanvas - There are no series to show."), null;
|
|
1092
|
+
const a = T.value.find((t) => t.name === e);
|
|
1093
|
+
return a || (l.value.debug && console.warn(`VueUiXyCanvas - Series name not found "${e}"`), null);
|
|
1094
|
+
}
|
|
1095
|
+
function Ia(e) {
|
|
1096
|
+
const a = kl(e);
|
|
1097
|
+
a !== null && F.value.includes(a.absoluteIndex) && De(a.absoluteIndex);
|
|
1098
|
+
}
|
|
1099
|
+
function Ea(e) {
|
|
1100
|
+
const a = kl(e);
|
|
1101
|
+
a !== null && (F.value.includes(a.absoluteIndex) || De(a.absoluteIndex));
|
|
1102
|
+
}
|
|
1103
|
+
const Al = p(() => T.value.map((e, a) => ({
|
|
1104
|
+
...e,
|
|
1105
|
+
name: e.name,
|
|
1106
|
+
color: Ol(e.color) || hl.value[a] || le[a] || le[a % le.length],
|
|
1107
|
+
shape: e.shape || "circle",
|
|
1108
|
+
prefix: e.prefix || "",
|
|
1109
|
+
suffix: e.suffix || "",
|
|
1110
|
+
rounding: e.rounding || 0
|
|
1111
|
+
})).map((e) => ({
|
|
1112
|
+
...e,
|
|
1113
|
+
opacity: F.value.includes(e.absoluteIndex) ? 0.5 : 1,
|
|
1114
|
+
segregate: () => De(e.absoluteIndex),
|
|
1115
|
+
isSegregated: F.value.includes(e.absoluteIndex)
|
|
1116
|
+
}))), Ra = p(() => ({
|
|
1117
|
+
cy: "donut-div-legend",
|
|
1118
|
+
backgroundColor: l.value.style.chart.legend.backgroundColor,
|
|
1119
|
+
color: l.value.style.chart.legend.color,
|
|
1120
|
+
fontSize: l.value.style.chart.legend.fontSize,
|
|
1121
|
+
paddingBottom: 12,
|
|
1122
|
+
fontWeight: l.value.style.chart.legend.bold ? "bold" : ""
|
|
1123
|
+
})), Me = p(() => {
|
|
1124
|
+
const e = [""].concat(y.value.map((u) => u.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>');
|
|
1125
|
+
let a = [];
|
|
1126
|
+
for (let u = 0; u < E.value; u += 1) {
|
|
1127
|
+
const i = y.value.map((n) => n.series[u] ?? 0).reduce((n, f) => n + f, 0);
|
|
1128
|
+
a.push([l.value.style.chart.grid.x.timeLabels.values.slice(r.value.start, r.value.end)[u] ? B.value.slice(r.value.start, r.value.end)[u].text : u + 1].concat(y.value.map((n) => (n.series[u] ?? 0).toFixed(l.value.table.rounding))).concat((i ?? 0).toFixed(l.value.table.rounding)));
|
|
1129
|
+
}
|
|
1130
|
+
const t = {
|
|
1131
|
+
th: {
|
|
1132
|
+
backgroundColor: l.value.table.th.backgroundColor,
|
|
1133
|
+
color: l.value.table.th.color,
|
|
1134
|
+
outline: l.value.table.th.outline
|
|
1135
|
+
},
|
|
1136
|
+
td: {
|
|
1137
|
+
backgroundColor: l.value.table.td.backgroundColor,
|
|
1138
|
+
color: l.value.table.td.color,
|
|
1139
|
+
outline: l.value.table.td.outline
|
|
1140
|
+
},
|
|
1141
|
+
breakpoint: l.value.table.responsiveBreakpoint
|
|
1142
|
+
}, s = [l.value.table.columnNames.period].concat(y.value.map((u) => u.name)).concat(l.value.table.columnNames.total);
|
|
1143
|
+
return { head: e, body: a.slice(0, r.value.end - r.value.start), config: t, colNames: s };
|
|
1144
|
+
}), wl = p(() => {
|
|
1145
|
+
if (y.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
|
|
1146
|
+
const e = y.value.map((t) => ({
|
|
1147
|
+
label: t.name,
|
|
1148
|
+
color: t.color,
|
|
1149
|
+
type: t.type
|
|
1150
|
+
})), a = [];
|
|
1151
|
+
for (let t = r.value.start; t < r.value.end; t += 1) {
|
|
1152
|
+
const s = [l.value.style.chart.grid.x.timeLabels.values[t] ? B.value[t].text : t + 1];
|
|
1153
|
+
y.value.forEach((u) => {
|
|
1154
|
+
s.push(Number((u.series[t] || 0).toFixed(l.value.table.rounding)));
|
|
1155
|
+
}), a.push(s);
|
|
1156
|
+
}
|
|
1157
|
+
return { head: e, body: a };
|
|
1158
|
+
});
|
|
1159
|
+
function Ve(e = null) {
|
|
1160
|
+
const a = [[l.value.style.chart.title.text], [l.value.style.chart.title.subtitle.text], [""]], t = ["", ...wl.value.head.map((n) => n.label)], s = wl.value.body, u = a.concat([t]).concat(s), i = lt(u);
|
|
1161
|
+
e ? e(i) : at({ csvContent: i, title: l.value.style.chart.title.text || "vue-ui-xy-canvas" });
|
|
1162
|
+
}
|
|
1163
|
+
function Oa() {
|
|
1164
|
+
return y.value;
|
|
1165
|
+
}
|
|
1166
|
+
function zl() {
|
|
1167
|
+
v.value.showTable = !v.value.showTable;
|
|
1168
|
+
}
|
|
1169
|
+
function Sl() {
|
|
1170
|
+
v.value.showDataLabels = !v.value.showDataLabels;
|
|
1171
|
+
}
|
|
1172
|
+
function Fl() {
|
|
1173
|
+
v.value.stacked = !v.value.stacked;
|
|
1174
|
+
}
|
|
1175
|
+
function Dl() {
|
|
1176
|
+
v.value.showTooltip = !v.value.showTooltip;
|
|
1177
|
+
}
|
|
1178
|
+
const $e = d(!1);
|
|
1179
|
+
function Ye() {
|
|
1180
|
+
$e.value = !$e.value;
|
|
1181
|
+
}
|
|
1182
|
+
async function Pa({ scale: e = 2 } = {}) {
|
|
1183
|
+
if (!_.value) return;
|
|
1184
|
+
const { width: a, height: t } = _.value.getBoundingClientRect(), s = a / t, { imageUri: u, base64: i } = await pt({ domElement: _.value, base64: !0, img: !0, scale: e });
|
|
1185
|
+
return {
|
|
1186
|
+
imageUri: u,
|
|
1187
|
+
base64: i,
|
|
1188
|
+
title: l.value.style.chart.title.text,
|
|
1189
|
+
width: a,
|
|
1190
|
+
height: t,
|
|
1191
|
+
aspectRatio: s
|
|
1192
|
+
};
|
|
1193
|
+
}
|
|
1194
|
+
const ye = p(() => {
|
|
1195
|
+
const e = l.value.table.useDialog && !l.value.table.show, a = v.value.showTable;
|
|
1196
|
+
return {
|
|
1197
|
+
component: e ? Kl : Lt,
|
|
1198
|
+
title: `${l.value.style.chart.title.text}${l.value.style.chart.title.subtitle.text ? `: ${l.value.style.chart.title.subtitle.text}` : ""}`,
|
|
1199
|
+
props: e ? {
|
|
1200
|
+
backgroundColor: l.value.table.th.backgroundColor,
|
|
1201
|
+
color: l.value.table.th.color,
|
|
1202
|
+
headerColor: l.value.table.th.color,
|
|
1203
|
+
headerBg: l.value.table.th.backgroundColor,
|
|
1204
|
+
isFullscreen: ie.value,
|
|
1205
|
+
fullscreenParent: _.value,
|
|
1206
|
+
forcedWidth: Math.min(800, window.innerWidth * 0.8)
|
|
1207
|
+
} : {
|
|
1208
|
+
hideDetails: !0,
|
|
1209
|
+
config: {
|
|
1210
|
+
open: a,
|
|
1211
|
+
maxHeight: 1e4,
|
|
1212
|
+
body: {
|
|
1213
|
+
backgroundColor: l.value.style.chart.backgroundColor,
|
|
1214
|
+
color: l.value.style.chart.color
|
|
1215
|
+
},
|
|
1216
|
+
head: {
|
|
1217
|
+
backgroundColor: l.value.style.chart.backgroundColor,
|
|
1218
|
+
color: l.value.style.chart.color
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
};
|
|
1223
|
+
});
|
|
1224
|
+
R(() => v.value.showTable, (e) => {
|
|
1225
|
+
l.value.table.show || (e && l.value.table.useDialog && ce.value ? ce.value.open() : "close" in ce.value && ce.value.close());
|
|
1226
|
+
});
|
|
1227
|
+
function Ml() {
|
|
1228
|
+
v.value.showTable = !1, Be.value && Be.value.setTableIconState(!1);
|
|
1229
|
+
}
|
|
1230
|
+
return Yl({
|
|
1231
|
+
getData: Oa,
|
|
1232
|
+
getImage: Pa,
|
|
1233
|
+
generateCsv: Ve,
|
|
1234
|
+
generatePdf: cl,
|
|
1235
|
+
generateImage: vl,
|
|
1236
|
+
hideSeries: Ea,
|
|
1237
|
+
showSeries: Ia,
|
|
1238
|
+
toggleTable: zl,
|
|
1239
|
+
toggleLabels: Sl,
|
|
1240
|
+
toggleStack: Fl,
|
|
1241
|
+
toggleTooltip: Dl,
|
|
1242
|
+
toggleAnnotator: Ye,
|
|
1243
|
+
toggleFullscreen: dl
|
|
1244
|
+
}), (e, a) => (I(), Te("div", {
|
|
1245
|
+
style: xe(`width:100%; position:relative; ${l.value.responsive ? "height: 100%" : ""}; background:${l.value.style.chart.backgroundColor};`),
|
|
1246
|
+
ref_key: "xy",
|
|
1247
|
+
ref: _,
|
|
1248
|
+
id: `xy_canvas_${K.value}`,
|
|
1249
|
+
class: Ha(`vue-data-ui-component vue-ui-xy-canvas ${ie.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
1250
|
+
onMouseenter: oa,
|
|
1251
|
+
onMouseleave: ra
|
|
1252
|
+
}, [
|
|
1253
|
+
l.value.style.chart.title.text ? (I(), Te("div", {
|
|
1254
|
+
key: 0,
|
|
1255
|
+
ref_key: "chartTitle",
|
|
1256
|
+
ref: el,
|
|
1257
|
+
style: xe(`width:100%;background:${l.value.style.chart.backgroundColor};`)
|
|
1258
|
+
}, [
|
|
1259
|
+
(I(), V(xt, {
|
|
1260
|
+
key: `title_${Re.value}`,
|
|
1261
|
+
config: {
|
|
1262
|
+
title: {
|
|
1263
|
+
cy: "xy-canvas-title",
|
|
1264
|
+
...l.value.style.chart.title
|
|
1265
|
+
},
|
|
1266
|
+
subtitle: {
|
|
1267
|
+
cy: "xy-canvas-subtitle",
|
|
1268
|
+
...l.value.style.chart.title.subtitle
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
}, null, 8, ["config"]))
|
|
1272
|
+
], 4)) : W("", !0),
|
|
1273
|
+
J("div", {
|
|
1274
|
+
id: `legend-top-${K.value}`
|
|
1275
|
+
}, null, 8, zt),
|
|
1276
|
+
l.value.userOptions.show && X.value && (C(sl) || C(Xe)) ? (I(), V(C(Zl), {
|
|
1277
|
+
ref_key: "userOptionsRef",
|
|
1278
|
+
ref: Be,
|
|
1279
|
+
key: `user_option_${Qe.value}`,
|
|
1280
|
+
backgroundColor: l.value.style.chart.backgroundColor,
|
|
1281
|
+
color: l.value.style.chart.color,
|
|
1282
|
+
isPrinting: C(nl),
|
|
1283
|
+
isImaging: C(il),
|
|
1284
|
+
uid: K.value,
|
|
1285
|
+
hasTooltip: l.value.userOptions.buttons.tooltip && l.value.style.chart.tooltip.show,
|
|
1286
|
+
hasPdf: l.value.userOptions.buttons.pdf,
|
|
1287
|
+
hasImg: l.value.userOptions.buttons.img,
|
|
1288
|
+
hasXls: l.value.userOptions.buttons.csv,
|
|
1289
|
+
hasLabel: l.value.userOptions.buttons.labels,
|
|
1290
|
+
hasStack: Je.dataset.length > 1 && l.value.userOptions.buttons.stack,
|
|
1291
|
+
hasFullscreen: l.value.userOptions.buttons.fullscreen,
|
|
1292
|
+
hasTable: r.value.end - r.value.start <= 730 && l.value.userOptions.buttons.table,
|
|
1293
|
+
isFullscreen: ie.value,
|
|
1294
|
+
isTooltip: v.value.showTooltip,
|
|
1295
|
+
isStacked: v.value.stacked,
|
|
1296
|
+
titles: { ...l.value.userOptions.buttonTitles },
|
|
1297
|
+
chartElement: _.value,
|
|
1298
|
+
position: l.value.userOptions.position,
|
|
1299
|
+
hasAnnotator: l.value.userOptions.buttons.annotator,
|
|
1300
|
+
isAnnotation: $e.value,
|
|
1301
|
+
callbacks: l.value.userOptions.callbacks,
|
|
1302
|
+
printScale: l.value.userOptions.print.scale,
|
|
1303
|
+
tableDialog: l.value.table.useDialog,
|
|
1304
|
+
onToggleFullscreen: dl,
|
|
1305
|
+
onGeneratePdf: C(cl),
|
|
1306
|
+
onGenerateCsv: Ve,
|
|
1307
|
+
onGenerateImage: C(vl),
|
|
1308
|
+
onToggleTable: zl,
|
|
1309
|
+
onToggleLabels: Sl,
|
|
1310
|
+
onToggleStack: Fl,
|
|
1311
|
+
onToggleTooltip: Dl,
|
|
1312
|
+
onToggleAnnotator: Ye,
|
|
1313
|
+
style: xe({
|
|
1314
|
+
visibility: C(sl) ? C(Xe) ? "visible" : "hidden" : "visible"
|
|
1315
|
+
})
|
|
1316
|
+
}, Il({ _: 2 }, [
|
|
1317
|
+
e.$slots.menuIcon ? {
|
|
1318
|
+
name: "menuIcon",
|
|
1319
|
+
fn: b(({ isOpen: t, color: s }) => [
|
|
1320
|
+
S(e.$slots, "menuIcon", Q(ee({ isOpen: t, color: s })), void 0, !0)
|
|
1321
|
+
]),
|
|
1322
|
+
key: "0"
|
|
1323
|
+
} : void 0,
|
|
1324
|
+
e.$slots.optionTooltip ? {
|
|
1325
|
+
name: "optionTooltip",
|
|
1326
|
+
fn: b(() => [
|
|
1327
|
+
S(e.$slots, "optionTooltip", {}, void 0, !0)
|
|
1328
|
+
]),
|
|
1329
|
+
key: "1"
|
|
1330
|
+
} : void 0,
|
|
1331
|
+
e.$slots.optionPdf ? {
|
|
1332
|
+
name: "optionPdf",
|
|
1333
|
+
fn: b(() => [
|
|
1334
|
+
S(e.$slots, "optionPdf", {}, void 0, !0)
|
|
1335
|
+
]),
|
|
1336
|
+
key: "2"
|
|
1337
|
+
} : void 0,
|
|
1338
|
+
e.$slots.optionCsv ? {
|
|
1339
|
+
name: "optionCsv",
|
|
1340
|
+
fn: b(() => [
|
|
1341
|
+
S(e.$slots, "optionCsv", {}, void 0, !0)
|
|
1342
|
+
]),
|
|
1343
|
+
key: "3"
|
|
1344
|
+
} : void 0,
|
|
1345
|
+
e.$slots.optionImg ? {
|
|
1346
|
+
name: "optionImg",
|
|
1347
|
+
fn: b(() => [
|
|
1348
|
+
S(e.$slots, "optionImg", {}, void 0, !0)
|
|
1349
|
+
]),
|
|
1350
|
+
key: "4"
|
|
1351
|
+
} : void 0,
|
|
1352
|
+
e.$slots.optionTable ? {
|
|
1353
|
+
name: "optionTable",
|
|
1354
|
+
fn: b(() => [
|
|
1355
|
+
S(e.$slots, "optionTable", {}, void 0, !0)
|
|
1356
|
+
]),
|
|
1357
|
+
key: "5"
|
|
1358
|
+
} : void 0,
|
|
1359
|
+
e.$slots.optionLabels ? {
|
|
1360
|
+
name: "optionLabels",
|
|
1361
|
+
fn: b(() => [
|
|
1362
|
+
S(e.$slots, "optionLabels", {}, void 0, !0)
|
|
1363
|
+
]),
|
|
1364
|
+
key: "6"
|
|
1365
|
+
} : void 0,
|
|
1366
|
+
e.$slots.optionStack ? {
|
|
1367
|
+
name: "optionStack",
|
|
1368
|
+
fn: b(() => [
|
|
1369
|
+
S(e.$slots, "optionStack", {}, void 0, !0)
|
|
1370
|
+
]),
|
|
1371
|
+
key: "7"
|
|
1372
|
+
} : void 0,
|
|
1373
|
+
e.$slots.optionFullscreen ? {
|
|
1374
|
+
name: "optionFullscreen",
|
|
1375
|
+
fn: b(({ toggleFullscreen: t, isFullscreen: s }) => [
|
|
1376
|
+
S(e.$slots, "optionFullscreen", Q(ee({ toggleFullscreen: t, isFullscreen: s })), void 0, !0)
|
|
1377
|
+
]),
|
|
1378
|
+
key: "8"
|
|
1379
|
+
} : void 0,
|
|
1380
|
+
e.$slots.optionAnnotator ? {
|
|
1381
|
+
name: "optionAnnotator",
|
|
1382
|
+
fn: b(({ toggleAnnotator: t, isAnnotator: s }) => [
|
|
1383
|
+
S(e.$slots, "optionAnnotator", Q(ee({ toggleAnnotator: t, isAnnotator: s })), void 0, !0)
|
|
1384
|
+
]),
|
|
1385
|
+
key: "9"
|
|
1386
|
+
} : void 0
|
|
1387
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasLabel", "hasStack", "hasFullscreen", "hasTable", "isFullscreen", "isTooltip", "isStacked", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : W("", !0),
|
|
1388
|
+
J("div", {
|
|
1389
|
+
class: "vue-ui-xy-canvas",
|
|
1390
|
+
style: xe(`position: relative; aspect-ratio: ${ul.value}`),
|
|
1391
|
+
ref_key: "container",
|
|
1392
|
+
ref: ae
|
|
1393
|
+
}, [
|
|
1394
|
+
J("canvas", {
|
|
1395
|
+
ref_key: "canvas",
|
|
1396
|
+
ref: w,
|
|
1397
|
+
style: { width: "100%", height: "100%" },
|
|
1398
|
+
onMousemove: a[0] || (a[0] = (t) => Ma(t)),
|
|
1399
|
+
onMouseleave: Ta
|
|
1400
|
+
}, null, 544),
|
|
1401
|
+
C(_e) ? (I(), V(ct, { key: 0 })) : W("", !0),
|
|
1402
|
+
El(C(ql), {
|
|
1403
|
+
show: v.value.showTooltip && ne.value,
|
|
1404
|
+
backgroundColor: l.value.style.chart.tooltip.backgroundColor,
|
|
1405
|
+
color: l.value.style.chart.tooltip.color,
|
|
1406
|
+
fontSize: l.value.style.chart.tooltip.fontSize,
|
|
1407
|
+
borderRadius: l.value.style.chart.tooltip.borderRadius,
|
|
1408
|
+
borderColor: l.value.style.chart.tooltip.borderColor,
|
|
1409
|
+
borderWidth: l.value.style.chart.tooltip.borderWidth,
|
|
1410
|
+
position: l.value.style.chart.tooltip.position,
|
|
1411
|
+
offsetY: l.value.style.chart.tooltip.offsetY,
|
|
1412
|
+
parent: C(w),
|
|
1413
|
+
content: ke.value,
|
|
1414
|
+
isFullscreen: ie.value,
|
|
1415
|
+
backgroundOpacity: l.value.style.chart.tooltip.backgroundOpacity,
|
|
1416
|
+
isCustom: C(Pl)(l.value.style.chart.tooltip.customFormat),
|
|
1417
|
+
smooth: l.value.style.chart.tooltip.smooth,
|
|
1418
|
+
backdropFilter: l.value.style.chart.tooltip.backdropFilter,
|
|
1419
|
+
smoothForce: l.value.style.chart.tooltip.smoothForce,
|
|
1420
|
+
smoothSnapThreshold: l.value.style.chart.tooltip.smoothSnapThreshold
|
|
1421
|
+
}, {
|
|
1422
|
+
"tooltip-before": b(() => [
|
|
1423
|
+
S(e.$slots, "tooltip-before", Q(ee({ ...Ke.value })), void 0, !0)
|
|
1424
|
+
]),
|
|
1425
|
+
"tooltip-after": b(() => [
|
|
1426
|
+
S(e.$slots, "tooltip-after", Q(ee({ ...Ke.value })), void 0, !0)
|
|
1427
|
+
]),
|
|
1428
|
+
_: 3
|
|
1429
|
+
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "position", "offsetY", "parent", "content", "isFullscreen", "backgroundOpacity", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"])
|
|
1430
|
+
], 4),
|
|
1431
|
+
l.value.style.chart.zoom.show && E.value > 6 && X.value && ol.value && !C(_e) ? (I(), V(kt, {
|
|
1432
|
+
key: 2,
|
|
1433
|
+
ref_key: "chartSlicer",
|
|
1434
|
+
ref: q,
|
|
1435
|
+
allMinimaps: ca.value,
|
|
1436
|
+
background: l.value.style.chart.zoom.color,
|
|
1437
|
+
borderColor: l.value.style.chart.backgroundColor,
|
|
1438
|
+
customFormat: l.value.style.chart.zoom.customFormat,
|
|
1439
|
+
cutNullValues: ze.value,
|
|
1440
|
+
enableRangeHandles: l.value.style.chart.zoom.enableRangeHandles,
|
|
1441
|
+
enableSelectionDrag: l.value.style.chart.zoom.enableSelectionDrag,
|
|
1442
|
+
end: r.value.end,
|
|
1443
|
+
focusOnDrag: l.value.style.chart.zoom.focusOnDrag,
|
|
1444
|
+
focusRangeRatio: l.value.style.chart.zoom.focusRangeRatio,
|
|
1445
|
+
fontSize: l.value.style.chart.zoom.fontSize,
|
|
1446
|
+
immediate: !l.value.style.chart.zoom.preview.enable,
|
|
1447
|
+
inputColor: l.value.style.chart.zoom.color,
|
|
1448
|
+
isPreview: da.value,
|
|
1449
|
+
labelLeft: l.value.style.chart.grid.x.timeLabels.values[r.value.start] ? B.value[r.value.start].text : "",
|
|
1450
|
+
labelRight: l.value.style.chart.grid.x.timeLabels.values[r.value.end - 1] ? B.value[r.value.end - 1].text : "",
|
|
1451
|
+
max: E.value,
|
|
1452
|
+
min: 0,
|
|
1453
|
+
minimap: ia.value,
|
|
1454
|
+
minimapCompact: l.value.style.chart.zoom.minimap.compact,
|
|
1455
|
+
minimapFrameColor: l.value.style.chart.zoom.minimap.frameColor,
|
|
1456
|
+
minimapIndicatorColor: l.value.style.chart.zoom.minimap.indicatorColor,
|
|
1457
|
+
minimapLineColor: l.value.style.chart.zoom.minimap.lineColor,
|
|
1458
|
+
minimapMerged: l.value.style.chart.zoom.minimap.merged,
|
|
1459
|
+
minimapSelectedColor: l.value.style.chart.zoom.minimap.selectedColor,
|
|
1460
|
+
minimapSelectedColorOpacity: l.value.style.chart.zoom.minimap.selectedColorOpacity,
|
|
1461
|
+
minimapSelectedIndex: h.value,
|
|
1462
|
+
minimapSelectionRadius: l.value.style.chart.zoom.minimap.selectionRadius,
|
|
1463
|
+
preciseLabels: bl.value.length ? bl.value : B.value,
|
|
1464
|
+
refreshEndPoint: l.value.style.chart.zoom.endIndex !== null ? l.value.style.chart.zoom.endIndex + 1 : E.value,
|
|
1465
|
+
refreshStartPoint: l.value.style.chart.zoom.startIndex !== null ? l.value.style.chart.zoom.startIndex : 0,
|
|
1466
|
+
selectColor: l.value.style.chart.zoom.highlightColor,
|
|
1467
|
+
selectedSeries: T.value,
|
|
1468
|
+
smoothMinimap: l.value.style.chart.zoom.minimap.smooth,
|
|
1469
|
+
start: r.value.start,
|
|
1470
|
+
timeLabels: B.value,
|
|
1471
|
+
usePreciseLabels: l.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !l.value.style.chart.zoom.useDefaultFormat,
|
|
1472
|
+
textColor: l.value.style.chart.color,
|
|
1473
|
+
useResetSlot: l.value.style.chart.zoom.useResetSlot,
|
|
1474
|
+
valueEnd: r.value.end,
|
|
1475
|
+
valueStart: r.value.start,
|
|
1476
|
+
verticalHandles: l.value.style.chart.zoom.minimap.verticalHandles,
|
|
1477
|
+
onFutureEnd: a[1] || (a[1] = (t) => yl("end", t)),
|
|
1478
|
+
onFutureStart: a[2] || (a[2] = (t) => yl("start", t)),
|
|
1479
|
+
onReset: he,
|
|
1480
|
+
onTrapMouse: sa,
|
|
1481
|
+
"onUpdate:end": fa,
|
|
1482
|
+
"onUpdate:start": ha
|
|
1483
|
+
}, {
|
|
1484
|
+
"reset-action": b(({ reset: t }) => [
|
|
1485
|
+
S(e.$slots, "reset-action", Q(ee({ reset: t })), void 0, !0)
|
|
1486
|
+
]),
|
|
1487
|
+
_: 3
|
|
1488
|
+
}, 8, ["allMinimaps", "background", "borderColor", "customFormat", "cutNullValues", "enableRangeHandles", "enableSelectionDrag", "end", "focusOnDrag", "focusRangeRatio", "fontSize", "immediate", "inputColor", "isPreview", "labelLeft", "labelRight", "max", "minimap", "minimapCompact", "minimapFrameColor", "minimapIndicatorColor", "minimapLineColor", "minimapMerged", "minimapSelectedColor", "minimapSelectedColorOpacity", "minimapSelectedIndex", "minimapSelectionRadius", "preciseLabels", "refreshEndPoint", "refreshStartPoint", "selectColor", "selectedSeries", "smoothMinimap", "start", "timeLabels", "usePreciseLabels", "textColor", "useResetSlot", "valueEnd", "valueStart", "verticalHandles"])) : W("", !0),
|
|
1489
|
+
J("div", {
|
|
1490
|
+
id: `legend-bottom-${K.value}`
|
|
1491
|
+
}, null, 8, St),
|
|
1492
|
+
tl.value ? (I(), V(Xa, {
|
|
1493
|
+
key: 3,
|
|
1494
|
+
to: l.value.style.chart.legend.position === "top" ? `#legend-top-${K.value}` : `#legend-bottom-${K.value}`
|
|
1495
|
+
}, [
|
|
1496
|
+
J("div", {
|
|
1497
|
+
ref_key: "chartLegend",
|
|
1498
|
+
ref: ll
|
|
1499
|
+
}, [
|
|
1500
|
+
l.value.style.chart.legend.show && X.value ? (I(), V(bt, {
|
|
1501
|
+
legendSet: Al.value,
|
|
1502
|
+
config: Ra.value,
|
|
1503
|
+
key: `legend_${Pe.value}`,
|
|
1504
|
+
onClickMarker: a[3] || (a[3] = ({ i: t }) => De(t))
|
|
1505
|
+
}, {
|
|
1506
|
+
item: b(({ legend: t, index: s }) => [
|
|
1507
|
+
J("div", {
|
|
1508
|
+
onClick: (u) => t.segregate(),
|
|
1509
|
+
style: xe(`opacity:${F.value.includes(s) ? 0.5 : 1}`)
|
|
1510
|
+
}, qe(t.name), 13, Ft)
|
|
1511
|
+
]),
|
|
1512
|
+
_: 1
|
|
1513
|
+
}, 8, ["legendSet", "config"])) : S(e.$slots, "legend", {
|
|
1514
|
+
key: 1,
|
|
1515
|
+
legend: Al.value
|
|
1516
|
+
}, void 0, !0)
|
|
1517
|
+
], 512)
|
|
1518
|
+
], 8, ["to"])) : W("", !0),
|
|
1519
|
+
e.$slots.watermark ? (I(), Te("div", Dt, [
|
|
1520
|
+
S(e.$slots, "watermark", Q(ee({ isPrinting: C(nl) || C(il) })), void 0, !0)
|
|
1521
|
+
])) : W("", !0),
|
|
1522
|
+
e.$slots.source ? (I(), Te("div", {
|
|
1523
|
+
key: 5,
|
|
1524
|
+
ref_key: "source",
|
|
1525
|
+
ref: al,
|
|
1526
|
+
dir: "auto"
|
|
1527
|
+
}, [
|
|
1528
|
+
S(e.$slots, "source", {}, void 0, !0)
|
|
1529
|
+
], 512)) : W("", !0),
|
|
1530
|
+
X.value && l.value.userOptions.buttons.table ? (I(), V(Ua(ye.value.component), Wa({ key: 6 }, ye.value.props, {
|
|
1531
|
+
ref_key: "tableUnit",
|
|
1532
|
+
ref: ce,
|
|
1533
|
+
onClose: Ml
|
|
1534
|
+
}), Il({
|
|
1535
|
+
content: b(() => [
|
|
1536
|
+
(I(), V(C(Gl), {
|
|
1537
|
+
key: `table_${Oe.value}`,
|
|
1538
|
+
colNames: Me.value.colNames,
|
|
1539
|
+
head: Me.value.head,
|
|
1540
|
+
body: Me.value.body,
|
|
1541
|
+
config: Me.value.config,
|
|
1542
|
+
title: l.value.table.useDialog ? "" : ye.value.title,
|
|
1543
|
+
withCloseButton: !l.value.table.useDialog,
|
|
1544
|
+
onClose: Ml
|
|
1545
|
+
}, {
|
|
1546
|
+
th: b(({ th: t }) => [
|
|
1547
|
+
J("div", { innerHTML: t }, null, 8, Mt)
|
|
1548
|
+
]),
|
|
1549
|
+
td: b(({ td: t }) => [
|
|
1550
|
+
Rl(qe(t), 1)
|
|
1551
|
+
]),
|
|
1552
|
+
_: 1
|
|
1553
|
+
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
|
|
1554
|
+
]),
|
|
1555
|
+
_: 2
|
|
1556
|
+
}, [
|
|
1557
|
+
l.value.table.useDialog ? {
|
|
1558
|
+
name: "title",
|
|
1559
|
+
fn: b(() => [
|
|
1560
|
+
Rl(qe(ye.value.title), 1)
|
|
1561
|
+
]),
|
|
1562
|
+
key: "0"
|
|
1563
|
+
} : void 0,
|
|
1564
|
+
l.value.table.useDialog ? {
|
|
1565
|
+
name: "actions",
|
|
1566
|
+
fn: b(() => [
|
|
1567
|
+
J("button", {
|
|
1568
|
+
tabindex: "0",
|
|
1569
|
+
class: "vue-ui-user-options-button",
|
|
1570
|
+
onClick: a[4] || (a[4] = (t) => Ve(l.value.userOptions.callbacks.csv))
|
|
1571
|
+
}, [
|
|
1572
|
+
El(Ct, {
|
|
1573
|
+
name: "excel",
|
|
1574
|
+
stroke: ye.value.props.color
|
|
1575
|
+
}, null, 8, ["stroke"])
|
|
1576
|
+
])
|
|
1577
|
+
]),
|
|
1578
|
+
key: "1"
|
|
1579
|
+
} : void 0
|
|
1580
|
+
]), 1040)) : W("", !0),
|
|
1581
|
+
l.value.userOptions.buttons.annotator && y.value.length ? (I(), V(C(Jl), {
|
|
1582
|
+
key: 7,
|
|
1583
|
+
parent: _.value,
|
|
1584
|
+
backgroundColor: l.value.style.chart.backgroundColor,
|
|
1585
|
+
color: l.value.style.chart.color,
|
|
1586
|
+
active: $e.value,
|
|
1587
|
+
onClose: Ye
|
|
1588
|
+
}, null, 8, ["parent", "backgroundColor", "color", "active"])) : W("", !0)
|
|
1589
|
+
], 46, wt));
|
|
1590
|
+
}
|
|
1591
|
+
}, Tt = /* @__PURE__ */ At($t, [["__scopeId", "data-v-74a619ec"]]), Jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1592
|
+
__proto__: null,
|
|
1593
|
+
default: Tt
|
|
1594
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1595
|
+
export {
|
|
1596
|
+
Zt as a,
|
|
1597
|
+
Jt as b,
|
|
1598
|
+
Tt as v
|
|
1599
|
+
};
|