vue-data-ui 3.22.13 → 3.23.0
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/LICENSE +1 -1
- package/README.md +13 -1
- package/dist/{Arrow-DKx74WtM.js → Arrow-o2qHNvrC.js} +1 -1
- package/dist/{BaseDraggableDialog-3n8udWmh.js → BaseDraggableDialog-qTnfhLBz.js} +2 -2
- package/dist/{BaseIcon-CP5RWnqt.js → BaseIcon-91MZoczJ.js} +4 -3
- package/dist/{BaseLegendToggle-DsWphmIb.js → BaseLegendToggle-CtAPwzr2.js} +1 -1
- package/dist/{BaseZoomControls-C9_ygNN4.js → BaseZoomControls-rdzlicuz.js} +2 -2
- package/dist/{ColorPicker-3N_HVgXs.js → ColorPicker-CIAkdPrj.js} +2 -2
- package/dist/{DataTable-DzPEVvSo.js → DataTable-D4tM9s5Y.js} +2 -2
- package/dist/HillActions-BWhxHlrj.js +187 -0
- package/dist/{Legend-C0xAnJdO.js → Legend-CQTRlzK-.js} +2 -2
- package/dist/{NonSvgPenAndPaper-B_mE5UbR.js → NonSvgPenAndPaper-Cawacw1W.js} +19 -19
- package/dist/{PackageVersion-B6Hokxw9.js → PackageVersion--QCMh5k_.js} +1 -1
- package/dist/{PenAndPaper-CSMVXpg2.js → PenAndPaper-cE4J8-rA.js} +11 -11
- package/dist/{Shape-BfnXr1nJ.js → Shape-BPMV94Ij.js} +3 -3
- package/dist/{Slicer-C6qNUmZ4.js → Slicer-5yIrdoJv.js} +15 -15
- package/dist/SlicerPreview-DvjLV2TW.js +1689 -0
- package/dist/{SparkTooltip-uoUiL_P8.js → SparkTooltip-BaYtEKS6.js} +6 -6
- package/dist/Title-BODtwViI.js +87 -0
- package/dist/{Tooltip-CA1rtSyl.js → Tooltip-CMTGxeYO.js} +1 -1
- package/dist/{UserOptions-DzAFK9cY.js → UserOptions-3ujTo3LD.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 +2 -0
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{dom-to-png-BdAFKZQg.js → dom-to-png-4tdMNGPX.js} +1 -1
- package/dist/exposedLib-DWLRqRhv.js +25 -0
- package/dist/{img-Bikk1dGb.js → img-DIQG5q8T.js} +1 -1
- package/dist/{labelUtils-BUhssos9.js → labelUtils-C5lnc_xc.js} +1 -1
- package/dist/{lib-CFm_J26b.js → lib-BuMGJ_a0.js} +216 -173
- package/dist/{package-DmDydylu.js → package-BMc_ZieJ.js} +1 -1
- package/dist/{pdf-zmz3l2uy.js → pdf-Cnz4NKM9.js} +1 -1
- package/dist/{render-common-BIG8JYGK.js → render-common-Ktg2LZFG.js} +21 -21
- 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 +493 -0
- package/dist/types/vue-ui-hill.d.ts +90 -0
- package/dist/useAutoSizeLabelsInsideViewbox-DvDwcwi_.js +122 -0
- package/dist/{useConfig-C0V0eG7L.js → useConfig-BilxnBNr.js} +767 -476
- package/dist/useHints-Dq_w2E8B.js +66 -0
- package/dist/{useNestedProp-BY6DNN3i.js → useNestedProp--NSEmhOH.js} +1 -1
- package/dist/{useObjectBindings-Djwpii4d.js → useObjectBindings-Cwq7NcQz.js} +3 -2
- package/dist/{usePrinter-BH-xle1O.js → usePrinter-BFvi4jVy.js} +2 -2
- package/dist/useTransitions-g_zBREk2.js +39 -0
- package/dist/utils.js +14 -14
- package/dist/{vue-data-ui-rkzh6EkO.js → vue-data-ui-EsawKe_W.js} +85 -81
- package/dist/vue-data-ui.js +77 -76
- package/dist/vue-ui-3d-bar-RSUS2xpL.js +1849 -0
- package/dist/{vue-ui-accordion-UA88lv4d.js → vue-ui-accordion-61MlW-Ge.js} +4 -4
- package/dist/vue-ui-age-pyramid-CgnPWA93.js +1263 -0
- package/dist/vue-ui-annotator-DBRT85HG.js +2913 -0
- package/dist/vue-ui-bullet-Bc3-WaN1.js +724 -0
- package/dist/{vue-ui-bump-BS7RCf0Z.js → vue-ui-bump-Dvv3iSKr.js} +332 -295
- package/dist/{vue-ui-candlestick-BZSGDKrM.js → vue-ui-candlestick-DvvsrIdp.js} +464 -440
- package/dist/vue-ui-carousel-table-DtsNVim8.js +463 -0
- package/dist/vue-ui-chestnut-ArloORzP.js +2068 -0
- package/dist/{vue-ui-chord-D6G7ceE-.js → vue-ui-chord-xX5gWZy8.js} +430 -424
- package/dist/vue-ui-circle-pack-D8wykmqg.js +1638 -0
- package/dist/{vue-ui-cursor-BpN5MsXM.js → vue-ui-cursor-CxgE6Phh.js} +61 -61
- package/dist/{vue-ui-dag-BzgOgXzU.js → vue-ui-dag-C9Sf9vH7.js} +924 -916
- package/dist/vue-ui-dashboard-bGmaglAj.js +520 -0
- package/dist/{vue-ui-digits-OMPrn8fb.js → vue-ui-digits-DgDE-_Fn.js} +58 -50
- package/dist/vue-ui-donut-B_n6wF6B.js +2440 -0
- package/dist/{vue-ui-donut-Cp5NbZ1r.js → vue-ui-donut-Bmo149AR.js} +113 -113
- package/dist/{vue-ui-donut-evolution-DHVi5rOn.js → vue-ui-donut-evolution-D6vH_hfx.js} +528 -447
- package/dist/vue-ui-dumbbell-BX4Ao_wR.js +1582 -0
- package/dist/{vue-ui-flow-BusUK3H0.js → vue-ui-flow-Bshw8pT_.js} +415 -407
- package/dist/vue-ui-funnel-CjYosIik.js +797 -0
- package/dist/vue-ui-galaxy-CvXgy-dy.js +1111 -0
- package/dist/vue-ui-gauge-CByT0_vF.js +953 -0
- package/dist/{vue-ui-geo-CyFgFKlh.js → vue-ui-geo-C-gSZL2q.js} +378 -363
- package/dist/{vue-ui-gizmo-DdeXwCQp.js → vue-ui-gizmo-CJdxyPID.js} +57 -49
- package/dist/{vue-ui-heatmap-D8-qJ7fg.js → vue-ui-heatmap-DEEKv8ip.js} +498 -490
- package/dist/vue-ui-hill-D7LYAgAL.js +1768 -0
- package/dist/{vue-ui-history-plot-C2Aqk2ON.js → vue-ui-history-plot-BhcU94Pt.js} +553 -556
- package/dist/vue-ui-horizontal-bar-CfFye5tL.js +1733 -0
- package/dist/vue-ui-kpi-DCBnNfTb.js +104 -0
- package/dist/vue-ui-mini-loader-CtWpqnLW.js +133 -0
- package/dist/vue-ui-molecule-D3igGyOy.js +958 -0
- package/dist/{vue-ui-mood-radar-BiOjxFEN.js → vue-ui-mood-radar-sl6DMxqR.js} +349 -341
- package/dist/{vue-ui-nested-donuts-Cl1HVvDp.js → vue-ui-nested-donuts-aS4YzaB3.js} +449 -413
- package/dist/vue-ui-onion-EhPTZpW_.js +1258 -0
- package/dist/vue-ui-parallel-coordinate-plot-DE9wTmQQ.js +1455 -0
- package/dist/{vue-ui-quadrant-B21LkUc8.js → vue-ui-quadrant-SaY_RPSE.js} +625 -617
- package/dist/vue-ui-quick-chart-CJ9rejnj.js +2389 -0
- package/dist/{vue-ui-radar-CyzAyVos.js → vue-ui-radar-CaNen5Fj.js} +356 -310
- package/dist/vue-ui-rating--K7rX2an.js +360 -0
- package/dist/vue-ui-relation-circle-FLs8vOxQ.js +925 -0
- package/dist/vue-ui-ridgeline-Beg5hshN.js +1663 -0
- package/dist/{vue-ui-rings-FtcdX8xl.js → vue-ui-rings-BevKD8P-.js} +449 -423
- package/dist/{vue-ui-scatter-Cp_-2ahf.js → vue-ui-scatter-CNA7jF-o.js} +721 -702
- package/dist/{vue-ui-skeleton-COytVrfN.js → vue-ui-skeleton-B9ZP1w-i.js} +395 -387
- package/dist/{vue-ui-smiley-Da2jgkb7.js → vue-ui-smiley-DYnqqk6u.js} +128 -120
- package/dist/{vue-ui-spark-trend-DC2KUlEY.js → vue-ui-spark-trend-R0ebpg-G.js} +132 -117
- package/dist/{vue-ui-sparkbar-DdxQOFIF.js → vue-ui-sparkbar-DYC3By0v.js} +119 -111
- package/dist/{vue-ui-sparkgauge-DTA-fORH.js → vue-ui-sparkgauge-Bw6no-In.js} +76 -68
- package/dist/vue-ui-sparkhistogram-DvRKy8rq.js +590 -0
- package/dist/{vue-ui-sparkline-DcR_N-zT.js → vue-ui-sparkline-Dz1uzBos.js} +389 -364
- package/dist/vue-ui-sparkstackbar-DlnPdZih.js +692 -0
- package/dist/vue-ui-stackbar-B-THcavY.js +2350 -0
- package/dist/vue-ui-stackline-3dBPoI0h.js +2464 -0
- package/dist/{vue-ui-strip-plot-NLCwYvyw.js → vue-ui-strip-plot-ACeYOoHj.js} +505 -484
- package/dist/vue-ui-table-heatmap-DVwMqzje.js +364 -0
- package/dist/{vue-ui-table-AM9brdwU.js → vue-ui-table-rFy16bp0.js} +512 -504
- package/dist/{vue-ui-table-sparkline-BE6DAvur.js → vue-ui-table-sparkline-CABJzK8p.js} +207 -181
- package/dist/vue-ui-thermometer-CVQ-H69Q.js +777 -0
- package/dist/{vue-ui-timer-BZM5ITG9.js → vue-ui-timer-Bm8LpsnI.js} +66 -58
- package/dist/{vue-ui-tiremarks-BCncDpHX.js → vue-ui-tiremarks-DB3f5qiz.js} +127 -119
- package/dist/vue-ui-treemap-DP0Sx8Y8.js +1760 -0
- package/dist/vue-ui-waffle-iPpdk1Bm.js +1412 -0
- package/dist/vue-ui-wheel-BJkEYfLj.js +892 -0
- package/dist/{vue-ui-word-cloud-D7R7nhk1.js → vue-ui-word-cloud-B2sxtel9.js} +440 -432
- package/dist/{vue-ui-world-DZBt-07p.js → vue-ui-world-BBQZLnzm.js} +343 -335
- package/dist/vue-ui-xy-ChZg7AtI.js +1364 -0
- package/dist/{vue-ui-xy-CluEZ7lS.js → vue-ui-xy-DZj5DT-q.js} +1633 -1587
- package/dist/{vue-ui-xy-canvas-7YSYRdwr.js → vue-ui-xy-canvas-BN2u0bOJ.js} +456 -430
- package/dist/vue_ui_hill-dnltu0L-.js +368 -0
- package/package.json +2 -2
- package/dist/SlicerPreview-Cw6WMVhG.js +0 -1689
- package/dist/Title-BuPs74IB.js +0 -87
- package/dist/exposedLib-Ciw6TGtP.js +0 -25
- package/dist/useAutoSizeLabelsInsideViewbox-C9RNjsGv.js +0 -50
- package/dist/useMountedDelay-BAjrhRJb.js +0 -14
- package/dist/vue-ui-3d-bar-D5xHEWr1.js +0 -1824
- package/dist/vue-ui-age-pyramid-CAJg01c7.js +0 -1246
- package/dist/vue-ui-annotator-q3ZKx6ua.js +0 -2905
- package/dist/vue-ui-bullet-ByeaWGfI.js +0 -709
- package/dist/vue-ui-carousel-table-DO5NRXvX.js +0 -455
- package/dist/vue-ui-chestnut-BfeSPeEh.js +0 -2042
- package/dist/vue-ui-circle-pack-Cqmlw7AV.js +0 -1610
- package/dist/vue-ui-dashboard-DLvGJXJY.js +0 -512
- package/dist/vue-ui-donut-ZIRebAWc.js +0 -2418
- package/dist/vue-ui-dumbbell-gDYjU2oF.js +0 -1564
- package/dist/vue-ui-funnel-BtaYaU0r.js +0 -781
- package/dist/vue-ui-galaxy-BMp-HzDh.js +0 -1076
- package/dist/vue-ui-gauge-CBou0cFE.js +0 -925
- package/dist/vue-ui-horizontal-bar-BuwxI7d1.js +0 -1689
- package/dist/vue-ui-kpi-ByxoO01r.js +0 -96
- package/dist/vue-ui-mini-loader-D9pprk2c.js +0 -125
- package/dist/vue-ui-molecule-BqJJq49_.js +0 -932
- package/dist/vue-ui-onion-CRQOxurS.js +0 -1199
- package/dist/vue-ui-parallel-coordinate-plot-Dhn18RtR.js +0 -1412
- package/dist/vue-ui-quick-chart-DAhSXYnp.js +0 -2443
- package/dist/vue-ui-rating-DbxK-ftN.js +0 -352
- package/dist/vue-ui-relation-circle-Cb33DMZo.js +0 -917
- package/dist/vue-ui-ridgeline-D7aArzQk.js +0 -1627
- package/dist/vue-ui-sparkhistogram-D1oFTrvt.js +0 -575
- package/dist/vue-ui-sparkstackbar-BlFio0lP.js +0 -674
- package/dist/vue-ui-stackbar-Cu13EdVa.js +0 -2322
- package/dist/vue-ui-stackline-DKL0o_-3.js +0 -2427
- package/dist/vue-ui-table-heatmap-CSI482KG.js +0 -338
- package/dist/vue-ui-thermometer-D6Czx7Fb.js +0 -769
- package/dist/vue-ui-treemap-BOEYCOdk.js +0 -1727
- package/dist/vue-ui-waffle-BrM8IHdG.js +0 -1367
- package/dist/vue-ui-wheel-BNsajigQ.js +0 -884
- package/dist/vue-ui-xy-Dt_1bSBT.js +0 -1364
|
@@ -0,0 +1,1768 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { $ as t, D as n, Kt as r, Pt as i, X as a, a as o, i as s, q as c, r as l, x as u } from "./lib-BuMGJ_a0.js";
|
|
3
|
+
import { n as d, t as f } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as p } from "./useConfig-BilxnBNr.js";
|
|
5
|
+
import { t as m } from "./usePrinter-BFvi4jVy.js";
|
|
6
|
+
import { t as h } from "./useSvgExport-Ba9qBr9M.js";
|
|
7
|
+
import { t as g } from "./useNestedProp--NSEmhOH.js";
|
|
8
|
+
import { t as ee } from "./useThemeCheck-C43Tcqmk.js";
|
|
9
|
+
import { t as te } from "./useTransitions-g_zBREk2.js";
|
|
10
|
+
import { t as ne } from "./img-DIQG5q8T.js";
|
|
11
|
+
import { n as re } from "./Title-BODtwViI.js";
|
|
12
|
+
import { t as ie } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
13
|
+
import { t as ae } from "./useUserOptionState-DK-_1ddE.js";
|
|
14
|
+
import { t as oe } from "./vue_ui_hill-dnltu0L-.js";
|
|
15
|
+
import { Fragment as _, computed as v, createBlock as se, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createSlots as ce, createVNode as le, defineAsyncComponent as ue, guardReactiveProps as S, nextTick as de, normalizeClass as fe, normalizeProps as C, normalizeStyle as w, onBeforeUnmount as pe, onMounted as me, openBlock as T, ref as E, renderList as he, renderSlot as D, shallowRef as ge, toDisplayString as O, unref as k, useTemplateRef as _e, watch as ve, withCtx as A, withKeys as ye, withModifiers as j } from "vue";
|
|
16
|
+
//#region src/components/vue-ui-hill.vue
|
|
17
|
+
var be = /* @__PURE__ */ e({ default: () => mt }), xe = ["id", "data-editing"], Se = {
|
|
18
|
+
key: 0,
|
|
19
|
+
ref: "chartTitle",
|
|
20
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
21
|
+
}, Ce = {
|
|
22
|
+
key: 3,
|
|
23
|
+
class: "vue-ui-hill__toolbar",
|
|
24
|
+
"data-dom-to-png-ignore": ""
|
|
25
|
+
}, we = ["viewBox"], Te = ["width", "height"], Ee = [
|
|
26
|
+
"x1",
|
|
27
|
+
"x2",
|
|
28
|
+
"y1",
|
|
29
|
+
"y2",
|
|
30
|
+
"stroke",
|
|
31
|
+
"stroke-width",
|
|
32
|
+
"stroke-dasharray"
|
|
33
|
+
], De = [
|
|
34
|
+
"x1",
|
|
35
|
+
"x2",
|
|
36
|
+
"y1",
|
|
37
|
+
"y2",
|
|
38
|
+
"stroke",
|
|
39
|
+
"stroke-width",
|
|
40
|
+
"stroke-dasharray"
|
|
41
|
+
], Oe = [
|
|
42
|
+
"d",
|
|
43
|
+
"stroke",
|
|
44
|
+
"stroke-width",
|
|
45
|
+
"stroke-dasharray"
|
|
46
|
+
], ke = {
|
|
47
|
+
key: 0,
|
|
48
|
+
"pointer-events": "none"
|
|
49
|
+
}, Ae = [
|
|
50
|
+
"d",
|
|
51
|
+
"stroke",
|
|
52
|
+
"stroke-width",
|
|
53
|
+
"stroke-dasharray"
|
|
54
|
+
], je = [
|
|
55
|
+
"cx",
|
|
56
|
+
"cy",
|
|
57
|
+
"r",
|
|
58
|
+
"fill",
|
|
59
|
+
"stroke",
|
|
60
|
+
"stroke-width"
|
|
61
|
+
], Me = [
|
|
62
|
+
"transform",
|
|
63
|
+
"font-size",
|
|
64
|
+
"fill",
|
|
65
|
+
"stroke"
|
|
66
|
+
], Ne = [
|
|
67
|
+
"transform",
|
|
68
|
+
"data-datapoint-index",
|
|
69
|
+
"data-datapoint-id",
|
|
70
|
+
"tabindex",
|
|
71
|
+
"aria-valuenow",
|
|
72
|
+
"aria-valuetext",
|
|
73
|
+
"aria-label",
|
|
74
|
+
"onFocus",
|
|
75
|
+
"onBlur",
|
|
76
|
+
"onKeydown",
|
|
77
|
+
"onPointerenter",
|
|
78
|
+
"onPointerleave",
|
|
79
|
+
"onClick"
|
|
80
|
+
], Pe = ["r", "onPointerdown"], Fe = [
|
|
81
|
+
"r",
|
|
82
|
+
"fill",
|
|
83
|
+
"stroke",
|
|
84
|
+
"stroke-width"
|
|
85
|
+
], Ie = ["stroke", "stroke-width"], Le = ["d"], Re = [
|
|
86
|
+
"x",
|
|
87
|
+
"y",
|
|
88
|
+
"text-anchor",
|
|
89
|
+
"fill",
|
|
90
|
+
"font-size",
|
|
91
|
+
"font-weight",
|
|
92
|
+
"stroke",
|
|
93
|
+
"stroke-width"
|
|
94
|
+
], ze = [
|
|
95
|
+
"transform",
|
|
96
|
+
"tabindex",
|
|
97
|
+
"aria-label",
|
|
98
|
+
"aria-expanded",
|
|
99
|
+
"onClick",
|
|
100
|
+
"onFocus",
|
|
101
|
+
"onKeydown"
|
|
102
|
+
], Be = {
|
|
103
|
+
key: 0,
|
|
104
|
+
class: "vue-ui-hill__stack-overflow-collapse-ghosts",
|
|
105
|
+
"pointer-events": "none",
|
|
106
|
+
"aria-hidden": "true"
|
|
107
|
+
}, Ve = [
|
|
108
|
+
"cx",
|
|
109
|
+
"cy",
|
|
110
|
+
"r",
|
|
111
|
+
"fill",
|
|
112
|
+
"stroke",
|
|
113
|
+
"stroke-width"
|
|
114
|
+
], He = ["from", "dur"], Ue = ["from", "dur"], We = [
|
|
115
|
+
"from",
|
|
116
|
+
"to",
|
|
117
|
+
"dur"
|
|
118
|
+
], Ge = ["dur"], Ke = ["r"], qe = [
|
|
119
|
+
"x",
|
|
120
|
+
"y",
|
|
121
|
+
"width",
|
|
122
|
+
"height",
|
|
123
|
+
"fill",
|
|
124
|
+
"stroke",
|
|
125
|
+
"stroke-width"
|
|
126
|
+
], Je = ["stroke", "stroke-width"], Ye = ["d"], Xe = [
|
|
127
|
+
"y",
|
|
128
|
+
"fill",
|
|
129
|
+
"font-size",
|
|
130
|
+
"font-weight",
|
|
131
|
+
"stroke"
|
|
132
|
+
], Ze = [
|
|
133
|
+
"x",
|
|
134
|
+
"y",
|
|
135
|
+
"fill",
|
|
136
|
+
"font-size",
|
|
137
|
+
"font-weight",
|
|
138
|
+
"letter-spacing"
|
|
139
|
+
], Qe = [
|
|
140
|
+
"x",
|
|
141
|
+
"y",
|
|
142
|
+
"fill",
|
|
143
|
+
"font-size",
|
|
144
|
+
"font-weight",
|
|
145
|
+
"letter-spacing"
|
|
146
|
+
], $e = [
|
|
147
|
+
"x",
|
|
148
|
+
"y",
|
|
149
|
+
"rx",
|
|
150
|
+
"width",
|
|
151
|
+
"height",
|
|
152
|
+
"fill"
|
|
153
|
+
], et = ["id"], tt = [
|
|
154
|
+
"x",
|
|
155
|
+
"y",
|
|
156
|
+
"width",
|
|
157
|
+
"height",
|
|
158
|
+
"rx",
|
|
159
|
+
"ry"
|
|
160
|
+
], nt = ["clip-path"], rt = [
|
|
161
|
+
"width",
|
|
162
|
+
"x",
|
|
163
|
+
"y",
|
|
164
|
+
"fill",
|
|
165
|
+
"height",
|
|
166
|
+
"onPointerenter",
|
|
167
|
+
"onPointerleave"
|
|
168
|
+
], it = [
|
|
169
|
+
"x1",
|
|
170
|
+
"x2",
|
|
171
|
+
"y1",
|
|
172
|
+
"y2",
|
|
173
|
+
"stroke",
|
|
174
|
+
"stroke-width"
|
|
175
|
+
], at = [
|
|
176
|
+
"x",
|
|
177
|
+
"y",
|
|
178
|
+
"width",
|
|
179
|
+
"height",
|
|
180
|
+
"rx",
|
|
181
|
+
"ry",
|
|
182
|
+
"stroke",
|
|
183
|
+
"stroke-width"
|
|
184
|
+
], ot = [
|
|
185
|
+
"x",
|
|
186
|
+
"y",
|
|
187
|
+
"fill",
|
|
188
|
+
"font-size"
|
|
189
|
+
], st = ["aria-label", "onKeydown"], ct = {
|
|
190
|
+
key: 0,
|
|
191
|
+
class: "vue-ui-hill__stack-overflow-menu-title"
|
|
192
|
+
}, lt = [
|
|
193
|
+
"disabled",
|
|
194
|
+
"aria-label",
|
|
195
|
+
"onClick"
|
|
196
|
+
], ut = { class: "vue-ui-hill__stack-overflow-menu-label" }, dt = { class: "vue-ui-hill__stack-overflow-menu-value" }, ft = {
|
|
197
|
+
key: 6,
|
|
198
|
+
class: "vue-data-ui-watermark"
|
|
199
|
+
}, pt = {
|
|
200
|
+
key: 7,
|
|
201
|
+
class: "vue-ui-hill__loading",
|
|
202
|
+
"data-dom-to-png-ignore": ""
|
|
203
|
+
}, mt = /*#__PURE__*/ ie({
|
|
204
|
+
__name: "vue-ui-hill",
|
|
205
|
+
props: {
|
|
206
|
+
config: {
|
|
207
|
+
type: Object,
|
|
208
|
+
default() {
|
|
209
|
+
return {};
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
dataset: {
|
|
213
|
+
type: Array,
|
|
214
|
+
default() {
|
|
215
|
+
return [];
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
emits: [
|
|
220
|
+
"edit",
|
|
221
|
+
"save",
|
|
222
|
+
"cancel",
|
|
223
|
+
"copyAlt",
|
|
224
|
+
"change",
|
|
225
|
+
"dragStart",
|
|
226
|
+
"dragEnd",
|
|
227
|
+
"datapointEnter",
|
|
228
|
+
"datapointLeave",
|
|
229
|
+
"selectDatapoint"
|
|
230
|
+
],
|
|
231
|
+
setup(e, { expose: ie, emit: be }) {
|
|
232
|
+
let mt = ue(() => import("./HillActions-BWhxHlrj.js")), ht = ue(() => import("./UserOptions-3ujTo3LD.js").then((e) => e.n)), gt = ue(() => import("./PackageVersion--QCMh5k_.js").then((e) => e.t)), _t = ue(() => import("./PenAndPaper-cE4J8-rA.js").then((e) => e.t)), vt = ue(() => import("./BaseIcon-91MZoczJ.js").then((e) => e.n)), { vue_ui_hill: yt } = p(), { isThemeValid: bt, warnInvalidTheme: xt } = ee(), St = e, Ct = E(c()), M = ge(null), N = _e("hillChartRef"), P = _e("svgRef"), wt = _e("overflowMenuRef"), Tt = _e("userOptionsRef"), Et = E(!1), Dt = E(!1), Ot = E(0), kt = be;
|
|
233
|
+
function At() {
|
|
234
|
+
let e = g({
|
|
235
|
+
userConfig: St.config,
|
|
236
|
+
defaultConfig: yt
|
|
237
|
+
}), t = {}, n = e.theme;
|
|
238
|
+
if (!n) t = e;
|
|
239
|
+
else if (!bt.value(e)) xt(e), t = e;
|
|
240
|
+
else {
|
|
241
|
+
let i = g({
|
|
242
|
+
userConfig: oe[n] || St.config,
|
|
243
|
+
defaultConfig: e
|
|
244
|
+
});
|
|
245
|
+
t = {
|
|
246
|
+
...g({
|
|
247
|
+
userConfig: St.config,
|
|
248
|
+
defaultConfig: i
|
|
249
|
+
}),
|
|
250
|
+
customPalette: e.customPalette.length ? e.customPalette : r[n] || Jt
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
return t;
|
|
254
|
+
}
|
|
255
|
+
let F = E(At());
|
|
256
|
+
d({
|
|
257
|
+
config: () => F.value,
|
|
258
|
+
dataset: () => St.dataset,
|
|
259
|
+
component: "VueUiHill",
|
|
260
|
+
rules: [f.emptyArray, f.noHint]
|
|
261
|
+
});
|
|
262
|
+
let { transitionEnabled: jt } = te({
|
|
263
|
+
config: () => F.value.transitions,
|
|
264
|
+
dataset: () => St.dataset
|
|
265
|
+
}), { userOptionsVisible: Mt, setUserOptionsVisibility: Nt, keepUserOptionState: Pt } = ae({ config: F.value });
|
|
266
|
+
function Ft() {
|
|
267
|
+
Nt(!0);
|
|
268
|
+
}
|
|
269
|
+
function It() {
|
|
270
|
+
Nt(!1), Kn.value = null, $.value = null, Gn.value = null;
|
|
271
|
+
}
|
|
272
|
+
let { isPrinting: Lt, isImaging: Rt, generatePdf: zt, generateImage: Bt } = m({
|
|
273
|
+
elementId: `hill_${Ct.value}`,
|
|
274
|
+
fileName: F.value.style.chart.title.text || "vue-ui-hill",
|
|
275
|
+
options: F.value.userOptions.print
|
|
276
|
+
}), Vt = v(() => F.value.userOptions.useCursorPointer), Ht = E(0), Ut = E(!1);
|
|
277
|
+
function Wt(e) {
|
|
278
|
+
Ut.value = e, Ht.value += 1;
|
|
279
|
+
}
|
|
280
|
+
let Gt = E(!1);
|
|
281
|
+
function Kt() {
|
|
282
|
+
Gt.value = !Gt.value;
|
|
283
|
+
}
|
|
284
|
+
let qt = v(() => F.value.userOptions.position === "left" ? "right" : "left");
|
|
285
|
+
ve(() => St.config, () => {
|
|
286
|
+
M.value = null, F.value = At(), Ht.value += 1, I.value !== F.value.editing && (I.value = F.value.editing && !F.value.readonly);
|
|
287
|
+
}, { deep: !0 });
|
|
288
|
+
let Jt = v(() => {
|
|
289
|
+
let e = F.value.customPalette;
|
|
290
|
+
return Array.isArray(e) && e.length ? e : i;
|
|
291
|
+
});
|
|
292
|
+
function Yt(e) {
|
|
293
|
+
let t = Number(e);
|
|
294
|
+
return Number.isFinite(t) ? Math.min(1, Math.max(0, t)) : 0;
|
|
295
|
+
}
|
|
296
|
+
function Xt(e) {
|
|
297
|
+
if (e <= 0) return "todo";
|
|
298
|
+
if (e >= 1) return "done";
|
|
299
|
+
let t = .5, n = Math.min(t, Math.max(0, Number(F.value.interaction.peakTolerance) || 0)), r = t - n, i = t + n;
|
|
300
|
+
return e >= r && e <= i ? "top" : e < t ? "left" : "right";
|
|
301
|
+
}
|
|
302
|
+
function Zt(e, t) {
|
|
303
|
+
let n = e && typeof e == "object" ? e : {}, r = `Item ${t + 1}`, i = String(n.name ?? n.label ?? r), a = Yt(n.position ?? n.value ?? 0);
|
|
304
|
+
return {
|
|
305
|
+
...n,
|
|
306
|
+
id: String(n.id ?? `${i}-${t}`),
|
|
307
|
+
name: i,
|
|
308
|
+
label: String(n.label ?? i),
|
|
309
|
+
position: a,
|
|
310
|
+
color: n.color || Jt.value[t % Jt.value.length],
|
|
311
|
+
muted: !!n.muted,
|
|
312
|
+
disabled: !!n.disabled,
|
|
313
|
+
status: Xt(e.position),
|
|
314
|
+
labelSide: [
|
|
315
|
+
"left",
|
|
316
|
+
"right",
|
|
317
|
+
"auto"
|
|
318
|
+
].includes(n.labelSide) ? n.labelSide : "auto",
|
|
319
|
+
__index: t
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
let Qt = v(() => Array.isArray(St.dataset) ? St.dataset.map(Zt) : []);
|
|
323
|
+
function $t(e) {
|
|
324
|
+
return e.map((e) => ({ ...e }));
|
|
325
|
+
}
|
|
326
|
+
function en(e) {
|
|
327
|
+
let { __index: t, ...n } = e;
|
|
328
|
+
return Object.prototype.hasOwnProperty.call(n, "value") && (n.value = n.position), n;
|
|
329
|
+
}
|
|
330
|
+
function tn(e = L.value) {
|
|
331
|
+
return e.map(en);
|
|
332
|
+
}
|
|
333
|
+
let I = E(v(() => F.value.editing && !F.value.readonly).value), L = E($t(Qt.value)), R = E(null);
|
|
334
|
+
ve(Qt, (e) => {
|
|
335
|
+
I.value || (M.value = null, L.value = $t(e));
|
|
336
|
+
}, { deep: !0 });
|
|
337
|
+
let z = v(() => !F.value.readonly);
|
|
338
|
+
ve(z, (e) => {
|
|
339
|
+
e || (R.value = null, M.value = null, I.value = !1, L.value = $t(Qt.value));
|
|
340
|
+
});
|
|
341
|
+
function B(e, t) {
|
|
342
|
+
kt(e, t);
|
|
343
|
+
let n = F.value.events?.[e];
|
|
344
|
+
typeof n == "function" && n(t);
|
|
345
|
+
}
|
|
346
|
+
let V = v(() => F.value.style.chart), nn = v(() => V.value.layout), H = v(() => nn.value.hill), U = v(() => nn.value.plots), W = v(() => nn.value.labels.item), G = v(() => nn.value.labels.phases), K = v(() => V.value.toolbar), q = v(() => nn.value.stackbar), J = v(() => {
|
|
347
|
+
let e = U.value.stacking?.overflow || {}, t = Math.max(0, Number(U.value.radius) || 0);
|
|
348
|
+
return {
|
|
349
|
+
show: e.show !== !1,
|
|
350
|
+
marker: {
|
|
351
|
+
radius: Math.max(4, Number(e.marker?.radius) || t),
|
|
352
|
+
fill: e.marker.fill,
|
|
353
|
+
stroke: e.marker?.stroke || U.value.stroke,
|
|
354
|
+
strokeWidth: e.marker.strokeWidth,
|
|
355
|
+
color: e.marker.labelColor,
|
|
356
|
+
fontSize: e.marker.fontSize,
|
|
357
|
+
bold: e.marker?.bold !== !1,
|
|
358
|
+
offsetY: e.marker.labelOffsetY
|
|
359
|
+
},
|
|
360
|
+
hysteresis: t * 1.5,
|
|
361
|
+
transitionDuration: jt.value ? e.transitionDuration : 0,
|
|
362
|
+
menu: {
|
|
363
|
+
width: Math.max(160, Number(e.menu?.width) || 220),
|
|
364
|
+
maxHeight: Math.max(96, Number(e.menu?.maxHeight) || 220),
|
|
365
|
+
backgroundColor: e.menu?.backgroundColor || V.value.backgroundColor,
|
|
366
|
+
color: e.menu?.color || V.value.color,
|
|
367
|
+
borderColor: e.menu?.borderColor || U.value.stroke,
|
|
368
|
+
borderRadius: Math.max(0, Number(e.menu?.borderRadius) || 6)
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
});
|
|
372
|
+
function rn(e, t, n = 1) {
|
|
373
|
+
let r = Number(e);
|
|
374
|
+
return Number.isFinite(r) ? Math.min(n, Math.max(0, r)) : t;
|
|
375
|
+
}
|
|
376
|
+
let Y = v(() => {
|
|
377
|
+
let e = H.value.geometry || {}, t = Math.max(0, Number(V.value.width) || 0), n = Math.max(0, Number(V.value.height) || 0), r = rn(e.horizontalPaddingRatio, .02, .49), i = rn(e.topPaddingRatio, .12, .49), a = rn(e.bottomPaddingRatio, .2, .49), o = rn(e.curvature, .65), s = t * r, c = t / 2, l = t * (1 - r), u = n * i, d = n * (1 - a), f = c - s, p = l - c, m = s + f * o, h = c + p * (1 - o);
|
|
378
|
+
return {
|
|
379
|
+
startX: s,
|
|
380
|
+
centerX: c,
|
|
381
|
+
endX: l,
|
|
382
|
+
baseY: d,
|
|
383
|
+
peakY: u,
|
|
384
|
+
width: f + p,
|
|
385
|
+
left: [
|
|
386
|
+
{
|
|
387
|
+
x: s,
|
|
388
|
+
y: d
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
x: m,
|
|
392
|
+
y: d
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
x: m,
|
|
396
|
+
y: u
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
x: c,
|
|
400
|
+
y: u
|
|
401
|
+
}
|
|
402
|
+
],
|
|
403
|
+
right: [
|
|
404
|
+
{
|
|
405
|
+
x: c,
|
|
406
|
+
y: u
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
x: h,
|
|
410
|
+
y: u
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
x: h,
|
|
414
|
+
y: d
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
x: l,
|
|
418
|
+
y: d
|
|
419
|
+
}
|
|
420
|
+
]
|
|
421
|
+
};
|
|
422
|
+
}), an = v(() => {
|
|
423
|
+
let { left: e, right: t } = Y.value;
|
|
424
|
+
return [
|
|
425
|
+
`M${e[0].x} ${e[0].y}`,
|
|
426
|
+
`C${e[1].x} ${e[1].y} ${e[2].x} ${e[2].y} ${e[3].x} ${e[3].y}`,
|
|
427
|
+
`C${t[1].x} ${t[1].y} ${t[2].x} ${t[2].y} ${t[3].x} ${t[3].y}`
|
|
428
|
+
].join(" ");
|
|
429
|
+
});
|
|
430
|
+
function on(e, t, n, r, i) {
|
|
431
|
+
let a = 1 - i;
|
|
432
|
+
return a ** 3 * e + 3 * a ** 2 * i * t + 3 * a * i ** 2 * n + i ** 3 * r;
|
|
433
|
+
}
|
|
434
|
+
function sn(e, t, n, r, i) {
|
|
435
|
+
let a = 1 - i;
|
|
436
|
+
return 3 * a ** 2 * (t - e) + 6 * a * i * (n - t) + 3 * i ** 2 * (r - n);
|
|
437
|
+
}
|
|
438
|
+
function cn(e) {
|
|
439
|
+
let t = Yt(e), { startX: n, centerX: r, endX: i, left: a, right: o } = Y.value, s = n + (t - 0) / 1 * (i - n), c = s <= r ? a : o, l = 0, u = 1;
|
|
440
|
+
for (let e = 0; e < 28; e += 1) {
|
|
441
|
+
let e = (l + u) / 2;
|
|
442
|
+
on(c[0].x, c[1].x, c[2].x, c[3].x, e) < s ? l = e : u = e;
|
|
443
|
+
}
|
|
444
|
+
let d = (l + u) / 2, f = on(c[0].y, c[1].y, c[2].y, c[3].y, d), p = sn(c[0].x, c[1].x, c[2].x, c[3].x, d), m = sn(c[0].y, c[1].y, c[2].y, c[3].y, d), h = Math.hypot(p, m) || 1;
|
|
445
|
+
return {
|
|
446
|
+
x: s,
|
|
447
|
+
y: f,
|
|
448
|
+
normalX: m / h,
|
|
449
|
+
normalY: -p / h
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
function ln(e) {
|
|
453
|
+
let t = Number(U.value.stacking.overlapThresholdRatio);
|
|
454
|
+
return e * (2 - (Number.isFinite(t) ? Math.min(2, Math.max(0, t)) : .5));
|
|
455
|
+
}
|
|
456
|
+
function un(e, t) {
|
|
457
|
+
let n = /* @__PURE__ */ new Map(), r = U.value.stacking;
|
|
458
|
+
if (e.forEach((e) => {
|
|
459
|
+
n.set(e.id, {
|
|
460
|
+
position: e.position,
|
|
461
|
+
index: 0,
|
|
462
|
+
size: 1,
|
|
463
|
+
stackId: `stack:${e.id}`
|
|
464
|
+
});
|
|
465
|
+
}), !r.show || e.length < 2 || t <= 0) return n;
|
|
466
|
+
let i = ln(t), a = e.map((e, t) => ({
|
|
467
|
+
datapoint: e,
|
|
468
|
+
index: t,
|
|
469
|
+
point: cn(e.position)
|
|
470
|
+
})).sort((e, t) => e.point.x - t.point.x || e.datapoint.position - t.datapoint.position || e.index - t.index), o = 0;
|
|
471
|
+
for (; o < a.length;) {
|
|
472
|
+
let e = [a[o]], t = o + 1;
|
|
473
|
+
for (; t < a.length;) {
|
|
474
|
+
let n = e[e.length - 1], r = a[t];
|
|
475
|
+
if (Math.hypot(r.point.x - n.point.x, r.point.y - n.point.y) >= i) break;
|
|
476
|
+
e.push(r), t += 1;
|
|
477
|
+
}
|
|
478
|
+
if (e.length > 1) {
|
|
479
|
+
let t = e[0].datapoint.position, r = `stack:${e.map(({ datapoint: e }) => e.id).sort().join("|")}`;
|
|
480
|
+
e.forEach(({ datapoint: i }, a) => {
|
|
481
|
+
n.set(i.id, {
|
|
482
|
+
position: t,
|
|
483
|
+
index: a,
|
|
484
|
+
size: e.length,
|
|
485
|
+
stackId: r
|
|
486
|
+
});
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
o = t;
|
|
490
|
+
}
|
|
491
|
+
return n;
|
|
492
|
+
}
|
|
493
|
+
function dn(e) {
|
|
494
|
+
let t = e + Math.max(0, Number(U.value.strokeWidth) || 0) / 2, n = U.value.stacking.gap ?? e / 2;
|
|
495
|
+
return t * 2 + n;
|
|
496
|
+
}
|
|
497
|
+
let fn = E(null), X = E(null), Z = E(null), pn = E(null), mn = E(null), hn = /* @__PURE__ */ new Set(), gn = null, _n = null, Q = null;
|
|
498
|
+
function vn(e) {
|
|
499
|
+
let t = Math.max(0, Number(U.value.strokeWidth) || 0), n = U.value.shadow.show ? Math.max(0, Number(U.value.shadow.blur) || 0) + Math.max(0, -(Number(U.value.shadow.offsetY) || 0)) : 0;
|
|
500
|
+
return e + t / 2 + n;
|
|
501
|
+
}
|
|
502
|
+
function yn(e, t, n) {
|
|
503
|
+
if (t <= 1) return e - vn(n);
|
|
504
|
+
let r = dn(n);
|
|
505
|
+
return e - (t - 1) * r - vn(n);
|
|
506
|
+
}
|
|
507
|
+
function bn(e, t, n, r) {
|
|
508
|
+
if (n <= 1) return hn.delete(e), !1;
|
|
509
|
+
let i = yn(t, n, r), a = hn.has(e), o = J.value.hysteresis, s = a ? i < o : i < 0;
|
|
510
|
+
return s ? hn.add(e) : hn.delete(e), s;
|
|
511
|
+
}
|
|
512
|
+
let xn = v(() => {
|
|
513
|
+
let e = Math.max(0, Number(U.value.radius) || 0), t = dn(e), n = un(L.value, e), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = [], o = /* @__PURE__ */ new Set(), s = R.value?.id ?? null;
|
|
514
|
+
J.value.show || hn.clear(), L.value.forEach((e) => {
|
|
515
|
+
let t = n.get(e.id) || {
|
|
516
|
+
position: e.position,
|
|
517
|
+
index: 0,
|
|
518
|
+
size: 1,
|
|
519
|
+
stackId: `stack:${e.id}`
|
|
520
|
+
};
|
|
521
|
+
r.has(t.stackId) || r.set(t.stackId, []), r.get(t.stackId).push({
|
|
522
|
+
datapoint: e,
|
|
523
|
+
stack: t
|
|
524
|
+
});
|
|
525
|
+
});
|
|
526
|
+
let c = new Set(r.keys());
|
|
527
|
+
return hn.forEach((e) => {
|
|
528
|
+
c.has(e) || hn.delete(e);
|
|
529
|
+
}), r.forEach((n, r) => {
|
|
530
|
+
let c = [...n].sort((e, t) => e.stack.index - t.stack.index || e.datapoint.__index - t.datapoint.__index), l = c.reduce((e, t) => e + (Number(t.datapoint.position) || 0), 0) / c.length, u = cn(l);
|
|
531
|
+
if (!(J.value.show && bn(r, u.y, c.length, e))) {
|
|
532
|
+
c.forEach((e) => {
|
|
533
|
+
i.set(e.datapoint.id, {
|
|
534
|
+
hidden: !1,
|
|
535
|
+
displayIndex: e.stack.index,
|
|
536
|
+
stackId: r,
|
|
537
|
+
stackSize: c.length,
|
|
538
|
+
promotedFromOverflow: !1,
|
|
539
|
+
renderPosition: e.stack.position
|
|
540
|
+
});
|
|
541
|
+
});
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
c.forEach(({ datapoint: e }) => {
|
|
545
|
+
o.add(e.id);
|
|
546
|
+
});
|
|
547
|
+
let d = s ? c.find(({ datapoint: e }) => e.id === s) : null, f = c.find(({ datapoint: e }) => e.id === fn.value), p = d || f || null, m = p ? c.filter(({ datapoint: e }) => e.id !== p.datapoint.id) : c, h = X.value, g = !!(f && h?.datapointId === f.datapoint.id && !h.moved), ee = m.length ? g ? l : m.reduce((e, t) => e + (Number(t.datapoint.position) || 0), 0) / m.length : l, te = cn(ee);
|
|
548
|
+
c.forEach((e) => {
|
|
549
|
+
let t = p?.datapoint.id === e.datapoint.id, n = t && f?.datapoint.id === e.datapoint.id;
|
|
550
|
+
i.set(e.datapoint.id, {
|
|
551
|
+
hidden: !t,
|
|
552
|
+
displayIndex: +!!t,
|
|
553
|
+
stackId: r,
|
|
554
|
+
stackSize: c.length,
|
|
555
|
+
promotedFromOverflow: n,
|
|
556
|
+
renderPosition: ee
|
|
557
|
+
});
|
|
558
|
+
}), m.length && a.push({
|
|
559
|
+
stackId: r,
|
|
560
|
+
anchorPosition: ee,
|
|
561
|
+
x: te.x,
|
|
562
|
+
y: te.y,
|
|
563
|
+
hiddenCount: m.length,
|
|
564
|
+
hiddenDatapoints: m.map(({ datapoint: e }) => e),
|
|
565
|
+
memberIds: c.map(({ datapoint: e }) => e.id),
|
|
566
|
+
collapseDatapoints: m.map(({ datapoint: e, stack: n }) => {
|
|
567
|
+
let r = cn(n.position);
|
|
568
|
+
return {
|
|
569
|
+
id: e.id,
|
|
570
|
+
color: e.color,
|
|
571
|
+
relativeX: r.x - te.x,
|
|
572
|
+
relativeY: r.y - n.index * t - te.y
|
|
573
|
+
};
|
|
574
|
+
})
|
|
575
|
+
});
|
|
576
|
+
}), {
|
|
577
|
+
layoutMap: n,
|
|
578
|
+
displayMap: i,
|
|
579
|
+
markers: a,
|
|
580
|
+
overflowMemberIds: o
|
|
581
|
+
};
|
|
582
|
+
});
|
|
583
|
+
function Sn(e) {
|
|
584
|
+
let t = wn.value.filter((e) => !e.isStackOverflowHidden), n = t.find((t) => t.id === e), r = new Map(t.filter((t) => t.id !== e).map((e) => [e.id, {
|
|
585
|
+
x: e.x,
|
|
586
|
+
y: e.y
|
|
587
|
+
}]));
|
|
588
|
+
if (!n || !U.value.stacking.show) return r;
|
|
589
|
+
let i = t.filter((e) => Math.abs(e.x - n.x) < .001).sort((e, t) => t.y - e.y || e.datasetIndex - t.datasetIndex);
|
|
590
|
+
if (i.length < 2) return r;
|
|
591
|
+
let a = dn(Math.max(0, Number(U.value.radius) || 0)), o = Math.max(...i.map((e) => e.y));
|
|
592
|
+
return i.filter((t) => t.id !== e).forEach((e, t) => {
|
|
593
|
+
r.set(e.id, {
|
|
594
|
+
x: n.x,
|
|
595
|
+
y: o - t * a
|
|
596
|
+
});
|
|
597
|
+
}), r;
|
|
598
|
+
}
|
|
599
|
+
function Cn() {
|
|
600
|
+
return new Map(wn.value.filter((e) => !e.isStackOverflowHidden).map((e) => [e.id, {
|
|
601
|
+
x: e.x,
|
|
602
|
+
y: e.y
|
|
603
|
+
}]));
|
|
604
|
+
}
|
|
605
|
+
let wn = v(() => {
|
|
606
|
+
let e = Math.max(0, Number(U.value.radius) || 0), { layoutMap: t, displayMap: n, markers: r } = xn.value, i = dn(e), a = R.value, o = a?.stationaryLayout, s = o instanceof Map ? o : M.value instanceof Map ? M.value : null, c = null;
|
|
607
|
+
if (a && o instanceof Map && U.value.stacking.show && e > 0) {
|
|
608
|
+
let t = L.value.find((e) => e.id === a.id);
|
|
609
|
+
if (t) {
|
|
610
|
+
let n = r.find((e) => e.memberIds.includes(t.id));
|
|
611
|
+
if (n) c = {
|
|
612
|
+
x: n.x,
|
|
613
|
+
y: n.y - i
|
|
614
|
+
};
|
|
615
|
+
else {
|
|
616
|
+
let n = cn(t.position), r = ln(e), s = L.value.filter((e) => e.id !== a.id && o.has(e.id)).map((e) => {
|
|
617
|
+
let t = cn(e.position);
|
|
618
|
+
return {
|
|
619
|
+
datapoint: e,
|
|
620
|
+
distance: Math.hypot(t.x - n.x, t.y - n.y)
|
|
621
|
+
};
|
|
622
|
+
}).filter(({ distance: e }) => e < r).sort((e, t) => e.distance - t.distance)[0];
|
|
623
|
+
if (s) {
|
|
624
|
+
let e = o.get(s.datapoint.id), t = [...o.values()].filter((t) => Math.abs(t.x - e.x) < .001), n = Math.min(e.y, ...t.map((e) => e.y));
|
|
625
|
+
c = {
|
|
626
|
+
x: e.x,
|
|
627
|
+
y: n - i
|
|
628
|
+
};
|
|
629
|
+
} else c = n;
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
return L.value.map((e, r) => {
|
|
634
|
+
let o = t.get(e.id) || {
|
|
635
|
+
position: e.position,
|
|
636
|
+
index: 0,
|
|
637
|
+
size: 1,
|
|
638
|
+
stackId: `stack:${e.id}`
|
|
639
|
+
}, l = n.get(e.id) || {
|
|
640
|
+
hidden: !1,
|
|
641
|
+
displayIndex: o.index,
|
|
642
|
+
stackId: o.stackId,
|
|
643
|
+
stackSize: o.size,
|
|
644
|
+
renderPosition: o.position
|
|
645
|
+
}, d = cn(l.renderPosition ?? o.position), f = e.id !== a?.id && !l.promotedFromOverflow && s instanceof Map ? s.get(e.id) : null, p = e.id === a?.id && c ? c : f || {
|
|
646
|
+
x: d.x,
|
|
647
|
+
y: d.y - l.displayIndex * i
|
|
648
|
+
}, m = e.labelSide === "auto" ? null : e.labelSide, h = u(W.value.autoSideThreshold, .5, 1), g = m || (e.position > h ? "left" : "right"), ee = Math.abs(Number(W.value.offsetX) || 0) + U.value.radius + W.value.fontSize / 2;
|
|
649
|
+
return {
|
|
650
|
+
...e,
|
|
651
|
+
datasetIndex: r,
|
|
652
|
+
x: p.x,
|
|
653
|
+
y: p.y,
|
|
654
|
+
stackId: l.stackId,
|
|
655
|
+
stackSize: l.stackSize,
|
|
656
|
+
stackDisplayIndex: l.displayIndex,
|
|
657
|
+
isStackOverflowHidden: l.hidden,
|
|
658
|
+
isPromotedFromStackOverflow: l.promotedFromOverflow,
|
|
659
|
+
labelSide: g,
|
|
660
|
+
labelX: g === "left" ? -ee : ee,
|
|
661
|
+
textAnchor: g === "left" ? "end" : "start"
|
|
662
|
+
};
|
|
663
|
+
});
|
|
664
|
+
});
|
|
665
|
+
function Tn(e) {
|
|
666
|
+
return L.value.find((t) => t.id === e);
|
|
667
|
+
}
|
|
668
|
+
function En(e, t) {
|
|
669
|
+
let n = Yt(t), r;
|
|
670
|
+
L.value = L.value.map((t) => t.id === e ? (r = {
|
|
671
|
+
...t,
|
|
672
|
+
position: n
|
|
673
|
+
}, r) : t), r && (fr(r.id, r.position), B("change", {
|
|
674
|
+
datapoint: en(r),
|
|
675
|
+
dataset: tn()
|
|
676
|
+
}));
|
|
677
|
+
}
|
|
678
|
+
function Dn(e) {
|
|
679
|
+
let t = P.value;
|
|
680
|
+
if (!t) return null;
|
|
681
|
+
let n = t.getScreenCTM();
|
|
682
|
+
if (!n) return null;
|
|
683
|
+
let r = t.createSVGPoint();
|
|
684
|
+
r.x = e, r.y = 0;
|
|
685
|
+
let i = r.matrixTransform(n.inverse()), { startX: a, endX: o } = Y.value;
|
|
686
|
+
return Yt(0 + (i.x - a) / (o - a) * 1);
|
|
687
|
+
}
|
|
688
|
+
function On() {
|
|
689
|
+
z.value && (Z.value = null, fn.value = null, X.value = null, mn.value = null, ar(), M.value = null, L.value = $t(Qt.value), I.value = !0, B("edit", tn()));
|
|
690
|
+
}
|
|
691
|
+
function kn() {
|
|
692
|
+
let e = tn();
|
|
693
|
+
Z.value = null, fn.value = null, X.value = null, mn.value = null, ar(), R.value = null, I.value = !1, B("save", e);
|
|
694
|
+
}
|
|
695
|
+
function An() {
|
|
696
|
+
Z.value = null, fn.value = null, X.value = null, mn.value = null, ar(), R.value = null, M.value = null, L.value = $t(Qt.value), I.value = !1, B("cancel", tn());
|
|
697
|
+
}
|
|
698
|
+
function jn(e, t) {
|
|
699
|
+
if (!z.value || !I.value || t.disabled) return;
|
|
700
|
+
Z.value = null;
|
|
701
|
+
let n = e.currentTarget.closest(".vue-ui-hill__datapoint");
|
|
702
|
+
n && typeof n.focus == "function" && (n.focus(), $.value = t.id), e.preventDefault();
|
|
703
|
+
let r = Sn(t.id), i = X.value?.datapointId === t.id && !X.value?.moved;
|
|
704
|
+
if (R.value = {
|
|
705
|
+
id: t.id,
|
|
706
|
+
pointerId: e.pointerId,
|
|
707
|
+
stationaryLayout: r,
|
|
708
|
+
startClientX: e.clientX,
|
|
709
|
+
hasMoved: !1,
|
|
710
|
+
deferPositionUpdate: i
|
|
711
|
+
}, P.value?.setPointerCapture(e.pointerId), !i) {
|
|
712
|
+
let n = Dn(e.clientX);
|
|
713
|
+
n !== null && En(t.id, n);
|
|
714
|
+
}
|
|
715
|
+
let a = Tn(t.id);
|
|
716
|
+
a && B("dragStart", en(a));
|
|
717
|
+
}
|
|
718
|
+
function Mn(e) {
|
|
719
|
+
if (!R.value || R.value.pointerId !== e.pointerId) return;
|
|
720
|
+
e.preventDefault();
|
|
721
|
+
let t = Math.abs(e.clientX - R.value.startClientX);
|
|
722
|
+
if (R.value.deferPositionUpdate && !R.value.hasMoved && t < 3) return;
|
|
723
|
+
R.value.hasMoved || (R.value = {
|
|
724
|
+
...R.value,
|
|
725
|
+
hasMoved: !0
|
|
726
|
+
});
|
|
727
|
+
let n = Dn(e.clientX);
|
|
728
|
+
n !== null && En(R.value.id, n);
|
|
729
|
+
}
|
|
730
|
+
function Nn(e) {
|
|
731
|
+
let t = R.value;
|
|
732
|
+
if (!t || t.pointerId !== e.pointerId) return;
|
|
733
|
+
P.value?.hasPointerCapture(e.pointerId) && P.value.releasePointerCapture(e.pointerId);
|
|
734
|
+
let n = e.type === "pointerup" && !t.hasMoved, r = Tn(t.id);
|
|
735
|
+
M.value = Cn(), R.value = null, r && (n && B("selectDatapoint", In(r)), B("dragEnd", en(r)));
|
|
736
|
+
}
|
|
737
|
+
function Pn(e, t) {
|
|
738
|
+
if (!z.value || !I.value || t.disabled) return;
|
|
739
|
+
let n = Math.max(0, Number(F.value.interaction.keyboardStep) || 0), r = null;
|
|
740
|
+
switch (e.key) {
|
|
741
|
+
case "ArrowLeft":
|
|
742
|
+
case "ArrowDown":
|
|
743
|
+
r = t.position - n;
|
|
744
|
+
break;
|
|
745
|
+
case "ArrowRight":
|
|
746
|
+
case "ArrowUp":
|
|
747
|
+
r = t.position + n;
|
|
748
|
+
break;
|
|
749
|
+
case "Home":
|
|
750
|
+
r = 0;
|
|
751
|
+
break;
|
|
752
|
+
case "End":
|
|
753
|
+
r = 1;
|
|
754
|
+
break;
|
|
755
|
+
default: return;
|
|
756
|
+
}
|
|
757
|
+
e.preventDefault();
|
|
758
|
+
let i = e.currentTarget;
|
|
759
|
+
$.value = t.id, R.value = {
|
|
760
|
+
id: t.id,
|
|
761
|
+
pointerId: null,
|
|
762
|
+
stationaryLayout: Sn(t.id)
|
|
763
|
+
}, En(t.id, r), M.value = Cn(), R.value = null, de(() => {
|
|
764
|
+
i?.isConnected && i.focus({ preventScroll: !0 });
|
|
765
|
+
});
|
|
766
|
+
}
|
|
767
|
+
function Fn(e) {
|
|
768
|
+
let t = .5, n = Math.max(0, Number(F.value.interaction.peakTolerance) || 0);
|
|
769
|
+
return Math.abs(e - t) <= n ? F.value.a11y.translations.topOfHill : e < t ? G.value.left.text : G.value.right.text;
|
|
770
|
+
}
|
|
771
|
+
function In(e) {
|
|
772
|
+
return {
|
|
773
|
+
datapoint: en(e),
|
|
774
|
+
index: e.__index
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
function Ln(e) {
|
|
778
|
+
$.value = null, Kn.value = e.id, ![0, 1].includes(e.position) && $.value !== e.id && Yn(e), B("datapointEnter", In(e));
|
|
779
|
+
}
|
|
780
|
+
function Rn(e) {
|
|
781
|
+
Kn.value === e.id && (Kn.value = null), Gn.value === e.id && $.value !== e.id && R.value?.id !== e.id && (Gn.value = null), B("datapointLeave", In(e));
|
|
782
|
+
}
|
|
783
|
+
function zn(e) {
|
|
784
|
+
I.value && z.value || B("selectDatapoint", In(e));
|
|
785
|
+
}
|
|
786
|
+
let Bn = v(() => {
|
|
787
|
+
let e = V.value;
|
|
788
|
+
return {
|
|
789
|
+
width: "100%",
|
|
790
|
+
maxWidth: "100%",
|
|
791
|
+
color: e.color,
|
|
792
|
+
backgroundColor: e.backgroundColor,
|
|
793
|
+
fontFamily: F.value.style.fontFamily,
|
|
794
|
+
"--vue-ui-hill-button-hover-border": K.value.buttons.hoverBorderColor,
|
|
795
|
+
"--vue-ui-hill-button-active-offset": `${K.value.buttons.activeTranslateY}px`
|
|
796
|
+
};
|
|
797
|
+
}), Vn = v(() => ({
|
|
798
|
+
color: K.value.status.color,
|
|
799
|
+
fontSize: `${K.value.status.fontSize}px`,
|
|
800
|
+
fontWeight: K.value.status.bold ? "bold" : "normal",
|
|
801
|
+
lineHeight: K.value.status.lineHeight
|
|
802
|
+
}));
|
|
803
|
+
v(() => ({
|
|
804
|
+
color: V.value.title.color,
|
|
805
|
+
fontSize: `${V.value.title.fontSize}px`,
|
|
806
|
+
fontWeight: V.value.title.bold ? "bold" : "normal",
|
|
807
|
+
textAlign: V.value.title.textAlign
|
|
808
|
+
})), v(() => ({
|
|
809
|
+
color: V.value.title.subtitle.color,
|
|
810
|
+
fontSize: `${V.value.title.subtitle.fontSize}px`,
|
|
811
|
+
fontWeight: V.value.title.subtitle.bold ? "bold" : "normal"
|
|
812
|
+
}));
|
|
813
|
+
let Hn = v(() => {
|
|
814
|
+
let e = Math.max(0, Number(V.value.height) || 0);
|
|
815
|
+
return Math.min(e, Y.value.baseY + e) + G.value.offsetY;
|
|
816
|
+
});
|
|
817
|
+
function Un(e) {
|
|
818
|
+
return G.value[e].text;
|
|
819
|
+
}
|
|
820
|
+
function Wn(e) {
|
|
821
|
+
return e.position === 0 || e.position === 1;
|
|
822
|
+
}
|
|
823
|
+
let Gn = E(null), Kn = E(null), $ = E(null);
|
|
824
|
+
function qn(e) {
|
|
825
|
+
$.value = e.id;
|
|
826
|
+
}
|
|
827
|
+
function Jn(e) {
|
|
828
|
+
$.value === e.id && ($.value = null), Gn.value === e.id && Kn.value !== e.id && R.value?.id !== e.id && (Gn.value = null);
|
|
829
|
+
}
|
|
830
|
+
function Yn(e) {
|
|
831
|
+
e?.id && (Gn.value = e.id);
|
|
832
|
+
}
|
|
833
|
+
let Xn = v(() => {
|
|
834
|
+
let e = [], t = [], n = null;
|
|
835
|
+
return wn.value.forEach((r) => {
|
|
836
|
+
if (!r.isStackOverflowHidden) {
|
|
837
|
+
if (r.id === Gn.value) {
|
|
838
|
+
n = r;
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
841
|
+
Wn(r) ? e.push(r) : t.push(r);
|
|
842
|
+
}
|
|
843
|
+
}), [
|
|
844
|
+
...e,
|
|
845
|
+
...t,
|
|
846
|
+
...n ? [n] : []
|
|
847
|
+
];
|
|
848
|
+
}), Zn = v(() => xn.value.markers), Qn = v(() => Zn.value.find((e) => e.stackId === Z.value) || null), $n = v(() => {
|
|
849
|
+
let e = Math.max(160, Number(J.value.menu.width) || 220), t = Math.max(80, Number(J.value.menu.maxHeight) || 220);
|
|
850
|
+
return {
|
|
851
|
+
visibility: pn.value ? "visible" : "hidden",
|
|
852
|
+
width: "max-content",
|
|
853
|
+
minWidth: `${e}px`,
|
|
854
|
+
maxWidth: "calc(100% - 16px)",
|
|
855
|
+
maxHeight: `${t}px`,
|
|
856
|
+
backgroundColor: J.value.menu.backgroundColor,
|
|
857
|
+
color: J.value.menu.color,
|
|
858
|
+
borderColor: J.value.menu.borderColor,
|
|
859
|
+
borderRadius: `${J.value.menu.borderRadius}px`
|
|
860
|
+
};
|
|
861
|
+
});
|
|
862
|
+
function er(e, t) {
|
|
863
|
+
let n = P.value, r = N.value;
|
|
864
|
+
if (!n || !r) return null;
|
|
865
|
+
let i = n.getScreenCTM();
|
|
866
|
+
if (!i) return null;
|
|
867
|
+
let a = n.createSVGPoint();
|
|
868
|
+
a.x = e, a.y = t;
|
|
869
|
+
let o = a.matrixTransform(i), s = r.getBoundingClientRect();
|
|
870
|
+
return {
|
|
871
|
+
x: o.x - s.left,
|
|
872
|
+
y: o.y - s.top
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
function tr() {
|
|
876
|
+
let e = Qn.value, t = wt.value, n = N.value;
|
|
877
|
+
if (!e || !t || !n) {
|
|
878
|
+
pn.value = null;
|
|
879
|
+
return;
|
|
880
|
+
}
|
|
881
|
+
let r = er(e.x, e.y), i = er(e.x, e.y + J.value.marker.radius);
|
|
882
|
+
if (!r || !i) {
|
|
883
|
+
pn.value = null;
|
|
884
|
+
return;
|
|
885
|
+
}
|
|
886
|
+
let a = n.getBoundingClientRect(), o = t.offsetWidth, s = t.offsetHeight, c = Math.abs(i.y - r.y), l = Math.max(0, a.width - 16), u = Math.min(o, l), d = r.x;
|
|
887
|
+
if (u >= l) d = a.width / 2;
|
|
888
|
+
else {
|
|
889
|
+
let e = u / 2;
|
|
890
|
+
d = Math.min(a.width - 8 - e, Math.max(8 + e, r.x));
|
|
891
|
+
}
|
|
892
|
+
let f = r.y + c + 8, p = r.y - c - 8 - s, m = f + s <= a.height - 8, h = p >= 8, g = f;
|
|
893
|
+
!m && h ? g = p : m || (g = Math.min(Math.max(8, f), Math.max(8, a.height - s - 8))), pn.value = {
|
|
894
|
+
left: `${d}px`,
|
|
895
|
+
top: `${g}px`,
|
|
896
|
+
transform: "translateX(-50%)",
|
|
897
|
+
visibility: "visible"
|
|
898
|
+
};
|
|
899
|
+
}
|
|
900
|
+
function nr() {
|
|
901
|
+
typeof window > "u" || (Q !== null && window.cancelAnimationFrame(Q), Q = window.requestAnimationFrame(() => {
|
|
902
|
+
Q = null, tr();
|
|
903
|
+
}));
|
|
904
|
+
}
|
|
905
|
+
ve(Zn, (e) => {
|
|
906
|
+
Z.value && !e.some((e) => e.stackId === Z.value) && ir();
|
|
907
|
+
}), ve(() => {
|
|
908
|
+
let e = Qn.value;
|
|
909
|
+
return e ? [
|
|
910
|
+
e.stackId,
|
|
911
|
+
e.x,
|
|
912
|
+
e.y,
|
|
913
|
+
e.hiddenDatapoints.length,
|
|
914
|
+
e.hiddenDatapoints.map((e) => `${e.id}:${e.label}:${e.position}`).join("|"),
|
|
915
|
+
J.value.marker.radius,
|
|
916
|
+
J.value.menu.width,
|
|
917
|
+
J.value.menu.maxHeight,
|
|
918
|
+
J.value.menu.backgroundColor,
|
|
919
|
+
J.value.menu.color,
|
|
920
|
+
J.value.menu.borderColor,
|
|
921
|
+
J.value.menu.borderRadius,
|
|
922
|
+
Ut.value
|
|
923
|
+
] : null;
|
|
924
|
+
}, (e) => {
|
|
925
|
+
if (!e) {
|
|
926
|
+
pn.value = null;
|
|
927
|
+
return;
|
|
928
|
+
}
|
|
929
|
+
de(nr);
|
|
930
|
+
}, { flush: "post" }), ve(wt, (e, t) => {
|
|
931
|
+
t && _n && _n.unobserve(t), e && _n && (_n.observe(e), de(nr));
|
|
932
|
+
}, { flush: "post" }), ve(() => {
|
|
933
|
+
let e = fn.value;
|
|
934
|
+
return !e || xn.value.overflowMemberIds.has(e);
|
|
935
|
+
}, (e) => {
|
|
936
|
+
e || (fn.value = null, X.value = null);
|
|
937
|
+
});
|
|
938
|
+
function rr(e) {
|
|
939
|
+
if (e) {
|
|
940
|
+
if (Z.value === e.stackId) {
|
|
941
|
+
nr();
|
|
942
|
+
return;
|
|
943
|
+
}
|
|
944
|
+
pn.value = null, Z.value = e.stackId, de(nr);
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
function ir() {
|
|
948
|
+
Z.value = null, pn.value = null, typeof window < "u" && Q !== null && (window.cancelAnimationFrame(Q), Q = null);
|
|
949
|
+
}
|
|
950
|
+
function ar() {
|
|
951
|
+
gn !== null && (clearTimeout(gn), gn = null);
|
|
952
|
+
}
|
|
953
|
+
function or() {
|
|
954
|
+
let e = X.value;
|
|
955
|
+
!e || e.moved || (ar(), mn.value = e.stackId, fn.value = null, X.value = null, ir(), gn = setTimeout(() => {
|
|
956
|
+
mn.value = null, gn = null;
|
|
957
|
+
}, J.value.transitionDuration + 80));
|
|
958
|
+
}
|
|
959
|
+
function sr(e) {
|
|
960
|
+
if (!(e instanceof Element)) return {
|
|
961
|
+
isMenu: !1,
|
|
962
|
+
isMarker: !1,
|
|
963
|
+
isSelectedDatapoint: !1
|
|
964
|
+
};
|
|
965
|
+
let t = X.value, n = e.closest("[data-datapoint-id]");
|
|
966
|
+
return {
|
|
967
|
+
isMenu: !!e.closest("[data-stack-overflow-menu]"),
|
|
968
|
+
isMarker: !!e.closest("[data-stack-overflow-marker]"),
|
|
969
|
+
isSelectedDatapoint: !!(t && n?.getAttribute("data-datapoint-id") === t.datapointId)
|
|
970
|
+
};
|
|
971
|
+
}
|
|
972
|
+
function cr(e) {
|
|
973
|
+
let t = sr(e.target);
|
|
974
|
+
Z.value && !t.isMenu && !t.isMarker && ir(), X.value && !X.value.moved && !t.isMenu && !t.isMarker && !t.isSelectedDatapoint && or();
|
|
975
|
+
}
|
|
976
|
+
function lr(e) {
|
|
977
|
+
let t = wn.value.find((t) => t.id === e);
|
|
978
|
+
if (!t || t.isStackOverflowHidden) return;
|
|
979
|
+
let n = P.value?.querySelector(`[data-datapoint-index="${t.__index}"]`);
|
|
980
|
+
n && typeof n.focus == "function" && n.focus({ preventScroll: !0 });
|
|
981
|
+
}
|
|
982
|
+
function ur(e) {
|
|
983
|
+
if (!e || e.disabled || F.value.readonly) return;
|
|
984
|
+
let t = Qn.value?.stackId;
|
|
985
|
+
t && (ar(), mn.value = null, fn.value = e.id, X.value = {
|
|
986
|
+
datapointId: e.id,
|
|
987
|
+
stackId: t,
|
|
988
|
+
initialPosition: e.position,
|
|
989
|
+
moved: !1
|
|
990
|
+
}, ir(), de(() => {
|
|
991
|
+
lr(e.id);
|
|
992
|
+
let t = wn.value.find((t) => t.id === e.id);
|
|
993
|
+
t && B("selectDatapoint", In(t));
|
|
994
|
+
}));
|
|
995
|
+
}
|
|
996
|
+
function dr() {
|
|
997
|
+
let e = Math.max(1, Number(Y.value.width) || 1);
|
|
998
|
+
return Math.max(1e-6, 1 / e * 2);
|
|
999
|
+
}
|
|
1000
|
+
function fr(e, t) {
|
|
1001
|
+
let n = X.value;
|
|
1002
|
+
!n || n.datapointId !== e || n.moved || Math.abs(t - n.initialPosition) >= dr() && (X.value = {
|
|
1003
|
+
...n,
|
|
1004
|
+
moved: !0
|
|
1005
|
+
});
|
|
1006
|
+
}
|
|
1007
|
+
me(() => {
|
|
1008
|
+
document.addEventListener("pointerdown", cr), window.addEventListener("resize", nr, { passive: !0 }), typeof ResizeObserver < "u" && (_n = new ResizeObserver(() => {
|
|
1009
|
+
Qn.value && nr();
|
|
1010
|
+
}), N.value && _n.observe(N.value), P.value && _n.observe(P.value));
|
|
1011
|
+
}), pe(() => {
|
|
1012
|
+
document.removeEventListener("pointerdown", cr), window.removeEventListener("resize", nr), _n?.disconnect(), _n = null, Q !== null && (window.cancelAnimationFrame(Q), Q = null), ar();
|
|
1013
|
+
});
|
|
1014
|
+
function pr(e) {
|
|
1015
|
+
return R.value ? R.value.id === e.id : Kn.value === e.id || $.value === e.id;
|
|
1016
|
+
}
|
|
1017
|
+
function mr(e) {
|
|
1018
|
+
return s(F.value.style.chart.layout.plots.dragMarker.positionIndicator.value.formatter, e.position, a({
|
|
1019
|
+
p: "",
|
|
1020
|
+
v: e.position * 100,
|
|
1021
|
+
s: "%",
|
|
1022
|
+
r: F.value.style.chart.layout.plots.dragMarker.positionIndicator.value.rounding
|
|
1023
|
+
}));
|
|
1024
|
+
}
|
|
1025
|
+
function hr(e) {
|
|
1026
|
+
if (e?.stage === "start") {
|
|
1027
|
+
Dt.value = !0;
|
|
1028
|
+
return;
|
|
1029
|
+
}
|
|
1030
|
+
if (e?.stage === "end") {
|
|
1031
|
+
Dt.value = !1;
|
|
1032
|
+
return;
|
|
1033
|
+
}
|
|
1034
|
+
Bt();
|
|
1035
|
+
}
|
|
1036
|
+
let gr = v(() => F.value.style.chart.backgroundColor), _r = v(() => F.value.style.chart.legend), { exportSvg: vr, getSvg: yr } = h({
|
|
1037
|
+
svg: P,
|
|
1038
|
+
title: v(() => F.value.style.chart.title),
|
|
1039
|
+
legend: _r,
|
|
1040
|
+
legendItems: null,
|
|
1041
|
+
backgroundColor: gr
|
|
1042
|
+
});
|
|
1043
|
+
async function br({ isCb: e }) {
|
|
1044
|
+
Et.value = !0, await de();
|
|
1045
|
+
try {
|
|
1046
|
+
if (e) {
|
|
1047
|
+
let { blob: e, url: t, text: n, dataUrl: r } = await yr();
|
|
1048
|
+
await Promise.resolve(F.value.userOptions.callbacks.svg({
|
|
1049
|
+
blob: e,
|
|
1050
|
+
url: t,
|
|
1051
|
+
text: n,
|
|
1052
|
+
dataUrl: r
|
|
1053
|
+
}));
|
|
1054
|
+
} else await Promise.resolve(vr());
|
|
1055
|
+
} finally {
|
|
1056
|
+
Et.value = !1;
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
function xr(e = null) {
|
|
1060
|
+
de(() => {
|
|
1061
|
+
let r = tn().map((e) => [
|
|
1062
|
+
[e.name],
|
|
1063
|
+
[e.position],
|
|
1064
|
+
[mr(e)],
|
|
1065
|
+
[Fn(e.position)]
|
|
1066
|
+
]), i = n([
|
|
1067
|
+
[F.value.style.chart.title.text],
|
|
1068
|
+
[F.value.style.chart.title.subtitle.text],
|
|
1069
|
+
[
|
|
1070
|
+
["Name"],
|
|
1071
|
+
["Position"],
|
|
1072
|
+
["Percentage"],
|
|
1073
|
+
["Phase"]
|
|
1074
|
+
]
|
|
1075
|
+
].concat(r));
|
|
1076
|
+
e ? e(i) : t({
|
|
1077
|
+
csvContent: i,
|
|
1078
|
+
title: F.value.style.chart.title.text || "vue-ui-hill"
|
|
1079
|
+
});
|
|
1080
|
+
});
|
|
1081
|
+
}
|
|
1082
|
+
let Sr = v(() => F.value.style.chart.layout.stackbar.show), Cr = v(() => {
|
|
1083
|
+
let e = wn.value.length;
|
|
1084
|
+
wn.value.reduce((e, t) => e + (t?.position ?? 0), 0);
|
|
1085
|
+
let t = 0, n = wn.value.every((e) => e.position === 1);
|
|
1086
|
+
return wn.value.toSorted((e, t) => {
|
|
1087
|
+
if (n) return e.__index - t.__index;
|
|
1088
|
+
let r = (e?.position ?? 0) - (t?.position ?? 0);
|
|
1089
|
+
return r === 0 ? e.__index - t.__index : r;
|
|
1090
|
+
}).map((n) => {
|
|
1091
|
+
let r = n?.position ?? 0, i = e > 0 ? r / e : 0, a = {
|
|
1092
|
+
...n,
|
|
1093
|
+
proportion: i,
|
|
1094
|
+
proportionStart: t
|
|
1095
|
+
};
|
|
1096
|
+
return t += i, a;
|
|
1097
|
+
});
|
|
1098
|
+
}), wr = v(() => Math.min(1, Math.max(0, Cr.value.reduce((e, t) => e + t.proportion, 0)))), Tr = v(() => wr.value * 100), Er = v(() => Y.value.left[0].x + Y.value.width * wr.value), Dr = v(() => V.value.height + 32 + q.value.paddingTop);
|
|
1099
|
+
function Or() {
|
|
1100
|
+
return s(q.value.label.formatter, Tr.value, a({
|
|
1101
|
+
p: "",
|
|
1102
|
+
v: Tr.value,
|
|
1103
|
+
s: "%",
|
|
1104
|
+
r: 0
|
|
1105
|
+
}));
|
|
1106
|
+
}
|
|
1107
|
+
let kr = v(() => `${Ct.value}-stackbar-clip`);
|
|
1108
|
+
async function Ar() {
|
|
1109
|
+
let e = tn();
|
|
1110
|
+
if (kt("copyAlt", {
|
|
1111
|
+
config: F.value,
|
|
1112
|
+
dataset: e
|
|
1113
|
+
}), !F.value.userOptions.callbacks.altCopy) {
|
|
1114
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
1115
|
+
return;
|
|
1116
|
+
}
|
|
1117
|
+
await Promise.resolve(F.value.userOptions.callbacks.altCopy({
|
|
1118
|
+
config: F.value,
|
|
1119
|
+
dataset: e
|
|
1120
|
+
}));
|
|
1121
|
+
}
|
|
1122
|
+
async function jr({ scale: e = 2 } = {}) {
|
|
1123
|
+
if (!N.value) return;
|
|
1124
|
+
let { width: t, height: n } = N.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await ne({
|
|
1125
|
+
domElement: N.value,
|
|
1126
|
+
base64: !0,
|
|
1127
|
+
img: !0,
|
|
1128
|
+
scale: e
|
|
1129
|
+
});
|
|
1130
|
+
return {
|
|
1131
|
+
imageUri: i,
|
|
1132
|
+
base64: a,
|
|
1133
|
+
title: F.value.style.chart.title.text,
|
|
1134
|
+
width: t,
|
|
1135
|
+
height: n,
|
|
1136
|
+
aspectRatio: r
|
|
1137
|
+
};
|
|
1138
|
+
}
|
|
1139
|
+
function Mr() {
|
|
1140
|
+
return tn();
|
|
1141
|
+
}
|
|
1142
|
+
return ie({
|
|
1143
|
+
isEditing: I,
|
|
1144
|
+
beginEditing: On,
|
|
1145
|
+
save: kn,
|
|
1146
|
+
cancel: An,
|
|
1147
|
+
getData: Mr,
|
|
1148
|
+
copyAlt: Ar,
|
|
1149
|
+
toggleFullscreen: Wt,
|
|
1150
|
+
toggleAnnotator: Kt,
|
|
1151
|
+
generateImage: Bt,
|
|
1152
|
+
generateSvg: br,
|
|
1153
|
+
generatePdf: zt,
|
|
1154
|
+
generateCsv: xr,
|
|
1155
|
+
getImage: jr
|
|
1156
|
+
}), (e, t) => (T(), b("div", {
|
|
1157
|
+
ref_key: "hillChartRef",
|
|
1158
|
+
ref: N,
|
|
1159
|
+
class: fe("vue-data-ui-component vue-ui-hill"),
|
|
1160
|
+
style: w(Bn.value),
|
|
1161
|
+
id: `hill_${Ct.value}`,
|
|
1162
|
+
onMouseenter: Ft,
|
|
1163
|
+
onMouseleave: It,
|
|
1164
|
+
"data-editing": I.value
|
|
1165
|
+
}, [
|
|
1166
|
+
F.value.style.chart.title.text ? (T(), b("div", Se, [(T(), se(re, {
|
|
1167
|
+
key: `title_${Ot.value}`,
|
|
1168
|
+
config: {
|
|
1169
|
+
title: {
|
|
1170
|
+
cy: "hill-div-title",
|
|
1171
|
+
...F.value.style.chart.title
|
|
1172
|
+
},
|
|
1173
|
+
subtitle: {
|
|
1174
|
+
cy: "hill-div-subtitle",
|
|
1175
|
+
...F.value.style.chart.title.subtitle
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
}, null, 8, ["config"]))], 512)) : y("", !0),
|
|
1179
|
+
F.value.userOptions.buttons.annotator && P.value ? (T(), se(k(_t), {
|
|
1180
|
+
key: 1,
|
|
1181
|
+
color: F.value.style.chart.color,
|
|
1182
|
+
backgroundColor: F.value.style.chart.backgroundColor,
|
|
1183
|
+
active: Gt.value,
|
|
1184
|
+
svgRef: P.value,
|
|
1185
|
+
isCursorPointer: Vt.value,
|
|
1186
|
+
onClose: Kt
|
|
1187
|
+
}, {
|
|
1188
|
+
"annotator-action-close": A(() => [D(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
1189
|
+
"annotator-action-color": A(({ color: t }) => [D(e.$slots, "annotator-action-color", C(S({ color: t })), void 0, !0)]),
|
|
1190
|
+
"annotator-action-draw": A(({ mode: t }) => [D(e.$slots, "annotator-action-draw", C(S({ mode: t })), void 0, !0)]),
|
|
1191
|
+
"annotator-action-undo": A(({ disabled: t }) => [D(e.$slots, "annotator-action-undo", C(S({ disabled: t })), void 0, !0)]),
|
|
1192
|
+
"annotator-action-redo": A(({ disabled: t }) => [D(e.$slots, "annotator-action-redo", C(S({ disabled: t })), void 0, !0)]),
|
|
1193
|
+
"annotator-action-delete": A(({ disabled: t }) => [D(e.$slots, "annotator-action-delete", C(S({ disabled: t })), void 0, !0)]),
|
|
1194
|
+
_: 3
|
|
1195
|
+
}, 8, [
|
|
1196
|
+
"color",
|
|
1197
|
+
"backgroundColor",
|
|
1198
|
+
"active",
|
|
1199
|
+
"svgRef",
|
|
1200
|
+
"isCursorPointer"
|
|
1201
|
+
])) : y("", !0),
|
|
1202
|
+
K.value.show ? (T(), se(k(mt), {
|
|
1203
|
+
key: 2,
|
|
1204
|
+
"is-editing": I.value,
|
|
1205
|
+
"is-editable": z.value,
|
|
1206
|
+
"is-fullscreen": Ut.value,
|
|
1207
|
+
position: qt.value,
|
|
1208
|
+
color: F.value.style.chart.color,
|
|
1209
|
+
"background-color": F.value.style.chart.backgroundColor,
|
|
1210
|
+
translations: K.value.buttons.translations,
|
|
1211
|
+
"is-cursor-pointer": Vt.value,
|
|
1212
|
+
onUpdate: On,
|
|
1213
|
+
onCancel: An,
|
|
1214
|
+
onSave: kn
|
|
1215
|
+
}, {
|
|
1216
|
+
"hill-edit": A(() => [D(e.$slots, "hill-edit", {}, void 0, !0)]),
|
|
1217
|
+
"hill-cancel": A(() => [D(e.$slots, "hill-cancel", {}, void 0, !0)]),
|
|
1218
|
+
"hill-save": A(() => [D(e.$slots, "hill-save", {}, void 0, !0)]),
|
|
1219
|
+
_: 3
|
|
1220
|
+
}, 8, [
|
|
1221
|
+
"is-editing",
|
|
1222
|
+
"is-editable",
|
|
1223
|
+
"is-fullscreen",
|
|
1224
|
+
"position",
|
|
1225
|
+
"color",
|
|
1226
|
+
"background-color",
|
|
1227
|
+
"translations",
|
|
1228
|
+
"is-cursor-pointer"
|
|
1229
|
+
])) : y("", !0),
|
|
1230
|
+
K.value.show ? (T(), b("div", Ce, [x("p", {
|
|
1231
|
+
class: "vue-ui-hill__status",
|
|
1232
|
+
style: w(Vn.value),
|
|
1233
|
+
"aria-live": "polite"
|
|
1234
|
+
}, O(I.value ? K.value.status.editInstruction : K.value.status.lastUpdated), 5)])) : y("", !0),
|
|
1235
|
+
F.value.userOptions.show && (k(Pt) || k(Mt)) ? (T(), se(k(ht), {
|
|
1236
|
+
ref_key: "userOptionsRef",
|
|
1237
|
+
ref: Tt,
|
|
1238
|
+
key: `uo_${Ht.value}`,
|
|
1239
|
+
backgroundColor: F.value.style.chart.backgroundColor,
|
|
1240
|
+
color: F.value.style.chart.color,
|
|
1241
|
+
isPrinting: k(Lt),
|
|
1242
|
+
isImaging: k(Rt),
|
|
1243
|
+
uid: Ct.value,
|
|
1244
|
+
hasTooltip: !1,
|
|
1245
|
+
hasPdf: F.value.userOptions.buttons.pdf,
|
|
1246
|
+
hasImg: F.value.userOptions.buttons.img,
|
|
1247
|
+
hasSvg: F.value.userOptions.buttons.svg,
|
|
1248
|
+
hasXls: F.value.userOptions.buttons.csv,
|
|
1249
|
+
hasTable: F.value.userOptions.buttons.table,
|
|
1250
|
+
hasLabel: F.value.userOptions.buttons.labels,
|
|
1251
|
+
hasFullscreen: F.value.userOptions.buttons.fullscreen,
|
|
1252
|
+
hasAltCopy: F.value.userOptions.buttons.altCopy,
|
|
1253
|
+
chartElement: N.value,
|
|
1254
|
+
position: F.value.userOptions.position,
|
|
1255
|
+
callbacks: F.value.userOptions.callbacks,
|
|
1256
|
+
titles: { ...F.value.userOptions.buttonTitles },
|
|
1257
|
+
hasAnnotator: F.value.userOptions.buttons.annotator,
|
|
1258
|
+
isAnnotation: Gt.value,
|
|
1259
|
+
printScale: F.value.userOptions.print.scale,
|
|
1260
|
+
isCursorPointer: Vt.value,
|
|
1261
|
+
onToggleFullscreen: Wt,
|
|
1262
|
+
onGeneratePdf: k(zt),
|
|
1263
|
+
onGenerateCsv: xr,
|
|
1264
|
+
onGenerateImage: hr,
|
|
1265
|
+
onGenerateSvg: br,
|
|
1266
|
+
onToggleAnnotator: Kt,
|
|
1267
|
+
onCopyAlt: Ar,
|
|
1268
|
+
style: w({ visibility: k(Pt) ? k(Mt) ? "visible" : "hidden" : "visible" })
|
|
1269
|
+
}, ce({ _: 2 }, [
|
|
1270
|
+
e.$slots.menuIcon ? {
|
|
1271
|
+
name: "menuIcon",
|
|
1272
|
+
fn: A(({ isOpen: t, color: n }) => [D(e.$slots, "menuIcon", C(S({
|
|
1273
|
+
isOpen: t,
|
|
1274
|
+
color: n
|
|
1275
|
+
})), void 0, !0)]),
|
|
1276
|
+
key: "0"
|
|
1277
|
+
} : void 0,
|
|
1278
|
+
e.$slots.optionPdf ? {
|
|
1279
|
+
name: "optionPdf",
|
|
1280
|
+
fn: A(() => [D(e.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1281
|
+
key: "1"
|
|
1282
|
+
} : void 0,
|
|
1283
|
+
e.$slots.optionCsv ? {
|
|
1284
|
+
name: "optionCsv",
|
|
1285
|
+
fn: A(() => [D(e.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1286
|
+
key: "2"
|
|
1287
|
+
} : void 0,
|
|
1288
|
+
e.$slots.optionImg ? {
|
|
1289
|
+
name: "optionImg",
|
|
1290
|
+
fn: A(() => [D(e.$slots, "optionImg", {}, void 0, !0)]),
|
|
1291
|
+
key: "3"
|
|
1292
|
+
} : void 0,
|
|
1293
|
+
e.$slots.optionSvg ? {
|
|
1294
|
+
name: "optionSvg",
|
|
1295
|
+
fn: A(() => [D(e.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1296
|
+
key: "4"
|
|
1297
|
+
} : void 0,
|
|
1298
|
+
e.$slots.optionFullscreen ? {
|
|
1299
|
+
name: "optionFullscreen",
|
|
1300
|
+
fn: A(({ toggleFullscreen: t, isFullscreen: n }) => [D(e.$slots, "optionFullscreen", C(S({
|
|
1301
|
+
toggleFullscreen: t,
|
|
1302
|
+
isFullscreen: n
|
|
1303
|
+
})), void 0, !0)]),
|
|
1304
|
+
key: "5"
|
|
1305
|
+
} : void 0,
|
|
1306
|
+
e.$slots.optionAnnotator ? {
|
|
1307
|
+
name: "optionAnnotator",
|
|
1308
|
+
fn: A(({ toggleAnnotator: t, isAnnotator: n }) => [D(e.$slots, "optionAnnotator", C(S({
|
|
1309
|
+
toggleAnnotator: t,
|
|
1310
|
+
isAnnotator: n
|
|
1311
|
+
})), void 0, !0)]),
|
|
1312
|
+
key: "6"
|
|
1313
|
+
} : void 0,
|
|
1314
|
+
e.$slots.optionAltCopy ? {
|
|
1315
|
+
name: "optionAltCopy",
|
|
1316
|
+
fn: A(({ altCopy: t }) => [D(e.$slots, "optionAltCopy", C(S({ altCopy: t })), void 0, !0)]),
|
|
1317
|
+
key: "7"
|
|
1318
|
+
} : void 0,
|
|
1319
|
+
e.$slots["custom-menu-before"] ? {
|
|
1320
|
+
name: "custom-menu-before",
|
|
1321
|
+
fn: A(() => [D(e.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
1322
|
+
key: "8"
|
|
1323
|
+
} : void 0,
|
|
1324
|
+
e.$slots["custom-menu-after"] ? {
|
|
1325
|
+
name: "custom-menu-after",
|
|
1326
|
+
fn: A(() => [D(e.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
1327
|
+
key: "9"
|
|
1328
|
+
} : void 0
|
|
1329
|
+
]), 1032, [
|
|
1330
|
+
"backgroundColor",
|
|
1331
|
+
"color",
|
|
1332
|
+
"isPrinting",
|
|
1333
|
+
"isImaging",
|
|
1334
|
+
"uid",
|
|
1335
|
+
"hasPdf",
|
|
1336
|
+
"hasImg",
|
|
1337
|
+
"hasSvg",
|
|
1338
|
+
"hasXls",
|
|
1339
|
+
"hasTable",
|
|
1340
|
+
"hasLabel",
|
|
1341
|
+
"hasFullscreen",
|
|
1342
|
+
"hasAltCopy",
|
|
1343
|
+
"chartElement",
|
|
1344
|
+
"position",
|
|
1345
|
+
"callbacks",
|
|
1346
|
+
"titles",
|
|
1347
|
+
"hasAnnotator",
|
|
1348
|
+
"isAnnotation",
|
|
1349
|
+
"printScale",
|
|
1350
|
+
"isCursorPointer",
|
|
1351
|
+
"onGeneratePdf",
|
|
1352
|
+
"style"
|
|
1353
|
+
])) : y("", !0),
|
|
1354
|
+
(T(), b("svg", {
|
|
1355
|
+
ref_key: "svgRef",
|
|
1356
|
+
ref: P,
|
|
1357
|
+
style: w({
|
|
1358
|
+
background: "transparent",
|
|
1359
|
+
color: F.value.style.chart.color,
|
|
1360
|
+
fontFamily: F.value.style.fontFamily
|
|
1361
|
+
}),
|
|
1362
|
+
class: fe({ "vue-data-ui-no-transition": !k(jt) }),
|
|
1363
|
+
viewBox: `0 0 ${V.value.width} ${V.value.height + (Sr.value ? 32 + q.value.paddingTop + q.value.paddingBottom + q.value.height : 0)}`,
|
|
1364
|
+
role: "group",
|
|
1365
|
+
"aria-live": "polite",
|
|
1366
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
1367
|
+
onPointermove: Mn,
|
|
1368
|
+
onPointerup: Nn,
|
|
1369
|
+
onPointercancel: Nn
|
|
1370
|
+
}, [
|
|
1371
|
+
le(k(gt)),
|
|
1372
|
+
e.$slots["chart-background"] ? (T(), b("foreignObject", {
|
|
1373
|
+
key: 0,
|
|
1374
|
+
x: 0,
|
|
1375
|
+
y: 0,
|
|
1376
|
+
width: Math.max(.1, V.value.width),
|
|
1377
|
+
height: Math.max(.1, V.value.height + (Sr.value ? 32 + q.value.paddingTop + q.value.paddingBottom + q.value.height : 0)),
|
|
1378
|
+
style: { pointerEvents: "none" }
|
|
1379
|
+
}, [D(e.$slots, "chart-background", {}, void 0, !0)], 8, Te)) : y("", !0),
|
|
1380
|
+
H.value.baseline.show ? (T(), b("line", {
|
|
1381
|
+
key: 1,
|
|
1382
|
+
x1: Y.value.startX,
|
|
1383
|
+
x2: Y.value.endX,
|
|
1384
|
+
y1: Y.value.baseY,
|
|
1385
|
+
y2: Y.value.baseY,
|
|
1386
|
+
stroke: H.value.baseline.stroke,
|
|
1387
|
+
"stroke-width": H.value.baseline.strokeWidth,
|
|
1388
|
+
"stroke-dasharray": H.value.baseline.strokeDasharray,
|
|
1389
|
+
"vector-effect": "non-scaling-stroke"
|
|
1390
|
+
}, null, 8, Ee)) : y("", !0),
|
|
1391
|
+
H.value.midline.show ? (T(), b("line", {
|
|
1392
|
+
key: 2,
|
|
1393
|
+
x1: Y.value.centerX,
|
|
1394
|
+
x2: Y.value.centerX,
|
|
1395
|
+
y1: Y.value.peakY,
|
|
1396
|
+
y2: Y.value.baseY,
|
|
1397
|
+
stroke: H.value.midline.stroke,
|
|
1398
|
+
"stroke-width": H.value.midline.strokeWidth,
|
|
1399
|
+
"stroke-dasharray": H.value.midline.strokeDasharray,
|
|
1400
|
+
"vector-effect": "non-scaling-stroke"
|
|
1401
|
+
}, null, 8, De)) : y("", !0),
|
|
1402
|
+
x("path", {
|
|
1403
|
+
d: an.value,
|
|
1404
|
+
fill: "none",
|
|
1405
|
+
stroke: H.value.curve.stroke,
|
|
1406
|
+
"stroke-width": H.value.curve.strokeWidth,
|
|
1407
|
+
"stroke-dasharray": H.value.curve.strokeDasharray,
|
|
1408
|
+
"stroke-linecap": "round",
|
|
1409
|
+
"stroke-linejoin": "round",
|
|
1410
|
+
"vector-effect": "non-scaling-stroke"
|
|
1411
|
+
}, null, 8, Oe),
|
|
1412
|
+
F.value.style.chart.layout.plots.dragMarker.positionIndicator.show ? (T(!0), b(_, { key: 3 }, he(Xn.value, (e) => (T(), b("g", { key: `position-indicator-${e.id}` }, [pr(e) && U.value.dragMarker.show ? (T(), b("g", ke, [
|
|
1413
|
+
x("path", {
|
|
1414
|
+
d: `M${e.x},${e.y} ${e.x},${Y.value.baseY}`,
|
|
1415
|
+
stroke: F.value.style.chart.layout.plots.dragMarker.positionIndicator.useSerieColor ? e.color : F.value.style.chart.layout.plots.dragMarker.positionIndicator.color,
|
|
1416
|
+
"stroke-width": F.value.style.chart.layout.plots.dragMarker.positionIndicator.strokeWidth,
|
|
1417
|
+
"stroke-dasharray": F.value.style.chart.layout.plots.dragMarker.positionIndicator.strokeDasharray,
|
|
1418
|
+
"stroke-linecap": "round",
|
|
1419
|
+
"vector-effect": "non-scaling-stroke",
|
|
1420
|
+
class: fe({ "vue-data-ui-transition": k(jt) && R.value?.id !== e.id })
|
|
1421
|
+
}, null, 10, Ae),
|
|
1422
|
+
F.value.style.chart.layout.plots.dragMarker.positionIndicator.circle.show ? (T(), b("circle", {
|
|
1423
|
+
key: 0,
|
|
1424
|
+
cx: e.x,
|
|
1425
|
+
cy: Y.value.baseY,
|
|
1426
|
+
r: F.value.style.chart.layout.plots.dragMarker.positionIndicator.circle.radius,
|
|
1427
|
+
fill: F.value.style.chart.layout.plots.dragMarker.positionIndicator.useSerieColor ? e.color : F.value.style.chart.layout.plots.dragMarker.positionIndicator.color,
|
|
1428
|
+
stroke: F.value.style.chart.layout.plots.dragMarker.positionIndicator.circle.stroke,
|
|
1429
|
+
"stroke-width": F.value.style.chart.layout.plots.dragMarker.positionIndicator.circle.strokeWidth,
|
|
1430
|
+
"vector-effect": "non-scaling-stroke",
|
|
1431
|
+
"paint-order": "stroke fill",
|
|
1432
|
+
class: fe({ "vue-data-ui-transition": k(jt) && R.value?.id !== e.id })
|
|
1433
|
+
}, null, 10, je)) : y("", !0),
|
|
1434
|
+
F.value.style.chart.layout.plots.dragMarker.positionIndicator.value.show ? (T(), b("text", {
|
|
1435
|
+
key: 1,
|
|
1436
|
+
"paint-order": "stroke fill",
|
|
1437
|
+
"vector-effect": "non-scaling-stroke",
|
|
1438
|
+
"text-anchor": "middle",
|
|
1439
|
+
transform: `translate(${e.x}, ${Y.value.baseY + F.value.style.chart.layout.plots.radius + F.value.style.chart.layout.plots.dragMarker.positionIndicator.value.offsetY + F.value.style.chart.layout.plots.dragMarker.positionIndicator.value.fontSize})`,
|
|
1440
|
+
"font-size": F.value.style.chart.layout.plots.dragMarker.positionIndicator.value.fontSize,
|
|
1441
|
+
fill: F.value.style.chart.layout.plots.dragMarker.positionIndicator.value.useSerieColor ? e.color : F.value.style.chart.layout.plots.dragMarker.positionIndicator.value.color,
|
|
1442
|
+
stroke: F.value.style.chart.backgroundColor,
|
|
1443
|
+
"stroke-width": "1",
|
|
1444
|
+
class: fe({ "vue-data-ui-transition": k(jt) && R.value?.id !== e.id })
|
|
1445
|
+
}, O(mr(e)), 11, Me)) : y("", !0)
|
|
1446
|
+
])) : y("", !0)]))), 128)) : y("", !0),
|
|
1447
|
+
(T(!0), b(_, null, he(Xn.value, (e) => (T(), b("g", {
|
|
1448
|
+
key: e.id,
|
|
1449
|
+
"data-cy-datapoint": "",
|
|
1450
|
+
class: fe({
|
|
1451
|
+
"vue-ui-hill__datapoint": !0,
|
|
1452
|
+
"vue-data-ui-transition": k(jt) && R.value?.id !== e.id,
|
|
1453
|
+
"vue-ui-hill__datapoint--promoted": k(jt) && e.isPromotedFromStackOverflow
|
|
1454
|
+
}),
|
|
1455
|
+
style: w({ opacity: [0, 1].includes(e.position) || e?.muted ? U.value.mutedOpacity : e?.disabled ? U.value.disabledOpacity : 1 }),
|
|
1456
|
+
transform: `translate(${e.x} ${e.y})`,
|
|
1457
|
+
"data-datapoint-index": e.__index,
|
|
1458
|
+
"data-datapoint-id": e.id,
|
|
1459
|
+
role: "slider",
|
|
1460
|
+
tabindex: I.value && z.value && !e.disabled ? 0 : -1,
|
|
1461
|
+
"aria-orientation": "horizontal",
|
|
1462
|
+
"aria-valuemin": "0",
|
|
1463
|
+
"aria-valuemax": "100",
|
|
1464
|
+
"aria-valuenow": mr(e),
|
|
1465
|
+
"aria-valuetext": `${e.label}: ${Fn(e.position)}, ${mr(e)}`,
|
|
1466
|
+
"aria-label": e.label,
|
|
1467
|
+
onFocus: (t) => qn(e),
|
|
1468
|
+
onBlur: (t) => Jn(e),
|
|
1469
|
+
onKeydown: (t) => Pn(t, e),
|
|
1470
|
+
onPointerenter: (t) => Ln(e),
|
|
1471
|
+
onPointerleave: (t) => Rn(e),
|
|
1472
|
+
onClick: (t) => zn(e)
|
|
1473
|
+
}, [
|
|
1474
|
+
x("circle", {
|
|
1475
|
+
r: U.value.hitRadius,
|
|
1476
|
+
fill: "transparent",
|
|
1477
|
+
class: fe({
|
|
1478
|
+
"vue-ui-hill__hit-area--active": I.value && z.value && !e.disabled,
|
|
1479
|
+
"vue-ui-hill__hit-area--dragging": R.value?.id === e.id
|
|
1480
|
+
}),
|
|
1481
|
+
onPointerdown: (t) => jn(t, e)
|
|
1482
|
+
}, null, 42, Pe),
|
|
1483
|
+
x("circle", {
|
|
1484
|
+
class: "vue-ui-hill-circle",
|
|
1485
|
+
r: U.value.radius,
|
|
1486
|
+
fill: e.color,
|
|
1487
|
+
stroke: U.value.stroke,
|
|
1488
|
+
"stroke-width": U.value.strokeWidth,
|
|
1489
|
+
style: w({ filter: U.value.shadow.show ? `drop-shadow(${U.value.shadow.offsetX}px ${U.value.shadow.offsetY}px ${U.value.shadow.blur}px ${U.value.shadow.color})` : "none" }),
|
|
1490
|
+
"vector-effect": "non-scaling-stroke",
|
|
1491
|
+
"pointer-events": "none"
|
|
1492
|
+
}, null, 12, Fe),
|
|
1493
|
+
I.value && (R.value?.id === e.id && U.value.dragMarker.show || pr(e)) && !e?.disabled ? (T(), b("g", {
|
|
1494
|
+
key: 0,
|
|
1495
|
+
fill: "none",
|
|
1496
|
+
stroke: k(l)(e.color),
|
|
1497
|
+
"stroke-width": U.value.dragMarker.strokeWidth,
|
|
1498
|
+
"stroke-linecap": "round",
|
|
1499
|
+
"stroke-linejoin": "round",
|
|
1500
|
+
"pointer-events": "none",
|
|
1501
|
+
"vector-effect": "non-scaling-stroke",
|
|
1502
|
+
"aria-hidden": "true"
|
|
1503
|
+
}, [x("path", { d: U.value.dragMarker.crossPath }, null, 8, Le)], 8, Ie)) : y("", !0),
|
|
1504
|
+
W.value.show ? (T(), b("text", {
|
|
1505
|
+
key: 1,
|
|
1506
|
+
x: e.labelX,
|
|
1507
|
+
y: W.value.offsetY,
|
|
1508
|
+
"text-anchor": e.textAnchor,
|
|
1509
|
+
fill: W.value.useSerieColor ? e.color : W.value.color,
|
|
1510
|
+
"font-size": W.value.fontSize,
|
|
1511
|
+
"font-weight": W.value.bold ? "bold" : "normal",
|
|
1512
|
+
"paint-order": "stroke fill",
|
|
1513
|
+
stroke: W.value.stroke,
|
|
1514
|
+
"stroke-width": W.value.strokeWidth,
|
|
1515
|
+
"stroke-linejoin": "round",
|
|
1516
|
+
"stroke-linecap": "round",
|
|
1517
|
+
"pointer-events": "none",
|
|
1518
|
+
style: { "user-select": "none" },
|
|
1519
|
+
"dominant-baseline": "central"
|
|
1520
|
+
}, O(k(o)(e.label, W.value.ellipsisThresholdChars)), 9, Re)) : y("", !0)
|
|
1521
|
+
], 46, Ne))), 128)),
|
|
1522
|
+
(T(!0), b(_, null, he(Zn.value, (e) => (T(), b("g", {
|
|
1523
|
+
key: `stack-overflow-${e.stackId}`,
|
|
1524
|
+
class: fe(["vue-ui-hill__stack-overflow-marker", {
|
|
1525
|
+
"vue-ui-hill__stack-overflow-marker--animated": k(jt),
|
|
1526
|
+
"vue-ui-hill__stack-overflow-marker--restored": mn.value === e.stackId
|
|
1527
|
+
}]),
|
|
1528
|
+
style: w({
|
|
1529
|
+
"--vue-ui-hill-overflow-marker-duration": `${J.value.transitionDuration * .7}ms`,
|
|
1530
|
+
"--vue-ui-hill-overflow-marker-delay": `${J.value.transitionDuration * .3}ms`,
|
|
1531
|
+
"--vue-ui-hill-overflow-label-duration": `${J.value.transitionDuration * .55}ms`,
|
|
1532
|
+
"--vue-ui-hill-overflow-label-delay": `${J.value.transitionDuration * .45}ms`,
|
|
1533
|
+
cursor: Vt.value && !F.value.readonly ? "pointer" : "default"
|
|
1534
|
+
}),
|
|
1535
|
+
transform: `translate(${e.x} ${e.y})`,
|
|
1536
|
+
"data-stack-overflow-marker": "",
|
|
1537
|
+
role: "button",
|
|
1538
|
+
tabindex: I.value && z.value ? 0 : -1,
|
|
1539
|
+
"aria-label": `${e.hiddenCount} stacked datapoints. Activate to choose one.`,
|
|
1540
|
+
"aria-expanded": Z.value === e.stackId,
|
|
1541
|
+
onPointerdown: t[0] ||= j(() => {}, ["stop"]),
|
|
1542
|
+
onClick: j((t) => rr(e), ["stop"]),
|
|
1543
|
+
onFocus: (t) => rr(e),
|
|
1544
|
+
onKeydown: [
|
|
1545
|
+
ye(j((t) => rr(e), ["prevent", "stop"]), ["enter"]),
|
|
1546
|
+
ye(j((t) => rr(e), ["prevent", "stop"]), ["space"]),
|
|
1547
|
+
ye(j(ir, ["prevent", "stop"]), ["esc"])
|
|
1548
|
+
]
|
|
1549
|
+
}, [
|
|
1550
|
+
k(jt) && mn.value !== e.stackId ? (T(), b("g", Be, [(T(!0), b(_, null, he(e.collapseDatapoints, (t) => (T(), b("circle", {
|
|
1551
|
+
key: `overflow-ghost-${e.stackId}-${t.id}`,
|
|
1552
|
+
cx: t.relativeX,
|
|
1553
|
+
cy: t.relativeY,
|
|
1554
|
+
r: U.value.radius,
|
|
1555
|
+
fill: t.color,
|
|
1556
|
+
stroke: U.value.stroke,
|
|
1557
|
+
"stroke-width": U.value.strokeWidth,
|
|
1558
|
+
opacity: "0.8",
|
|
1559
|
+
"vector-effect": "non-scaling-stroke"
|
|
1560
|
+
}, [
|
|
1561
|
+
x("animate", {
|
|
1562
|
+
attributeName: "cx",
|
|
1563
|
+
from: t.relativeX,
|
|
1564
|
+
to: "0",
|
|
1565
|
+
dur: `${J.value.transitionDuration}ms`,
|
|
1566
|
+
fill: "freeze",
|
|
1567
|
+
calcMode: "spline",
|
|
1568
|
+
keyTimes: "0;1",
|
|
1569
|
+
keySplines: "0.22 1 0.36 1"
|
|
1570
|
+
}, null, 8, He),
|
|
1571
|
+
x("animate", {
|
|
1572
|
+
attributeName: "cy",
|
|
1573
|
+
from: t.relativeY,
|
|
1574
|
+
to: "0",
|
|
1575
|
+
dur: `${J.value.transitionDuration}ms`,
|
|
1576
|
+
fill: "freeze",
|
|
1577
|
+
calcMode: "spline",
|
|
1578
|
+
keyTimes: "0;1",
|
|
1579
|
+
keySplines: "0.22 1 0.36 1"
|
|
1580
|
+
}, null, 8, Ue),
|
|
1581
|
+
x("animate", {
|
|
1582
|
+
attributeName: "r",
|
|
1583
|
+
from: U.value.radius,
|
|
1584
|
+
to: J.value.marker.radius * .7,
|
|
1585
|
+
dur: `${J.value.transitionDuration}ms`,
|
|
1586
|
+
fill: "freeze"
|
|
1587
|
+
}, null, 8, We),
|
|
1588
|
+
x("animate", {
|
|
1589
|
+
attributeName: "opacity",
|
|
1590
|
+
from: "0.8",
|
|
1591
|
+
to: "0",
|
|
1592
|
+
dur: `${J.value.transitionDuration * .85}ms`,
|
|
1593
|
+
fill: "freeze"
|
|
1594
|
+
}, null, 8, Ge)
|
|
1595
|
+
], 8, Ve))), 128))])) : y("", !0),
|
|
1596
|
+
x("circle", {
|
|
1597
|
+
r: Math.max(U.value.hitRadius, J.value.marker.radius),
|
|
1598
|
+
fill: "transparent",
|
|
1599
|
+
"pointer-events": "all"
|
|
1600
|
+
}, null, 8, Ke),
|
|
1601
|
+
x("rect", {
|
|
1602
|
+
class: "vue-ui-hill__stack-overflow-marker-rect",
|
|
1603
|
+
x: -J.value.marker.radius,
|
|
1604
|
+
y: -J.value.marker.radius,
|
|
1605
|
+
width: J.value.marker.radius * 2,
|
|
1606
|
+
height: J.value.marker.radius * 2,
|
|
1607
|
+
fill: J.value.marker.fill,
|
|
1608
|
+
stroke: J.value.marker.stroke,
|
|
1609
|
+
"stroke-width": J.value.marker.strokeWidth,
|
|
1610
|
+
"vector-effect": "non-scaling-stroke",
|
|
1611
|
+
"pointer-events": "none"
|
|
1612
|
+
}, null, 8, qe),
|
|
1613
|
+
x("g", {
|
|
1614
|
+
class: "vue-ui-hill__stack-overflow-focus-cross",
|
|
1615
|
+
fill: "none",
|
|
1616
|
+
stroke: k(l)(H.value.curve.stroke),
|
|
1617
|
+
"stroke-width": U.value.dragMarker.strokeWidth,
|
|
1618
|
+
"stroke-linecap": "round",
|
|
1619
|
+
"stroke-linejoin": "round",
|
|
1620
|
+
"pointer-events": "none",
|
|
1621
|
+
"vector-effect": "non-scaling-stroke",
|
|
1622
|
+
"aria-hidden": "true"
|
|
1623
|
+
}, [x("path", { d: U.value.dragMarker.crossPath }, null, 8, Ye)], 8, Je),
|
|
1624
|
+
Qn.value ? y("", !0) : (T(), b("text", {
|
|
1625
|
+
key: 1,
|
|
1626
|
+
class: "vue-ui-hill__stack-overflow-marker-label",
|
|
1627
|
+
"text-anchor": "middle",
|
|
1628
|
+
y: J.value.marker.radius + J.value.marker.offsetY + J.value.marker.fontSize,
|
|
1629
|
+
fill: J.value.marker.color,
|
|
1630
|
+
"font-size": J.value.marker.fontSize,
|
|
1631
|
+
"font-weight": J.value.marker.bold ? "bold" : "normal",
|
|
1632
|
+
"pointer-events": "none",
|
|
1633
|
+
style: { "user-select": "none" },
|
|
1634
|
+
"paint-order": "stroke fill",
|
|
1635
|
+
"vector-effect": "non-scaling-stroke",
|
|
1636
|
+
stroke: F.value.style.chart.backgroundColor,
|
|
1637
|
+
"stroke-width": "3"
|
|
1638
|
+
}, " +" + O(e.hiddenCount), 9, Xe))
|
|
1639
|
+
], 46, ze))), 128)),
|
|
1640
|
+
G.value.show ? (T(), b(_, { key: 4 }, [x("text", {
|
|
1641
|
+
x: (Y.value.startX + Y.value.centerX) / 2,
|
|
1642
|
+
y: Hn.value,
|
|
1643
|
+
"text-anchor": "middle",
|
|
1644
|
+
fill: G.value.color,
|
|
1645
|
+
"font-size": G.value.fontSize,
|
|
1646
|
+
"font-weight": G.value.bold ? "bold" : "normal",
|
|
1647
|
+
"letter-spacing": G.value.letterSpacing
|
|
1648
|
+
}, O(Un("left")), 9, Ze), x("text", {
|
|
1649
|
+
x: (Y.value.centerX + Y.value.endX) / 2,
|
|
1650
|
+
y: Hn.value,
|
|
1651
|
+
"text-anchor": "middle",
|
|
1652
|
+
fill: G.value.color,
|
|
1653
|
+
"font-size": G.value.fontSize,
|
|
1654
|
+
"font-weight": G.value.bold ? "bold" : "normal",
|
|
1655
|
+
"letter-spacing": G.value.letterSpacing
|
|
1656
|
+
}, O(Un("right")), 9, Qe)], 64)) : y("", !0),
|
|
1657
|
+
Sr.value ? (T(), b(_, { key: 5 }, [
|
|
1658
|
+
x("rect", {
|
|
1659
|
+
x: Y.value.left[0].x,
|
|
1660
|
+
y: Dr.value,
|
|
1661
|
+
rx: q.value.height / 2,
|
|
1662
|
+
width: Y.value.width,
|
|
1663
|
+
height: q.value.height,
|
|
1664
|
+
fill: q.value.gutterColor
|
|
1665
|
+
}, null, 8, $e),
|
|
1666
|
+
x("defs", null, [x("clipPath", { id: kr.value }, [x("rect", {
|
|
1667
|
+
x: Y.value.left[0].x,
|
|
1668
|
+
y: Dr.value,
|
|
1669
|
+
width: Y.value.width * wr.value,
|
|
1670
|
+
height: q.value.height,
|
|
1671
|
+
rx: Math.min(q.value.height / 2, Y.value.width * wr.value / 2),
|
|
1672
|
+
ry: Math.min(q.value.height / 2, Y.value.width * wr.value / 2)
|
|
1673
|
+
}, null, 8, tt)], 8, et)]),
|
|
1674
|
+
x("g", { "clip-path": `url(#${kr.value})` }, [(T(!0), b(_, null, he(Cr.value, (e) => (T(), b("rect", {
|
|
1675
|
+
key: `bar_fill_${e.id}`,
|
|
1676
|
+
width: Y.value.width * e.proportion,
|
|
1677
|
+
x: Y.value.left[0].x + Y.value.width * e.proportionStart,
|
|
1678
|
+
y: V.value.height + 32 + q.value.paddingTop,
|
|
1679
|
+
fill: e.color,
|
|
1680
|
+
height: q.value.height,
|
|
1681
|
+
onPointerenter: (t) => Ln(e),
|
|
1682
|
+
onPointerleave: (t) => Rn(e)
|
|
1683
|
+
}, null, 40, rt))), 128))], 8, nt),
|
|
1684
|
+
(T(!0), b(_, null, he(Cr.value.slice(1), (e) => (T(), b("line", {
|
|
1685
|
+
key: `bar_separator_${e.id}`,
|
|
1686
|
+
x1: Y.value.left[0].x + Y.value.width * e.proportionStart,
|
|
1687
|
+
x2: Y.value.left[0].x + Y.value.width * e.proportionStart,
|
|
1688
|
+
y1: V.value.height + 32 + q.value.paddingTop,
|
|
1689
|
+
y2: V.value.height + 32 + q.value.paddingTop + q.value.height,
|
|
1690
|
+
stroke: q.value.stroke,
|
|
1691
|
+
"stroke-width": q.value.strokeWidth,
|
|
1692
|
+
"vector-effect": "non-scaling-stroke"
|
|
1693
|
+
}, null, 8, it))), 128)),
|
|
1694
|
+
x("rect", {
|
|
1695
|
+
x: Y.value.left[0].x,
|
|
1696
|
+
y: V.value.height + 32 + q.value.paddingTop,
|
|
1697
|
+
width: Y.value.width * wr.value,
|
|
1698
|
+
height: q.value.height,
|
|
1699
|
+
rx: Math.min(q.value.height / 2, Y.value.width * wr.value / 2),
|
|
1700
|
+
ry: Math.min(q.value.height / 2, Y.value.width * wr.value / 2),
|
|
1701
|
+
fill: "none",
|
|
1702
|
+
stroke: q.value.stroke,
|
|
1703
|
+
"stroke-width": q.value.strokeWidth,
|
|
1704
|
+
"vector-effect": "non-scaling-stroke"
|
|
1705
|
+
}, null, 8, at),
|
|
1706
|
+
q.value.label.show && wr.value > 0 ? (T(), b("text", {
|
|
1707
|
+
key: 0,
|
|
1708
|
+
x: Er.value,
|
|
1709
|
+
y: Dr.value - 6,
|
|
1710
|
+
fill: q.value.label.color,
|
|
1711
|
+
"font-size": q.value.label.fontSize,
|
|
1712
|
+
"text-anchor": "end",
|
|
1713
|
+
"dominant-baseline": "auto",
|
|
1714
|
+
"pointer-events": "none",
|
|
1715
|
+
style: { "user-select": "none" }
|
|
1716
|
+
}, O(Or()), 9, ot)) : y("", !0)
|
|
1717
|
+
], 64)) : y("", !0),
|
|
1718
|
+
D(e.$slots, "svg", { svg: {
|
|
1719
|
+
drawingArea: Y.value,
|
|
1720
|
+
isEditing: I.value,
|
|
1721
|
+
datapoints: Xn.value,
|
|
1722
|
+
isPrintingImg: k(Lt) || k(Rt) || Dt.value,
|
|
1723
|
+
isPrintingSvg: Et.value
|
|
1724
|
+
} }, void 0, !0)
|
|
1725
|
+
], 46, we)),
|
|
1726
|
+
Qn.value ? (T(), b("div", {
|
|
1727
|
+
ref_key: "overflowMenuRef",
|
|
1728
|
+
ref: wt,
|
|
1729
|
+
key: `stack-overflow-menu-${Qn.value.stackId}`,
|
|
1730
|
+
class: "vue-ui-hill__stack-overflow-menu",
|
|
1731
|
+
"data-stack-overflow-menu": "",
|
|
1732
|
+
"data-dom-to-png-ignore": "",
|
|
1733
|
+
style: w([$n.value, pn.value]),
|
|
1734
|
+
role: "listbox",
|
|
1735
|
+
"aria-label": `Choose one of ${Qn.value.hiddenCount} stacked datapoints`,
|
|
1736
|
+
onPointerdown: t[1] ||= j(() => {}, ["stop"]),
|
|
1737
|
+
onClick: t[2] ||= j(() => {}, ["stop"]),
|
|
1738
|
+
onKeydown: ye(j(ir, ["prevent", "stop"]), ["esc"])
|
|
1739
|
+
}, [F.value.style.chart.layout.plots.stacking.overflow.menu.title ? (T(), b("div", ct, O(F.value.style.chart.layout.plots.stacking.overflow.menu.title), 1)) : y("", !0), (T(!0), b(_, null, he(Qn.value.hiddenDatapoints, (e) => (T(), b("button", {
|
|
1740
|
+
key: `hidden-${e.id}`,
|
|
1741
|
+
type: "button",
|
|
1742
|
+
class: fe(["vue-ui-hill__stack-overflow-menu-item", { readonly: F.value.readonly }]),
|
|
1743
|
+
role: "option",
|
|
1744
|
+
disabled: e.disabled,
|
|
1745
|
+
"aria-label": `${e.label}, ${mr(e)}`,
|
|
1746
|
+
onClick: j((t) => ur(e), ["stop"]),
|
|
1747
|
+
style: w({ cursor: Vt.value && !F.value.readonly ? "pointer" : "default" })
|
|
1748
|
+
}, [
|
|
1749
|
+
x("span", {
|
|
1750
|
+
class: "vue-ui-hill__stack-overflow-menu-swatch",
|
|
1751
|
+
style: w({ backgroundColor: e.color }),
|
|
1752
|
+
"aria-hidden": "true"
|
|
1753
|
+
}, null, 4),
|
|
1754
|
+
x("span", ut, O(k(o)(e.label, W.value.ellipsisThresholdChars)), 1),
|
|
1755
|
+
x("span", dt, O(mr(e)), 1)
|
|
1756
|
+
], 14, lt))), 128))], 44, st)) : y("", !0),
|
|
1757
|
+
D(e.$slots, "analysis", { data: { ...Cr.value } }, void 0, !0),
|
|
1758
|
+
e.$slots.watermark ? (T(), b("div", ft, [D(e.$slots, "watermark", C(S({ isPrinting: k(Lt) || k(Rt) || Dt.value || Et.value })), void 0, !0)])) : y("", !0),
|
|
1759
|
+
F.value.loading ? (T(), b("div", pt, [F.value.loading ? D(e.$slots, "loading", {}, () => [le(k(vt), {
|
|
1760
|
+
name: "spinner2",
|
|
1761
|
+
stroke: F.value.style.chart.color,
|
|
1762
|
+
"is-spin": !0
|
|
1763
|
+
}, null, 8, ["stroke"])], !0, 0) : y("", !0)])) : y("", !0)
|
|
1764
|
+
], 44, xe));
|
|
1765
|
+
}
|
|
1766
|
+
}, [["__scopeId", "data-v-93662db0"]]);
|
|
1767
|
+
//#endregion
|
|
1768
|
+
export { be as n, mt as t };
|