vue-data-ui 3.15.12 → 3.16.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 +132 -59
- package/dist/A11yDataTable-KcVAX2cP.js +54 -0
- package/dist/{Arrow-DlPyR6HQ.js → Arrow-Bn-9n3bm.js} +1 -1
- package/dist/{BaseDraggableDialog-DSpKTn3R.js → BaseDraggableDialog-CIb-iD9g.js} +2 -2
- package/dist/{BaseIcon-CNx8Tzl5.js → BaseIcon-Cb3zzG6s.js} +1 -1
- package/dist/{BaseLegendToggle-Y61xahI4.js → BaseLegendToggle-BQVIawmA.js} +1 -1
- package/dist/{BaseZoomControls-CoFievy9.js → BaseZoomControls-DievbOeJ.js} +2 -2
- package/dist/ColorPicker-B0mV4xzu.js +255 -0
- package/dist/{DataTable-Bo1pmAqG.js → DataTable-DT2kIdQ6.js} +2 -2
- package/dist/Legend-CS7Xo5LK.js +101 -0
- package/dist/{NonSvgPenAndPaper-CGk_xThe.js → NonSvgPenAndPaper-VyJFyJ6X.js} +3 -3
- package/dist/{PackageVersion-DN9d0ME5.js → PackageVersion-DPO-OOVI.js} +1 -1
- package/dist/{PenAndPaper-DWV1FMIi.js → PenAndPaper-Ct3qJ4lA.js} +109 -101
- package/dist/{Shape-CSyWYgXc.js → Shape-BKRUOeKk.js} +1 -1
- package/dist/{Slicer-DZJA9IG-.js → Slicer-DUycDH_N.js} +2 -2
- package/dist/{SlicerPreview-I2J0UUF_.js → SlicerPreview-DTjwV0iY.js} +2 -2
- package/dist/{SparkTooltip-BiseJed3.js → SparkTooltip-BorBpltj.js} +1 -1
- package/dist/{Title-BfyrP-jp.js → Title-BeMKE1cj.js} +1 -1
- package/dist/{Tooltip-DL3QgjZf.js → Tooltip-Bf-kM3_A.js} +86 -68
- package/dist/{UserOptions-CrLqEimB.js → UserOptions-rW2fRf3V.js} +228 -222
- package/dist/components/arrow.js +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.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 +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.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 +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- 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 +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- 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 +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{dom-to-png-BAqzNjb1.js → dom-to-png-CtxhhdWb.js} +1 -1
- package/dist/{exposedLib-H4lmBl1t.js → exposedLib-DlqmhBx3.js} +1 -1
- package/dist/{img-BYYzY_QU.js → img-LXxMLmCg.js} +1 -1
- package/dist/{labelUtils-CTXUc3V9.js → labelUtils-CqTHa20R.js} +1 -1
- package/dist/{lib-GwPnJSrY.js → lib-DBptbyyI.js} +106 -84
- package/dist/{pdf-z-YiJeJQ.js → pdf-B4tTdfvl.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +59 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-80fzdfxt.js → useAutoSizeLabelsInsideViewbox-DX7LdvFX.js} +1 -1
- package/dist/{useConfig-CIgyKZ6R.js → useConfig-DO94Aj5s.js} +953 -700
- package/dist/{useNestedProp-BBT0mbHh.js → useNestedProp-Bf5XFbs8.js} +1 -1
- package/dist/{useObjectBindings-BlXBVtRa.js → useObjectBindings-DQ8g8Jwi.js} +1 -1
- package/dist/usePrefersMotion-CUKm8_t8.js +15 -0
- package/dist/{usePrinter-DiK5R6k-.js → usePrinter-CEpYU3r5.js} +2 -2
- package/dist/utils.js +3 -3
- package/dist/{vue-data-ui-C2kPofmi.js → vue-data-ui-DXGkXRnC.js} +68 -68
- package/dist/vue-data-ui.js +72 -72
- package/dist/vue-ui-3d-bar-BaFpQnd5.js +1597 -0
- package/dist/{vue-ui-accordion-BGHTqIBt.js → vue-ui-accordion-nvggWcGN.js} +4 -4
- package/dist/vue-ui-age-pyramid-CRM498Pc.js +1069 -0
- package/dist/{vue-ui-annotator-B1GWVtPp.js → vue-ui-annotator-CkPi9moo.js} +7 -7
- package/dist/{vue-ui-bullet-DPoGGtaG.js → vue-ui-bullet-BBiwof3c.js} +158 -150
- package/dist/vue-ui-bump-Brxpu4xV.js +1147 -0
- package/dist/vue-ui-candlestick-DAnZv77-.js +1587 -0
- package/dist/{vue-ui-carousel-table-CmiHTJ8E.js → vue-ui-carousel-table-BHRZBYY0.js} +168 -160
- package/dist/vue-ui-chestnut-CbrYnRgm.js +1812 -0
- package/dist/vue-ui-chord-CaX_IUVs.js +1326 -0
- package/dist/vue-ui-circle-pack-CR3h53sc.js +988 -0
- package/dist/{vue-ui-cursor-B4mHR7QC.js → vue-ui-cursor-Cjfazw7Z.js} +4 -4
- package/dist/vue-ui-dag-B9vH3c66.js +3047 -0
- package/dist/{vue-ui-dashboard-Bo5FX73U.js → vue-ui-dashboard-DWll05qs.js} +70 -70
- package/dist/{vue-ui-digits-mpo2IcM5.js → vue-ui-digits-DcM67rMx.js} +76 -66
- package/dist/vue-ui-donut-Be5G38P5.js +2229 -0
- package/dist/vue-ui-donut-evolution-BLSesj3c.js +1358 -0
- package/dist/vue-ui-dumbbell-DIMiCY4r.js +1380 -0
- package/dist/vue-ui-flow-zvZylhgr.js +1202 -0
- package/dist/{vue-ui-funnel-BRkaEkBb.js → vue-ui-funnel-CSri-oWm.js} +7 -7
- package/dist/vue-ui-galaxy-CGykxsAI.js +1012 -0
- package/dist/{vue-ui-gauge-J2VYHsQe.js → vue-ui-gauge-D1MNB9Jq.js} +8 -8
- package/dist/vue-ui-geo-DdJDGhG2.js +1437 -0
- package/dist/{vue-ui-gizmo-DEec3-v9.js → vue-ui-gizmo-BZYRHGFm.js} +77 -68
- package/dist/vue-ui-heatmap-CryOx6XK.js +1500 -0
- package/dist/vue-ui-history-plot-C85iw9Kl.js +1449 -0
- package/dist/vue-ui-horizontal-bar-BoBZOybC.js +1637 -0
- package/dist/vue-ui-kpi-DHrolXw6.js +109 -0
- package/dist/{vue-ui-mini-loader-CoOHvZUk.js → vue-ui-mini-loader-Bc3fEQ9j.js} +3 -3
- package/dist/{vue-ui-molecule-Chq1qWDK.js → vue-ui-molecule-DJ_BQ4DK.js} +6 -6
- package/dist/vue-ui-mood-radar-CBE02TpQ.js +1086 -0
- package/dist/vue-ui-nested-donuts-YTFtb4CL.js +1595 -0
- package/dist/vue-ui-onion-B9l81-PS.js +1124 -0
- package/dist/vue-ui-parallel-coordinate-plot-C1e_rs8J.js +1252 -0
- package/dist/vue-ui-quadrant-C1qsLCRn.js +1759 -0
- package/dist/vue-ui-quick-chart-DFoz3WiA.js +2216 -0
- package/dist/vue-ui-radar-Cmo3p-UA.js +1139 -0
- package/dist/{vue-ui-rating-zV58MDQh.js → vue-ui-rating-BAHhYt_A.js} +3 -3
- package/dist/vue-ui-relation-circle-BqwznVwf.js +782 -0
- package/dist/vue-ui-ridgeline-CDk9eXJq.js +1473 -0
- package/dist/vue-ui-rings-BRkGoQdL.js +1156 -0
- package/dist/vue-ui-scatter-BxDtWASQ.js +1831 -0
- package/dist/{vue-ui-skeleton-CbqNz9IE.js → vue-ui-skeleton-D6kTb9aO.js} +4 -4
- package/dist/{vue-ui-smiley-BK5EKp9u.js → vue-ui-smiley-CzVaLlpB.js} +3 -3
- package/dist/vue-ui-spark-trend-D8Mf2A1w.js +378 -0
- package/dist/{vue-ui-sparkbar-DUDWvTo-.js → vue-ui-sparkbar-BbYj56c3.js} +86 -84
- package/dist/vue-ui-sparkgauge-DXzOSLRb.js +256 -0
- package/dist/vue-ui-sparkhistogram-DMfSx1iH.js +474 -0
- package/dist/vue-ui-sparkline-D-rQ9PsC.js +1327 -0
- package/dist/vue-ui-sparkstackbar-DK5n8IKP.js +621 -0
- package/dist/vue-ui-stackbar-BHthy6jf.js +2070 -0
- package/dist/vue-ui-stackline-C6-WNpKD.js +2164 -0
- package/dist/vue-ui-strip-plot-CHu-1ilI.js +1183 -0
- package/dist/{vue-ui-table-BHuXI4Eq.js → vue-ui-table-DW9JGsLq.js} +6 -6
- package/dist/{vue-ui-table-heatmap-y88sBfu3.js → vue-ui-table-heatmap-LYqoBit9.js} +6 -6
- package/dist/{vue-ui-table-sparkline-ClpLLKi2.js → vue-ui-table-sparkline-CXK1dFr-.js} +5 -5
- package/dist/{vue-ui-thermometer-sjruUGQx.js → vue-ui-thermometer-BN8tflOz.js} +272 -256
- package/dist/{vue-ui-timer-CgdgMKIc.js → vue-ui-timer-DGT0UBOF.js} +6 -6
- package/dist/{vue-ui-tiremarks-UBDpAIVr.js → vue-ui-tiremarks-BZ-osQqY.js} +204 -191
- package/dist/vue-ui-treemap-98KaVRyd.js +1723 -0
- package/dist/vue-ui-waffle-Cb7oJnIc.js +1321 -0
- package/dist/vue-ui-wheel-sfew1fjw.js +738 -0
- package/dist/vue-ui-word-cloud-vq1t9JHr.js +1548 -0
- package/dist/{vue-ui-world-D-3wgoTn.js → vue-ui-world-CN0f6elD.js} +8 -8
- package/dist/vue-ui-xy-BdzEiImZ.js +3877 -0
- package/dist/vue-ui-xy-canvas-CWQzUQzY.js +1810 -0
- package/package.json +2 -2
- package/dist/ColorPicker-j0ySewhI.js +0 -244
- package/dist/Legend-1LMMsPxL.js +0 -90
- package/dist/vue-ui-3d-bar-BhNgFaJA.js +0 -1484
- package/dist/vue-ui-age-pyramid-CuYRf5v-.js +0 -997
- package/dist/vue-ui-bump-C_fKharc.js +0 -1059
- package/dist/vue-ui-candlestick-BY-_E7eZ.js +0 -1487
- package/dist/vue-ui-chestnut-C-bQYaNI.js +0 -1557
- package/dist/vue-ui-chord-uQYQgyGM.js +0 -1220
- package/dist/vue-ui-circle-pack-CdbDcuDw.js +0 -907
- package/dist/vue-ui-dag-DsHUvjvm.js +0 -2885
- package/dist/vue-ui-donut-CzCgCVsx.js +0 -2139
- package/dist/vue-ui-donut-evolution-C_ck_TOR.js +0 -1297
- package/dist/vue-ui-dumbbell-CVSA90b2.js +0 -1293
- package/dist/vue-ui-flow-CsbSaFnu.js +0 -1075
- package/dist/vue-ui-galaxy-DWKHDciu.js +0 -914
- package/dist/vue-ui-geo-DykhEWVq.js +0 -1331
- package/dist/vue-ui-heatmap-BEDirv8T.js +0 -1334
- package/dist/vue-ui-history-plot-Bs96PebH.js +0 -1292
- package/dist/vue-ui-horizontal-bar-ClQcB9nL.js +0 -1522
- package/dist/vue-ui-kpi-DlUEHKuw.js +0 -101
- package/dist/vue-ui-mood-radar-A2LBLgUi.js +0 -967
- package/dist/vue-ui-nested-donuts-DFX251aT.js +0 -1513
- package/dist/vue-ui-onion-CW0YO9Ro.js +0 -1045
- package/dist/vue-ui-parallel-coordinate-plot-UFg10bHP.js +0 -1134
- package/dist/vue-ui-quadrant-C1pLW2zA.js +0 -1647
- package/dist/vue-ui-quick-chart-FaxttnJY.js +0 -2030
- package/dist/vue-ui-radar-DE70LPBZ.js +0 -1067
- package/dist/vue-ui-relation-circle-iuRXIyRU.js +0 -704
- package/dist/vue-ui-ridgeline-CwvDh5pG.js +0 -1385
- package/dist/vue-ui-rings-80ZUki42.js +0 -1083
- package/dist/vue-ui-scatter-FdAAYJOK.js +0 -1670
- package/dist/vue-ui-spark-trend-C68p8-Xp.js +0 -349
- package/dist/vue-ui-sparkgauge-DdRtHQDe.js +0 -245
- package/dist/vue-ui-sparkhistogram-C9DvzQae.js +0 -396
- package/dist/vue-ui-sparkline-B2RDrdiR.js +0 -1273
- package/dist/vue-ui-sparkstackbar-BsIOHUE5.js +0 -475
- package/dist/vue-ui-stackbar-BZl0kEkb.js +0 -2001
- package/dist/vue-ui-stackline-2VKxwFei.js +0 -2099
- package/dist/vue-ui-strip-plot-B9nBSRyY.js +0 -1080
- package/dist/vue-ui-treemap-BS5EilZf.js +0 -1645
- package/dist/vue-ui-waffle-CbX5K9Q2.js +0 -1211
- package/dist/vue-ui-wheel-BIJ09H5D.js +0 -723
- package/dist/vue-ui-word-cloud-DJmJ-oYT.js +0 -1466
- package/dist/vue-ui-xy-canvas-4auyhlTr.js +0 -1717
- package/dist/vue-ui-xy-f67V1xjd.js +0 -3713
|
@@ -0,0 +1,2070 @@
|
|
|
1
|
+
import { defineAsyncComponent as re, useSlots as no, computed as g, ref as h, shallowRef as Tt, onMounted as io, toRefs as uo, watch as Ie, onBeforeUnmount as je, watchEffect as Re, nextTick as At, openBlock as s, createElementBlock as u, normalizeStyle as q, normalizeClass as ke, createElementVNode as Z, toDisplayString as E, createBlock as ee, createCommentVNode as f, unref as b, withCtx as C, renderSlot as L, normalizeProps as V, guardReactiveProps as B, createSlots as $t, createVNode as Oe, Fragment as w, renderList as S, mergeProps as De, Teleport as co, resolveDynamicComponent as vo, createTextVNode as Pa } from "vue";
|
|
2
|
+
import { u as ho } from "./useConfig-DO94Aj5s.js";
|
|
3
|
+
import { j as Na, t as Fa, m as yo, p as et, n as fo, o as Ia, q as Ra, r as go, s as mo, ar as Ee, E as Oa, D as Da, I as bo, X as po, x as xo, G as de, W as Ea, k as we, l as ne, Z as ko, as as wo, T as Va, a0 as Lo, a1 as Co, U as So, a3 as zo } from "./lib-DBptbyyI.js";
|
|
4
|
+
import { t as Ba, u as Mo } from "./useResponsive-DfdjqQps.js";
|
|
5
|
+
import { u as Ua, a as Ha, b as _o } from "./useTimeLabels-C-A2uZKi.js";
|
|
6
|
+
import { u as To } from "./usePrinter-CEpYU3r5.js";
|
|
7
|
+
import { u as Ao, B as $o } from "./BaseScanner-BhhkKVoj.js";
|
|
8
|
+
import { u as Po } from "./useSvgExport-ByUukOZt.js";
|
|
9
|
+
import { u as Pt } from "./useNestedProp-Bf5XFbs8.js";
|
|
10
|
+
import { u as No } from "./useThemeCheck-D1ZYXUwG.js";
|
|
11
|
+
import { u as Fo } from "./useUserOptionState-BIvW1Kz7.js";
|
|
12
|
+
import { u as Io } from "./useStableElementSize-DCNs0Tx7.js";
|
|
13
|
+
import { u as Ro } from "./useChartAccessibility-9icAAmYg.js";
|
|
14
|
+
import { u as Oo } from "./useTimeLabelCollider-CIsgDrl9.js";
|
|
15
|
+
import Do from "./img-LXxMLmCg.js";
|
|
16
|
+
import Eo from "./Title-BeMKE1cj.js";
|
|
17
|
+
import { _ as Vo } from "./Shape-BKRUOeKk.js";
|
|
18
|
+
import Bo from "./vue_ui_stackbar-CuDC4O4b.js";
|
|
19
|
+
import Uo from "./Legend-CS7Xo5LK.js";
|
|
20
|
+
import { A as Ho } from "./A11yDataTable-KcVAX2cP.js";
|
|
21
|
+
import { S as Wo } from "./SlicerPreview-DTjwV0iY.js";
|
|
22
|
+
import { B as Xo } from "./BaseLegendToggle-BQVIawmA.js";
|
|
23
|
+
import { _ as Yo } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
24
|
+
const qo = ["id"], Go = ["id"], Jo = ["id"], Ko = { style: { position: "relative" } }, Zo = ["xmlns", "aria-describedby", "viewBox"], Qo = ["x", "y", "width", "height"], jo = { key: 1 }, es = ["id"], ts = ["stop-color"], as = ["stop-color"], ls = ["stop-color"], os = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray"], ss = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], rs = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], ns = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], is = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], us = { key: 0 }, cs = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], vs = { key: 0 }, hs = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], ds = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], ys = { key: 0 }, fs = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], gs = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ms = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], bs = ["x", "y", "font-size", "fill", "font-weight"], ps = ["transform", "font-size", "fill", "font-weight"], xs = ["x", "y", "font-size", "fill", "font-weight"], ks = ["x", "y", "font-size", "font-weight", "fill"], ws = ["x", "y", "font-size", "fill", "font-weight"], Ls = ["x", "y", "font-size", "font-weight", "fill"], Cs = ["x1", "x2", "y1", "y2", "stroke"], Ss = ["x", "y", "font-size", "font-weight", "fill"], zs = ["x1", "x2", "y1", "y2", "stroke"], Ms = ["font-size", "font-weight", "fill", "text-anchor", "transform"], _s = { key: 0 }, Ts = { key: 1 }, As = ["text-anchor", "font-size", "font-weight", "fill", "transform", "onClick"], $s = ["text-anchor", "font-size", "fill", "transform", "innerHTML", "onClick"], Ps = { key: 0 }, Ns = { key: 1 }, Fs = ["font-size", "font-weight", "fill", "x", "y", "onClick"], Is = ["font-size", "font-weight", "fill", "x", "y", "onClick", "innerHTML"], Rs = ["x", "y", "width", "height", "onClick", "onMouseenter", "onMouseleave", "fill"], Os = ["x", "y", "width", "height", "onClick", "onMouseenter", "onMouseleave", "fill"], Ds = ["data-start", "data-end"], Es = {
|
|
25
|
+
key: 0,
|
|
26
|
+
style: { position: "absolute", top: "100%", left: "0", width: "100%" },
|
|
27
|
+
"data-dom-to-png-ignore": "",
|
|
28
|
+
"aria-hidden": "true"
|
|
29
|
+
}, Vs = {
|
|
30
|
+
key: 4,
|
|
31
|
+
class: "vue-data-ui-watermark"
|
|
32
|
+
}, Bs = ["x", "y", "height", "width", "fill", "stroke"], Us = ["id"], Hs = ["onClick"], Ws = ["innerHTML"], Xs = {
|
|
33
|
+
__name: "vue-ui-stackbar",
|
|
34
|
+
props: {
|
|
35
|
+
config: {
|
|
36
|
+
type: Object,
|
|
37
|
+
default() {
|
|
38
|
+
return {};
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
dataset: {
|
|
42
|
+
type: Array,
|
|
43
|
+
default() {
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
selectedXIndex: {
|
|
48
|
+
type: Number,
|
|
49
|
+
default: void 0
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
emits: ["selectDatapoint", "selectLegend", "selectTimeLabel", "selectX", "copyAlt"],
|
|
53
|
+
setup(tt, { expose: Wa, emit: Xa }) {
|
|
54
|
+
const Ya = re(() => import("./Tooltip-Bf-kM3_A.js")), qa = re(() => import("./BaseIcon-Cb3zzG6s.js")), Ga = re(() => import("./vue-ui-accordion-nvggWcGN.js")), Ja = re(() => import("./DataTable-DT2kIdQ6.js")), Ka = re(() => import("./PenAndPaper-Ct3qJ4lA.js")), Za = re(() => import("./UserOptions-rW2fRf3V.js")), Qa = re(() => import("./PackageVersion-DPO-OOVI.js")), ja = re(() => import("./BaseDraggableDialog-CIb-iD9g.js")), { vue_ui_stackbar: el } = ho(), { isThemeValid: tl, warnInvalidTheme: al } = No(), ll = no(), F = tt, ae = Xa, Le = g({
|
|
55
|
+
get() {
|
|
56
|
+
return !!F.dataset && F.dataset.length;
|
|
57
|
+
},
|
|
58
|
+
set(t) {
|
|
59
|
+
return t;
|
|
60
|
+
}
|
|
61
|
+
}), Q = h(null), R = h(Na()), ye = h(!1), at = h(null), lt = h(""), A = h([]), Nt = h(0), Ft = h(null), It = h(null), Ce = h(null), Rt = h(null), Se = h(!1), U = h(null), ie = h(!1), Ot = h(0), ol = h(0), sl = h(0), Dt = h(!1), ze = h(null), ot = h(null), Ve = h(!1), Be = h(!1), Ue = h(null), st = h(null), ue = h(null), ce = h(null), rl = h(null), rt = h(null), Et = Tt(null), Vt = h(!1), Bt = h(0), Ut = h(0), G = h(null), Ht = h({ x: 0, y: 0 }), Wt = h("pointer"), Xt = Io({
|
|
62
|
+
elementRef: Et,
|
|
63
|
+
minimumWidth: 2,
|
|
64
|
+
minimumHeight: 2,
|
|
65
|
+
stableFramesRequired: 2,
|
|
66
|
+
once: !1,
|
|
67
|
+
onSizeAccepted: () => {
|
|
68
|
+
qt();
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
function nt() {
|
|
72
|
+
Et.value = Q.value?.parentNode ?? null;
|
|
73
|
+
}
|
|
74
|
+
function Yt() {
|
|
75
|
+
return new Promise((t) => {
|
|
76
|
+
requestAnimationFrame(() => {
|
|
77
|
+
requestAnimationFrame(t);
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
async function qt() {
|
|
82
|
+
const t = ++Ut.value;
|
|
83
|
+
Vt.value = !1, await At(), await Yt(), await Yt(), t === Ut.value && (Bt.value += 1, Vt.value = !0);
|
|
84
|
+
}
|
|
85
|
+
const it = h(null);
|
|
86
|
+
io(() => {
|
|
87
|
+
Dt.value = !0, nt(), Xt.start(), ta();
|
|
88
|
+
});
|
|
89
|
+
const e = h(vt()), X = g(() => e.value.userOptions.useCursorPointer), nl = g(() => Fa({
|
|
90
|
+
defaultConfig: {
|
|
91
|
+
userOptions: { show: !1 },
|
|
92
|
+
useCssAnimation: !1,
|
|
93
|
+
table: { show: !1 },
|
|
94
|
+
tooltip: { show: !1 },
|
|
95
|
+
style: {
|
|
96
|
+
chart: {
|
|
97
|
+
backgroundColor: "#99999930",
|
|
98
|
+
bars: {
|
|
99
|
+
totalValues: { show: !1 },
|
|
100
|
+
dataLabels: { show: !1 }
|
|
101
|
+
},
|
|
102
|
+
grid: {
|
|
103
|
+
frame: {
|
|
104
|
+
stroke: "#6A6A6A"
|
|
105
|
+
},
|
|
106
|
+
scale: {
|
|
107
|
+
scaleMin: 0,
|
|
108
|
+
scaleMax: 40
|
|
109
|
+
},
|
|
110
|
+
x: {
|
|
111
|
+
axisColor: "#6A6A6A",
|
|
112
|
+
linesColor: "#6A6A6A",
|
|
113
|
+
axisName: { show: !1 },
|
|
114
|
+
timeLabels: { show: !1 }
|
|
115
|
+
},
|
|
116
|
+
y: {
|
|
117
|
+
axisColor: "#6A6A6A",
|
|
118
|
+
linesColor: "#6A6A6A",
|
|
119
|
+
axisName: { show: !1 },
|
|
120
|
+
axisLabels: { show: !1 }
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
legend: {
|
|
124
|
+
backgroundColor: "transparent"
|
|
125
|
+
},
|
|
126
|
+
padding: {
|
|
127
|
+
left: 24,
|
|
128
|
+
right: 24,
|
|
129
|
+
bottom: 12
|
|
130
|
+
},
|
|
131
|
+
zoom: {
|
|
132
|
+
show: !1,
|
|
133
|
+
startIndex: null,
|
|
134
|
+
endIndex: null
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
userConfig: e.value.skeletonConfig ?? {}
|
|
140
|
+
})), { loading: fe, FINAL_DATASET: ut, manualLoading: He } = Ao({
|
|
141
|
+
...uo(F),
|
|
142
|
+
FINAL_CONFIG: e,
|
|
143
|
+
prepareConfig: vt,
|
|
144
|
+
callback: () => {
|
|
145
|
+
Promise.resolve().then(async () => {
|
|
146
|
+
await Ke();
|
|
147
|
+
});
|
|
148
|
+
},
|
|
149
|
+
skeletonDataset: F.config?.skeletonDataset ?? [
|
|
150
|
+
{
|
|
151
|
+
name: "",
|
|
152
|
+
series: [2, 3, 5, 8, 13, 21],
|
|
153
|
+
color: "#BABABA"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: "",
|
|
157
|
+
series: [1, 2, 3, 5, 8, 13],
|
|
158
|
+
color: "#CACACA"
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
skeletonConfig: Fa({
|
|
162
|
+
defaultConfig: e.value,
|
|
163
|
+
userConfig: nl.value
|
|
164
|
+
})
|
|
165
|
+
}), { userOptionsVisible: ct, setUserOptionsVisibility: Gt, keepUserOptionState: Jt } = Fo({ config: e.value }), { svgRef: ge } = Ro({ config: e.value.style.chart.title });
|
|
166
|
+
function il() {
|
|
167
|
+
Gt(!0);
|
|
168
|
+
}
|
|
169
|
+
function ul() {
|
|
170
|
+
Gt(!1), ae("selectX", { seriesIndex: null, datapoint: null }), U.value = null, G.value = null, ye.value = !1;
|
|
171
|
+
}
|
|
172
|
+
function vt() {
|
|
173
|
+
const t = Pt({
|
|
174
|
+
userConfig: F.config,
|
|
175
|
+
defaultConfig: el
|
|
176
|
+
});
|
|
177
|
+
let l = {};
|
|
178
|
+
const a = t.theme;
|
|
179
|
+
if (a)
|
|
180
|
+
if (!tl.value(t))
|
|
181
|
+
al(t), l = t;
|
|
182
|
+
else {
|
|
183
|
+
const o = Pt({
|
|
184
|
+
userConfig: Bo[a] || F.config,
|
|
185
|
+
defaultConfig: t
|
|
186
|
+
});
|
|
187
|
+
l = {
|
|
188
|
+
...Pt({
|
|
189
|
+
userConfig: F.config,
|
|
190
|
+
defaultConfig: o
|
|
191
|
+
}),
|
|
192
|
+
customPalette: t.customPalette.length ? t.customPalette : yo[a] || et
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
else
|
|
196
|
+
l = t;
|
|
197
|
+
return l;
|
|
198
|
+
}
|
|
199
|
+
const Kt = g(() => e.value.style.chart.bars.dataLabels.hideUnderValue != null), Zt = g(() => e.value.style.chart.bars.dataLabels.hideUnderPercentage != null);
|
|
200
|
+
Ie(() => F.config, (t) => {
|
|
201
|
+
fe.value || (e.value = vt()), ct.value = !e.value.userOptions.showOnChartHover, ta(), Ot.value += 1, ol.value += 1, sl.value += 1, $.value.dataLabels.show = e.value.style.chart.bars.dataLabels.show, $.value.showTable = e.value.table.show, $.value.showTooltip = e.value.style.chart.tooltip.show, nt(), Ye();
|
|
202
|
+
}, { deep: !0 }), Ie(() => F.dataset, (t) => {
|
|
203
|
+
Array.isArray(t) && t.length > 0 && (He.value = !1), nt(), sa();
|
|
204
|
+
}, { deep: !0 });
|
|
205
|
+
const $ = h({
|
|
206
|
+
dataLabels: {
|
|
207
|
+
show: e.value.style.chart.bars.dataLabels.show
|
|
208
|
+
},
|
|
209
|
+
showTable: e.value.table.show,
|
|
210
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
211
|
+
});
|
|
212
|
+
Ie(e, () => {
|
|
213
|
+
$.value = {
|
|
214
|
+
dataLabels: {
|
|
215
|
+
show: e.value.style.chart.bars.dataLabels.show
|
|
216
|
+
},
|
|
217
|
+
showTable: e.value.table.show,
|
|
218
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
219
|
+
};
|
|
220
|
+
}, { immediate: !0 });
|
|
221
|
+
const { isPrinting: ht, isImaging: dt, generatePdf: Qt, generateImage: jt } = To({
|
|
222
|
+
elementId: `stackbar_${R.value}`,
|
|
223
|
+
fileName: e.value.style.chart.title.text || "vue-ui-stackbar",
|
|
224
|
+
options: e.value.userOptions.print
|
|
225
|
+
}), le = h({
|
|
226
|
+
width: e.value.style.chart.width,
|
|
227
|
+
height: e.value.style.chart.height,
|
|
228
|
+
paddingRatio: {
|
|
229
|
+
top: e.value.style.chart.padding.top / e.value.style.chart.height,
|
|
230
|
+
right: e.value.style.chart.padding.right / e.value.style.chart.width,
|
|
231
|
+
bottom: e.value.style.chart.padding.bottom / e.value.style.chart.height,
|
|
232
|
+
left: e.value.style.chart.padding.left / e.value.style.chart.width
|
|
233
|
+
}
|
|
234
|
+
}), cl = g(() => fo(e.value.customPalette)), oe = Tt(null), me = Tt(null), ea = h(null), yt = g(() => !!e.value.debug);
|
|
235
|
+
function ta() {
|
|
236
|
+
if (Ia(F.dataset) ? (Ra({
|
|
237
|
+
componentName: "VueUiStackbar",
|
|
238
|
+
type: "dataset",
|
|
239
|
+
debug: yt.value
|
|
240
|
+
}), He.value = !0) : F.dataset.forEach((t, l) => {
|
|
241
|
+
go({
|
|
242
|
+
datasetObject: t,
|
|
243
|
+
requiredAttributes: ["name", "series"]
|
|
244
|
+
}).forEach((a) => {
|
|
245
|
+
Le.value = !1, Ra({
|
|
246
|
+
componentName: "VueUiStackbar",
|
|
247
|
+
type: "datasetSerieAttribute",
|
|
248
|
+
property: a,
|
|
249
|
+
index: l,
|
|
250
|
+
debug: yt.value
|
|
251
|
+
}), He.value = !0;
|
|
252
|
+
});
|
|
253
|
+
}), Ia(F.dataset) || (He.value = e.value.loading), setTimeout(() => {
|
|
254
|
+
ie.value = !0;
|
|
255
|
+
}, 10), e.value.responsive) {
|
|
256
|
+
const t = Ba(() => {
|
|
257
|
+
ie.value = !1;
|
|
258
|
+
const { width: l, height: a } = Mo({
|
|
259
|
+
chart: Q.value,
|
|
260
|
+
title: e.value.style.chart.title.text ? Ft.value : null,
|
|
261
|
+
legend: e.value.style.chart.legend.show ? It.value : null,
|
|
262
|
+
slicer: e.value.style.chart.zoom.show && I.value > 6 ? Ce.value.$el : null,
|
|
263
|
+
source: Rt.value
|
|
264
|
+
});
|
|
265
|
+
requestAnimationFrame(() => {
|
|
266
|
+
le.value.width = l, le.value.height = a - 12, clearTimeout(ea.value), ea.value = setTimeout(() => {
|
|
267
|
+
ie.value = !0;
|
|
268
|
+
}, 10);
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
oe.value && (me.value && oe.value.unobserve(me.value), oe.value.disconnect()), oe.value = new ResizeObserver(t), me.value = Q.value.parentNode, oe.value.observe(me.value);
|
|
272
|
+
}
|
|
273
|
+
qt(), Ke();
|
|
274
|
+
}
|
|
275
|
+
je(() => {
|
|
276
|
+
Xt.stop(), oe.value && (me.value && oe.value.unobserve(me.value), oe.value.disconnect());
|
|
277
|
+
});
|
|
278
|
+
function vl() {
|
|
279
|
+
let t = 0;
|
|
280
|
+
e.value.orientation === "vertical" && ue.value && (t = Array.from(ue.value.querySelectorAll("text")).reduce((o, c) => {
|
|
281
|
+
const r = c.getComputedTextLength();
|
|
282
|
+
return r > o ? r : o;
|
|
283
|
+
}, 0)), e.value.orientation === "horizontal" && ce.value && (t = Array.from(ce.value.querySelectorAll("text")).reduce((o, c) => {
|
|
284
|
+
const r = c.getComputedTextLength();
|
|
285
|
+
return r > o ? r : o;
|
|
286
|
+
}, 0));
|
|
287
|
+
const l = st.value ? st.value.getBoundingClientRect().width : 0;
|
|
288
|
+
return t + l + (l ? 24 : 0);
|
|
289
|
+
}
|
|
290
|
+
const hl = h(0), We = h(0), dl = Ba((t) => {
|
|
291
|
+
We.value = t + e.value.style.chart.bars.totalValues.fontSize;
|
|
292
|
+
}, 100);
|
|
293
|
+
function yl() {
|
|
294
|
+
if (e.value.orientation !== "horizontal") return 0;
|
|
295
|
+
const t = rt.value;
|
|
296
|
+
if (!t) return 0;
|
|
297
|
+
const l = Array.from(t.querySelectorAll("text"));
|
|
298
|
+
if (!l.length) return 0;
|
|
299
|
+
let a = -1 / 0;
|
|
300
|
+
for (const c of l)
|
|
301
|
+
try {
|
|
302
|
+
const r = c.getBBox(), d = r.x + r.width;
|
|
303
|
+
d > a && (a = d);
|
|
304
|
+
} catch {
|
|
305
|
+
}
|
|
306
|
+
return Math.max(0, a - (n.value?.right ?? 0));
|
|
307
|
+
}
|
|
308
|
+
Re((t) => {
|
|
309
|
+
if (e.value.orientation !== "horizontal") return;
|
|
310
|
+
const l = rt.value;
|
|
311
|
+
if (!l) return;
|
|
312
|
+
const a = () => {
|
|
313
|
+
const r = yl();
|
|
314
|
+
dl(r);
|
|
315
|
+
};
|
|
316
|
+
a();
|
|
317
|
+
const o = new ResizeObserver(a);
|
|
318
|
+
o.observe(l);
|
|
319
|
+
const c = new MutationObserver(a);
|
|
320
|
+
c.observe(l, { childList: !0, subtree: !0, characterData: !0 }), t(() => {
|
|
321
|
+
o.disconnect(), c.disconnect();
|
|
322
|
+
});
|
|
323
|
+
}), je(() => {
|
|
324
|
+
hl.value = 0, We.value = 0;
|
|
325
|
+
});
|
|
326
|
+
const Xe = h(0), Me = h(0);
|
|
327
|
+
function fl() {
|
|
328
|
+
const t = e.value.orientation === "vertical" ? ce.value : ue.value;
|
|
329
|
+
if (!t) {
|
|
330
|
+
Xe.value = 0;
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
try {
|
|
334
|
+
const l = t.getBBox();
|
|
335
|
+
Xe.value = Number.isFinite(l?.height) ? l.height : 0;
|
|
336
|
+
} catch {
|
|
337
|
+
Xe.value = 0;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
function gl() {
|
|
341
|
+
Me.value && cancelAnimationFrame(Me.value), Me.value = requestAnimationFrame(() => {
|
|
342
|
+
requestAnimationFrame(() => {
|
|
343
|
+
fl();
|
|
344
|
+
});
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
je(() => {
|
|
348
|
+
Me.value && cancelAnimationFrame(Me.value);
|
|
349
|
+
});
|
|
350
|
+
const aa = g(() => {
|
|
351
|
+
let t = 0;
|
|
352
|
+
if (Ue.value)
|
|
353
|
+
try {
|
|
354
|
+
t = Ue.value.getBBox().height;
|
|
355
|
+
} catch {
|
|
356
|
+
t = 0;
|
|
357
|
+
}
|
|
358
|
+
const l = e.value.style.chart.grid.x.timeLabels.show ? Xe.value : 0;
|
|
359
|
+
return t + l;
|
|
360
|
+
}), n = g(() => {
|
|
361
|
+
Bt.value;
|
|
362
|
+
const { height: t, width: l } = le.value, { right: a } = le.value.paddingRatio;
|
|
363
|
+
let o = e.value.style.chart.bars.totalValues.show && F.dataset && F.dataset.length > 1 ? e.value.style.chart.bars.totalValues.fontSize * 1.3 : 0, c = 0;
|
|
364
|
+
e.value.style.chart.grid.y.axisLabels.show && (c = vl());
|
|
365
|
+
const r = e.value.style.chart.padding.top + o, d = l - l * a - We.value, x = t - e.value.style.chart.padding.bottom - aa.value - o, k = e.value.style.chart.padding.left + c, M = l - k - l * a - We.value, P = t - r - e.value.style.chart.padding.bottom - aa.value - o;
|
|
366
|
+
return {
|
|
367
|
+
chartHeight: t,
|
|
368
|
+
chartWidth: l,
|
|
369
|
+
top: r,
|
|
370
|
+
right: d,
|
|
371
|
+
bottom: x,
|
|
372
|
+
left: k,
|
|
373
|
+
width: Math.max(0, M),
|
|
374
|
+
height: Math.max(0, P)
|
|
375
|
+
};
|
|
376
|
+
}), ml = g(() => {
|
|
377
|
+
const { left: t, top: l, width: a, height: o } = n.value, c = v.value.start, r = v.value.end, d = Math.max(1, r - c), x = Math.max(0, Math.min(d, (W.value.start ?? c) - c)), k = Math.max(0, Math.min(d, (W.value.end ?? r) - c)), M = Math.max(0, k - x), P = {
|
|
378
|
+
fill: e.value.style.chart.zoom.preview.fill,
|
|
379
|
+
stroke: e.value.style.chart.zoom.preview.stroke,
|
|
380
|
+
"stroke-width": e.value.style.chart.zoom.preview.strokeWidth,
|
|
381
|
+
"stroke-dasharray": e.value.style.chart.zoom.preview.strokeDasharray,
|
|
382
|
+
"stroke-linecap": "round",
|
|
383
|
+
"stroke-linejoin": "round",
|
|
384
|
+
style: {
|
|
385
|
+
pointerEvents: "none",
|
|
386
|
+
transition: "none !important",
|
|
387
|
+
animation: "none !important"
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
if (e.value.orientation === "horizontal") {
|
|
391
|
+
const N = o / d;
|
|
392
|
+
return {
|
|
393
|
+
x: t,
|
|
394
|
+
y: l + x * N,
|
|
395
|
+
width: a,
|
|
396
|
+
height: M * N,
|
|
397
|
+
...P
|
|
398
|
+
};
|
|
399
|
+
} else {
|
|
400
|
+
const N = a / d;
|
|
401
|
+
return {
|
|
402
|
+
x: t + x * N,
|
|
403
|
+
y: l,
|
|
404
|
+
width: M * N,
|
|
405
|
+
height: o,
|
|
406
|
+
...P
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
}), H = g(() => ut.value.map((t, l) => {
|
|
410
|
+
const a = mo(t.color) || cl.value[l] || et[l] || et[l % et.length];
|
|
411
|
+
return {
|
|
412
|
+
...t,
|
|
413
|
+
// In distributed mode, all values are converted to positive
|
|
414
|
+
series: JSON.parse(JSON.stringify(t.series)).map((o) => e.value.style.chart.bars.distributed ? Math.abs(o) : o),
|
|
415
|
+
// Store signs to manage display of neg values in distributed mode
|
|
416
|
+
signedSeries: t.series.map((o) => o >= 0 ? 1 : -1),
|
|
417
|
+
absoluteIndex: l,
|
|
418
|
+
id: Na(),
|
|
419
|
+
color: a
|
|
420
|
+
};
|
|
421
|
+
})), I = g(() => {
|
|
422
|
+
const t = Math.max(...H.value.filter((l) => !A.value.includes(l.id)).map((l) => l.series.length));
|
|
423
|
+
return isFinite(t) ? t : Math.max(...H.value.map((l) => l.series.length));
|
|
424
|
+
});
|
|
425
|
+
function bl(t) {
|
|
426
|
+
it.value = t;
|
|
427
|
+
}
|
|
428
|
+
const v = h({
|
|
429
|
+
start: 0,
|
|
430
|
+
end: Math.max(...ut.value.map((t) => t.series.length))
|
|
431
|
+
}), W = h({ start: 0, end: Math.max(...ut.value.map((t) => t.series.length)) }), la = g(() => e.value.style.chart.zoom.preview.enable && (W.value.start !== v.value.start || W.value.end !== v.value.end));
|
|
432
|
+
function oa(t, l) {
|
|
433
|
+
W.value[t] = l;
|
|
434
|
+
}
|
|
435
|
+
function Ye() {
|
|
436
|
+
const t = I.value;
|
|
437
|
+
let l = Math.max(0, Math.min(v.value.start ?? 0, t - 1)), a = Math.max(l + 1, Math.min(v.value.end ?? t, t));
|
|
438
|
+
(!Number.isFinite(l) || !Number.isFinite(a) || a <= l) && (l = 0, a = t), v.value.start = l, v.value.end = a, W.value.start = l, W.value.end = a, Ce.value && (Ce.value.setStartValue(l), Ce.value.setEndValue(a));
|
|
439
|
+
}
|
|
440
|
+
const _e = h(null);
|
|
441
|
+
function pl() {
|
|
442
|
+
return new Promise((t) => requestAnimationFrame(
|
|
443
|
+
() => requestAnimationFrame(() => t())
|
|
444
|
+
));
|
|
445
|
+
}
|
|
446
|
+
je(() => {
|
|
447
|
+
_e.value && cancelAnimationFrame(_e.value);
|
|
448
|
+
});
|
|
449
|
+
async function sa() {
|
|
450
|
+
Ke(), await At(), _e.value && cancelAnimationFrame(_e.value), _e.value = requestAnimationFrame(async () => {
|
|
451
|
+
await pl(), Ke();
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
const m = g(() => {
|
|
455
|
+
let t;
|
|
456
|
+
return e.value.orientation === "vertical" ? t = n.value.width / (v.value.end - v.value.start) : t = n.value.height / (v.value.end - v.value.start), t <= 0 ? 0 : t;
|
|
457
|
+
}), Te = g(() => Ee(H.value.filter((t) => !A.value.includes(t.id))).slice(v.value.start, v.value.end)), ft = g(() => A.value.length === H.value.length), ve = g(() => e.value.style.chart.zoom.minimap.show ? Ee(H.value.map((t) => ({
|
|
458
|
+
...t,
|
|
459
|
+
series: t.series.map((l) => l ?? 0)
|
|
460
|
+
})).filter((t) => ft.value ? !0 : !A.value.includes(t.id))) : []), xl = g(() => e.value.style.chart.zoom.minimap.show ? [{
|
|
461
|
+
name: "",
|
|
462
|
+
series: ve.value,
|
|
463
|
+
color: "#000000",
|
|
464
|
+
isVisible: !0
|
|
465
|
+
}] : []), kl = g(() => Ee(H.value.filter((t) => !A.value.includes(t.id)).map((t) => ({
|
|
466
|
+
...t,
|
|
467
|
+
series: t.series.map((l, a) => t.signedSeries[a] === -1 && l >= 0 ? -l : l)
|
|
468
|
+
}))).slice(v.value.start, v.value.end)), qe = g(() => {
|
|
469
|
+
const t = H.value.filter((l) => !A.value.includes(l.id));
|
|
470
|
+
return {
|
|
471
|
+
positive: Ee(t.map((l) => ({
|
|
472
|
+
...l,
|
|
473
|
+
series: l.series.slice(v.value.start, v.value.end).map((a) => a >= 0 ? a : 0)
|
|
474
|
+
}))),
|
|
475
|
+
negative: Ee(t.map((l) => ({
|
|
476
|
+
...l,
|
|
477
|
+
series: l.series.slice(v.value.start, v.value.end).map((a) => a < 0 ? a : 0)
|
|
478
|
+
})))
|
|
479
|
+
};
|
|
480
|
+
}), Y = g(() => {
|
|
481
|
+
const t = e.value.style.chart.grid.scale.scaleMax !== null && !e.value.style.chart.bars.distributed ? e.value.style.chart.grid.scale.scaleMax : Math.max(...qe.value.positive), l = Math.min(...qe.value.negative), a = e.value.style.chart.grid.scale.scaleMin !== null && !e.value.style.chart.bars.distributed ? e.value.style.chart.grid.scale.scaleMin : [-1 / 0, 1 / 0, NaN, void 0, null].includes(l) ? 0 : l, o = !e.value.style.chart.bars.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? Oa(a > 0 ? 0 : a, t < 0 ? 0 : t, e.value.style.chart.grid.scale.ticks) : Da(a > 0 ? 0 : a, t < 0 ? 0 : t, e.value.style.chart.grid.scale.ticks);
|
|
482
|
+
return o.ticks.map((c) => ({
|
|
483
|
+
zero: n.value.bottom - n.value.height * (Math.abs(o.min) / (o.max + Math.abs(o.min))),
|
|
484
|
+
y: n.value.bottom - n.value.height * ((c + Math.abs(o.min)) / (o.max + Math.abs(o.min))),
|
|
485
|
+
x: n.value.left - 8,
|
|
486
|
+
horizontal_zero: n.value.left + n.value.width * (Math.abs(o.min) / (o.max + Math.abs(o.min))),
|
|
487
|
+
horizontal_x: n.value.left + n.value.width * ((c + Math.abs(o.min)) / (o.max + Math.abs(o.min))),
|
|
488
|
+
horizontal_y: n.value.bottom - 8,
|
|
489
|
+
value: c
|
|
490
|
+
}));
|
|
491
|
+
}), O = h([]), be = h([]);
|
|
492
|
+
let ra = 0;
|
|
493
|
+
Re(() => {
|
|
494
|
+
const t = ++ra;
|
|
495
|
+
(async () => {
|
|
496
|
+
const l = await Ua({
|
|
497
|
+
values: e.value.style.chart.grid.x.timeLabels.values,
|
|
498
|
+
maxDatapoints: I.value,
|
|
499
|
+
formatter: e.value.style.chart.grid.x.timeLabels.datetimeFormatter,
|
|
500
|
+
start: v.value.start,
|
|
501
|
+
end: v.value.end
|
|
502
|
+
});
|
|
503
|
+
t === ra && (O.value = l);
|
|
504
|
+
})();
|
|
505
|
+
});
|
|
506
|
+
let na = 0;
|
|
507
|
+
Re(() => {
|
|
508
|
+
const t = ++na;
|
|
509
|
+
(async () => {
|
|
510
|
+
const l = await Ua({
|
|
511
|
+
values: e.value.style.chart.grid.x.timeLabels.values,
|
|
512
|
+
maxDatapoints: I.value,
|
|
513
|
+
formatter: e.value.style.chart.grid.x.timeLabels.datetimeFormatter,
|
|
514
|
+
start: 0,
|
|
515
|
+
end: I.value
|
|
516
|
+
});
|
|
517
|
+
t === na && (be.value = l);
|
|
518
|
+
})();
|
|
519
|
+
});
|
|
520
|
+
const wl = g(() => {
|
|
521
|
+
const t = e.value.style.chart.grid.x.timeLabels.modulo;
|
|
522
|
+
return O.value.length ? Math.min(t, [...new Set(O.value.map((l) => l.text))].length) : t;
|
|
523
|
+
}), gt = g(() => {
|
|
524
|
+
const t = e.value.style.chart.grid.x.timeLabels, l = O.value || [], a = be.value || [], o = v.value.start ?? 0, c = U.value, r = I.value, d = l.map((k) => k?.text ?? ""), x = a.map((k) => k?.text ?? "");
|
|
525
|
+
return bo(
|
|
526
|
+
!!t.showOnlyFirstAndLast,
|
|
527
|
+
!!t.showOnlyAtModulo,
|
|
528
|
+
Math.max(1, wl.value || 1),
|
|
529
|
+
d,
|
|
530
|
+
x,
|
|
531
|
+
o,
|
|
532
|
+
c,
|
|
533
|
+
r
|
|
534
|
+
);
|
|
535
|
+
});
|
|
536
|
+
Re(() => {
|
|
537
|
+
e.value.orientation, e.value.style.chart.grid.x.timeLabels.show, e.value.style.chart.grid.x.timeLabels.fontSize, e.value.style.chart.grid.x.timeLabels.rotation, e.value.style.chart.grid.x.timeLabels.offsetY, gt.value?.map((t) => t?.text ?? "").join("|"), Y.value?.map((t) => t?.value ?? "").join("|"), le.value.width, le.value.height, ce.value, ue.value, Ue.value, gl();
|
|
538
|
+
}, { flush: "post" });
|
|
539
|
+
const ia = h({ months: [], shortMonths: [], days: [], shortDays: [] });
|
|
540
|
+
let ua = 0;
|
|
541
|
+
Re(() => {
|
|
542
|
+
const t = ++ua, l = e.value.style.chart.grid.x.timeLabels.datetimeFormatter;
|
|
543
|
+
(async () => {
|
|
544
|
+
const a = await Ha(l.locale).catch(() => Ha("en"));
|
|
545
|
+
t === ua && (ia.value = a.data);
|
|
546
|
+
})();
|
|
547
|
+
});
|
|
548
|
+
const ca = g(() => {
|
|
549
|
+
const t = e.value.style.chart.grid.x.timeLabels.datetimeFormatter, l = _o({
|
|
550
|
+
useUTC: t.useUTC,
|
|
551
|
+
locale: ia.value,
|
|
552
|
+
januaryAsYear: t.januaryAsYear
|
|
553
|
+
});
|
|
554
|
+
return (a, o) => {
|
|
555
|
+
const r = e.value.style.chart.grid.x.timeLabels.values?.[a];
|
|
556
|
+
return r == null ? "" : l.formatDate(new Date(r), o);
|
|
557
|
+
};
|
|
558
|
+
}), va = g(() => (e.value.style.chart.grid.x.timeLabels.values || []).map((l, a) => ({
|
|
559
|
+
text: ca.value(a, e.value.style.chart.zoom.timeFormat),
|
|
560
|
+
absoluteIndex: a
|
|
561
|
+
}))), mt = g(() => (e.value.style.chart.grid.x.timeLabels.values || []).map((l, a) => ({
|
|
562
|
+
text: ca.value(a, e.value.style.chart.tooltip.timeFormat),
|
|
563
|
+
absoluteIndex: a
|
|
564
|
+
}))), z = g(() => {
|
|
565
|
+
if (!Le.value && !fe.value) return [];
|
|
566
|
+
let t = Array(I.value).fill(0), l = Array(I.value).fill(0), a = Array(I.value).fill(0), o = Array(I.value).fill(0);
|
|
567
|
+
const c = Math.max(...qe.value.positive) || 0, r = Math.min(...qe.value.negative), d = [-1 / 0, 1 / 0, NaN, void 0, null].includes(r) ? 0 : r, x = !e.value.style.chart.bars.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? Oa(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : d > 0 ? 0 : d, e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : c < 0 ? 0 : c, e.value.style.chart.grid.scale.ticks) : Da(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : d > 0 ? 0 : d, e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : c < 0 ? 0 : c, e.value.style.chart.grid.scale.ticks), { min: k, max: M } = x, P = M + (k >= 0 ? 0 : Math.abs(k)) || 1, N = n.value.height, j = n.value.width, he = Y.value[0] ? Y.value[0].zero : n.value.bottom, Fe = Y.value[0] ? Y.value[0].horizontal_zero : n.value.left;
|
|
568
|
+
let J = Array(ve.value.length).fill(0), _a = Array(ve.value.length).fill(0);
|
|
569
|
+
return H.value.filter((xe) => !A.value.includes(xe.id)).map((xe) => {
|
|
570
|
+
const se = xe.series.slice(), Ta = se.map((y, p) => J[p]), Gl = se.map((y, p) => _a[p]);
|
|
571
|
+
se.forEach((y, p) => {
|
|
572
|
+
(Number(y) || 0) >= 0 ? J[p] += Number(y) || 0 : _a[p] += Math.abs(Number(y) || 0);
|
|
573
|
+
});
|
|
574
|
+
const te = xe.series.slice(v.value.start, v.value.end), Jl = xe.signedSeries.slice(v.value.start, v.value.end), Kl = te.map((y, p) => n.value.left + m.value * p + m.value * e.value.style.chart.bars.gapRatio / 4), Qe = (ve.value || []).filter(Number.isFinite), zt = Qe.length ? Math.max(...Qe) : 0, Mt = Qe.length ? Math.min(...Qe) : 0;
|
|
575
|
+
function Aa({ minimapH: y }) {
|
|
576
|
+
const _ = zt > 0, D = Mt < 0;
|
|
577
|
+
if (_ && D) {
|
|
578
|
+
const K = Math.max(zt, Math.abs(Mt)) || 1e-9;
|
|
579
|
+
return {
|
|
580
|
+
pxPerUnit: y / 2 / K,
|
|
581
|
+
zero: y / 2
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
if (_) {
|
|
585
|
+
const K = Math.max(1e-9, zt);
|
|
586
|
+
return {
|
|
587
|
+
pxPerUnit: y / K,
|
|
588
|
+
zero: y
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
const T = Math.max(1e-9, Math.abs(Mt));
|
|
592
|
+
return {
|
|
593
|
+
pxPerUnit: y / T,
|
|
594
|
+
zero: 0
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
const Zl = ({ left: y, unitW: p }) => {
|
|
598
|
+
const _ = p * (e.value.style.chart.bars.gapRatio / 4);
|
|
599
|
+
return se.map((D, T) => y + p * T + _);
|
|
600
|
+
}, Ql = te.map((y, p) => n.value.top + m.value * p + m.value * e.value.style.chart.bars.gapRatio / 4), jl = te.map((y, p) => {
|
|
601
|
+
const _ = e.value.style.chart.bars.distributed ? (y || 0) / Te.value[p] : (y || 0) / P;
|
|
602
|
+
let D, T;
|
|
603
|
+
return y > 0 ? (T = N * _, D = he - T - t[p], t[p] += T) : (T = N * _, D = he + a[p], a[p] += Math.abs(T)), D;
|
|
604
|
+
}), eo = ({ minimapH: y }) => {
|
|
605
|
+
if (e.value.style.chart.bars.distributed)
|
|
606
|
+
return se.map((T, K) => {
|
|
607
|
+
const _t = Math.abs(Number(T) || 0), $a = Math.abs(ve.value?.[K] || 0) || 1e-9, ro = (Ta[K] + _t) / $a;
|
|
608
|
+
return y - ro * y;
|
|
609
|
+
});
|
|
610
|
+
const { pxPerUnit: p, zero: _ } = Aa({ minimapH: y });
|
|
611
|
+
return se.map((D, T) => {
|
|
612
|
+
const K = Number(D) || 0;
|
|
613
|
+
return K >= 0 ? _ - (Ta[T] + K) * p : _ + Gl[T] * p;
|
|
614
|
+
});
|
|
615
|
+
}, to = te.map((y, p) => {
|
|
616
|
+
const _ = e.value.style.chart.bars.distributed ? (y || 0) / Te.value[p] : (y || 0) / P;
|
|
617
|
+
let D, T;
|
|
618
|
+
return y > 0 ? (T = j * _, D = Fe + l[p], l[p] += T) : (T = j * _, D = Fe - Math.abs(T) - o[p], o[p] += Math.abs(T)), D;
|
|
619
|
+
}), ao = te.map((y, p) => {
|
|
620
|
+
const _ = e.value.style.chart.bars.distributed ? (y || 0) / Te.value[p] : (y || 0) / P;
|
|
621
|
+
return y > 0 ? N * _ : N * Math.abs(_);
|
|
622
|
+
}), lo = ({ minimapH: y }) => {
|
|
623
|
+
if (e.value.style.chart.bars.distributed)
|
|
624
|
+
return se.map((D, T) => {
|
|
625
|
+
const K = Math.abs(Number(D) || 0), _t = Math.abs(ve.value?.[T] || 0) || 1e-9;
|
|
626
|
+
return K / _t * y;
|
|
627
|
+
});
|
|
628
|
+
const { pxPerUnit: p } = Aa({ minimapH: y });
|
|
629
|
+
return se.map((_) => Math.abs(Number(_) || 0) * p);
|
|
630
|
+
}, oo = te.map((y, p) => {
|
|
631
|
+
const _ = e.value.style.chart.bars.distributed ? (y || 0) / Te.value[p] : (y || 0) / P;
|
|
632
|
+
return y > 0 ? j * _ : j * Math.abs(_);
|
|
633
|
+
}), so = te.map((y) => Math.abs(y)).reduce((y, p) => y + p, 0);
|
|
634
|
+
return {
|
|
635
|
+
...xe,
|
|
636
|
+
proportions: te.map((y, p) => e.value.style.chart.bars.distributed ? (y || 0) / Te.value[p] : (y || 0) / so),
|
|
637
|
+
series: te,
|
|
638
|
+
signedSeries: Jl,
|
|
639
|
+
x: Kl,
|
|
640
|
+
y: jl,
|
|
641
|
+
height: ao,
|
|
642
|
+
horizontal_width: oo,
|
|
643
|
+
horizontal_y: Ql,
|
|
644
|
+
horizontal_x: to,
|
|
645
|
+
xMinimap: Zl,
|
|
646
|
+
yMinimap: eo,
|
|
647
|
+
heightMinimap: lo
|
|
648
|
+
};
|
|
649
|
+
});
|
|
650
|
+
}), ha = g(() => kl.value.map((t, l) => ({
|
|
651
|
+
value: t,
|
|
652
|
+
sign: t >= 0 ? 1 : -1
|
|
653
|
+
})));
|
|
654
|
+
function Ge(t, l, a, o, c) {
|
|
655
|
+
const r = c === -1 && t >= 0 ? -t : t;
|
|
656
|
+
return we(
|
|
657
|
+
e.value.style.chart.bars.dataLabels.formatter,
|
|
658
|
+
r,
|
|
659
|
+
ne({
|
|
660
|
+
p: e.value.style.chart.bars.dataLabels.prefix,
|
|
661
|
+
v: r,
|
|
662
|
+
s: e.value.style.chart.bars.dataLabels.suffix,
|
|
663
|
+
r: e.value.style.chart.bars.dataLabels.rounding
|
|
664
|
+
}),
|
|
665
|
+
{ datapoint: l, seriesIndex: a, datapointIndex: o }
|
|
666
|
+
);
|
|
667
|
+
}
|
|
668
|
+
function da(t, l, a, o) {
|
|
669
|
+
return we(
|
|
670
|
+
e.value.style.chart.bars.dataLabels.formatter,
|
|
671
|
+
t,
|
|
672
|
+
ne({
|
|
673
|
+
v: isNaN(t) ? 0 : t,
|
|
674
|
+
s: "%",
|
|
675
|
+
r: e.value.style.chart.bars.dataLabels.rounding
|
|
676
|
+
}),
|
|
677
|
+
{ datapoint: l, seriesIndex: a, datapointIndex: o }
|
|
678
|
+
);
|
|
679
|
+
}
|
|
680
|
+
function bt(t) {
|
|
681
|
+
const l = JSON.parse(JSON.stringify(z.value)).map((a) => ({
|
|
682
|
+
name: a.name,
|
|
683
|
+
value: a.series[t] === 0 ? 0 : a.series[t] || null,
|
|
684
|
+
proportion: a.proportions[t] || null,
|
|
685
|
+
color: a.color,
|
|
686
|
+
id: a.id
|
|
687
|
+
}));
|
|
688
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: t + v.value.start }), ae("selectDatapoint", { datapoint: l, period: O.value[t] });
|
|
689
|
+
}
|
|
690
|
+
function pt(t) {
|
|
691
|
+
return JSON.parse(JSON.stringify(z.value)).map((l) => ({
|
|
692
|
+
name: l.name,
|
|
693
|
+
absoluteIndex: l.absoluteIndex,
|
|
694
|
+
value: l.series[t] === 0 ? 0 : (l.signedSeries[t] === -1 && l.series[t] >= 0 ? -l.series[t] : l.series[t]) || null,
|
|
695
|
+
proportion: l.proportions[t] || null,
|
|
696
|
+
color: l.color,
|
|
697
|
+
id: l.id,
|
|
698
|
+
timeLabel: be.value[t]
|
|
699
|
+
}));
|
|
700
|
+
}
|
|
701
|
+
function ya(t) {
|
|
702
|
+
if (e.value.events.datapointLeave) {
|
|
703
|
+
const l = pt(t);
|
|
704
|
+
e.value.events.datapointLeave({ datapoint: l, seriesIndex: t + v.value.start });
|
|
705
|
+
}
|
|
706
|
+
ye.value = !1, U.value = null, G.value === t && (G.value = null);
|
|
707
|
+
}
|
|
708
|
+
const Ll = g(() => Array(I.value).fill(0).map((t, l) => pt(l)));
|
|
709
|
+
Ie(() => F.selectedXIndex, (t) => {
|
|
710
|
+
if ([null, void 0].includes(F.selectedXIndex)) {
|
|
711
|
+
U.value = null;
|
|
712
|
+
return;
|
|
713
|
+
}
|
|
714
|
+
const l = t - v.value.start;
|
|
715
|
+
l < 0 || t >= v.value.end ? U.value = null : U.value = l ?? null;
|
|
716
|
+
}, { immediate: !0 });
|
|
717
|
+
function xt(t, l = "pointer") {
|
|
718
|
+
if (ft.value) return;
|
|
719
|
+
Wt.value = l, G.value = t, U.value = t, ye.value = !0;
|
|
720
|
+
const a = e.value.style.chart.tooltip.customFormat, o = pt(t);
|
|
721
|
+
Bl({ seriesIndex: t, datapoint: o }), e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: o, seriesIndex: t + v.value.start }), at.value = {
|
|
722
|
+
datapoint: o,
|
|
723
|
+
seriesIndex: t,
|
|
724
|
+
config: e.value,
|
|
725
|
+
series: z.value
|
|
726
|
+
};
|
|
727
|
+
const c = o.map((d) => Math.abs(d.value)).reduce((d, x) => d + x, 0), r = o.map((d) => de(d.value)).reduce((d, x) => d + x, 0);
|
|
728
|
+
if (Va(a) && So(() => a({
|
|
729
|
+
seriesIndex: t,
|
|
730
|
+
datapoint: o,
|
|
731
|
+
series: z.value,
|
|
732
|
+
config: e.value
|
|
733
|
+
})))
|
|
734
|
+
lt.value = a({
|
|
735
|
+
seriesIndex: t,
|
|
736
|
+
datapoint: o,
|
|
737
|
+
series: z.value,
|
|
738
|
+
config: e.value
|
|
739
|
+
});
|
|
740
|
+
else {
|
|
741
|
+
const {
|
|
742
|
+
showValue: d,
|
|
743
|
+
showTotal: x,
|
|
744
|
+
totalTranslation: k,
|
|
745
|
+
showPercentage: M,
|
|
746
|
+
borderColor: P,
|
|
747
|
+
roundingValue: N,
|
|
748
|
+
roundingPercentage: j
|
|
749
|
+
} = e.value.style.chart.tooltip;
|
|
750
|
+
let he = "";
|
|
751
|
+
(O.value[t] && O.value[t].text || mt.value[t] && mt.value[t].text && e.value.style.chart.tooltip.showTimeLabel) && (he += `<div style="width:100%;text-align:center;border-bottom:1px solid ${P};padding-bottom:6px;margin-bottom:3px;">${e.value.style.chart.tooltip.useDefaultTimeFormat ? O.value[t]?.text : mt.value[t]?.text || be.value[t]?.text || ""}</div>`), x && (he += `<div class="vue-data-ui-tooltip-total" style="display:flex;flex-direction:row;align-items:center;gap:4px">
|
|
752
|
+
<span>${k}:</span>
|
|
753
|
+
<span>
|
|
754
|
+
${we(
|
|
755
|
+
e.value.style.chart.bars.dataLabels.formatter,
|
|
756
|
+
r,
|
|
757
|
+
ne({
|
|
758
|
+
p: e.value.style.chart.bars.dataLabels.prefix,
|
|
759
|
+
v: r,
|
|
760
|
+
s: e.value.style.chart.bars.dataLabels.suffix,
|
|
761
|
+
r: N
|
|
762
|
+
}),
|
|
763
|
+
{ datapoint: { name: k, value: r } }
|
|
764
|
+
)}
|
|
765
|
+
</span>
|
|
766
|
+
</div>`);
|
|
767
|
+
const Fe = [
|
|
768
|
+
d && M ? "(" : "",
|
|
769
|
+
d && M ? ")" : ""
|
|
770
|
+
];
|
|
771
|
+
o.reverse().forEach((J) => {
|
|
772
|
+
he += `
|
|
773
|
+
<div style="display:flex;flex-direction:row;align-items:center;gap:4px">
|
|
774
|
+
<svg viewBox="0 0 60 60" height="14" width="14"><rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="${e.value.style.chart.bars.gradient.show ? `url(#gradient_${J.id})` : J.color}"/>${ll.pattern ? `<rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="url(#pattern_${R.value}_${J.absoluteIndex})"/>` : ""}</svg>
|
|
775
|
+
${J.name}${d || M ? ":" : ""} ${d ? we(
|
|
776
|
+
e.value.style.chart.bars.dataLabels.formatter,
|
|
777
|
+
J.value,
|
|
778
|
+
ne({
|
|
779
|
+
p: e.value.style.chart.bars.dataLabels.prefix,
|
|
780
|
+
v: J.value,
|
|
781
|
+
s: e.value.style.chart.bars.dataLabels.suffix,
|
|
782
|
+
r: N
|
|
783
|
+
})
|
|
784
|
+
) : ""} ${Fe[0]}${M ? ne({
|
|
785
|
+
v: isNaN(J.value / c) ? 0 : Math.abs(J.value) / c * 100,
|
|
786
|
+
// Negs are absed to show relative proportion to absolute total. It's opinionated.
|
|
787
|
+
s: "%",
|
|
788
|
+
r: j
|
|
789
|
+
}) : ""}${Fe[1]}
|
|
790
|
+
</div>
|
|
791
|
+
`;
|
|
792
|
+
}), lt.value = `<div>${he}</div>`;
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
const Cl = g(() => le.value.width), Sl = g(() => le.value.height);
|
|
796
|
+
Oo({
|
|
797
|
+
timeLabelsEls: e.value.orientation === "vertical" ? ce : ue,
|
|
798
|
+
timeLabels: O,
|
|
799
|
+
slicer: v,
|
|
800
|
+
configRef: e,
|
|
801
|
+
rotationPath: ["style", "chart", "grid", "x", "timeLabels", "rotation"],
|
|
802
|
+
autoRotatePath: ["style", "chart", "grid", "x", "timeLabels", "autoRotate", "enable"],
|
|
803
|
+
isAutoSize: !1,
|
|
804
|
+
width: Cl,
|
|
805
|
+
height: Sl,
|
|
806
|
+
rotation: e.value.style.chart.grid.x.timeLabels.autoRotate.angle
|
|
807
|
+
});
|
|
808
|
+
function fa(t) {
|
|
809
|
+
Se.value = t, Nt.value += 1;
|
|
810
|
+
}
|
|
811
|
+
function ga() {
|
|
812
|
+
$.value.showTable = !$.value.showTable;
|
|
813
|
+
}
|
|
814
|
+
function ma() {
|
|
815
|
+
$.value.dataLabels.show = !$.value.dataLabels.show;
|
|
816
|
+
}
|
|
817
|
+
function ba() {
|
|
818
|
+
$.value.showTooltip = !$.value.showTooltip;
|
|
819
|
+
}
|
|
820
|
+
function zl() {
|
|
821
|
+
return z.value;
|
|
822
|
+
}
|
|
823
|
+
const pa = g(() => {
|
|
824
|
+
if (z.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
|
|
825
|
+
const t = z.value.map(({ name: a, color: o }) => ({
|
|
826
|
+
label: a,
|
|
827
|
+
color: o
|
|
828
|
+
})), l = [];
|
|
829
|
+
return O.value.forEach((a) => {
|
|
830
|
+
const o = [e.value.style.chart.grid.x.timeLabels.values[a.absoluteIndex] ? a.text : i + 1];
|
|
831
|
+
H.value.forEach((c) => {
|
|
832
|
+
o.push(Number((c.series[a.absoluteIndex] || 0).toFixed(e.value.table.td.roundingValue)));
|
|
833
|
+
}), l.push(o);
|
|
834
|
+
}), { head: t, body: l };
|
|
835
|
+
});
|
|
836
|
+
function kt(t = null) {
|
|
837
|
+
const l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], a = ["", ...pa.value.head.map((d) => d.label)], o = pa.value.body, c = l.concat([a]).concat(o), r = Lo(c);
|
|
838
|
+
t ? t(r) : Co({ csvContent: r, title: e.value.style.chart.title.text || "vue-ui-stackbar" });
|
|
839
|
+
}
|
|
840
|
+
const pe = g(() => {
|
|
841
|
+
const t = [""].concat(z.value.map((c) => c.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>');
|
|
842
|
+
let l = [];
|
|
843
|
+
for (let c = 0; c < I.value; c += 1) {
|
|
844
|
+
const r = z.value.map((d) => d.series[c] ?? 0).reduce((d, x) => d + x, 0);
|
|
845
|
+
l.push([e.value.style.chart.grid.x.timeLabels.values.slice(v.value.start, v.value.end)[c] ? O.value[c]?.text : c + 1].concat(z.value.map((d) => (d.series[c] ?? 0).toFixed(e.value.table.td.roundingValue))).concat((r ?? 0).toFixed(e.value.table.td.roundingValue)));
|
|
846
|
+
}
|
|
847
|
+
const a = {
|
|
848
|
+
th: {
|
|
849
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
850
|
+
color: e.value.table.th.color,
|
|
851
|
+
outline: e.value.table.th.outline
|
|
852
|
+
},
|
|
853
|
+
td: {
|
|
854
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
855
|
+
color: e.value.table.td.color,
|
|
856
|
+
outline: e.value.table.td.outline
|
|
857
|
+
},
|
|
858
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
859
|
+
}, o = [e.value.table.columnNames.period].concat(z.value.map((c) => c.name)).concat(e.value.table.columnNames.total);
|
|
860
|
+
return { head: t, body: l.slice(0, v.value.end - v.value.start), config: a, colNames: o };
|
|
861
|
+
});
|
|
862
|
+
function Ml() {
|
|
863
|
+
A.value.length ? A.value = [] : Ae.value.forEach((t) => {
|
|
864
|
+
A.value.push(t.id);
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
function wt(t) {
|
|
868
|
+
if (A.value.includes(t.id))
|
|
869
|
+
A.value = A.value.filter((l) => l !== t.id);
|
|
870
|
+
else {
|
|
871
|
+
if (A.value.length === H.value.length - 1) return;
|
|
872
|
+
A.value.push(t.id);
|
|
873
|
+
}
|
|
874
|
+
ae("selectLegend", z.value);
|
|
875
|
+
}
|
|
876
|
+
function xa(t) {
|
|
877
|
+
if (!H.value.length)
|
|
878
|
+
return e.value.debug && console.warn("VueUiStackbar - There are no series to show."), null;
|
|
879
|
+
const l = H.value.find((a) => a.name === t);
|
|
880
|
+
return l || (e.value.debug && console.warn(`VueUiStackbar - Series name not found "${t}"`), null);
|
|
881
|
+
}
|
|
882
|
+
function _l(t) {
|
|
883
|
+
const l = xa(t);
|
|
884
|
+
l !== null && A.value.includes(l.id) && wt({ id: l.id });
|
|
885
|
+
}
|
|
886
|
+
function Tl(t) {
|
|
887
|
+
const l = xa(t);
|
|
888
|
+
l !== null && (A.value.includes(l.id) || wt({ id: l.id }));
|
|
889
|
+
}
|
|
890
|
+
const Ae = g(() => H.value.map((t, l) => ({
|
|
891
|
+
...t,
|
|
892
|
+
shape: "square"
|
|
893
|
+
})).map((t) => ({
|
|
894
|
+
...t,
|
|
895
|
+
opacity: A.value.includes(t.id) ? 0.5 : 1,
|
|
896
|
+
segregate: () => wt(t),
|
|
897
|
+
isSegregated: A.value.includes(t.id)
|
|
898
|
+
}))), Al = g(() => ({
|
|
899
|
+
cy: "stackbar-legend",
|
|
900
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
901
|
+
color: e.value.style.chart.legend.color,
|
|
902
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
903
|
+
paddingBottom: 12,
|
|
904
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
905
|
+
})), $e = h(!1);
|
|
906
|
+
function Lt() {
|
|
907
|
+
$e.value = !$e.value;
|
|
908
|
+
}
|
|
909
|
+
function Je(t, l) {
|
|
910
|
+
const a = JSON.parse(JSON.stringify(z.value)).map((o) => ({
|
|
911
|
+
name: o.name,
|
|
912
|
+
value: o.series[l] === 0 ? 0 : (o.signedSeries[l] === -1 && o.series[l] >= 0 ? -o.series[l] : o.series[l]) || null,
|
|
913
|
+
proportion: o.proportions[l] || null,
|
|
914
|
+
color: o.color,
|
|
915
|
+
id: o.id
|
|
916
|
+
}));
|
|
917
|
+
ae("selectTimeLabel", {
|
|
918
|
+
datapoint: a,
|
|
919
|
+
absoluteIndex: t.absoluteIndex,
|
|
920
|
+
label: t.text
|
|
921
|
+
});
|
|
922
|
+
}
|
|
923
|
+
const $l = g(() => Math.max(...z.value.flatMap((t) => t.series)));
|
|
924
|
+
function ka(t, l) {
|
|
925
|
+
return e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? Zt.value ? l * 100 >= e.value.style.chart.bars.dataLabels.hideUnderPercentage : e.value.style.chart.bars.dataLabels.hideEmptyPercentages ? l > 0 : !0 : Zt.value ? (Kt.value && yt.value && console.warn("Vue Data UI - VueUiStackbar - You cannot set both dataLabels.hideUnderPercentage and dataLabels.hideUnderValue. Note that dataLabels.hideUnderPercentage takes precedence in this case."), t > $l.value * e.value.style.chart.bars.dataLabels.hideUnderPercentage / 100) : Kt.value ? Math.abs(t) >= e.value.style.chart.bars.dataLabels.hideUnderValue : e.value.style.chart.bars.dataLabels.hideEmptyValues ? t !== 0 : !0;
|
|
926
|
+
}
|
|
927
|
+
async function Pl({ scale: t = 2 } = {}) {
|
|
928
|
+
if (!Q.value) return;
|
|
929
|
+
const { width: l, height: a } = Q.value.getBoundingClientRect(), o = l / a, { imageUri: c, base64: r } = await Do({ domElement: Q.value, base64: !0, img: !0, scale: t });
|
|
930
|
+
return {
|
|
931
|
+
imageUri: c,
|
|
932
|
+
base64: r,
|
|
933
|
+
title: e.value.style.chart.title.text,
|
|
934
|
+
width: l,
|
|
935
|
+
height: a,
|
|
936
|
+
aspectRatio: o
|
|
937
|
+
};
|
|
938
|
+
}
|
|
939
|
+
const Pe = g(() => {
|
|
940
|
+
const t = e.value.table.useDialog && !e.value.table.show, l = $.value.showTable;
|
|
941
|
+
return {
|
|
942
|
+
component: t ? ja : Ga,
|
|
943
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
944
|
+
props: t ? {
|
|
945
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
946
|
+
color: e.value.table.th.color,
|
|
947
|
+
headerColor: e.value.table.th.color,
|
|
948
|
+
headerBg: e.value.table.th.backgroundColor,
|
|
949
|
+
isFullscreen: Se.value,
|
|
950
|
+
fullscreenParent: Q.value,
|
|
951
|
+
forcedWidth: Math.min(800, window.innerWidth * 0.8),
|
|
952
|
+
isCursorPointer: X.value
|
|
953
|
+
} : {
|
|
954
|
+
hideDetails: !0,
|
|
955
|
+
config: {
|
|
956
|
+
open: l,
|
|
957
|
+
maxHeight: 1e4,
|
|
958
|
+
body: {
|
|
959
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
960
|
+
color: e.value.style.chart.color
|
|
961
|
+
},
|
|
962
|
+
head: {
|
|
963
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
964
|
+
color: e.value.style.chart.color
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
};
|
|
969
|
+
});
|
|
970
|
+
Ie(() => $.value.showTable, (t) => {
|
|
971
|
+
e.value.table.show || (t && e.value.table.useDialog && ze.value ? ze.value.open() : "close" in ze.value && ze.value.close());
|
|
972
|
+
});
|
|
973
|
+
function wa() {
|
|
974
|
+
$.value.showTable = !1, ot.value && ot.value.setTableIconState(!1);
|
|
975
|
+
}
|
|
976
|
+
const Nl = g(() => e.value.style.chart.backgroundColor), Fl = g(() => e.value.style.chart.legend), Il = g(() => e.value.style.chart.title), { exportSvg: Rl, getSvg: Ol } = Po({
|
|
977
|
+
svg: ge,
|
|
978
|
+
title: Il,
|
|
979
|
+
legend: Fl,
|
|
980
|
+
legendItems: Ae,
|
|
981
|
+
backgroundColor: Nl
|
|
982
|
+
});
|
|
983
|
+
async function La({ isCb: t }) {
|
|
984
|
+
Be.value = !0, await At();
|
|
985
|
+
try {
|
|
986
|
+
if (t) {
|
|
987
|
+
const { blob: l, url: a, text: o, dataUrl: c } = await Ol();
|
|
988
|
+
await Promise.resolve(e.value.userOptions.callbacks.svg({ blob: l, url: a, text: o, dataUrl: c }));
|
|
989
|
+
} else
|
|
990
|
+
await Promise.resolve(Rl());
|
|
991
|
+
} finally {
|
|
992
|
+
Be.value = !1;
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
function Dl(t) {
|
|
996
|
+
if (t?.stage === "start") {
|
|
997
|
+
Ve.value = !0;
|
|
998
|
+
return;
|
|
999
|
+
}
|
|
1000
|
+
if (t?.stage === "end") {
|
|
1001
|
+
Ve.value = !1;
|
|
1002
|
+
return;
|
|
1003
|
+
}
|
|
1004
|
+
jt();
|
|
1005
|
+
}
|
|
1006
|
+
function Ca(t) {
|
|
1007
|
+
const l = I.value;
|
|
1008
|
+
return t > l ? l : t < 0 || t < v.value.start ? e.value.style.chart.zoom.startIndex !== null ? v.value.start + 1 : 1 : t;
|
|
1009
|
+
}
|
|
1010
|
+
const Ne = h(!1), Sa = h(!1);
|
|
1011
|
+
function Ke() {
|
|
1012
|
+
if (!Ne.value) {
|
|
1013
|
+
Ne.value = !0;
|
|
1014
|
+
try {
|
|
1015
|
+
const { startIndex: t, endIndex: l } = e.value.style.chart.zoom, a = I.value, o = t ?? 0, c = l != null ? Math.min(Ca(l + 1), a) : a;
|
|
1016
|
+
Ze.value = !0, v.value.start = o, v.value.end = c, W.value.start = o, W.value.end = c, Ye(), Sa.value = !0;
|
|
1017
|
+
} finally {
|
|
1018
|
+
queueMicrotask(() => {
|
|
1019
|
+
Ze.value = !1;
|
|
1020
|
+
}), Ne.value = !1;
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
const Ze = h(!1);
|
|
1025
|
+
function El(t) {
|
|
1026
|
+
Ne.value || Ze.value || t !== v.value.start && (v.value.start = t, W.value.start = t, Ye());
|
|
1027
|
+
}
|
|
1028
|
+
function Vl(t) {
|
|
1029
|
+
if (Ne.value || Ze.value) return;
|
|
1030
|
+
const l = Ca(t);
|
|
1031
|
+
l !== v.value.end && (v.value.end = l, W.value.end = l, Ye());
|
|
1032
|
+
}
|
|
1033
|
+
function Bl({ seriesIndex: t, datapoint: l }) {
|
|
1034
|
+
const a = v.value.start + t;
|
|
1035
|
+
ae("selectX", {
|
|
1036
|
+
dataset: l,
|
|
1037
|
+
index: a,
|
|
1038
|
+
indexLabel: e.value.style.chart.grid.x.timeLabels.values[a]
|
|
1039
|
+
});
|
|
1040
|
+
}
|
|
1041
|
+
function za() {
|
|
1042
|
+
return { y0: Y.value?.[0]?.zero ?? n.value.bottom };
|
|
1043
|
+
}
|
|
1044
|
+
function Ul(t) {
|
|
1045
|
+
const { y0: l } = za(), a = e.value.style.chart.bars.totalValues, o = Math.max(2, a.fontSize * 0.3 + a.offsetY);
|
|
1046
|
+
let c = 1 / 0, r = !1;
|
|
1047
|
+
for (const M of z.value || []) {
|
|
1048
|
+
const P = M?.series?.[t] ?? 0, N = M?.height?.[t] ?? 0, j = M?.y?.[t];
|
|
1049
|
+
P > 0 && N > 0 && Number.isFinite(j) && (r = !0, j < c && (c = j));
|
|
1050
|
+
}
|
|
1051
|
+
const x = (r && Number.isFinite(c) ? c : l) - o;
|
|
1052
|
+
return Math.min(
|
|
1053
|
+
Math.max(x, 0),
|
|
1054
|
+
n.value.bottom
|
|
1055
|
+
);
|
|
1056
|
+
}
|
|
1057
|
+
function Hl(t) {
|
|
1058
|
+
const { x0: l } = za(), a = Math.max(2, e.value.style.chart.bars.totalValues.fontSize * 0.3 + e.value.style.chart.bars.totalValues.offsetX);
|
|
1059
|
+
let o = -1 / 0, c = !1;
|
|
1060
|
+
for (const d of z.value || []) {
|
|
1061
|
+
const x = d?.series?.[t] ?? 0, k = d?.horizontal_x?.[t], M = d?.horizontal_width?.[t], P = Number.isFinite(M) ? Math.max(0, M) : 0;
|
|
1062
|
+
Number.isFinite(k) && x > 0 && P > 0 && (c = !0, o = Math.max(o, k + P));
|
|
1063
|
+
}
|
|
1064
|
+
return (c && Number.isFinite(o) ? o : l) + a;
|
|
1065
|
+
}
|
|
1066
|
+
async function Ma() {
|
|
1067
|
+
if (ae("copyAlt", {
|
|
1068
|
+
config: e.value,
|
|
1069
|
+
dataset: z.value
|
|
1070
|
+
}), !e.value.userOptions.callbacks.altCopy) {
|
|
1071
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
1072
|
+
return;
|
|
1073
|
+
}
|
|
1074
|
+
await Promise.resolve(e.value.userOptions.callbacks.altCopy({
|
|
1075
|
+
config: e.value,
|
|
1076
|
+
dataset: z.value
|
|
1077
|
+
}));
|
|
1078
|
+
}
|
|
1079
|
+
const Ct = h(!1);
|
|
1080
|
+
function Wl() {
|
|
1081
|
+
G.value = null, Ct.value = !0;
|
|
1082
|
+
}
|
|
1083
|
+
function Xl() {
|
|
1084
|
+
G.value = null, ye.value = !1, U.value = null, ae("selectX", { seriesIndex: null, datapoint: null }), Ct.value = !1;
|
|
1085
|
+
}
|
|
1086
|
+
function Yl(t) {
|
|
1087
|
+
if (!ge.value || $e.value || document.activeElement !== ge.value || ft.value || !v.value.end && v.value.end !== 0) return;
|
|
1088
|
+
const l = e.value.orientation === "vertical", a = e.value.orientation === "horizontal", o = l && t.key === "ArrowLeft" || a && t.key === "ArrowUp", c = l && t.key === "ArrowRight" || a && t.key === "ArrowDown", r = t.key === "Enter" || t.key === " ", d = t.key === "Escape";
|
|
1089
|
+
if (!o && !c && !r && !d) return;
|
|
1090
|
+
const x = v.value.end - v.value.start;
|
|
1091
|
+
if (x <= 0) return;
|
|
1092
|
+
if (t.preventDefault(), t.stopPropagation(), d) {
|
|
1093
|
+
G.value = null, ye.value = !1, U.value = null, ae("selectX", { seriesIndex: null, datapoint: null });
|
|
1094
|
+
return;
|
|
1095
|
+
}
|
|
1096
|
+
if (r) {
|
|
1097
|
+
if (G.value === null) return;
|
|
1098
|
+
bt(G.value);
|
|
1099
|
+
return;
|
|
1100
|
+
}
|
|
1101
|
+
let k = G.value;
|
|
1102
|
+
const M = U.value, P = k !== null && k >= 0 && k < x, N = M !== null && M >= 0 && M < x;
|
|
1103
|
+
P ? c ? (k += 1, k >= x && (k = 0)) : o && (k -= 1, k < 0 && (k = x - 1)) : N ? (k = c ? M + 1 : M - 1, k >= x && (k = 0), k < 0 && (k = x - 1)) : c ? k = 0 : k = x - 1, G.value = k, ql(k), xt(k, "keyboard");
|
|
1104
|
+
}
|
|
1105
|
+
function ql(t) {
|
|
1106
|
+
if (!Number.isFinite(t)) return;
|
|
1107
|
+
let l, a;
|
|
1108
|
+
e.value.orientation === "vertical" ? (l = n.value.left + t * m.value + m.value / 2, a = n.value.top + n.value.height / 2) : (l = n.value.left + n.value.width / 2, a = n.value.top + t * m.value + m.value / 2);
|
|
1109
|
+
const o = zo(l, a, ge.value);
|
|
1110
|
+
o && (Ht.value = o);
|
|
1111
|
+
}
|
|
1112
|
+
const St = g(() => {
|
|
1113
|
+
const t = pe.value?.colNames ?? [], l = pe.value?.body ?? [];
|
|
1114
|
+
return { headers: t, rows: l };
|
|
1115
|
+
});
|
|
1116
|
+
return Wa({
|
|
1117
|
+
getData: zl,
|
|
1118
|
+
getImage: Pl,
|
|
1119
|
+
generatePdf: Qt,
|
|
1120
|
+
generateCsv: kt,
|
|
1121
|
+
generateImage: jt,
|
|
1122
|
+
generateSvg: La,
|
|
1123
|
+
hideSeries: Tl,
|
|
1124
|
+
showSeries: _l,
|
|
1125
|
+
toggleTable: ga,
|
|
1126
|
+
toggleLabels: ma,
|
|
1127
|
+
toggleTooltip: ba,
|
|
1128
|
+
toggleAnnotator: Lt,
|
|
1129
|
+
toggleFullscreen: fa,
|
|
1130
|
+
copyAlt: Ma
|
|
1131
|
+
}), (t, l) => (s(), u("div", {
|
|
1132
|
+
id: `stackbar_${R.value}`,
|
|
1133
|
+
ref_key: "stackbarChart",
|
|
1134
|
+
ref: Q,
|
|
1135
|
+
class: ke({ "vue-data-ui-component": !0, "vue-ui-stackbar": !0, "vue-data-ui-wrapper-fullscreen": Se.value }),
|
|
1136
|
+
style: q(`background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color};font-family:${e.value.style.fontFamily}; position: relative; ${e.value.responsive ? "height: 100%" : ""}`),
|
|
1137
|
+
onMouseenter: il,
|
|
1138
|
+
onMouseleave: ul
|
|
1139
|
+
}, [
|
|
1140
|
+
Z("div", {
|
|
1141
|
+
id: `chart-instructions-${R.value}`,
|
|
1142
|
+
class: "sr-only"
|
|
1143
|
+
}, [
|
|
1144
|
+
Z("p", null, E(e.value.a11y.translations.keyboardNavigation), 1)
|
|
1145
|
+
], 8, Go),
|
|
1146
|
+
St.value?.rows?.length ? (s(), ee(Ho, {
|
|
1147
|
+
key: 0,
|
|
1148
|
+
uid: R.value,
|
|
1149
|
+
head: St.value.headers,
|
|
1150
|
+
body: St.value.rows,
|
|
1151
|
+
notice: e.value.a11y.translations.tableAvailable,
|
|
1152
|
+
caption: e.value.a11y.translations.tableCaption
|
|
1153
|
+
}, null, 8, ["uid", "head", "body", "notice", "caption"])) : f("", !0),
|
|
1154
|
+
e.value.userOptions.buttons.annotator ? (s(), ee(b(Ka), {
|
|
1155
|
+
key: 1,
|
|
1156
|
+
svgRef: b(ge),
|
|
1157
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1158
|
+
color: e.value.style.chart.color,
|
|
1159
|
+
active: $e.value,
|
|
1160
|
+
isCursorPointer: X.value,
|
|
1161
|
+
onClose: Lt
|
|
1162
|
+
}, {
|
|
1163
|
+
"annotator-action-close": C(() => [
|
|
1164
|
+
L(t.$slots, "annotator-action-close", {}, void 0, !0)
|
|
1165
|
+
]),
|
|
1166
|
+
"annotator-action-color": C(({ color: a }) => [
|
|
1167
|
+
L(t.$slots, "annotator-action-color", V(B({ color: a })), void 0, !0)
|
|
1168
|
+
]),
|
|
1169
|
+
"annotator-action-draw": C(({ mode: a }) => [
|
|
1170
|
+
L(t.$slots, "annotator-action-draw", V(B({ mode: a })), void 0, !0)
|
|
1171
|
+
]),
|
|
1172
|
+
"annotator-action-undo": C(({ disabled: a }) => [
|
|
1173
|
+
L(t.$slots, "annotator-action-undo", V(B({ disabled: a })), void 0, !0)
|
|
1174
|
+
]),
|
|
1175
|
+
"annotator-action-redo": C(({ disabled: a }) => [
|
|
1176
|
+
L(t.$slots, "annotator-action-redo", V(B({ disabled: a })), void 0, !0)
|
|
1177
|
+
]),
|
|
1178
|
+
"annotator-action-delete": C(({ disabled: a }) => [
|
|
1179
|
+
L(t.$slots, "annotator-action-delete", V(B({ disabled: a })), void 0, !0)
|
|
1180
|
+
]),
|
|
1181
|
+
_: 3
|
|
1182
|
+
}, 8, ["svgRef", "backgroundColor", "color", "active", "isCursorPointer"])) : f("", !0),
|
|
1183
|
+
L(t.$slots, "userConfig", {}, void 0, !0),
|
|
1184
|
+
e.value.style.chart.title.text ? (s(), u("div", {
|
|
1185
|
+
key: 2,
|
|
1186
|
+
ref_key: "chartTitle",
|
|
1187
|
+
ref: Ft,
|
|
1188
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
1189
|
+
}, [
|
|
1190
|
+
(s(), ee(Eo, {
|
|
1191
|
+
key: `title_${Ot.value}`,
|
|
1192
|
+
config: {
|
|
1193
|
+
title: {
|
|
1194
|
+
cy: "stackbar-title",
|
|
1195
|
+
...e.value.style.chart.title
|
|
1196
|
+
},
|
|
1197
|
+
subtitle: {
|
|
1198
|
+
cy: "stackbar-subtitle",
|
|
1199
|
+
...e.value.style.chart.title.subtitle
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
}, null, 8, ["config"]))
|
|
1203
|
+
], 512)) : f("", !0),
|
|
1204
|
+
Z("div", {
|
|
1205
|
+
id: `legend-top-${R.value}`
|
|
1206
|
+
}, null, 8, Jo),
|
|
1207
|
+
e.value.userOptions.show && Le.value && (b(Jt) || b(ct)) ? (s(), ee(b(Za), {
|
|
1208
|
+
ref_key: "userOptionsRef",
|
|
1209
|
+
ref: ot,
|
|
1210
|
+
key: `user_option_${Nt.value}`,
|
|
1211
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1212
|
+
color: e.value.style.chart.color,
|
|
1213
|
+
isPrinting: b(ht),
|
|
1214
|
+
isImaging: b(dt),
|
|
1215
|
+
uid: R.value,
|
|
1216
|
+
hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
|
|
1217
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
1218
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
1219
|
+
hasSvg: e.value.userOptions.buttons.svg,
|
|
1220
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
1221
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
1222
|
+
hasLabel: e.value.userOptions.buttons.labels,
|
|
1223
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
1224
|
+
hasAltCopy: e.value.userOptions.buttons.altCopy,
|
|
1225
|
+
isFullscreen: Se.value,
|
|
1226
|
+
chartElement: Q.value,
|
|
1227
|
+
position: e.value.userOptions.position,
|
|
1228
|
+
isTooltip: $.value.showTooltip,
|
|
1229
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
1230
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
1231
|
+
isAnnotation: $e.value,
|
|
1232
|
+
callbacks: e.value.userOptions.callbacks,
|
|
1233
|
+
printScale: e.value.userOptions.print.scale,
|
|
1234
|
+
tableDialog: e.value.table.useDialog,
|
|
1235
|
+
isCursorPointer: X.value,
|
|
1236
|
+
onToggleFullscreen: fa,
|
|
1237
|
+
onGeneratePdf: b(Qt),
|
|
1238
|
+
onGenerateCsv: kt,
|
|
1239
|
+
onGenerateImage: Dl,
|
|
1240
|
+
onGenerateSvg: La,
|
|
1241
|
+
onToggleTable: ga,
|
|
1242
|
+
onToggleLabels: ma,
|
|
1243
|
+
onToggleTooltip: ba,
|
|
1244
|
+
onToggleAnnotator: Lt,
|
|
1245
|
+
onCopyAlt: Ma,
|
|
1246
|
+
style: q({
|
|
1247
|
+
visibility: b(Jt) ? b(ct) ? "visible" : "hidden" : "visible"
|
|
1248
|
+
})
|
|
1249
|
+
}, $t({ _: 2 }, [
|
|
1250
|
+
t.$slots.menuIcon ? {
|
|
1251
|
+
name: "menuIcon",
|
|
1252
|
+
fn: C(({ isOpen: a, color: o }) => [
|
|
1253
|
+
L(t.$slots, "menuIcon", V(B({ isOpen: a, color: o })), void 0, !0)
|
|
1254
|
+
]),
|
|
1255
|
+
key: "0"
|
|
1256
|
+
} : void 0,
|
|
1257
|
+
t.$slots.optionTooltip ? {
|
|
1258
|
+
name: "optionTooltip",
|
|
1259
|
+
fn: C(() => [
|
|
1260
|
+
L(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
1261
|
+
]),
|
|
1262
|
+
key: "1"
|
|
1263
|
+
} : void 0,
|
|
1264
|
+
t.$slots.optionPdf ? {
|
|
1265
|
+
name: "optionPdf",
|
|
1266
|
+
fn: C(() => [
|
|
1267
|
+
L(t.$slots, "optionPdf", {}, void 0, !0)
|
|
1268
|
+
]),
|
|
1269
|
+
key: "2"
|
|
1270
|
+
} : void 0,
|
|
1271
|
+
t.$slots.optionCsv ? {
|
|
1272
|
+
name: "optionCsv",
|
|
1273
|
+
fn: C(() => [
|
|
1274
|
+
L(t.$slots, "optionCsv", {}, void 0, !0)
|
|
1275
|
+
]),
|
|
1276
|
+
key: "3"
|
|
1277
|
+
} : void 0,
|
|
1278
|
+
t.$slots.optionImg ? {
|
|
1279
|
+
name: "optionImg",
|
|
1280
|
+
fn: C(() => [
|
|
1281
|
+
L(t.$slots, "optionImg", {}, void 0, !0)
|
|
1282
|
+
]),
|
|
1283
|
+
key: "4"
|
|
1284
|
+
} : void 0,
|
|
1285
|
+
t.$slots.optionSvg ? {
|
|
1286
|
+
name: "optionSvg",
|
|
1287
|
+
fn: C(() => [
|
|
1288
|
+
L(t.$slots, "optionSvg", {}, void 0, !0)
|
|
1289
|
+
]),
|
|
1290
|
+
key: "5"
|
|
1291
|
+
} : void 0,
|
|
1292
|
+
t.$slots.optionTable ? {
|
|
1293
|
+
name: "optionTable",
|
|
1294
|
+
fn: C(() => [
|
|
1295
|
+
L(t.$slots, "optionTable", {}, void 0, !0)
|
|
1296
|
+
]),
|
|
1297
|
+
key: "6"
|
|
1298
|
+
} : void 0,
|
|
1299
|
+
t.$slots.optionLabels ? {
|
|
1300
|
+
name: "optionLabels",
|
|
1301
|
+
fn: C(() => [
|
|
1302
|
+
L(t.$slots, "optionLabels", {}, void 0, !0)
|
|
1303
|
+
]),
|
|
1304
|
+
key: "7"
|
|
1305
|
+
} : void 0,
|
|
1306
|
+
t.$slots.optionFullscreen ? {
|
|
1307
|
+
name: "optionFullscreen",
|
|
1308
|
+
fn: C(({ toggleFullscreen: a, isFullscreen: o }) => [
|
|
1309
|
+
L(t.$slots, "optionFullscreen", V(B({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
|
|
1310
|
+
]),
|
|
1311
|
+
key: "8"
|
|
1312
|
+
} : void 0,
|
|
1313
|
+
t.$slots.optionAnnotator ? {
|
|
1314
|
+
name: "optionAnnotator",
|
|
1315
|
+
fn: C(({ toggleAnnotator: a, isAnnotator: o }) => [
|
|
1316
|
+
L(t.$slots, "optionAnnotator", V(B({ toggleAnnotator: a, isAnnotator: o })), void 0, !0)
|
|
1317
|
+
]),
|
|
1318
|
+
key: "9"
|
|
1319
|
+
} : void 0,
|
|
1320
|
+
t.$slots.optionAltCopy ? {
|
|
1321
|
+
name: "optionAltCopy",
|
|
1322
|
+
fn: C(({ altCopy: a }) => [
|
|
1323
|
+
L(t.$slots, "optionAltCopy", V(B({ altCopy: a })), void 0, !0)
|
|
1324
|
+
]),
|
|
1325
|
+
key: "10"
|
|
1326
|
+
} : void 0
|
|
1327
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "hasAltCopy", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "isCursorPointer", "onGeneratePdf", "style"])) : f("", !0),
|
|
1328
|
+
Z("div", Ko, [
|
|
1329
|
+
(s(), u("svg", {
|
|
1330
|
+
ref_key: "svgRef",
|
|
1331
|
+
ref: ge,
|
|
1332
|
+
xmlns: b(po),
|
|
1333
|
+
"aria-describedby": `chart-instructions-${R.value}`,
|
|
1334
|
+
viewBox: `0 0 ${n.value.chartWidth <= 0 ? 10 : n.value.chartWidth} ${n.value.chartHeight <= 0 ? 10 : n.value.chartHeight}`,
|
|
1335
|
+
class: ke({ "vue-data-ui-loading": b(fe) }),
|
|
1336
|
+
style: q(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`),
|
|
1337
|
+
tabindex: "0",
|
|
1338
|
+
onFocus: Wl,
|
|
1339
|
+
onBlur: Xl,
|
|
1340
|
+
onKeydown: Yl
|
|
1341
|
+
}, [
|
|
1342
|
+
Oe(b(Qa)),
|
|
1343
|
+
t.$slots["chart-background"] ? (s(), u("foreignObject", {
|
|
1344
|
+
key: 0,
|
|
1345
|
+
x: n.value.left,
|
|
1346
|
+
y: n.value.top,
|
|
1347
|
+
width: n.value.width <= 0 ? 10 : n.value.width,
|
|
1348
|
+
height: n.value.height <= 0 ? 10 : n.value.height,
|
|
1349
|
+
style: {
|
|
1350
|
+
pointerEvents: "none"
|
|
1351
|
+
}
|
|
1352
|
+
}, [
|
|
1353
|
+
L(t.$slots, "chart-background", {}, void 0, !0)
|
|
1354
|
+
], 8, Qo)) : f("", !0),
|
|
1355
|
+
e.value.style.chart.bars.gradient.show ? (s(), u("defs", jo, [
|
|
1356
|
+
(s(!0), u(w, null, S(z.value, (a, o) => (s(), u("linearGradient", {
|
|
1357
|
+
id: `gradient_${a.id}`,
|
|
1358
|
+
x1: "0%",
|
|
1359
|
+
y1: "0%",
|
|
1360
|
+
x2: "0%",
|
|
1361
|
+
y2: "100%"
|
|
1362
|
+
}, [
|
|
1363
|
+
Z("stop", {
|
|
1364
|
+
offset: "0%",
|
|
1365
|
+
"stop-color": a.color
|
|
1366
|
+
}, null, 8, ts),
|
|
1367
|
+
Z("stop", {
|
|
1368
|
+
offset: "61.8%",
|
|
1369
|
+
"stop-color": b(xo)(a.color, e.value.style.chart.bars.gradient.intensity / 100)
|
|
1370
|
+
}, null, 8, as),
|
|
1371
|
+
Z("stop", {
|
|
1372
|
+
offset: "100%",
|
|
1373
|
+
"stop-color": a.color
|
|
1374
|
+
}, null, 8, ls)
|
|
1375
|
+
], 8, es))), 256))
|
|
1376
|
+
])) : f("", !0),
|
|
1377
|
+
e.value.style.chart.grid.frame.show ? (s(), u("rect", {
|
|
1378
|
+
key: 2,
|
|
1379
|
+
style: { pointerEvents: "none", transition: "none", animation: "none !important" },
|
|
1380
|
+
x: Math.max(0, n.value.left),
|
|
1381
|
+
y: Math.max(0, n.value.top),
|
|
1382
|
+
width: Math.max(0, n.value.width),
|
|
1383
|
+
height: Math.max(0, n.value.height),
|
|
1384
|
+
fill: "transparent",
|
|
1385
|
+
stroke: e.value.style.chart.grid.frame.stroke,
|
|
1386
|
+
"stroke-width": e.value.style.chart.grid.frame.strokeWidth,
|
|
1387
|
+
"stroke-linecap": e.value.style.chart.grid.frame.strokeLinecap,
|
|
1388
|
+
"stroke-linejoin": e.value.style.chart.grid.frame.strokeLinejoin,
|
|
1389
|
+
"stroke-dasharray": e.value.style.chart.grid.frame.strokeDasharray
|
|
1390
|
+
}, null, 8, os)) : f("", !0),
|
|
1391
|
+
e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "vertical" ? (s(!0), u(w, { key: 3 }, S(Y.value, (a, o) => (s(), u("line", {
|
|
1392
|
+
x1: n.value.left,
|
|
1393
|
+
x2: n.value.right,
|
|
1394
|
+
y1: a.y,
|
|
1395
|
+
y2: a.y,
|
|
1396
|
+
stroke: e.value.style.chart.grid.x.linesColor,
|
|
1397
|
+
"stroke-width": e.value.style.chart.grid.x.linesThickness,
|
|
1398
|
+
"stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
|
|
1399
|
+
"stroke-linecap": "round"
|
|
1400
|
+
}, null, 8, ss))), 256)) : f("", !0),
|
|
1401
|
+
e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "horizontal" ? (s(!0), u(w, { key: 4 }, S(v.value.end - v.value.start + 1, (a, o) => (s(), u("line", {
|
|
1402
|
+
x1: n.value.left,
|
|
1403
|
+
x2: n.value.right,
|
|
1404
|
+
y1: n.value.top + m.value * o,
|
|
1405
|
+
y2: n.value.top + m.value * o,
|
|
1406
|
+
stroke: e.value.style.chart.grid.x.linesColor,
|
|
1407
|
+
"stroke-width": e.value.style.chart.grid.x.linesThickness,
|
|
1408
|
+
"stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
|
|
1409
|
+
"stroke-linecap": "round"
|
|
1410
|
+
}, null, 8, rs))), 256)) : f("", !0),
|
|
1411
|
+
e.value.style.chart.grid.y.showVerticalLines && e.value.orientation === "vertical" ? (s(!0), u(w, { key: 5 }, S(v.value.end - v.value.start + 1, (a, o) => (s(), u("line", {
|
|
1412
|
+
x1: n.value.left + m.value * o,
|
|
1413
|
+
x2: n.value.left + m.value * o,
|
|
1414
|
+
y1: n.value.top,
|
|
1415
|
+
y2: n.value.bottom,
|
|
1416
|
+
stroke: e.value.style.chart.grid.y.linesColor,
|
|
1417
|
+
"stroke-width": e.value.style.chart.grid.y.linesThickness,
|
|
1418
|
+
"stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
|
|
1419
|
+
"stroke-linecap": "round"
|
|
1420
|
+
}, null, 8, ns))), 256)) : f("", !0),
|
|
1421
|
+
e.value.style.chart.grid.y.showVerticalLines && e.value.orientation === "horizontal" ? (s(!0), u(w, { key: 6 }, S(Y.value, (a, o) => (s(), u("line", {
|
|
1422
|
+
x1: a.horizontal_x,
|
|
1423
|
+
x2: a.horizontal_x,
|
|
1424
|
+
y1: n.value.top,
|
|
1425
|
+
y2: n.value.bottom,
|
|
1426
|
+
stroke: e.value.style.chart.grid.y.linesColor,
|
|
1427
|
+
"stroke-width": e.value.style.chart.grid.y.linesThickness,
|
|
1428
|
+
"stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
|
|
1429
|
+
"stroke-linecap": "round"
|
|
1430
|
+
}, null, 8, is))), 256)) : f("", !0),
|
|
1431
|
+
(s(!0), u(w, null, S(z.value, (a, o) => (s(), u("g", null, [
|
|
1432
|
+
t.$slots.pattern ? (s(), u("defs", us, [
|
|
1433
|
+
L(t.$slots, "pattern", De({ ref_for: !0 }, { seriesIndex: a.absoluteIndex, patternId: `pattern_${R.value}_${a.absoluteIndex}` }), void 0, !0)
|
|
1434
|
+
])) : f("", !0),
|
|
1435
|
+
e.value.orientation === "vertical" ? (s(), u(w, { key: 1 }, [
|
|
1436
|
+
(s(!0), u(w, null, S(a.x, (c, r) => (s(), u("rect", {
|
|
1437
|
+
x: c,
|
|
1438
|
+
y: b(de)(a.y[r]),
|
|
1439
|
+
height: a.height[r] < 0 ? 1e-4 : a.height[r] || 0,
|
|
1440
|
+
rx: e.value.style.chart.bars.borderRadius > a.height[r] / 2 ? (a.height[r] < 0 ? 0 : a.height[r]) / 2 : e.value.style.chart.bars.borderRadius,
|
|
1441
|
+
width: m.value * (1 - e.value.style.chart.bars.gapRatio / 2),
|
|
1442
|
+
fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${a.id})` : a.color,
|
|
1443
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1444
|
+
"stroke-width": e.value.style.chart.bars.strokeWidth,
|
|
1445
|
+
"stroke-linecap": "round",
|
|
1446
|
+
"stroke-linejoin": "round",
|
|
1447
|
+
class: ke({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": ie.value })
|
|
1448
|
+
}, null, 10, cs))), 256)),
|
|
1449
|
+
t.$slots.pattern ? (s(), u("g", vs, [
|
|
1450
|
+
(s(!0), u(w, null, S(a.x, (c, r) => (s(), u("rect", {
|
|
1451
|
+
x: c,
|
|
1452
|
+
y: b(de)(a.y[r]),
|
|
1453
|
+
height: a.height[r] < 0 ? 1e-4 : a.height[r] || 0,
|
|
1454
|
+
rx: e.value.style.chart.bars.borderRadius > a.height[r] / 2 ? (a.height[r] < 0 ? 0 : a.height[r]) / 2 : e.value.style.chart.bars.borderRadius,
|
|
1455
|
+
width: m.value * (1 - e.value.style.chart.bars.gapRatio / 2),
|
|
1456
|
+
fill: `url(#pattern_${R.value}_${a.absoluteIndex})`,
|
|
1457
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1458
|
+
"stroke-width": e.value.style.chart.bars.strokeWidth,
|
|
1459
|
+
"stroke-linecap": "round",
|
|
1460
|
+
"stroke-linejoin": "round",
|
|
1461
|
+
class: ke({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": ie.value })
|
|
1462
|
+
}, null, 10, hs))), 256))
|
|
1463
|
+
])) : f("", !0)
|
|
1464
|
+
], 64)) : (s(), u(w, { key: 2 }, [
|
|
1465
|
+
(s(!0), u(w, null, S(a.horizontal_x, (c, r) => (s(), u("rect", {
|
|
1466
|
+
x: b(de)(c, n.value.left),
|
|
1467
|
+
y: a.horizontal_y[r] < 0 ? 0 : a.horizontal_y[r],
|
|
1468
|
+
width: b(de)(a.horizontal_width[r] < 0 ? 1e-4 : a.horizontal_width[r]),
|
|
1469
|
+
rx: e.value.style.chart.bars.borderRadius > a.height[r] / 2 ? (a.height[r] < 0 ? 0 : a.height[r]) / 2 : e.value.style.chart.bars.borderRadius,
|
|
1470
|
+
height: m.value * (1 - e.value.style.chart.bars.gapRatio / 2),
|
|
1471
|
+
fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${a.id})` : a.color,
|
|
1472
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1473
|
+
"stroke-width": e.value.style.chart.bars.strokeWidth,
|
|
1474
|
+
"stroke-linecap": "round",
|
|
1475
|
+
"stroke-linejoin": "round",
|
|
1476
|
+
class: ke({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": ie.value })
|
|
1477
|
+
}, null, 10, ds))), 256)),
|
|
1478
|
+
t.$slots.pattern ? (s(), u("g", ys, [
|
|
1479
|
+
(s(!0), u(w, null, S(a.horizontal_x, (c, r) => (s(), u("rect", {
|
|
1480
|
+
x: b(de)(c, n.value.left),
|
|
1481
|
+
y: a.horizontal_y[r] < 0 ? 0 : a.horizontal_y[r],
|
|
1482
|
+
width: b(de)(a.horizontal_width[r] < 0 ? 1e-4 : a.horizontal_width[r]),
|
|
1483
|
+
rx: e.value.style.chart.bars.borderRadius > a.height[r] / 2 ? (a.height[r] < 0 ? 0 : a.height[r]) / 2 : e.value.style.chart.bars.borderRadius,
|
|
1484
|
+
height: m.value * (1 - e.value.style.chart.bars.gapRatio / 2),
|
|
1485
|
+
fill: `url(#pattern_${R.value}_${a.absoluteIndex})`,
|
|
1486
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1487
|
+
"stroke-width": e.value.style.chart.bars.strokeWidth,
|
|
1488
|
+
"stroke-linecap": "round",
|
|
1489
|
+
"stroke-linejoin": "round",
|
|
1490
|
+
class: ke({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": ie.value })
|
|
1491
|
+
}, null, 10, fs))), 256))
|
|
1492
|
+
])) : f("", !0)
|
|
1493
|
+
], 64))
|
|
1494
|
+
]))), 256)),
|
|
1495
|
+
e.value.style.chart.grid.x.showAxis ? (s(), u("line", {
|
|
1496
|
+
key: 7,
|
|
1497
|
+
x1: n.value.left,
|
|
1498
|
+
x2: n.value.right,
|
|
1499
|
+
y1: n.value.bottom,
|
|
1500
|
+
y2: n.value.bottom,
|
|
1501
|
+
stroke: e.value.style.chart.grid.x.axisColor,
|
|
1502
|
+
"stroke-width": e.value.style.chart.grid.x.axisThickness,
|
|
1503
|
+
"stroke-linecap": "round",
|
|
1504
|
+
"stroke-linejoin": "round"
|
|
1505
|
+
}, null, 8, gs)) : f("", !0),
|
|
1506
|
+
e.value.style.chart.grid.y.showAxis && !e.value.style.chart.bars.distributed ? (s(), u("line", {
|
|
1507
|
+
key: 8,
|
|
1508
|
+
x1: n.value.left,
|
|
1509
|
+
x2: n.value.left,
|
|
1510
|
+
y1: n.value.top,
|
|
1511
|
+
y2: n.value.bottom,
|
|
1512
|
+
stroke: e.value.style.chart.grid.y.axisColor,
|
|
1513
|
+
"stroke-width": e.value.style.chart.grid.y.axisThickness,
|
|
1514
|
+
"stroke-linecap": "round",
|
|
1515
|
+
"stroke-linejoin": "round"
|
|
1516
|
+
}, null, 8, ms)) : f("", !0),
|
|
1517
|
+
e.value.style.chart.grid.x.axisName.show && e.value.style.chart.grid.x.axisName.text ? (s(), u("text", {
|
|
1518
|
+
key: 9,
|
|
1519
|
+
ref_key: "xAxisLabel",
|
|
1520
|
+
ref: Ue,
|
|
1521
|
+
x: n.value.left + n.value.width / 2,
|
|
1522
|
+
y: n.value.chartHeight - 3,
|
|
1523
|
+
"font-size": e.value.style.chart.grid.x.axisName.fontSize,
|
|
1524
|
+
fill: e.value.style.chart.grid.x.axisName.color,
|
|
1525
|
+
"font-weight": e.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
|
|
1526
|
+
"text-anchor": "middle"
|
|
1527
|
+
}, E(e.value.style.chart.grid.x.axisName.text), 9, bs)) : f("", !0),
|
|
1528
|
+
e.value.style.chart.grid.y.axisName.show && e.value.style.chart.grid.y.axisName.text ? (s(), u("text", {
|
|
1529
|
+
key: 10,
|
|
1530
|
+
ref_key: "yAxisLabel",
|
|
1531
|
+
ref: st,
|
|
1532
|
+
transform: `translate(${e.value.style.chart.grid.y.axisName.fontSize}, ${n.value.top + n.value.height / 2}) rotate(-90)`,
|
|
1533
|
+
"font-size": e.value.style.chart.grid.y.axisName.fontSize,
|
|
1534
|
+
fill: e.value.style.chart.grid.y.axisName.color,
|
|
1535
|
+
"font-weight": e.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
|
|
1536
|
+
"text-anchor": "middle"
|
|
1537
|
+
}, E(e.value.style.chart.grid.y.axisName.text), 9, ps)) : f("", !0),
|
|
1538
|
+
$.value.dataLabels.show && e.value.orientation === "vertical" ? (s(), u(w, { key: 11 }, [
|
|
1539
|
+
(s(!0), u(w, null, S(z.value, (a, o) => (s(), u("g", null, [
|
|
1540
|
+
(s(!0), u(w, null, S(a.x, (c, r) => (s(), u(w, null, [
|
|
1541
|
+
ka(a.series[r], a.proportions[r]) ? (s(), u("text", {
|
|
1542
|
+
key: 0,
|
|
1543
|
+
x: c + m.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2,
|
|
1544
|
+
y: a.y[r] + a.height[r] / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
|
|
1545
|
+
"font-size": e.value.style.chart.bars.dataLabels.fontSize,
|
|
1546
|
+
fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? b(Ea)(a.color) : e.value.style.chart.bars.dataLabels.color,
|
|
1547
|
+
"font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
|
|
1548
|
+
"text-anchor": "middle"
|
|
1549
|
+
}, E(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? da(a.proportions[r] * 100, a, o, r) : Ge(a.series[r], a, o, r, a.signedSeries[r])), 9, xs)) : f("", !0)
|
|
1550
|
+
], 64))), 256))
|
|
1551
|
+
]))), 256)),
|
|
1552
|
+
e.value.style.chart.bars.totalValues.show && z.value.length > 1 ? (s(), u("g", {
|
|
1553
|
+
key: 0,
|
|
1554
|
+
ref_key: "sumTop",
|
|
1555
|
+
ref: rl
|
|
1556
|
+
}, [
|
|
1557
|
+
(s(!0), u(w, null, S(ha.value, (a, o) => (s(), u(w, null, [
|
|
1558
|
+
!e.value.style.chart.bars.dataLabels.hideEmptyValues || a.value !== 0 ? (s(), u("text", {
|
|
1559
|
+
key: 0,
|
|
1560
|
+
x: n.value.left + m.value * o + m.value / 2,
|
|
1561
|
+
y: Ul(o),
|
|
1562
|
+
"text-anchor": "middle",
|
|
1563
|
+
"font-size": e.value.style.chart.bars.totalValues.fontSize,
|
|
1564
|
+
"font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
|
|
1565
|
+
fill: e.value.style.chart.bars.totalValues.color
|
|
1566
|
+
}, E(Ge(a.value, a, o, a.sign)), 9, ks)) : f("", !0)
|
|
1567
|
+
], 64))), 256))
|
|
1568
|
+
], 512)) : f("", !0)
|
|
1569
|
+
], 64)) : f("", !0),
|
|
1570
|
+
$.value.dataLabels.show && e.value.orientation === "horizontal" ? (s(), u(w, { key: 12 }, [
|
|
1571
|
+
(s(!0), u(w, null, S(z.value, (a, o) => (s(), u("g", null, [
|
|
1572
|
+
(s(!0), u(w, null, S(a.horizontal_x, (c, r) => (s(), u(w, null, [
|
|
1573
|
+
ka(a.series[r], a.proportions[r]) ? (s(), u("text", {
|
|
1574
|
+
key: 0,
|
|
1575
|
+
x: c + (a.horizontal_width[r] < 0 ? 1e-4 : a.horizontal_width[r]) / 2,
|
|
1576
|
+
y: a.horizontal_y[r] + m.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
|
|
1577
|
+
"font-size": e.value.style.chart.bars.dataLabels.fontSize,
|
|
1578
|
+
fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? b(Ea)(a.color) : e.value.style.chart.bars.dataLabels.color,
|
|
1579
|
+
"font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
|
|
1580
|
+
"text-anchor": "middle"
|
|
1581
|
+
}, E(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? da(a.proportions[r] * 100, a, o, r) : Ge(a.series[r], a, o, r, a.signedSeries[r])), 9, ws)) : f("", !0)
|
|
1582
|
+
], 64))), 256))
|
|
1583
|
+
]))), 256)),
|
|
1584
|
+
e.value.style.chart.bars.totalValues.show && z.value.length > 1 ? (s(), u("g", {
|
|
1585
|
+
key: 0,
|
|
1586
|
+
ref_key: "sumRight",
|
|
1587
|
+
ref: rt
|
|
1588
|
+
}, [
|
|
1589
|
+
(s(!0), u(w, null, S(ha.value, (a, o) => (s(), u(w, null, [
|
|
1590
|
+
!e.value.style.chart.bars.dataLabels.hideEmptyValues || a.value !== 0 ? (s(), u("text", {
|
|
1591
|
+
key: 0,
|
|
1592
|
+
x: Hl(o),
|
|
1593
|
+
y: n.value.top + m.value * o + m.value / 2 + e.value.style.chart.bars.totalValues.fontSize / 3,
|
|
1594
|
+
"text-anchor": "start",
|
|
1595
|
+
"font-size": e.value.style.chart.bars.totalValues.fontSize,
|
|
1596
|
+
"font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
|
|
1597
|
+
fill: e.value.style.chart.bars.totalValues.color
|
|
1598
|
+
}, E(Ge(a.value, a, o, a.sign)), 9, Ls)) : f("", !0)
|
|
1599
|
+
], 64))), 256))
|
|
1600
|
+
], 512)) : f("", !0)
|
|
1601
|
+
], 64)) : f("", !0),
|
|
1602
|
+
e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "vertical" ? (s(), u("g", {
|
|
1603
|
+
key: 13,
|
|
1604
|
+
ref_key: "scaleLabels",
|
|
1605
|
+
ref: ue
|
|
1606
|
+
}, [
|
|
1607
|
+
(s(!0), u(w, null, S(Y.value, (a, o) => (s(), u("line", {
|
|
1608
|
+
x1: n.value.left,
|
|
1609
|
+
x2: n.value.left - 6,
|
|
1610
|
+
y1: a.y,
|
|
1611
|
+
y2: a.y,
|
|
1612
|
+
stroke: e.value.style.chart.grid.x.axisColor,
|
|
1613
|
+
"stroke-width": 1
|
|
1614
|
+
}, null, 8, Cs))), 256)),
|
|
1615
|
+
(s(!0), u(w, null, S(Y.value, (a, o) => (s(), u("text", {
|
|
1616
|
+
x: a.x,
|
|
1617
|
+
y: a.y + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
|
|
1618
|
+
"font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
|
|
1619
|
+
"font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
|
|
1620
|
+
fill: e.value.style.chart.grid.y.axisLabels.color,
|
|
1621
|
+
"text-anchor": "end"
|
|
1622
|
+
}, E(b(we)(
|
|
1623
|
+
e.value.style.chart.grid.y.axisLabels.formatter,
|
|
1624
|
+
a.value,
|
|
1625
|
+
b(ne)({
|
|
1626
|
+
p: e.value.style.chart.bars.dataLabels.prefix,
|
|
1627
|
+
v: a.value,
|
|
1628
|
+
s: e.value.style.chart.bars.dataLabels.suffix,
|
|
1629
|
+
r: e.value.style.chart.grid.y.axisLabels.rounding
|
|
1630
|
+
}),
|
|
1631
|
+
{ datapoint: a }
|
|
1632
|
+
)), 9, Ss))), 256))
|
|
1633
|
+
], 512)) : f("", !0),
|
|
1634
|
+
e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "horizontal" ? (s(), u("g", {
|
|
1635
|
+
key: 14,
|
|
1636
|
+
ref_key: "scaleLabels",
|
|
1637
|
+
ref: ue
|
|
1638
|
+
}, [
|
|
1639
|
+
(s(!0), u(w, null, S(Y.value, (a, o) => (s(), u("line", {
|
|
1640
|
+
x1: a.horizontal_x,
|
|
1641
|
+
x2: a.horizontal_x,
|
|
1642
|
+
y1: n.value.bottom,
|
|
1643
|
+
y2: n.value.bottom + 6,
|
|
1644
|
+
stroke: e.value.style.chart.grid.x.axisColor,
|
|
1645
|
+
"stroke-width": 1,
|
|
1646
|
+
"stroke-linecap": "round"
|
|
1647
|
+
}, null, 8, zs))), 256)),
|
|
1648
|
+
(s(!0), u(w, null, S(Y.value, (a, o) => (s(), u("text", {
|
|
1649
|
+
class: "vue-data-ui-time-label",
|
|
1650
|
+
"font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1651
|
+
"font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
|
|
1652
|
+
fill: e.value.style.chart.grid.y.axisLabels.color,
|
|
1653
|
+
"text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
1654
|
+
transform: `translate(${a.horizontal_x}, ${n.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`
|
|
1655
|
+
}, E(b(we)(
|
|
1656
|
+
e.value.style.chart.grid.y.axisLabels.formatter,
|
|
1657
|
+
a.value,
|
|
1658
|
+
b(ne)({
|
|
1659
|
+
p: e.value.style.chart.bars.dataLabels.prefix,
|
|
1660
|
+
v: a.value,
|
|
1661
|
+
s: e.value.style.chart.bars.dataLabels.suffix,
|
|
1662
|
+
r: e.value.style.chart.grid.y.axisLabels.rounding
|
|
1663
|
+
}),
|
|
1664
|
+
{ datapoint: a }
|
|
1665
|
+
)), 9, Ms))), 256))
|
|
1666
|
+
], 512)) : f("", !0),
|
|
1667
|
+
e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "vertical" ? (s(), u("g", {
|
|
1668
|
+
key: 15,
|
|
1669
|
+
ref_key: "timeLabelsEls",
|
|
1670
|
+
ref: ce
|
|
1671
|
+
}, [
|
|
1672
|
+
t.$slots["time-label"] ? (s(), u("g", _s, [
|
|
1673
|
+
(s(!0), u(w, null, S(gt.value, (a, o) => (s(), u("g", null, [
|
|
1674
|
+
L(t.$slots, "time-label", De({ ref_for: !0 }, {
|
|
1675
|
+
x: n.value.left + m.value * o + m.value / 2,
|
|
1676
|
+
y: n.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY,
|
|
1677
|
+
fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1678
|
+
fill: e.value.style.chart.grid.x.timeLabels.color,
|
|
1679
|
+
transform: `translate(${n.value.left + m.value * o + m.value / 2}, ${n.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`,
|
|
1680
|
+
absoluteIndex: a.absoluteIndex,
|
|
1681
|
+
content: a.text,
|
|
1682
|
+
textAnchor: e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
1683
|
+
show: !0
|
|
1684
|
+
}), void 0, !0)
|
|
1685
|
+
]))), 256))
|
|
1686
|
+
])) : (s(), u("g", Ts, [
|
|
1687
|
+
(s(!0), u(w, null, S(gt.value, (a, o) => (s(), u("g", null, [
|
|
1688
|
+
String(a.text).includes(`
|
|
1689
|
+
`) ? (s(), u("text", {
|
|
1690
|
+
key: o + "-multi",
|
|
1691
|
+
"text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
1692
|
+
"font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1693
|
+
fill: e.value.style.chart.grid.x.timeLabels.color,
|
|
1694
|
+
transform: `
|
|
1695
|
+
translate(
|
|
1696
|
+
${n.value.left + m.value * o + m.value / 2},
|
|
1697
|
+
${n.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}
|
|
1698
|
+
),
|
|
1699
|
+
rotate(${e.value.style.chart.grid.x.timeLabels.rotation})
|
|
1700
|
+
`,
|
|
1701
|
+
style: q({ cursor: X.value ? "pointer" : "default" }),
|
|
1702
|
+
innerHTML: b(ko)({
|
|
1703
|
+
content: String(a.text),
|
|
1704
|
+
fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1705
|
+
fill: e.value.style.chart.grid.x.timeLabels.color,
|
|
1706
|
+
x: 0,
|
|
1707
|
+
y: 0
|
|
1708
|
+
}),
|
|
1709
|
+
onClick: () => Je(a, o)
|
|
1710
|
+
}, null, 12, $s)) : (s(), u("text", {
|
|
1711
|
+
class: "vue-data-ui-time-label",
|
|
1712
|
+
key: o,
|
|
1713
|
+
"text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
1714
|
+
"font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1715
|
+
"font-weight": e.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
|
|
1716
|
+
fill: e.value.style.chart.grid.x.timeLabels.color,
|
|
1717
|
+
transform: `translate(${n.value.left + m.value * o + m.value / 2}, ${n.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`,
|
|
1718
|
+
style: q({ cursor: X.value ? "pointer" : "default" }),
|
|
1719
|
+
onClick: () => Je(a, o)
|
|
1720
|
+
}, E(a.text), 13, As))
|
|
1721
|
+
]))), 256))
|
|
1722
|
+
]))
|
|
1723
|
+
], 512)) : f("", !0),
|
|
1724
|
+
e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "horizontal" ? (s(), u("g", {
|
|
1725
|
+
key: 16,
|
|
1726
|
+
ref_key: "timeLabelsEls",
|
|
1727
|
+
ref: ce
|
|
1728
|
+
}, [
|
|
1729
|
+
t.$slots["time-label"] ? (s(), u("g", Ps, [
|
|
1730
|
+
(s(!0), u(w, null, S(O.value, (a, o) => (s(), u("g", null, [
|
|
1731
|
+
L(t.$slots, "time-label", De({ ref_for: !0 }, {
|
|
1732
|
+
x: n.value.left - 8,
|
|
1733
|
+
y: n.value.top + m.value * o + m.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
|
|
1734
|
+
fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1735
|
+
fill: e.value.style.chart.grid.x.timeLabels.color,
|
|
1736
|
+
transform: null,
|
|
1737
|
+
absoluteIndex: a.absoluteIndex,
|
|
1738
|
+
content: a.text,
|
|
1739
|
+
textAnchor: "end",
|
|
1740
|
+
show: !0
|
|
1741
|
+
}), void 0, !0)
|
|
1742
|
+
]))), 256))
|
|
1743
|
+
])) : (s(), u("g", Ns, [
|
|
1744
|
+
(s(!0), u(w, null, S(O.value, (a, o) => (s(), u("g", null, [
|
|
1745
|
+
String(a.text).includes(`
|
|
1746
|
+
`) ? (s(), u("text", {
|
|
1747
|
+
key: 1,
|
|
1748
|
+
"text-anchor": "end",
|
|
1749
|
+
"font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
|
|
1750
|
+
"font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
|
|
1751
|
+
fill: e.value.style.chart.grid.y.axisLabels.color,
|
|
1752
|
+
x: n.value.left - 8,
|
|
1753
|
+
y: n.value.top + m.value * o + m.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
|
|
1754
|
+
style: q({ cursor: X.value ? "pointer" : "default" }),
|
|
1755
|
+
onClick: () => Je(a, o),
|
|
1756
|
+
innerHTML: b(wo)({
|
|
1757
|
+
content: String(a.text),
|
|
1758
|
+
fontSize: e.value.style.chart.grid.y.axisLabels.fontSize,
|
|
1759
|
+
fill: e.value.style.chart.grid.y.axisLabels.color,
|
|
1760
|
+
x: n.value.left - 8,
|
|
1761
|
+
y: 0
|
|
1762
|
+
})
|
|
1763
|
+
}, null, 12, Is)) : (s(), u("text", {
|
|
1764
|
+
key: 0,
|
|
1765
|
+
"text-anchor": "end",
|
|
1766
|
+
"font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
|
|
1767
|
+
"font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
|
|
1768
|
+
fill: e.value.style.chart.grid.y.axisLabels.color,
|
|
1769
|
+
x: n.value.left - 8,
|
|
1770
|
+
y: n.value.top + m.value * o + m.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
|
|
1771
|
+
style: q({
|
|
1772
|
+
cursor: X.value ? "pointer" : "default"
|
|
1773
|
+
}),
|
|
1774
|
+
onClick: () => Je(a, o)
|
|
1775
|
+
}, E(a.text), 13, Fs))
|
|
1776
|
+
]))), 256))
|
|
1777
|
+
]))
|
|
1778
|
+
], 512)) : f("", !0),
|
|
1779
|
+
$.value.showTooltip && e.value.orientation === "vertical" ? (s(!0), u(w, { key: 17 }, S(v.value.end - v.value.start, (a, o) => (s(), u("rect", {
|
|
1780
|
+
x: n.value.left + o * m.value,
|
|
1781
|
+
y: n.value.top,
|
|
1782
|
+
width: m.value,
|
|
1783
|
+
height: n.value.height < 0 ? 0 : n.value.height,
|
|
1784
|
+
onClick: () => bt(o),
|
|
1785
|
+
onMouseenter: () => xt(o, "pointer"),
|
|
1786
|
+
onMouseleave: () => ya(o),
|
|
1787
|
+
fill: o === U.value || o === it.value ? e.value.style.chart.highlighter.color : "transparent",
|
|
1788
|
+
style: q({ opacity: e.value.style.chart.highlighter.opacity / 100 })
|
|
1789
|
+
}, null, 44, Rs))), 256)) : f("", !0),
|
|
1790
|
+
$.value.showTooltip && e.value.orientation === "horizontal" ? (s(!0), u(w, { key: 18 }, S(v.value.end - v.value.start, (a, o) => (s(), u("rect", {
|
|
1791
|
+
x: n.value.left,
|
|
1792
|
+
y: n.value.top + o * m.value,
|
|
1793
|
+
width: n.value.width < 0 ? 0 : n.value.width,
|
|
1794
|
+
height: m.value,
|
|
1795
|
+
onClick: () => bt(o),
|
|
1796
|
+
onMouseenter: () => xt(o, "pointer"),
|
|
1797
|
+
onMouseleave: () => ya(o),
|
|
1798
|
+
fill: o === U.value || o === it.value ? e.value.style.chart.highlighter.color : "transparent",
|
|
1799
|
+
style: q({ opacity: e.value.style.chart.highlighter.opacity / 100 })
|
|
1800
|
+
}, null, 44, Os))), 256)) : f("", !0),
|
|
1801
|
+
la.value ? (s(), u("rect", De({ key: 19 }, ml.value, {
|
|
1802
|
+
"data-start": v.value.start,
|
|
1803
|
+
"data-end": v.value.end
|
|
1804
|
+
}), null, 16, Ds)) : f("", !0),
|
|
1805
|
+
L(t.$slots, "svg", {
|
|
1806
|
+
svg: {
|
|
1807
|
+
drawingArea: n.value,
|
|
1808
|
+
data: z.value,
|
|
1809
|
+
isPrintingImg: b(ht) | b(dt) | Ve.value,
|
|
1810
|
+
isPrintingSvg: Be.value
|
|
1811
|
+
}
|
|
1812
|
+
}, void 0, !0)
|
|
1813
|
+
], 46, Zo)),
|
|
1814
|
+
t.$slots.hint ? (s(), u("div", Es, [
|
|
1815
|
+
L(t.$slots, "hint", V(B({ hint: e.value.a11y.translations.keyboardNavigation, isVisible: Ct.value })), void 0, !0)
|
|
1816
|
+
])) : f("", !0)
|
|
1817
|
+
]),
|
|
1818
|
+
t.$slots.watermark ? (s(), u("div", Vs, [
|
|
1819
|
+
L(t.$slots, "watermark", V(B({ isPrinting: b(ht) || b(dt) || Ve.value || Be.value })), void 0, !0)
|
|
1820
|
+
])) : f("", !0),
|
|
1821
|
+
e.value.style.chart.zoom.show && Le.value && Sa.value && I.value > 6 ? (s(), ee(Wo, {
|
|
1822
|
+
key: 5,
|
|
1823
|
+
ref_key: "chartSlicer",
|
|
1824
|
+
ref: Ce,
|
|
1825
|
+
allMinimaps: xl.value,
|
|
1826
|
+
background: e.value.style.chart.zoom.color,
|
|
1827
|
+
borderColor: e.value.style.chart.backgroundColor,
|
|
1828
|
+
customFormat: e.value.style.chart.zoom.customFormat,
|
|
1829
|
+
cutNullValues: !1,
|
|
1830
|
+
forceZeroCenter: !0,
|
|
1831
|
+
enableRangeHandles: e.value.style.chart.zoom.enableRangeHandles,
|
|
1832
|
+
enableSelectionDrag: e.value.style.chart.zoom.enableSelectionDrag,
|
|
1833
|
+
end: v.value.end,
|
|
1834
|
+
focusOnDrag: e.value.style.chart.zoom.focusOnDrag,
|
|
1835
|
+
focusRangeRatio: e.value.style.chart.zoom.focusRangeRatio,
|
|
1836
|
+
fontSize: e.value.style.chart.zoom.fontSize,
|
|
1837
|
+
immediate: !e.value.style.chart.zoom.preview.enable,
|
|
1838
|
+
inputColor: e.value.style.chart.zoom.color,
|
|
1839
|
+
isPreview: la.value,
|
|
1840
|
+
labelLeft: e.value.style.chart.grid.x.timeLabels.values[v.value.start] ? O.value?.[0]?.text ?? "" : "",
|
|
1841
|
+
labelRight: e.value.style.chart.grid.x.timeLabels.values[v.value.end - 1] ? O.value?.at(-1)?.text ?? "" : "",
|
|
1842
|
+
max: Math.max(...tt.dataset.map((a) => a.series.length)),
|
|
1843
|
+
min: 0,
|
|
1844
|
+
minimap: ve.value,
|
|
1845
|
+
minimapCompact: e.value.style.chart.zoom.minimap.compact,
|
|
1846
|
+
minimapFrameColor: e.value.style.chart.zoom.minimap.frameColor,
|
|
1847
|
+
minimapIndicatorColor: e.value.style.chart.zoom.minimap.indicatorColor,
|
|
1848
|
+
minimapMerged: !1,
|
|
1849
|
+
minimapSelectedColor: e.value.style.chart.zoom.minimap.selectedColor,
|
|
1850
|
+
minimapSelectedColorOpacity: e.value.style.chart.zoom.minimap.selectedColorOpacity,
|
|
1851
|
+
minimapSelectedIndex: U.value,
|
|
1852
|
+
minimapSelectionRadius: 1,
|
|
1853
|
+
preciseLabels: va.value.length ? va.value : be.value,
|
|
1854
|
+
refreshEndPoint: e.value.style.chart.zoom.endIndex !== null ? e.value.style.chart.zoom.endIndex + 1 : Math.max(...tt.dataset.map((a) => a.series.length)),
|
|
1855
|
+
refreshStartPoint: e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex : 0,
|
|
1856
|
+
selectColor: e.value.style.chart.zoom.highlightColor,
|
|
1857
|
+
selectedSeries: Ll.value,
|
|
1858
|
+
smoothMinimap: !1,
|
|
1859
|
+
start: v.value.start,
|
|
1860
|
+
textColor: e.value.style.chart.color,
|
|
1861
|
+
timeLabels: be.value,
|
|
1862
|
+
usePreciseLabels: e.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !e.value.style.chart.zoom.useDefaultFormat,
|
|
1863
|
+
valueEnd: v.value.end,
|
|
1864
|
+
valueStart: v.value.start,
|
|
1865
|
+
verticalHandles: e.value.style.chart.zoom.minimap.verticalHandles,
|
|
1866
|
+
maxWidth: e.value.style.chart.zoom.maxWidth,
|
|
1867
|
+
isCursorPointer: X.value,
|
|
1868
|
+
additionalMinimapHeight: e.value.style.chart.zoom.minimap.additionalHeight,
|
|
1869
|
+
handleType: e.value.style.chart.zoom.minimap.handleType,
|
|
1870
|
+
handleIconColor: e.value.style.chart.zoom.minimap.handleIconColor,
|
|
1871
|
+
handleBorderWidth: e.value.style.chart.zoom.minimap.handleBorderWidth,
|
|
1872
|
+
handleBorderColor: e.value.style.chart.zoom.minimap.handleBorderColor,
|
|
1873
|
+
handleFill: e.value.style.chart.zoom.minimap.handleFill,
|
|
1874
|
+
handleWidth: e.value.style.chart.zoom.minimap.handleWidth,
|
|
1875
|
+
"onUpdate:end": Vl,
|
|
1876
|
+
"onUpdate:start": El,
|
|
1877
|
+
onTrapMouse: bl,
|
|
1878
|
+
onReset: sa,
|
|
1879
|
+
onFutureEnd: l[0] || (l[0] = (a) => oa("end", a)),
|
|
1880
|
+
onFutureStart: l[1] || (l[1] = (a) => oa("start", a))
|
|
1881
|
+
}, {
|
|
1882
|
+
"reset-action": C(({ reset: a }) => [
|
|
1883
|
+
L(t.$slots, "reset-action", V(B({ reset: a })), void 0, !0)
|
|
1884
|
+
]),
|
|
1885
|
+
slotMap: C(({ width: a, height: o, unitW: c }) => [
|
|
1886
|
+
(s(!0), u(w, null, S(z.value, (r) => (s(), u("g", {
|
|
1887
|
+
key: r.id
|
|
1888
|
+
}, [
|
|
1889
|
+
(s(!0), u(w, null, S(r.xMinimap({ left: 0, unitW: c }), (d, x) => (s(), u("rect", {
|
|
1890
|
+
key: x,
|
|
1891
|
+
x: x === 0 ? d - c * (e.value.style.chart.bars.gapRatio / 4) : d - c / 2,
|
|
1892
|
+
y: Math.max(0, Math.min(o, r.yMinimap({ minimapH: o })[x])),
|
|
1893
|
+
height: r.heightMinimap({ minimapH: o })[x],
|
|
1894
|
+
width: [0, I.value - 1].includes(x) ? c * (1 - e.value.style.chart.bars.gapRatio / 2) / 2 : c * (1 - e.value.style.chart.bars.gapRatio / 2),
|
|
1895
|
+
fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${r.id})` : r.color,
|
|
1896
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1897
|
+
"stroke-width": 0.5,
|
|
1898
|
+
rx: "0",
|
|
1899
|
+
"stroke-linecap": "round",
|
|
1900
|
+
"stroke-linejoin": "round",
|
|
1901
|
+
style: q({
|
|
1902
|
+
opacity: x >= W.value.start && x <= W.value.end ? 1 : 0.62
|
|
1903
|
+
})
|
|
1904
|
+
}, null, 12, Bs))), 128))
|
|
1905
|
+
]))), 128))
|
|
1906
|
+
]),
|
|
1907
|
+
_: 3
|
|
1908
|
+
}, 8, ["allMinimaps", "background", "borderColor", "customFormat", "enableRangeHandles", "enableSelectionDrag", "end", "focusOnDrag", "focusRangeRatio", "fontSize", "immediate", "inputColor", "isPreview", "labelLeft", "labelRight", "max", "minimap", "minimapCompact", "minimapFrameColor", "minimapIndicatorColor", "minimapSelectedColor", "minimapSelectedColorOpacity", "minimapSelectedIndex", "preciseLabels", "refreshEndPoint", "refreshStartPoint", "selectColor", "selectedSeries", "start", "textColor", "timeLabels", "usePreciseLabels", "valueEnd", "valueStart", "verticalHandles", "maxWidth", "isCursorPointer", "additionalMinimapHeight", "handleType", "handleIconColor", "handleBorderWidth", "handleBorderColor", "handleFill", "handleWidth"])) : f("", !0),
|
|
1909
|
+
Oe(b(Ya), {
|
|
1910
|
+
teleportTo: e.value.style.chart.tooltip.teleportTo,
|
|
1911
|
+
show: $.value.showTooltip && ye.value,
|
|
1912
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
1913
|
+
color: e.value.style.chart.tooltip.color,
|
|
1914
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
1915
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
1916
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
1917
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
1918
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
1919
|
+
position: e.value.style.chart.tooltip.position,
|
|
1920
|
+
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
1921
|
+
parent: Q.value,
|
|
1922
|
+
content: lt.value,
|
|
1923
|
+
isFullscreen: Se.value,
|
|
1924
|
+
isCustom: b(Va)(e.value.style.chart.tooltip.customFormat),
|
|
1925
|
+
smooth: e.value.style.chart.tooltip.smooth,
|
|
1926
|
+
backdropFilter: e.value.style.chart.tooltip.backdropFilter,
|
|
1927
|
+
smoothForce: e.value.style.chart.tooltip.smoothForce,
|
|
1928
|
+
smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold,
|
|
1929
|
+
isA11yMode: Wt.value === "keyboard",
|
|
1930
|
+
a11yPosition: Ht.value
|
|
1931
|
+
}, {
|
|
1932
|
+
"tooltip-before": C(() => [
|
|
1933
|
+
L(t.$slots, "tooltip-before", V(B({ ...at.value })), void 0, !0)
|
|
1934
|
+
]),
|
|
1935
|
+
"tooltip-after": C(() => [
|
|
1936
|
+
L(t.$slots, "tooltip-after", V(B({ ...at.value })), void 0, !0)
|
|
1937
|
+
]),
|
|
1938
|
+
_: 3
|
|
1939
|
+
}, 8, ["teleportTo", "show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold", "isA11yMode", "a11yPosition"]),
|
|
1940
|
+
Z("div", {
|
|
1941
|
+
id: `legend-bottom-${R.value}`
|
|
1942
|
+
}, null, 8, Us),
|
|
1943
|
+
Dt.value ? (s(), ee(co, {
|
|
1944
|
+
key: 6,
|
|
1945
|
+
to: e.value.style.chart.legend.position === "top" ? `#legend-top-${R.value}` : `#legend-bottom-${R.value}`
|
|
1946
|
+
}, [
|
|
1947
|
+
Z("div", {
|
|
1948
|
+
ref_key: "chartLegend",
|
|
1949
|
+
ref: It
|
|
1950
|
+
}, [
|
|
1951
|
+
e.value.style.chart.legend.show ? (s(), ee(Uo, {
|
|
1952
|
+
key: 0,
|
|
1953
|
+
legendSet: Ae.value,
|
|
1954
|
+
config: Al.value,
|
|
1955
|
+
isCursorPointer: X.value,
|
|
1956
|
+
onClickMarker: l[2] || (l[2] = ({ legend: a }) => a.segregate())
|
|
1957
|
+
}, $t({
|
|
1958
|
+
item: C(({ legend: a }) => [
|
|
1959
|
+
b(fe) ? f("", !0) : (s(), u("div", {
|
|
1960
|
+
key: 0,
|
|
1961
|
+
onClick: (o) => a.segregate(),
|
|
1962
|
+
style: q(`opacity:${A.value.includes(a.id) ? 0.5 : 1}`)
|
|
1963
|
+
}, E(a.name), 13, Hs))
|
|
1964
|
+
]),
|
|
1965
|
+
legendToggle: C(() => [
|
|
1966
|
+
Ae.value.length > 2 && e.value.style.chart.legend.selectAllToggle.show && !b(fe) ? (s(), ee(Xo, {
|
|
1967
|
+
key: 0,
|
|
1968
|
+
backgroundColor: e.value.style.chart.legend.selectAllToggle.backgroundColor,
|
|
1969
|
+
color: e.value.style.chart.legend.selectAllToggle.color,
|
|
1970
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
1971
|
+
checked: A.value.length > 0,
|
|
1972
|
+
isCursorPointer: X.value,
|
|
1973
|
+
onToggle: Ml
|
|
1974
|
+
}, null, 8, ["backgroundColor", "color", "fontSize", "checked", "isCursorPointer"])) : f("", !0)
|
|
1975
|
+
]),
|
|
1976
|
+
_: 2
|
|
1977
|
+
}, [
|
|
1978
|
+
t.$slots.pattern ? {
|
|
1979
|
+
name: "legend-pattern",
|
|
1980
|
+
fn: C(({ legend: a, index: o }) => [
|
|
1981
|
+
Oe(Vo, {
|
|
1982
|
+
shape: a.shape,
|
|
1983
|
+
radius: 30,
|
|
1984
|
+
stroke: "none",
|
|
1985
|
+
plot: { x: 30, y: 30 },
|
|
1986
|
+
fill: `url(#pattern_${R.value}_${o})`
|
|
1987
|
+
}, null, 8, ["shape", "fill"])
|
|
1988
|
+
]),
|
|
1989
|
+
key: "0"
|
|
1990
|
+
} : void 0
|
|
1991
|
+
]), 1032, ["legendSet", "config", "isCursorPointer"])) : L(t.$slots, "legend", {
|
|
1992
|
+
key: 1,
|
|
1993
|
+
legend: Ae.value
|
|
1994
|
+
}, void 0, !0)
|
|
1995
|
+
], 512)
|
|
1996
|
+
], 8, ["to"])) : f("", !0),
|
|
1997
|
+
t.$slots.source ? (s(), u("div", {
|
|
1998
|
+
key: 7,
|
|
1999
|
+
ref_key: "source",
|
|
2000
|
+
ref: Rt,
|
|
2001
|
+
dir: "auto"
|
|
2002
|
+
}, [
|
|
2003
|
+
L(t.$slots, "source", {}, void 0, !0)
|
|
2004
|
+
], 512)) : f("", !0),
|
|
2005
|
+
Le.value && e.value.userOptions.buttons.table ? (s(), ee(vo(Pe.value.component), De({ key: 8 }, Pe.value.props, {
|
|
2006
|
+
ref_key: "tableUnit",
|
|
2007
|
+
ref: ze,
|
|
2008
|
+
onClose: wa
|
|
2009
|
+
}), $t({
|
|
2010
|
+
content: C(() => [
|
|
2011
|
+
Oe(b(Ja), {
|
|
2012
|
+
colNames: pe.value.colNames,
|
|
2013
|
+
head: pe.value.head,
|
|
2014
|
+
body: pe.value.body,
|
|
2015
|
+
config: pe.value.config,
|
|
2016
|
+
title: e.value.table.useDialog ? "" : Pe.value.title,
|
|
2017
|
+
withCloseButton: !e.value.table.useDialog,
|
|
2018
|
+
isCursorPointer: X.value,
|
|
2019
|
+
onClose: wa
|
|
2020
|
+
}, {
|
|
2021
|
+
th: C(({ th: a }) => [
|
|
2022
|
+
Z("div", { innerHTML: a }, null, 8, Ws)
|
|
2023
|
+
]),
|
|
2024
|
+
td: C(({ td: a }) => [
|
|
2025
|
+
Pa(E(isNaN(Number(a)) ? a : b(ne)({
|
|
2026
|
+
p: e.value.style.chart.bars.dataLabels.prefix,
|
|
2027
|
+
v: a,
|
|
2028
|
+
s: e.value.style.chart.bars.dataLabels.suffix,
|
|
2029
|
+
r: e.value.table.td.roundingValue
|
|
2030
|
+
})), 1)
|
|
2031
|
+
]),
|
|
2032
|
+
_: 1
|
|
2033
|
+
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton", "isCursorPointer"])
|
|
2034
|
+
]),
|
|
2035
|
+
_: 2
|
|
2036
|
+
}, [
|
|
2037
|
+
e.value.table.useDialog ? {
|
|
2038
|
+
name: "title",
|
|
2039
|
+
fn: C(() => [
|
|
2040
|
+
Pa(E(Pe.value.title), 1)
|
|
2041
|
+
]),
|
|
2042
|
+
key: "0"
|
|
2043
|
+
} : void 0,
|
|
2044
|
+
e.value.table.useDialog ? {
|
|
2045
|
+
name: "actions",
|
|
2046
|
+
fn: C(() => [
|
|
2047
|
+
Z("button", {
|
|
2048
|
+
tabindex: "0",
|
|
2049
|
+
class: "vue-ui-user-options-button",
|
|
2050
|
+
onClick: l[3] || (l[3] = (a) => kt(e.value.userOptions.callbacks.csv)),
|
|
2051
|
+
style: q({ cursor: X.value ? "pointer" : "default" })
|
|
2052
|
+
}, [
|
|
2053
|
+
Oe(b(qa), {
|
|
2054
|
+
name: "fileCsv",
|
|
2055
|
+
stroke: Pe.value.props.color
|
|
2056
|
+
}, null, 8, ["stroke"])
|
|
2057
|
+
], 4)
|
|
2058
|
+
]),
|
|
2059
|
+
key: "1"
|
|
2060
|
+
} : void 0
|
|
2061
|
+
]), 1040)) : f("", !0),
|
|
2062
|
+
L(t.$slots, "skeleton", {}, () => [
|
|
2063
|
+
b(fe) ? (s(), ee($o, { key: 0 })) : f("", !0)
|
|
2064
|
+
], !0)
|
|
2065
|
+
], 46, qo));
|
|
2066
|
+
}
|
|
2067
|
+
}, gr = /* @__PURE__ */ Yo(Xs, [["__scopeId", "data-v-c875bbb3"]]);
|
|
2068
|
+
export {
|
|
2069
|
+
gr as default
|
|
2070
|
+
};
|