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