vue-data-ui 3.25.3 → 3.25.5
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 +13 -13
- package/dist/{Arrow-Bvx4_tSN.js → Arrow-DLn-pcrh.js} +1 -1
- package/dist/{BaseDraggableDialog-BCQY4Tir.js → BaseDraggableDialog-BM_R41j8.js} +2 -2
- package/dist/{BaseIcon-CVrQHhw1.js → BaseIcon-t83PDe9k.js} +1 -1
- package/dist/{BaseLegendToggle-BF-thEu0.js → BaseLegendToggle-__JnV08B.js} +1 -1
- package/dist/{BaseZoomControls-BAHeLgV8.js → BaseZoomControls-Xo16vFa4.js} +2 -2
- package/dist/{ColorPicker-B0CMtFkc.js → ColorPicker-Bn3MY7eL.js} +103 -101
- package/dist/{DataTable-BBpTEQY5.js → DataTable-COIO9gi4.js} +2 -2
- package/dist/{HillActions-ChMsbYib.js → HillActions-Cl-dNBZR.js} +1 -1
- package/dist/{Legend-DmitJZi5.js → Legend-X4kF4PvW.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DNIpZGOP.js → NonSvgPenAndPaper-KXRhcsxM.js} +12 -12
- package/dist/{PackageVersion-hRJtldYi.js → PackageVersion-M2Ws-VwJ.js} +1 -1
- package/dist/{PenAndPaper-DzM1vUXR.js → PenAndPaper-BgH3m_LP.js} +30 -14
- package/dist/{Shape-BBKymE00.js → Shape-CIqU-p2F.js} +1 -1
- package/dist/{SlicerPreview-W4PWXK69.js → SlicerPreview-GvsdvE-h.js} +27 -27
- package/dist/{SparkTooltip-9hXY74AD.js → SparkTooltip-C-Y-mDrc.js} +1 -1
- package/dist/{Title-DIf1lG-_.js → Title-CPHi-evi.js} +1 -1
- package/dist/{Tooltip-C3jBTIhR.js → Tooltip-hhrkQ3Lk.js} +1 -1
- package/dist/{UserOptions-m0uxKoiy.js → UserOptions-f3Q0nqrj.js} +2 -2
- 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-hill.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-label.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-DPcw-QzB.js → dom-to-png-C6cQJ5Hq.js} +1 -1
- package/dist/{exposedLib-BGrCpxDo.js → exposedLib-CG3aXJ-v.js} +9 -9
- package/dist/{img-IjqD_xWl.js → img-DhGApYG0.js} +1 -1
- package/dist/{labelUtils-Bgt85NUY.js → labelUtils-BXX2NzRe.js} +1 -1
- package/dist/{lib-C7t_vY8w.js → lib-Dql7cqyA.js} +200 -177
- package/dist/{package-NccReU84.js → package-ta2JoIjx.js} +1 -1
- package/dist/{pdf-HBji623H.js → pdf-Di5yPEw9.js} +1 -1
- package/dist/{render-common-CHj9aLwI.js → render-common-bvOuxfN3.js} +2 -2
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +70 -1
- package/dist/types/vue-ui-annotator.d.ts +58 -2
- package/dist/{useConfig-CyCVHo81.js → useConfig-C_mX5pOZ.js} +1329 -1313
- package/dist/{useNestedProp-BfTgFMXF.js → useNestedProp-Chvyfpl-.js} +1 -1
- package/dist/{useObjectBindings-ByORl1rV.js → useObjectBindings-uXpBcVyo.js} +1 -1
- package/dist/{usePrinter-VVTuFI6H.js → usePrinter-DISD7q5m.js} +2 -2
- package/dist/utils.js +3 -3
- package/dist/{vue-data-ui-xQI9KcZd.js → vue-data-ui-BjdCpsRV.js} +70 -70
- package/dist/vue-data-ui.js +74 -74
- package/dist/vue-ui-3d-bar-C0aLR6lw.js +1831 -0
- package/dist/{vue-ui-accordion-DuARUUdY.js → vue-ui-accordion-DRf3NQyH.js} +4 -4
- package/dist/{vue-ui-age-pyramid-D-ggLbES.js → vue-ui-age-pyramid-DUcB3lYs.js} +219 -217
- package/dist/vue-ui-annotator-DZ0O8Xa5.js +3325 -0
- package/dist/vue-ui-bullet-DIOCMF2H.js +702 -0
- package/dist/{vue-ui-bump-DiH9-DLV.js → vue-ui-bump-DoHnD1Xy.js} +59 -57
- package/dist/{vue-ui-candlestick-B486ChH8.js → vue-ui-candlestick-Cf8TYPl5.js} +453 -447
- package/dist/vue-ui-carousel-table-k1cBJ1i1.js +467 -0
- package/dist/{vue-ui-chestnut-DGESmviK.js → vue-ui-chestnut-BMAuaeif.js} +278 -276
- package/dist/{vue-ui-chord-DQJ7RuvS.js → vue-ui-chord-DCe2iPjk.js} +37 -35
- package/dist/{vue-ui-circle-pack-YXuSpTIB.js → vue-ui-circle-pack-Eb5hS_z3.js} +34 -32
- package/dist/{vue-ui-cursor-Dju_nWZh.js → vue-ui-cursor-CQWLyEx0.js} +4 -4
- package/dist/{vue-ui-dag-C2f1v-IC.js → vue-ui-dag-BqlsutMj.js} +80 -78
- package/dist/{vue-ui-dashboard-pNI0se0n.js → vue-ui-dashboard-Be3MmkgS.js} +77 -75
- package/dist/{vue-ui-digits-C5Z_lpSZ.js → vue-ui-digits-BqdfbcKX.js} +4 -4
- package/dist/vue-ui-donut-CuQVKuZa.js +2415 -0
- package/dist/{vue-ui-donut-evolution-DQn-87Ak.js → vue-ui-donut-evolution-DckruxZ9.js} +378 -376
- package/dist/{vue-ui-donut-DZXYGFJc.js → vue-ui-donut-gzGZ42uH.js} +102 -102
- package/dist/{vue-ui-dumbbell-CDtBLV2m.js → vue-ui-dumbbell-BYU-hh2E.js} +142 -140
- package/dist/{vue-ui-flow-B0L2gQ3k.js → vue-ui-flow-DLRcNDLc.js} +46 -44
- package/dist/vue-ui-funnel-DjoqNN1U.js +749 -0
- package/dist/{vue-ui-galaxy-yF4pKrlD.js → vue-ui-galaxy-BhR4IOra.js} +249 -247
- package/dist/vue-ui-gauge-Cq161Kwp.js +934 -0
- package/dist/{vue-ui-geo-CFz30xe0.js → vue-ui-geo-Ca8kPYr-.js} +41 -39
- package/dist/{vue-ui-gizmo-ys9jjs02.js → vue-ui-gizmo-wUqHJICb.js} +4 -4
- package/dist/{vue-ui-heatmap-qigx4Z5I.js → vue-ui-heatmap-Bl5ymvi9.js} +186 -184
- package/dist/{vue-ui-hill-K3JKKF1b.js → vue-ui-hill-D6Y9Xy2K.js} +14 -12
- package/dist/vue-ui-history-plot-CvVjsdCL.js +1698 -0
- package/dist/vue-ui-horizontal-bar-3on3-H3B.js +1711 -0
- package/dist/{vue-ui-kpi-0W2GpUBQ.js → vue-ui-kpi-CUpRRIUf.js} +4 -4
- package/dist/{vue-ui-label-CBM2b0Aq.js → vue-ui-label-DR2qUZOG.js} +65 -65
- package/dist/{vue-ui-mini-loader-C-2BQ3hi.js → vue-ui-mini-loader-D8W-fERs.js} +3 -3
- package/dist/vue-ui-molecule-BExVLLgE.js +929 -0
- package/dist/{vue-ui-mood-radar-VCVoA-i7.js → vue-ui-mood-radar-TW251icr.js} +205 -203
- package/dist/{vue-ui-nested-donuts-CFPhvIy3.js → vue-ui-nested-donuts-CWzJKr3S.js} +129 -127
- package/dist/{vue-ui-onion-BMucjktR.js → vue-ui-onion-VaYZQK5i.js} +124 -122
- package/dist/{vue-ui-parallel-coordinate-plot-BhahYf50.js → vue-ui-parallel-coordinate-plot-RM25bxtf.js} +380 -378
- package/dist/{vue-ui-quadrant-77idomwS.js → vue-ui-quadrant-Dmtwow7n.js} +51 -49
- package/dist/{vue-ui-quick-chart-CNKuNur5.js → vue-ui-quick-chart-Cswm3_eI.js} +190 -188
- package/dist/{vue-ui-radar-CuT1AXHF.js → vue-ui-radar-C3GYthqu.js} +315 -313
- package/dist/{vue-ui-rating-CTuSylET.js → vue-ui-rating-CBdDXL80.js} +3 -3
- package/dist/vue-ui-relation-circle-BA0qy0kp.js +905 -0
- package/dist/{vue-ui-ridgeline-CijnGJ6-.js → vue-ui-ridgeline-C5skjBTe.js} +353 -344
- package/dist/{vue-ui-rings-DDGKIiGT.js → vue-ui-rings-BJ8yEQMw.js} +332 -330
- package/dist/vue-ui-scatter-DXg8ESgr.js +2405 -0
- package/dist/{vue-ui-skeleton-Clzzx8hc.js → vue-ui-skeleton-D_u8EWeW.js} +60 -60
- package/dist/{vue-ui-smiley-DILPVI14.js → vue-ui-smiley-DQOp87rr.js} +3 -3
- package/dist/{vue-ui-spark-trend-CYIyrTQj.js → vue-ui-spark-trend-CjCufXof.js} +9 -9
- package/dist/{vue-ui-sparkbar-C2HcYmPm.js → vue-ui-sparkbar-BniEM15a.js} +142 -142
- package/dist/{vue-ui-sparkgauge-BLJ0mImj.js → vue-ui-sparkgauge-BtyCrqTQ.js} +33 -33
- package/dist/{vue-ui-sparkhistogram-1FYy_qM3.js → vue-ui-sparkhistogram-DQdn3PW1.js} +27 -27
- package/dist/{vue-ui-sparkline-C11KKbIn.js → vue-ui-sparkline-9qkNNZG6.js} +254 -254
- package/dist/vue-ui-sparkstackbar-BXQlOdOk.js +738 -0
- package/dist/vue-ui-stackbar-CkjicNDv.js +2355 -0
- package/dist/vue-ui-stackline-BB1IZta8.js +2469 -0
- package/dist/vue-ui-strip-plot-DGLGuH6e.js +1740 -0
- package/dist/vue-ui-table-BXz_HY2g.js +1352 -0
- package/dist/{vue-ui-table-heatmap-Dj06PSQK.js → vue-ui-table-heatmap-XmDK1aHJ.js} +10 -10
- package/dist/{vue-ui-table-sparkline-1h7A5F1N.js → vue-ui-table-sparkline-MTEw3imE.js} +14 -14
- package/dist/{vue-ui-thermometer-CVKlj7fU.js → vue-ui-thermometer-CLx3SPRv.js} +36 -34
- package/dist/{vue-ui-timer-BWz6K56E.js → vue-ui-timer-BDWUNb6t.js} +6 -6
- package/dist/{vue-ui-tiremarks-D26MLo5F.js → vue-ui-tiremarks-DoaypTC-.js} +11 -9
- package/dist/{vue-ui-treemap-33VL-HnF.js → vue-ui-treemap-Bv7PgpiC.js} +45 -43
- package/dist/vue-ui-waffle-z2DhvSAx.js +1621 -0
- package/dist/{vue-ui-wheel-BPbR_-t8.js → vue-ui-wheel-DYLBJuFb.js} +31 -29
- package/dist/{vue-ui-word-cloud-RFcpvswb.js → vue-ui-word-cloud-CbpEhSdL.js} +32 -30
- package/dist/{vue-ui-world-CseHQjz7.js → vue-ui-world-C2atz4Xm.js} +120 -118
- package/dist/{vue-ui-xy-D_biv7Wg.js → vue-ui-xy-B3DQ6t46.js} +1496 -1490
- package/dist/{vue-ui-xy-C3UI9YIM.js → vue-ui-xy-CpA0W6zM.js} +424 -423
- package/dist/{vue-ui-xy-canvas-R1I0sffy.js → vue-ui-xy-canvas-CJefORWc.js} +78 -78
- package/package.json +1 -1
- package/dist/vue-ui-3d-bar-Cf5mJEzr.js +0 -1829
- package/dist/vue-ui-annotator-MvDwnq7k.js +0 -2886
- package/dist/vue-ui-bullet-DWe51l3b.js +0 -700
- package/dist/vue-ui-carousel-table-BPNQQVsu.js +0 -467
- package/dist/vue-ui-donut-CaMaNvIF.js +0 -2413
- package/dist/vue-ui-funnel-G5nO77o5.js +0 -747
- package/dist/vue-ui-gauge-DA92q6HZ.js +0 -932
- package/dist/vue-ui-history-plot-DUoXwHLn.js +0 -1696
- package/dist/vue-ui-horizontal-bar-C51hv9PU.js +0 -1709
- package/dist/vue-ui-molecule-B1ChvZql.js +0 -929
- package/dist/vue-ui-relation-circle-DxONGvTM.js +0 -903
- package/dist/vue-ui-scatter-Cwlhv9y6.js +0 -2403
- package/dist/vue-ui-sparkstackbar-B4H_cgzW.js +0 -738
- package/dist/vue-ui-stackbar-CBOAAVtS.js +0 -2349
- package/dist/vue-ui-stackline-24PeB3yN.js +0 -2463
- package/dist/vue-ui-strip-plot-C3Q1lECl.js +0 -1738
- package/dist/vue-ui-table-DMJWplCT.js +0 -1352
- package/dist/vue-ui-waffle-DIFpyE2V.js +0 -1619
|
@@ -0,0 +1,2355 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { $ as t, Ct as n, D as r, G as a, Jt as o, K as s, Lt as c, Pt as l, S as u, X as d, Yt as f, Zt as p, _ as ee, bt as te, c as ne, ft as re, ht as ie, i as ae, jt as oe, lt as se, nt as ce, pt as le, q as ue, qt as de, r as fe, st as m, t as pe, v as me, w as he } from "./lib-Dql7cqyA.js";
|
|
3
|
+
import { n as ge, t as _e } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { n as ve, r as ye, t as be } from "./useTimeLabels-d2f-W1L4.js";
|
|
5
|
+
import { t as xe } from "./useConfig-C_mX5pOZ.js";
|
|
6
|
+
import { t as Se } from "./usePrinter-DISD7q5m.js";
|
|
7
|
+
import { n as Ce, t as we } from "./BaseScanner-DZvpgOjM.js";
|
|
8
|
+
import { t as Te } from "./useNestedProp-Chvyfpl-.js";
|
|
9
|
+
import { t as Ee } from "./useThemeCheck-C43Tcqmk.js";
|
|
10
|
+
import { t as De } from "./useChartExport-iwOqiIWX.js";
|
|
11
|
+
import { t as Oe } from "./useTransitions-g_zBREk2.js";
|
|
12
|
+
import { t as ke } from "./useStableElementSize-C7KADDKj.js";
|
|
13
|
+
import { t as Ae } from "./useTimeLabelCollider-AEcY4Ioe.js";
|
|
14
|
+
import { t as je } from "./img-DhGApYG0.js";
|
|
15
|
+
import { n as Me } from "./Title-CPHi-evi.js";
|
|
16
|
+
import { t as Ne } from "./Shape-CIqU-p2F.js";
|
|
17
|
+
import { t as Pe } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
18
|
+
import { l as Fe, t as Ie } from "./useResponsive-ZtArZtUf.js";
|
|
19
|
+
import { t as Le } from "./DefGrad-DVBqDjhO.js";
|
|
20
|
+
import { t as Re } from "./SlicerPreview-GvsdvE-h.js";
|
|
21
|
+
import { t as ze } from "./BaseLegendToggle-__JnV08B.js";
|
|
22
|
+
import { t as Be } from "./A11yDataTable-DdRsVULz.js";
|
|
23
|
+
import { t as Ve } from "./useUserOptionState-DK-_1ddE.js";
|
|
24
|
+
import { t as He } from "./useChartAccessibility-DYqac8yF.js";
|
|
25
|
+
import { t as Ue } from "./Legend-X4kF4PvW.js";
|
|
26
|
+
import { t as We } from "./vue_ui_stackbar-COOrQQdK.js";
|
|
27
|
+
import { Fragment as h, Teleport as Ge, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as Ke, createSlots as qe, createTextVNode as Je, createVNode as Ye, defineAsyncComponent as Xe, guardReactiveProps as b, mergeProps as Ze, nextTick as Qe, normalizeClass as x, normalizeProps as S, normalizeStyle as C, onBeforeUnmount as $e, onMounted as et, openBlock as w, ref as T, renderList as E, renderSlot as D, resolveDynamicComponent as tt, shallowRef as nt, toDisplayString as O, toRefs as rt, unref as k, useSlots as it, watch as at, watchEffect as ot, withCtx as A } from "vue";
|
|
28
|
+
//#region src/components/vue-ui-stackbar.vue
|
|
29
|
+
var st = /* @__PURE__ */ e({ default: () => rn }), ct = ["id"], lt = ["id"], ut = ["id"], dt = { style: { position: "relative" } }, ft = [
|
|
30
|
+
"xmlns",
|
|
31
|
+
"aria-describedby",
|
|
32
|
+
"viewBox"
|
|
33
|
+
], pt = [
|
|
34
|
+
"x",
|
|
35
|
+
"y",
|
|
36
|
+
"width",
|
|
37
|
+
"height"
|
|
38
|
+
], mt = { key: 1 }, ht = [
|
|
39
|
+
"x",
|
|
40
|
+
"y",
|
|
41
|
+
"width",
|
|
42
|
+
"height",
|
|
43
|
+
"stroke",
|
|
44
|
+
"stroke-width",
|
|
45
|
+
"stroke-linecap",
|
|
46
|
+
"stroke-linejoin",
|
|
47
|
+
"stroke-dasharray"
|
|
48
|
+
], gt = [
|
|
49
|
+
"x1",
|
|
50
|
+
"x2",
|
|
51
|
+
"y1",
|
|
52
|
+
"y2",
|
|
53
|
+
"stroke",
|
|
54
|
+
"stroke-width",
|
|
55
|
+
"stroke-dasharray"
|
|
56
|
+
], _t = [
|
|
57
|
+
"x1",
|
|
58
|
+
"x2",
|
|
59
|
+
"y1",
|
|
60
|
+
"y2",
|
|
61
|
+
"stroke",
|
|
62
|
+
"stroke-width",
|
|
63
|
+
"stroke-dasharray"
|
|
64
|
+
], vt = [
|
|
65
|
+
"x1",
|
|
66
|
+
"x2",
|
|
67
|
+
"y1",
|
|
68
|
+
"y2",
|
|
69
|
+
"stroke",
|
|
70
|
+
"stroke-width",
|
|
71
|
+
"stroke-dasharray"
|
|
72
|
+
], yt = [
|
|
73
|
+
"x1",
|
|
74
|
+
"x2",
|
|
75
|
+
"y1",
|
|
76
|
+
"y2",
|
|
77
|
+
"stroke",
|
|
78
|
+
"stroke-width",
|
|
79
|
+
"stroke-dasharray"
|
|
80
|
+
], bt = { key: 0 }, xt = [
|
|
81
|
+
"x",
|
|
82
|
+
"y",
|
|
83
|
+
"height",
|
|
84
|
+
"rx",
|
|
85
|
+
"width",
|
|
86
|
+
"fill",
|
|
87
|
+
"stroke",
|
|
88
|
+
"stroke-width"
|
|
89
|
+
], St = { key: 0 }, Ct = [
|
|
90
|
+
"x",
|
|
91
|
+
"y",
|
|
92
|
+
"height",
|
|
93
|
+
"rx",
|
|
94
|
+
"width",
|
|
95
|
+
"fill",
|
|
96
|
+
"stroke",
|
|
97
|
+
"stroke-width"
|
|
98
|
+
], wt = [
|
|
99
|
+
"x",
|
|
100
|
+
"y",
|
|
101
|
+
"width",
|
|
102
|
+
"rx",
|
|
103
|
+
"height",
|
|
104
|
+
"fill",
|
|
105
|
+
"stroke",
|
|
106
|
+
"stroke-width"
|
|
107
|
+
], Tt = { key: 0 }, Et = [
|
|
108
|
+
"x",
|
|
109
|
+
"y",
|
|
110
|
+
"width",
|
|
111
|
+
"rx",
|
|
112
|
+
"height",
|
|
113
|
+
"fill",
|
|
114
|
+
"stroke",
|
|
115
|
+
"stroke-width"
|
|
116
|
+
], Dt = [
|
|
117
|
+
"x1",
|
|
118
|
+
"x2",
|
|
119
|
+
"y1",
|
|
120
|
+
"y2",
|
|
121
|
+
"stroke",
|
|
122
|
+
"stroke-width"
|
|
123
|
+
], Ot = [
|
|
124
|
+
"x1",
|
|
125
|
+
"x2",
|
|
126
|
+
"y1",
|
|
127
|
+
"y2",
|
|
128
|
+
"stroke",
|
|
129
|
+
"stroke-width"
|
|
130
|
+
], kt = [
|
|
131
|
+
"x",
|
|
132
|
+
"y",
|
|
133
|
+
"font-size",
|
|
134
|
+
"fill",
|
|
135
|
+
"font-weight"
|
|
136
|
+
], At = [
|
|
137
|
+
"transform",
|
|
138
|
+
"font-size",
|
|
139
|
+
"fill",
|
|
140
|
+
"font-weight"
|
|
141
|
+
], jt = [
|
|
142
|
+
"transform",
|
|
143
|
+
"font-size",
|
|
144
|
+
"fill",
|
|
145
|
+
"font-weight"
|
|
146
|
+
], Mt = [
|
|
147
|
+
"transform",
|
|
148
|
+
"font-size",
|
|
149
|
+
"font-weight",
|
|
150
|
+
"fill"
|
|
151
|
+
], Nt = [
|
|
152
|
+
"transform",
|
|
153
|
+
"font-size",
|
|
154
|
+
"fill",
|
|
155
|
+
"font-weight"
|
|
156
|
+
], Pt = [
|
|
157
|
+
"transform",
|
|
158
|
+
"font-size",
|
|
159
|
+
"font-weight",
|
|
160
|
+
"fill"
|
|
161
|
+
], Ft = ["stroke", "d"], It = [
|
|
162
|
+
"transform",
|
|
163
|
+
"font-size",
|
|
164
|
+
"font-weight",
|
|
165
|
+
"fill",
|
|
166
|
+
"text-anchor"
|
|
167
|
+
], Lt = ["d", "stroke"], Rt = [
|
|
168
|
+
"font-size",
|
|
169
|
+
"font-weight",
|
|
170
|
+
"fill",
|
|
171
|
+
"text-anchor",
|
|
172
|
+
"transform"
|
|
173
|
+
], zt = { key: 0 }, Bt = { key: 1 }, Vt = [
|
|
174
|
+
"text-anchor",
|
|
175
|
+
"font-size",
|
|
176
|
+
"font-weight",
|
|
177
|
+
"fill",
|
|
178
|
+
"transform",
|
|
179
|
+
"onClick"
|
|
180
|
+
], Ht = [
|
|
181
|
+
"text-anchor",
|
|
182
|
+
"font-size",
|
|
183
|
+
"fill",
|
|
184
|
+
"transform",
|
|
185
|
+
"innerHTML",
|
|
186
|
+
"onClick"
|
|
187
|
+
], Ut = { key: 0 }, Wt = { key: 1 }, Gt = [
|
|
188
|
+
"font-size",
|
|
189
|
+
"font-weight",
|
|
190
|
+
"fill",
|
|
191
|
+
"stroke",
|
|
192
|
+
"transform",
|
|
193
|
+
"onClick"
|
|
194
|
+
], Kt = [
|
|
195
|
+
"font-size",
|
|
196
|
+
"font-weight",
|
|
197
|
+
"fill",
|
|
198
|
+
"transform",
|
|
199
|
+
"onClick",
|
|
200
|
+
"innerHTML"
|
|
201
|
+
], qt = [
|
|
202
|
+
"x",
|
|
203
|
+
"y",
|
|
204
|
+
"width",
|
|
205
|
+
"height",
|
|
206
|
+
"onClick",
|
|
207
|
+
"onMouseenter",
|
|
208
|
+
"onMouseleave",
|
|
209
|
+
"fill"
|
|
210
|
+
], Jt = [
|
|
211
|
+
"x",
|
|
212
|
+
"y",
|
|
213
|
+
"width",
|
|
214
|
+
"height",
|
|
215
|
+
"onClick",
|
|
216
|
+
"onMouseenter",
|
|
217
|
+
"onMouseleave",
|
|
218
|
+
"fill"
|
|
219
|
+
], Yt = ["data-start", "data-end"], Xt = {
|
|
220
|
+
key: 0,
|
|
221
|
+
style: {
|
|
222
|
+
position: "absolute",
|
|
223
|
+
top: "100%",
|
|
224
|
+
left: "0",
|
|
225
|
+
width: "100%"
|
|
226
|
+
},
|
|
227
|
+
"data-dom-to-png-ignore": "",
|
|
228
|
+
"aria-hidden": "true"
|
|
229
|
+
}, Zt = {
|
|
230
|
+
key: 4,
|
|
231
|
+
class: "vue-data-ui-watermark"
|
|
232
|
+
}, Qt = [
|
|
233
|
+
"x",
|
|
234
|
+
"y",
|
|
235
|
+
"height",
|
|
236
|
+
"width",
|
|
237
|
+
"fill",
|
|
238
|
+
"stroke"
|
|
239
|
+
], $t = ["id"], en = ["onClick"], tn = { key: 0 }, nn = { key: 1 }, rn = /*#__PURE__*/ Pe({
|
|
240
|
+
__name: "vue-ui-stackbar",
|
|
241
|
+
props: {
|
|
242
|
+
config: {
|
|
243
|
+
type: Object,
|
|
244
|
+
default() {
|
|
245
|
+
return {};
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
dataset: {
|
|
249
|
+
type: Array,
|
|
250
|
+
default() {
|
|
251
|
+
return [];
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
selectedXIndex: {
|
|
255
|
+
type: Number,
|
|
256
|
+
default: void 0
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
emits: [
|
|
260
|
+
"selectDatapoint",
|
|
261
|
+
"selectLegend",
|
|
262
|
+
"selectTimeLabel",
|
|
263
|
+
"selectX",
|
|
264
|
+
"copyAlt"
|
|
265
|
+
],
|
|
266
|
+
setup(e, { expose: Pe, emit: st }) {
|
|
267
|
+
let rn = Xe(() => import("./Tooltip-hhrkQ3Lk.js")), an = Xe(() => import("./BaseIcon-t83PDe9k.js").then((e) => e.n)), on = Xe(() => import("./vue-ui-accordion-DRf3NQyH.js").then((e) => e.n)), sn = Xe(() => import("./DataTable-COIO9gi4.js")), cn = Xe(() => import("./PenAndPaper-BgH3m_LP.js").then((e) => e.t)), ln = Xe(() => import("./UserOptions-f3Q0nqrj.js").then((e) => e.n)), un = Xe(() => import("./PackageVersion-M2Ws-VwJ.js").then((e) => e.t)), dn = Xe(() => import("./BaseDraggableDialog-BM_R41j8.js").then((e) => e.n)), { vue_ui_stackbar: fn } = xe(), { isThemeValid: pn, warnInvalidTheme: mn } = Ee(), hn = it(), j = e, M = st, gn = g({
|
|
268
|
+
get() {
|
|
269
|
+
return !!j.dataset && j.dataset.length;
|
|
270
|
+
},
|
|
271
|
+
set(e) {
|
|
272
|
+
return e;
|
|
273
|
+
}
|
|
274
|
+
}), N = T(null), P = T(ue()), _n = T(!1), vn = T(null), yn = T(""), F = T([]), bn = T(0), xn = T(null), Sn = T(null), Cn = T(null), wn = T(null), Tn = T(!1), I = T(null), En = T(!1), Dn = T(0), On = T(0), kn = T(0), An = T(!1), jn = T(null), Mn = T(null), Nn = T(null), Pn = T(null), Fn = T(null), In = T(null), Ln = T(null), Rn = T(null), zn = nt(null), Bn = T(!1), Vn = T(0), Hn = T(0), L = T(null), Un = T({
|
|
275
|
+
x: 0,
|
|
276
|
+
y: 0
|
|
277
|
+
}), Wn = T("pointer"), Gn = ke({
|
|
278
|
+
elementRef: zn,
|
|
279
|
+
minimumWidth: 2,
|
|
280
|
+
minimumHeight: 2,
|
|
281
|
+
stableFramesRequired: 2,
|
|
282
|
+
once: !1,
|
|
283
|
+
onSizeAccepted: () => {
|
|
284
|
+
Jn();
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
function Kn() {
|
|
288
|
+
zn.value = N.value?.parentNode ?? null;
|
|
289
|
+
}
|
|
290
|
+
function qn() {
|
|
291
|
+
return new Promise((e) => {
|
|
292
|
+
requestAnimationFrame(() => {
|
|
293
|
+
requestAnimationFrame(e);
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
async function Jn() {
|
|
298
|
+
let e = ++Hn.value;
|
|
299
|
+
Bn.value = !1, await Qe(), await qn(), await qn(), e === Hn.value && (Vn.value += 1, Bn.value = !0);
|
|
300
|
+
}
|
|
301
|
+
let Yn = T(null);
|
|
302
|
+
et(() => {
|
|
303
|
+
An.value = !0, Kn(), Gn.start(), _r();
|
|
304
|
+
});
|
|
305
|
+
let R = T(or());
|
|
306
|
+
ge({
|
|
307
|
+
config: () => R.value,
|
|
308
|
+
dataset: () => j.dataset,
|
|
309
|
+
component: "VueUiStackbar",
|
|
310
|
+
rules: [
|
|
311
|
+
_e.emptyArray,
|
|
312
|
+
{
|
|
313
|
+
test: (e) => e.some((e) => e.series.length > 60),
|
|
314
|
+
message: [
|
|
315
|
+
"👀 Some series have > 60 datapoints. Consider",
|
|
316
|
+
"",
|
|
317
|
+
"▶️ Using VueUiStackline instead, for better readability.",
|
|
318
|
+
"",
|
|
319
|
+
"▶️ Aggregating data to larger time units, to reduce the number of datapoints.",
|
|
320
|
+
"",
|
|
321
|
+
"▶️ Using filters to constraint the data to a specific time range."
|
|
322
|
+
]
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
test: (e) => e.length > 6,
|
|
326
|
+
message: [
|
|
327
|
+
"👀 The number of series > 6, which can make the chart hard to read. Consider:",
|
|
328
|
+
"",
|
|
329
|
+
"▶️ Grouping small values into an \"Other\" category.",
|
|
330
|
+
"",
|
|
331
|
+
"▶️ Using filters to let users choose a maximum number of series to display."
|
|
332
|
+
]
|
|
333
|
+
}
|
|
334
|
+
]
|
|
335
|
+
});
|
|
336
|
+
let { transitionEnabled: z } = Oe({
|
|
337
|
+
config: () => R.value.transitions,
|
|
338
|
+
dataset: () => j.dataset
|
|
339
|
+
}), B = g(() => R.value.userOptions.useCursorPointer), Xn = g(() => p({
|
|
340
|
+
defaultConfig: {
|
|
341
|
+
userOptions: { show: !1 },
|
|
342
|
+
useCssAnimation: !1,
|
|
343
|
+
table: { show: !1 },
|
|
344
|
+
tooltip: { show: !1 },
|
|
345
|
+
style: { chart: {
|
|
346
|
+
backgroundColor: "#99999930",
|
|
347
|
+
bars: {
|
|
348
|
+
totalValues: { show: !1 },
|
|
349
|
+
dataLabels: { show: !1 }
|
|
350
|
+
},
|
|
351
|
+
grid: {
|
|
352
|
+
frame: { stroke: "#6A6A6A" },
|
|
353
|
+
scale: {
|
|
354
|
+
scaleMin: 0,
|
|
355
|
+
scaleMax: 40
|
|
356
|
+
},
|
|
357
|
+
x: {
|
|
358
|
+
axisColor: "#6A6A6A",
|
|
359
|
+
linesColor: "#6A6A6A",
|
|
360
|
+
axisName: { show: !1 },
|
|
361
|
+
timeLabels: { show: !1 }
|
|
362
|
+
},
|
|
363
|
+
y: {
|
|
364
|
+
axisColor: "#6A6A6A",
|
|
365
|
+
linesColor: "#6A6A6A",
|
|
366
|
+
axisName: { show: !1 },
|
|
367
|
+
axisLabels: { show: !1 }
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
legend: { backgroundColor: "transparent" },
|
|
371
|
+
padding: {
|
|
372
|
+
left: 24,
|
|
373
|
+
right: 24,
|
|
374
|
+
bottom: 12
|
|
375
|
+
},
|
|
376
|
+
zoom: {
|
|
377
|
+
show: !1,
|
|
378
|
+
startIndex: null,
|
|
379
|
+
endIndex: null
|
|
380
|
+
}
|
|
381
|
+
} }
|
|
382
|
+
},
|
|
383
|
+
userConfig: R.value.skeletonConfig ?? {}
|
|
384
|
+
})), { loading: Zn, FINAL_DATASET: Qn, manualLoading: $n } = Ce({
|
|
385
|
+
...rt(j),
|
|
386
|
+
FINAL_CONFIG: R,
|
|
387
|
+
prepareConfig: or,
|
|
388
|
+
callback: () => {
|
|
389
|
+
Promise.resolve().then(async () => {
|
|
390
|
+
(!R.value.style.chart.zoom.keepState || !Ji.value || J.value.start === 0 && J.value.end === 0) && await Yi();
|
|
391
|
+
});
|
|
392
|
+
},
|
|
393
|
+
skeletonDataset: j.config?.skeletonDataset ?? [{
|
|
394
|
+
name: "",
|
|
395
|
+
series: [
|
|
396
|
+
2,
|
|
397
|
+
3,
|
|
398
|
+
5,
|
|
399
|
+
8,
|
|
400
|
+
13,
|
|
401
|
+
21
|
|
402
|
+
],
|
|
403
|
+
color: "#BABABA"
|
|
404
|
+
}, {
|
|
405
|
+
name: "",
|
|
406
|
+
series: [
|
|
407
|
+
1,
|
|
408
|
+
2,
|
|
409
|
+
3,
|
|
410
|
+
5,
|
|
411
|
+
8,
|
|
412
|
+
13
|
|
413
|
+
],
|
|
414
|
+
color: "#CACACA"
|
|
415
|
+
}],
|
|
416
|
+
skeletonConfig: p({
|
|
417
|
+
defaultConfig: R.value,
|
|
418
|
+
userConfig: Xn.value
|
|
419
|
+
})
|
|
420
|
+
}), { userOptionsVisible: er, setUserOptionsVisibility: tr, keepUserOptionState: nr } = Ve({ config: R.value }), { svgRef: rr } = He({ config: R.value.style.chart.title });
|
|
421
|
+
function ir() {
|
|
422
|
+
tr(!0);
|
|
423
|
+
}
|
|
424
|
+
function ar() {
|
|
425
|
+
tr(!1), M("selectX", {
|
|
426
|
+
index: null,
|
|
427
|
+
indexLabel: null,
|
|
428
|
+
dataset: null
|
|
429
|
+
}), I.value = null, L.value = null, _n.value = !1;
|
|
430
|
+
}
|
|
431
|
+
function or() {
|
|
432
|
+
let e = Te({
|
|
433
|
+
userConfig: j.config,
|
|
434
|
+
defaultConfig: fn
|
|
435
|
+
}), t = {};
|
|
436
|
+
j.config && te(j.config, "style.chart.grid.x.timeLabels.showFirstAndLast") && (e.style.chart.grid.x.timeLabels.showFirstAndLast = !!j.config.style.chart.grid.x.timeLabels.showFirstAndLast);
|
|
437
|
+
let n = e.theme;
|
|
438
|
+
if (n) {
|
|
439
|
+
if (!pn.value(e)) mn(e), t = e;
|
|
440
|
+
else {
|
|
441
|
+
let r = Te({
|
|
442
|
+
userConfig: We[n] || j.config,
|
|
443
|
+
defaultConfig: e
|
|
444
|
+
});
|
|
445
|
+
t = {
|
|
446
|
+
...Te({
|
|
447
|
+
userConfig: j.config,
|
|
448
|
+
defaultConfig: r
|
|
449
|
+
}),
|
|
450
|
+
customPalette: e.customPalette.length ? e.customPalette : f[n] || c
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
} else t = e;
|
|
454
|
+
return t;
|
|
455
|
+
}
|
|
456
|
+
let sr = g(() => R.value.style.chart.bars.dataLabels.hideUnderValue != null), cr = g(() => R.value.style.chart.bars.dataLabels.hideUnderPercentage != null);
|
|
457
|
+
at(() => j.config, (e) => {
|
|
458
|
+
Zn.value || (R.value = or()), er.value = !R.value.userOptions.showOnChartHover, _r({ resetSlicer: !R.value.style.chart.zoom.keepState }), Dn.value += 1, On.value += 1, kn.value += 1, V.value.dataLabels.show = R.value.style.chart.bars.dataLabels.show, V.value.showTable = R.value.table.show, V.value.showTooltip = R.value.style.chart.tooltip.show, Kn(), !R.value.style.chart.zoom.keepState || !Ji.value || J.value.start === 0 && J.value.end === 0 ? Yi() : Nr();
|
|
459
|
+
}, { deep: !0 }), at(() => j.dataset, (e) => {
|
|
460
|
+
Array.isArray(e) && e.length > 0 && ($n.value = !1), Kn(), R.value.style.chart.zoom.keepState ? Nr() : Ir();
|
|
461
|
+
}, { deep: !0 });
|
|
462
|
+
let V = T({
|
|
463
|
+
dataLabels: { show: R.value.style.chart.bars.dataLabels.show },
|
|
464
|
+
showTable: R.value.table.show,
|
|
465
|
+
showTooltip: R.value.style.chart.tooltip.show
|
|
466
|
+
});
|
|
467
|
+
at(R, () => {
|
|
468
|
+
V.value = {
|
|
469
|
+
dataLabels: { show: R.value.style.chart.bars.dataLabels.show },
|
|
470
|
+
showTable: R.value.table.show,
|
|
471
|
+
showTooltip: R.value.style.chart.tooltip.show
|
|
472
|
+
};
|
|
473
|
+
}, { immediate: !0 });
|
|
474
|
+
let { isPrinting: lr, isImaging: ur, generatePdf: dr, generateImage: fr } = Se({
|
|
475
|
+
elementId: `stackbar_${P.value}`,
|
|
476
|
+
fileName: R.value.style.chart.title.text || "vue-ui-stackbar",
|
|
477
|
+
options: R.value.userOptions.print
|
|
478
|
+
}), H = T({
|
|
479
|
+
width: R.value.style.chart.width,
|
|
480
|
+
height: R.value.style.chart.height,
|
|
481
|
+
paddingRatio: {
|
|
482
|
+
top: R.value.style.chart.padding.top / R.value.style.chart.height,
|
|
483
|
+
right: R.value.style.chart.padding.right / R.value.style.chart.width,
|
|
484
|
+
bottom: R.value.style.chart.padding.bottom / R.value.style.chart.height,
|
|
485
|
+
left: R.value.style.chart.padding.left / R.value.style.chart.width
|
|
486
|
+
}
|
|
487
|
+
}), pr = g(() => he(R.value.customPalette)), U = nt(null), mr = nt(null), hr = T(null), gr = g(() => R.value.debug);
|
|
488
|
+
function _r({ resetSlicer: e = !0 } = {}) {
|
|
489
|
+
if (l(j.dataset) ? (ce({
|
|
490
|
+
componentName: "VueUiStackbar",
|
|
491
|
+
type: "dataset",
|
|
492
|
+
debug: gr.value
|
|
493
|
+
}), $n.value = !0) : j.dataset.forEach((e, t) => {
|
|
494
|
+
ie({
|
|
495
|
+
datasetObject: e,
|
|
496
|
+
requiredAttributes: ["name", "series"]
|
|
497
|
+
}).forEach((e) => {
|
|
498
|
+
gn.value = !1, ce({
|
|
499
|
+
componentName: "VueUiStackbar",
|
|
500
|
+
type: "datasetSerieAttribute",
|
|
501
|
+
property: e,
|
|
502
|
+
index: t,
|
|
503
|
+
debug: gr.value
|
|
504
|
+
}), $n.value = !0;
|
|
505
|
+
});
|
|
506
|
+
}), l(j.dataset) || ($n.value = R.value.loading), setTimeout(() => {
|
|
507
|
+
En.value = !0;
|
|
508
|
+
}, 10), R.value.responsive) {
|
|
509
|
+
let e = Fe(() => {
|
|
510
|
+
En.value = !1;
|
|
511
|
+
let { width: e, height: t } = Ie({
|
|
512
|
+
chart: N.value,
|
|
513
|
+
title: R.value.style.chart.title.text ? xn.value : null,
|
|
514
|
+
legend: R.value.style.chart.legend.show ? Sn.value : null,
|
|
515
|
+
slicer: R.value.style.chart.zoom.show && q.value > 6 ? Cn.value.$el : null,
|
|
516
|
+
source: wn.value
|
|
517
|
+
});
|
|
518
|
+
requestAnimationFrame(() => {
|
|
519
|
+
H.value.width = e, H.value.height = t - 12, clearTimeout(hr.value), hr.value = setTimeout(() => {
|
|
520
|
+
En.value = !0;
|
|
521
|
+
}, 10);
|
|
522
|
+
});
|
|
523
|
+
});
|
|
524
|
+
U.value && (mr.value && U.value.unobserve(mr.value), U.value.disconnect()), U.value = new ResizeObserver(e), mr.value = N.value.parentNode, U.value.observe(mr.value);
|
|
525
|
+
}
|
|
526
|
+
Jn(), e && Yi();
|
|
527
|
+
}
|
|
528
|
+
$e(() => {
|
|
529
|
+
Gn.stop(), U.value && (mr.value && U.value.unobserve(mr.value), U.value.disconnect());
|
|
530
|
+
});
|
|
531
|
+
let W = g(() => R.value.style.chart.grid.y.position === "right");
|
|
532
|
+
function vr() {
|
|
533
|
+
let e = 0;
|
|
534
|
+
R.value.orientation === "vertical" && Fn.value && (e = Array.from(Fn.value.querySelectorAll("text")).reduce((e, t) => {
|
|
535
|
+
let n = t.getComputedTextLength();
|
|
536
|
+
return n > e ? n : e;
|
|
537
|
+
}, 0)), R.value.orientation === "horizontal" && In.value && (e = Array.from(In.value.querySelectorAll("text")).reduce((e, t) => {
|
|
538
|
+
let n = t.getComputedTextLength();
|
|
539
|
+
return n > e ? n : e;
|
|
540
|
+
}, 0));
|
|
541
|
+
let t = Pn.value ? Pn.value.getBoundingClientRect().width + R.value.style.chart.grid.y.axisName.fontSize + R.value.style.chart.grid.y.axisName.offsetX : 0;
|
|
542
|
+
return {
|
|
543
|
+
left: W.value ? 0 : e + t,
|
|
544
|
+
right: W.value ? e + t : 0,
|
|
545
|
+
scaleLabelsWidth: e,
|
|
546
|
+
yAxisLabelWidth: t
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
let yr = T(0), br = T(0), xr = Fe((e) => {
|
|
550
|
+
br.value = e + R.value.style.chart.bars.totalValues.fontSize;
|
|
551
|
+
}, 100);
|
|
552
|
+
function Sr() {
|
|
553
|
+
if (R.value.orientation !== "horizontal") return 0;
|
|
554
|
+
let e = Rn.value;
|
|
555
|
+
if (!e) return 0;
|
|
556
|
+
let t = Array.from(e.querySelectorAll("text"));
|
|
557
|
+
if (!t.length) return 0;
|
|
558
|
+
let n = -Infinity;
|
|
559
|
+
for (let e of t) try {
|
|
560
|
+
let t = e.getBBox(), r = t.x + t.width;
|
|
561
|
+
r > n && (n = r);
|
|
562
|
+
} catch {}
|
|
563
|
+
return Math.max(0, n - (G.value?.right ?? 0));
|
|
564
|
+
}
|
|
565
|
+
ot((e) => {
|
|
566
|
+
if (R.value.orientation !== "horizontal") return;
|
|
567
|
+
let t = Rn.value;
|
|
568
|
+
if (!t) return;
|
|
569
|
+
let n = () => {
|
|
570
|
+
let e = Sr();
|
|
571
|
+
xr(e);
|
|
572
|
+
};
|
|
573
|
+
n();
|
|
574
|
+
let r = new ResizeObserver(n);
|
|
575
|
+
r.observe(t);
|
|
576
|
+
let a = new MutationObserver(n);
|
|
577
|
+
a.observe(t, {
|
|
578
|
+
childList: !0,
|
|
579
|
+
subtree: !0,
|
|
580
|
+
characterData: !0
|
|
581
|
+
}), e(() => {
|
|
582
|
+
r.disconnect(), a.disconnect();
|
|
583
|
+
});
|
|
584
|
+
}), $e(() => {
|
|
585
|
+
yr.value = 0, br.value = 0;
|
|
586
|
+
});
|
|
587
|
+
let Cr = T(0), wr = T(0);
|
|
588
|
+
function Tr(e) {
|
|
589
|
+
let t = Number.isFinite(e) ? e : 0;
|
|
590
|
+
Cr.value !== t && (Cr.value = t);
|
|
591
|
+
}
|
|
592
|
+
function Er() {
|
|
593
|
+
let e = R.value.orientation === "vertical" ? In.value : Fn.value;
|
|
594
|
+
if (!e) {
|
|
595
|
+
Tr(0);
|
|
596
|
+
return;
|
|
597
|
+
}
|
|
598
|
+
try {
|
|
599
|
+
Tr(e.getBBox()?.height);
|
|
600
|
+
} catch {
|
|
601
|
+
Tr(0);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
function Dr() {
|
|
605
|
+
wr.value && cancelAnimationFrame(wr.value), wr.value = requestAnimationFrame(() => {
|
|
606
|
+
requestAnimationFrame(() => {
|
|
607
|
+
Er();
|
|
608
|
+
});
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
$e(() => {
|
|
612
|
+
wr.value && cancelAnimationFrame(wr.value);
|
|
613
|
+
});
|
|
614
|
+
let Or = g(() => {
|
|
615
|
+
let e = 0;
|
|
616
|
+
if (Nn.value) try {
|
|
617
|
+
e = Nn.value.getBBox().height;
|
|
618
|
+
} catch {
|
|
619
|
+
e = 0;
|
|
620
|
+
}
|
|
621
|
+
let t = R.value.style.chart.grid.x.timeLabels.show ? Cr.value : 0;
|
|
622
|
+
return e + t;
|
|
623
|
+
}), G = g(() => {
|
|
624
|
+
Vn.value;
|
|
625
|
+
let { height: e, width: t } = H.value, { right: n } = H.value.paddingRatio, r = R.value.style.chart.bars.totalValues.show && j.dataset && j.dataset.length > 1 ? R.value.style.chart.bars.totalValues.fontSize * 1.3 : 0, a = 0, o = 0, s = 0, c = 0;
|
|
626
|
+
if (R.value.style.chart.grid.y.axisLabels.show) {
|
|
627
|
+
let e = vr();
|
|
628
|
+
a = e.left, o = e.right, s = e.scaleLabelsWidth, c = e.yAxisLabelWidth;
|
|
629
|
+
}
|
|
630
|
+
let l = R.value.style.chart.padding.top + r, u = t - t * n - br.value - o, d = e - R.value.style.chart.padding.bottom - Or.value - r, f = R.value.style.chart.padding.left + a, p = t - f - t * n - br.value - o, ee = e - l - R.value.style.chart.padding.bottom - Or.value - r;
|
|
631
|
+
return {
|
|
632
|
+
chartHeight: e,
|
|
633
|
+
chartWidth: t,
|
|
634
|
+
top: l,
|
|
635
|
+
right: u,
|
|
636
|
+
bottom: d,
|
|
637
|
+
left: f,
|
|
638
|
+
width: Math.max(0, p),
|
|
639
|
+
height: Math.max(0, ee),
|
|
640
|
+
offsetLeft: a,
|
|
641
|
+
offsetRightAxis: o,
|
|
642
|
+
scaleLabelsWidth: s,
|
|
643
|
+
yAxisLabelWidth: c
|
|
644
|
+
};
|
|
645
|
+
}), kr = g(() => {
|
|
646
|
+
let { left: e, top: t, width: n, height: r } = G.value, a = J.value.start, o = J.value.end, s = Math.max(1, o - a), c = Math.max(0, Math.min(s, (Y.value.start ?? a) - a)), l = Math.max(0, Math.min(s, (Y.value.end ?? o) - a)), u = Math.max(0, l - c), d = {
|
|
647
|
+
fill: R.value.style.chart.zoom.preview.fill,
|
|
648
|
+
stroke: R.value.style.chart.zoom.preview.stroke,
|
|
649
|
+
"stroke-width": R.value.style.chart.zoom.preview.strokeWidth,
|
|
650
|
+
"stroke-dasharray": R.value.style.chart.zoom.preview.strokeDasharray,
|
|
651
|
+
"stroke-linecap": "round",
|
|
652
|
+
"stroke-linejoin": "round",
|
|
653
|
+
style: {
|
|
654
|
+
pointerEvents: "none",
|
|
655
|
+
transition: "none !important",
|
|
656
|
+
animation: "none !important"
|
|
657
|
+
}
|
|
658
|
+
};
|
|
659
|
+
if (R.value.orientation === "horizontal") {
|
|
660
|
+
let a = r / s;
|
|
661
|
+
return {
|
|
662
|
+
x: e,
|
|
663
|
+
y: t + c * a,
|
|
664
|
+
width: n,
|
|
665
|
+
height: u * a,
|
|
666
|
+
...d
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
{
|
|
670
|
+
let a = n / s;
|
|
671
|
+
return {
|
|
672
|
+
x: e + c * a,
|
|
673
|
+
y: t,
|
|
674
|
+
width: u * a,
|
|
675
|
+
height: r,
|
|
676
|
+
...d
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
}), K = g(() => Qn.value.map((e, t) => {
|
|
680
|
+
let n = ue(), r = String(e.key ?? e.id ?? e.name ?? n), a = u(e.color) || pr.value[t] || c[t] || c[t % c.length];
|
|
681
|
+
return {
|
|
682
|
+
...e,
|
|
683
|
+
datasetKey: r,
|
|
684
|
+
series: JSON.parse(JSON.stringify(e.series)).map((e) => R.value.style.chart.bars.distributed ? Math.abs(e) : e),
|
|
685
|
+
signedSeries: e.series.map((e) => e >= 0 ? 1 : -1),
|
|
686
|
+
absoluteIndex: t,
|
|
687
|
+
id: n,
|
|
688
|
+
color: a
|
|
689
|
+
};
|
|
690
|
+
})), q = g(() => {
|
|
691
|
+
let e = Math.max(...K.value.filter((e) => !F.value.includes(e.id)).map((e) => e.series.length));
|
|
692
|
+
return isFinite(e) ? e : Math.max(...K.value.map((e) => e.series.length));
|
|
693
|
+
});
|
|
694
|
+
function Ar(e) {
|
|
695
|
+
Yn.value = e;
|
|
696
|
+
}
|
|
697
|
+
let J = T({
|
|
698
|
+
start: 0,
|
|
699
|
+
end: Math.max(...Qn.value.map((e) => e.series.length))
|
|
700
|
+
}), Y = T({
|
|
701
|
+
start: 0,
|
|
702
|
+
end: Math.max(...Qn.value.map((e) => e.series.length))
|
|
703
|
+
}), jr = g(() => R.value.style.chart.zoom.preview.enable && (Y.value.start !== J.value.start || Y.value.end !== J.value.end));
|
|
704
|
+
function Mr(e, t) {
|
|
705
|
+
Y.value[e] = t;
|
|
706
|
+
}
|
|
707
|
+
function Nr() {
|
|
708
|
+
let e = q.value, t = Math.max(0, Math.min(J.value.start ?? 0, e - 1)), n = Math.max(t + 1, Math.min(J.value.end ?? e, e));
|
|
709
|
+
(!Number.isFinite(t) || !Number.isFinite(n) || n <= t) && (t = 0, n = e), J.value.start = t, J.value.end = n, Y.value.start = t, Y.value.end = n, Cn.value && (Cn.value.setStartValue(t), Cn.value.setEndValue(n));
|
|
710
|
+
}
|
|
711
|
+
let Pr = T(null);
|
|
712
|
+
function Fr() {
|
|
713
|
+
return new Promise((e) => requestAnimationFrame(() => requestAnimationFrame(() => e())));
|
|
714
|
+
}
|
|
715
|
+
$e(() => {
|
|
716
|
+
Pr.value && cancelAnimationFrame(Pr.value);
|
|
717
|
+
});
|
|
718
|
+
async function Ir({ force: e = !1 } = {}) {
|
|
719
|
+
if (R.value.style.chart.zoom.keepState && !e && Ji.value && (J.value.start !== 0 || J.value.end !== 0)) {
|
|
720
|
+
Nr();
|
|
721
|
+
return;
|
|
722
|
+
}
|
|
723
|
+
Yi(), await Qe(), Pr.value && cancelAnimationFrame(Pr.value), Pr.value = requestAnimationFrame(async () => {
|
|
724
|
+
await Fr(), Yi();
|
|
725
|
+
});
|
|
726
|
+
}
|
|
727
|
+
let X = g(() => {
|
|
728
|
+
let e;
|
|
729
|
+
return e = R.value.orientation === "vertical" ? G.value.width / (J.value.end - J.value.start) : G.value.height / (J.value.end - J.value.start), e <= 0 ? 0 : e;
|
|
730
|
+
}), Lr = g(() => de(K.value.filter((e) => !F.value.includes(e.id))).slice(J.value.start, J.value.end)), Rr = g(() => F.value.length === K.value.length), zr = g(() => R.value.style.chart.zoom.minimap.show ? de(K.value.map((e) => ({
|
|
731
|
+
...e,
|
|
732
|
+
series: e.series.map((e) => e ?? 0)
|
|
733
|
+
})).filter((e) => Rr.value ? !0 : !F.value.includes(e.id))) : []), Br = g(() => R.value.style.chart.zoom.minimap.show ? [{
|
|
734
|
+
name: "",
|
|
735
|
+
series: zr.value,
|
|
736
|
+
color: "#000000",
|
|
737
|
+
isVisible: !0
|
|
738
|
+
}] : []), Vr = g(() => de(K.value.filter((e) => !F.value.includes(e.id)).map((e) => ({
|
|
739
|
+
...e,
|
|
740
|
+
series: e.series.map((t, n) => e.signedSeries[n] === -1 && t >= 0 ? -t : t)
|
|
741
|
+
}))).slice(J.value.start, J.value.end)), Hr = g(() => {
|
|
742
|
+
let e = K.value.filter((e) => !F.value.includes(e.id));
|
|
743
|
+
return {
|
|
744
|
+
positive: de(e.map((e) => ({
|
|
745
|
+
...e,
|
|
746
|
+
series: e.series.slice(J.value.start, J.value.end).map((e) => e >= 0 ? e : 0)
|
|
747
|
+
}))),
|
|
748
|
+
negative: de(e.map((e) => ({
|
|
749
|
+
...e,
|
|
750
|
+
series: e.series.slice(J.value.start, J.value.end).map((e) => e < 0 ? e : 0)
|
|
751
|
+
})))
|
|
752
|
+
};
|
|
753
|
+
}), Ur = g(() => {
|
|
754
|
+
let e = R.value.style.chart.grid.scale.scaleMax !== null && !R.value.style.chart.bars.distributed ? R.value.style.chart.grid.scale.scaleMax : Math.max(...Hr.value.positive), t = Math.min(...Hr.value.negative), n = R.value.style.chart.grid.scale.scaleMin !== null && !R.value.style.chart.bars.distributed ? R.value.style.chart.grid.scale.scaleMin : [
|
|
755
|
+
-Infinity,
|
|
756
|
+
Infinity,
|
|
757
|
+
NaN,
|
|
758
|
+
void 0,
|
|
759
|
+
null
|
|
760
|
+
].includes(t) ? 0 : t;
|
|
761
|
+
return !R.value.style.chart.bars.distributed && (R.value.style.chart.grid.scale.scaleMax !== null || R.value.style.chart.grid.scale.scaleMin !== null) ? me(n > 0 ? 0 : n, e < 0 ? 0 : e, R.value.style.chart.grid.scale.ticks) : ee(n > 0 ? 0 : n, e < 0 ? 0 : e, R.value.style.chart.grid.scale.ticks);
|
|
762
|
+
}), Wr = g(() => Ur.value.ticks), Z = g(() => {
|
|
763
|
+
let e = Ur.value, t = e.max + Math.abs(e.min);
|
|
764
|
+
return Wr.value.map((n) => ({
|
|
765
|
+
zero: G.value.bottom - G.value.height * (Math.abs(e.min) / t),
|
|
766
|
+
y: G.value.bottom - G.value.height * ((n + Math.abs(e.min)) / t),
|
|
767
|
+
x: W.value ? G.value.right + 8 : G.value.left - 8,
|
|
768
|
+
horizontal_zero: G.value.left + G.value.width * (Math.abs(e.min) / t),
|
|
769
|
+
horizontal_x: G.value.left + G.value.width * ((n + Math.abs(e.min)) / t),
|
|
770
|
+
horizontal_y: G.value.bottom - 8,
|
|
771
|
+
value: n
|
|
772
|
+
}));
|
|
773
|
+
}), Gr = g(() => {
|
|
774
|
+
let e = R.value.style.chart.grid.y.axisLabels, { prefix: t, suffix: n } = R.value.style.chart.bars.dataLabels;
|
|
775
|
+
return Wr.value.map((r) => String(ae(e.formatter, r, d({
|
|
776
|
+
p: t,
|
|
777
|
+
v: r,
|
|
778
|
+
s: n,
|
|
779
|
+
r: e.rounding
|
|
780
|
+
}), { datapoint: { value: r } }) ?? "")).join("|");
|
|
781
|
+
});
|
|
782
|
+
at(() => [
|
|
783
|
+
Gr.value,
|
|
784
|
+
R.value.orientation,
|
|
785
|
+
R.value.style.chart.grid.y.axisLabels.show,
|
|
786
|
+
R.value.style.chart.grid.y.axisLabels.fontSize,
|
|
787
|
+
R.value.style.chart.grid.y.axisLabels.bold,
|
|
788
|
+
R.value.style.chart.grid.y.position
|
|
789
|
+
], () => {
|
|
790
|
+
R.value.style.chart.grid.y.axisLabels.show && Jn();
|
|
791
|
+
}, { flush: "post" });
|
|
792
|
+
let Q = T([]), Kr = T([]), qr = 0;
|
|
793
|
+
ot(() => {
|
|
794
|
+
let e = ++qr;
|
|
795
|
+
(async () => {
|
|
796
|
+
let t = await be({
|
|
797
|
+
values: R.value.style.chart.grid.x.timeLabels.values,
|
|
798
|
+
maxDatapoints: q.value,
|
|
799
|
+
formatter: R.value.style.chart.grid.x.timeLabels.datetimeFormatter,
|
|
800
|
+
start: J.value.start,
|
|
801
|
+
end: J.value.end
|
|
802
|
+
});
|
|
803
|
+
e === qr && (Q.value = t);
|
|
804
|
+
})();
|
|
805
|
+
});
|
|
806
|
+
let Jr = 0;
|
|
807
|
+
ot(() => {
|
|
808
|
+
let e = ++Jr;
|
|
809
|
+
(async () => {
|
|
810
|
+
let t = await be({
|
|
811
|
+
values: R.value.style.chart.grid.x.timeLabels.values,
|
|
812
|
+
maxDatapoints: q.value,
|
|
813
|
+
formatter: R.value.style.chart.grid.x.timeLabels.datetimeFormatter,
|
|
814
|
+
start: 0,
|
|
815
|
+
end: q.value
|
|
816
|
+
});
|
|
817
|
+
e === Jr && (Kr.value = t);
|
|
818
|
+
})();
|
|
819
|
+
});
|
|
820
|
+
let Yr = g(() => {
|
|
821
|
+
let e = Math.max(1, Math.floor(Number(R.value.style.chart.grid.x.timeLabels.modulo) || 1)), t = (Q.value || []).map((e) => e?.text ?? ""), n = (Kr.value || []).map((e) => e?.text ?? ""), r = J.value.start ?? 0, a = r > 0 || t.length < n.length;
|
|
822
|
+
return re({
|
|
823
|
+
configuredModulo: e,
|
|
824
|
+
visibleTexts: t,
|
|
825
|
+
allTexts: n,
|
|
826
|
+
startAbs: r,
|
|
827
|
+
isZoomed: a
|
|
828
|
+
});
|
|
829
|
+
}), Xr = g(() => {
|
|
830
|
+
let e = R.value.style.chart.grid.x.timeLabels, t = Q.value || [], n = Kr.value || [], r = J.value.start ?? 0, a = I.value, o = q.value, s = t.map((e) => e?.text ?? ""), c = n.map((e) => e?.text ?? ""), l = ne(!!e.showOnlyFirstAndLast, !!e.showOnlyAtModulo, Yr.value, s, c, r, a, o);
|
|
831
|
+
if (!e.showFirstAndLast || e.showOnlyFirstAndLast || !l.length) return l;
|
|
832
|
+
let u = l.length - 1;
|
|
833
|
+
return l.map((e, t) => t !== 0 && t !== u ? e : {
|
|
834
|
+
...e,
|
|
835
|
+
text: s[t] ?? ""
|
|
836
|
+
});
|
|
837
|
+
});
|
|
838
|
+
ot(() => {
|
|
839
|
+
R.value.orientation, R.value.style.chart.grid.x.timeLabels.show, R.value.style.chart.grid.x.timeLabels.fontSize, R.value.style.chart.grid.x.timeLabels.rotation, R.value.style.chart.grid.x.timeLabels.offsetY, Xr.value?.map((e) => e?.text ?? "").join("|"), Gr.value, H.value.width, H.value.height, In.value, Fn.value, Nn.value, Dr();
|
|
840
|
+
}, { flush: "post" });
|
|
841
|
+
let Zr = T({
|
|
842
|
+
months: [],
|
|
843
|
+
shortMonths: [],
|
|
844
|
+
days: [],
|
|
845
|
+
shortDays: []
|
|
846
|
+
}), Qr = 0;
|
|
847
|
+
ot(() => {
|
|
848
|
+
let e = ++Qr, t = R.value.style.chart.grid.x.timeLabels.datetimeFormatter;
|
|
849
|
+
(async () => {
|
|
850
|
+
let n = await ye(t.locale).catch(() => ye("en"));
|
|
851
|
+
e === Qr && (Zr.value = n.data);
|
|
852
|
+
})();
|
|
853
|
+
});
|
|
854
|
+
let $r = g(() => {
|
|
855
|
+
let e = R.value.style.chart.grid.x.timeLabels.datetimeFormatter, t = ve({
|
|
856
|
+
useUTC: e.useUTC,
|
|
857
|
+
locale: Zr.value,
|
|
858
|
+
januaryAsYear: e.januaryAsYear
|
|
859
|
+
});
|
|
860
|
+
return (e, n) => {
|
|
861
|
+
let r = R.value.style.chart.grid.x.timeLabels.values?.[e];
|
|
862
|
+
return r == null ? "" : t.formatDate(new Date(r), n);
|
|
863
|
+
};
|
|
864
|
+
}), ei = g(() => (R.value.style.chart.grid.x.timeLabels.values || []).map((e, t) => ({
|
|
865
|
+
text: $r.value(t, R.value.style.chart.zoom.timeFormat),
|
|
866
|
+
absoluteIndex: t
|
|
867
|
+
}))), ti = g(() => (R.value.style.chart.grid.x.timeLabels.values || []).map((e, t) => ({
|
|
868
|
+
text: $r.value(t, R.value.style.chart.tooltip.timeFormat),
|
|
869
|
+
absoluteIndex: t
|
|
870
|
+
}))), ni = g(() => {
|
|
871
|
+
let e = /* @__PURE__ */ new Map();
|
|
872
|
+
return (R.value.style.chart.grid.x.timeLabels.values || []).forEach((t) => {
|
|
873
|
+
if ([
|
|
874
|
+
null,
|
|
875
|
+
void 0,
|
|
876
|
+
""
|
|
877
|
+
].includes(t)) return;
|
|
878
|
+
let n = String(t);
|
|
879
|
+
e.set(n, (e.get(n) || 0) + 1);
|
|
880
|
+
}), e;
|
|
881
|
+
});
|
|
882
|
+
function ri(e) {
|
|
883
|
+
let t = (R.value.style.chart.grid.x.timeLabels.values || [])[e];
|
|
884
|
+
if ([
|
|
885
|
+
null,
|
|
886
|
+
void 0,
|
|
887
|
+
""
|
|
888
|
+
].includes(t)) return `fallback-${e}`;
|
|
889
|
+
let n = String(t);
|
|
890
|
+
return (ni.value.get(n) || 0) > 1 ? `${n}-${e}` : n;
|
|
891
|
+
}
|
|
892
|
+
function ii(e, t) {
|
|
893
|
+
return `${e.datasetKey}:${ri(t)}`;
|
|
894
|
+
}
|
|
895
|
+
let $ = g(() => {
|
|
896
|
+
if (!gn.value && !Zn.value) return [];
|
|
897
|
+
let e = Array(q.value).fill(0), t = Array(q.value).fill(0), n = Array(q.value).fill(0), r = Array(q.value).fill(0), a = Math.max(...Hr.value.positive) || 0, o = Math.min(...Hr.value.negative), s = [
|
|
898
|
+
-Infinity,
|
|
899
|
+
Infinity,
|
|
900
|
+
NaN,
|
|
901
|
+
void 0,
|
|
902
|
+
null
|
|
903
|
+
].includes(o) ? 0 : o, { min: c, max: l } = !R.value.style.chart.bars.distributed && (R.value.style.chart.grid.scale.scaleMax !== null || R.value.style.chart.grid.scale.scaleMin !== null) ? me(R.value.style.chart.grid.scale.scaleMin === null ? s > 0 ? 0 : s : R.value.style.chart.grid.scale.scaleMin, R.value.style.chart.grid.scale.scaleMax === null ? a < 0 ? 0 : a : R.value.style.chart.grid.scale.scaleMax, R.value.style.chart.grid.scale.ticks) : ee(R.value.style.chart.grid.scale.scaleMin === null ? s > 0 ? 0 : s : R.value.style.chart.grid.scale.scaleMin, R.value.style.chart.grid.scale.scaleMax === null ? a < 0 ? 0 : a : R.value.style.chart.grid.scale.scaleMax, R.value.style.chart.grid.scale.ticks), u = l + (c >= 0 ? 0 : Math.abs(c)) || 1, d = G.value.height, f = G.value.width, p = Z.value[0] ? Z.value[0].zero : G.value.bottom, te = Z.value[0] ? Z.value[0].horizontal_zero : G.value.left, ne = Array(zr.value.length).fill(0), re = Array(zr.value.length).fill(0);
|
|
904
|
+
return K.value.filter((e) => !F.value.includes(e.id)).map((a) => {
|
|
905
|
+
let o = a.series.slice(), s = o.map((e, t) => ne[t]), c = o.map((e, t) => re[t]);
|
|
906
|
+
o.forEach((e, t) => {
|
|
907
|
+
(Number(e) || 0) >= 0 ? ne[t] += Number(e) || 0 : re[t] += Math.abs(Number(e) || 0);
|
|
908
|
+
});
|
|
909
|
+
let l = a.series.slice(J.value.start, J.value.end), ee = a.signedSeries.slice(J.value.start, J.value.end), ie = l.map((e, t) => ii(a, J.value.start + t)), ae = o.map((e, t) => ii(a, t)), oe = l.map((e, t) => G.value.left + X.value * t + X.value * R.value.style.chart.bars.gapRatio / 4), se = (zr.value || []).filter(Number.isFinite), ce = se.length ? Math.max(...se) : 0, le = se.length ? Math.min(...se) : 0;
|
|
910
|
+
function ue({ minimapH: e }) {
|
|
911
|
+
let t = 1e-9, n = ce > 0;
|
|
912
|
+
if (n && le < 0) {
|
|
913
|
+
let n = Math.max(ce, Math.abs(le)) || t;
|
|
914
|
+
return {
|
|
915
|
+
pxPerUnit: e / 2 / n,
|
|
916
|
+
zero: e / 2
|
|
917
|
+
};
|
|
918
|
+
}
|
|
919
|
+
return n ? {
|
|
920
|
+
pxPerUnit: e / Math.max(t, ce),
|
|
921
|
+
zero: e
|
|
922
|
+
} : {
|
|
923
|
+
pxPerUnit: e / Math.max(t, Math.abs(le)),
|
|
924
|
+
zero: 0
|
|
925
|
+
};
|
|
926
|
+
}
|
|
927
|
+
let de = ({ left: e, unitW: t }) => {
|
|
928
|
+
let n = t * (R.value.style.chart.bars.gapRatio / 4);
|
|
929
|
+
return o.map((r, a) => e + t * a + n);
|
|
930
|
+
}, fe = l.map((e, t) => G.value.top + X.value * t + X.value * R.value.style.chart.bars.gapRatio / 4), m = l.map((t, r) => {
|
|
931
|
+
let a = R.value.style.chart.bars.distributed ? (t || 0) / Lr.value[r] : (t || 0) / u, o, s;
|
|
932
|
+
return t > 0 ? (s = d * a, o = p - s - e[r], e[r] += s) : (s = d * a, o = p + n[r], n[r] += Math.abs(s)), o;
|
|
933
|
+
}), pe = ({ minimapH: e }) => {
|
|
934
|
+
if (R.value.style.chart.bars.distributed) return o.map((t, n) => {
|
|
935
|
+
let r = Math.abs(Number(t) || 0), a = Math.abs(zr.value?.[n] || 0) || 1e-9;
|
|
936
|
+
return e - (s[n] + r) / a * e;
|
|
937
|
+
});
|
|
938
|
+
let { pxPerUnit: t, zero: n } = ue({ minimapH: e });
|
|
939
|
+
return o.map((e, r) => {
|
|
940
|
+
let a = Number(e) || 0;
|
|
941
|
+
return a >= 0 ? n - (s[r] + a) * t : n + c[r] * t;
|
|
942
|
+
});
|
|
943
|
+
}, me = l.map((e, n) => {
|
|
944
|
+
let a = R.value.style.chart.bars.distributed ? (e || 0) / Lr.value[n] : (e || 0) / u, o, s;
|
|
945
|
+
return e > 0 ? (s = f * a, o = te + t[n], t[n] += s) : (s = f * a, o = te - Math.abs(s) - r[n], r[n] += Math.abs(s)), o;
|
|
946
|
+
}), he = l.map((e, t) => {
|
|
947
|
+
let n = R.value.style.chart.bars.distributed ? (e || 0) / Lr.value[t] : (e || 0) / u;
|
|
948
|
+
return e > 0 ? d * n : d * Math.abs(n);
|
|
949
|
+
}), ge = ({ minimapH: e }) => {
|
|
950
|
+
if (R.value.style.chart.bars.distributed) return o.map((t, n) => Math.abs(Number(t) || 0) / (Math.abs(zr.value?.[n] || 0) || 1e-9) * e);
|
|
951
|
+
let { pxPerUnit: t } = ue({ minimapH: e });
|
|
952
|
+
return o.map((e) => Math.abs(Number(e) || 0) * t);
|
|
953
|
+
}, _e = l.map((e, t) => {
|
|
954
|
+
let n = R.value.style.chart.bars.distributed ? (e || 0) / Lr.value[t] : (e || 0) / u;
|
|
955
|
+
return e > 0 ? f * n : f * Math.abs(n);
|
|
956
|
+
}), ve = l.map((e) => Math.abs(e)).reduce((e, t) => e + t, 0);
|
|
957
|
+
return {
|
|
958
|
+
...a,
|
|
959
|
+
proportions: l.map((e, t) => R.value.style.chart.bars.distributed ? (e || 0) / Lr.value[t] : (e || 0) / ve),
|
|
960
|
+
series: l,
|
|
961
|
+
signedSeries: ee,
|
|
962
|
+
rectKeys: ie,
|
|
963
|
+
minimapRectKeys: ae,
|
|
964
|
+
x: oe,
|
|
965
|
+
y: m,
|
|
966
|
+
height: he,
|
|
967
|
+
horizontal_width: _e,
|
|
968
|
+
horizontal_y: fe,
|
|
969
|
+
horizontal_x: me,
|
|
970
|
+
xMinimap: de,
|
|
971
|
+
yMinimap: pe,
|
|
972
|
+
heightMinimap: ge
|
|
973
|
+
};
|
|
974
|
+
});
|
|
975
|
+
}), ai = g(() => Vr.value.map((e, t) => ({
|
|
976
|
+
value: e,
|
|
977
|
+
sign: e >= 0 ? 1 : -1
|
|
978
|
+
})));
|
|
979
|
+
function oi(e, t, n, r, a) {
|
|
980
|
+
let o = a === -1 && e >= 0 ? -e : e;
|
|
981
|
+
return ae(R.value.style.chart.bars.dataLabels.formatter, o, d({
|
|
982
|
+
p: R.value.style.chart.bars.dataLabels.prefix,
|
|
983
|
+
v: o,
|
|
984
|
+
s: R.value.style.chart.bars.dataLabels.suffix,
|
|
985
|
+
r: R.value.style.chart.bars.dataLabels.rounding
|
|
986
|
+
}), {
|
|
987
|
+
datapoint: t,
|
|
988
|
+
seriesIndex: n,
|
|
989
|
+
datapointIndex: r
|
|
990
|
+
});
|
|
991
|
+
}
|
|
992
|
+
function si(e, t, n, r) {
|
|
993
|
+
return ae(R.value.style.chart.bars.dataLabels.formatter, e, d({
|
|
994
|
+
v: isNaN(e) ? 0 : e,
|
|
995
|
+
s: "%",
|
|
996
|
+
r: R.value.style.chart.bars.dataLabels.rounding
|
|
997
|
+
}), {
|
|
998
|
+
datapoint: t,
|
|
999
|
+
seriesIndex: n,
|
|
1000
|
+
datapointIndex: r
|
|
1001
|
+
});
|
|
1002
|
+
}
|
|
1003
|
+
function ci(e) {
|
|
1004
|
+
let t = JSON.parse(JSON.stringify($.value)).map((t) => ({
|
|
1005
|
+
name: t.name,
|
|
1006
|
+
value: t.series[e] === 0 ? 0 : t.series[e] || null,
|
|
1007
|
+
proportion: t.proportions[e] || null,
|
|
1008
|
+
color: t.color,
|
|
1009
|
+
id: t.id
|
|
1010
|
+
}));
|
|
1011
|
+
R.value.events.datapointClick && R.value.events.datapointClick({
|
|
1012
|
+
datapoint: t,
|
|
1013
|
+
seriesIndex: e + J.value.start
|
|
1014
|
+
}), M("selectDatapoint", {
|
|
1015
|
+
datapoint: t,
|
|
1016
|
+
period: Q.value[e]
|
|
1017
|
+
});
|
|
1018
|
+
}
|
|
1019
|
+
function li(e) {
|
|
1020
|
+
return JSON.parse(JSON.stringify($.value)).map((t) => ({
|
|
1021
|
+
name: t.name,
|
|
1022
|
+
absoluteIndex: t.absoluteIndex,
|
|
1023
|
+
value: t.series[e] === 0 ? 0 : (t.signedSeries[e] === -1 && t.series[e] >= 0 ? -t.series[e] : t.series[e]) || null,
|
|
1024
|
+
proportion: t.proportions[e] || null,
|
|
1025
|
+
color: t.color,
|
|
1026
|
+
id: t.id,
|
|
1027
|
+
timeLabel: Kr.value[e]
|
|
1028
|
+
}));
|
|
1029
|
+
}
|
|
1030
|
+
function ui(e) {
|
|
1031
|
+
if (R.value.events.datapointLeave) {
|
|
1032
|
+
let t = li(e);
|
|
1033
|
+
R.value.events.datapointLeave({
|
|
1034
|
+
datapoint: t,
|
|
1035
|
+
seriesIndex: e + J.value.start
|
|
1036
|
+
});
|
|
1037
|
+
}
|
|
1038
|
+
_n.value = !1, I.value = null, L.value === e && (L.value = null);
|
|
1039
|
+
}
|
|
1040
|
+
let di = g(() => Array(q.value).fill(0).map((e, t) => li(t)));
|
|
1041
|
+
at(() => j.selectedXIndex, (e) => {
|
|
1042
|
+
if ([null, void 0].includes(j.selectedXIndex)) {
|
|
1043
|
+
I.value = null;
|
|
1044
|
+
return;
|
|
1045
|
+
}
|
|
1046
|
+
let t = e - J.value.start;
|
|
1047
|
+
t < 0 || e >= J.value.end ? I.value = null : I.value = t ?? null;
|
|
1048
|
+
}, { immediate: !0 });
|
|
1049
|
+
function fi(e) {
|
|
1050
|
+
if (!R.value.style.chart.tooltip.showTimeLabel) return null;
|
|
1051
|
+
let t = Q.value?.[e]?.text || null, n = ti.value?.[e]?.text || null, r = Kr.value?.[e]?.text || null;
|
|
1052
|
+
return R.value.style.chart.tooltip.useDefaultTimeFormat ? t : n || r;
|
|
1053
|
+
}
|
|
1054
|
+
function pi(e, t = "pointer") {
|
|
1055
|
+
if (Rr.value) return;
|
|
1056
|
+
Wn.value = t, L.value = e, I.value = e, _n.value = !0;
|
|
1057
|
+
let r = R.value.style.chart.tooltip.customFormat, a = li(e);
|
|
1058
|
+
$i({
|
|
1059
|
+
seriesIndex: e,
|
|
1060
|
+
datapoint: a
|
|
1061
|
+
}), R.value.events.datapointEnter && R.value.events.datapointEnter({
|
|
1062
|
+
datapoint: a,
|
|
1063
|
+
seriesIndex: e + J.value.start
|
|
1064
|
+
}), vn.value = {
|
|
1065
|
+
timeLabel: fi(e),
|
|
1066
|
+
datapoint: a,
|
|
1067
|
+
seriesIndex: e,
|
|
1068
|
+
config: R.value,
|
|
1069
|
+
series: $.value
|
|
1070
|
+
};
|
|
1071
|
+
let o = a.map((e) => Math.abs(e.value)).reduce((e, t) => e + t, 0), s = a.map((e) => m(e.value)).reduce((e, t) => e + t, 0);
|
|
1072
|
+
if (n(r) && se(() => r({
|
|
1073
|
+
seriesIndex: e,
|
|
1074
|
+
datapoint: a,
|
|
1075
|
+
series: $.value,
|
|
1076
|
+
config: R.value
|
|
1077
|
+
}))) yn.value = r({
|
|
1078
|
+
seriesIndex: e,
|
|
1079
|
+
datapoint: a,
|
|
1080
|
+
series: $.value,
|
|
1081
|
+
config: R.value
|
|
1082
|
+
});
|
|
1083
|
+
else {
|
|
1084
|
+
let { showValue: t, showTotal: n, totalTranslation: r, showPercentage: c, borderColor: l, roundingValue: u, roundingPercentage: f } = R.value.style.chart.tooltip, p = "", ee = fi(e);
|
|
1085
|
+
ee && (p += `<div style="width:100%;text-align:center;border-bottom:1px solid ${l};padding-bottom:6px;margin-bottom:3px;">${ee}</div>`), n && (p += `<div class="vue-data-ui-tooltip-total" style="display:flex;flex-direction:row;align-items:center;gap:4px">
|
|
1086
|
+
<span>${r}:</span>
|
|
1087
|
+
<span>
|
|
1088
|
+
${ae(R.value.style.chart.bars.dataLabels.formatter, s, d({
|
|
1089
|
+
p: R.value.style.chart.bars.dataLabels.prefix,
|
|
1090
|
+
v: s,
|
|
1091
|
+
s: R.value.style.chart.bars.dataLabels.suffix,
|
|
1092
|
+
r: u
|
|
1093
|
+
}), { datapoint: {
|
|
1094
|
+
name: r,
|
|
1095
|
+
value: s
|
|
1096
|
+
} })}
|
|
1097
|
+
</span>
|
|
1098
|
+
</div>`);
|
|
1099
|
+
let te = [t && c ? "(" : "", t && c ? ")" : ""];
|
|
1100
|
+
a.reverse().forEach((e) => {
|
|
1101
|
+
p += `
|
|
1102
|
+
<div style="display:flex;flex-direction:row;align-items:center;gap:4px">
|
|
1103
|
+
<svg viewBox="0 0 60 60" height="14" width="14"><rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="${R.value.style.chart.bars.gradient.show ? `url(#gradient_${e.id})` : e.color}"/>${hn.pattern ? `<rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="url(#pattern_${P.value}_${e.absoluteIndex})"/>` : ""}</svg>
|
|
1104
|
+
${e.name}${t || c ? ":" : ""} ${t ? ae(R.value.style.chart.bars.dataLabels.formatter, e.value, d({
|
|
1105
|
+
p: R.value.style.chart.bars.dataLabels.prefix,
|
|
1106
|
+
v: e.value,
|
|
1107
|
+
s: R.value.style.chart.bars.dataLabels.suffix,
|
|
1108
|
+
r: u
|
|
1109
|
+
}, { datapoint: e })) : ""} ${te[0]}${c ? d({
|
|
1110
|
+
v: isNaN(e.value / o) ? 0 : Math.abs(e.value) / o * 100,
|
|
1111
|
+
s: "%",
|
|
1112
|
+
r: f
|
|
1113
|
+
}) : ""}${te[1]}
|
|
1114
|
+
</div>
|
|
1115
|
+
`;
|
|
1116
|
+
}), yn.value = `<div>${p}</div>`;
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
let mi = g(() => H.value.width), hi = g(() => H.value.height);
|
|
1120
|
+
Ae({
|
|
1121
|
+
timeLabelsEls: R.value.orientation === "vertical" ? In : Fn,
|
|
1122
|
+
timeLabels: Q,
|
|
1123
|
+
slicer: J,
|
|
1124
|
+
configRef: R,
|
|
1125
|
+
rotationPath: [
|
|
1126
|
+
"style",
|
|
1127
|
+
"chart",
|
|
1128
|
+
"grid",
|
|
1129
|
+
"x",
|
|
1130
|
+
"timeLabels",
|
|
1131
|
+
"rotation"
|
|
1132
|
+
],
|
|
1133
|
+
autoRotatePath: [
|
|
1134
|
+
"style",
|
|
1135
|
+
"chart",
|
|
1136
|
+
"grid",
|
|
1137
|
+
"x",
|
|
1138
|
+
"timeLabels",
|
|
1139
|
+
"autoRotate",
|
|
1140
|
+
"enable"
|
|
1141
|
+
],
|
|
1142
|
+
isAutoSize: !1,
|
|
1143
|
+
width: mi,
|
|
1144
|
+
height: hi,
|
|
1145
|
+
rotation: R.value.style.chart.grid.x.timeLabels.autoRotate.angle
|
|
1146
|
+
});
|
|
1147
|
+
function gi(e) {
|
|
1148
|
+
Tn.value = e, bn.value += 1;
|
|
1149
|
+
}
|
|
1150
|
+
function _i() {
|
|
1151
|
+
V.value.showTable = !V.value.showTable;
|
|
1152
|
+
}
|
|
1153
|
+
function vi() {
|
|
1154
|
+
V.value.dataLabels.show = !V.value.dataLabels.show;
|
|
1155
|
+
}
|
|
1156
|
+
function yi() {
|
|
1157
|
+
V.value.showTooltip = !V.value.showTooltip;
|
|
1158
|
+
}
|
|
1159
|
+
function bi() {
|
|
1160
|
+
return $.value;
|
|
1161
|
+
}
|
|
1162
|
+
let xi = g(() => {
|
|
1163
|
+
if ($.value.length === 0) return {
|
|
1164
|
+
head: [],
|
|
1165
|
+
body: [],
|
|
1166
|
+
config: {},
|
|
1167
|
+
columnNames: []
|
|
1168
|
+
};
|
|
1169
|
+
let e = $.value.map(({ name: e, color: t }) => ({
|
|
1170
|
+
label: e,
|
|
1171
|
+
color: t
|
|
1172
|
+
})), t = [];
|
|
1173
|
+
return Q.value.forEach((e) => {
|
|
1174
|
+
let n = [R.value.style.chart.grid.x.timeLabels.values[e.absoluteIndex] ? e.text : i + 1];
|
|
1175
|
+
K.value.forEach((t) => {
|
|
1176
|
+
n.push(Number((t.series[e.absoluteIndex] || 0).toFixed(R.value.table.td.roundingValue)));
|
|
1177
|
+
}), t.push(n);
|
|
1178
|
+
}), {
|
|
1179
|
+
head: e,
|
|
1180
|
+
body: t
|
|
1181
|
+
};
|
|
1182
|
+
});
|
|
1183
|
+
function Si(e = null) {
|
|
1184
|
+
let n = [
|
|
1185
|
+
[R.value.style.chart.title.text],
|
|
1186
|
+
[R.value.style.chart.title.subtitle.text],
|
|
1187
|
+
[""]
|
|
1188
|
+
], a = ["", ...xi.value.head.map((e) => e.label)], o = xi.value.body, s = n.concat([a]).concat(o), c = r(s);
|
|
1189
|
+
e ? e(c) : t({
|
|
1190
|
+
csvContent: c,
|
|
1191
|
+
title: R.value.style.chart.title.text || "vue-ui-stackbar"
|
|
1192
|
+
});
|
|
1193
|
+
}
|
|
1194
|
+
let Ci = g(() => {
|
|
1195
|
+
let e = [""].concat($.value.map((e) => e.name), "__SUM__"), t = [], n = J.value.end - J.value.start;
|
|
1196
|
+
for (let e = 0; e < n; e += 1) {
|
|
1197
|
+
let n = J.value.start + e, r = $.value.map((t) => t.series[e] ?? 0).reduce((e, t) => e + t, 0);
|
|
1198
|
+
t.push([R.value.style.chart.grid.x.timeLabels.values[n] && Q.value[e]?.text || n + 1].concat($.value.map((t) => (t.series[e] ?? 0).toFixed(R.value.table.td.roundingValue)), (r ?? 0).toFixed(R.value.table.td.roundingValue)));
|
|
1199
|
+
}
|
|
1200
|
+
let r = {
|
|
1201
|
+
th: {
|
|
1202
|
+
backgroundColor: R.value.table.th.backgroundColor,
|
|
1203
|
+
color: R.value.table.th.color,
|
|
1204
|
+
outline: R.value.table.th.outline
|
|
1205
|
+
},
|
|
1206
|
+
td: {
|
|
1207
|
+
backgroundColor: R.value.table.td.backgroundColor,
|
|
1208
|
+
color: R.value.table.td.color,
|
|
1209
|
+
outline: R.value.table.td.outline
|
|
1210
|
+
},
|
|
1211
|
+
breakpoint: R.value.table.responsiveBreakpoint
|
|
1212
|
+
}, a = [R.value.table.columnNames.period].concat($.value.map((e) => e.name), R.value.table.columnNames.total);
|
|
1213
|
+
return {
|
|
1214
|
+
head: e,
|
|
1215
|
+
body: t.slice(0, J.value.end - J.value.start),
|
|
1216
|
+
config: r,
|
|
1217
|
+
colNames: a
|
|
1218
|
+
};
|
|
1219
|
+
});
|
|
1220
|
+
function wi() {
|
|
1221
|
+
F.value.length ? F.value = [] : ki.value.forEach((e) => {
|
|
1222
|
+
F.value.push(e.id);
|
|
1223
|
+
}), M("selectLegend", $.value);
|
|
1224
|
+
}
|
|
1225
|
+
function Ti(e) {
|
|
1226
|
+
if (F.value.includes(e.id)) F.value = F.value.filter((t) => t !== e.id);
|
|
1227
|
+
else {
|
|
1228
|
+
if (F.value.length === K.value.length - 1) return;
|
|
1229
|
+
F.value.push(e.id);
|
|
1230
|
+
}
|
|
1231
|
+
M("selectLegend", $.value);
|
|
1232
|
+
}
|
|
1233
|
+
function Ei(e) {
|
|
1234
|
+
return K.value.length ? K.value.find((t) => t.name === e) || (gr.value && console.warn(`VueUiStackbar - Series name not found "${e}"`), null) : (gr.value && console.warn("VueUiStackbar - There are no series to show."), null);
|
|
1235
|
+
}
|
|
1236
|
+
function Di(e) {
|
|
1237
|
+
let t = Ei(e);
|
|
1238
|
+
t !== null && F.value.includes(t.id) && Ti({ id: t.id });
|
|
1239
|
+
}
|
|
1240
|
+
function Oi(e) {
|
|
1241
|
+
let t = Ei(e);
|
|
1242
|
+
t !== null && (F.value.includes(t.id) || Ti({ id: t.id }));
|
|
1243
|
+
}
|
|
1244
|
+
let ki = g(() => K.value.map((e, t) => ({
|
|
1245
|
+
...e,
|
|
1246
|
+
shape: "square"
|
|
1247
|
+
})).map((e) => ({
|
|
1248
|
+
...e,
|
|
1249
|
+
opacity: F.value.includes(e.id) ? .5 : 1,
|
|
1250
|
+
segregate: () => Ti(e),
|
|
1251
|
+
isSegregated: F.value.includes(e.id)
|
|
1252
|
+
}))), Ai = g(() => ({
|
|
1253
|
+
cy: "stackbar-legend",
|
|
1254
|
+
backgroundColor: R.value.style.chart.legend.backgroundColor,
|
|
1255
|
+
color: R.value.style.chart.legend.color,
|
|
1256
|
+
fontSize: R.value.style.chart.legend.fontSize,
|
|
1257
|
+
paddingBottom: 12,
|
|
1258
|
+
fontWeight: R.value.style.chart.legend.bold ? "bold" : ""
|
|
1259
|
+
})), ji = T(!1);
|
|
1260
|
+
function Mi() {
|
|
1261
|
+
ji.value = !ji.value;
|
|
1262
|
+
}
|
|
1263
|
+
function Ni(e, t) {
|
|
1264
|
+
let n = JSON.parse(JSON.stringify($.value)).map((e) => ({
|
|
1265
|
+
name: e.name,
|
|
1266
|
+
value: e.series[t] === 0 ? 0 : (e.signedSeries[t] === -1 && e.series[t] >= 0 ? -e.series[t] : e.series[t]) || null,
|
|
1267
|
+
proportion: e.proportions[t] || null,
|
|
1268
|
+
color: e.color,
|
|
1269
|
+
id: e.id
|
|
1270
|
+
}));
|
|
1271
|
+
M("selectTimeLabel", {
|
|
1272
|
+
datapoint: n,
|
|
1273
|
+
absoluteIndex: e.absoluteIndex,
|
|
1274
|
+
label: e.text
|
|
1275
|
+
});
|
|
1276
|
+
}
|
|
1277
|
+
let Pi = g(() => Math.max(...$.value.flatMap((e) => e.series)));
|
|
1278
|
+
function Fi(e, t) {
|
|
1279
|
+
return R.value.style.chart.bars.showDistributedPercentage && R.value.style.chart.bars.distributed ? cr.value ? t * 100 >= R.value.style.chart.bars.dataLabels.hideUnderPercentage : !R.value.style.chart.bars.dataLabels.hideEmptyPercentages || t > 0 : cr.value ? (sr.value && gr.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."), e > Pi.value * R.value.style.chart.bars.dataLabels.hideUnderPercentage / 100) : sr.value ? Math.abs(e) >= R.value.style.chart.bars.dataLabels.hideUnderValue : !R.value.style.chart.bars.dataLabels.hideEmptyValues || e !== 0;
|
|
1280
|
+
}
|
|
1281
|
+
async function Ii({ scale: e = 2 } = {}) {
|
|
1282
|
+
if (!N.value) return;
|
|
1283
|
+
let { imageUri: t, base64: n } = await je({
|
|
1284
|
+
domElement: N.value,
|
|
1285
|
+
base64: !0,
|
|
1286
|
+
img: !0,
|
|
1287
|
+
scale: e
|
|
1288
|
+
}), r = N.value.getBoundingClientRect(), a = {
|
|
1289
|
+
width: r.width,
|
|
1290
|
+
height: r.height,
|
|
1291
|
+
aspectRatio: r.height ? r.width / r.height : 0
|
|
1292
|
+
}, o = await le(t, e) ?? a;
|
|
1293
|
+
return {
|
|
1294
|
+
imageUri: t,
|
|
1295
|
+
base64: n,
|
|
1296
|
+
title: R.value.style.chart.title.text,
|
|
1297
|
+
...o
|
|
1298
|
+
};
|
|
1299
|
+
}
|
|
1300
|
+
let Li = g(() => {
|
|
1301
|
+
let e = R.value.table.useDialog && !R.value.table.show, t = V.value.showTable;
|
|
1302
|
+
return {
|
|
1303
|
+
component: e ? dn : on,
|
|
1304
|
+
title: `${R.value.style.chart.title.text}${R.value.style.chart.title.subtitle.text ? `: ${R.value.style.chart.title.subtitle.text}` : ""}`,
|
|
1305
|
+
props: e ? {
|
|
1306
|
+
backgroundColor: R.value.table.th.backgroundColor,
|
|
1307
|
+
color: R.value.table.th.color,
|
|
1308
|
+
headerColor: R.value.table.th.color,
|
|
1309
|
+
headerBg: R.value.table.th.backgroundColor,
|
|
1310
|
+
isFullscreen: Tn.value,
|
|
1311
|
+
fullscreenParent: N.value,
|
|
1312
|
+
forcedWidth: Math.min(800, window.innerWidth * .8),
|
|
1313
|
+
isCursorPointer: B.value
|
|
1314
|
+
} : {
|
|
1315
|
+
hideDetails: !0,
|
|
1316
|
+
config: {
|
|
1317
|
+
open: t,
|
|
1318
|
+
maxHeight: 1e4,
|
|
1319
|
+
body: {
|
|
1320
|
+
backgroundColor: R.value.style.chart.backgroundColor,
|
|
1321
|
+
color: R.value.style.chart.color
|
|
1322
|
+
},
|
|
1323
|
+
head: {
|
|
1324
|
+
backgroundColor: R.value.style.chart.backgroundColor,
|
|
1325
|
+
color: R.value.style.chart.color
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
};
|
|
1330
|
+
});
|
|
1331
|
+
at(() => V.value.showTable, (e) => {
|
|
1332
|
+
R.value.table.show || (e && R.value.table.useDialog && jn.value ? jn.value.open() : "close" in jn.value && jn.value.close());
|
|
1333
|
+
});
|
|
1334
|
+
function Ri() {
|
|
1335
|
+
V.value.showTable = !1, Mn.value && Mn.value.setTableIconState(!1);
|
|
1336
|
+
}
|
|
1337
|
+
let zi = g(() => R.value.style.chart.backgroundColor), Bi = g(() => R.value.style.chart.legend), Vi = g(() => R.value.style.chart.title), { isCallbackImaging: Hi, isCallbackSvg: Ui, generateSvg: Wi, onGenerateImage: Gi } = De({
|
|
1338
|
+
svg: rr,
|
|
1339
|
+
title: Vi,
|
|
1340
|
+
legend: Bi,
|
|
1341
|
+
legendItems: ki,
|
|
1342
|
+
backgroundColor: zi,
|
|
1343
|
+
getSvgCallback: () => R.value.userOptions.callbacks.svg,
|
|
1344
|
+
generateImage: fr
|
|
1345
|
+
});
|
|
1346
|
+
function Ki(e) {
|
|
1347
|
+
let t = q.value;
|
|
1348
|
+
return e > t ? t : e < 0 || e < J.value.start ? R.value.style.chart.zoom.startIndex === null ? 1 : J.value.start + 1 : e;
|
|
1349
|
+
}
|
|
1350
|
+
let qi = T(!1), Ji = T(!1);
|
|
1351
|
+
function Yi() {
|
|
1352
|
+
if (!qi.value) {
|
|
1353
|
+
qi.value = !0;
|
|
1354
|
+
try {
|
|
1355
|
+
let { startIndex: e, endIndex: t, keepState: n } = R.value.style.chart.zoom, r = n ? Math.max(0, q.value) : q.value;
|
|
1356
|
+
if (n && r <= 0) return;
|
|
1357
|
+
let a = e ?? 0, o = t == null ? r : Math.min(Ki(t + 1), r);
|
|
1358
|
+
Xi.value = !0, J.value.start = a, J.value.end = o, Y.value.start = a, Y.value.end = o, Nr(), Ji.value = !0;
|
|
1359
|
+
} finally {
|
|
1360
|
+
queueMicrotask(() => {
|
|
1361
|
+
Xi.value = !1;
|
|
1362
|
+
}), qi.value = !1;
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
let Xi = T(!1);
|
|
1367
|
+
function Zi(e) {
|
|
1368
|
+
qi.value || Xi.value || e !== J.value.start && (J.value.start = e, Y.value.start = e, Nr());
|
|
1369
|
+
}
|
|
1370
|
+
function Qi(e) {
|
|
1371
|
+
if (qi.value || Xi.value) return;
|
|
1372
|
+
let t = Ki(e);
|
|
1373
|
+
t !== J.value.end && (J.value.end = t, Y.value.end = t, Nr());
|
|
1374
|
+
}
|
|
1375
|
+
function $i({ seriesIndex: e, datapoint: t }) {
|
|
1376
|
+
let n = J.value.start + e;
|
|
1377
|
+
M("selectX", {
|
|
1378
|
+
dataset: t,
|
|
1379
|
+
index: n,
|
|
1380
|
+
indexLabel: R.value.style.chart.grid.x.timeLabels.values[n]
|
|
1381
|
+
});
|
|
1382
|
+
}
|
|
1383
|
+
function ea() {
|
|
1384
|
+
return { y0: Z.value?.[0]?.zero ?? G.value.bottom };
|
|
1385
|
+
}
|
|
1386
|
+
function ta(e) {
|
|
1387
|
+
let { y0: t } = ea(), n = R.value.style.chart.bars.totalValues, r = Math.max(2, n.fontSize * .3 + n.offsetY), a = Infinity, o = !1;
|
|
1388
|
+
for (let t of $.value || []) {
|
|
1389
|
+
let n = t?.series?.[e] ?? 0, r = t?.height?.[e] ?? 0, s = t?.y?.[e];
|
|
1390
|
+
n > 0 && r > 0 && Number.isFinite(s) && (o = !0, s < a && (a = s));
|
|
1391
|
+
}
|
|
1392
|
+
let s = (o && Number.isFinite(a) ? a : t) - r;
|
|
1393
|
+
return Math.min(Math.max(s, 0), G.value.bottom);
|
|
1394
|
+
}
|
|
1395
|
+
function na(e) {
|
|
1396
|
+
let { x0: t } = ea(), n = Math.max(2, R.value.style.chart.bars.totalValues.fontSize * .3 + R.value.style.chart.bars.totalValues.offsetX), r = -Infinity, a = !1;
|
|
1397
|
+
for (let t of $.value || []) {
|
|
1398
|
+
let n = t?.series?.[e] ?? 0, o = t?.horizontal_x?.[e], s = t?.horizontal_width?.[e], c = Number.isFinite(s) ? Math.max(0, s) : 0;
|
|
1399
|
+
Number.isFinite(o) && n > 0 && c > 0 && (a = !0, r = Math.max(r, o + c));
|
|
1400
|
+
}
|
|
1401
|
+
return (a && Number.isFinite(r) ? r : t) + n;
|
|
1402
|
+
}
|
|
1403
|
+
async function ra() {
|
|
1404
|
+
if (M("copyAlt", {
|
|
1405
|
+
config: R.value,
|
|
1406
|
+
dataset: $.value
|
|
1407
|
+
}), !R.value.userOptions.callbacks.altCopy) {
|
|
1408
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
1409
|
+
return;
|
|
1410
|
+
}
|
|
1411
|
+
await Promise.resolve(R.value.userOptions.callbacks.altCopy({
|
|
1412
|
+
config: R.value,
|
|
1413
|
+
dataset: $.value
|
|
1414
|
+
}));
|
|
1415
|
+
}
|
|
1416
|
+
let ia = T(!1);
|
|
1417
|
+
function aa() {
|
|
1418
|
+
L.value = null, ia.value = !0;
|
|
1419
|
+
}
|
|
1420
|
+
function oa() {
|
|
1421
|
+
L.value = null, _n.value = !1, I.value = null, M("selectX", {
|
|
1422
|
+
index: null,
|
|
1423
|
+
indexLabel: null,
|
|
1424
|
+
dataset: null
|
|
1425
|
+
}), ia.value = !1;
|
|
1426
|
+
}
|
|
1427
|
+
function sa(e) {
|
|
1428
|
+
if (!rr.value || ji.value || document.activeElement !== rr.value || Rr.value || !J.value.end && J.value.end !== 0) return;
|
|
1429
|
+
let t = R.value.orientation === "vertical", n = R.value.orientation === "horizontal", r = t && e.key === "ArrowLeft" || n && e.key === "ArrowUp", a = t && e.key === "ArrowRight" || n && e.key === "ArrowDown", o = e.key === "Enter" || e.key === " ", s = e.key === "Escape";
|
|
1430
|
+
if (!r && !a && !o && !s) return;
|
|
1431
|
+
let c = J.value.end - J.value.start;
|
|
1432
|
+
if (c <= 0) return;
|
|
1433
|
+
if (e.preventDefault(), e.stopPropagation(), s) {
|
|
1434
|
+
L.value = null, _n.value = !1, I.value = null, M("selectX", {
|
|
1435
|
+
index: null,
|
|
1436
|
+
indexLabel: null,
|
|
1437
|
+
dataset: null
|
|
1438
|
+
});
|
|
1439
|
+
return;
|
|
1440
|
+
}
|
|
1441
|
+
if (o) {
|
|
1442
|
+
if (L.value === null) return;
|
|
1443
|
+
ci(L.value);
|
|
1444
|
+
return;
|
|
1445
|
+
}
|
|
1446
|
+
let l = L.value, u = I.value;
|
|
1447
|
+
l !== null && l >= 0 && l < c ? a ? (l += 1, l >= c && (l = 0)) : r && (--l, l < 0 && (l = c - 1)) : u !== null && u >= 0 && u < c ? (l = a ? u + 1 : u - 1, l >= c && (l = 0), l < 0 && (l = c - 1)) : l = a ? 0 : c - 1, L.value = l, ca(l), pi(l, "keyboard");
|
|
1448
|
+
}
|
|
1449
|
+
function ca(e) {
|
|
1450
|
+
if (!Number.isFinite(e)) return;
|
|
1451
|
+
let t, n;
|
|
1452
|
+
R.value.orientation === "vertical" ? (t = G.value.left + e * X.value + X.value / 2, n = G.value.top + G.value.height / 2) : (t = G.value.left + G.value.width / 2, n = G.value.top + e * X.value + X.value / 2);
|
|
1453
|
+
let r = o(t, n, rr.value);
|
|
1454
|
+
r && (Un.value = r);
|
|
1455
|
+
}
|
|
1456
|
+
let la = g(() => ({
|
|
1457
|
+
headers: Ci.value?.colNames ?? [],
|
|
1458
|
+
rows: Ci.value?.body ?? []
|
|
1459
|
+
}));
|
|
1460
|
+
return Pe({
|
|
1461
|
+
getData: bi,
|
|
1462
|
+
getImage: Ii,
|
|
1463
|
+
generatePdf: dr,
|
|
1464
|
+
generateCsv: Si,
|
|
1465
|
+
generateImage: fr,
|
|
1466
|
+
generateSvg: Wi,
|
|
1467
|
+
hideSeries: Oi,
|
|
1468
|
+
showSeries: Di,
|
|
1469
|
+
toggleTable: _i,
|
|
1470
|
+
toggleLabels: vi,
|
|
1471
|
+
toggleTooltip: yi,
|
|
1472
|
+
toggleAnnotator: Mi,
|
|
1473
|
+
toggleFullscreen: gi,
|
|
1474
|
+
copyAlt: ra
|
|
1475
|
+
}), (t, r) => (w(), y("div", {
|
|
1476
|
+
id: `stackbar_${P.value}`,
|
|
1477
|
+
ref_key: "stackbarChart",
|
|
1478
|
+
ref: N,
|
|
1479
|
+
class: x({
|
|
1480
|
+
"vue-data-ui-component": !0,
|
|
1481
|
+
"vue-ui-stackbar": !0,
|
|
1482
|
+
"vue-data-ui-wrapper-fullscreen": Tn.value
|
|
1483
|
+
}),
|
|
1484
|
+
style: C(`background:${R.value.style.chart.backgroundColor};color:${R.value.style.chart.color};font-family:${R.value.style.fontFamily}; position: relative; ${R.value.responsive ? "height: 100%" : ""}`),
|
|
1485
|
+
onMouseenter: ir,
|
|
1486
|
+
onMouseleave: ar
|
|
1487
|
+
}, [
|
|
1488
|
+
Ke("div", {
|
|
1489
|
+
id: `chart-instructions-${P.value}`,
|
|
1490
|
+
class: "sr-only"
|
|
1491
|
+
}, [Ke("p", null, O(R.value.a11y.translations.keyboardNavigation), 1)], 8, lt),
|
|
1492
|
+
la.value?.rows?.length ? (w(), _(Be, {
|
|
1493
|
+
key: 0,
|
|
1494
|
+
uid: P.value,
|
|
1495
|
+
head: la.value.headers,
|
|
1496
|
+
body: la.value.rows,
|
|
1497
|
+
notice: R.value.a11y.translations.tableAvailable,
|
|
1498
|
+
caption: R.value.a11y.translations.tableCaption
|
|
1499
|
+
}, null, 8, [
|
|
1500
|
+
"uid",
|
|
1501
|
+
"head",
|
|
1502
|
+
"body",
|
|
1503
|
+
"notice",
|
|
1504
|
+
"caption"
|
|
1505
|
+
])) : v("", !0),
|
|
1506
|
+
R.value.userOptions.buttons.annotator ? (w(), _(k(cn), {
|
|
1507
|
+
key: 1,
|
|
1508
|
+
svgRef: k(rr),
|
|
1509
|
+
backgroundColor: R.value.style.chart.backgroundColor,
|
|
1510
|
+
color: R.value.style.chart.color,
|
|
1511
|
+
active: ji.value,
|
|
1512
|
+
isCursorPointer: B.value,
|
|
1513
|
+
palette: R.value.userOptions.annotatorPalette,
|
|
1514
|
+
onClose: Mi
|
|
1515
|
+
}, {
|
|
1516
|
+
"annotator-action-close": A(() => [D(t.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
1517
|
+
"annotator-action-color": A(({ color: e }) => [D(t.$slots, "annotator-action-color", S(b({ color: e })), void 0, !0)]),
|
|
1518
|
+
"annotator-action-draw": A(({ mode: e }) => [D(t.$slots, "annotator-action-draw", S(b({ mode: e })), void 0, !0)]),
|
|
1519
|
+
"annotator-action-undo": A(({ disabled: e }) => [D(t.$slots, "annotator-action-undo", S(b({ disabled: e })), void 0, !0)]),
|
|
1520
|
+
"annotator-action-redo": A(({ disabled: e }) => [D(t.$slots, "annotator-action-redo", S(b({ disabled: e })), void 0, !0)]),
|
|
1521
|
+
"annotator-action-delete": A(({ disabled: e }) => [D(t.$slots, "annotator-action-delete", S(b({ disabled: e })), void 0, !0)]),
|
|
1522
|
+
_: 3
|
|
1523
|
+
}, 8, [
|
|
1524
|
+
"svgRef",
|
|
1525
|
+
"backgroundColor",
|
|
1526
|
+
"color",
|
|
1527
|
+
"active",
|
|
1528
|
+
"isCursorPointer",
|
|
1529
|
+
"palette"
|
|
1530
|
+
])) : v("", !0),
|
|
1531
|
+
D(t.$slots, "userConfig", {}, void 0, !0),
|
|
1532
|
+
R.value.style.chart.title.text ? (w(), y("div", {
|
|
1533
|
+
key: 2,
|
|
1534
|
+
ref_key: "chartTitle",
|
|
1535
|
+
ref: xn,
|
|
1536
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
1537
|
+
}, [(w(), _(Me, {
|
|
1538
|
+
key: `title_${Dn.value}`,
|
|
1539
|
+
config: {
|
|
1540
|
+
title: {
|
|
1541
|
+
cy: "stackbar-title",
|
|
1542
|
+
...R.value.style.chart.title
|
|
1543
|
+
},
|
|
1544
|
+
subtitle: {
|
|
1545
|
+
cy: "stackbar-subtitle",
|
|
1546
|
+
...R.value.style.chart.title.subtitle
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
}, null, 8, ["config"]))], 512)) : v("", !0),
|
|
1550
|
+
Ke("div", { id: `legend-top-${P.value}` }, null, 8, ut),
|
|
1551
|
+
R.value.userOptions.show && gn.value && (k(nr) || k(er)) ? (w(), _(k(ln), {
|
|
1552
|
+
ref_key: "userOptionsRef",
|
|
1553
|
+
ref: Mn,
|
|
1554
|
+
key: `user_option_${bn.value}`,
|
|
1555
|
+
backgroundColor: R.value.style.chart.backgroundColor,
|
|
1556
|
+
color: R.value.style.chart.color,
|
|
1557
|
+
isPrinting: k(lr),
|
|
1558
|
+
isImaging: k(ur),
|
|
1559
|
+
uid: P.value,
|
|
1560
|
+
hasTooltip: R.value.style.chart.tooltip.show && R.value.userOptions.buttons.tooltip,
|
|
1561
|
+
hasPdf: R.value.userOptions.buttons.pdf,
|
|
1562
|
+
hasImg: R.value.userOptions.buttons.img,
|
|
1563
|
+
hasSvg: R.value.userOptions.buttons.svg,
|
|
1564
|
+
hasXls: R.value.userOptions.buttons.csv,
|
|
1565
|
+
hasTable: R.value.userOptions.buttons.table,
|
|
1566
|
+
hasLabel: R.value.userOptions.buttons.labels,
|
|
1567
|
+
hasFullscreen: R.value.userOptions.buttons.fullscreen,
|
|
1568
|
+
hasAltCopy: R.value.userOptions.buttons.altCopy,
|
|
1569
|
+
isFullscreen: Tn.value,
|
|
1570
|
+
chartElement: N.value,
|
|
1571
|
+
position: R.value.userOptions.position,
|
|
1572
|
+
isTooltip: V.value.showTooltip,
|
|
1573
|
+
titles: { ...R.value.userOptions.buttonTitles },
|
|
1574
|
+
hasAnnotator: R.value.userOptions.buttons.annotator,
|
|
1575
|
+
isAnnotation: ji.value,
|
|
1576
|
+
callbacks: R.value.userOptions.callbacks,
|
|
1577
|
+
printScale: R.value.userOptions.print.scale,
|
|
1578
|
+
tableDialog: R.value.table.useDialog,
|
|
1579
|
+
isCursorPointer: B.value,
|
|
1580
|
+
onToggleFullscreen: gi,
|
|
1581
|
+
onGeneratePdf: k(dr),
|
|
1582
|
+
onGenerateCsv: Si,
|
|
1583
|
+
onGenerateImage: k(Gi),
|
|
1584
|
+
onGenerateSvg: k(Wi),
|
|
1585
|
+
onToggleTable: _i,
|
|
1586
|
+
onToggleLabels: vi,
|
|
1587
|
+
onToggleTooltip: yi,
|
|
1588
|
+
onToggleAnnotator: Mi,
|
|
1589
|
+
onCopyAlt: ra,
|
|
1590
|
+
style: C({ visibility: k(nr) ? k(er) ? "visible" : "hidden" : "visible" })
|
|
1591
|
+
}, qe({ _: 2 }, [
|
|
1592
|
+
t.$slots.menuIcon ? {
|
|
1593
|
+
name: "menuIcon",
|
|
1594
|
+
fn: A(({ isOpen: e, color: n }) => [D(t.$slots, "menuIcon", S(b({
|
|
1595
|
+
isOpen: e,
|
|
1596
|
+
color: n
|
|
1597
|
+
})), void 0, !0)]),
|
|
1598
|
+
key: "0"
|
|
1599
|
+
} : void 0,
|
|
1600
|
+
t.$slots.optionTooltip ? {
|
|
1601
|
+
name: "optionTooltip",
|
|
1602
|
+
fn: A(() => [D(t.$slots, "optionTooltip", {}, void 0, !0)]),
|
|
1603
|
+
key: "1"
|
|
1604
|
+
} : void 0,
|
|
1605
|
+
t.$slots.optionPdf ? {
|
|
1606
|
+
name: "optionPdf",
|
|
1607
|
+
fn: A(() => [D(t.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1608
|
+
key: "2"
|
|
1609
|
+
} : void 0,
|
|
1610
|
+
t.$slots.optionCsv ? {
|
|
1611
|
+
name: "optionCsv",
|
|
1612
|
+
fn: A(() => [D(t.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1613
|
+
key: "3"
|
|
1614
|
+
} : void 0,
|
|
1615
|
+
t.$slots.optionImg ? {
|
|
1616
|
+
name: "optionImg",
|
|
1617
|
+
fn: A(() => [D(t.$slots, "optionImg", {}, void 0, !0)]),
|
|
1618
|
+
key: "4"
|
|
1619
|
+
} : void 0,
|
|
1620
|
+
t.$slots.optionSvg ? {
|
|
1621
|
+
name: "optionSvg",
|
|
1622
|
+
fn: A(() => [D(t.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1623
|
+
key: "5"
|
|
1624
|
+
} : void 0,
|
|
1625
|
+
t.$slots.optionTable ? {
|
|
1626
|
+
name: "optionTable",
|
|
1627
|
+
fn: A(() => [D(t.$slots, "optionTable", {}, void 0, !0)]),
|
|
1628
|
+
key: "6"
|
|
1629
|
+
} : void 0,
|
|
1630
|
+
t.$slots.optionLabels ? {
|
|
1631
|
+
name: "optionLabels",
|
|
1632
|
+
fn: A(() => [D(t.$slots, "optionLabels", {}, void 0, !0)]),
|
|
1633
|
+
key: "7"
|
|
1634
|
+
} : void 0,
|
|
1635
|
+
t.$slots.optionFullscreen ? {
|
|
1636
|
+
name: "optionFullscreen",
|
|
1637
|
+
fn: A(({ toggleFullscreen: e, isFullscreen: n }) => [D(t.$slots, "optionFullscreen", S(b({
|
|
1638
|
+
toggleFullscreen: e,
|
|
1639
|
+
isFullscreen: n
|
|
1640
|
+
})), void 0, !0)]),
|
|
1641
|
+
key: "8"
|
|
1642
|
+
} : void 0,
|
|
1643
|
+
t.$slots.optionAnnotator ? {
|
|
1644
|
+
name: "optionAnnotator",
|
|
1645
|
+
fn: A(({ toggleAnnotator: e, isAnnotator: n }) => [D(t.$slots, "optionAnnotator", S(b({
|
|
1646
|
+
toggleAnnotator: e,
|
|
1647
|
+
isAnnotator: n
|
|
1648
|
+
})), void 0, !0)]),
|
|
1649
|
+
key: "9"
|
|
1650
|
+
} : void 0,
|
|
1651
|
+
t.$slots.optionAltCopy ? {
|
|
1652
|
+
name: "optionAltCopy",
|
|
1653
|
+
fn: A(({ altCopy: e }) => [D(t.$slots, "optionAltCopy", S(b({ altCopy: e })), void 0, !0)]),
|
|
1654
|
+
key: "10"
|
|
1655
|
+
} : void 0,
|
|
1656
|
+
t.$slots["custom-menu-before"] ? {
|
|
1657
|
+
name: "custom-menu-before",
|
|
1658
|
+
fn: A(() => [D(t.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
1659
|
+
key: "11"
|
|
1660
|
+
} : void 0,
|
|
1661
|
+
t.$slots["custom-menu-after"] ? {
|
|
1662
|
+
name: "custom-menu-after",
|
|
1663
|
+
fn: A(() => [D(t.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
1664
|
+
key: "12"
|
|
1665
|
+
} : void 0
|
|
1666
|
+
]), 1032, /* @__PURE__ */ "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.onGenerateImage.onGenerateSvg.style".split("."))) : v("", !0),
|
|
1667
|
+
Ke("div", dt, [(w(), y("svg", {
|
|
1668
|
+
ref_key: "svgRef",
|
|
1669
|
+
ref: rr,
|
|
1670
|
+
xmlns: k(pe),
|
|
1671
|
+
"aria-describedby": `chart-instructions-${P.value}`,
|
|
1672
|
+
viewBox: `0 0 ${G.value.chartWidth <= 0 ? 10 : G.value.chartWidth} ${G.value.chartHeight <= 0 ? 10 : G.value.chartHeight}`,
|
|
1673
|
+
class: x({
|
|
1674
|
+
"vue-data-ui-loading": k(Zn),
|
|
1675
|
+
"vue-data-ui-fullscreen--on": Tn.value,
|
|
1676
|
+
"vue-data-ui-fulscreen--off": !Tn.value,
|
|
1677
|
+
"vue-data-ui-no-transition": !k(z)
|
|
1678
|
+
}),
|
|
1679
|
+
style: C(`max-width:100%;overflow:visible;background:transparent;color:${R.value.style.chart.color}`),
|
|
1680
|
+
tabindex: "0",
|
|
1681
|
+
onFocus: aa,
|
|
1682
|
+
onBlur: oa,
|
|
1683
|
+
onKeydown: sa
|
|
1684
|
+
}, [
|
|
1685
|
+
Ye(k(un)),
|
|
1686
|
+
t.$slots["chart-background"] ? (w(), y("foreignObject", {
|
|
1687
|
+
key: 0,
|
|
1688
|
+
x: G.value.left,
|
|
1689
|
+
y: G.value.top,
|
|
1690
|
+
width: G.value.width <= 0 ? 10 : G.value.width,
|
|
1691
|
+
height: G.value.height <= 0 ? 10 : G.value.height,
|
|
1692
|
+
style: { pointerEvents: "none" }
|
|
1693
|
+
}, [D(t.$slots, "chart-background", {}, void 0, !0)], 8, pt)) : v("", !0),
|
|
1694
|
+
R.value.style.chart.bars.gradient.show ? (w(), y("defs", mt, [(w(!0), y(h, null, E($.value, (e, t) => (w(), _(Le, {
|
|
1695
|
+
t: "linear",
|
|
1696
|
+
id: `gradient_${e.id}`,
|
|
1697
|
+
key: `gradient_${e.id}_${t}`,
|
|
1698
|
+
x1: "0%",
|
|
1699
|
+
y1: "0%",
|
|
1700
|
+
x2: "0%",
|
|
1701
|
+
y2: "100%",
|
|
1702
|
+
stops: [
|
|
1703
|
+
[
|
|
1704
|
+
"0%",
|
|
1705
|
+
e.color,
|
|
1706
|
+
1
|
|
1707
|
+
],
|
|
1708
|
+
[
|
|
1709
|
+
"61.8%",
|
|
1710
|
+
k(oe)(e.color, R.value.style.chart.bars.gradient.intensity / 100),
|
|
1711
|
+
1
|
|
1712
|
+
],
|
|
1713
|
+
[
|
|
1714
|
+
"100%",
|
|
1715
|
+
e.color,
|
|
1716
|
+
1
|
|
1717
|
+
]
|
|
1718
|
+
]
|
|
1719
|
+
}, null, 8, ["id", "stops"]))), 128))])) : v("", !0),
|
|
1720
|
+
R.value.style.chart.grid.frame.show ? (w(), y("rect", {
|
|
1721
|
+
key: 2,
|
|
1722
|
+
style: {
|
|
1723
|
+
pointerEvents: "none",
|
|
1724
|
+
transition: "none",
|
|
1725
|
+
animation: "none !important"
|
|
1726
|
+
},
|
|
1727
|
+
x: Math.max(0, G.value.left),
|
|
1728
|
+
y: Math.max(0, G.value.top),
|
|
1729
|
+
width: Math.max(0, G.value.width),
|
|
1730
|
+
height: Math.max(0, G.value.height),
|
|
1731
|
+
fill: "transparent",
|
|
1732
|
+
stroke: R.value.style.chart.grid.frame.stroke,
|
|
1733
|
+
"stroke-width": R.value.style.chart.grid.frame.strokeWidth,
|
|
1734
|
+
"stroke-linecap": R.value.style.chart.grid.frame.strokeLinecap,
|
|
1735
|
+
"stroke-linejoin": R.value.style.chart.grid.frame.strokeLinejoin,
|
|
1736
|
+
"stroke-dasharray": R.value.style.chart.grid.frame.strokeDasharray
|
|
1737
|
+
}, null, 8, ht)) : v("", !0),
|
|
1738
|
+
R.value.style.chart.grid.x.showHorizontalLines && R.value.orientation === "vertical" ? (w(!0), y(h, { key: 3 }, E(Z.value, (e, t) => (w(), y("line", {
|
|
1739
|
+
x1: G.value.left,
|
|
1740
|
+
x2: G.value.right,
|
|
1741
|
+
y1: e.y,
|
|
1742
|
+
y2: e.y,
|
|
1743
|
+
stroke: R.value.style.chart.grid.x.linesColor,
|
|
1744
|
+
"stroke-width": R.value.style.chart.grid.x.linesThickness,
|
|
1745
|
+
"stroke-dasharray": R.value.style.chart.grid.x.linesStrokeDasharray,
|
|
1746
|
+
"stroke-linecap": "round"
|
|
1747
|
+
}, null, 8, gt))), 256)) : v("", !0),
|
|
1748
|
+
R.value.style.chart.grid.x.showHorizontalLines && R.value.orientation === "horizontal" ? (w(!0), y(h, { key: 4 }, E(J.value.end - J.value.start + 1, (e, t) => (w(), y("line", {
|
|
1749
|
+
x1: G.value.left,
|
|
1750
|
+
x2: G.value.right,
|
|
1751
|
+
y1: G.value.top + X.value * t,
|
|
1752
|
+
y2: G.value.top + X.value * t,
|
|
1753
|
+
stroke: R.value.style.chart.grid.x.linesColor,
|
|
1754
|
+
"stroke-width": R.value.style.chart.grid.x.linesThickness,
|
|
1755
|
+
"stroke-dasharray": R.value.style.chart.grid.x.linesStrokeDasharray,
|
|
1756
|
+
"stroke-linecap": "round"
|
|
1757
|
+
}, null, 8, _t))), 256)) : v("", !0),
|
|
1758
|
+
R.value.style.chart.grid.y.showVerticalLines && R.value.orientation === "vertical" ? (w(!0), y(h, { key: 5 }, E(J.value.end - J.value.start + 1, (e, t) => (w(), y("line", {
|
|
1759
|
+
x1: G.value.left + X.value * t,
|
|
1760
|
+
x2: G.value.left + X.value * t,
|
|
1761
|
+
y1: G.value.top,
|
|
1762
|
+
y2: G.value.bottom,
|
|
1763
|
+
stroke: R.value.style.chart.grid.y.linesColor,
|
|
1764
|
+
"stroke-width": R.value.style.chart.grid.y.linesThickness,
|
|
1765
|
+
"stroke-dasharray": R.value.style.chart.grid.y.linesStrokeDasharray,
|
|
1766
|
+
"stroke-linecap": "round"
|
|
1767
|
+
}, null, 8, vt))), 256)) : v("", !0),
|
|
1768
|
+
R.value.style.chart.grid.y.showVerticalLines && R.value.orientation === "horizontal" ? (w(!0), y(h, { key: 6 }, E(Z.value, (e, t) => (w(), y("line", {
|
|
1769
|
+
x1: e.horizontal_x,
|
|
1770
|
+
x2: e.horizontal_x,
|
|
1771
|
+
y1: G.value.top,
|
|
1772
|
+
y2: G.value.bottom,
|
|
1773
|
+
stroke: R.value.style.chart.grid.y.linesColor,
|
|
1774
|
+
"stroke-width": R.value.style.chart.grid.y.linesThickness,
|
|
1775
|
+
"stroke-dasharray": R.value.style.chart.grid.y.linesStrokeDasharray,
|
|
1776
|
+
"stroke-linecap": "round"
|
|
1777
|
+
}, null, 8, yt))), 256)) : v("", !0),
|
|
1778
|
+
(w(!0), y(h, null, E($.value, (e, n) => (w(), y("g", { key: `stackbar-group-${e.datasetKey}-${n}-${P.value}` }, [t.$slots.pattern ? (w(), y("defs", bt, [D(t.$slots, "pattern", Ze({ ref_for: !0 }, {
|
|
1779
|
+
seriesIndex: e.absoluteIndex,
|
|
1780
|
+
patternId: `pattern_${P.value}_${e.absoluteIndex}`
|
|
1781
|
+
}), void 0, !0)])) : v("", !0), R.value.orientation === "vertical" ? (w(), y(h, { key: 1 }, [(w(!0), y(h, null, E(e.x, (t, n) => (w(), y("rect", {
|
|
1782
|
+
key: `stackbar-rect-${e.rectKeys[n]}`,
|
|
1783
|
+
x: t,
|
|
1784
|
+
y: k(m)(e.y[n]),
|
|
1785
|
+
height: e.height[n] < 0 ? 1e-4 : e.height[n] || 0,
|
|
1786
|
+
rx: R.value.style.chart.bars.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : R.value.style.chart.bars.borderRadius,
|
|
1787
|
+
width: X.value * (1 - R.value.style.chart.bars.gapRatio / 2),
|
|
1788
|
+
fill: R.value.style.chart.bars.gradient.show ? `url(#gradient_${e.id})` : e.color,
|
|
1789
|
+
stroke: R.value.style.chart.backgroundColor,
|
|
1790
|
+
"stroke-width": R.value.style.chart.bars.strokeWidth,
|
|
1791
|
+
"stroke-linecap": "round",
|
|
1792
|
+
"stroke-linejoin": "round",
|
|
1793
|
+
class: x({ "vue-data-ui-bar-transition": En.value })
|
|
1794
|
+
}, null, 10, xt))), 128)), t.$slots.pattern ? (w(), y("g", St, [(w(!0), y(h, null, E(e.x, (t, n) => (w(), y("rect", {
|
|
1795
|
+
key: `stackbar-pattern-rect-${e.rectKeys[n]}`,
|
|
1796
|
+
x: t,
|
|
1797
|
+
y: k(m)(e.y[n]),
|
|
1798
|
+
height: e.height[n] < 0 ? 1e-4 : e.height[n] || 0,
|
|
1799
|
+
rx: R.value.style.chart.bars.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : R.value.style.chart.bars.borderRadius,
|
|
1800
|
+
width: X.value * (1 - R.value.style.chart.bars.gapRatio / 2),
|
|
1801
|
+
fill: `url(#pattern_${P.value}_${e.absoluteIndex})`,
|
|
1802
|
+
stroke: R.value.style.chart.backgroundColor,
|
|
1803
|
+
"stroke-width": R.value.style.chart.bars.strokeWidth,
|
|
1804
|
+
"stroke-linecap": "round",
|
|
1805
|
+
"stroke-linejoin": "round",
|
|
1806
|
+
class: x({ "vue-data-ui-bar-transition": En.value })
|
|
1807
|
+
}, null, 10, Ct))), 128))])) : v("", !0)], 64)) : (w(), y(h, { key: 2 }, [(w(!0), y(h, null, E(e.horizontal_x, (t, n) => (w(), y("rect", {
|
|
1808
|
+
key: `stackbar-rect-${e.rectKeys[n]}`,
|
|
1809
|
+
x: k(m)(t, G.value.left),
|
|
1810
|
+
y: e.horizontal_y[n] < 0 ? 0 : e.horizontal_y[n],
|
|
1811
|
+
width: k(m)(e.horizontal_width[n] < 0 ? 1e-4 : e.horizontal_width[n]),
|
|
1812
|
+
rx: R.value.style.chart.bars.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : R.value.style.chart.bars.borderRadius,
|
|
1813
|
+
height: X.value * (1 - R.value.style.chart.bars.gapRatio / 2),
|
|
1814
|
+
fill: R.value.style.chart.bars.gradient.show ? `url(#gradient_${e.id})` : e.color,
|
|
1815
|
+
stroke: R.value.style.chart.backgroundColor,
|
|
1816
|
+
"stroke-width": R.value.style.chart.bars.strokeWidth,
|
|
1817
|
+
"stroke-linecap": "round",
|
|
1818
|
+
"stroke-linejoin": "round",
|
|
1819
|
+
class: x({ "vue-data-ui-bar-transition": En.value })
|
|
1820
|
+
}, null, 10, wt))), 128)), t.$slots.pattern ? (w(), y("g", Tt, [(w(!0), y(h, null, E(e.horizontal_x, (t, n) => (w(), y("rect", {
|
|
1821
|
+
key: `stackbar-pattern-rect-${e.rectKeys[n]}`,
|
|
1822
|
+
x: k(m)(t, G.value.left),
|
|
1823
|
+
y: e.horizontal_y[n] < 0 ? 0 : e.horizontal_y[n],
|
|
1824
|
+
width: k(m)(e.horizontal_width[n] < 0 ? 1e-4 : e.horizontal_width[n]),
|
|
1825
|
+
rx: R.value.style.chart.bars.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : R.value.style.chart.bars.borderRadius,
|
|
1826
|
+
height: X.value * (1 - R.value.style.chart.bars.gapRatio / 2),
|
|
1827
|
+
fill: `url(#pattern_${P.value}_${e.absoluteIndex})`,
|
|
1828
|
+
stroke: R.value.style.chart.backgroundColor,
|
|
1829
|
+
"stroke-width": R.value.style.chart.bars.strokeWidth,
|
|
1830
|
+
"stroke-linecap": "round",
|
|
1831
|
+
"stroke-linejoin": "round",
|
|
1832
|
+
class: x({ "vue-data-ui-bar-transition": En.value })
|
|
1833
|
+
}, null, 10, Et))), 128))])) : v("", !0)], 64))]))), 128)),
|
|
1834
|
+
R.value.style.chart.grid.x.showAxis ? (w(), y("line", {
|
|
1835
|
+
key: 7,
|
|
1836
|
+
x1: G.value.left,
|
|
1837
|
+
x2: G.value.right,
|
|
1838
|
+
y1: G.value.bottom,
|
|
1839
|
+
y2: G.value.bottom,
|
|
1840
|
+
stroke: R.value.style.chart.grid.x.axisColor,
|
|
1841
|
+
"stroke-width": R.value.style.chart.grid.x.axisThickness,
|
|
1842
|
+
"stroke-linecap": "round",
|
|
1843
|
+
"stroke-linejoin": "round"
|
|
1844
|
+
}, null, 8, Dt)) : v("", !0),
|
|
1845
|
+
R.value.style.chart.grid.y.showAxis && !R.value.style.chart.bars.distributed ? (w(), y("line", {
|
|
1846
|
+
key: 8,
|
|
1847
|
+
x1: W.value ? G.value.right : G.value.left,
|
|
1848
|
+
x2: W.value ? G.value.right : G.value.left,
|
|
1849
|
+
y1: G.value.top,
|
|
1850
|
+
y2: G.value.bottom,
|
|
1851
|
+
stroke: R.value.style.chart.grid.y.axisColor,
|
|
1852
|
+
"stroke-width": R.value.style.chart.grid.y.axisThickness,
|
|
1853
|
+
"stroke-linecap": "round",
|
|
1854
|
+
"stroke-linejoin": "round"
|
|
1855
|
+
}, null, 8, Ot)) : v("", !0),
|
|
1856
|
+
R.value.style.chart.grid.x.axisName.show && R.value.style.chart.grid.x.axisName.text ? (w(), y("text", {
|
|
1857
|
+
key: 9,
|
|
1858
|
+
ref_key: "xAxisLabel",
|
|
1859
|
+
ref: Nn,
|
|
1860
|
+
x: G.value.left + G.value.width / 2,
|
|
1861
|
+
y: G.value.chartHeight - 3,
|
|
1862
|
+
"font-size": R.value.style.chart.grid.x.axisName.fontSize,
|
|
1863
|
+
fill: R.value.style.chart.grid.x.axisName.color,
|
|
1864
|
+
"font-weight": R.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
|
|
1865
|
+
"text-anchor": "middle"
|
|
1866
|
+
}, O(R.value.style.chart.grid.x.axisName.text), 9, kt)) : v("", !0),
|
|
1867
|
+
R.value.style.chart.grid.y.axisName.show && R.value.style.chart.grid.y.axisName.text ? (w(), y("text", {
|
|
1868
|
+
key: 10,
|
|
1869
|
+
ref_key: "yAxisLabel",
|
|
1870
|
+
ref: Pn,
|
|
1871
|
+
transform: `translate(${W.value ? H.value.width - R.value.style.chart.grid.y.axisName.fontSize / 2 - R.value.style.chart.grid.y.axisName.offsetX : R.value.style.chart.grid.y.axisName.fontSize + R.value.style.chart.grid.y.axisName.offsetX}, ${G.value.top + G.value.height / 2}) rotate(-90)`,
|
|
1872
|
+
"font-size": R.value.style.chart.grid.y.axisName.fontSize,
|
|
1873
|
+
fill: R.value.style.chart.grid.y.axisName.color,
|
|
1874
|
+
"font-weight": R.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
|
|
1875
|
+
"text-anchor": "middle"
|
|
1876
|
+
}, O(R.value.style.chart.grid.y.axisName.text), 9, At)) : v("", !0),
|
|
1877
|
+
V.value.dataLabels.show && R.value.orientation === "vertical" ? (w(), y(h, { key: 11 }, [(w(!0), y(h, null, E($.value, (e, t) => (w(), y("g", { key: `dp_${e.id}` }, [(w(!0), y(h, null, E(e.x, (n, r) => (w(), y(h, { key: `rect_${e.id}_${J.value.start + r}` }, [Fi(e.series[r], e.proportions[r]) ? (w(), y("text", {
|
|
1878
|
+
key: 0,
|
|
1879
|
+
class: x({ "vue-data-ui-transition": k(z) }),
|
|
1880
|
+
transform: `translate(${n + X.value * (1 - R.value.style.chart.bars.gapRatio / 2) / 2}, ${e.y[r] + e.height[r] / 2 + R.value.style.chart.bars.dataLabels.fontSize / 3})`,
|
|
1881
|
+
"font-size": R.value.style.chart.bars.dataLabels.fontSize,
|
|
1882
|
+
fill: R.value.style.chart.bars.dataLabels.adaptColorToBackground ? k(fe)(e.color) : R.value.style.chart.bars.dataLabels.color,
|
|
1883
|
+
"font-weight": R.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
|
|
1884
|
+
"text-anchor": "middle"
|
|
1885
|
+
}, O(R.value.style.chart.bars.showDistributedPercentage && R.value.style.chart.bars.distributed ? si(e.proportions[r] * 100, e, t, r) : oi(e.series[r], e, t, r, e.signedSeries[r])), 11, jt)) : v("", !0)], 64))), 128))]))), 128)), R.value.style.chart.bars.totalValues.show && $.value.length > 1 ? (w(), y("g", {
|
|
1886
|
+
key: 0,
|
|
1887
|
+
ref_key: "sumTop",
|
|
1888
|
+
ref: Ln
|
|
1889
|
+
}, [(w(!0), y(h, null, E(ai.value, (e, t) => (w(), y(h, { key: `tl_${t + J.value.start}` }, [!R.value.style.chart.bars.dataLabels.hideEmptyValues || e.value !== 0 ? (w(), y("text", {
|
|
1890
|
+
key: 0,
|
|
1891
|
+
class: x({ "vue-data-ui-transition": k(z) }),
|
|
1892
|
+
transform: `translate(${G.value.left + X.value * t + X.value / 2}, ${ta(t)})`,
|
|
1893
|
+
"text-anchor": "middle",
|
|
1894
|
+
"font-size": R.value.style.chart.bars.totalValues.fontSize,
|
|
1895
|
+
"font-weight": R.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
|
|
1896
|
+
fill: R.value.style.chart.bars.totalValues.color
|
|
1897
|
+
}, O(oi(e.value, e, t, e.sign)), 11, Mt)) : v("", !0)], 64))), 128))], 512)) : v("", !0)], 64)) : v("", !0),
|
|
1898
|
+
V.value.dataLabels.show && R.value.orientation === "horizontal" ? (w(), y(h, { key: 12 }, [(w(!0), y(h, null, E($.value, (e, t) => (w(), y("g", null, [(w(!0), y(h, null, E(e.horizontal_x, (n, r) => (w(), y(h, null, [Fi(e.series[r], e.proportions[r]) ? (w(), y("text", {
|
|
1899
|
+
key: 0,
|
|
1900
|
+
class: x({ "vue-data-ui-transition": k(z) }),
|
|
1901
|
+
transform: `translate(${n + (e.horizontal_width[r] < 0 ? 1e-4 : e.horizontal_width[r]) / 2}, ${e.horizontal_y[r] + X.value * (1 - R.value.style.chart.bars.gapRatio / 2) / 2 + R.value.style.chart.bars.dataLabels.fontSize / 3})`,
|
|
1902
|
+
"font-size": R.value.style.chart.bars.dataLabels.fontSize,
|
|
1903
|
+
fill: R.value.style.chart.bars.dataLabels.adaptColorToBackground ? k(fe)(e.color) : R.value.style.chart.bars.dataLabels.color,
|
|
1904
|
+
"font-weight": R.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
|
|
1905
|
+
"text-anchor": "middle"
|
|
1906
|
+
}, O(R.value.style.chart.bars.showDistributedPercentage && R.value.style.chart.bars.distributed ? si(e.proportions[r] * 100, e, t, r) : oi(e.series[r], e, t, r, e.signedSeries[r])), 11, Nt)) : v("", !0)], 64))), 256))]))), 256)), R.value.style.chart.bars.totalValues.show && $.value.length > 1 ? (w(), y("g", {
|
|
1907
|
+
key: 0,
|
|
1908
|
+
ref_key: "sumRight",
|
|
1909
|
+
ref: Rn
|
|
1910
|
+
}, [(w(!0), y(h, null, E(ai.value, (e, t) => (w(), y(h, null, [!R.value.style.chart.bars.dataLabels.hideEmptyValues || e.value !== 0 ? (w(), y("text", {
|
|
1911
|
+
key: 0,
|
|
1912
|
+
class: x({ "vue-data-ui-transition": k(z) }),
|
|
1913
|
+
transform: `translate(${na(t)}, ${G.value.top + X.value * t + X.value / 2 + R.value.style.chart.bars.totalValues.fontSize / 3})`,
|
|
1914
|
+
"text-anchor": "start",
|
|
1915
|
+
"font-size": R.value.style.chart.bars.totalValues.fontSize,
|
|
1916
|
+
"font-weight": R.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
|
|
1917
|
+
fill: R.value.style.chart.bars.totalValues.color
|
|
1918
|
+
}, O(oi(e.value, e, t, e.sign)), 11, Pt)) : v("", !0)], 64))), 256))], 512)) : v("", !0)], 64)) : v("", !0),
|
|
1919
|
+
R.value.style.chart.grid.y.axisLabels.show && !R.value.style.chart.bars.distributed && R.value.orientation === "vertical" ? (w(), y("g", {
|
|
1920
|
+
key: 13,
|
|
1921
|
+
ref_key: "scaleLabels",
|
|
1922
|
+
ref: Fn
|
|
1923
|
+
}, [(w(!0), y(h, null, E(Z.value, (e, t) => (w(), y("path", {
|
|
1924
|
+
key: `ty_${t}`,
|
|
1925
|
+
stroke: R.value.style.chart.grid.x.axisColor,
|
|
1926
|
+
class: x({ "vue-data-ui-transition": k(z) }),
|
|
1927
|
+
d: `M${W.value ? G.value.right : G.value.left},${e.y} ${W.value ? G.value.right + 6 : G.value.left - 6},${e.y}`,
|
|
1928
|
+
"stroke-width": 1,
|
|
1929
|
+
"stroke-linecap": "round"
|
|
1930
|
+
}, null, 10, Ft))), 128)), (w(!0), y(h, null, E(Z.value, (e, t) => (w(), y("text", {
|
|
1931
|
+
class: x({ "vue-data-ui-transition": k(z) }),
|
|
1932
|
+
key: `tl_${t}`,
|
|
1933
|
+
transform: `translate(${e.x}, ${e.y + R.value.style.chart.grid.y.axisLabels.fontSize / 3})`,
|
|
1934
|
+
"font-size": R.value.style.chart.grid.y.axisLabels.fontSize,
|
|
1935
|
+
"font-weight": R.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
|
|
1936
|
+
fill: R.value.style.chart.grid.y.axisLabels.color,
|
|
1937
|
+
"text-anchor": W.value ? "start" : "end"
|
|
1938
|
+
}, O(k(ae)(R.value.style.chart.grid.y.axisLabels.formatter, e.value, k(d)({
|
|
1939
|
+
p: R.value.style.chart.bars.dataLabels.prefix,
|
|
1940
|
+
v: e.value,
|
|
1941
|
+
s: R.value.style.chart.bars.dataLabels.suffix,
|
|
1942
|
+
r: R.value.style.chart.grid.y.axisLabels.rounding
|
|
1943
|
+
}), { datapoint: e })), 11, It))), 128))], 512)) : v("", !0),
|
|
1944
|
+
R.value.style.chart.grid.y.axisLabels.show && !R.value.style.chart.bars.distributed && R.value.orientation === "horizontal" ? (w(), y("g", {
|
|
1945
|
+
key: 14,
|
|
1946
|
+
ref_key: "scaleLabels",
|
|
1947
|
+
ref: Fn
|
|
1948
|
+
}, [(w(!0), y(h, null, E(Z.value, (e, t) => (w(), y("path", {
|
|
1949
|
+
key: `scy_${t}`,
|
|
1950
|
+
d: `M${e.horizontal_x},${G.value.bottom} ${e.horizontal_x},${G.value.bottom + 6}`,
|
|
1951
|
+
class: x({ "vue-data-ui-transition": k(z) }),
|
|
1952
|
+
stroke: R.value.style.chart.grid.x.axisColor,
|
|
1953
|
+
"stroke-width": 1,
|
|
1954
|
+
"stroke-linecap": "round"
|
|
1955
|
+
}, null, 10, Lt))), 128)), (w(!0), y(h, null, E(Z.value, (e, t) => (w(), y("text", {
|
|
1956
|
+
class: x(["vue-data-ui-time-label", { "vue-data-ui-transition": k(z) }]),
|
|
1957
|
+
key: `tly_${t}`,
|
|
1958
|
+
"font-size": R.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1959
|
+
"font-weight": R.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
|
|
1960
|
+
fill: R.value.style.chart.grid.y.axisLabels.color,
|
|
1961
|
+
"text-anchor": R.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : R.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
1962
|
+
transform: `translate(${e.horizontal_x}, ${G.value.bottom + R.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + R.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${R.value.style.chart.grid.x.timeLabels.rotation})`
|
|
1963
|
+
}, O(k(ae)(R.value.style.chart.grid.y.axisLabels.formatter, e.value, k(d)({
|
|
1964
|
+
p: R.value.style.chart.bars.dataLabels.prefix,
|
|
1965
|
+
v: e.value,
|
|
1966
|
+
s: R.value.style.chart.bars.dataLabels.suffix,
|
|
1967
|
+
r: R.value.style.chart.grid.y.axisLabels.rounding
|
|
1968
|
+
}), { datapoint: e })), 11, Rt))), 128))], 512)) : v("", !0),
|
|
1969
|
+
R.value.style.chart.grid.x.timeLabels.show && R.value.orientation === "vertical" ? (w(), y("g", {
|
|
1970
|
+
key: 15,
|
|
1971
|
+
ref_key: "timeLabelsEls",
|
|
1972
|
+
ref: In
|
|
1973
|
+
}, [t.$slots["time-label"] ? (w(), y("g", zt, [(w(!0), y(h, null, E(Xr.value, (e, n) => (w(), y("g", null, [D(t.$slots, "time-label", Ze({ ref_for: !0 }, {
|
|
1974
|
+
x: G.value.left + X.value * n + X.value / 2,
|
|
1975
|
+
y: G.value.bottom + R.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + R.value.style.chart.grid.x.timeLabels.offsetY,
|
|
1976
|
+
fontSize: R.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1977
|
+
fill: R.value.style.chart.grid.x.timeLabels.color,
|
|
1978
|
+
transform: `translate(${G.value.left + X.value * n + X.value / 2}, ${G.value.bottom + R.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + R.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${R.value.style.chart.grid.x.timeLabels.rotation})`,
|
|
1979
|
+
absoluteIndex: e.absoluteIndex,
|
|
1980
|
+
content: e.text,
|
|
1981
|
+
textAnchor: R.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : R.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
1982
|
+
show: !0
|
|
1983
|
+
}), void 0, !0)]))), 256))])) : (w(), y("g", Bt, [(w(!0), y(h, null, E(Xr.value, (e, t) => (w(), y("g", null, [String(e.text).includes("\n") ? (w(), y("text", {
|
|
1984
|
+
class: x({ "vue-data-ui-transition": k(z) }),
|
|
1985
|
+
key: t + "-multi",
|
|
1986
|
+
"text-anchor": R.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : R.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
1987
|
+
"font-size": R.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1988
|
+
fill: R.value.style.chart.grid.x.timeLabels.color,
|
|
1989
|
+
transform: `
|
|
1990
|
+
translate(
|
|
1991
|
+
${G.value.left + X.value * t + X.value / 2},
|
|
1992
|
+
${G.value.bottom + R.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + R.value.style.chart.grid.x.timeLabels.offsetY}
|
|
1993
|
+
),
|
|
1994
|
+
rotate(${R.value.style.chart.grid.x.timeLabels.rotation})
|
|
1995
|
+
`,
|
|
1996
|
+
style: C({ cursor: B.value ? "pointer" : "default" }),
|
|
1997
|
+
innerHTML: k(a)({
|
|
1998
|
+
content: String(e.text),
|
|
1999
|
+
fontSize: R.value.style.chart.grid.x.timeLabels.fontSize,
|
|
2000
|
+
fill: R.value.style.chart.grid.x.timeLabels.color,
|
|
2001
|
+
x: 0,
|
|
2002
|
+
y: 0
|
|
2003
|
+
}),
|
|
2004
|
+
onClick: () => Ni(e, t)
|
|
2005
|
+
}, null, 14, Ht)) : (w(), y("text", {
|
|
2006
|
+
class: "vue-data-ui-time-label",
|
|
2007
|
+
key: t,
|
|
2008
|
+
"text-anchor": R.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : R.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
2009
|
+
"font-size": R.value.style.chart.grid.x.timeLabels.fontSize,
|
|
2010
|
+
"font-weight": R.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
|
|
2011
|
+
fill: R.value.style.chart.grid.x.timeLabels.color,
|
|
2012
|
+
transform: `translate(${G.value.left + X.value * t + X.value / 2}, ${G.value.bottom + R.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + R.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${R.value.style.chart.grid.x.timeLabels.rotation})`,
|
|
2013
|
+
style: C({ cursor: B.value ? "pointer" : "default" }),
|
|
2014
|
+
onClick: () => Ni(e, t)
|
|
2015
|
+
}, O(e.text), 13, Vt))]))), 256))]))], 512)) : v("", !0),
|
|
2016
|
+
R.value.style.chart.grid.x.timeLabels.show && R.value.orientation === "horizontal" ? (w(), y("g", {
|
|
2017
|
+
key: 16,
|
|
2018
|
+
ref_key: "timeLabelsEls",
|
|
2019
|
+
ref: In
|
|
2020
|
+
}, [t.$slots["time-label"] ? (w(), y("g", Ut, [(w(!0), y(h, null, E(Xr.value, (e, n) => (w(), y("g", null, [D(t.$slots, "time-label", Ze({ ref_for: !0 }, {
|
|
2021
|
+
x: G.value.left - 8,
|
|
2022
|
+
y: G.value.top + X.value * n + X.value / 2 + R.value.style.chart.grid.y.axisLabels.fontSize / 3,
|
|
2023
|
+
fontSize: R.value.style.chart.grid.x.timeLabels.fontSize,
|
|
2024
|
+
fill: R.value.style.chart.grid.x.timeLabels.color,
|
|
2025
|
+
transform: null,
|
|
2026
|
+
absoluteIndex: e.absoluteIndex,
|
|
2027
|
+
content: e.text,
|
|
2028
|
+
textAnchor: "end",
|
|
2029
|
+
show: !0
|
|
2030
|
+
}), void 0, !0)]))), 256))])) : (w(), y("g", Wt, [(w(!0), y(h, null, E(Xr.value, (e, t) => (w(), y("g", null, [String(e.text).includes("\n") ? (w(), y("text", {
|
|
2031
|
+
key: 1,
|
|
2032
|
+
"text-anchor": "end",
|
|
2033
|
+
"font-size": R.value.style.chart.grid.y.axisLabels.fontSize,
|
|
2034
|
+
"font-weight": R.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
|
|
2035
|
+
fill: R.value.style.chart.grid.y.axisLabels.color,
|
|
2036
|
+
transform: `translate(${G.value.left - 8}, ${G.value.top + X.value * t + X.value / 2 + R.value.style.chart.grid.y.axisLabels.fontSize / 3})`,
|
|
2037
|
+
style: C({ cursor: B.value ? "pointer" : "default" }),
|
|
2038
|
+
onClick: () => Ni(e, t),
|
|
2039
|
+
innerHTML: k(s)({
|
|
2040
|
+
content: String(e.text),
|
|
2041
|
+
fontSize: R.value.style.chart.grid.y.axisLabels.fontSize,
|
|
2042
|
+
fill: R.value.style.chart.grid.y.axisLabels.color,
|
|
2043
|
+
stroke: R.value.style.chart.backgroundColor,
|
|
2044
|
+
x: G.value.left - 8,
|
|
2045
|
+
y: 0
|
|
2046
|
+
})
|
|
2047
|
+
}, null, 12, Kt)) : (w(), y("text", {
|
|
2048
|
+
key: 0,
|
|
2049
|
+
"text-anchor": "end",
|
|
2050
|
+
"font-size": R.value.style.chart.grid.y.axisLabels.fontSize,
|
|
2051
|
+
"font-weight": R.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
|
|
2052
|
+
fill: R.value.style.chart.grid.y.axisLabels.color,
|
|
2053
|
+
stroke: R.value.style.chart.backgroundColor,
|
|
2054
|
+
"stroke-linecap": "round",
|
|
2055
|
+
"stroke-linejoin": "round",
|
|
2056
|
+
"stroke-width": "3",
|
|
2057
|
+
"paint-order": "stroke fill",
|
|
2058
|
+
transform: `translate(${G.value.left - 8}, ${G.value.top + X.value * t + X.value / 2 + R.value.style.chart.grid.y.axisLabels.fontSize / 3})`,
|
|
2059
|
+
style: C({ cursor: B.value ? "pointer" : "default" }),
|
|
2060
|
+
onClick: () => Ni(e, t)
|
|
2061
|
+
}, O(e.text), 13, Gt))]))), 256))]))], 512)) : v("", !0),
|
|
2062
|
+
V.value.showTooltip && R.value.orientation === "vertical" ? (w(!0), y(h, { key: 17 }, E(J.value.end - J.value.start, (e, t) => (w(), y("rect", {
|
|
2063
|
+
x: G.value.left + t * X.value,
|
|
2064
|
+
y: G.value.top,
|
|
2065
|
+
width: X.value,
|
|
2066
|
+
height: G.value.height < 0 ? 0 : G.value.height,
|
|
2067
|
+
onClick: () => ci(t),
|
|
2068
|
+
onMouseenter: () => pi(t, "pointer"),
|
|
2069
|
+
onMouseleave: () => ui(t),
|
|
2070
|
+
fill: t === I.value || t === Yn.value ? R.value.style.chart.highlighter.color : "transparent",
|
|
2071
|
+
style: C({ opacity: R.value.style.chart.highlighter.opacity / 100 })
|
|
2072
|
+
}, null, 44, qt))), 256)) : v("", !0),
|
|
2073
|
+
V.value.showTooltip && R.value.orientation === "horizontal" ? (w(!0), y(h, { key: 18 }, E(J.value.end - J.value.start, (e, t) => (w(), y("rect", {
|
|
2074
|
+
x: G.value.left,
|
|
2075
|
+
y: G.value.top + t * X.value,
|
|
2076
|
+
width: G.value.width < 0 ? 0 : G.value.width,
|
|
2077
|
+
height: X.value,
|
|
2078
|
+
onClick: () => ci(t),
|
|
2079
|
+
onMouseenter: () => pi(t, "pointer"),
|
|
2080
|
+
onMouseleave: () => ui(t),
|
|
2081
|
+
fill: t === I.value || t === Yn.value ? R.value.style.chart.highlighter.color : "transparent",
|
|
2082
|
+
style: C({ opacity: R.value.style.chart.highlighter.opacity / 100 })
|
|
2083
|
+
}, null, 44, Jt))), 256)) : v("", !0),
|
|
2084
|
+
jr.value ? (w(), y("rect", Ze({ key: 19 }, kr.value, {
|
|
2085
|
+
"data-start": J.value.start,
|
|
2086
|
+
"data-end": J.value.end
|
|
2087
|
+
}), null, 16, Yt)) : v("", !0),
|
|
2088
|
+
D(t.$slots, "svg", { svg: {
|
|
2089
|
+
drawingArea: G.value,
|
|
2090
|
+
slicer: J.value,
|
|
2091
|
+
data: $.value,
|
|
2092
|
+
isPrintingImg: k(lr) || k(ur) || k(Hi),
|
|
2093
|
+
isPrintingSvg: k(Ui),
|
|
2094
|
+
barWidth: X.value
|
|
2095
|
+
} }, void 0, !0)
|
|
2096
|
+
], 46, ft)), t.$slots.hint ? (w(), y("div", Xt, [D(t.$slots, "hint", S(b({
|
|
2097
|
+
hint: R.value.a11y.translations.keyboardNavigation,
|
|
2098
|
+
isVisible: ia.value
|
|
2099
|
+
})), void 0, !0)])) : v("", !0)]),
|
|
2100
|
+
t.$slots.watermark ? (w(), y("div", Zt, [D(t.$slots, "watermark", S(b({ isPrinting: k(lr) || k(ur) || k(Hi) || k(Ui) })), void 0, !0)])) : v("", !0),
|
|
2101
|
+
R.value.style.chart.zoom.show && gn.value && Ji.value && q.value > 6 ? (w(), _(Re, {
|
|
2102
|
+
key: 5,
|
|
2103
|
+
ref_key: "chartSlicer",
|
|
2104
|
+
ref: Cn,
|
|
2105
|
+
"data-dom-to-png-ignore-layout": "",
|
|
2106
|
+
allMinimaps: Br.value,
|
|
2107
|
+
background: R.value.style.chart.zoom.color,
|
|
2108
|
+
borderColor: R.value.style.chart.backgroundColor,
|
|
2109
|
+
customFormat: R.value.style.chart.zoom.customFormat,
|
|
2110
|
+
cutNullValues: !1,
|
|
2111
|
+
forceZeroCenter: !0,
|
|
2112
|
+
enableRangeHandles: R.value.style.chart.zoom.enableRangeHandles,
|
|
2113
|
+
enableSelectionDrag: R.value.style.chart.zoom.enableSelectionDrag,
|
|
2114
|
+
end: J.value.end,
|
|
2115
|
+
focusOnDrag: R.value.style.chart.zoom.focusOnDrag,
|
|
2116
|
+
focusRangeRatio: R.value.style.chart.zoom.focusRangeRatio,
|
|
2117
|
+
fontSize: R.value.style.chart.zoom.fontSize,
|
|
2118
|
+
immediate: !R.value.style.chart.zoom.preview.enable,
|
|
2119
|
+
inputColor: R.value.style.chart.zoom.color,
|
|
2120
|
+
isPreview: jr.value,
|
|
2121
|
+
labelLeft: R.value.style.chart.grid.x.timeLabels.values[J.value.start] ? Q.value?.[0]?.text ?? "" : "",
|
|
2122
|
+
labelRight: R.value.style.chart.grid.x.timeLabels.values[J.value.end - 1] ? Q.value?.at(-1)?.text ?? "" : "",
|
|
2123
|
+
max: Math.max(...e.dataset.map((e) => e.series.length)),
|
|
2124
|
+
min: 0,
|
|
2125
|
+
minimap: zr.value,
|
|
2126
|
+
minimapCompact: R.value.style.chart.zoom.minimap.compact,
|
|
2127
|
+
minimapFrameColor: R.value.style.chart.zoom.minimap.frameColor,
|
|
2128
|
+
minimapIndicatorColor: R.value.style.chart.zoom.minimap.indicatorColor,
|
|
2129
|
+
minimapMerged: !1,
|
|
2130
|
+
minimapSelectedColor: R.value.style.chart.zoom.minimap.selectedColor,
|
|
2131
|
+
minimapSelectedColorOpacity: R.value.style.chart.zoom.minimap.selectedColorOpacity,
|
|
2132
|
+
minimapSelectedIndex: I.value,
|
|
2133
|
+
minimapSelectionRadius: 1,
|
|
2134
|
+
preciseLabels: ei.value.length ? ei.value : Kr.value,
|
|
2135
|
+
refreshEndPoint: R.value.style.chart.zoom.endIndex === null ? Math.max(...e.dataset.map((e) => e.series.length)) : R.value.style.chart.zoom.endIndex + 1,
|
|
2136
|
+
refreshStartPoint: R.value.style.chart.zoom.startIndex === null ? 0 : R.value.style.chart.zoom.startIndex,
|
|
2137
|
+
selectColor: R.value.style.chart.zoom.highlightColor,
|
|
2138
|
+
selectedSeries: di.value,
|
|
2139
|
+
smoothMinimap: !1,
|
|
2140
|
+
start: J.value.start,
|
|
2141
|
+
textColor: R.value.style.chart.color,
|
|
2142
|
+
timeLabels: Kr.value,
|
|
2143
|
+
usePreciseLabels: R.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !R.value.style.chart.zoom.useDefaultFormat,
|
|
2144
|
+
valueEnd: J.value.end,
|
|
2145
|
+
valueStart: J.value.start,
|
|
2146
|
+
verticalHandles: R.value.style.chart.zoom.minimap.verticalHandles,
|
|
2147
|
+
maxWidth: R.value.style.chart.zoom.maxWidth,
|
|
2148
|
+
minimapLeftInsetRatio: G.value.chartWidth > 0 && R.value.style.chart.zoom.autoFit ? G.value.left / G.value.chartWidth : null,
|
|
2149
|
+
minimapRightInsetRatio: G.value.chartWidth > 0 && R.value.style.chart.zoom.autoFit ? (G.value.chartWidth - G.value.right) / G.value.chartWidth : null,
|
|
2150
|
+
isCursorPointer: B.value,
|
|
2151
|
+
additionalMinimapHeight: R.value.style.chart.zoom.minimap.additionalHeight,
|
|
2152
|
+
handleType: R.value.style.chart.zoom.minimap.handleType,
|
|
2153
|
+
handleIconColor: R.value.style.chart.zoom.minimap.handleIconColor,
|
|
2154
|
+
handleBorderWidth: R.value.style.chart.zoom.minimap.handleBorderWidth,
|
|
2155
|
+
handleBorderColor: R.value.style.chart.zoom.minimap.handleBorderColor,
|
|
2156
|
+
handleFill: R.value.style.chart.zoom.minimap.handleFill,
|
|
2157
|
+
handleWidth: R.value.style.chart.zoom.minimap.handleWidth,
|
|
2158
|
+
"onUpdate:end": Qi,
|
|
2159
|
+
"onUpdate:start": Zi,
|
|
2160
|
+
onTrapMouse: Ar,
|
|
2161
|
+
onReset: r[0] ||= () => Ir({ force: !0 }),
|
|
2162
|
+
onFutureEnd: r[1] ||= (e) => Mr("end", e),
|
|
2163
|
+
onFutureStart: r[2] ||= (e) => Mr("start", e)
|
|
2164
|
+
}, {
|
|
2165
|
+
"reset-action": A(({ reset: e }) => [D(t.$slots, "reset-action", S(b({ reset: e })), void 0, !0)]),
|
|
2166
|
+
slotMap: A(({ width: e, height: t, unitW: n }) => [(w(!0), y(h, null, E($.value, (e) => (w(), y("g", { key: e.id }, [(w(!0), y(h, null, E(e.xMinimap({
|
|
2167
|
+
left: 0,
|
|
2168
|
+
unitW: n
|
|
2169
|
+
}), (r, a) => (w(), y("rect", {
|
|
2170
|
+
key: `minimap-rect-${e.minimapRectKeys[a]}`,
|
|
2171
|
+
x: a === 0 ? r - n * (R.value.style.chart.bars.gapRatio / 4) : r - n / 2,
|
|
2172
|
+
y: Math.max(0, Math.min(t, e.yMinimap({ minimapH: t })[a])),
|
|
2173
|
+
height: e.heightMinimap({ minimapH: t })[a],
|
|
2174
|
+
width: [0, q.value - 1].includes(a) ? n * (1 - R.value.style.chart.bars.gapRatio / 2) / 2 : n * (1 - R.value.style.chart.bars.gapRatio / 2),
|
|
2175
|
+
fill: R.value.style.chart.bars.gradient.show ? `url(#gradient_${e.id})` : e.color,
|
|
2176
|
+
stroke: R.value.style.chart.backgroundColor,
|
|
2177
|
+
"stroke-width": .5,
|
|
2178
|
+
rx: "0",
|
|
2179
|
+
"stroke-linecap": "round",
|
|
2180
|
+
"stroke-linejoin": "round",
|
|
2181
|
+
style: C({ opacity: a >= Y.value.start && a <= Y.value.end ? 1 : .62 })
|
|
2182
|
+
}, null, 12, Qt))), 128))]))), 128))]),
|
|
2183
|
+
_: 3
|
|
2184
|
+
}, 8, /* @__PURE__ */ "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.minimapLeftInsetRatio.minimapRightInsetRatio.isCursorPointer.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth".split("."))) : v("", !0),
|
|
2185
|
+
Ye(k(rn), {
|
|
2186
|
+
teleportTo: R.value.style.chart.tooltip.teleportTo,
|
|
2187
|
+
show: V.value.showTooltip && _n.value,
|
|
2188
|
+
backgroundColor: R.value.style.chart.tooltip.backgroundColor,
|
|
2189
|
+
color: R.value.style.chart.tooltip.color,
|
|
2190
|
+
fontSize: R.value.style.chart.tooltip.fontSize,
|
|
2191
|
+
borderRadius: R.value.style.chart.tooltip.borderRadius,
|
|
2192
|
+
borderColor: R.value.style.chart.tooltip.borderColor,
|
|
2193
|
+
borderWidth: R.value.style.chart.tooltip.borderWidth,
|
|
2194
|
+
backgroundOpacity: R.value.style.chart.tooltip.backgroundOpacity,
|
|
2195
|
+
position: R.value.style.chart.tooltip.position,
|
|
2196
|
+
offsetX: R.value.style.chart.tooltip.offsetX,
|
|
2197
|
+
offsetY: R.value.style.chart.tooltip.offsetY,
|
|
2198
|
+
parent: N.value,
|
|
2199
|
+
content: yn.value,
|
|
2200
|
+
isFullscreen: Tn.value,
|
|
2201
|
+
isCustom: k(n)(R.value.style.chart.tooltip.customFormat),
|
|
2202
|
+
smooth: R.value.style.chart.tooltip.smooth,
|
|
2203
|
+
backdropFilter: R.value.style.chart.tooltip.backdropFilter,
|
|
2204
|
+
smoothForce: R.value.style.chart.tooltip.smoothForce,
|
|
2205
|
+
smoothSnapThreshold: R.value.style.chart.tooltip.smoothSnapThreshold,
|
|
2206
|
+
isA11yMode: Wn.value === "keyboard",
|
|
2207
|
+
a11yPosition: Un.value
|
|
2208
|
+
}, {
|
|
2209
|
+
"tooltip-before": A(() => [D(t.$slots, "tooltip-before", S(b({ ...vn.value })), void 0, !0)]),
|
|
2210
|
+
tooltip: A(() => [D(t.$slots, "tooltip", S(b({ ...vn.value })), void 0, !0)]),
|
|
2211
|
+
"tooltip-after": A(() => [D(t.$slots, "tooltip-after", S(b({ ...vn.value })), void 0, !0)]),
|
|
2212
|
+
_: 3
|
|
2213
|
+
}, 8, [
|
|
2214
|
+
"teleportTo",
|
|
2215
|
+
"show",
|
|
2216
|
+
"backgroundColor",
|
|
2217
|
+
"color",
|
|
2218
|
+
"fontSize",
|
|
2219
|
+
"borderRadius",
|
|
2220
|
+
"borderColor",
|
|
2221
|
+
"borderWidth",
|
|
2222
|
+
"backgroundOpacity",
|
|
2223
|
+
"position",
|
|
2224
|
+
"offsetX",
|
|
2225
|
+
"offsetY",
|
|
2226
|
+
"parent",
|
|
2227
|
+
"content",
|
|
2228
|
+
"isFullscreen",
|
|
2229
|
+
"isCustom",
|
|
2230
|
+
"smooth",
|
|
2231
|
+
"backdropFilter",
|
|
2232
|
+
"smoothForce",
|
|
2233
|
+
"smoothSnapThreshold",
|
|
2234
|
+
"isA11yMode",
|
|
2235
|
+
"a11yPosition"
|
|
2236
|
+
]),
|
|
2237
|
+
Ke("div", { id: `legend-bottom-${P.value}` }, null, 8, $t),
|
|
2238
|
+
An.value && (R.value.style.chart.legend.show || t.$slots.legend) ? (w(), _(Ge, {
|
|
2239
|
+
key: 6,
|
|
2240
|
+
to: R.value.style.chart.legend.position === "top" ? `#legend-top-${P.value}` : `#legend-bottom-${P.value}`
|
|
2241
|
+
}, [Ke("div", {
|
|
2242
|
+
ref_key: "chartLegend",
|
|
2243
|
+
ref: Sn
|
|
2244
|
+
}, [D(t.$slots, "legend", { legend: ki.value }, () => [R.value.style.chart.legend.show ? (w(), _(Ue, {
|
|
2245
|
+
key: 0,
|
|
2246
|
+
legendSet: ki.value,
|
|
2247
|
+
config: Ai.value,
|
|
2248
|
+
isCursorPointer: B.value,
|
|
2249
|
+
onClickMarker: r[3] ||= ({ legend: e }) => e.segregate()
|
|
2250
|
+
}, qe({
|
|
2251
|
+
item: A(({ legend: e }) => [k(Zn) ? v("", !0) : (w(), y("div", {
|
|
2252
|
+
key: 0,
|
|
2253
|
+
onClick: (t) => e.segregate(),
|
|
2254
|
+
style: C(`opacity:${F.value.includes(e.id) ? .5 : 1}`)
|
|
2255
|
+
}, O(e.name), 13, en))]),
|
|
2256
|
+
legendToggle: A(() => [ki.value.length > 2 && R.value.style.chart.legend.selectAllToggle.show && !k(Zn) ? (w(), _(ze, {
|
|
2257
|
+
key: 0,
|
|
2258
|
+
backgroundColor: R.value.style.chart.legend.selectAllToggle.backgroundColor,
|
|
2259
|
+
color: R.value.style.chart.legend.selectAllToggle.color,
|
|
2260
|
+
fontSize: R.value.style.chart.legend.fontSize,
|
|
2261
|
+
checked: F.value.length > 0,
|
|
2262
|
+
isCursorPointer: B.value,
|
|
2263
|
+
onToggle: wi
|
|
2264
|
+
}, null, 8, [
|
|
2265
|
+
"backgroundColor",
|
|
2266
|
+
"color",
|
|
2267
|
+
"fontSize",
|
|
2268
|
+
"checked",
|
|
2269
|
+
"isCursorPointer"
|
|
2270
|
+
])) : v("", !0)]),
|
|
2271
|
+
_: 2
|
|
2272
|
+
}, [t.$slots.pattern ? {
|
|
2273
|
+
name: "legend-pattern",
|
|
2274
|
+
fn: A(({ legend: e, index: t }) => [Ye(Ne, {
|
|
2275
|
+
shape: e.shape,
|
|
2276
|
+
radius: 30,
|
|
2277
|
+
stroke: "none",
|
|
2278
|
+
plot: {
|
|
2279
|
+
x: 30,
|
|
2280
|
+
y: 30
|
|
2281
|
+
},
|
|
2282
|
+
fill: `url(#pattern_${P.value}_${t})`
|
|
2283
|
+
}, null, 8, ["shape", "fill"])]),
|
|
2284
|
+
key: "0"
|
|
2285
|
+
} : void 0]), 1032, [
|
|
2286
|
+
"legendSet",
|
|
2287
|
+
"config",
|
|
2288
|
+
"isCursorPointer"
|
|
2289
|
+
])) : v("", !0)], !0)], 512)], 8, ["to"])) : v("", !0),
|
|
2290
|
+
t.$slots.source ? (w(), y("div", {
|
|
2291
|
+
key: 7,
|
|
2292
|
+
ref_key: "source",
|
|
2293
|
+
ref: wn,
|
|
2294
|
+
dir: "auto"
|
|
2295
|
+
}, [D(t.$slots, "source", {}, void 0, !0)], 512)) : v("", !0),
|
|
2296
|
+
gn.value && R.value.userOptions.buttons.table ? (w(), _(tt(Li.value.component), Ze({ key: 8 }, Li.value.props, {
|
|
2297
|
+
ref_key: "tableUnit",
|
|
2298
|
+
ref: jn,
|
|
2299
|
+
onClose: Ri
|
|
2300
|
+
}), qe({
|
|
2301
|
+
content: A(() => [Ye(k(sn), {
|
|
2302
|
+
colNames: Ci.value.colNames,
|
|
2303
|
+
head: Ci.value.head,
|
|
2304
|
+
body: Ci.value.body,
|
|
2305
|
+
config: Ci.value.config,
|
|
2306
|
+
title: R.value.table.useDialog ? "" : Li.value.title,
|
|
2307
|
+
withCloseButton: !R.value.table.useDialog,
|
|
2308
|
+
isCursorPointer: B.value,
|
|
2309
|
+
onClose: Ri
|
|
2310
|
+
}, {
|
|
2311
|
+
th: A(({ th: e }) => [e === "__SUM__" ? (w(), y("div", tn, [Ye(k(an), {
|
|
2312
|
+
name: "sigma",
|
|
2313
|
+
stroke: Ci.value.config.th.color,
|
|
2314
|
+
size: 16
|
|
2315
|
+
}, null, 8, ["stroke"])])) : (w(), y("div", nn, O(e), 1))]),
|
|
2316
|
+
td: A(({ td: e }) => [Je(O(isNaN(Number(e)) ? e : k(d)({
|
|
2317
|
+
p: R.value.style.chart.bars.dataLabels.prefix,
|
|
2318
|
+
v: e,
|
|
2319
|
+
s: R.value.style.chart.bars.dataLabels.suffix,
|
|
2320
|
+
r: R.value.table.td.roundingValue
|
|
2321
|
+
})), 1)]),
|
|
2322
|
+
_: 1
|
|
2323
|
+
}, 8, [
|
|
2324
|
+
"colNames",
|
|
2325
|
+
"head",
|
|
2326
|
+
"body",
|
|
2327
|
+
"config",
|
|
2328
|
+
"title",
|
|
2329
|
+
"withCloseButton",
|
|
2330
|
+
"isCursorPointer"
|
|
2331
|
+
])]),
|
|
2332
|
+
_: 2
|
|
2333
|
+
}, [R.value.table.useDialog ? {
|
|
2334
|
+
name: "title",
|
|
2335
|
+
fn: A(() => [Je(O(Li.value.title), 1)]),
|
|
2336
|
+
key: "0"
|
|
2337
|
+
} : void 0, R.value.table.useDialog ? {
|
|
2338
|
+
name: "actions",
|
|
2339
|
+
fn: A(() => [Ke("button", {
|
|
2340
|
+
tabindex: "0",
|
|
2341
|
+
class: "vue-ui-user-options-button",
|
|
2342
|
+
onClick: r[4] ||= (e) => Si(R.value.userOptions.callbacks.csv),
|
|
2343
|
+
style: C({ cursor: B.value ? "pointer" : "default" })
|
|
2344
|
+
}, [Ye(k(an), {
|
|
2345
|
+
name: "fileCsv",
|
|
2346
|
+
stroke: Li.value.props.color
|
|
2347
|
+
}, null, 8, ["stroke"])], 4)]),
|
|
2348
|
+
key: "1"
|
|
2349
|
+
} : void 0]), 1040)) : v("", !0),
|
|
2350
|
+
D(t.$slots, "skeleton", {}, () => [k(Zn) ? (w(), _(we, { key: 0 })) : v("", !0)], !0)
|
|
2351
|
+
], 46, ct));
|
|
2352
|
+
}
|
|
2353
|
+
}, [["__scopeId", "data-v-1596f966"]]);
|
|
2354
|
+
//#endregion
|
|
2355
|
+
export { st as n, rn as t };
|