vue-data-ui 2.3.54 → 2.3.56
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/dist/{Arrow-BNeFJoOm.js → Arrow-BsFu2TQv.js} +1 -1
- package/dist/{Arrow-3S1qlMQW.cjs → Arrow-DmbnhAr9.cjs} +1 -1
- package/dist/{BaseIcon-CEHzrof6.js → BaseIcon-BBkGiBfe.js} +1 -1
- package/dist/{BaseIcon-J5SlQHk1.cjs → BaseIcon-PVWrOd6r.cjs} +1 -1
- package/dist/{DataTable-DzaIzqSM.cjs → DataTable-CJiw9Oeg.cjs} +1 -1
- package/dist/{DataTable--OZ3_Ruy.js → DataTable-W1gJ4gSD.js} +2 -2
- package/dist/{Legend-CZr69olR.js → Legend-CQIo_WbD.js} +1 -1
- package/dist/{Legend-BIRsFvWS.cjs → Legend-Cc-aaZxh.cjs} +1 -1
- package/dist/{Shape-DKnxQrjp.cjs → Shape-DzqSEyhX.cjs} +1 -1
- package/dist/{Shape-R5Lw9MlI.js → Shape-Y6qCeNbi.js} +1 -1
- package/dist/{Slicer-Cmw4MO7V.js → Slicer-BMs12nY1.js} +31 -29
- package/dist/Slicer-QCrdQngK.cjs +1 -0
- package/dist/{Title-Dq1rRDew.js → Title-BuPNfgaD.js} +1 -1
- package/dist/{Title-BDIxGcvA.cjs → Title-CmKmZeBx.cjs} +1 -1
- package/dist/{Tooltip-Cn-GmZ8i.cjs → Tooltip-6Fl_Hm1X.cjs} +1 -1
- package/dist/{Tooltip-D-u8OLa8.js → Tooltip-DMhG5ns_.js} +1 -1
- package/dist/index-BrTW1d55.cjs +4 -0
- package/dist/{index-DevyUpIh.js → index-CheT0Wx_.js} +308 -307
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +1 -0
- package/dist/types/vue-data-ui.d.ts +1 -0
- package/dist/{useNestedProp-CIfE6p46.cjs → useNestedProp-BnuqAeNh.cjs} +1 -1
- package/dist/{useNestedProp-CN2WRozq.js → useNestedProp-BtrNNAOl.js} +1 -1
- package/dist/{usePrinter-CWDOHapP.cjs → usePrinter-CBPDDz8k.cjs} +1 -1
- package/dist/{usePrinter-BBCKkrZI.js → usePrinter-DuLkeo52.js} +1 -1
- package/dist/{vue-data-ui-BBUSVrja.cjs → vue-data-ui-4juY_ptg.cjs} +1 -1
- package/dist/{vue-data-ui-CRh1Q4AH.js → vue-data-ui-jFylH5cj.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-DYGtdQj-.cjs → vue-ui-3d-bar-CPKXmaEX.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-nBVBFj2T.js → vue-ui-3d-bar-jqnud76a.js} +7 -7
- package/dist/{vue-ui-accordion-B2VGVjY5.js → vue-ui-accordion-CP3eE3ra.js} +3 -3
- package/dist/{vue-ui-accordion-D5RKa_N6.cjs → vue-ui-accordion-CRXILPuZ.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-ZPJC9qhH.cjs → vue-ui-age-pyramid-C6lbaF5t.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-CceVyhIj.js → vue-ui-age-pyramid-CNHqO7eI.js} +8 -8
- package/dist/{vue-ui-annotator-BbFOadWn.cjs → vue-ui-annotator-DpuDzFHD.cjs} +1 -1
- package/dist/{vue-ui-annotator-6nVI372g.js → vue-ui-annotator-RSAxc5Py.js} +1 -1
- package/dist/{vue-ui-candlestick-q1qNGzBh.cjs → vue-ui-candlestick-BLy6KJLB.cjs} +1 -1
- package/dist/{vue-ui-candlestick-BIm7nJY_.js → vue-ui-candlestick-wBmbvoru.js} +9 -9
- package/dist/{vue-ui-carousel-table-qEKWl1r5.js → vue-ui-carousel-table-74JfF1CF.js} +4 -4
- package/dist/{vue-ui-carousel-table-By3srIQl.cjs → vue-ui-carousel-table-DmXDmH_I.cjs} +1 -1
- package/dist/{vue-ui-chestnut-7hwegVVU.cjs → vue-ui-chestnut-3U5Rzexa.cjs} +1 -1
- package/dist/{vue-ui-chestnut-B7Bay2su.js → vue-ui-chestnut-DC9KUP9E.js} +6 -6
- package/dist/{vue-ui-cursor-CExnG-Y7.cjs → vue-ui-cursor-BBOad4Oz.cjs} +1 -1
- package/dist/{vue-ui-cursor-DN9emWkP.js → vue-ui-cursor-DvHSca1e.js} +2 -2
- package/dist/{vue-ui-dashboard-Bow27OSd.js → vue-ui-dashboard-B97wcEhA.js} +2 -2
- package/dist/{vue-ui-dashboard-Bf-n20XG.cjs → vue-ui-dashboard-CErkNKT5.cjs} +1 -1
- package/dist/{vue-ui-digits-DMTlH2Us.js → vue-ui-digits-D1EfYy-P.js} +2 -2
- package/dist/{vue-ui-digits-CvopLePj.cjs → vue-ui-digits-DfCFX2Qt.cjs} +1 -1
- package/dist/{vue-ui-donut-DMBH-hOO.js → vue-ui-donut-CU2WSbx_.js} +9 -9
- package/dist/{vue-ui-donut-Bf_rmMVa.cjs → vue-ui-donut-CXZBrDav.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-CzbfVl7P.cjs → vue-ui-donut-evolution-BCboadVu.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DmRreAQd.js → vue-ui-donut-evolution-Cy2LvVXl.js} +9 -9
- package/dist/{vue-ui-dumbbell-Bs9hrq3Z.cjs → vue-ui-dumbbell-BHn-nF5o.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-CphyQeij.js → vue-ui-dumbbell-C3-cUpEJ.js} +8 -8
- package/dist/{vue-ui-flow-Dgif5HsV.cjs → vue-ui-flow-BoYvyc72.cjs} +1 -1
- package/dist/{vue-ui-flow-CnIbYGBh.js → vue-ui-flow-E6in3VUZ.js} +7 -7
- package/dist/{vue-ui-galaxy-DorPoG9k.cjs → vue-ui-galaxy-BMXRhIPx.cjs} +1 -1
- package/dist/{vue-ui-galaxy-wYuxc6Ke.js → vue-ui-galaxy-Bmw1sasL.js} +9 -9
- package/dist/{vue-ui-gauge-B0JQ7hp9.js → vue-ui-gauge-CsXLY_kK.js} +5 -5
- package/dist/{vue-ui-gauge-jCisBb4i.cjs → vue-ui-gauge-Hco2qIrF.cjs} +1 -1
- package/dist/{vue-ui-gizmo-D10Pe-IN.cjs → vue-ui-gizmo-DMhJyo57.cjs} +1 -1
- package/dist/{vue-ui-gizmo-B5qikP8U.js → vue-ui-gizmo-Y4q19AJI.js} +2 -2
- package/dist/{vue-ui-heatmap-C1pb1lDy.js → vue-ui-heatmap-BlA1MCRH.js} +8 -8
- package/dist/{vue-ui-heatmap-DDDDxby6.cjs → vue-ui-heatmap-DdaNiod-.cjs} +1 -1
- package/dist/{vue-ui-kpi-d5VzP_W3.js → vue-ui-kpi-Bklm7sI3.js} +3 -3
- package/dist/{vue-ui-kpi-juX0ee1l.cjs → vue-ui-kpi-yiWoG8Jg.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-B6dDbRPl.cjs → vue-ui-mini-loader-CFHuzD8z.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-8mREA7LJ.js → vue-ui-mini-loader-rIlEJt4J.js} +2 -2
- package/dist/{vue-ui-molecule-cvTBMgrf.cjs → vue-ui-molecule-IT3c4oT6.cjs} +1 -1
- package/dist/{vue-ui-molecule-B1UJ2TUx.js → vue-ui-molecule-_ux8PBWz.js} +9 -9
- package/dist/{vue-ui-mood-radar-B5-_3KQR.js → vue-ui-mood-radar-BXP_gJLi.js} +9 -9
- package/dist/{vue-ui-mood-radar-Dj5ls85r.cjs → vue-ui-mood-radar-DN_-xVon.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-Blr0T7fh.cjs → vue-ui-nested-donuts-B1Fp99F3.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-mrtvxcFJ.js → vue-ui-nested-donuts-Cjgz6nRo.js} +9 -9
- package/dist/{vue-ui-onion-CqKraAJF.cjs → vue-ui-onion-BPf7VCJa.cjs} +1 -1
- package/dist/{vue-ui-onion-CTYSXRUg.js → vue-ui-onion-CLV7WICr.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-DHpwivzP.cjs → vue-ui-parallel-coordinate-plot-BAQc5SWh.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-BrUw8QXk.js → vue-ui-parallel-coordinate-plot-Io-m4z6C.js} +10 -10
- package/dist/{vue-ui-quadrant-D34j7Vd4.js → vue-ui-quadrant-BSfdu8iN.js} +10 -10
- package/dist/{vue-ui-quadrant-DyOsHsVZ.cjs → vue-ui-quadrant-BfqpKrGV.cjs} +1 -1
- package/dist/vue-ui-quick-chart-BdGaCOrt.js +1396 -0
- package/dist/vue-ui-quick-chart-DI__EnvH.cjs +15 -0
- package/dist/{vue-ui-radar-CguQQiC_.cjs → vue-ui-radar-CLNEQi3b.cjs} +1 -1
- package/dist/{vue-ui-radar-0I56BEZQ.js → vue-ui-radar-uvDULkG8.js} +10 -10
- package/dist/{vue-ui-rating-lGh--4AL.js → vue-ui-rating-DPhYGjCa.js} +2 -2
- package/dist/{vue-ui-rating-DIW6y4Wf.cjs → vue-ui-rating-GIvcfzRr.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BoRTJSZT.js → vue-ui-relation-circle-BargpoTh.js} +5 -5
- package/dist/{vue-ui-relation-circle-3YP66N0J.cjs → vue-ui-relation-circle-CwuE4eca.cjs} +1 -1
- package/dist/{vue-ui-rings-PpedNhPE.js → vue-ui-rings-CXrRMCZW.js} +9 -9
- package/dist/{vue-ui-rings-fgs4wxyE.cjs → vue-ui-rings-jF8ux3Dp.cjs} +1 -1
- package/dist/{vue-ui-scatter-Zvn6VgRn.js → vue-ui-scatter-CcbhZV9z.js} +10 -10
- package/dist/{vue-ui-scatter-MMSaaXse.cjs → vue-ui-scatter-wLsb-fZC.cjs} +1 -1
- package/dist/{vue-ui-screenshot-CLVe5d9Q.cjs → vue-ui-screenshot-BqCGhVN1.cjs} +1 -1
- package/dist/{vue-ui-screenshot-C-3ljTqJ.js → vue-ui-screenshot-kGqAEHjy.js} +1 -1
- package/dist/{vue-ui-skeleton-Ddhg5AMg.cjs → vue-ui-skeleton-_10dnvdH.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BcivVyJG.js → vue-ui-skeleton-aQqDPgNZ.js} +2 -2
- package/dist/{vue-ui-smiley-VW5dunED.cjs → vue-ui-smiley-Bg4Snrze.cjs} +1 -1
- package/dist/{vue-ui-smiley-DUkj7O__.js → vue-ui-smiley-BwK68PuU.js} +2 -2
- package/dist/{vue-ui-spark-trend-CMB69d5A.cjs → vue-ui-spark-trend-DYxxnfQW.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-PjLNBvRH.js → vue-ui-spark-trend-DoqkKOlk.js} +4 -4
- package/dist/{vue-ui-sparkbar-CiX1Y13M.cjs → vue-ui-sparkbar-BTQmwesw.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-BoL6nd_k.js → vue-ui-sparkbar-WnaAUbae.js} +3 -3
- package/dist/{vue-ui-sparkgauge-C0bxUFcN.js → vue-ui-sparkgauge-BKRRGs7B.js} +3 -3
- package/dist/{vue-ui-sparkgauge-Cp-tgWbF.cjs → vue-ui-sparkgauge-FXAlpXuQ.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-OWOeD3D3.js → vue-ui-sparkhistogram-C1zV2eop.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-Aay7CFvu.cjs → vue-ui-sparkhistogram-tTBz6NIG.cjs} +1 -1
- package/dist/{vue-ui-sparkline-56S87tCO.js → vue-ui-sparkline-B8jRRWaL.js} +3 -3
- package/dist/{vue-ui-sparkline-FMaIGzoV.cjs → vue-ui-sparkline-C9u8IXFi.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-B-j-5WH5.cjs → vue-ui-sparkstackbar-DxJv0K0j.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-Ndbfp20y.js → vue-ui-sparkstackbar-GFQOWlud.js} +3 -3
- package/dist/{vue-ui-stackbar-BmO4sIu1.cjs → vue-ui-stackbar-CB5aHagD.cjs} +1 -1
- package/dist/{vue-ui-stackbar-CgdFtUIm.js → vue-ui-stackbar-CKH9nkXT.js} +10 -10
- package/dist/{vue-ui-strip-plot-cidczT8j.cjs → vue-ui-strip-plot-3sfiftZ9.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-CSWF7HKL.js → vue-ui-strip-plot-DieTMdDF.js} +9 -9
- package/dist/{vue-ui-table-COAvH7xj.js → vue-ui-table-BGdHb7N7.js} +1 -1
- package/dist/{vue-ui-table-ev6oTl6Q.cjs → vue-ui-table-cgc5JWpi.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-uUPvupup.cjs → vue-ui-table-heatmap-C044igg5.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-9fwwKeff.js → vue-ui-table-heatmap-DEV-t7Jo.js} +4 -4
- package/dist/{vue-ui-table-sparkline-BS_0LsPP.cjs → vue-ui-table-sparkline-BrWT1d3d.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BrSfjZ5d.js → vue-ui-table-sparkline-Uq7w4wDX.js} +5 -5
- package/dist/{vue-ui-thermometer-EUeVrgeU.js → vue-ui-thermometer-CTWxK5mL.js} +5 -5
- package/dist/{vue-ui-thermometer-9_vRVMak.cjs → vue-ui-thermometer-Dk6C8A-d.cjs} +1 -1
- package/dist/{vue-ui-timer-B8sVOruI.cjs → vue-ui-timer-BoyYkbBT.cjs} +1 -1
- package/dist/{vue-ui-timer-CrjRdcIn.js → vue-ui-timer-D_Tt_SFq.js} +4 -4
- package/dist/{vue-ui-tiremarks-DhovisSr.js → vue-ui-tiremarks-BMCx6T02.js} +5 -5
- package/dist/{vue-ui-tiremarks-BuAfxx74.cjs → vue-ui-tiremarks-PP0ZKmzU.cjs} +1 -1
- package/dist/{vue-ui-treemap-Bm_N9EGV.cjs → vue-ui-treemap-BpQvyTD-.cjs} +1 -1
- package/dist/{vue-ui-treemap-CZ4thLuN.js → vue-ui-treemap-CPNFNuvx.js} +9 -9
- package/dist/{vue-ui-vertical-bar-wfVcXDiE.js → vue-ui-vertical-bar-BxopNTze.js} +9 -9
- package/dist/{vue-ui-vertical-bar-BfQoWvUj.cjs → vue-ui-vertical-bar-C95PuahY.cjs} +1 -1
- package/dist/{vue-ui-waffle-C_arwqLA.js → vue-ui-waffle-BxKVHnSt.js} +9 -9
- package/dist/{vue-ui-waffle-TxNXFd54.cjs → vue-ui-waffle-DPD6Tq15.cjs} +1 -1
- package/dist/{vue-ui-wheel-mflI6qSu.cjs → vue-ui-wheel-CWZXVIE_.cjs} +1 -1
- package/dist/{vue-ui-wheel-DjOy9BIg.js → vue-ui-wheel-hqaO-KLH.js} +5 -5
- package/dist/{vue-ui-word-cloud-Bp2d9sHO.js → vue-ui-word-cloud-CR5QakNJ.js} +7 -7
- package/dist/{vue-ui-word-cloud-DkUPKVYY.cjs → vue-ui-word-cloud-CZ11iXV3.cjs} +1 -1
- package/dist/{vue-ui-xy-Cx3-qnR1.cjs → vue-ui-xy-C4ga2Mx1.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-BpwkJeoE.js → vue-ui-xy-canvas-B-5qwsGJ.js} +10 -10
- package/dist/{vue-ui-xy-canvas-CYaawjiI.cjs → vue-ui-xy-canvas-DyYwcAlu.cjs} +1 -1
- package/dist/{vue-ui-xy-CPsygLLJ.js → vue-ui-xy-hnDHwwdO.js} +12 -12
- package/package.json +1 -1
- package/dist/Slicer-CiTyvM8_.cjs +0 -1
- package/dist/index-DSMfrkOO.cjs +0 -4
- package/dist/vue-ui-quick-chart-B2-sDg6U.cjs +0 -15
- package/dist/vue-ui-quick-chart-BkUlh5Rg.js +0 -1374
|
@@ -0,0 +1,1396 @@
|
|
|
1
|
+
import { ref as E, computed as W, onMounted as tt, onBeforeUnmount as at, openBlock as a, createElementBlock as l, normalizeClass as ie, normalizeStyle as F, createBlock as Ue, unref as y, createSlots as lt, withCtx as ee, renderSlot as D, normalizeProps as Y, guardReactiveProps as ce, createCommentVNode as m, toDisplayString as I, createElementVNode as _, Fragment as g, renderList as L, mergeProps as $e, createVNode as he, pushScopeId as ot, popScopeId as it } from "vue";
|
|
2
|
+
import { u as ut, c as nt, t as rt, a as st, p as U, b as vt, d as Ce, m as dt, A as De, X as ct, j as ht, k as fe, n as Pe, i as H, f as N, M as Ve, w as Se, x as Te } from "./index-CheT0Wx_.js";
|
|
3
|
+
import { t as ft, u as gt } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
+
import we from "./BaseIcon-BBkGiBfe.js";
|
|
5
|
+
import { _ as mt } from "./Tooltip-DMhG5ns_.js";
|
|
6
|
+
import { u as pt, U as xt } from "./usePrinter-DuLkeo52.js";
|
|
7
|
+
import { S as yt } from "./Slicer-BMs12nY1.js";
|
|
8
|
+
import { u as qe } from "./useNestedProp-BtrNNAOl.js";
|
|
9
|
+
import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
+
const A = {
|
|
11
|
+
LINE: "LINE",
|
|
12
|
+
BAR: "BAR",
|
|
13
|
+
DONUT: "DONUT"
|
|
14
|
+
}, bt = ["SERIE", "SERIES", "DATA", "VALUE", "VALUES", "NUM"];
|
|
15
|
+
function St({ dataset: s, barLineSwitch: z = 6 }) {
|
|
16
|
+
let f = null, R = null, V = 0;
|
|
17
|
+
if ((typeof s == "number" || typeof s == "string") && console.warn(`The provided dataset (${s}) is not sufficient to build a chart`), ge(s) && (X(s) && (s.length < z ? f = A.BAR : f = A.LINE, R = s, V = s.length), _e(s))) {
|
|
18
|
+
if (!_t(s))
|
|
19
|
+
return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."), !1;
|
|
20
|
+
const ae = Object.keys(s[0]), ue = Object.values(s[0]);
|
|
21
|
+
if (!ae.some((C) => At(C)))
|
|
22
|
+
return 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;
|
|
23
|
+
We(ue, (C) => typeof C == "number") && (f = A.DONUT, R = s), We(ue, (C) => Array.isArray(C) && X(C)) && (je(s) > z ? f = A.LINE : f = A.BAR, V = je(s), R = s.map((C) => ({
|
|
24
|
+
...C,
|
|
25
|
+
data: Lt(C, (G) => X(G))
|
|
26
|
+
}))), s = s.map((C) => Ge(C)), R = R.map((C) => Ge(C));
|
|
27
|
+
}
|
|
28
|
+
return ge(s) && [...new Set(s.flatMap((ae) => Array.isArray(ae)))][0], {
|
|
29
|
+
dataset: s,
|
|
30
|
+
type: f,
|
|
31
|
+
usableDataset: R,
|
|
32
|
+
maxSeriesLength: V
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function He(s) {
|
|
36
|
+
return !s || ge(s) && !s.length;
|
|
37
|
+
}
|
|
38
|
+
function ge(s) {
|
|
39
|
+
return Array.isArray(s);
|
|
40
|
+
}
|
|
41
|
+
function X(s) {
|
|
42
|
+
if (!ge(s) || He(s)) return !1;
|
|
43
|
+
const z = s.map((f) => Number(f));
|
|
44
|
+
return ![...new Set(z.flatMap((f) => typeof f == "number" && !isNaN(f)))].includes(!1);
|
|
45
|
+
}
|
|
46
|
+
function _e(s) {
|
|
47
|
+
return !ge(s) || He(s) || !![...new Set(s.flatMap((f) => typeof f == "object" && !Array.isArray(f)))].includes(!1) ? !1 : !s.map((f) => Object.keys(f).length > 0).includes(!1);
|
|
48
|
+
}
|
|
49
|
+
function wt(s, z) {
|
|
50
|
+
const f = Object.keys(s).sort(), R = Object.keys(z).sort();
|
|
51
|
+
if (f.length !== R.length)
|
|
52
|
+
return !1;
|
|
53
|
+
for (let V = 0; V < f.length; V += 1) {
|
|
54
|
+
const j = f[V], te = R[V];
|
|
55
|
+
if (j !== te || typeof s[j] != typeof z[te])
|
|
56
|
+
return !1;
|
|
57
|
+
}
|
|
58
|
+
return !0;
|
|
59
|
+
}
|
|
60
|
+
function _t(s) {
|
|
61
|
+
if (s.length <= 1) return !0;
|
|
62
|
+
for (let z = 0; z < s.length; z += 1)
|
|
63
|
+
for (let f = z + 1; f < s.length; f += 1)
|
|
64
|
+
if (!wt(s[z], s[f]))
|
|
65
|
+
return !1;
|
|
66
|
+
return !0;
|
|
67
|
+
}
|
|
68
|
+
function At(s) {
|
|
69
|
+
return bt.includes(s.toUpperCase());
|
|
70
|
+
}
|
|
71
|
+
function We(s, z) {
|
|
72
|
+
let f = [];
|
|
73
|
+
for (let R = 0; R < s.length; R += 1)
|
|
74
|
+
f.push(z(s[R]));
|
|
75
|
+
return f.includes(!0);
|
|
76
|
+
}
|
|
77
|
+
function je(s) {
|
|
78
|
+
return Math.max(...[...s].flatMap((z) => Object.values(z).filter((f) => X(f)).map((f) => f.length)));
|
|
79
|
+
}
|
|
80
|
+
function Lt(s, z) {
|
|
81
|
+
return Object.values(s).filter((f) => z(f))[0];
|
|
82
|
+
}
|
|
83
|
+
function Ge(s) {
|
|
84
|
+
const z = {};
|
|
85
|
+
for (let f in s)
|
|
86
|
+
s.hasOwnProperty(f) && (z[f.toUpperCase()] = s[f]);
|
|
87
|
+
return z;
|
|
88
|
+
}
|
|
89
|
+
const Xe = (s) => (ot("data-v-522703e1"), s = s(), it(), s), zt = ["id"], $t = ["xmlns", "viewBox"], Ct = ["id"], Pt = ["id"], Tt = /* @__PURE__ */ Xe(() => /* @__PURE__ */ _("feColorMatrix", {
|
|
90
|
+
type: "saturate",
|
|
91
|
+
values: "0"
|
|
92
|
+
}, null, -1)), Et = ["id"], It = ["flood-color"], Rt = {
|
|
93
|
+
key: 0,
|
|
94
|
+
class: "donut-label-connectors"
|
|
95
|
+
}, Ot = ["d", "stroke", "stroke-width", "filter"], Ft = ["cx", "cy", "r", "fill"], Mt = ["cx", "cy", "r", "fill", "filter"], Nt = { class: "donut" }, Bt = ["d", "fill", "stroke", "stroke-width", "filter"], Ut = ["d", "onMouseenter", "onClick"], Dt = {
|
|
96
|
+
key: 1,
|
|
97
|
+
class: "donut-labels quick-animation"
|
|
98
|
+
}, Vt = ["cx", "cy", "fill", "filter"], qt = ["text-anchor", "x", "y", "fill", "font-size", "filter"], Wt = ["text-anchor", "x", "y", "fill", "font-size", "filter"], jt = {
|
|
99
|
+
key: 2,
|
|
100
|
+
class: "donut-hollow quick-animation"
|
|
101
|
+
}, Gt = ["x", "y", "font-size", "fill"], Ht = ["x", "y", "font-size", "fill"], Xt = {
|
|
102
|
+
key: 0,
|
|
103
|
+
class: "line-grid"
|
|
104
|
+
}, Yt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Zt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Jt = {
|
|
105
|
+
key: 1,
|
|
106
|
+
class: "line-axis"
|
|
107
|
+
}, Kt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Qt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ea = {
|
|
108
|
+
key: 2,
|
|
109
|
+
class: "yLabels"
|
|
110
|
+
}, ta = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], aa = ["x", "y", "font-size", "fill"], la = {
|
|
111
|
+
key: 3,
|
|
112
|
+
class: "periodLabels"
|
|
113
|
+
}, oa = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ia = ["font-size", "text-anchor", "fill", "transform"], ua = { class: "plots" }, na = { class: "line-plot-series" }, ra = ["d", "stroke", "stroke-width"], sa = ["d", "stroke", "stroke-width"], va = ["d", "stroke", "stroke-width"], da = ["d", "stroke", "stroke-width"], ca = ["cx", "cy", "fill", "stroke"], ha = {
|
|
114
|
+
key: 4,
|
|
115
|
+
class: "dataLabels"
|
|
116
|
+
}, fa = ["font-size", "fill", "x", "y"], ga = { class: "tooltip-traps" }, ma = ["x", "y", "height", "width", "fill", "onMouseenter", "onClick"], pa = {
|
|
117
|
+
key: 0,
|
|
118
|
+
class: "line-grid"
|
|
119
|
+
}, xa = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ya = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ka = {
|
|
120
|
+
key: 1,
|
|
121
|
+
class: "line-axis"
|
|
122
|
+
}, ba = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Sa = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], wa = {
|
|
123
|
+
key: 2,
|
|
124
|
+
class: "yLabels"
|
|
125
|
+
}, _a = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Aa = ["x", "y", "font-size", "fill"], La = {
|
|
126
|
+
key: 3,
|
|
127
|
+
class: "periodLabels"
|
|
128
|
+
}, za = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], $a = ["font-size", "text-anchor", "transform", "fill"], Ca = { class: "plots" }, Pa = ["x", "width", "height", "y", "fill", "stroke", "stroke-width"], Ta = ["to"], Ea = ["from", "to"], Ia = {
|
|
129
|
+
key: 4,
|
|
130
|
+
class: "dataLabels"
|
|
131
|
+
}, Ra = ["x", "y", "font-size", "fill"], Oa = { class: "tooltip-traps" }, Fa = ["x", "y", "height", "width", "fill", "onMouseenter", "onClick"], Ma = {
|
|
132
|
+
key: 3,
|
|
133
|
+
class: "axis-labels"
|
|
134
|
+
}, Na = { key: 0 }, Ba = ["font-size", "fill", "x", "y"], Ua = { key: 1 }, Da = ["font-size", "fill", "x", "y"], Va = { key: 2 }, qa = ["font-size", "fill", "transform"], Wa = { key: 3 }, ja = ["font-size", "fill", "transform"], Ga = {
|
|
135
|
+
key: 2,
|
|
136
|
+
class: "vue-data-ui-watermark"
|
|
137
|
+
}, Ha = ["onClick"], Xa = ["onClick"], Ya = ["onClick"], Za = {
|
|
138
|
+
key: 1,
|
|
139
|
+
class: "vue-ui-quick-chart-not-processable"
|
|
140
|
+
}, Ja = /* @__PURE__ */ Xe(() => /* @__PURE__ */ _("span", null, "Dataset is not processable", -1)), Ka = {
|
|
141
|
+
__name: "vue-ui-quick-chart",
|
|
142
|
+
props: {
|
|
143
|
+
config: {
|
|
144
|
+
type: Object,
|
|
145
|
+
default() {
|
|
146
|
+
return {};
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
dataset: {
|
|
150
|
+
type: [Array, Object, String, Number],
|
|
151
|
+
default() {
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
emits: ["selectDatapoint", "selectLegend"],
|
|
157
|
+
setup(s, { expose: z, emit: f }) {
|
|
158
|
+
const R = s, { vue_ui_quick_chart: V } = ut(), j = E(null), te = E(null), ae = E(null), ue = E(null), C = E(nt()), G = E(!1), ne = E(null), Z = E(""), q = E(null), w = E([]), Ee = E(0), Ae = E(0), e = W(() => {
|
|
159
|
+
const r = qe({
|
|
160
|
+
userConfig: R.config,
|
|
161
|
+
defaultConfig: V
|
|
162
|
+
});
|
|
163
|
+
return r.theme ? {
|
|
164
|
+
...qe({
|
|
165
|
+
userConfig: rt.vue_ui_quick_chart[r.theme] || R.config,
|
|
166
|
+
defaultConfig: r
|
|
167
|
+
}),
|
|
168
|
+
customPalette: st[r.theme] || U
|
|
169
|
+
} : r;
|
|
170
|
+
}), re = W(() => vt(e.value.customPalette)), me = W(() => {
|
|
171
|
+
const r = St({ dataset: R.dataset, barLineSwitch: e.value.chartIsBarUnderDatasetLength });
|
|
172
|
+
return r || console.error("VueUiQuickChart : Dataset is not processable"), r;
|
|
173
|
+
}), k = E(me.value), Ye = W(() => !!k.value), P = W(() => k.value ? k.value.type : null), { isPrinting: pe, isImaging: xe, generatePdf: Ie, generateImage: Re } = pt({
|
|
174
|
+
elementId: `${P.value}_${C.value}`,
|
|
175
|
+
fileName: e.value.title || P.value
|
|
176
|
+
}), b = E({
|
|
177
|
+
width: e.value.width,
|
|
178
|
+
height: e.value.height
|
|
179
|
+
}), ye = E({
|
|
180
|
+
showTooltip: e.value.showTooltip
|
|
181
|
+
}), ke = E(null);
|
|
182
|
+
tt(() => {
|
|
183
|
+
if (e.value.responsive) {
|
|
184
|
+
const r = ft(() => {
|
|
185
|
+
const { width: c, height: t } = gt({
|
|
186
|
+
chart: j.value,
|
|
187
|
+
title: e.value.title ? te.value : null,
|
|
188
|
+
legend: e.value.showLegend ? ae.value : null,
|
|
189
|
+
slicer: [A.BAR, A.LINE].includes(P.value) && e.value.zoomXy && k.value.maxSeriesLength > 1 ? ue.value : null
|
|
190
|
+
});
|
|
191
|
+
b.value.width = c, b.value.height = t;
|
|
192
|
+
});
|
|
193
|
+
ke.value = new ResizeObserver(r), ke.value.observe(j.value.parentNode);
|
|
194
|
+
}
|
|
195
|
+
}), at(() => {
|
|
196
|
+
ke.value && ke.value.disconnect();
|
|
197
|
+
});
|
|
198
|
+
const Ze = W(() => {
|
|
199
|
+
switch (P.value) {
|
|
200
|
+
case A.LINE:
|
|
201
|
+
return `0 0 ${b.value.width <= 0 ? 10 : b.value.width} ${b.value.height <= 0 ? 10 : b.value.height}`;
|
|
202
|
+
case A.BAR:
|
|
203
|
+
return `0 0 ${b.value.width <= 0 ? 10 : b.value.width} ${b.value.height <= 0 ? 10 : b.value.height}`;
|
|
204
|
+
case A.DONUT:
|
|
205
|
+
return `0 0 ${b.value.width <= 0 ? 10 : b.value.width} ${b.value.height <= 0 ? 10 : b.value.height}`;
|
|
206
|
+
default:
|
|
207
|
+
return `0 0 ${b.value.width <= 0 ? 10 : b.value.width} ${b.value.height <= 0 ? 10 : b.value.height}`;
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
function Oe(r) {
|
|
211
|
+
return [...r].map((c) => c.value).reduce((c, t) => c + t, 0);
|
|
212
|
+
}
|
|
213
|
+
function se(r) {
|
|
214
|
+
return e.value.blurOnHover && ![null, void 0].includes(q.value) && q.value !== r ? `url(#blur_${C.value})` : "";
|
|
215
|
+
}
|
|
216
|
+
function Fe(r, c) {
|
|
217
|
+
w.value.includes(r) ? w.value = w.value.filter((t) => t !== r) : w.value.length < c && w.value.push(r);
|
|
218
|
+
}
|
|
219
|
+
const Me = E(null), Ne = E(null), be = E(!1);
|
|
220
|
+
function Je(r, c) {
|
|
221
|
+
be.value = !0;
|
|
222
|
+
let t = r.value;
|
|
223
|
+
if (w.value.includes(r.id)) {
|
|
224
|
+
let n = function() {
|
|
225
|
+
t > u ? (be.value = !1, cancelAnimationFrame(Ne.value), k.value = {
|
|
226
|
+
...k.value,
|
|
227
|
+
dataset: k.value.dataset.map((h, O) => r.id === `donut_${O}` ? {
|
|
228
|
+
...h,
|
|
229
|
+
value: u,
|
|
230
|
+
VALUE: u
|
|
231
|
+
} : h)
|
|
232
|
+
}) : (t += u * 0.025, k.value = {
|
|
233
|
+
...k.value,
|
|
234
|
+
dataset: k.value.dataset.map((h, O) => r.id === `donut_${O}` ? {
|
|
235
|
+
...h,
|
|
236
|
+
value: t,
|
|
237
|
+
VALUE: t
|
|
238
|
+
} : h)
|
|
239
|
+
}, Ne.value = requestAnimationFrame(n));
|
|
240
|
+
};
|
|
241
|
+
w.value = w.value.filter((h) => h !== r.id);
|
|
242
|
+
const u = me.value.dataset.find((h, O) => r.id === `donut_${O}`).VALUE;
|
|
243
|
+
n();
|
|
244
|
+
} else if (c.length > 1) {
|
|
245
|
+
let u = function() {
|
|
246
|
+
t < 0.1 ? (be.value = !1, cancelAnimationFrame(Me.value), w.value.push(r.id), k.value = {
|
|
247
|
+
...k.value,
|
|
248
|
+
dataset: k.value.dataset.map((n, h) => r.id === `donut_${h}` ? {
|
|
249
|
+
...n,
|
|
250
|
+
value: 0,
|
|
251
|
+
VALUE: 0
|
|
252
|
+
} : n)
|
|
253
|
+
}) : (t /= 1.1, k.value = {
|
|
254
|
+
...k.value,
|
|
255
|
+
dataset: k.value.dataset.map((n, h) => r.id === `donut_${h}` ? {
|
|
256
|
+
...n,
|
|
257
|
+
value: t,
|
|
258
|
+
VALUE: t
|
|
259
|
+
} : n)
|
|
260
|
+
}, Me.value = requestAnimationFrame(u));
|
|
261
|
+
};
|
|
262
|
+
u();
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
const $ = W(() => {
|
|
266
|
+
if (P.value !== A.DONUT) return null;
|
|
267
|
+
const r = k.value.dataset.map((o, i) => ({
|
|
268
|
+
...o,
|
|
269
|
+
value: o.VALUE || o.DATA || o.SERIE || o.VALUES || o.NUM || 0,
|
|
270
|
+
name: o.NAME || o.DESCRIPTION || o.TITLE || o.LABEL || `Serie ${i}`,
|
|
271
|
+
id: `donut_${i}`
|
|
272
|
+
})).map((o, i) => ({
|
|
273
|
+
...o,
|
|
274
|
+
color: o.COLOR ? Ce(o.COLOR) : re.value[i + e.value.paletteStartIndex] || U[i + e.value.paletteStartIndex] || U[(i + e.value.paletteStartIndex) % U.length],
|
|
275
|
+
immutableValue: o.value
|
|
276
|
+
}));
|
|
277
|
+
function c(o, i) {
|
|
278
|
+
return N({
|
|
279
|
+
v: isNaN(o.value / Oe(i)) ? 0 : o.value / Oe(i) * 100,
|
|
280
|
+
s: "%",
|
|
281
|
+
r: e.value.dataLabelRoundingPercentage
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
function t(o) {
|
|
285
|
+
return o.proportion * 100 > e.value.donutHideLabelUnderPercentage;
|
|
286
|
+
}
|
|
287
|
+
function u(o, i) {
|
|
288
|
+
const x = me.value.dataset.find((T, M) => `donut_${M}` === o).VALUE;
|
|
289
|
+
return Math.abs(String(Number(x.toFixed(0))).length - String(Number(i.toFixed(0))).length);
|
|
290
|
+
}
|
|
291
|
+
function n({ datapoint: o, seriesIndex: i }) {
|
|
292
|
+
ne.value = { datapoint: o, seriesIndex: i, config: e.value, dataset: r }, q.value = o.id;
|
|
293
|
+
const x = e.value.tooltipCustomFormat;
|
|
294
|
+
if (Se(x) && Te(() => x({
|
|
295
|
+
datapoint: o,
|
|
296
|
+
seriesIndex: i,
|
|
297
|
+
series: r,
|
|
298
|
+
config: e.value
|
|
299
|
+
})))
|
|
300
|
+
Z.value = x({
|
|
301
|
+
datapoint: o,
|
|
302
|
+
seriesIndex: i,
|
|
303
|
+
series: r,
|
|
304
|
+
config: e.value
|
|
305
|
+
});
|
|
306
|
+
else {
|
|
307
|
+
let p = "";
|
|
308
|
+
p += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${o.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="${o.color}"/></svg>`, p += `<b>${H(
|
|
309
|
+
e.value.formatter,
|
|
310
|
+
o.value,
|
|
311
|
+
N({
|
|
312
|
+
p: e.value.valuePrefix,
|
|
313
|
+
v: o.value,
|
|
314
|
+
s: e.value.valueSuffix,
|
|
315
|
+
r: e.value.dataLabelRoundingValue
|
|
316
|
+
}),
|
|
317
|
+
{ datapoint: o, seriesIndex: i }
|
|
318
|
+
)}</b>`, p += `<span>(${N({ v: o.proportion * 100, s: "%", r: e.value.dataLabelRoundingPercentage })})</span></div>`, Z.value = `<div>${p}</div>`;
|
|
319
|
+
}
|
|
320
|
+
G.value = !0;
|
|
321
|
+
}
|
|
322
|
+
function h() {
|
|
323
|
+
G.value = !1, q.value = null;
|
|
324
|
+
}
|
|
325
|
+
const O = {
|
|
326
|
+
centerX: b.value.width / 2,
|
|
327
|
+
centerY: b.value.height / 2
|
|
328
|
+
}, B = r.filter((o) => !w.value.includes(o.id)).map((o) => o.value || 0).reduce((o, i) => o + i, 0), le = r.map((o, i) => ({
|
|
329
|
+
...o,
|
|
330
|
+
proportion: (o.value || 0) / B,
|
|
331
|
+
value: o.value || 0,
|
|
332
|
+
absoluteValue: me.value.dataset.find((x, p) => `donut_${p}` === o.id).VALUE
|
|
333
|
+
})), J = b.value.width / 2, oe = b.value.height / 2, K = b.value.height * e.value.donutRadiusRatio;
|
|
334
|
+
return {
|
|
335
|
+
dataset: le.filter((o) => !w.value.includes(o.id)),
|
|
336
|
+
legend: le,
|
|
337
|
+
drawingArea: O,
|
|
338
|
+
displayArcPercentage: c,
|
|
339
|
+
isArcBigEnough: t,
|
|
340
|
+
useTooltip: n,
|
|
341
|
+
killTooltip: h,
|
|
342
|
+
getSpaces: u,
|
|
343
|
+
total: B,
|
|
344
|
+
cx: J,
|
|
345
|
+
cy: oe,
|
|
346
|
+
radius: K,
|
|
347
|
+
chart: dt(
|
|
348
|
+
{ series: r.filter((o) => !w.value.includes(o.id)) },
|
|
349
|
+
J,
|
|
350
|
+
oe,
|
|
351
|
+
K,
|
|
352
|
+
K,
|
|
353
|
+
1.99999,
|
|
354
|
+
2,
|
|
355
|
+
1,
|
|
356
|
+
360,
|
|
357
|
+
105.25,
|
|
358
|
+
b.value.height * e.value.donutThicknessRatio
|
|
359
|
+
)
|
|
360
|
+
};
|
|
361
|
+
}), S = E({
|
|
362
|
+
start: 0,
|
|
363
|
+
end: k.value.maxSeriesLength
|
|
364
|
+
});
|
|
365
|
+
function Ke() {
|
|
366
|
+
S.value = {
|
|
367
|
+
start: 0,
|
|
368
|
+
end: k.value.maxSeriesLength
|
|
369
|
+
}, Ae.value += 1;
|
|
370
|
+
}
|
|
371
|
+
const Qe = W(() => {
|
|
372
|
+
if (!e.value.zoomMinimap.show || P.value === A.DONUT) return [];
|
|
373
|
+
let r = [];
|
|
374
|
+
X(k.value.dataset) && (r = k.value.dataset), _e(k.value.dataset) && (r = k.value.dataset.map((n, h) => ({
|
|
375
|
+
values: n.VALUE || n.DATA || n.SERIE || n.VALUES || n.NUM || 0,
|
|
376
|
+
id: P.value === A.LINE ? `line_${h}` : `bar_${h}`
|
|
377
|
+
})).filter((n) => !w.value.includes(n.id)));
|
|
378
|
+
const c = X(r) ? r.length : Math.max(...r.map((n) => n.values.length));
|
|
379
|
+
let t = [];
|
|
380
|
+
if (X(r))
|
|
381
|
+
t = r;
|
|
382
|
+
else
|
|
383
|
+
for (let n = 0; n < c; n += 1)
|
|
384
|
+
t.push(r.map((h) => h.values[n] || 0).reduce((h, O) => (h || 0) + (O || 0), 0));
|
|
385
|
+
const u = Math.min(...t);
|
|
386
|
+
return t.map((n) => n + (u < 0 ? Math.abs(u) : 0));
|
|
387
|
+
}), d = W(() => {
|
|
388
|
+
if (P.value !== A.LINE) return null;
|
|
389
|
+
const r = {
|
|
390
|
+
height: b.value.height,
|
|
391
|
+
width: b.value.width
|
|
392
|
+
}, c = {
|
|
393
|
+
left: e.value.xyPaddingLeft,
|
|
394
|
+
top: e.value.xyPaddingTop,
|
|
395
|
+
right: r.width - e.value.xyPaddingRight,
|
|
396
|
+
bottom: r.height - e.value.xyPaddingBottom,
|
|
397
|
+
width: r.width - e.value.xyPaddingLeft - e.value.xyPaddingRight,
|
|
398
|
+
height: r.height - e.value.xyPaddingTop - e.value.xyPaddingBottom
|
|
399
|
+
};
|
|
400
|
+
let t = [];
|
|
401
|
+
X(k.value.dataset) && (t = [
|
|
402
|
+
{
|
|
403
|
+
values: k.value.dataset.slice(S.value.start, S.value.end),
|
|
404
|
+
absoluteIndices: k.value.dataset.map((o, i) => i).slice(S.value.start, S.value.end),
|
|
405
|
+
name: e.value.title,
|
|
406
|
+
color: re.value[e.value.paletteStartIndex] || U[e.value.paletteStartIndex],
|
|
407
|
+
id: "line_0"
|
|
408
|
+
}
|
|
409
|
+
]), _e(k.value.dataset) && (t = k.value.dataset.map((o, i) => ({
|
|
410
|
+
...o,
|
|
411
|
+
values: o.VALUE || o.DATA || o.SERIE || o.VALUES || o.NUM || 0,
|
|
412
|
+
name: o.NAME || o.DESCRIPTION || o.TITLE || o.LABEL || `Serie ${i}`,
|
|
413
|
+
id: `line_${i}`
|
|
414
|
+
})).map((o, i) => ({
|
|
415
|
+
...o,
|
|
416
|
+
color: o.COLOR ? Ce(o.COLOR) : re.value[i + e.value.paletteStartIndex] || U[i + e.value.paletteStartIndex] || U[(i + e.value.paletteStartIndex) % U.length],
|
|
417
|
+
values: o.values.slice(S.value.start, S.value.end),
|
|
418
|
+
absoluteIndices: o.values.map((x, p) => p).slice(S.value.start, S.value.end)
|
|
419
|
+
})));
|
|
420
|
+
const u = {
|
|
421
|
+
max: Math.max(...t.filter((o) => !w.value.includes(o.id)).flatMap((o) => o.values)),
|
|
422
|
+
min: Math.min(...t.filter((o) => !w.value.includes(o.id)).flatMap((o) => o.values)),
|
|
423
|
+
maxSeries: Math.max(...t.map((o) => o.values.length))
|
|
424
|
+
}, n = De(u.min < 0 ? u.min : 0, u.max < 0 ? 0 : u.max, e.value.xyScaleSegments), h = u.min < 0 ? Math.abs(u.min) : 0, O = u.max < 0 ? c.top : c.bottom - h / (n.max + h) * c.height, B = c.width / u.maxSeries, le = n.ticks.map((o) => ({
|
|
425
|
+
y: c.bottom - c.height * ((o + h) / (n.max + h)),
|
|
426
|
+
x: c.left - 8,
|
|
427
|
+
value: o
|
|
428
|
+
})), J = t.map((o, i) => ({
|
|
429
|
+
...o,
|
|
430
|
+
coordinates: o.values.map((x, p) => ({
|
|
431
|
+
x: c.left + B * (p + 1) - B / 2,
|
|
432
|
+
y: c.bottom - (x + h) / (n.max + h) * c.height,
|
|
433
|
+
value: x
|
|
434
|
+
}))
|
|
435
|
+
})).map((o) => {
|
|
436
|
+
let i = [];
|
|
437
|
+
return o.coordinates.forEach((x) => {
|
|
438
|
+
i.push(`${x.x},${x.y} `);
|
|
439
|
+
}), {
|
|
440
|
+
...o,
|
|
441
|
+
linePath: i.join(" ")
|
|
442
|
+
};
|
|
443
|
+
});
|
|
444
|
+
function oe(o) {
|
|
445
|
+
q.value = o;
|
|
446
|
+
const i = t.map((p) => ({
|
|
447
|
+
...p,
|
|
448
|
+
value: p.values[o],
|
|
449
|
+
absoluteIndex: p.absoluteIndices[o]
|
|
450
|
+
})).filter((p) => !w.value.includes(p.id));
|
|
451
|
+
ne.value = { datapoint: i, seriesIndex: o, config: e.value, dataset: t };
|
|
452
|
+
const x = e.value.tooltipCustomFormat;
|
|
453
|
+
if (Se(x) && Te(() => x({
|
|
454
|
+
datapoint: i,
|
|
455
|
+
seriesIndex: o,
|
|
456
|
+
series: t,
|
|
457
|
+
config: e.value
|
|
458
|
+
})))
|
|
459
|
+
Z.value = x({
|
|
460
|
+
datapoint: i,
|
|
461
|
+
seriesIndex: o,
|
|
462
|
+
series: t,
|
|
463
|
+
config: e.value
|
|
464
|
+
});
|
|
465
|
+
else {
|
|
466
|
+
let p = "";
|
|
467
|
+
e.value.xyPeriods[i[0].absoluteIndex] && (p += `<div style="border-bottom:1px solid ${e.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${e.value.xyPeriods[i[0].absoluteIndex]}</div>`), i.forEach((T, M) => {
|
|
468
|
+
p += `
|
|
469
|
+
<div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
|
|
470
|
+
<svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${T.color}"/></svg>
|
|
471
|
+
<span>${T.name}:</span>
|
|
472
|
+
<b>${H(
|
|
473
|
+
e.value.formatter,
|
|
474
|
+
T.value,
|
|
475
|
+
N({
|
|
476
|
+
p: e.value.valuePrefix,
|
|
477
|
+
v: T.value,
|
|
478
|
+
s: e.value.valueSuffix,
|
|
479
|
+
r: e.value.dataLabelRoundingValue
|
|
480
|
+
}),
|
|
481
|
+
{ datapoint: T, seriesIndex: M }
|
|
482
|
+
)}
|
|
483
|
+
</b>
|
|
484
|
+
</div>
|
|
485
|
+
`;
|
|
486
|
+
}), Z.value = p;
|
|
487
|
+
}
|
|
488
|
+
G.value = !0;
|
|
489
|
+
}
|
|
490
|
+
function K() {
|
|
491
|
+
q.value = null, G.value = !1;
|
|
492
|
+
}
|
|
493
|
+
return {
|
|
494
|
+
absoluteZero: O,
|
|
495
|
+
dataset: J.filter((o) => !w.value.includes(o.id)),
|
|
496
|
+
legend: J,
|
|
497
|
+
drawingArea: c,
|
|
498
|
+
extremes: u,
|
|
499
|
+
slotSize: B,
|
|
500
|
+
yLabels: le,
|
|
501
|
+
useTooltip: oe,
|
|
502
|
+
killTooltip: K
|
|
503
|
+
};
|
|
504
|
+
}), v = W(() => {
|
|
505
|
+
if (P.value !== A.BAR) return null;
|
|
506
|
+
const r = {
|
|
507
|
+
height: b.value.height,
|
|
508
|
+
width: b.value.width
|
|
509
|
+
}, c = {
|
|
510
|
+
left: e.value.xyPaddingLeft,
|
|
511
|
+
top: e.value.xyPaddingTop,
|
|
512
|
+
right: r.width - e.value.xyPaddingRight,
|
|
513
|
+
bottom: r.height - e.value.xyPaddingBottom,
|
|
514
|
+
width: r.width - e.value.xyPaddingLeft - e.value.xyPaddingRight,
|
|
515
|
+
height: r.height - e.value.xyPaddingTop - e.value.xyPaddingBottom
|
|
516
|
+
};
|
|
517
|
+
let t = [];
|
|
518
|
+
X(k.value.dataset) && (t = [
|
|
519
|
+
{
|
|
520
|
+
values: k.value.dataset.slice(S.value.start, S.value.end),
|
|
521
|
+
absoluteIndices: k.value.dataset.map((i, x) => x).slice(S.value.start, S.value.end),
|
|
522
|
+
name: e.value.title,
|
|
523
|
+
color: re.value[e.value.paletteStartIndex] || U[e.value.paletteStartIndex],
|
|
524
|
+
id: "bar_0"
|
|
525
|
+
}
|
|
526
|
+
]), _e(k.value.dataset) && (t = k.value.dataset.map((i, x) => ({
|
|
527
|
+
...i,
|
|
528
|
+
values: i.VALUE || i.DATA || i.SERIE || i.VALUES || i.NUM || 0,
|
|
529
|
+
name: i.NAME || i.DESCRIPTION || i.TITLE || i.LABEL || `Serie ${x}`,
|
|
530
|
+
id: `bar_${x}`
|
|
531
|
+
})).map((i, x) => ({
|
|
532
|
+
...i,
|
|
533
|
+
color: i.COLOR ? Ce(i.COLOR) : re.value[x + e.value.paletteStartIndex] || U[x + e.value.paletteStartIndex] || U[(x + e.value.paletteStartIndex) % U.length],
|
|
534
|
+
values: i.values.slice(S.value.start, S.value.end),
|
|
535
|
+
absoluteIndices: i.values.map((p, T) => T).slice(S.value.start, S.value.end)
|
|
536
|
+
})));
|
|
537
|
+
const u = {
|
|
538
|
+
max: Math.max(...t.filter((i) => !w.value.includes(i.id)).flatMap((i) => i.values)) < 0 ? 0 : Math.max(...t.filter((i) => !w.value.includes(i.id)).flatMap((i) => i.values)),
|
|
539
|
+
min: Math.min(...t.filter((i) => !w.value.includes(i.id)).flatMap((i) => i.values)),
|
|
540
|
+
maxSeries: Math.max(...t.filter((i) => !w.value.includes(i.id)).map((i) => i.values.length))
|
|
541
|
+
}, n = De(u.min < 0 ? u.min : 0, u.max, e.value.xyScaleSegments), h = n.min < 0 ? Math.abs(n.min) : 0, O = c.bottom - h / (n.max + h) * c.height, B = c.width / u.maxSeries, le = n.ticks.map((i) => ({
|
|
542
|
+
y: c.bottom - c.height * ((i + h) / (n.max + h)),
|
|
543
|
+
x: c.left - 8,
|
|
544
|
+
value: i
|
|
545
|
+
})), J = t.map((i, x) => ({
|
|
546
|
+
...i,
|
|
547
|
+
coordinates: i.values.map((p, T) => {
|
|
548
|
+
const M = (p + h) / (u.max + h) * c.height, ve = Math.abs(p) / Math.abs(u.min) * (c.height - O), ze = h / (u.max + h) * c.height, de = B / t.filter((Q) => !w.value.includes(Q.id)).length - e.value.barGap / t.filter((Q) => !w.value.includes(Q.id)).length;
|
|
549
|
+
return {
|
|
550
|
+
x: c.left + B * T + de * x + e.value.barGap / 2,
|
|
551
|
+
y: p > 0 ? c.bottom - M : O,
|
|
552
|
+
height: p > 0 ? M - ze : ve,
|
|
553
|
+
value: p,
|
|
554
|
+
width: de
|
|
555
|
+
};
|
|
556
|
+
})
|
|
557
|
+
})), oe = t.filter((i) => !w.value.includes(i.id)).map((i, x) => ({
|
|
558
|
+
...i,
|
|
559
|
+
coordinates: i.values.map((p, T) => {
|
|
560
|
+
const M = (p + h) / (u.max + h) * c.height, ve = Math.abs(p) / (u.max + h) * c.height, ze = h / (u.max + h) * c.height, de = B / t.filter((Q) => !w.value.includes(Q.id)).length - e.value.barGap / t.filter((Q) => !w.value.includes(Q.id)).length;
|
|
561
|
+
return {
|
|
562
|
+
x: c.left + B * T + de * x + e.value.barGap / 2,
|
|
563
|
+
y: p > 0 ? c.bottom - M : O,
|
|
564
|
+
height: p > 0 ? M - ze : ve,
|
|
565
|
+
value: p,
|
|
566
|
+
width: de
|
|
567
|
+
};
|
|
568
|
+
})
|
|
569
|
+
}));
|
|
570
|
+
function K(i) {
|
|
571
|
+
q.value = i;
|
|
572
|
+
const x = t.map((T) => ({
|
|
573
|
+
...T,
|
|
574
|
+
value: T.values[i],
|
|
575
|
+
absoluteIndex: T.absoluteIndices[i]
|
|
576
|
+
})).filter((T) => !w.value.includes(T.id));
|
|
577
|
+
ne.value = { datapoint: x, seriesIndex: i, config: e.value, dataset: t };
|
|
578
|
+
const p = e.value.tooltipCustomFormat;
|
|
579
|
+
if (Se(p) && Te(() => p({
|
|
580
|
+
datapoint: x,
|
|
581
|
+
seriesIndex: i,
|
|
582
|
+
series: t,
|
|
583
|
+
config: e.value
|
|
584
|
+
})))
|
|
585
|
+
Z.value = p({
|
|
586
|
+
point: x,
|
|
587
|
+
seriesIndex: i,
|
|
588
|
+
series: t,
|
|
589
|
+
config: e.value
|
|
590
|
+
});
|
|
591
|
+
else {
|
|
592
|
+
let T = "";
|
|
593
|
+
e.value.xyPeriods[x[0].absoluteIndex] && (T += `<div style="border-bottom:1px solid ${e.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${e.value.xyPeriods[x[0].absoluteIndex]}</div>`), x.forEach((M, ve) => {
|
|
594
|
+
T += `
|
|
595
|
+
<div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
|
|
596
|
+
<svg viewBox="0 0 12 12" height="14" width="12"><rect x=0 y="0" width="12" height="12" rx="1" stroke="none" fill="${M.color}"/></svg>
|
|
597
|
+
<span>${M.name}:</span>
|
|
598
|
+
<b>${H(
|
|
599
|
+
e.value.formatter,
|
|
600
|
+
M.value,
|
|
601
|
+
N({
|
|
602
|
+
p: e.value.valuePrefix,
|
|
603
|
+
v: M.value,
|
|
604
|
+
s: e.value.valueSuffix,
|
|
605
|
+
r: e.value.dataLabelRoundingValue
|
|
606
|
+
}),
|
|
607
|
+
{ datapoint: M, seriesIndex: ve }
|
|
608
|
+
)}
|
|
609
|
+
</b>
|
|
610
|
+
</div>
|
|
611
|
+
`;
|
|
612
|
+
}), Z.value = T;
|
|
613
|
+
}
|
|
614
|
+
G.value = !0;
|
|
615
|
+
}
|
|
616
|
+
function o() {
|
|
617
|
+
G.value = !1, q.value = null;
|
|
618
|
+
}
|
|
619
|
+
return {
|
|
620
|
+
absoluteZero: O,
|
|
621
|
+
dataset: oe.filter((i) => !w.value.includes(i.id)),
|
|
622
|
+
legend: J,
|
|
623
|
+
drawingArea: c,
|
|
624
|
+
extremes: u,
|
|
625
|
+
slotSize: B,
|
|
626
|
+
yLabels: le,
|
|
627
|
+
useTooltip: K,
|
|
628
|
+
killTooltip: o
|
|
629
|
+
};
|
|
630
|
+
}), Le = E(!1);
|
|
631
|
+
function et(r) {
|
|
632
|
+
Le.value = r, Ee.value += 1;
|
|
633
|
+
}
|
|
634
|
+
function Be() {
|
|
635
|
+
ye.value.showTooltip = !ye.value.showTooltip;
|
|
636
|
+
}
|
|
637
|
+
return z({
|
|
638
|
+
generatePdf: Ie,
|
|
639
|
+
generateImage: Re,
|
|
640
|
+
toggleTooltip: Be
|
|
641
|
+
}), (r, c) => Ye.value ? (a(), l("div", {
|
|
642
|
+
key: 0,
|
|
643
|
+
id: `${P.value}_${C.value}`,
|
|
644
|
+
ref_key: "quickChart",
|
|
645
|
+
ref: j,
|
|
646
|
+
class: ie({ "vue-ui-quick-chart": !0, "vue-data-ui-wrapper-fullscreen": Le.value }),
|
|
647
|
+
style: F(`background:${e.value.backgroundColor};color:${e.value.color};font-family:${e.value.fontFamily}; position: relative; ${e.value.responsive ? "height: 100%" : ""}`)
|
|
648
|
+
}, [
|
|
649
|
+
e.value.showUserOptions ? (a(), Ue(xt, {
|
|
650
|
+
ref: "details",
|
|
651
|
+
key: `user_option_${Ee.value}`,
|
|
652
|
+
backgroundColor: e.value.backgroundColor,
|
|
653
|
+
color: e.value.color,
|
|
654
|
+
isPrinting: y(pe),
|
|
655
|
+
isImaging: y(xe),
|
|
656
|
+
uid: C.value,
|
|
657
|
+
hasTooltip: e.value.userOptionsButtons.tooltip && e.value.showTooltip,
|
|
658
|
+
hasPdf: e.value.userOptionsButtons.pdf,
|
|
659
|
+
hasImg: e.value.userOptionsButtons.img,
|
|
660
|
+
hasFullscreen: e.value.userOptionsButtons.fullscreen,
|
|
661
|
+
hasXls: !1,
|
|
662
|
+
isTooltip: ye.value.showTooltip,
|
|
663
|
+
isFullscreen: Le.value,
|
|
664
|
+
titles: { ...e.value.userOptionsButtonTitles },
|
|
665
|
+
chartElement: j.value,
|
|
666
|
+
onToggleFullscreen: et,
|
|
667
|
+
onGeneratePdf: y(Ie),
|
|
668
|
+
onGenerateImage: y(Re),
|
|
669
|
+
onToggleTooltip: Be
|
|
670
|
+
}, lt({ _: 2 }, [
|
|
671
|
+
r.$slots.optionTooltip ? {
|
|
672
|
+
name: "optionTooltip",
|
|
673
|
+
fn: ee(() => [
|
|
674
|
+
D(r.$slots, "optionTooltip", {}, void 0, !0)
|
|
675
|
+
]),
|
|
676
|
+
key: "0"
|
|
677
|
+
} : void 0,
|
|
678
|
+
r.$slots.optionPdf ? {
|
|
679
|
+
name: "optionPdf",
|
|
680
|
+
fn: ee(() => [
|
|
681
|
+
D(r.$slots, "optionPdf", {}, void 0, !0)
|
|
682
|
+
]),
|
|
683
|
+
key: "1"
|
|
684
|
+
} : void 0,
|
|
685
|
+
r.$slots.optionImg ? {
|
|
686
|
+
name: "optionImg",
|
|
687
|
+
fn: ee(() => [
|
|
688
|
+
D(r.$slots, "optionImg", {}, void 0, !0)
|
|
689
|
+
]),
|
|
690
|
+
key: "2"
|
|
691
|
+
} : void 0,
|
|
692
|
+
r.$slots.optionFullscreen ? {
|
|
693
|
+
name: "optionFullscreen",
|
|
694
|
+
fn: ee(({ toggleFullscreen: t, isFullscreen: u }) => [
|
|
695
|
+
D(r.$slots, "optionFullscreen", Y(ce({ toggleFullscreen: t, isFullscreen: u })), void 0, !0)
|
|
696
|
+
]),
|
|
697
|
+
key: "3"
|
|
698
|
+
} : void 0
|
|
699
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : m("", !0),
|
|
700
|
+
e.value.title ? (a(), l("div", {
|
|
701
|
+
key: 1,
|
|
702
|
+
ref_key: "quickChartTitle",
|
|
703
|
+
ref: te,
|
|
704
|
+
class: "vue-ui-quick-chart-title",
|
|
705
|
+
style: F(`background:${e.value.backgroundColor};color:${e.value.color};font-size:${e.value.titleFontSize}px;font-weight:${e.value.titleBold ? "bold" : "normal"};text-align:${e.value.titleTextAlign}`)
|
|
706
|
+
}, I(e.value.title), 5)) : m("", !0),
|
|
707
|
+
(a(), l("svg", {
|
|
708
|
+
xmlns: y(ct),
|
|
709
|
+
viewBox: Ze.value,
|
|
710
|
+
style: F(`max-width:100%;overflow:visible;background:${e.value.backgroundColor};color:${e.value.color}`)
|
|
711
|
+
}, [
|
|
712
|
+
_("defs", null, [
|
|
713
|
+
_("filter", {
|
|
714
|
+
id: `blur_${C.value}`,
|
|
715
|
+
x: "-50%",
|
|
716
|
+
y: "-50%",
|
|
717
|
+
width: "200%",
|
|
718
|
+
height: "200%"
|
|
719
|
+
}, [
|
|
720
|
+
_("feGaussianBlur", {
|
|
721
|
+
in: "SourceGraphic",
|
|
722
|
+
stdDeviation: 2,
|
|
723
|
+
id: `blur_std_${C.value}`
|
|
724
|
+
}, null, 8, Pt),
|
|
725
|
+
Tt
|
|
726
|
+
], 8, Ct),
|
|
727
|
+
_("filter", {
|
|
728
|
+
id: `shadow_${C.value}`,
|
|
729
|
+
"color-interpolation-filters": "sRGB"
|
|
730
|
+
}, [
|
|
731
|
+
_("feDropShadow", {
|
|
732
|
+
dx: "0",
|
|
733
|
+
dy: "0",
|
|
734
|
+
stdDeviation: "10",
|
|
735
|
+
"flood-opacity": "0.5",
|
|
736
|
+
"flood-color": e.value.donutShadowColor
|
|
737
|
+
}, null, 8, It)
|
|
738
|
+
], 8, Et)
|
|
739
|
+
]),
|
|
740
|
+
P.value === A.DONUT ? (a(), l(g, { key: 0 }, [
|
|
741
|
+
e.value.showDataLabels ? (a(), l("g", Rt, [
|
|
742
|
+
(a(!0), l(g, null, L($.value.chart, (t, u) => (a(), l(g, null, [
|
|
743
|
+
$.value.isArcBigEnough(t) ? (a(), l("path", {
|
|
744
|
+
key: 0,
|
|
745
|
+
d: y(ht)(t, { x: (e.value.width || b.value.width) / 2, y: (e.value.height || b.value.height) / 2 }, 16, 16, !1, !1, e.value.donutLabelMarkerStrokeWidth),
|
|
746
|
+
stroke: t.color,
|
|
747
|
+
"stroke-width": e.value.donutLabelMarkerStrokeWidth,
|
|
748
|
+
"stroke-linecap": "round",
|
|
749
|
+
"stroke-linejoin": "round",
|
|
750
|
+
fill: "none",
|
|
751
|
+
filter: se(t.id)
|
|
752
|
+
}, null, 8, Ot)) : m("", !0)
|
|
753
|
+
], 64))), 256))
|
|
754
|
+
])) : m("", !0),
|
|
755
|
+
_("circle", {
|
|
756
|
+
class: "donut-hollow",
|
|
757
|
+
cx: (e.value.width || b.value.width) / 2,
|
|
758
|
+
cy: (e.value.height || b.value.height) / 2,
|
|
759
|
+
r: (e.value.height || b.value.height) * e.value.donutRadiusRatio,
|
|
760
|
+
fill: e.value.backgroundColor
|
|
761
|
+
}, null, 8, Ft),
|
|
762
|
+
_("circle", {
|
|
763
|
+
cx: $.value.cx,
|
|
764
|
+
cy: $.value.cy,
|
|
765
|
+
r: $.value.radius,
|
|
766
|
+
fill: e.value.backgroundColor,
|
|
767
|
+
filter: e.value.donutUseShadow ? `url(#shadow_${C.value})` : ""
|
|
768
|
+
}, null, 8, Mt),
|
|
769
|
+
_("g", Nt, [
|
|
770
|
+
(a(!0), l(g, null, L($.value.chart, (t, u) => (a(), l("path", {
|
|
771
|
+
d: t.arcSlice,
|
|
772
|
+
fill: t.color,
|
|
773
|
+
stroke: e.value.backgroundColor,
|
|
774
|
+
"stroke-width": e.value.donutStrokeWidth,
|
|
775
|
+
filter: se(t.id)
|
|
776
|
+
}, null, 8, Bt))), 256)),
|
|
777
|
+
(a(!0), l(g, null, L($.value.chart, (t, u) => (a(), l("path", {
|
|
778
|
+
d: t.arcSlice,
|
|
779
|
+
fill: "transparent",
|
|
780
|
+
onMouseenter: (n) => $.value.useTooltip({ datapoint: t, seriesIndex: u }),
|
|
781
|
+
onMouseout: c[0] || (c[0] = (n) => $.value.killTooltip()),
|
|
782
|
+
onClick: (n) => f("selectDatapoint", t)
|
|
783
|
+
}, null, 40, Ut))), 256))
|
|
784
|
+
]),
|
|
785
|
+
e.value.showDataLabels ? (a(), l("g", Dt, [
|
|
786
|
+
(a(!0), l(g, null, L($.value.chart, (t, u) => (a(), l(g, null, [
|
|
787
|
+
$.value.isArcBigEnough(t) ? (a(), l("circle", {
|
|
788
|
+
key: 0,
|
|
789
|
+
cx: y(fe)(t).x,
|
|
790
|
+
cy: y(Pe)(t) - 3.7,
|
|
791
|
+
fill: t.color,
|
|
792
|
+
r: 3,
|
|
793
|
+
filter: se(t.id)
|
|
794
|
+
}, null, 8, Vt)) : m("", !0),
|
|
795
|
+
$.value.isArcBigEnough(t) ? (a(), l("text", {
|
|
796
|
+
key: 1,
|
|
797
|
+
"text-anchor": y(fe)(t, !0, 20).anchor,
|
|
798
|
+
x: y(fe)(t, !0).x,
|
|
799
|
+
y: y(Pe)(t),
|
|
800
|
+
fill: e.value.color,
|
|
801
|
+
"font-size": e.value.dataLabelFontSize,
|
|
802
|
+
filter: se(t.id)
|
|
803
|
+
}, I($.value.displayArcPercentage(t, $.value.chart)) + " (" + I(y(H)(
|
|
804
|
+
e.value.formatter,
|
|
805
|
+
t.value,
|
|
806
|
+
y(N)({
|
|
807
|
+
p: e.value.valuePrefix,
|
|
808
|
+
v: t.value,
|
|
809
|
+
s: e.value.valueSuffix,
|
|
810
|
+
r: e.value.dataLabelRoundingValue
|
|
811
|
+
}),
|
|
812
|
+
{ datapoint: t, seriesIndex: u }
|
|
813
|
+
)) + ") ", 9, qt)) : m("", !0),
|
|
814
|
+
$.value.isArcBigEnough(t, !0, 20) ? (a(), l("text", {
|
|
815
|
+
key: 2,
|
|
816
|
+
"text-anchor": y(fe)(t).anchor,
|
|
817
|
+
x: y(fe)(t, !0).x,
|
|
818
|
+
y: y(Pe)(t) + e.value.dataLabelFontSize,
|
|
819
|
+
fill: e.value.color,
|
|
820
|
+
"font-size": e.value.dataLabelFontSize,
|
|
821
|
+
filter: se(t.id)
|
|
822
|
+
}, I(t.name), 9, Wt)) : m("", !0)
|
|
823
|
+
], 64))), 256))
|
|
824
|
+
])) : m("", !0),
|
|
825
|
+
e.value.donutShowTotal ? (a(), l("g", jt, [
|
|
826
|
+
_("text", {
|
|
827
|
+
"text-anchor": "middle",
|
|
828
|
+
x: $.value.drawingArea.centerX,
|
|
829
|
+
y: $.value.drawingArea.centerY - e.value.donutTotalLabelFontSize / 2,
|
|
830
|
+
"font-size": e.value.donutTotalLabelFontSize,
|
|
831
|
+
fill: e.value.color
|
|
832
|
+
}, I(e.value.donutTotalLabelText), 9, Gt),
|
|
833
|
+
_("text", {
|
|
834
|
+
"text-anchor": "middle",
|
|
835
|
+
x: $.value.drawingArea.centerX,
|
|
836
|
+
y: $.value.drawingArea.centerY + e.value.donutTotalLabelFontSize,
|
|
837
|
+
"font-size": e.value.donutTotalLabelFontSize,
|
|
838
|
+
fill: e.value.color
|
|
839
|
+
}, I(y(N)({
|
|
840
|
+
p: e.value.valuePrefix,
|
|
841
|
+
v: $.value.total,
|
|
842
|
+
s: e.value.valueSuffix,
|
|
843
|
+
r: e.value.dataLabelRoundingValue
|
|
844
|
+
})), 9, Ht)
|
|
845
|
+
])) : m("", !0)
|
|
846
|
+
], 64)) : m("", !0),
|
|
847
|
+
P.value === A.LINE ? (a(), l(g, { key: 1 }, [
|
|
848
|
+
e.value.xyShowGrid ? (a(), l("g", Xt, [
|
|
849
|
+
(a(!0), l(g, null, L(d.value.yLabels, (t) => (a(), l(g, null, [
|
|
850
|
+
t.y <= d.value.drawingArea.bottom ? (a(), l("line", {
|
|
851
|
+
key: 0,
|
|
852
|
+
x1: d.value.drawingArea.left,
|
|
853
|
+
x2: d.value.drawingArea.right,
|
|
854
|
+
y1: t.y,
|
|
855
|
+
y2: t.y,
|
|
856
|
+
stroke: e.value.xyGridStroke,
|
|
857
|
+
"stroke-width": e.value.xyGridStrokeWidth,
|
|
858
|
+
"stroke-linecap": "round"
|
|
859
|
+
}, null, 8, Yt)) : m("", !0)
|
|
860
|
+
], 64))), 256)),
|
|
861
|
+
(a(!0), l(g, null, L(d.value.extremes.maxSeries + 1, (t, u) => (a(), l("line", {
|
|
862
|
+
x1: d.value.drawingArea.left + d.value.slotSize * u,
|
|
863
|
+
x2: d.value.drawingArea.left + d.value.slotSize * u,
|
|
864
|
+
y1: d.value.drawingArea.top,
|
|
865
|
+
y2: d.value.drawingArea.bottom,
|
|
866
|
+
stroke: e.value.xyGridStroke,
|
|
867
|
+
"stroke-width": e.value.xyGridStrokeWidth,
|
|
868
|
+
"stroke-linecap": "round"
|
|
869
|
+
}, null, 8, Zt))), 256))
|
|
870
|
+
])) : m("", !0),
|
|
871
|
+
e.value.xyShowAxis ? (a(), l("g", Jt, [
|
|
872
|
+
_("line", {
|
|
873
|
+
x1: d.value.drawingArea.left,
|
|
874
|
+
x2: d.value.drawingArea.left,
|
|
875
|
+
y1: d.value.drawingArea.top,
|
|
876
|
+
y2: d.value.drawingArea.bottom,
|
|
877
|
+
stroke: e.value.xyAxisStroke,
|
|
878
|
+
"stroke-width": e.value.xyAxisStrokeWidth,
|
|
879
|
+
"stroke-linecap": "round"
|
|
880
|
+
}, null, 8, Kt),
|
|
881
|
+
_("line", {
|
|
882
|
+
x1: d.value.drawingArea.left,
|
|
883
|
+
x2: d.value.drawingArea.right,
|
|
884
|
+
y1: d.value.absoluteZero,
|
|
885
|
+
y2: d.value.absoluteZero,
|
|
886
|
+
stroke: e.value.xyAxisStroke,
|
|
887
|
+
"stroke-width": e.value.xyAxisStrokeWidth,
|
|
888
|
+
"stroke-linecap": "round"
|
|
889
|
+
}, null, 8, Qt)
|
|
890
|
+
])) : m("", !0),
|
|
891
|
+
e.value.xyShowScale ? (a(), l("g", ea, [
|
|
892
|
+
(a(!0), l(g, null, L(d.value.yLabels, (t, u) => (a(), l(g, null, [
|
|
893
|
+
t.y <= d.value.drawingArea.bottom ? (a(), l("line", {
|
|
894
|
+
key: 0,
|
|
895
|
+
x1: t.x + 4,
|
|
896
|
+
x2: d.value.drawingArea.left,
|
|
897
|
+
y1: t.y,
|
|
898
|
+
y2: t.y,
|
|
899
|
+
stroke: e.value.xyAxisStroke,
|
|
900
|
+
"stroke-width": e.value.xyAxisStrokeWidth,
|
|
901
|
+
"stroke-linecap": "round"
|
|
902
|
+
}, null, 8, ta)) : m("", !0),
|
|
903
|
+
t.y <= d.value.drawingArea.bottom ? (a(), l("text", {
|
|
904
|
+
key: 1,
|
|
905
|
+
x: t.x,
|
|
906
|
+
y: t.y + e.value.xyLabelsYFontSize / 3,
|
|
907
|
+
"text-anchor": "end",
|
|
908
|
+
"font-size": e.value.xyLabelsYFontSize,
|
|
909
|
+
fill: e.value.color
|
|
910
|
+
}, I(y(H)(
|
|
911
|
+
e.value.formatter,
|
|
912
|
+
t.value,
|
|
913
|
+
y(N)({
|
|
914
|
+
p: e.value.valuePrefix,
|
|
915
|
+
v: t.value,
|
|
916
|
+
s: e.value.valueSuffix,
|
|
917
|
+
r: e.value.dataLabelRoundingValue
|
|
918
|
+
}),
|
|
919
|
+
{ datapoint: t, seriesIndex: u }
|
|
920
|
+
)), 9, aa)) : m("", !0)
|
|
921
|
+
], 64))), 256))
|
|
922
|
+
])) : m("", !0),
|
|
923
|
+
e.value.xyShowScale && e.value.xyPeriods.length ? (a(), l("g", la, [
|
|
924
|
+
(a(!0), l(g, null, L(e.value.xyPeriods.slice(S.value.start, S.value.end), (t, u) => (a(), l("line", {
|
|
925
|
+
x1: d.value.drawingArea.left + d.value.slotSize * (u + 1) - d.value.slotSize / 2,
|
|
926
|
+
x2: d.value.drawingArea.left + d.value.slotSize * (u + 1) - d.value.slotSize / 2,
|
|
927
|
+
y1: d.value.drawingArea.bottom,
|
|
928
|
+
y2: d.value.drawingArea.bottom + 4,
|
|
929
|
+
stroke: e.value.xyAxisStroke,
|
|
930
|
+
"stroke-width": e.value.xyAxisStrokeWidth,
|
|
931
|
+
"stroke-linecap": "round"
|
|
932
|
+
}, null, 8, oa))), 256)),
|
|
933
|
+
(a(!0), l(g, null, L(e.value.xyPeriods.slice(S.value.start, S.value.end), (t, u) => (a(), l("text", {
|
|
934
|
+
"font-size": e.value.xyLabelsXFontSize,
|
|
935
|
+
"text-anchor": e.value.xyPeriodLabelsRotation > 0 ? "start" : e.value.xyPeriodLabelsRotation < 0 ? "end" : "middle",
|
|
936
|
+
fill: e.value.color,
|
|
937
|
+
transform: `translate(${d.value.drawingArea.left + d.value.slotSize * (u + 1) - d.value.slotSize / 2}, ${d.value.drawingArea.bottom + e.value.xyLabelsXFontSize + 6}), rotate(${e.value.xyPeriodLabelsRotation})`
|
|
938
|
+
}, I(t), 9, ia))), 256))
|
|
939
|
+
])) : m("", !0),
|
|
940
|
+
_("g", ua, [
|
|
941
|
+
(a(!0), l(g, null, L(d.value.dataset, (t, u) => (a(), l("g", na, [
|
|
942
|
+
e.value.lineSmooth ? (a(), l(g, { key: 0 }, [
|
|
943
|
+
_("path", {
|
|
944
|
+
d: `M ${y(Ve)(t.coordinates)}`,
|
|
945
|
+
stroke: e.value.backgroundColor,
|
|
946
|
+
"stroke-width": e.value.lineStrokeWidth + 1,
|
|
947
|
+
"stroke-linecap": "round",
|
|
948
|
+
fill: "none",
|
|
949
|
+
class: ie({ "quick-animation": !0, "vue-data-ui-line-animated": e.value.lineAnimated }),
|
|
950
|
+
style: { transition: "all 0.3s ease-in-out" }
|
|
951
|
+
}, null, 10, ra),
|
|
952
|
+
_("path", {
|
|
953
|
+
d: `M ${y(Ve)(t.coordinates)}`,
|
|
954
|
+
stroke: t.color,
|
|
955
|
+
"stroke-width": e.value.lineStrokeWidth,
|
|
956
|
+
"stroke-linecap": "round",
|
|
957
|
+
fill: "none",
|
|
958
|
+
class: ie({ "quick-animation": !0, "vue-data-ui-line-animated": e.value.lineAnimated }),
|
|
959
|
+
style: { transition: "all 0.3s ease-in-out" }
|
|
960
|
+
}, null, 10, sa)
|
|
961
|
+
], 64)) : (a(), l(g, { key: 1 }, [
|
|
962
|
+
_("path", {
|
|
963
|
+
d: `M ${t.linePath}`,
|
|
964
|
+
stroke: e.value.backgroundColor,
|
|
965
|
+
"stroke-width": e.value.lineStrokeWidth + 1,
|
|
966
|
+
"stroke-linecap": "round",
|
|
967
|
+
fill: "none",
|
|
968
|
+
class: ie({ "quick-animation": !0, "vue-data-ui-line-animated": e.value.lineAnimated }),
|
|
969
|
+
style: { transition: "all 0.3s ease-in-out" }
|
|
970
|
+
}, null, 10, va),
|
|
971
|
+
_("path", {
|
|
972
|
+
d: `M ${t.linePath}`,
|
|
973
|
+
stroke: t.color,
|
|
974
|
+
"stroke-width": e.value.lineStrokeWidth,
|
|
975
|
+
"stroke-linecap": "round",
|
|
976
|
+
fill: "none",
|
|
977
|
+
class: ie({ "quick-animation": !0, "vue-data-ui-line-animated": e.value.lineAnimated }),
|
|
978
|
+
style: { transition: "all 0.3s ease-in-out" }
|
|
979
|
+
}, null, 10, da)
|
|
980
|
+
], 64)),
|
|
981
|
+
(a(!0), l(g, null, L(t.coordinates, (n, h) => (a(), l("circle", {
|
|
982
|
+
cx: n.x,
|
|
983
|
+
cy: n.y,
|
|
984
|
+
r: 3,
|
|
985
|
+
fill: t.color,
|
|
986
|
+
stroke: e.value.backgroundColor,
|
|
987
|
+
"stroke-width": "0.5",
|
|
988
|
+
class: "quick-animation",
|
|
989
|
+
style: { transition: "all 0.3s ease-in-out" }
|
|
990
|
+
}, null, 8, ca))), 256))
|
|
991
|
+
]))), 256))
|
|
992
|
+
]),
|
|
993
|
+
e.value.showDataLabels ? (a(), l("g", ha, [
|
|
994
|
+
(a(!0), l(g, null, L(d.value.dataset, (t, u) => (a(), l(g, null, [
|
|
995
|
+
(a(!0), l(g, null, L(t.coordinates, (n, h) => (a(), l("text", {
|
|
996
|
+
"text-anchor": "middle",
|
|
997
|
+
"font-size": e.value.dataLabelFontSize,
|
|
998
|
+
fill: t.color,
|
|
999
|
+
x: n.x,
|
|
1000
|
+
y: n.y - e.value.dataLabelFontSize / 2,
|
|
1001
|
+
class: "quick-animation",
|
|
1002
|
+
style: { transition: "all 0.3s ease-in-out" }
|
|
1003
|
+
}, I(y(H)(
|
|
1004
|
+
e.value.formatter,
|
|
1005
|
+
n.value,
|
|
1006
|
+
y(N)({
|
|
1007
|
+
p: e.value.valuePrefix,
|
|
1008
|
+
v: n.value,
|
|
1009
|
+
s: e.value.valueSuffix,
|
|
1010
|
+
r: e.value.dataLabelRoundingValue
|
|
1011
|
+
}),
|
|
1012
|
+
{ datapoint: n, seriesIndex: h }
|
|
1013
|
+
)), 9, fa))), 256))
|
|
1014
|
+
], 64))), 256))
|
|
1015
|
+
])) : m("", !0),
|
|
1016
|
+
_("g", ga, [
|
|
1017
|
+
(a(!0), l(g, null, L(d.value.extremes.maxSeries, (t, u) => (a(), l("rect", {
|
|
1018
|
+
x: d.value.drawingArea.left + u * d.value.slotSize,
|
|
1019
|
+
y: d.value.drawingArea.top,
|
|
1020
|
+
height: d.value.drawingArea.height <= 0 ? 1e-5 : d.value.drawingArea.height,
|
|
1021
|
+
width: d.value.slotSize <= 0 ? 1e-5 : d.value.slotSize,
|
|
1022
|
+
fill: q.value === u ? e.value.xyHighlighterColor : "transparent",
|
|
1023
|
+
style: F(`opacity:${e.value.xyHighlighterOpacity}`),
|
|
1024
|
+
onMouseenter: (n) => d.value.useTooltip(u),
|
|
1025
|
+
onMouseleave: c[1] || (c[1] = (n) => d.value.killTooltip()),
|
|
1026
|
+
onClick: (n) => f("selectDatapoint", d.value.dataset.map((h) => ({
|
|
1027
|
+
...h,
|
|
1028
|
+
value: h.values[u]
|
|
1029
|
+
})))
|
|
1030
|
+
}, null, 44, ma))), 256))
|
|
1031
|
+
])
|
|
1032
|
+
], 64)) : m("", !0),
|
|
1033
|
+
P.value === A.BAR ? (a(), l(g, { key: 2 }, [
|
|
1034
|
+
e.value.xyShowGrid ? (a(), l("g", pa, [
|
|
1035
|
+
(a(!0), l(g, null, L(v.value.yLabels, (t) => (a(), l(g, null, [
|
|
1036
|
+
t.y <= v.value.drawingArea.bottom ? (a(), l("line", {
|
|
1037
|
+
key: 0,
|
|
1038
|
+
x1: v.value.drawingArea.left,
|
|
1039
|
+
x2: v.value.drawingArea.right,
|
|
1040
|
+
y1: t.y,
|
|
1041
|
+
y2: t.y,
|
|
1042
|
+
stroke: e.value.xyGridStroke,
|
|
1043
|
+
"stroke-width": e.value.xyGridStrokeWidth,
|
|
1044
|
+
"stroke-linecap": "round"
|
|
1045
|
+
}, null, 8, xa)) : m("", !0)
|
|
1046
|
+
], 64))), 256)),
|
|
1047
|
+
(a(!0), l(g, null, L(v.value.extremes.maxSeries + 1, (t, u) => (a(), l("line", {
|
|
1048
|
+
x1: v.value.drawingArea.left + v.value.slotSize * u,
|
|
1049
|
+
x2: v.value.drawingArea.left + v.value.slotSize * u,
|
|
1050
|
+
y1: v.value.drawingArea.top,
|
|
1051
|
+
y2: v.value.drawingArea.bottom,
|
|
1052
|
+
stroke: e.value.xyGridStroke,
|
|
1053
|
+
"stroke-width": e.value.xyGridStrokeWidth,
|
|
1054
|
+
"stroke-linecap": "round"
|
|
1055
|
+
}, null, 8, ya))), 256))
|
|
1056
|
+
])) : m("", !0),
|
|
1057
|
+
e.value.xyShowAxis ? (a(), l("g", ka, [
|
|
1058
|
+
_("line", {
|
|
1059
|
+
x1: v.value.drawingArea.left,
|
|
1060
|
+
x2: v.value.drawingArea.left,
|
|
1061
|
+
y1: v.value.drawingArea.top,
|
|
1062
|
+
y2: v.value.drawingArea.bottom,
|
|
1063
|
+
stroke: e.value.xyAxisStroke,
|
|
1064
|
+
"stroke-width": e.value.xyAxisStrokeWidth,
|
|
1065
|
+
"stroke-linecap": "round"
|
|
1066
|
+
}, null, 8, ba),
|
|
1067
|
+
_("line", {
|
|
1068
|
+
x1: v.value.drawingArea.left,
|
|
1069
|
+
x2: v.value.drawingArea.right,
|
|
1070
|
+
y1: v.value.absoluteZero,
|
|
1071
|
+
y2: v.value.absoluteZero,
|
|
1072
|
+
stroke: e.value.xyAxisStroke,
|
|
1073
|
+
"stroke-width": e.value.xyAxisStrokeWidth,
|
|
1074
|
+
"stroke-linecap": "round"
|
|
1075
|
+
}, null, 8, Sa)
|
|
1076
|
+
])) : m("", !0),
|
|
1077
|
+
e.value.xyShowScale ? (a(), l("g", wa, [
|
|
1078
|
+
(a(!0), l(g, null, L(v.value.yLabels, (t, u) => (a(), l(g, null, [
|
|
1079
|
+
t.y <= v.value.drawingArea.bottom ? (a(), l("line", {
|
|
1080
|
+
key: 0,
|
|
1081
|
+
x1: t.x + 4,
|
|
1082
|
+
x2: v.value.drawingArea.left,
|
|
1083
|
+
y1: t.y,
|
|
1084
|
+
y2: t.y,
|
|
1085
|
+
stroke: e.value.xyAxisStroke,
|
|
1086
|
+
"stroke-width": e.value.xyAxisStrokeWidth,
|
|
1087
|
+
"stroke-linecap": "round"
|
|
1088
|
+
}, null, 8, _a)) : m("", !0),
|
|
1089
|
+
t.y <= v.value.drawingArea.bottom ? (a(), l("text", {
|
|
1090
|
+
key: 1,
|
|
1091
|
+
x: t.x,
|
|
1092
|
+
y: t.y + e.value.xyLabelsYFontSize / 3,
|
|
1093
|
+
"text-anchor": "end",
|
|
1094
|
+
"font-size": e.value.xyLabelsYFontSize,
|
|
1095
|
+
fill: e.value.color
|
|
1096
|
+
}, I(y(H)(
|
|
1097
|
+
e.value.formatter,
|
|
1098
|
+
t.value,
|
|
1099
|
+
y(N)({
|
|
1100
|
+
p: e.value.valuePrefix,
|
|
1101
|
+
v: t.value,
|
|
1102
|
+
s: e.value.valueSuffix,
|
|
1103
|
+
r: e.value.dataLabelRoundingValue
|
|
1104
|
+
}),
|
|
1105
|
+
{ datapoint: t, seriesIndex: u }
|
|
1106
|
+
)), 9, Aa)) : m("", !0)
|
|
1107
|
+
], 64))), 256))
|
|
1108
|
+
])) : m("", !0),
|
|
1109
|
+
e.value.xyShowScale && e.value.xyPeriods.length ? (a(), l("g", La, [
|
|
1110
|
+
(a(!0), l(g, null, L(e.value.xyPeriods.slice(S.value.start, S.value.end), (t, u) => (a(), l("line", {
|
|
1111
|
+
x1: v.value.drawingArea.left + v.value.slotSize * (u + 1) - v.value.slotSize / 2,
|
|
1112
|
+
x2: v.value.drawingArea.left + v.value.slotSize * (u + 1) - v.value.slotSize / 2,
|
|
1113
|
+
y1: v.value.drawingArea.bottom,
|
|
1114
|
+
y2: v.value.drawingArea.bottom + 4,
|
|
1115
|
+
stroke: e.value.xyAxisStroke,
|
|
1116
|
+
"stroke-width": e.value.xyAxisStrokeWidth,
|
|
1117
|
+
"stroke-linecap": "round"
|
|
1118
|
+
}, null, 8, za))), 256)),
|
|
1119
|
+
(a(!0), l(g, null, L(e.value.xyPeriods.slice(S.value.start, S.value.end), (t, u) => (a(), l("text", {
|
|
1120
|
+
"font-size": e.value.xyLabelsXFontSize,
|
|
1121
|
+
"text-anchor": e.value.xyPeriodLabelsRotation > 0 ? "start" : e.value.xyPeriodLabelsRotation < 0 ? "end" : "middle",
|
|
1122
|
+
transform: `translate(${v.value.drawingArea.left + v.value.slotSize * (u + 1) - v.value.slotSize / 2}, ${v.value.drawingArea.bottom + e.value.xyLabelsXFontSize + 6}) rotate(${e.value.xyPeriodLabelsRotation})`,
|
|
1123
|
+
fill: e.value.color
|
|
1124
|
+
}, I(t), 9, $a))), 256))
|
|
1125
|
+
])) : m("", !0),
|
|
1126
|
+
_("g", Ca, [
|
|
1127
|
+
(a(!0), l(g, null, L(v.value.dataset, (t, u) => (a(), l(g, null, [
|
|
1128
|
+
(a(!0), l(g, null, L(t.coordinates, (n, h) => (a(), l("rect", {
|
|
1129
|
+
x: n.x,
|
|
1130
|
+
width: n.width <= 0 ? 1e-5 : n.width,
|
|
1131
|
+
height: n.height <= 0 ? 1e-5 : n.height,
|
|
1132
|
+
y: n.y,
|
|
1133
|
+
fill: t.color,
|
|
1134
|
+
stroke: e.value.backgroundColor,
|
|
1135
|
+
"stroke-width": e.value.barStrokeWidth,
|
|
1136
|
+
"stroke-linecap": "round",
|
|
1137
|
+
class: ie({ "vue-data-ui-bar-animated": e.value.barAnimated && n.value < 0 })
|
|
1138
|
+
}, [
|
|
1139
|
+
e.value.barAnimated && n.value > 0 && !y(pe) && !y(xe) ? (a(), l("animate", {
|
|
1140
|
+
key: 0,
|
|
1141
|
+
attributeName: "height",
|
|
1142
|
+
from: 0,
|
|
1143
|
+
to: n.height,
|
|
1144
|
+
dur: "0.5s"
|
|
1145
|
+
}, null, 8, Ta)) : m("", !0),
|
|
1146
|
+
e.value.barAnimated && n.value > 0 && !y(pe) && !y(xe) ? (a(), l("animate", {
|
|
1147
|
+
key: 1,
|
|
1148
|
+
attributeName: "y",
|
|
1149
|
+
from: v.value.absoluteZero,
|
|
1150
|
+
to: v.value.absoluteZero - n.height,
|
|
1151
|
+
dur: "0.5s"
|
|
1152
|
+
}, null, 8, Ea)) : m("", !0)
|
|
1153
|
+
], 10, Pa))), 256))
|
|
1154
|
+
], 64))), 256))
|
|
1155
|
+
]),
|
|
1156
|
+
e.value.showDataLabels ? (a(), l("g", Ia, [
|
|
1157
|
+
(a(!0), l(g, null, L(v.value.dataset, (t, u) => (a(), l(g, null, [
|
|
1158
|
+
(a(!0), l(g, null, L(t.coordinates, (n, h) => (a(), l("text", {
|
|
1159
|
+
x: n.x + n.width / 2,
|
|
1160
|
+
y: n.y - e.value.dataLabelFontSize / 2,
|
|
1161
|
+
"text-anchor": "middle",
|
|
1162
|
+
"font-size": e.value.dataLabelFontSize,
|
|
1163
|
+
fill: t.color,
|
|
1164
|
+
class: "quick-animation"
|
|
1165
|
+
}, I(y(H)(
|
|
1166
|
+
e.value.formatter,
|
|
1167
|
+
n.value,
|
|
1168
|
+
y(N)({
|
|
1169
|
+
p: e.value.valuePrefix,
|
|
1170
|
+
v: n.value,
|
|
1171
|
+
s: e.value.valueSuffix,
|
|
1172
|
+
r: e.value.dataLabelRoundingValue
|
|
1173
|
+
}),
|
|
1174
|
+
{ datapoint: n, seriesIndex: h }
|
|
1175
|
+
)), 9, Ra))), 256))
|
|
1176
|
+
], 64))), 256))
|
|
1177
|
+
])) : m("", !0),
|
|
1178
|
+
_("g", Oa, [
|
|
1179
|
+
(a(!0), l(g, null, L(v.value.extremes.maxSeries, (t, u) => (a(), l("rect", {
|
|
1180
|
+
x: v.value.drawingArea.left + u * v.value.slotSize,
|
|
1181
|
+
y: v.value.drawingArea.top,
|
|
1182
|
+
height: v.value.drawingArea.height <= 0 ? 1e-5 : v.value.drawingArea.height,
|
|
1183
|
+
width: v.value.slotSize <= 0 ? 1e-5 : v.value.slotSize,
|
|
1184
|
+
fill: q.value === u ? e.value.xyHighlighterColor : "transparent",
|
|
1185
|
+
style: F(`opacity:${e.value.xyHighlighterOpacity}`),
|
|
1186
|
+
onMouseenter: (n) => v.value.useTooltip(u),
|
|
1187
|
+
onMouseleave: c[2] || (c[2] = (n) => v.value.killTooltip()),
|
|
1188
|
+
onClick: (n) => f("selectDatapoint", v.value.dataset.map((h) => ({
|
|
1189
|
+
...h,
|
|
1190
|
+
value: h.values[u]
|
|
1191
|
+
})))
|
|
1192
|
+
}, null, 44, Fa))), 256))
|
|
1193
|
+
])
|
|
1194
|
+
], 64)) : m("", !0),
|
|
1195
|
+
[A.LINE, A.BAR].includes(P.value) ? (a(), l("g", Ma, [
|
|
1196
|
+
e.value.xAxisLabel && P.value === A.LINE ? (a(), l("g", Na, [
|
|
1197
|
+
_("text", {
|
|
1198
|
+
"font-size": e.value.axisLabelsFontSize,
|
|
1199
|
+
fill: e.value.color,
|
|
1200
|
+
"text-anchor": "middle",
|
|
1201
|
+
x: d.value.drawingArea.left + d.value.drawingArea.width / 2,
|
|
1202
|
+
y: b.value.height - e.value.axisLabelsFontSize / 3
|
|
1203
|
+
}, I(e.value.xAxisLabel), 9, Ba)
|
|
1204
|
+
])) : m("", !0),
|
|
1205
|
+
e.value.xAxisLabel && P.value === A.BAR ? (a(), l("g", Ua, [
|
|
1206
|
+
_("text", {
|
|
1207
|
+
"font-size": e.value.axisLabelsFontSize,
|
|
1208
|
+
fill: e.value.color,
|
|
1209
|
+
"text-anchor": "middle",
|
|
1210
|
+
x: v.value.drawingArea.left + v.value.drawingArea.width / 2,
|
|
1211
|
+
y: b.value.height - e.value.axisLabelsFontSize / 3
|
|
1212
|
+
}, I(e.value.xAxisLabel), 9, Da)
|
|
1213
|
+
])) : m("", !0),
|
|
1214
|
+
e.value.yAxisLabel && P.value === A.LINE ? (a(), l("g", Va, [
|
|
1215
|
+
_("text", {
|
|
1216
|
+
"font-size": e.value.axisLabelsFontSize,
|
|
1217
|
+
fill: e.value.color,
|
|
1218
|
+
transform: `translate(${e.value.axisLabelsFontSize}, ${d.value.drawingArea.top + d.value.drawingArea.height / 2}) rotate(-90)`,
|
|
1219
|
+
"text-anchor": "middle"
|
|
1220
|
+
}, I(e.value.yAxisLabel), 9, qa)
|
|
1221
|
+
])) : m("", !0),
|
|
1222
|
+
e.value.yAxisLabel && P.value === A.BAR ? (a(), l("g", Wa, [
|
|
1223
|
+
_("text", {
|
|
1224
|
+
"font-size": e.value.axisLabelsFontSize,
|
|
1225
|
+
fill: e.value.color,
|
|
1226
|
+
transform: `translate(${e.value.axisLabelsFontSize}, ${v.value.drawingArea.top + v.value.drawingArea.height / 2}) rotate(-90)`,
|
|
1227
|
+
"text-anchor": "middle"
|
|
1228
|
+
}, I(e.value.yAxisLabel), 9, ja)
|
|
1229
|
+
])) : m("", !0)
|
|
1230
|
+
])) : m("", !0)
|
|
1231
|
+
], 12, $t)),
|
|
1232
|
+
r.$slots.watermark ? (a(), l("div", Ga, [
|
|
1233
|
+
D(r.$slots, "watermark", Y(ce({ isPrinting: y(pe) || y(xe) })), void 0, !0)
|
|
1234
|
+
])) : m("", !0),
|
|
1235
|
+
[A.BAR, A.LINE].includes(P.value) && e.value.zoomXy && k.value.maxSeriesLength > 1 ? (a(), l("div", {
|
|
1236
|
+
key: `slicer_${Ae.value}`,
|
|
1237
|
+
ref_key: "quickChartSlicer",
|
|
1238
|
+
ref: ue
|
|
1239
|
+
}, [
|
|
1240
|
+
(a(), Ue(yt, {
|
|
1241
|
+
key: `slicer_${Ae.value}`,
|
|
1242
|
+
background: e.value.zoomColor,
|
|
1243
|
+
borderColor: e.value.backgroundColor,
|
|
1244
|
+
fontSize: e.value.zoomFontSize,
|
|
1245
|
+
useResetSlot: e.value.zoomUseResetSlot,
|
|
1246
|
+
labelLeft: e.value.xyPeriods[S.value.start] ? e.value.xyPeriods[S.value.start] : "",
|
|
1247
|
+
labelRight: e.value.xyPeriods[S.value.end - 1] ? e.value.xyPeriods[S.value.end - 1] : "",
|
|
1248
|
+
textColor: e.value.color,
|
|
1249
|
+
inputColor: e.value.zoomColor,
|
|
1250
|
+
selectColor: e.value.zoomHighlightColor,
|
|
1251
|
+
max: k.value.maxSeriesLength,
|
|
1252
|
+
min: 0,
|
|
1253
|
+
valueStart: S.value.start,
|
|
1254
|
+
valueEnd: S.value.end,
|
|
1255
|
+
smoothMinimap: e.value.zoomMinimap.smooth,
|
|
1256
|
+
minimapSelectedColor: e.value.zoomMinimap.selectedColor,
|
|
1257
|
+
minimapSelectedColorOpacity: e.value.zoomMinimap.selectedColorOpacity,
|
|
1258
|
+
minimapSelectionRadius: e.value.zoomMinimap.selectionRadius,
|
|
1259
|
+
minimapLineColor: e.value.zoomMinimap.lineColor,
|
|
1260
|
+
minimap: Qe.value,
|
|
1261
|
+
start: S.value.start,
|
|
1262
|
+
"onUpdate:start": c[3] || (c[3] = (t) => S.value.start = t),
|
|
1263
|
+
end: S.value.end,
|
|
1264
|
+
"onUpdate:end": c[4] || (c[4] = (t) => S.value.end = t),
|
|
1265
|
+
onReset: Ke
|
|
1266
|
+
}, {
|
|
1267
|
+
"reset-action": ee(({ reset: t }) => [
|
|
1268
|
+
D(r.$slots, "reset-action", Y(ce({ reset: t })), void 0, !0)
|
|
1269
|
+
]),
|
|
1270
|
+
_: 3
|
|
1271
|
+
}, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "smoothMinimap", "minimapSelectedColor", "minimapSelectedColorOpacity", "minimapSelectionRadius", "minimapLineColor", "minimap", "start", "end"]))
|
|
1272
|
+
])) : m("", !0),
|
|
1273
|
+
e.value.showLegend ? (a(), l("div", {
|
|
1274
|
+
key: 4,
|
|
1275
|
+
ref_key: "quickChartLegend",
|
|
1276
|
+
ref: ae,
|
|
1277
|
+
class: "vue-ui-quick-chart-legend",
|
|
1278
|
+
style: F(`background:${e.value.backgroundColor};color:${e.value.color}`)
|
|
1279
|
+
}, [
|
|
1280
|
+
P.value === A.DONUT ? (a(!0), l(g, { key: 0 }, L($.value.legend, (t, u) => (a(), l("div", {
|
|
1281
|
+
class: "vue-ui-quick-chart-legend-item",
|
|
1282
|
+
onClick: (n) => {
|
|
1283
|
+
Je(t, $.value.dataset), f("selectLegend", t);
|
|
1284
|
+
},
|
|
1285
|
+
style: F(`cursor: ${$.value.legend.length > 1 ? "pointer" : "default"}; opacity:${w.value.includes(t.id) ? "0.5" : "1"}`)
|
|
1286
|
+
}, [
|
|
1287
|
+
e.value.useCustomLegend ? D(r.$slots, "legend", Y($e({ key: 0 }, { legend: t })), void 0, !0) : (a(), l(g, { key: 1 }, [
|
|
1288
|
+
he(we, {
|
|
1289
|
+
name: e.value.legendIcon,
|
|
1290
|
+
stroke: t.color,
|
|
1291
|
+
size: e.value.legendIconSize
|
|
1292
|
+
}, null, 8, ["name", "stroke", "size"]),
|
|
1293
|
+
_("span", {
|
|
1294
|
+
style: F(`font-size:${e.value.legendFontSize}px`)
|
|
1295
|
+
}, I(t.name), 5),
|
|
1296
|
+
_("span", {
|
|
1297
|
+
style: F(`font-size:${e.value.legendFontSize}px;font-variant-numeric:tabular-nums`)
|
|
1298
|
+
}, I(w.value.includes(t.id) ? "-" : y(H)(
|
|
1299
|
+
e.value.formatter,
|
|
1300
|
+
t.absoluteValue,
|
|
1301
|
+
y(N)({
|
|
1302
|
+
p: e.value.valuePrefix,
|
|
1303
|
+
v: t.absoluteValue,
|
|
1304
|
+
s: e.value.valueSuffix,
|
|
1305
|
+
r: e.value.dataLabelRoundingValue
|
|
1306
|
+
}),
|
|
1307
|
+
{ datapoint: t, seriesIndex: u }
|
|
1308
|
+
)), 5),
|
|
1309
|
+
w.value.includes(t.id) ? (a(), l("span", {
|
|
1310
|
+
key: 0,
|
|
1311
|
+
style: F(`font-size:${e.value.legendFontSize}px`)
|
|
1312
|
+
}, " ( - % ) ", 4)) : be.value ? (a(), l("span", {
|
|
1313
|
+
key: 1,
|
|
1314
|
+
style: F(`font-size:${e.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)
|
|
1315
|
+
}, " ( - % ) ", 4)) : (a(), l("span", {
|
|
1316
|
+
key: 2,
|
|
1317
|
+
style: F(`font-size:${e.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)
|
|
1318
|
+
}, " (" + I(y(N)({
|
|
1319
|
+
v: t.value / $.value.total * 100,
|
|
1320
|
+
s: "%",
|
|
1321
|
+
r: e.value.dataLabelRoundingPercentage
|
|
1322
|
+
})) + ") ", 5))
|
|
1323
|
+
], 64))
|
|
1324
|
+
], 12, Ha))), 256)) : m("", !0),
|
|
1325
|
+
P.value === A.LINE ? (a(!0), l(g, { key: 1 }, L(d.value.legend, (t, u) => (a(), l("div", {
|
|
1326
|
+
class: "vue-ui-quick-chart-legend-item",
|
|
1327
|
+
onClick: (n) => {
|
|
1328
|
+
Fe(t.id, d.value.legend.length - 1), f("selectLegend", t);
|
|
1329
|
+
},
|
|
1330
|
+
style: F(`cursor: ${d.value.legend.length > 1 ? "pointer" : "default"}; opacity:${w.value.includes(t.id) ? "0.5" : "1"}`)
|
|
1331
|
+
}, [
|
|
1332
|
+
e.value.useCustomLegend ? D(r.$slots, "legend", Y($e({ key: 0 }, { legend: t })), void 0, !0) : (a(), l(g, { key: 1 }, [
|
|
1333
|
+
he(we, {
|
|
1334
|
+
name: e.value.legendIcon,
|
|
1335
|
+
stroke: t.color,
|
|
1336
|
+
size: e.value.legendIconSize
|
|
1337
|
+
}, null, 8, ["name", "stroke", "size"]),
|
|
1338
|
+
_("span", {
|
|
1339
|
+
style: F(`font-size:${e.value.legendFontSize}px`)
|
|
1340
|
+
}, I(t.name), 5)
|
|
1341
|
+
], 64))
|
|
1342
|
+
], 12, Xa))), 256)) : m("", !0),
|
|
1343
|
+
P.value === A.BAR ? (a(!0), l(g, { key: 2 }, L(v.value.legend, (t, u) => (a(), l("div", {
|
|
1344
|
+
class: "vue-ui-quick-chart-legend-item",
|
|
1345
|
+
onClick: (n) => {
|
|
1346
|
+
Fe(t.id, v.value.legend.length - 1), f("selectLegend", t);
|
|
1347
|
+
},
|
|
1348
|
+
style: F(`cursor: ${v.value.legend.length > 1 ? "pointer" : "default"}; opacity:${w.value.includes(t.id) ? "0.5" : "1"}`)
|
|
1349
|
+
}, [
|
|
1350
|
+
e.value.useCustomLegend ? D(r.$slots, "legend", Y($e({ key: 0 }, { legend: t })), void 0, !0) : (a(), l(g, { key: 1 }, [
|
|
1351
|
+
he(we, {
|
|
1352
|
+
name: e.value.legendIcon,
|
|
1353
|
+
stroke: t.color,
|
|
1354
|
+
size: e.value.legendIconSize
|
|
1355
|
+
}, null, 8, ["name", "stroke", "size"]),
|
|
1356
|
+
_("span", {
|
|
1357
|
+
style: F(`font-size:${e.value.legendFontSize}px`)
|
|
1358
|
+
}, I(t.name), 5)
|
|
1359
|
+
], 64))
|
|
1360
|
+
], 12, Ya))), 256)) : m("", !0)
|
|
1361
|
+
], 4)) : m("", !0),
|
|
1362
|
+
he(mt, {
|
|
1363
|
+
show: ye.value.showTooltip && G.value,
|
|
1364
|
+
backgroundColor: e.value.backgroundColor,
|
|
1365
|
+
color: e.value.color,
|
|
1366
|
+
borderRadius: e.value.tooltipBorderRadius,
|
|
1367
|
+
borderColor: e.value.tooltipBorderColor,
|
|
1368
|
+
borderWidth: e.value.tooltipBorderWidth,
|
|
1369
|
+
fontSize: e.value.tooltipFontSize,
|
|
1370
|
+
backgroundOpacity: e.value.tooltipBackgroundOpacity,
|
|
1371
|
+
position: e.value.tooltipPosition,
|
|
1372
|
+
offsetY: e.value.tooltipOffsetY,
|
|
1373
|
+
parent: j.value,
|
|
1374
|
+
content: Z.value,
|
|
1375
|
+
isCustom: y(Se)(e.value.tooltipCustomFormat)
|
|
1376
|
+
}, {
|
|
1377
|
+
"tooltip-before": ee(() => [
|
|
1378
|
+
D(r.$slots, "tooltip-before", Y(ce({ ...ne.value })), void 0, !0)
|
|
1379
|
+
]),
|
|
1380
|
+
"tooltip-after": ee(() => [
|
|
1381
|
+
D(r.$slots, "tooltip-after", Y(ce({ ...ne.value })), void 0, !0)
|
|
1382
|
+
]),
|
|
1383
|
+
_: 3
|
|
1384
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"])
|
|
1385
|
+
], 14, zt)) : (a(), l("div", Za, [
|
|
1386
|
+
he(we, {
|
|
1387
|
+
name: "circleCancel",
|
|
1388
|
+
stroke: "red"
|
|
1389
|
+
}),
|
|
1390
|
+
Ja
|
|
1391
|
+
]));
|
|
1392
|
+
}
|
|
1393
|
+
}, rl = /* @__PURE__ */ kt(Ka, [["__scopeId", "data-v-522703e1"]]);
|
|
1394
|
+
export {
|
|
1395
|
+
rl as default
|
|
1396
|
+
};
|