vue-data-ui 3.0.0-next.36 → 3.0.0-next.38

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.
Files changed (92) hide show
  1. package/dist/{Arrow-CSwNSv2c.js → Arrow-Cxfs_jDk.js} +1 -1
  2. package/dist/{BaseDraggableDialog-DGOONbgy.js → BaseDraggableDialog-D8bUhwCR.js} +2 -2
  3. package/dist/{BaseIcon-CKP5mFx_.js → BaseIcon-B5hDik6M.js} +1 -1
  4. package/dist/{ColorPicker-DCLStg36.js → ColorPicker-X30bIjOM.js} +2 -2
  5. package/dist/{DataTable-DMXRqxO9.js → DataTable-BrP5zT2y.js} +2 -2
  6. package/dist/{Legend-D6apcxV3.js → Legend-Bok1w9PE.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-CjLa6lCT.js → NonSvgPenAndPaper-mFU4kkja.js} +3 -3
  8. package/dist/{PackageVersion-DOtis8zH.js → PackageVersion-DoJRJ_yZ.js} +1 -1
  9. package/dist/{PenAndPaper-XC3SNbgm.js → PenAndPaper-BKLSbUJJ.js} +3 -3
  10. package/dist/{Shape-Dib8cPqa.js → Shape-Bp0uUbyi.js} +43 -37
  11. package/dist/{Slicer-BBfWOoWo.js → Slicer-BIL4fQe9.js} +26 -26
  12. package/dist/{SparkTooltip-Bt0DuWbI.js → SparkTooltip-BrA3pWY1.js} +1 -1
  13. package/dist/{Title-lox3SQPC.js → Title-C4mHBlGm.js} +1 -1
  14. package/dist/{Tooltip-DzK1HoFb.js → Tooltip-CIAaZqi-.js} +1 -1
  15. package/dist/{UserOptions-Dy6QIYd1.js → UserOptions-CtdmjrzM.js} +2 -2
  16. package/dist/{dom-to-png-DE11zvjY.js → dom-to-png-D7urYnQL.js} +1 -1
  17. package/dist/{img-Bv894v6P.js → img-u92jJi7s.js} +1 -1
  18. package/dist/{index-enA2Fisu.js → index-Do8Yy3T8.js} +38 -5
  19. package/dist/{pdf-L3nnkB10.js → pdf-Da78hVzB.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +20 -0
  22. package/dist/types/vue-data-ui.d.ts +20 -0
  23. package/dist/{useNestedProp-Crm1jYNw.js → useNestedProp-C7A9vyBD.js} +1 -1
  24. package/dist/{usePrinter-Bh6HKGit.js → usePrinter-BvP9oj3O.js} +2 -2
  25. package/dist/{vue-data-ui-DtKKT9mu.js → vue-data-ui-BVss51hf.js} +64 -64
  26. package/dist/vue-data-ui.js +1 -1
  27. package/dist/{vue-ui-3d-bar-DNmDddQ7.js → vue-ui-3d-bar-CsijfJeX.js} +6 -6
  28. package/dist/{vue-ui-accordion-CwPBtAl7.js → vue-ui-accordion-DqXZmmXi.js} +3 -3
  29. package/dist/{vue-ui-age-pyramid-DEs8Im_T.js → vue-ui-age-pyramid-CLr8-9V2.js} +6 -6
  30. package/dist/{vue-ui-annotator-CYxLPnzs.js → vue-ui-annotator-BKH5uBbZ.js} +2 -2
  31. package/dist/vue-ui-bullet-Bv-AKTw8.js +571 -0
  32. package/dist/{vue-ui-candlestick-uq3rtBpr.js → vue-ui-candlestick-2MCzyUcz.js} +7 -7
  33. package/dist/{vue-ui-carousel-table-DedRyMvM.js → vue-ui-carousel-table-cw5HlSnS.js} +4 -4
  34. package/dist/{vue-ui-chestnut-Dn9dHx8K.js → vue-ui-chestnut-BgsrweZJ.js} +5 -5
  35. package/dist/{vue-ui-chord-Bj-2Jo5l.js → vue-ui-chord-M_mjkpTk.js} +8 -8
  36. package/dist/{vue-ui-circle-pack-ZvoREQHu.js → vue-ui-circle-pack-Mpyhugsj.js} +6 -6
  37. package/dist/{vue-ui-cursor-NAIw30mO.js → vue-ui-cursor-DSM1Yx0w.js} +2 -2
  38. package/dist/{vue-ui-dashboard-W22IluaL.js → vue-ui-dashboard-DRzgS8bH.js} +62 -62
  39. package/dist/{vue-ui-digits-BvEwf4JI.js → vue-ui-digits-Cc0q_XUJ.js} +2 -2
  40. package/dist/{vue-ui-donut-Bta-E_EJ.js → vue-ui-donut-BcWb6mkK.js} +19 -19
  41. package/dist/{vue-ui-donut-evolution-BLNSoCwi.js → vue-ui-donut-evolution-DwGNKYA1.js} +8 -8
  42. package/dist/{vue-ui-dumbbell-BQu3zOec.js → vue-ui-dumbbell-ZyS0CtQ-.js} +7 -7
  43. package/dist/{vue-ui-flow-CsT8FX_C.js → vue-ui-flow-DcjaQvd5.js} +7 -7
  44. package/dist/{vue-ui-funnel-L18wphWh.js → vue-ui-funnel-DnPwnTbH.js} +6 -6
  45. package/dist/{vue-ui-galaxy-fdHsQUbR.js → vue-ui-galaxy-BUf27AcC.js} +5 -5
  46. package/dist/{vue-ui-gauge-BBaQNbeF.js → vue-ui-gauge-y52sZ03m.js} +6 -6
  47. package/dist/{vue-ui-gizmo-Cb74L98r.js → vue-ui-gizmo-CbOvKh62.js} +3 -3
  48. package/dist/{vue-ui-heatmap-Bs45BL94.js → vue-ui-heatmap-DFcG0beX.js} +312 -318
  49. package/dist/{vue-ui-history-plot-D5xwgxuT.js → vue-ui-history-plot-CrEafJoS.js} +7 -7
  50. package/dist/{vue-ui-kpi-d2S8__3L.js → vue-ui-kpi-B7xxS9iY.js} +3 -3
  51. package/dist/{vue-ui-mini-loader-ByNP8i6H.js → vue-ui-mini-loader-BOoPc7za.js} +2 -2
  52. package/dist/{vue-ui-molecule-DFECHTJM.js → vue-ui-molecule-DjLDHkE4.js} +5 -5
  53. package/dist/{vue-ui-mood-radar-C2f-hGt7.js → vue-ui-mood-radar-CDpRBAeI.js} +7 -7
  54. package/dist/{vue-ui-nested-donuts-BkZp7YQ7.js → vue-ui-nested-donuts-BB07uN8o.js} +9 -9
  55. package/dist/{vue-ui-onion-sEyGIxJh.js → vue-ui-onion-QtmsKAXa.js} +7 -7
  56. package/dist/{vue-ui-parallel-coordinate-plot-JC5eiVHp.js → vue-ui-parallel-coordinate-plot-C9igDR3-.js} +8 -8
  57. package/dist/{vue-ui-quadrant-sSBNovN6.js → vue-ui-quadrant-Bbyn8jqM.js} +8 -8
  58. package/dist/vue-ui-quick-chart-DpgVYsO_.js +1761 -0
  59. package/dist/{vue-ui-radar-BHhOC9kA.js → vue-ui-radar-BQtoJTN1.js} +7 -7
  60. package/dist/{vue-ui-rating-B8kgr0tD.js → vue-ui-rating-CayItUX5.js} +2 -2
  61. package/dist/{vue-ui-relation-circle-NVBHf3Ro.js → vue-ui-relation-circle-BQPvHFqF.js} +6 -6
  62. package/dist/{vue-ui-ridgeline-ASDvur5L.js → vue-ui-ridgeline-Djw8uzUc.js} +8 -8
  63. package/dist/{vue-ui-rings-C97YkY1L.js → vue-ui-rings-DdW9icm5.js} +8 -8
  64. package/dist/{vue-ui-scatter-C3GYlFs2.js → vue-ui-scatter-ko0ev9Hy.js} +8 -8
  65. package/dist/{vue-ui-skeleton-BGtcT66j.js → vue-ui-skeleton-Btfrm6Mb.js} +3 -3
  66. package/dist/{vue-ui-smiley-DIIPhk76.js → vue-ui-smiley-CscAe46K.js} +2 -2
  67. package/dist/{vue-ui-spark-trend-B0oiB1HI.js → vue-ui-spark-trend-DPo61M0c.js} +3 -3
  68. package/dist/{vue-ui-sparkbar-HEQwPqci.js → vue-ui-sparkbar-C3PmYQCw.js} +3 -3
  69. package/dist/{vue-ui-sparkgauge-CYq7uvkr.js → vue-ui-sparkgauge-BVeKIvzV.js} +3 -3
  70. package/dist/{vue-ui-sparkhistogram-CC0jgIM2.js → vue-ui-sparkhistogram-qQFd_Ahm.js} +4 -4
  71. package/dist/{vue-ui-sparkline-DkFn707d.js → vue-ui-sparkline-CS9mKrwW.js} +3 -3
  72. package/dist/{vue-ui-sparkstackbar-BQH_7kqj.js → vue-ui-sparkstackbar-CgQkP8A3.js} +3 -3
  73. package/dist/{vue-ui-stackbar-C1ZiF9u8.js → vue-ui-stackbar-emX2SvlM.js} +9 -9
  74. package/dist/{vue-ui-strip-plot-DsVjqkFe.js → vue-ui-strip-plot-BUBtGmhH.js} +7 -7
  75. package/dist/{vue-ui-table-TVnVtJAG.js → vue-ui-table-DHJ5c0TM.js} +3 -3
  76. package/dist/{vue-ui-table-heatmap-IuC4qjxQ.js → vue-ui-table-heatmap-YXVD2ajW.js} +5 -5
  77. package/dist/{vue-ui-table-sparkline-Di7rcfCp.js → vue-ui-table-sparkline-DehiyqPe.js} +4 -4
  78. package/dist/{vue-ui-thermometer-DoUtzm8y.js → vue-ui-thermometer-COQFOTU7.js} +6 -6
  79. package/dist/{vue-ui-timer-C6NN9Dp9.js → vue-ui-timer-DG3qPM0B.js} +5 -5
  80. package/dist/{vue-ui-tiremarks-D-dyCz2j.js → vue-ui-tiremarks-BSUFcLke.js} +6 -6
  81. package/dist/{vue-ui-treemap-91xJeG0F.js → vue-ui-treemap-BDLQFlzo.js} +8 -8
  82. package/dist/{vue-ui-vertical-bar-BiUb_W7m.js → vue-ui-vertical-bar-D37Bl2x2.js} +9 -9
  83. package/dist/{vue-ui-waffle-C6WcwTB7.js → vue-ui-waffle-CysJSES6.js} +8 -8
  84. package/dist/{vue-ui-wheel-ByOKs5in.js → vue-ui-wheel-Cm5g4KdO.js} +6 -6
  85. package/dist/{vue-ui-word-cloud-Dr4mZAqV.js → vue-ui-word-cloud-FEIoDTjf.js} +6 -6
  86. package/dist/{vue-ui-world-DRsAnAD3.js → vue-ui-world-CQxuqljX.js} +6 -6
  87. package/dist/vue-ui-xy-TBO42wxL.js +3755 -0
  88. package/dist/{vue-ui-xy-canvas-DoIboNfE.js → vue-ui-xy-canvas-DyPds5xu.js} +8 -8
  89. package/package.json +1 -1
  90. package/dist/vue-ui-bullet-cjmFokeG.js +0 -513
  91. package/dist/vue-ui-quick-chart-eVp8EGMt.js +0 -1616
  92. package/dist/vue-ui-xy-Cyp2iGkS.js +0 -3742
@@ -1,1616 +0,0 @@
1
- import { defineAsyncComponent as ce, ref as z, computed as U, watch as Be, shallowRef as ht, onMounted as Tt, onBeforeUnmount as Pt, nextTick as ft, createElementBlock as l, openBlock as a, normalizeStyle as R, normalizeClass as he, createBlock as Re, createCommentVNode as g, createVNode as fe, unref as f, createSlots as Rt, withCtx as G, renderSlot as M, normalizeProps as ie, guardReactiveProps as ue, toDisplayString as O, createElementVNode as _, Fragment as m, renderList as $, mergeProps as De } from "vue";
2
- import { u as Mt, c as Ft, t as Nt, p as q, a as Ut, C as gt, b as Bt, G as Dt, e as Vt, d as Ve, m as qt, D as mt, X as Ht, j as Wt, k as qe, n as _e, i as X, f as D, I as jt, V as pt, v as Z, x as Me, y as He } from "./index-enA2Fisu.js";
3
- import { t as Gt, u as Xt } from "./useResponsive-DfdjqQps.js";
4
- import { u as yt } from "./useNestedProp-Crm1jYNw.js";
5
- import { u as Zt } from "./usePrinter-Bh6HKGit.js";
6
- import { u as Yt } from "./useChartAccessibility-9icAAmYg.js";
7
- import { S as Jt } from "./Slicer-BBfWOoWo.js";
8
- import { u as Qt } from "./useTimeLabels-DkzmKfZn.js";
9
- import Kt from "./img-Bv894v6P.js";
10
- import { _ as ea } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
- const A = {
12
- LINE: "LINE",
13
- BAR: "BAR",
14
- DONUT: "DONUT"
15
- }, ta = ["SERIE", "SERIES", "DATA", "VALUE", "VALUES", "NUM"];
16
- function aa({ dataset: c, barLineSwitch: C = 6 }) {
17
- let y = null, T = null, H = 0;
18
- if ((typeof c == "number" || typeof c == "string") && console.warn(`The provided dataset (${c}) is not sufficient to build a chart`), Le(c) && (Y(c) && (c.length < C ? y = A.BAR : y = A.LINE, T = c, H = c.length), Fe(c))) {
19
- if (!oa(c))
20
- return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."), !1;
21
- const pe = Object.keys(c[0]), ze = Object.values(c[0]);
22
- if (!pe.some((F) => na(F)))
23
- 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;
24
- xt(ze, (F) => typeof F == "number") && (y = A.DONUT, T = c), xt(ze, (F) => Array.isArray(F) && Y(F)) && (kt(c) > C ? y = A.LINE : y = A.BAR, H = kt(c), T = c.map((F) => ({
25
- ...F,
26
- data: ia(F, (B) => Y(B))
27
- }))), c = c.map((F) => bt(F)), T = T.map((F) => bt(F));
28
- }
29
- return Le(c) && [...new Set(c.flatMap((pe) => Array.isArray(pe)))][0], {
30
- dataset: c,
31
- type: y,
32
- usableDataset: T,
33
- maxSeriesLength: H
34
- };
35
- }
36
- function St(c) {
37
- return !c || Le(c) && !c.length;
38
- }
39
- function Le(c) {
40
- return Array.isArray(c);
41
- }
42
- function Y(c) {
43
- if (!Le(c) || St(c)) return !1;
44
- const C = c.map((y) => Number(y));
45
- return ![...new Set(C.flatMap((y) => typeof y == "number" && !isNaN(y)))].includes(!1);
46
- }
47
- function Fe(c) {
48
- return !Le(c) || St(c) || !![...new Set(c.flatMap((y) => typeof y == "object" && !Array.isArray(y)))].includes(!1) ? !1 : !c.map((y) => Object.keys(y).length > 0).includes(!1);
49
- }
50
- function la(c, C) {
51
- const y = Object.keys(c).sort(), T = Object.keys(C).sort();
52
- if (y.length !== T.length)
53
- return !1;
54
- for (let H = 0; H < y.length; H += 1) {
55
- const ge = y[H], me = T[H];
56
- if (ge !== me || typeof c[ge] != typeof C[me])
57
- return !1;
58
- }
59
- return !0;
60
- }
61
- function oa(c) {
62
- if (c.length <= 1) return !0;
63
- for (let C = 0; C < c.length; C += 1)
64
- for (let y = C + 1; y < c.length; y += 1)
65
- if (!la(c[C], c[y]))
66
- return !1;
67
- return !0;
68
- }
69
- function na(c) {
70
- return ta.includes(c.toUpperCase());
71
- }
72
- function xt(c, C) {
73
- let y = [];
74
- for (let T = 0; T < c.length; T += 1)
75
- y.push(C(c[T]));
76
- return y.includes(!0);
77
- }
78
- function kt(c) {
79
- return Math.max(...[...c].flatMap((C) => Object.values(C).filter((y) => Y(y)).map((y) => y.length)));
80
- }
81
- function ia(c, C) {
82
- return Object.values(c).filter((y) => C(y))[0];
83
- }
84
- function bt(c) {
85
- const C = {};
86
- for (let y in c)
87
- c.hasOwnProperty(y) && (C[y.toUpperCase()] = c[y]);
88
- return C;
89
- }
90
- const ua = ["id"], ra = ["xmlns", "viewBox"], sa = ["x", "y", "width", "height"], va = ["x", "y", "width", "height"], da = ["width", "height"], ca = ["id"], ha = ["id"], fa = ["id"], ga = ["flood-color"], ma = {
91
- key: 0,
92
- class: "donut-label-connectors"
93
- }, pa = ["d", "stroke", "stroke-width", "filter"], ya = ["cx", "cy", "r", "fill", "filter"], xa = { class: "donut" }, ka = ["d", "fill", "stroke", "stroke-width", "filter"], ba = ["d", "onMouseenter", "onClick"], Sa = {
94
- key: 1,
95
- class: "donut-labels quick-animation"
96
- }, wa = ["cx", "cy", "fill", "stroke", "filter"], Aa = ["text-anchor", "x", "y", "fill", "font-size", "filter"], _a = ["text-anchor", "x", "y", "fill", "font-size", "filter"], La = {
97
- key: 2,
98
- class: "donut-hollow quick-animation"
99
- }, za = ["x", "y", "font-size", "fill"], $a = ["x", "y", "font-size", "fill"], Ca = {
100
- key: 0,
101
- class: "line-grid"
102
- }, Ia = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ea = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Oa = {
103
- key: 1,
104
- class: "line-axis"
105
- }, Ta = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Pa = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ra = {
106
- key: 2,
107
- class: "yLabels"
108
- }, Ma = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Fa = ["x", "y", "font-size", "fill"], Na = {
109
- key: 3,
110
- class: "periodLabels"
111
- }, Ua = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ba = { key: 1 }, Da = ["font-size", "text-anchor", "fill", "transform"], Va = ["font-size", "text-anchor", "fill", "transform", "innerHTML"], qa = { class: "plots" }, Ha = { class: "line-plot-series" }, Wa = ["d", "stroke", "stroke-width"], ja = ["d", "stroke", "stroke-width"], Ga = ["d", "stroke", "stroke-width"], Xa = ["d", "stroke", "stroke-width"], Za = ["cx", "cy", "fill", "stroke"], Ya = {
112
- key: 4,
113
- class: "dataLabels"
114
- }, Ja = ["font-size", "fill", "x", "y"], Qa = { class: "tooltip-traps" }, Ka = ["x", "y", "height", "width", "fill", "onMouseenter", "onClick"], el = {
115
- key: 0,
116
- class: "line-grid"
117
- }, tl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], al = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ll = {
118
- key: 1,
119
- class: "line-axis"
120
- }, ol = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], nl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], il = {
121
- key: 2,
122
- class: "yLabels"
123
- }, ul = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], rl = ["x", "y", "font-size", "fill"], sl = {
124
- key: 3,
125
- class: "periodLabels"
126
- }, vl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], dl = ["font-size", "text-anchor", "transform", "fill"], cl = { class: "plots" }, hl = ["x", "width", "height", "y", "fill", "stroke", "stroke-width"], fl = ["to"], gl = ["from", "to"], ml = {
127
- key: 4,
128
- class: "dataLabels"
129
- }, pl = ["x", "y", "font-size", "fill"], yl = { class: "tooltip-traps" }, xl = ["x", "y", "height", "width", "fill", "onMouseenter", "onClick"], kl = {
130
- key: 6,
131
- class: "axis-labels"
132
- }, bl = { key: 0 }, Sl = ["font-size", "fill", "x", "y"], wl = { key: 1 }, Al = ["font-size", "fill", "x", "y"], _l = { key: 2 }, Ll = ["font-size", "fill", "transform"], zl = { key: 3 }, $l = ["font-size", "fill", "transform"], Cl = {
133
- key: 6,
134
- class: "vue-data-ui-watermark"
135
- }, Il = ["onClick"], El = ["onClick"], Ol = ["onClick"], Tl = {
136
- key: 1,
137
- class: "vue-ui-quick-chart-not-processable"
138
- }, Pl = {
139
- __name: "vue-ui-quick-chart",
140
- props: {
141
- config: {
142
- type: Object,
143
- default() {
144
- return {};
145
- }
146
- },
147
- dataset: {
148
- type: [Array, Object, String, Number],
149
- default() {
150
- return null;
151
- }
152
- }
153
- },
154
- emits: ["selectDatapoint", "selectLegend"],
155
- setup(c, { expose: C, emit: y }) {
156
- const T = ce(() => import("./BaseIcon-CKP5mFx_.js")), H = ce(() => import("./PackageVersion-DOtis8zH.js")), ge = ce(() => import("./PenAndPaper-XC3SNbgm.js")), me = ce(() => import("./vue-ui-skeleton-BGtcT66j.js")), pe = ce(() => import("./Tooltip-DzK1HoFb.js")), ze = ce(() => import("./UserOptions-Dy6QIYd1.js")), { vue_ui_quick_chart: F } = Mt(), B = c, J = z(null), We = z(null), je = z(null), Ge = z(null), Q = z(Ft()), te = z(!1), ye = z(null), ae = z(""), W = z(null), Xe = z(null), Ze = z(null), w = z([]), Ye = z(0), $e = z(0), e = U({
157
- get: () => et(),
158
- set: (o) => o
159
- }), { svgRef: Je } = Yt({ config: { text: e.value.title } }), wt = U(() => e.value.showUserOptionsOnChartHover), Qe = U(() => e.value.keepUserOptionsStateOnChartLeave), Ce = z(!e.value.showUserOptionsOnChartHover);
160
- function Ke(o = !1) {
161
- wt.value && (Ce.value = o);
162
- }
163
- function et() {
164
- const o = yt({
165
- userConfig: B.config,
166
- defaultConfig: F
167
- });
168
- let r = {};
169
- return o.theme ? r = {
170
- ...yt({
171
- userConfig: Ut.vue_ui_quick_chart[o.theme] || B.config,
172
- defaultConfig: o
173
- }),
174
- customPalette: Nt[o.theme] || q
175
- } : r = o, B.config && gt(B.config, "zoomStartIndex") ? r.zoomStartIndex = B.config.zoomStartIndex : r.zoomStartIndex = null, B.config && gt(B.config, "zoomEndIndex") ? r.zoomEndIndex = B.config.zoomEndIndex : r.zoomEndIndex = null, r;
176
- }
177
- Be(() => B.config, (o) => {
178
- e.value = et(), b.value.width = e.value.width, b.value.height = e.value.height, Ce.value = !e.value.showUserOptionsOnChartHover, lt(), be.value.showTooltip = e.value.showTooltip;
179
- }, { deep: !0 }), Be(() => B.dataset, (o) => {
180
- p.value = ke.value, x.value.start = 0, x.value.end = p.value.maxSeriesLength, $e.value += 1;
181
- }, { deep: !0 });
182
- const xe = U(() => Bt(e.value.customPalette)), re = y, ke = U(() => {
183
- const o = aa({ dataset: Dt(B.dataset, [
184
- "serie",
185
- "series",
186
- "data",
187
- "value",
188
- "values",
189
- "num"
190
- ]), barLineSwitch: e.value.chartIsBarUnderDatasetLength });
191
- return o || console.error("VueUiQuickChart : Dataset is not processable"), o;
192
- }), p = z(ke.value), At = U(() => !!p.value), L = U(() => p.value ? p.value.type : null);
193
- Be(() => L.value, (o) => {
194
- o || Vt({
195
- componentName: "VueUiQuickChart",
196
- type: "dataset"
197
- });
198
- }, { immediate: !0 });
199
- const { isPrinting: Ie, isImaging: Ee, generatePdf: tt, generateImage: at } = Zt({
200
- elementId: `${L.value}_${Q.value}`,
201
- fileName: e.value.title || L.value,
202
- options: e.value.userOptionsPrint
203
- }), _t = U(() => e.value.showUserOptions && !e.value.title), b = z({
204
- width: e.value.width,
205
- height: e.value.height
206
- }), be = z({
207
- showTooltip: e.value.showTooltip
208
- }), K = ht(null), se = ht(null);
209
- Tt(() => {
210
- lt();
211
- });
212
- function lt() {
213
- if (e.value.responsive) {
214
- const o = Gt(() => {
215
- const { width: r, height: t } = Xt({
216
- chart: J.value,
217
- title: e.value.title ? We.value : null,
218
- legend: e.value.showLegend ? je.value : null,
219
- slicer: [A.BAR, A.LINE].includes(L.value) && e.value.zoomXy && p.value.maxSeriesLength > 1 ? Ge.value : null,
220
- source: Xe.value,
221
- noTitle: Ze.value
222
- });
223
- requestAnimationFrame(() => {
224
- b.value.width = r, b.value.height = t;
225
- });
226
- });
227
- K.value && (se.value && K.value.unobserve(se.value), K.value.disconnect()), K.value = new ResizeObserver(o), se.value = J.value.parentNode, K.value.observe(se.value);
228
- }
229
- vt();
230
- }
231
- Pt(() => {
232
- K.value && (se.value && K.value.unobserve(se.value), K.value.disconnect());
233
- });
234
- const Lt = U(() => {
235
- switch (L.value) {
236
- case A.LINE:
237
- return `0 0 ${b.value.width <= 0 ? 10 : b.value.width} ${b.value.height <= 0 ? 10 : b.value.height}`;
238
- case A.BAR:
239
- return `0 0 ${b.value.width <= 0 ? 10 : b.value.width} ${b.value.height <= 0 ? 10 : b.value.height}`;
240
- case A.DONUT:
241
- return `0 0 ${b.value.width <= 0 ? 10 : b.value.width} ${b.value.height <= 0 ? 10 : b.value.height}`;
242
- default:
243
- return `0 0 ${b.value.width <= 0 ? 10 : b.value.width} ${b.value.height <= 0 ? 10 : b.value.height}`;
244
- }
245
- });
246
- function ot(o) {
247
- return [...o].map((r) => r.value).reduce((r, t) => r + t, 0);
248
- }
249
- function Se(o) {
250
- return e.value.blurOnHover && ![null, void 0].includes(W.value) && W.value !== o ? `url(#blur_${Q.value})` : "";
251
- }
252
- function nt(o, r) {
253
- w.value.includes(o) ? w.value = w.value.filter((t) => t !== o) : w.value.length < r && w.value.push(o);
254
- }
255
- const it = z(null), ut = z(null), Oe = z(!1);
256
- function zt(o, r) {
257
- Oe.value = !0;
258
- let t = o.value;
259
- const u = ke.value.dataset.find((s, h) => o.id === `donut_${h}`).VALUE;
260
- if (w.value.includes(o.id)) {
261
- let s = function() {
262
- t > u ? (Oe.value = !1, cancelAnimationFrame(ut.value), p.value = {
263
- ...p.value,
264
- dataset: p.value.dataset.map((h, P) => o.id === `donut_${P}` ? {
265
- ...h,
266
- value: u,
267
- VALUE: u
268
- } : h)
269
- }) : (t += u * 0.025, p.value = {
270
- ...p.value,
271
- dataset: p.value.dataset.map((h, P) => o.id === `donut_${P}` ? {
272
- ...h,
273
- value: t,
274
- VALUE: t
275
- } : h)
276
- }, ut.value = requestAnimationFrame(s));
277
- };
278
- w.value = w.value.filter((h) => h !== o.id), s();
279
- } else if (r.length > 1) {
280
- let s = function() {
281
- t < u / 100 ? (Oe.value = !1, cancelAnimationFrame(it.value), w.value.push(o.id), p.value = {
282
- ...p.value,
283
- dataset: p.value.dataset.map((h, P) => o.id === `donut_${P}` ? {
284
- ...h,
285
- value: 0,
286
- VALUE: 0
287
- } : h)
288
- }) : (t /= 1.1, p.value = {
289
- ...p.value,
290
- dataset: p.value.dataset.map((h, P) => o.id === `donut_${P}` ? {
291
- ...h,
292
- value: t,
293
- VALUE: t
294
- } : h)
295
- }, it.value = requestAnimationFrame(s));
296
- };
297
- s();
298
- }
299
- }
300
- const j = z(null);
301
- function $t(o) {
302
- j.value = o;
303
- }
304
- const rt = U(() => e.value.donutThicknessRatio < 0.15 ? 0.15 : e.value.donutThicknessRatio > 0.4 ? 0.4 : e.value.donutThicknessRatio), I = U(() => {
305
- if (L.value !== A.DONUT) return null;
306
- const o = p.value.dataset.map((n, i) => ({
307
- ...n,
308
- value: n.VALUE || n.DATA || n.SERIE || n.VALUES || n.NUM || 0,
309
- name: n.NAME || n.DESCRIPTION || n.TITLE || n.LABEL || `Serie ${i}`,
310
- id: `donut_${i}`
311
- })).map((n, i) => ({
312
- ...n,
313
- color: n.COLOR ? Ve(n.COLOR) : xe.value[i + e.value.paletteStartIndex] || q[i + e.value.paletteStartIndex] || q[(i + e.value.paletteStartIndex) % q.length],
314
- immutableValue: n.value
315
- }));
316
- function r(n, i) {
317
- return D({
318
- v: isNaN(n.value / ot(i)) ? 0 : n.value / ot(i) * 100,
319
- s: "%",
320
- r: e.value.dataLabelRoundingPercentage
321
- });
322
- }
323
- function t(n) {
324
- return n.proportion * 100 > e.value.donutHideLabelUnderPercentage;
325
- }
326
- function u(n, i) {
327
- const S = ke.value.dataset.find((E, N) => `donut_${N}` === n).VALUE;
328
- return Math.abs(String(Number(S.toFixed(0))).length - String(Number(i.toFixed(0))).length);
329
- }
330
- function s({ datapoint: n, seriesIndex: i }) {
331
- ye.value = { datapoint: n, seriesIndex: i, config: e.value, dataset: o }, W.value = n.id;
332
- const S = e.value.tooltipCustomFormat;
333
- if (Me(S) && He(() => S({
334
- datapoint: n,
335
- seriesIndex: i,
336
- series: o,
337
- config: e.value
338
- })))
339
- ae.value = S({
340
- datapoint: n,
341
- seriesIndex: i,
342
- series: o,
343
- config: e.value
344
- });
345
- else {
346
- let k = "";
347
- k += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${n.name}</div>`, k += `<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="${n.color}"/></svg>`, k += `<b>${X(
348
- e.value.formatter,
349
- n.value,
350
- D({
351
- p: e.value.valuePrefix,
352
- v: n.value,
353
- s: e.value.valueSuffix,
354
- r: e.value.dataLabelRoundingValue
355
- }),
356
- { datapoint: n, seriesIndex: i }
357
- )}</b>`, k += `<span>(${D({ v: n.proportion * 100, s: "%", r: e.value.dataLabelRoundingPercentage })})</span></div>`, ae.value = `<div>${k}</div>`;
358
- }
359
- te.value = !0;
360
- }
361
- function h() {
362
- te.value = !1, W.value = null, j.value = null;
363
- }
364
- const P = {
365
- centerX: b.value.width / 2,
366
- centerY: b.value.height / 2
367
- }, V = o.filter((n) => !w.value.includes(n.id)).map((n) => n.value || 0).reduce((n, i) => n + i, 0), ve = o.map((n, i) => ({
368
- ...n,
369
- proportion: (n.value || 0) / V,
370
- value: n.value || 0,
371
- absoluteValue: ke.value.dataset.find((S, k) => `donut_${k}` === n.id).VALUE
372
- })), le = b.value.width / 2, de = b.value.height / 2, oe = b.value.height * e.value.donutRadiusRatio;
373
- return {
374
- dataset: ve.filter((n) => !w.value.includes(n.id)),
375
- legend: ve,
376
- drawingArea: P,
377
- displayArcPercentage: r,
378
- isArcBigEnough: t,
379
- useTooltip: s,
380
- killTooltip: h,
381
- getSpaces: u,
382
- total: V,
383
- cx: le,
384
- cy: de,
385
- radius: oe,
386
- chart: qt(
387
- { series: o.filter((n) => !w.value.includes(n.id)) },
388
- le,
389
- de,
390
- oe,
391
- oe,
392
- 1.99999,
393
- 2,
394
- 1,
395
- 360,
396
- 105.25,
397
- b.value.height * rt.value
398
- )
399
- };
400
- }), x = z({
401
- start: 0,
402
- end: p.value.maxSeriesLength
403
- });
404
- function Ct() {
405
- vt();
406
- }
407
- const st = z(null);
408
- async function vt() {
409
- await ft(), await ft();
410
- const { zoomStartIndex: o, zoomEndIndex: r } = e.value, t = st.value;
411
- (o != null || r != null) && t ? (o != null && t.setStartValue(o), r != null && t.setEndValue(It(r + 1))) : (x.value = {
412
- start: 0,
413
- end: p.value.maxSeriesLength
414
- }, $e.value += 1);
415
- }
416
- function It(o) {
417
- const r = p.value.maxSeriesLength;
418
- return o > r ? r : o < 0 || e.value.zoomStartIndex !== null && o < e.value.zoomStartIndex ? e.value.zoomStartIndex !== null ? e.value.zoomStartIndex + 1 : 1 : o;
419
- }
420
- const Et = U(() => {
421
- if (!e.value.zoomMinimap.show || L.value === A.DONUT) return [];
422
- let o = [];
423
- Y(p.value.dataset) && (o = p.value.dataset), Fe(p.value.dataset) && (o = p.value.dataset.map((s, h) => ({
424
- values: s.VALUE || s.DATA || s.SERIE || s.SERIES || s.VALUES || s.NUM || 0,
425
- id: L.value === A.LINE ? `line_${h}` : `bar_${h}`
426
- })).filter((s) => !w.value.includes(s.id)));
427
- const r = Y(o) ? o.length : Math.max(...o.map((s) => s.values.length));
428
- let t = [];
429
- if (Y(o))
430
- t = o;
431
- else
432
- for (let s = 0; s < r; s += 1)
433
- t.push(o.map((h) => h.values[s] || 0).reduce((h, P) => (h || 0) + (P || 0), 0));
434
- const u = Math.min(...t);
435
- return t.map((s) => s + (u < 0 ? Math.abs(u) : 0));
436
- }), v = U(() => {
437
- if (L.value !== A.LINE) return null;
438
- const o = {
439
- height: b.value.height,
440
- width: b.value.width
441
- }, r = {
442
- left: e.value.xyPaddingLeft,
443
- top: e.value.xyPaddingTop,
444
- right: o.width - e.value.xyPaddingRight,
445
- bottom: o.height - e.value.xyPaddingBottom,
446
- width: o.width - e.value.xyPaddingLeft - e.value.xyPaddingRight,
447
- height: o.height - e.value.xyPaddingTop - e.value.xyPaddingBottom
448
- };
449
- let t = [];
450
- Y(p.value.dataset) && (t = [
451
- {
452
- values: p.value.dataset.slice(x.value.start, x.value.end),
453
- absoluteIndices: p.value.dataset.map((n, i) => i).slice(x.value.start, x.value.end),
454
- name: e.value.title,
455
- color: xe.value[e.value.paletteStartIndex] || q[e.value.paletteStartIndex],
456
- id: "line_0"
457
- }
458
- ]), Fe(p.value.dataset) && (t = p.value.dataset.map((n, i) => ({
459
- ...n,
460
- values: n.VALUE || n.DATA || n.SERIE || n.SERIES || n.VALUES || n.NUM || 0,
461
- name: n.NAME || n.DESCRIPTION || n.TITLE || n.LABEL || `Serie ${i}`,
462
- id: `line_${i}`
463
- })).map((n, i) => ({
464
- ...n,
465
- color: n.COLOR ? Ve(n.COLOR) : xe.value[i + e.value.paletteStartIndex] || q[i + e.value.paletteStartIndex] || q[(i + e.value.paletteStartIndex) % q.length],
466
- values: n.values.slice(x.value.start, x.value.end),
467
- absoluteIndices: n.values.map((S, k) => k).slice(x.value.start, x.value.end)
468
- })));
469
- const u = {
470
- max: Math.max(...t.filter((n) => !w.value.includes(n.id)).flatMap((n) => n.values)),
471
- min: Math.min(...t.filter((n) => !w.value.includes(n.id)).flatMap((n) => n.values)),
472
- maxSeries: Math.max(...t.map((n) => n.values.length))
473
- }, s = mt(u.min < 0 ? u.min : 0, u.max < 0 ? 0 : u.max, e.value.xyScaleSegments), h = u.min < 0 ? Math.abs(u.min) : 0, P = u.max < 0 ? r.top : r.bottom - h / (s.max + h) * r.height, V = r.width / u.maxSeries, ve = s.ticks.map((n) => ({
474
- y: r.bottom - r.height * ((n + h) / (s.max + h)),
475
- x: r.left - 8,
476
- value: n
477
- })), le = t.map((n, i) => ({
478
- ...n,
479
- coordinates: n.values.map((S, k) => ({
480
- x: r.left + V * (k + 1) - V / 2,
481
- y: r.bottom - (S + h) / (s.max + h) * r.height,
482
- value: S
483
- }))
484
- })).map((n) => {
485
- let i = [];
486
- return n.coordinates.forEach((S) => {
487
- i.push(`${S.x},${S.y} `);
488
- }), {
489
- ...n,
490
- linePath: i.join(" ")
491
- };
492
- });
493
- function de(n) {
494
- W.value = n, j.value = n;
495
- const i = t.map((k) => ({
496
- ...k,
497
- value: k.values[n],
498
- absoluteIndex: k.absoluteIndices[n]
499
- })).filter((k) => !w.value.includes(k.id));
500
- ye.value = { datapoint: i, seriesIndex: n, config: e.value, dataset: t };
501
- const S = e.value.tooltipCustomFormat;
502
- if (Me(S) && He(() => S({
503
- datapoint: i,
504
- seriesIndex: n,
505
- series: t,
506
- config: e.value
507
- })))
508
- ae.value = S({
509
- datapoint: i,
510
- seriesIndex: n,
511
- series: t,
512
- config: e.value
513
- });
514
- else {
515
- let k = "";
516
- ee.value[i[0].absoluteIndex] && (k += `<div style="border-bottom:1px solid ${e.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${ee.value[i[0].absoluteIndex].text}</div>`), i.forEach((E, N) => {
517
- k += `
518
- <div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
519
- <svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${E.color}"/></svg>
520
- <span>${E.name}:</span>
521
- <b>${X(
522
- e.value.formatter,
523
- E.value,
524
- D({
525
- p: e.value.valuePrefix,
526
- v: E.value,
527
- s: e.value.valueSuffix,
528
- r: e.value.dataLabelRoundingValue
529
- }),
530
- { datapoint: E, seriesIndex: N }
531
- )}
532
- </b>
533
- </div>
534
- `;
535
- }), ae.value = k;
536
- }
537
- te.value = !0;
538
- }
539
- function oe() {
540
- W.value = null, j.value = null, te.value = !1;
541
- }
542
- return {
543
- absoluteZero: P,
544
- dataset: le.filter((n) => !w.value.includes(n.id)),
545
- legend: le,
546
- drawingArea: r,
547
- extremes: u,
548
- slotSize: V,
549
- yLabels: ve,
550
- useTooltip: de,
551
- killTooltip: oe
552
- };
553
- }), d = U(() => {
554
- if (L.value !== A.BAR) return null;
555
- const o = {
556
- height: b.value.height,
557
- width: b.value.width
558
- }, r = {
559
- left: e.value.xyPaddingLeft,
560
- top: e.value.xyPaddingTop,
561
- right: o.width - e.value.xyPaddingRight,
562
- bottom: o.height - e.value.xyPaddingBottom,
563
- width: o.width - e.value.xyPaddingLeft - e.value.xyPaddingRight,
564
- height: o.height - e.value.xyPaddingTop - e.value.xyPaddingBottom
565
- };
566
- let t = [];
567
- Y(p.value.dataset) && (t = [
568
- {
569
- values: p.value.dataset.slice(x.value.start, x.value.end),
570
- absoluteIndices: p.value.dataset.map((i, S) => S).slice(x.value.start, x.value.end),
571
- name: e.value.title,
572
- color: xe.value[e.value.paletteStartIndex] || q[e.value.paletteStartIndex],
573
- id: "bar_0"
574
- }
575
- ]), Fe(p.value.dataset) && (t = p.value.dataset.map((i, S) => ({
576
- ...i,
577
- values: i.VALUE || i.DATA || i.SERIE || i.SERIES || i.VALUES || i.NUM || 0,
578
- name: i.NAME || i.DESCRIPTION || i.TITLE || i.LABEL || `Serie ${S}`,
579
- id: `bar_${S}`
580
- })).map((i, S) => ({
581
- ...i,
582
- color: i.COLOR ? Ve(i.COLOR) : xe.value[S + e.value.paletteStartIndex] || q[S + e.value.paletteStartIndex] || q[(S + e.value.paletteStartIndex) % q.length],
583
- values: i.values.slice(x.value.start, x.value.end),
584
- absoluteIndices: i.values.map((k, E) => E).slice(x.value.start, x.value.end)
585
- })));
586
- const u = {
587
- 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)),
588
- min: Math.min(...t.filter((i) => !w.value.includes(i.id)).flatMap((i) => i.values)),
589
- maxSeries: Math.max(...t.filter((i) => !w.value.includes(i.id)).map((i) => i.values.length))
590
- }, s = mt(u.min < 0 ? u.min : 0, u.max, e.value.xyScaleSegments), h = s.min < 0 ? Math.abs(s.min) : 0, P = r.bottom - h / (s.max + h) * r.height, V = r.width / u.maxSeries, ve = s.ticks.map((i) => ({
591
- y: r.bottom - r.height * ((i + h) / (s.max + h)),
592
- x: r.left - 8,
593
- value: i
594
- })), le = t.map((i, S) => ({
595
- ...i,
596
- coordinates: i.values.map((k, E) => {
597
- const N = (k + h) / (u.max + h) * r.height, we = Math.abs(k) / Math.abs(u.min) * (r.height - P), Ue = h / (u.max + h) * r.height, Ae = V / t.filter((ne) => !w.value.includes(ne.id)).length - e.value.barGap / t.filter((ne) => !w.value.includes(ne.id)).length;
598
- return {
599
- x: r.left + V * E + Ae * S + e.value.barGap / 2,
600
- y: k > 0 ? r.bottom - N : P,
601
- height: k > 0 ? N - Ue : we,
602
- value: k,
603
- width: Ae
604
- };
605
- })
606
- })), de = t.filter((i) => !w.value.includes(i.id)).map((i, S) => ({
607
- ...i,
608
- coordinates: i.values.map((k, E) => {
609
- const N = (k + h) / (u.max + h) * r.height, we = Math.abs(k) / (u.max + h) * r.height, Ue = h / (u.max + h) * r.height, Ae = V / t.filter((ne) => !w.value.includes(ne.id)).length - e.value.barGap / t.filter((ne) => !w.value.includes(ne.id)).length;
610
- return {
611
- x: r.left + V * E + Ae * S + e.value.barGap / 2,
612
- y: k > 0 ? r.bottom - N : P,
613
- height: k > 0 ? N - Ue : we,
614
- value: k,
615
- width: Ae
616
- };
617
- })
618
- }));
619
- function oe(i) {
620
- W.value = i, j.value = i;
621
- const S = t.map((E) => ({
622
- ...E,
623
- value: E.values[i],
624
- absoluteIndex: E.absoluteIndices[i]
625
- })).filter((E) => !w.value.includes(E.id));
626
- ye.value = { datapoint: S, seriesIndex: i, config: e.value, dataset: t };
627
- const k = e.value.tooltipCustomFormat;
628
- if (Me(k) && He(() => k({
629
- datapoint: S,
630
- seriesIndex: i,
631
- series: t,
632
- config: e.value
633
- })))
634
- ae.value = k({
635
- point: S,
636
- seriesIndex: i,
637
- series: t,
638
- config: e.value
639
- });
640
- else {
641
- let E = "";
642
- ee.value[S[0].absoluteIndex] && (E += `<div style="border-bottom:1px solid ${e.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${ee.value[S[0].absoluteIndex].text}</div>`), S.forEach((N, we) => {
643
- E += `
644
- <div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
645
- <svg viewBox="0 0 12 12" height="14" width="12"><rect x=0 y="0" width="12" height="12" rx="1" stroke="none" fill="${N.color}"/></svg>
646
- <span>${N.name}:</span>
647
- <b>${X(
648
- e.value.formatter,
649
- N.value,
650
- D({
651
- p: e.value.valuePrefix,
652
- v: N.value,
653
- s: e.value.valueSuffix,
654
- r: e.value.dataLabelRoundingValue
655
- }),
656
- { datapoint: N, seriesIndex: we }
657
- )}
658
- </b>
659
- </div>
660
- `;
661
- }), ae.value = E;
662
- }
663
- te.value = !0;
664
- }
665
- function n() {
666
- te.value = !1, W.value = null, j.value = null;
667
- }
668
- return {
669
- absoluteZero: P,
670
- dataset: de.filter((i) => !w.value.includes(i.id)),
671
- legend: le,
672
- drawingArea: r,
673
- extremes: u,
674
- slotSize: V,
675
- yLabels: ve,
676
- useTooltip: oe,
677
- killTooltip: n
678
- };
679
- }), ee = U(() => Qt({
680
- values: e.value.xyPeriods,
681
- maxDatapoints: p.value.maxSeriesLength,
682
- formatter: e.value.datetimeFormatter,
683
- start: x.value.start,
684
- end: x.value.end
685
- })), Te = z(!1);
686
- function dt(o) {
687
- Te.value = o, Ye.value += 1;
688
- }
689
- function ct() {
690
- be.value.showTooltip = !be.value.showTooltip;
691
- }
692
- const Pe = z(!1);
693
- function Ne() {
694
- Pe.value = !Pe.value;
695
- }
696
- async function Ot({ scale: o = 2 } = {}) {
697
- if (!J.value) return;
698
- const { width: r, height: t } = J.value.getBoundingClientRect(), u = r / t, { imageUri: s, base64: h } = await Kt({ domElement: J.value, base64: !0, img: !0, scale: o });
699
- return {
700
- imageUri: s,
701
- base64: h,
702
- title: e.value.title,
703
- width: r,
704
- height: t,
705
- aspectRatio: u
706
- };
707
- }
708
- return C({
709
- getImage: Ot,
710
- generatePdf: tt,
711
- generateImage: at,
712
- toggleTooltip: ct,
713
- toggleAnnotator: Ne,
714
- toggleFullscreen: dt
715
- }), (o, r) => At.value ? (a(), l("div", {
716
- key: 0,
717
- id: `${L.value}_${Q.value}`,
718
- ref_key: "quickChart",
719
- ref: J,
720
- class: he({ "vue-ui-quick-chart": !0, "vue-data-ui-wrapper-fullscreen": Te.value }),
721
- style: R(`background:${e.value.backgroundColor};color:${e.value.color};font-family:${e.value.fontFamily}; position: relative; ${e.value.responsive ? "height: 100%" : ""}`),
722
- onMouseenter: r[5] || (r[5] = () => Ke(!0)),
723
- onMouseleave: r[6] || (r[6] = () => Ke(!1))
724
- }, [
725
- e.value.userOptionsButtons.annotator ? (a(), Re(f(ge), {
726
- key: 0,
727
- svgRef: f(Je),
728
- backgroundColor: e.value.backgroundColor,
729
- color: e.value.color,
730
- active: Pe.value,
731
- onClose: Ne
732
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : g("", !0),
733
- _t.value ? (a(), l("div", {
734
- key: 1,
735
- ref_key: "noTitle",
736
- ref: Ze,
737
- class: "vue-data-ui-no-title-space",
738
- style: "height:36px; width: 100%;background:transparent"
739
- }, null, 512)) : g("", !0),
740
- e.value.showUserOptions && (Qe.value || Ce.value) ? (a(), Re(f(ze), {
741
- ref: "details",
742
- key: `user_option_${Ye.value}`,
743
- backgroundColor: e.value.backgroundColor,
744
- color: e.value.color,
745
- isPrinting: f(Ie),
746
- isImaging: f(Ee),
747
- uid: Q.value,
748
- hasTooltip: e.value.userOptionsButtons.tooltip && e.value.showTooltip,
749
- hasPdf: e.value.userOptionsButtons.pdf,
750
- hasImg: e.value.userOptionsButtons.img,
751
- hasFullscreen: e.value.userOptionsButtons.fullscreen,
752
- hasXls: !1,
753
- isTooltip: be.value.showTooltip,
754
- isFullscreen: Te.value,
755
- titles: { ...e.value.userOptionsButtonTitles },
756
- chartElement: J.value,
757
- position: e.value.userOptionsPosition,
758
- hasAnnotator: e.value.userOptionsButtons.annotator,
759
- isAnnotation: Pe.value,
760
- callbacks: e.value.userOptionsCallbacks,
761
- printScale: e.value.userOptionsPrint.scale,
762
- onToggleFullscreen: dt,
763
- onGeneratePdf: f(tt),
764
- onGenerateImage: f(at),
765
- onToggleTooltip: ct,
766
- onToggleAnnotator: Ne,
767
- style: R({
768
- visibility: Qe.value ? Ce.value ? "visible" : "hidden" : "visible"
769
- })
770
- }, Rt({ _: 2 }, [
771
- o.$slots.menuIcon ? {
772
- name: "menuIcon",
773
- fn: G(({ isOpen: t, color: u }) => [
774
- M(o.$slots, "menuIcon", ie(ue({ isOpen: t, color: u })), void 0, !0)
775
- ]),
776
- key: "0"
777
- } : void 0,
778
- o.$slots.optionTooltip ? {
779
- name: "optionTooltip",
780
- fn: G(() => [
781
- M(o.$slots, "optionTooltip", {}, void 0, !0)
782
- ]),
783
- key: "1"
784
- } : void 0,
785
- o.$slots.optionPdf ? {
786
- name: "optionPdf",
787
- fn: G(() => [
788
- M(o.$slots, "optionPdf", {}, void 0, !0)
789
- ]),
790
- key: "2"
791
- } : void 0,
792
- o.$slots.optionImg ? {
793
- name: "optionImg",
794
- fn: G(() => [
795
- M(o.$slots, "optionImg", {}, void 0, !0)
796
- ]),
797
- key: "3"
798
- } : void 0,
799
- o.$slots.optionFullscreen ? {
800
- name: "optionFullscreen",
801
- fn: G(({ toggleFullscreen: t, isFullscreen: u }) => [
802
- M(o.$slots, "optionFullscreen", ie(ue({ toggleFullscreen: t, isFullscreen: u })), void 0, !0)
803
- ]),
804
- key: "4"
805
- } : void 0,
806
- o.$slots.optionAnnotator ? {
807
- name: "optionAnnotator",
808
- fn: G(({ toggleAnnotator: t, isAnnotator: u }) => [
809
- M(o.$slots, "optionAnnotator", ie(ue({ toggleAnnotator: t, isAnnotator: u })), void 0, !0)
810
- ]),
811
- key: "5"
812
- } : void 0
813
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : g("", !0),
814
- e.value.title ? (a(), l("div", {
815
- key: 3,
816
- ref_key: "quickChartTitle",
817
- ref: We,
818
- class: "vue-ui-quick-chart-title",
819
- style: R(`background:transparent;color:${e.value.color};font-size:${e.value.titleFontSize}px;font-weight:${e.value.titleBold ? "bold" : "normal"};text-align:${e.value.titleTextAlign}`)
820
- }, O(e.value.title), 5)) : g("", !0),
821
- L.value ? (a(), l("svg", {
822
- key: 4,
823
- ref_key: "svgRef",
824
- ref: Je,
825
- xmlns: f(Ht),
826
- viewBox: Lt.value,
827
- style: R(`max-width:100%;overflow:visible;background:transparent;color:${e.value.color}`)
828
- }, [
829
- fe(f(H)),
830
- o.$slots["chart-background"] && L.value === A.BAR ? (a(), l("foreignObject", {
831
- key: 0,
832
- x: d.value.drawingArea.left,
833
- y: d.value.drawingArea.top,
834
- width: d.value.drawingArea.width,
835
- height: d.value.drawingArea.height,
836
- style: {
837
- pointerEvents: "none"
838
- }
839
- }, [
840
- M(o.$slots, "chart-background", {}, void 0, !0)
841
- ], 8, sa)) : g("", !0),
842
- o.$slots["chart-background"] && L.value === A.LINE ? (a(), l("foreignObject", {
843
- key: 1,
844
- x: v.value.drawingArea.left,
845
- y: v.value.drawingArea.top,
846
- width: v.value.drawingArea.width,
847
- height: v.value.drawingArea.height,
848
- style: {
849
- pointerEvents: "none"
850
- }
851
- }, [
852
- M(o.$slots, "chart-background", {}, void 0, !0)
853
- ], 8, va)) : g("", !0),
854
- o.$slots["chart-background"] && L.value === A.DONUT ? (a(), l("foreignObject", {
855
- key: 2,
856
- x: 0,
857
- y: 0,
858
- width: b.value.width,
859
- height: b.value.height,
860
- style: {
861
- pointerEvents: "none"
862
- }
863
- }, [
864
- M(o.$slots, "chart-background", {}, void 0, !0)
865
- ], 8, da)) : g("", !0),
866
- _("defs", null, [
867
- _("filter", {
868
- id: `blur_${Q.value}`,
869
- x: "-50%",
870
- y: "-50%",
871
- width: "200%",
872
- height: "200%"
873
- }, [
874
- _("feGaussianBlur", {
875
- in: "SourceGraphic",
876
- stdDeviation: 2,
877
- id: `blur_std_${Q.value}`
878
- }, null, 8, ha),
879
- r[7] || (r[7] = _("feColorMatrix", {
880
- type: "saturate",
881
- values: "0"
882
- }, null, -1))
883
- ], 8, ca),
884
- _("filter", {
885
- id: `shadow_${Q.value}`,
886
- "color-interpolation-filters": "sRGB"
887
- }, [
888
- _("feDropShadow", {
889
- dx: "0",
890
- dy: "0",
891
- stdDeviation: "10",
892
- "flood-opacity": "0.5",
893
- "flood-color": e.value.donutShadowColor
894
- }, null, 8, ga)
895
- ], 8, fa)
896
- ]),
897
- L.value === A.DONUT ? (a(), l(m, { key: 3 }, [
898
- e.value.showDataLabels ? (a(), l("g", ma, [
899
- (a(!0), l(m, null, $(I.value.chart, (t, u) => (a(), l(m, null, [
900
- I.value.isArcBigEnough(t) ? (a(), l("path", {
901
- key: 0,
902
- d: f(Wt)(t, { x: b.value.width / 2, y: b.value.height / 2 }, 16, 16, !1, !1, b.value.height * rt.value),
903
- stroke: t.color,
904
- "stroke-width": e.value.donutLabelMarkerStrokeWidth,
905
- "stroke-linecap": "round",
906
- "stroke-linejoin": "round",
907
- fill: "none",
908
- filter: Se(t.id)
909
- }, null, 8, pa)) : g("", !0)
910
- ], 64))), 256))
911
- ])) : g("", !0),
912
- _("circle", {
913
- cx: I.value.cx,
914
- cy: I.value.cy,
915
- r: I.value.radius,
916
- fill: e.value.backgroundColor,
917
- filter: e.value.donutUseShadow ? `url(#shadow_${Q.value})` : ""
918
- }, null, 8, ya),
919
- _("g", xa, [
920
- (a(!0), l(m, null, $(I.value.chart, (t, u) => (a(), l("path", {
921
- d: t.arcSlice,
922
- fill: t.color,
923
- stroke: e.value.backgroundColor,
924
- "stroke-width": e.value.donutStrokeWidth,
925
- filter: Se(t.id)
926
- }, null, 8, ka))), 256)),
927
- (a(!0), l(m, null, $(I.value.chart, (t, u) => (a(), l("path", {
928
- d: t.arcSlice,
929
- fill: "transparent",
930
- onMouseenter: (s) => I.value.useTooltip({ datapoint: t, seriesIndex: u }),
931
- onMouseout: r[0] || (r[0] = (s) => I.value.killTooltip()),
932
- onClick: (s) => re("selectDatapoint", t)
933
- }, null, 40, ba))), 256))
934
- ]),
935
- e.value.showDataLabels ? (a(), l("g", Sa, [
936
- (a(!0), l(m, null, $(I.value.chart, (t, u) => (a(), l(m, null, [
937
- I.value.isArcBigEnough(t) ? (a(), l("circle", {
938
- key: 0,
939
- cx: f(_e)(t).x,
940
- cy: f(qe)(t) - 3.7,
941
- fill: t.color,
942
- stroke: e.value.backgroundColor,
943
- "stroke-width": 1,
944
- r: 3,
945
- filter: Se(t.id)
946
- }, null, 8, wa)) : g("", !0),
947
- I.value.isArcBigEnough(t) ? (a(), l("text", {
948
- key: 1,
949
- "text-anchor": f(_e)(t, !0, 20).anchor,
950
- x: f(_e)(t, !0).x,
951
- y: f(qe)(t),
952
- fill: e.value.color,
953
- "font-size": e.value.dataLabelFontSize,
954
- filter: Se(t.id)
955
- }, O(I.value.displayArcPercentage(t, I.value.chart)) + " (" + O(f(X)(
956
- e.value.formatter,
957
- t.value,
958
- f(D)({
959
- p: e.value.valuePrefix,
960
- v: t.value,
961
- s: e.value.valueSuffix,
962
- r: e.value.dataLabelRoundingValue
963
- }),
964
- { datapoint: t, seriesIndex: u }
965
- )) + ") ", 9, Aa)) : g("", !0),
966
- I.value.isArcBigEnough(t, !0, 20) ? (a(), l("text", {
967
- key: 2,
968
- "text-anchor": f(_e)(t).anchor,
969
- x: f(_e)(t, !0).x,
970
- y: f(qe)(t) + e.value.dataLabelFontSize,
971
- fill: e.value.color,
972
- "font-size": e.value.dataLabelFontSize,
973
- filter: Se(t.id)
974
- }, O(t.name), 9, _a)) : g("", !0)
975
- ], 64))), 256))
976
- ])) : g("", !0),
977
- e.value.donutShowTotal ? (a(), l("g", La, [
978
- _("text", {
979
- "text-anchor": "middle",
980
- x: I.value.drawingArea.centerX,
981
- y: I.value.drawingArea.centerY - e.value.donutTotalLabelFontSize / 2,
982
- "font-size": e.value.donutTotalLabelFontSize,
983
- fill: e.value.color
984
- }, O(e.value.donutTotalLabelText), 9, za),
985
- _("text", {
986
- "text-anchor": "middle",
987
- x: I.value.drawingArea.centerX,
988
- y: I.value.drawingArea.centerY + e.value.donutTotalLabelFontSize,
989
- "font-size": e.value.donutTotalLabelFontSize,
990
- fill: e.value.color
991
- }, O(f(D)({
992
- p: e.value.valuePrefix,
993
- v: I.value.total,
994
- s: e.value.valueSuffix,
995
- r: e.value.dataLabelRoundingValue
996
- })), 9, $a)
997
- ])) : g("", !0)
998
- ], 64)) : g("", !0),
999
- L.value === A.LINE ? (a(), l(m, { key: 4 }, [
1000
- e.value.xyShowGrid ? (a(), l("g", Ca, [
1001
- (a(!0), l(m, null, $(v.value.yLabels, (t) => (a(), l(m, null, [
1002
- t.y <= v.value.drawingArea.bottom ? (a(), l("line", {
1003
- key: 0,
1004
- x1: v.value.drawingArea.left,
1005
- x2: v.value.drawingArea.right,
1006
- y1: t.y,
1007
- y2: t.y,
1008
- stroke: e.value.xyGridStroke,
1009
- "stroke-width": e.value.xyGridStrokeWidth,
1010
- "stroke-linecap": "round"
1011
- }, null, 8, Ia)) : g("", !0)
1012
- ], 64))), 256)),
1013
- (a(!0), l(m, null, $(v.value.extremes.maxSeries + 1, (t, u) => (a(), l("line", {
1014
- x1: v.value.drawingArea.left + v.value.slotSize * u,
1015
- x2: v.value.drawingArea.left + v.value.slotSize * u,
1016
- y1: v.value.drawingArea.top,
1017
- y2: v.value.drawingArea.bottom,
1018
- stroke: e.value.xyGridStroke,
1019
- "stroke-width": e.value.xyGridStrokeWidth,
1020
- "stroke-linecap": "round"
1021
- }, null, 8, Ea))), 256))
1022
- ])) : g("", !0),
1023
- e.value.xyShowAxis ? (a(), l("g", Oa, [
1024
- _("line", {
1025
- x1: v.value.drawingArea.left,
1026
- x2: v.value.drawingArea.left,
1027
- y1: v.value.drawingArea.top,
1028
- y2: v.value.drawingArea.bottom,
1029
- stroke: e.value.xyAxisStroke,
1030
- "stroke-width": e.value.xyAxisStrokeWidth,
1031
- "stroke-linecap": "round"
1032
- }, null, 8, Ta),
1033
- _("line", {
1034
- x1: v.value.drawingArea.left,
1035
- x2: v.value.drawingArea.right,
1036
- y1: isNaN(v.value.absoluteZero) ? v.value.drawingArea.bottom : v.value.absoluteZero,
1037
- y2: isNaN(v.value.absoluteZero) ? v.value.drawingArea.bottom : v.value.absoluteZero,
1038
- stroke: e.value.xyAxisStroke,
1039
- "stroke-width": e.value.xyAxisStrokeWidth,
1040
- "stroke-linecap": "round"
1041
- }, null, 8, Pa)
1042
- ])) : g("", !0),
1043
- e.value.xyShowScale ? (a(), l("g", Ra, [
1044
- (a(!0), l(m, null, $(v.value.yLabels, (t, u) => (a(), l(m, null, [
1045
- t.y <= v.value.drawingArea.bottom ? (a(), l("line", {
1046
- key: 0,
1047
- x1: t.x + 4,
1048
- x2: v.value.drawingArea.left,
1049
- y1: t.y,
1050
- y2: t.y,
1051
- stroke: e.value.xyAxisStroke,
1052
- "stroke-width": e.value.xyAxisStrokeWidth,
1053
- "stroke-linecap": "round"
1054
- }, null, 8, Ma)) : g("", !0),
1055
- t.y <= v.value.drawingArea.bottom ? (a(), l("text", {
1056
- key: 1,
1057
- x: t.x,
1058
- y: t.y + e.value.xyLabelsYFontSize / 3,
1059
- "text-anchor": "end",
1060
- "font-size": e.value.xyLabelsYFontSize,
1061
- fill: e.value.color
1062
- }, O(f(X)(
1063
- e.value.formatter,
1064
- t.value,
1065
- f(D)({
1066
- p: e.value.valuePrefix,
1067
- v: t.value,
1068
- s: e.value.valueSuffix,
1069
- r: e.value.dataLabelRoundingValue
1070
- }),
1071
- { datapoint: t, seriesIndex: u }
1072
- )), 9, Fa)) : g("", !0)
1073
- ], 64))), 256))
1074
- ])) : g("", !0),
1075
- e.value.xyShowScale && e.value.xyPeriods.length ? (a(), l("g", Na, [
1076
- (a(!0), l(m, null, $(ee.value.map((t) => t.text), (t, u) => (a(), l(m, null, [
1077
- !e.value.xyPeriodsShowOnlyAtModulo || e.value.xyPeriodsShowOnlyAtModulo && u % Math.floor((x.value.end - x.value.start) / e.value.xyPeriodsModulo) === 0 || x.value.end - x.value.start <= e.value.xyPeriodsModulo ? (a(), l("line", {
1078
- key: 0,
1079
- x1: v.value.drawingArea.left + v.value.slotSize * (u + 1) - v.value.slotSize / 2,
1080
- x2: v.value.drawingArea.left + v.value.slotSize * (u + 1) - v.value.slotSize / 2,
1081
- y1: v.value.drawingArea.bottom,
1082
- y2: v.value.drawingArea.bottom + 4,
1083
- stroke: e.value.xyAxisStroke,
1084
- "stroke-width": e.value.xyAxisStrokeWidth,
1085
- "stroke-linecap": "round"
1086
- }, null, 8, Ua)) : g("", !0),
1087
- !e.value.xyPeriodsShowOnlyAtModulo || e.value.xyPeriodsShowOnlyAtModulo && u % Math.floor((x.value.end - x.value.start) / e.value.xyPeriodsModulo) === 0 || x.value.end - x.value.start <= e.value.xyPeriodsModulo ? (a(), l("g", Ba, [
1088
- String(t).includes(`
1089
- `) ? (a(), l("text", {
1090
- key: 1,
1091
- "font-size": e.value.xyLabelsXFontSize,
1092
- "text-anchor": e.value.xyPeriodLabelsRotation > 0 ? "start" : e.value.xyPeriodLabelsRotation < 0 ? "end" : "middle",
1093
- fill: e.value.color,
1094
- 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})`,
1095
- innerHTML: f(jt)({
1096
- content: String(t),
1097
- fontSize: e.value.xyLabelsXFontSize,
1098
- fill: e.value.color,
1099
- x: 0,
1100
- y: 0
1101
- })
1102
- }, null, 8, Va)) : (a(), l("text", {
1103
- key: 0,
1104
- "font-size": e.value.xyLabelsXFontSize,
1105
- "text-anchor": e.value.xyPeriodLabelsRotation > 0 ? "start" : e.value.xyPeriodLabelsRotation < 0 ? "end" : "middle",
1106
- fill: e.value.color,
1107
- 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})`
1108
- }, O(t), 9, Da))
1109
- ])) : g("", !0)
1110
- ], 64))), 256))
1111
- ])) : g("", !0),
1112
- _("g", qa, [
1113
- (a(!0), l(m, null, $(v.value.dataset, (t, u) => (a(), l("g", Ha, [
1114
- e.value.lineSmooth ? (a(), l(m, { key: 0 }, [
1115
- _("path", {
1116
- d: `M ${f(pt)(t.coordinates)}`,
1117
- stroke: e.value.backgroundColor,
1118
- "stroke-width": e.value.lineStrokeWidth + 1,
1119
- "stroke-linecap": "round",
1120
- fill: "none",
1121
- class: he({ "quick-animation": !0, "vue-data-ui-line-animated": e.value.lineAnimated }),
1122
- style: { transition: "all 0.3s ease-in-out" }
1123
- }, null, 10, Wa),
1124
- _("path", {
1125
- d: `M ${f(pt)(t.coordinates)}`,
1126
- stroke: t.color,
1127
- "stroke-width": e.value.lineStrokeWidth,
1128
- "stroke-linecap": "round",
1129
- fill: "none",
1130
- class: he({ "quick-animation": !0, "vue-data-ui-line-animated": e.value.lineAnimated }),
1131
- style: { transition: "all 0.3s ease-in-out" }
1132
- }, null, 10, ja)
1133
- ], 64)) : (a(), l(m, { key: 1 }, [
1134
- _("path", {
1135
- d: `M ${t.linePath}`,
1136
- stroke: e.value.backgroundColor,
1137
- "stroke-width": e.value.lineStrokeWidth + 1,
1138
- "stroke-linecap": "round",
1139
- fill: "none",
1140
- class: he({ "quick-animation": !0, "vue-data-ui-line-animated": e.value.lineAnimated }),
1141
- style: { transition: "all 0.3s ease-in-out" }
1142
- }, null, 10, Ga),
1143
- _("path", {
1144
- d: `M ${t.linePath}`,
1145
- stroke: t.color,
1146
- "stroke-width": e.value.lineStrokeWidth,
1147
- "stroke-linecap": "round",
1148
- fill: "none",
1149
- class: he({ "quick-animation": !0, "vue-data-ui-line-animated": e.value.lineAnimated }),
1150
- style: { transition: "all 0.3s ease-in-out" }
1151
- }, null, 10, Xa)
1152
- ], 64)),
1153
- (a(!0), l(m, null, $(t.coordinates, (s, h) => (a(), l("circle", {
1154
- cx: s.x,
1155
- cy: f(Z)(s.y),
1156
- r: 3,
1157
- fill: t.color,
1158
- stroke: e.value.backgroundColor,
1159
- "stroke-width": "0.5",
1160
- class: "quick-animation",
1161
- style: { transition: "all 0.3s ease-in-out" }
1162
- }, null, 8, Za))), 256))
1163
- ]))), 256))
1164
- ]),
1165
- e.value.showDataLabels ? (a(), l("g", Ya, [
1166
- (a(!0), l(m, null, $(v.value.dataset, (t, u) => (a(), l(m, null, [
1167
- (a(!0), l(m, null, $(t.coordinates, (s, h) => (a(), l("text", {
1168
- "text-anchor": "middle",
1169
- "font-size": e.value.dataLabelFontSize,
1170
- fill: t.color,
1171
- x: s.x,
1172
- y: f(Z)(s.y) - e.value.dataLabelFontSize / 2,
1173
- class: "quick-animation",
1174
- style: { transition: "all 0.3s ease-in-out" }
1175
- }, O(f(X)(
1176
- e.value.formatter,
1177
- f(Z)(s.value),
1178
- f(D)({
1179
- p: e.value.valuePrefix,
1180
- v: f(Z)(s.value),
1181
- s: e.value.valueSuffix,
1182
- r: e.value.dataLabelRoundingValue
1183
- }),
1184
- { datapoint: s, seriesIndex: h }
1185
- )), 9, Ja))), 256))
1186
- ], 64))), 256))
1187
- ])) : g("", !0),
1188
- _("g", Qa, [
1189
- (a(!0), l(m, null, $(v.value.extremes.maxSeries, (t, u) => (a(), l("rect", {
1190
- x: v.value.drawingArea.left + u * v.value.slotSize,
1191
- y: v.value.drawingArea.top,
1192
- height: v.value.drawingArea.height <= 0 ? 1e-5 : v.value.drawingArea.height,
1193
- width: v.value.slotSize <= 0 ? 1e-5 : v.value.slotSize,
1194
- fill: [W.value, j.value].includes(u) ? e.value.xyHighlighterColor : "transparent",
1195
- style: R(`opacity:${e.value.xyHighlighterOpacity}`),
1196
- onMouseenter: (s) => v.value.useTooltip(u),
1197
- onMouseleave: r[1] || (r[1] = (s) => v.value.killTooltip()),
1198
- onClick: (s) => re("selectDatapoint", v.value.dataset.map((h) => ({
1199
- ...h,
1200
- value: h.values[u]
1201
- })))
1202
- }, null, 44, Ka))), 256))
1203
- ])
1204
- ], 64)) : g("", !0),
1205
- L.value === A.BAR ? (a(), l(m, { key: 5 }, [
1206
- e.value.xyShowGrid ? (a(), l("g", el, [
1207
- (a(!0), l(m, null, $(d.value.yLabels, (t) => (a(), l(m, null, [
1208
- t.y <= d.value.drawingArea.bottom ? (a(), l("line", {
1209
- key: 0,
1210
- x1: d.value.drawingArea.left,
1211
- x2: d.value.drawingArea.right,
1212
- y1: t.y,
1213
- y2: t.y,
1214
- stroke: e.value.xyGridStroke,
1215
- "stroke-width": e.value.xyGridStrokeWidth,
1216
- "stroke-linecap": "round"
1217
- }, null, 8, tl)) : g("", !0)
1218
- ], 64))), 256)),
1219
- (a(!0), l(m, null, $(d.value.extremes.maxSeries + 1, (t, u) => (a(), l("line", {
1220
- x1: d.value.drawingArea.left + d.value.slotSize * u,
1221
- x2: d.value.drawingArea.left + d.value.slotSize * u,
1222
- y1: d.value.drawingArea.top,
1223
- y2: d.value.drawingArea.bottom,
1224
- stroke: e.value.xyGridStroke,
1225
- "stroke-width": e.value.xyGridStrokeWidth,
1226
- "stroke-linecap": "round"
1227
- }, null, 8, al))), 256))
1228
- ])) : g("", !0),
1229
- e.value.xyShowAxis ? (a(), l("g", ll, [
1230
- _("line", {
1231
- x1: d.value.drawingArea.left,
1232
- x2: d.value.drawingArea.left,
1233
- y1: d.value.drawingArea.top,
1234
- y2: d.value.drawingArea.bottom,
1235
- stroke: e.value.xyAxisStroke,
1236
- "stroke-width": e.value.xyAxisStrokeWidth,
1237
- "stroke-linecap": "round"
1238
- }, null, 8, ol),
1239
- _("line", {
1240
- x1: d.value.drawingArea.left,
1241
- x2: d.value.drawingArea.right,
1242
- y1: isNaN(d.value.absoluteZero) ? d.value.drawingArea.bottom : d.value.absoluteZero,
1243
- y2: isNaN(d.value.absoluteZero) ? d.value.drawingArea.bottom : d.value.absoluteZero,
1244
- stroke: e.value.xyAxisStroke,
1245
- "stroke-width": e.value.xyAxisStrokeWidth,
1246
- "stroke-linecap": "round"
1247
- }, null, 8, nl)
1248
- ])) : g("", !0),
1249
- e.value.xyShowScale ? (a(), l("g", il, [
1250
- (a(!0), l(m, null, $(d.value.yLabels, (t, u) => (a(), l(m, null, [
1251
- t.y <= d.value.drawingArea.bottom ? (a(), l("line", {
1252
- key: 0,
1253
- x1: t.x + 4,
1254
- x2: d.value.drawingArea.left,
1255
- y1: t.y,
1256
- y2: t.y,
1257
- stroke: e.value.xyAxisStroke,
1258
- "stroke-width": e.value.xyAxisStrokeWidth,
1259
- "stroke-linecap": "round"
1260
- }, null, 8, ul)) : g("", !0),
1261
- t.y <= d.value.drawingArea.bottom ? (a(), l("text", {
1262
- key: 1,
1263
- x: t.x,
1264
- y: t.y + e.value.xyLabelsYFontSize / 3,
1265
- "text-anchor": "end",
1266
- "font-size": e.value.xyLabelsYFontSize,
1267
- fill: e.value.color
1268
- }, O(f(X)(
1269
- e.value.formatter,
1270
- t.value,
1271
- f(D)({
1272
- p: e.value.valuePrefix,
1273
- v: t.value,
1274
- s: e.value.valueSuffix,
1275
- r: e.value.dataLabelRoundingValue
1276
- }),
1277
- { datapoint: t, seriesIndex: u }
1278
- )), 9, rl)) : g("", !0)
1279
- ], 64))), 256))
1280
- ])) : g("", !0),
1281
- e.value.xyShowScale && e.value.xyPeriods.length ? (a(), l("g", sl, [
1282
- (a(!0), l(m, null, $(e.value.xyPeriods.slice(x.value.start, x.value.end), (t, u) => (a(), l("line", {
1283
- x1: d.value.drawingArea.left + d.value.slotSize * (u + 1) - d.value.slotSize / 2,
1284
- x2: d.value.drawingArea.left + d.value.slotSize * (u + 1) - d.value.slotSize / 2,
1285
- y1: d.value.drawingArea.bottom,
1286
- y2: d.value.drawingArea.bottom + 4,
1287
- stroke: e.value.xyAxisStroke,
1288
- "stroke-width": e.value.xyAxisStrokeWidth,
1289
- "stroke-linecap": "round"
1290
- }, null, 8, vl))), 256)),
1291
- (a(!0), l(m, null, $(ee.value.map((t) => t.text), (t, u) => (a(), l("text", {
1292
- "font-size": e.value.xyLabelsXFontSize,
1293
- "text-anchor": e.value.xyPeriodLabelsRotation > 0 ? "start" : e.value.xyPeriodLabelsRotation < 0 ? "end" : "middle",
1294
- 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})`,
1295
- fill: e.value.color
1296
- }, O(t), 9, dl))), 256))
1297
- ])) : g("", !0),
1298
- _("g", cl, [
1299
- (a(!0), l(m, null, $(d.value.dataset, (t, u) => (a(), l(m, null, [
1300
- (a(!0), l(m, null, $(t.coordinates, (s, h) => (a(), l("rect", {
1301
- x: s.x,
1302
- width: s.width <= 0 ? 1e-5 : s.width,
1303
- height: f(Z)(s.height <= 0 ? 1e-5 : s.height),
1304
- y: f(Z)(s.y),
1305
- fill: t.color,
1306
- stroke: e.value.backgroundColor,
1307
- "stroke-width": e.value.barStrokeWidth,
1308
- "stroke-linecap": "round",
1309
- class: he({ "vue-data-ui-bar-animated": e.value.barAnimated && s.value < 0 })
1310
- }, [
1311
- e.value.barAnimated && s.value > 0 && !f(Ie) && !f(Ee) ? (a(), l("animate", {
1312
- key: 0,
1313
- attributeName: "height",
1314
- from: 0,
1315
- to: s.height,
1316
- dur: "0.5s"
1317
- }, null, 8, fl)) : g("", !0),
1318
- e.value.barAnimated && s.value > 0 && !f(Ie) && !f(Ee) ? (a(), l("animate", {
1319
- key: 1,
1320
- attributeName: "y",
1321
- from: d.value.absoluteZero,
1322
- to: d.value.absoluteZero - s.height,
1323
- dur: "0.5s"
1324
- }, null, 8, gl)) : g("", !0)
1325
- ], 10, hl))), 256))
1326
- ], 64))), 256))
1327
- ]),
1328
- e.value.showDataLabels ? (a(), l("g", ml, [
1329
- (a(!0), l(m, null, $(d.value.dataset, (t, u) => (a(), l(m, null, [
1330
- (a(!0), l(m, null, $(t.coordinates, (s, h) => (a(), l("text", {
1331
- x: s.x + s.width / 2,
1332
- y: f(Z)(s.y) - e.value.dataLabelFontSize / 2,
1333
- "text-anchor": "middle",
1334
- "font-size": e.value.dataLabelFontSize,
1335
- fill: t.color,
1336
- class: "quick-animation"
1337
- }, O(f(X)(
1338
- e.value.formatter,
1339
- f(Z)(s.value),
1340
- f(D)({
1341
- p: e.value.valuePrefix,
1342
- v: f(Z)(s.value),
1343
- s: e.value.valueSuffix,
1344
- r: e.value.dataLabelRoundingValue
1345
- }),
1346
- { datapoint: s, seriesIndex: h }
1347
- )), 9, pl))), 256))
1348
- ], 64))), 256))
1349
- ])) : g("", !0),
1350
- _("g", yl, [
1351
- (a(!0), l(m, null, $(d.value.extremes.maxSeries, (t, u) => (a(), l("rect", {
1352
- x: d.value.drawingArea.left + u * d.value.slotSize,
1353
- y: d.value.drawingArea.top,
1354
- height: d.value.drawingArea.height <= 0 ? 1e-5 : d.value.drawingArea.height,
1355
- width: d.value.slotSize <= 0 ? 1e-5 : d.value.slotSize,
1356
- fill: [W.value, j.value].includes(u) ? e.value.xyHighlighterColor : "transparent",
1357
- style: R(`opacity:${e.value.xyHighlighterOpacity}`),
1358
- onMouseenter: (s) => d.value.useTooltip(u),
1359
- onMouseleave: r[2] || (r[2] = (s) => d.value.killTooltip()),
1360
- onClick: (s) => re("selectDatapoint", d.value.dataset.map((h) => ({
1361
- ...h,
1362
- value: h.values[u]
1363
- })))
1364
- }, null, 44, xl))), 256))
1365
- ])
1366
- ], 64)) : g("", !0),
1367
- [A.LINE, A.BAR].includes(L.value) ? (a(), l("g", kl, [
1368
- e.value.xAxisLabel && L.value === A.LINE ? (a(), l("g", bl, [
1369
- _("text", {
1370
- "font-size": e.value.axisLabelsFontSize,
1371
- fill: e.value.color,
1372
- "text-anchor": "middle",
1373
- x: v.value.drawingArea.left + v.value.drawingArea.width / 2,
1374
- y: b.value.height - e.value.axisLabelsFontSize / 3
1375
- }, O(e.value.xAxisLabel), 9, Sl)
1376
- ])) : g("", !0),
1377
- e.value.xAxisLabel && L.value === A.BAR ? (a(), l("g", wl, [
1378
- _("text", {
1379
- "font-size": e.value.axisLabelsFontSize,
1380
- fill: e.value.color,
1381
- "text-anchor": "middle",
1382
- x: d.value.drawingArea.left + d.value.drawingArea.width / 2,
1383
- y: b.value.height - e.value.axisLabelsFontSize / 3
1384
- }, O(e.value.xAxisLabel), 9, Al)
1385
- ])) : g("", !0),
1386
- e.value.yAxisLabel && L.value === A.LINE ? (a(), l("g", _l, [
1387
- _("text", {
1388
- "font-size": e.value.axisLabelsFontSize,
1389
- fill: e.value.color,
1390
- transform: `translate(${e.value.axisLabelsFontSize}, ${v.value.drawingArea.top + v.value.drawingArea.height / 2}) rotate(-90)`,
1391
- "text-anchor": "middle"
1392
- }, O(e.value.yAxisLabel), 9, Ll)
1393
- ])) : g("", !0),
1394
- e.value.yAxisLabel && L.value === A.BAR ? (a(), l("g", zl, [
1395
- _("text", {
1396
- "font-size": e.value.axisLabelsFontSize,
1397
- fill: e.value.color,
1398
- transform: `translate(${e.value.axisLabelsFontSize}, ${d.value.drawingArea.top + d.value.drawingArea.height / 2}) rotate(-90)`,
1399
- "text-anchor": "middle"
1400
- }, O(e.value.yAxisLabel), 9, $l)
1401
- ])) : g("", !0)
1402
- ])) : g("", !0)
1403
- ], 12, ra)) : g("", !0),
1404
- L.value ? g("", !0) : (a(), Re(f(me), {
1405
- key: 5,
1406
- config: {
1407
- type: "line",
1408
- style: {
1409
- backgroundColor: e.value.backgroundColor,
1410
- line: {
1411
- axis: {
1412
- color: e.value.xyAxisStroke
1413
- },
1414
- path: {
1415
- color: e.value.xyAxisStroke,
1416
- strokeWidth: 0.5
1417
- }
1418
- }
1419
- }
1420
- }
1421
- }, null, 8, ["config"])),
1422
- o.$slots.watermark ? (a(), l("div", Cl, [
1423
- M(o.$slots, "watermark", ie(ue({ isPrinting: f(Ie) || f(Ee) })), void 0, !0)
1424
- ])) : g("", !0),
1425
- [A.BAR, A.LINE].includes(L.value) && e.value.zoomXy && p.value.maxSeriesLength > 1 ? (a(), l("div", {
1426
- key: `slicer_${$e.value}`,
1427
- ref_key: "quickChartSlicer",
1428
- ref: Ge
1429
- }, [
1430
- (a(), Re(Jt, {
1431
- ref_key: "slicerComponent",
1432
- ref: st,
1433
- key: `slicer_${$e.value}`,
1434
- background: e.value.zoomColor,
1435
- borderColor: e.value.backgroundColor,
1436
- fontSize: e.value.zoomFontSize,
1437
- useResetSlot: e.value.zoomUseResetSlot,
1438
- labelLeft: e.value.xyPeriods[x.value.start] ? ee.value[0].text : "",
1439
- labelRight: e.value.xyPeriods[x.value.end - 1] ? ee.value.at(-1).text : "",
1440
- textColor: e.value.color,
1441
- inputColor: e.value.zoomColor,
1442
- selectColor: e.value.zoomHighlightColor,
1443
- max: p.value.maxSeriesLength,
1444
- min: 0,
1445
- valueStart: x.value.start,
1446
- valueEnd: x.value.end,
1447
- smoothMinimap: e.value.zoomMinimap.smooth,
1448
- minimapSelectedColor: e.value.zoomMinimap.selectedColor,
1449
- minimapSelectedColorOpacity: e.value.zoomMinimap.selectedColorOpacity,
1450
- minimapSelectionRadius: e.value.zoomMinimap.selectionRadius,
1451
- minimapLineColor: e.value.zoomMinimap.lineColor,
1452
- minimap: Et.value,
1453
- minimapIndicatorColor: e.value.zoomMinimap.indicatorColor,
1454
- verticalHandles: e.value.zoomMinimap.verticalHandles,
1455
- minimapSelectedIndex: j.value,
1456
- start: x.value.start,
1457
- "onUpdate:start": r[3] || (r[3] = (t) => x.value.start = t),
1458
- end: x.value.end,
1459
- "onUpdate:end": r[4] || (r[4] = (t) => x.value.end = t),
1460
- refreshStartPoint: e.value.zoomStartIndex !== null ? e.value.zoomStartIndex : 0,
1461
- refreshEndPoint: e.value.zoomEndIndex !== null ? e.value.zoomEndIndex + 1 : p.value.maxSeriesLength,
1462
- enableRangeHandles: e.value.zoomEnableRangeHandles,
1463
- enableSelectionDrag: e.value.zoomEnableSelectionDrag,
1464
- onReset: Ct,
1465
- onTrapMouse: $t
1466
- }, {
1467
- "reset-action": G(({ reset: t }) => [
1468
- M(o.$slots, "reset-action", ie(ue({ reset: t })), void 0, !0)
1469
- ]),
1470
- _: 3
1471
- }, 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"]))
1472
- ])) : g("", !0),
1473
- e.value.showLegend ? (a(), l("div", {
1474
- key: 8,
1475
- ref_key: "quickChartLegend",
1476
- ref: je,
1477
- class: "vue-ui-quick-chart-legend",
1478
- style: R(`background:transparent;color:${e.value.color}`)
1479
- }, [
1480
- L.value === A.DONUT ? (a(!0), l(m, { key: 0 }, $(I.value.legend, (t, u) => (a(), l("div", {
1481
- class: "vue-ui-quick-chart-legend-item",
1482
- onClick: (s) => {
1483
- zt(t, I.value.dataset), re("selectLegend", t);
1484
- },
1485
- style: R(`cursor: ${I.value.legend.length > 1 ? "pointer" : "default"}; opacity:${w.value.includes(t.id) ? "0.5" : "1"}`)
1486
- }, [
1487
- e.value.useCustomLegend ? M(o.$slots, "legend", De({
1488
- key: 0,
1489
- ref_for: !0
1490
- }, { legend: t }), void 0, !0) : (a(), l(m, { key: 1 }, [
1491
- fe(f(T), {
1492
- name: e.value.legendIcon,
1493
- stroke: t.color,
1494
- size: e.value.legendIconSize
1495
- }, null, 8, ["name", "stroke", "size"]),
1496
- _("span", {
1497
- style: R(`font-size:${e.value.legendFontSize}px`)
1498
- }, O(t.name), 5),
1499
- _("span", {
1500
- style: R(`font-size:${e.value.legendFontSize}px;font-variant-numeric:tabular-nums`)
1501
- }, O(w.value.includes(t.id) ? "-" : f(X)(
1502
- e.value.formatter,
1503
- t.absoluteValue,
1504
- f(D)({
1505
- p: e.value.valuePrefix,
1506
- v: t.absoluteValue,
1507
- s: e.value.valueSuffix,
1508
- r: e.value.dataLabelRoundingValue
1509
- }),
1510
- { datapoint: t, seriesIndex: u }
1511
- )), 5),
1512
- w.value.includes(t.id) ? (a(), l("span", {
1513
- key: 0,
1514
- style: R(`font-size:${e.value.legendFontSize}px`)
1515
- }, " ( - % ) ", 4)) : Oe.value ? (a(), l("span", {
1516
- key: 1,
1517
- style: R(`font-size:${e.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)
1518
- }, " ( - % ) ", 4)) : (a(), l("span", {
1519
- key: 2,
1520
- style: R(`font-size:${e.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)
1521
- }, " (" + O(f(D)({
1522
- v: t.value / I.value.total * 100,
1523
- s: "%",
1524
- r: e.value.dataLabelRoundingPercentage
1525
- })) + ") ", 5))
1526
- ], 64))
1527
- ], 12, Il))), 256)) : g("", !0),
1528
- L.value === A.LINE ? (a(!0), l(m, { key: 1 }, $(v.value.legend, (t, u) => (a(), l("div", {
1529
- class: "vue-ui-quick-chart-legend-item",
1530
- onClick: (s) => {
1531
- nt(t.id, v.value.legend.length - 1), re("selectLegend", t);
1532
- },
1533
- style: R(`cursor: ${v.value.legend.length > 1 ? "pointer" : "default"}; opacity:${w.value.includes(t.id) ? "0.5" : "1"}`)
1534
- }, [
1535
- e.value.useCustomLegend ? M(o.$slots, "legend", De({
1536
- key: 0,
1537
- ref_for: !0
1538
- }, { legend: t }), void 0, !0) : (a(), l(m, { key: 1 }, [
1539
- fe(f(T), {
1540
- name: e.value.legendIcon,
1541
- stroke: t.color,
1542
- size: e.value.legendIconSize
1543
- }, null, 8, ["name", "stroke", "size"]),
1544
- _("span", {
1545
- style: R(`font-size:${e.value.legendFontSize}px`)
1546
- }, O(t.name), 5)
1547
- ], 64))
1548
- ], 12, El))), 256)) : g("", !0),
1549
- L.value === A.BAR ? (a(!0), l(m, { key: 2 }, $(d.value.legend, (t, u) => (a(), l("div", {
1550
- class: "vue-ui-quick-chart-legend-item",
1551
- onClick: (s) => {
1552
- nt(t.id, d.value.legend.length - 1), re("selectLegend", t);
1553
- },
1554
- style: R(`cursor: ${d.value.legend.length > 1 ? "pointer" : "default"}; opacity:${w.value.includes(t.id) ? "0.5" : "1"}`)
1555
- }, [
1556
- e.value.useCustomLegend ? M(o.$slots, "legend", De({
1557
- key: 0,
1558
- ref_for: !0
1559
- }, { legend: t }), void 0, !0) : (a(), l(m, { key: 1 }, [
1560
- fe(f(T), {
1561
- name: e.value.legendIcon,
1562
- stroke: t.color,
1563
- size: e.value.legendIconSize
1564
- }, null, 8, ["name", "stroke", "size"]),
1565
- _("span", {
1566
- style: R(`font-size:${e.value.legendFontSize}px`)
1567
- }, O(t.name), 5)
1568
- ], 64))
1569
- ], 12, Ol))), 256)) : g("", !0)
1570
- ], 4)) : g("", !0),
1571
- o.$slots.source ? (a(), l("div", {
1572
- key: 9,
1573
- ref_key: "source",
1574
- ref: Xe,
1575
- dir: "auto"
1576
- }, [
1577
- M(o.$slots, "source", {}, void 0, !0)
1578
- ], 512)) : g("", !0),
1579
- fe(f(pe), {
1580
- show: be.value.showTooltip && te.value,
1581
- backgroundColor: e.value.backgroundColor,
1582
- color: e.value.color,
1583
- borderRadius: e.value.tooltipBorderRadius,
1584
- borderColor: e.value.tooltipBorderColor,
1585
- borderWidth: e.value.tooltipBorderWidth,
1586
- fontSize: e.value.tooltipFontSize,
1587
- backgroundOpacity: e.value.tooltipBackgroundOpacity,
1588
- position: e.value.tooltipPosition,
1589
- offsetY: e.value.tooltipOffsetY,
1590
- parent: J.value,
1591
- content: ae.value,
1592
- isFullscreen: Te.value,
1593
- isCustom: f(Me)(e.value.tooltipCustomFormat),
1594
- smooth: e.value.tooltipSmooth,
1595
- backdropFilter: e.value.tooltipBackdropFilter
1596
- }, {
1597
- "tooltip-before": G(() => [
1598
- M(o.$slots, "tooltip-before", ie(ue({ ...ye.value })), void 0, !0)
1599
- ]),
1600
- "tooltip-after": G(() => [
1601
- M(o.$slots, "tooltip-after", ie(ue({ ...ye.value })), void 0, !0)
1602
- ]),
1603
- _: 3
1604
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"])
1605
- ], 46, ua)) : (a(), l("div", Tl, [
1606
- fe(f(T), {
1607
- name: "circleCancel",
1608
- stroke: "red"
1609
- }),
1610
- r[8] || (r[8] = _("span", null, "Dataset is not processable", -1))
1611
- ]));
1612
- }
1613
- }, Wl = /* @__PURE__ */ ea(Pl, [["__scopeId", "data-v-58b19d9d"]]);
1614
- export {
1615
- Wl as default
1616
- };