vue-data-ui 3.0.0-next.7 → 3.0.0-next.70

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 (136) hide show
  1. package/dist/{Arrow-Bl8urcli.js → Arrow-fzydFjfE.js} +1 -1
  2. package/dist/{BaseDraggableDialog-CyhpaZU5.js → BaseDraggableDialog-BwazM8ka.js} +2 -2
  3. package/dist/{BaseIcon-BCZfTCeM.js → BaseIcon-BnbvQjs5.js} +1 -1
  4. package/dist/{ColorPicker-CSJf42vx.js → ColorPicker-DR1Yr4kR.js} +2 -2
  5. package/dist/{DataTable-mQ6Wd-rR.js → DataTable-CKpA_OA_.js} +2 -2
  6. package/dist/{Legend-B2hrDh4G.js → Legend-ChXhJNzd.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-DQ8KsK4W.js → NonSvgPenAndPaper-CPOpM7Os.js} +3 -3
  8. package/dist/{PackageVersion-CeEYZfaH.js → PackageVersion-CBHvscRY.js} +1 -1
  9. package/dist/{PenAndPaper-DhSxfUrQ.js → PenAndPaper-BCcfYvgR.js} +3 -3
  10. package/dist/{Shape-C2qH26wh.js → Shape-C1rNfsMY.js} +43 -37
  11. package/dist/Slicer-D8a4Wv1q.js +602 -0
  12. package/dist/{SparkTooltip-BcHgW6YX.js → SparkTooltip-BUdf02cs.js} +1 -1
  13. package/dist/{Title-B7Xb3YuE.js → Title-feqCv0Si.js} +1 -1
  14. package/dist/{Tooltip-BidRoM5E.js → Tooltip-DQbksria.js} +23 -19
  15. package/dist/{UserOptions-0tvMM8PF.js → UserOptions-CGnAZpYs.js} +2 -2
  16. package/dist/{dom-to-png-CTrlbKHr.js → dom-to-png-DTPmkDTK.js} +1 -1
  17. package/dist/{img-D72yZNUg.js → img-_RMhslMZ.js} +1 -1
  18. package/dist/{index-Cg-RjxqH.js → index-CnY41r21.js} +2103 -1411
  19. package/dist/{pdf-DgX01_wu.js → pdf-C02XBmhm.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +600 -22
  22. package/dist/types/vue-data-ui.d.ts +600 -22
  23. package/dist/useAutoSizeLabelsInsideViewbox-DVYZBwNc.js +81 -0
  24. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  25. package/dist/useLoading-D7YHNtLX.js +29 -0
  26. package/dist/useNestedProp-DtUATNAU.js +13 -0
  27. package/dist/usePanZoom-BVca3eMk.js +122 -0
  28. package/dist/{usePrinter-BUzmyQf9.js → usePrinter-CJ1uZx0D.js} +2 -2
  29. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  30. package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
  31. package/dist/{vue-data-ui-DpO93ey5.js → vue-data-ui-DDBabVWX.js} +105 -100
  32. package/dist/vue-data-ui.js +23 -22
  33. package/dist/vue-ui-3d-bar-CtPXePUa.js +1323 -0
  34. package/dist/{vue-ui-accordion-CRomxzaL.js → vue-ui-accordion-CnLY8CrQ.js} +3 -3
  35. package/dist/vue-ui-age-pyramid-CvrNLE47.js +834 -0
  36. package/dist/{vue-ui-annotator-BAOxPiFx.js → vue-ui-annotator-NuSwWka4.js} +2 -2
  37. package/dist/vue-ui-bullet-CpIVgkPB.js +571 -0
  38. package/dist/vue-ui-candlestick-DGWKUeJp.js +999 -0
  39. package/dist/{vue-ui-carousel-table-DVGlPZIa.js → vue-ui-carousel-table-DWbQS8F3.js} +29 -29
  40. package/dist/{vue-ui-chestnut-P1v4ffD0.js → vue-ui-chestnut-K4-oOYff.js} +5 -5
  41. package/dist/vue-ui-chord-DqmP8yTR.js +1038 -0
  42. package/dist/{vue-ui-circle-pack-FXmemXgl.js → vue-ui-circle-pack-D_ufubH5.js} +24 -24
  43. package/dist/{vue-ui-cursor-CdvMgIrP.js → vue-ui-cursor-B0tP4woK.js} +2 -2
  44. package/dist/{vue-ui-dashboard-Vke0452J.js → vue-ui-dashboard-D_7qyx3P.js} +62 -62
  45. package/dist/{vue-ui-digits-BVhyYqCs.js → vue-ui-digits-pUQErY07.js} +2 -2
  46. package/dist/{vue-ui-donut-BpIivKcf.js → vue-ui-donut-Dl__PVfq.js} +320 -308
  47. package/dist/vue-ui-donut-evolution-BCGGTZZI.js +1075 -0
  48. package/dist/vue-ui-dumbbell-KzCa3k9g.js +1119 -0
  49. package/dist/vue-ui-flow-B1AOqk14.js +841 -0
  50. package/dist/{vue-ui-funnel-BbFmbsft.js → vue-ui-funnel-DCl9v71X.js} +16 -16
  51. package/dist/{vue-ui-galaxy-Cn6vHbaw.js → vue-ui-galaxy-0rAzDHe5.js} +60 -58
  52. package/dist/vue-ui-gauge-Cg4qAOEf.js +791 -0
  53. package/dist/vue-ui-gizmo-CQmMkODw.js +210 -0
  54. package/dist/vue-ui-heatmap-CgkgUDI0.js +1078 -0
  55. package/dist/vue-ui-history-plot-CYvkTszV.js +1073 -0
  56. package/dist/{vue-ui-kpi-jN_yMnLj.js → vue-ui-kpi-BDuOZbc2.js} +26 -26
  57. package/dist/{vue-ui-mini-loader-rYr76x8g.js → vue-ui-mini-loader-BZaU_YD-.js} +2 -2
  58. package/dist/{vue-ui-molecule-BWZHOQLi.js → vue-ui-molecule-HYjHgVuN.js} +53 -51
  59. package/dist/vue-ui-mood-radar-4pYtL93A.js +785 -0
  60. package/dist/vue-ui-nested-donuts-BVbvVm19.js +1286 -0
  61. package/dist/vue-ui-onion-DQg97Dwm.js +776 -0
  62. package/dist/vue-ui-parallel-coordinate-plot-KQ4FTUda.js +915 -0
  63. package/dist/{vue-ui-quadrant-BFFzfDw3.js → vue-ui-quadrant-D8OU7TFs.js} +512 -459
  64. package/dist/vue-ui-quick-chart-BOKDoHdK.js +1761 -0
  65. package/dist/vue-ui-radar-2hTf-Qrf.js +796 -0
  66. package/dist/{vue-ui-rating-BAauyqTn.js → vue-ui-rating-QriKDSO7.js} +2 -2
  67. package/dist/vue-ui-relation-circle-DqLiKEHw.js +598 -0
  68. package/dist/vue-ui-ridgeline-CvFlsavM.js +1153 -0
  69. package/dist/vue-ui-rings-B2ges9Ud.js +728 -0
  70. package/dist/vue-ui-scatter-DQJeFlv4.js +1178 -0
  71. package/dist/{vue-ui-skeleton-CUOhCY4p.js → vue-ui-skeleton-Bghm5obp.js} +3 -3
  72. package/dist/{vue-ui-smiley-B6SqWMov.js → vue-ui-smiley-C3SkDNoz.js} +26 -26
  73. package/dist/vue-ui-spark-trend-dd8h3N7H.js +315 -0
  74. package/dist/vue-ui-sparkbar-BTj8M7fY.js +351 -0
  75. package/dist/vue-ui-sparkgauge-BBQAo-W1.js +232 -0
  76. package/dist/vue-ui-sparkhistogram-C4ZEcb8S.js +380 -0
  77. package/dist/vue-ui-sparkline-Bm3GpqJx.js +489 -0
  78. package/dist/vue-ui-sparkstackbar-Dde4iayd.js +421 -0
  79. package/dist/vue-ui-stackbar-DPvfNjwH.js +1370 -0
  80. package/dist/vue-ui-strip-plot-iZIN9U90.js +915 -0
  81. package/dist/{vue-ui-table-Dwjl3L0p.js → vue-ui-table-C4EoviSd.js} +11 -11
  82. package/dist/{vue-ui-table-heatmap-DazTE3fa.js → vue-ui-table-heatmap-D-eqO3LU.js} +5 -5
  83. package/dist/{vue-ui-table-sparkline-BXMPUEpN.js → vue-ui-table-sparkline-CD7IH49g.js} +14 -14
  84. package/dist/vue-ui-thermometer-BKEFH2Xt.js +541 -0
  85. package/dist/{vue-ui-timer-yLvNAZL_.js → vue-ui-timer-hhKj1gPp.js} +5 -5
  86. package/dist/vue-ui-tiremarks-CmNwCnVC.js +406 -0
  87. package/dist/vue-ui-treemap-BL7T8x_B.js +1035 -0
  88. package/dist/{vue-ui-vertical-bar-BrYCoVym.js → vue-ui-vertical-bar-CGn_OX3P.js} +71 -69
  89. package/dist/vue-ui-waffle-qfT-wDhI.js +910 -0
  90. package/dist/vue-ui-wheel-B8J8C3AN.js +379 -0
  91. package/dist/vue-ui-word-cloud-B6oHFfEK.js +765 -0
  92. package/dist/{vue-ui-world-B4Dqrk4l.js → vue-ui-world-BEv_oTrC.js} +11 -9
  93. package/dist/vue-ui-xy-DPBrciAR.js +3771 -0
  94. package/dist/{vue-ui-xy-canvas-D7fL36kT.js → vue-ui-xy-canvas-BXT3mXj5.js} +265 -264
  95. package/package.json +1 -1
  96. package/dist/Slicer-BD8Z8VCW.js +0 -577
  97. package/dist/useLoading-Bt5Doa8m.js +0 -28
  98. package/dist/useNestedProp-C_G5E08Y.js +0 -13
  99. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  100. package/dist/vue-ui-3d-bar-D8imUwEz.js +0 -1227
  101. package/dist/vue-ui-age-pyramid-CV7gtFOC.js +0 -746
  102. package/dist/vue-ui-bullet-BtuMMBF7.js +0 -513
  103. package/dist/vue-ui-candlestick-BsRtXKrv.js +0 -873
  104. package/dist/vue-ui-chord-CIuzYmpM.js +0 -949
  105. package/dist/vue-ui-donut-evolution-BRlsCA4U.js +0 -903
  106. package/dist/vue-ui-dumbbell-D87Dumjh.js +0 -753
  107. package/dist/vue-ui-flow-D_L_xssL.js +0 -765
  108. package/dist/vue-ui-gauge-Ds4terqY.js +0 -738
  109. package/dist/vue-ui-gizmo-BTncpI62.js +0 -192
  110. package/dist/vue-ui-heatmap-B6GpjeWC.js +0 -877
  111. package/dist/vue-ui-history-plot-DTDzEeGq.js +0 -924
  112. package/dist/vue-ui-mood-radar-CPfS6f1L.js +0 -670
  113. package/dist/vue-ui-nested-donuts-Bsd2kGoJ.js +0 -1177
  114. package/dist/vue-ui-onion-BQ4nISXW.js +0 -701
  115. package/dist/vue-ui-parallel-coordinate-plot-BoHgVgbn.js +0 -807
  116. package/dist/vue-ui-quick-chart-oNMTeOAL.js +0 -1612
  117. package/dist/vue-ui-radar-98mXFZe-.js +0 -741
  118. package/dist/vue-ui-relation-circle-6oDCSxkO.js +0 -542
  119. package/dist/vue-ui-ridgeline-CugMGjOU.js +0 -969
  120. package/dist/vue-ui-rings-bsGXaD2m.js +0 -685
  121. package/dist/vue-ui-scatter-7ssLliGg.js +0 -1045
  122. package/dist/vue-ui-spark-trend-jauInkkN.js +0 -291
  123. package/dist/vue-ui-sparkbar-DXByIxQH.js +0 -301
  124. package/dist/vue-ui-sparkgauge-BMrV2gDi.js +0 -201
  125. package/dist/vue-ui-sparkhistogram-CoNM4G7o.js +0 -313
  126. package/dist/vue-ui-sparkline-DrN3_wS0.js +0 -459
  127. package/dist/vue-ui-sparkstackbar-W1a0JQi9.js +0 -381
  128. package/dist/vue-ui-stackbar-D1-gbUgE.js +0 -1207
  129. package/dist/vue-ui-strip-plot-KhfvrVuN.js +0 -761
  130. package/dist/vue-ui-thermometer-Cn6lJRs3.js +0 -495
  131. package/dist/vue-ui-tiremarks-BYsWePfK.js +0 -358
  132. package/dist/vue-ui-treemap-Ce7RVFG3.js +0 -965
  133. package/dist/vue-ui-waffle-CCrR2T1G.js +0 -863
  134. package/dist/vue-ui-wheel-BuxjnrDN.js +0 -352
  135. package/dist/vue-ui-word-cloud-C6fawHJE.js +0 -659
  136. package/dist/vue-ui-xy-ubRnv9iJ.js +0 -2980
@@ -1,1207 +0,0 @@
1
- import { defineAsyncComponent as G, useSlots as Zt, computed as w, ref as p, onMounted as ct, watch as ht, shallowRef as vt, onBeforeUnmount as Kt, nextTick as be, createElementBlock as n, openBlock as s, unref as y, normalizeStyle as J, normalizeClass as oe, createBlock as q, createCommentVNode as g, renderSlot as z, createElementVNode as Z, createVNode as fe, createSlots as dt, withCtx as _, normalizeProps as F, guardReactiveProps as E, Fragment as v, renderList as f, mergeProps as Me, toDisplayString as T, createTextVNode as Qt } from "vue";
2
- import { u as jt, c as yt, t as ea, p as me, a as ta, C as te, b as aa, o as la, e as gt, g as ra, d as sa, am as pe, ab as bt, D as ft, X as oa, l as ia, aa as xe, F as mt, i as ke, f as K, I as na, a0 as ua, x as pt, q as ca, r as ha, y as va } from "./index-Cg-RjxqH.js";
3
- import { u as xt } from "./useNestedProp-C_G5E08Y.js";
4
- import { t as da, u as ya } from "./useResponsive-DfdjqQps.js";
5
- import { u as ga } from "./usePrinter-BUzmyQf9.js";
6
- import { u as ba } from "./useUserOptionState-BIvW1Kz7.js";
7
- import { u as fa } from "./useChartAccessibility-9icAAmYg.js";
8
- import ma from "./Legend-B2hrDh4G.js";
9
- import { S as pa } from "./Slicer-BD8Z8VCW.js";
10
- import xa from "./Title-B7Xb3YuE.js";
11
- import { _ as ka } from "./Shape-C2qH26wh.js";
12
- import { u as wa } from "./useTimeLabels-Mrr0jrpL.js";
13
- import za from "./img-D72yZNUg.js";
14
- import { _ as La } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
- const Ca = ["id"], _a = ["xmlns", "viewBox"], Sa = ["x", "y", "width", "height"], $a = { key: 1 }, Ma = ["id"], Ta = ["stop-color"], Na = ["stop-color"], Ia = ["stop-color"], Pa = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Oa = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Ra = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Va = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Aa = { key: 0 }, Ua = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], Da = { key: 0 }, Fa = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], Ea = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], Ha = { key: 0 }, Ba = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], Wa = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ya = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Xa = ["x", "y", "font-size", "fill", "font-weight"], Ga = ["transform", "font-size", "fill", "font-weight"], Ja = ["x", "y", "font-size", "fill", "font-weight"], qa = { key: 0 }, Za = ["x", "y", "font-size", "font-weight", "fill"], Ka = ["x", "y", "font-size", "fill", "font-weight"], Qa = { key: 0 }, ja = ["x", "y", "font-size", "font-weight", "fill"], el = ["x1", "x2", "y1", "y2", "stroke"], tl = ["x", "y", "font-size", "font-weight", "fill"], al = ["x1", "x2", "y1", "y2", "stroke"], ll = ["font-size", "font-weight", "fill", "text-anchor", "transform"], rl = { key: 0 }, sl = { key: 1 }, ol = ["text-anchor", "font-size", "font-weight", "fill", "transform", "onClick"], il = ["text-anchor", "font-size", "fill", "transform", "innerHTML", "onClick"], nl = { key: 0 }, ul = { key: 1 }, cl = ["font-size", "font-weight", "fill", "x", "y", "onClick"], hl = ["font-size", "font-weight", "fill", "x", "y", "onClick", "innerHTML"], vl = ["x", "y", "width", "height", "onClick", "onMouseenter", "fill"], dl = ["x", "y", "width", "height", "onClick", "onMouseenter", "fill"], yl = {
16
- key: 4,
17
- class: "vue-data-ui-watermark"
18
- }, gl = ["onClick"], bl = ["innerHTML"], fl = {
19
- __name: "vue-ui-stackbar",
20
- props: {
21
- config: {
22
- type: Object,
23
- default() {
24
- return {};
25
- }
26
- },
27
- dataset: {
28
- type: Array,
29
- default() {
30
- return [];
31
- }
32
- }
33
- },
34
- emits: ["selectDatapoint", "selectLegend", "selectTimeLabel"],
35
- setup(we, { expose: kt, emit: wt }) {
36
- const zt = G(() => import("./vue-ui-accordion-CRomxzaL.js")), Lt = G(() => import("./DataTable-mQ6Wd-rR.js")), Ct = G(() => import("./PackageVersion-CeEYZfaH.js")), _t = G(() => import("./PenAndPaper-DhSxfUrQ.js")), St = G(() => import("./vue-ui-skeleton-CUOhCY4p.js")), $t = G(() => import("./Tooltip-BidRoM5E.js")), Mt = G(() => import("./UserOptions-0tvMM8PF.js")), { vue_ui_stackbar: Tt } = jt(), Nt = Zt(), b = we, ze = wt, Q = w({
37
- get() {
38
- return !!b.dataset && b.dataset.length;
39
- },
40
- set(a) {
41
- return a;
42
- }
43
- }), R = p(null), V = p(yt()), ie = p(!1), Le = p(null), Ce = p(""), S = p([]), Te = p(0), Ne = p(null), Ie = p(null), Pe = p(null), Oe = p(null), Re = p(0), ne = p(!1), ae = p(null), H = p(!1), Ve = p(0), It = p(0), Pt = p(0), j = p(null);
44
- ct(() => {
45
- Se();
46
- });
47
- const e = w({
48
- get: () => Fe(),
49
- set: (a) => a
50
- }), { userOptionsVisible: _e, setUserOptionsVisibility: Ae, keepUserOptionState: Ue } = ba({ config: e.value }), { svgRef: De } = fa({ config: e.value.style.chart.title });
51
- function Fe() {
52
- const a = xt({
53
- userConfig: b.config,
54
- defaultConfig: Tt
55
- });
56
- let r = {};
57
- return a.theme ? r = {
58
- ...xt({
59
- userConfig: ta.vue_ui_stackbar[a.theme] || b.config,
60
- defaultConfig: a
61
- }),
62
- customPalette: ea[a.theme] || me
63
- } : r = a, b.config && te(b.config, "style.chart.grid.scale.scaleMin") ? r.style.chart.grid.scale.scaleMin = b.config.style.chart.grid.scale.scaleMin : r.style.chart.grid.scale.scaleMin = null, b.config && te(b.config, "style.chart.grid.scale.scaleMax") ? r.style.chart.grid.scale.scaleMax = b.config.style.chart.grid.scale.scaleMax : r.style.chart.grid.scale.scaleMax = null, b.config && te(b.config, "style.chart.zoom.startIndex") ? r.style.chart.zoom.startIndex = b.config.style.chart.zoom.startIndex : r.style.chart.zoom.startIndex = null, b.config && te(b.config, "style.chart.zoom.endIndex") ? r.style.chart.zoom.endIndex = b.config.style.chart.zoom.endIndex : r.style.chart.zoom.endIndex = null, b.config && te(b.config, "style.chart.bars.dataLabels.hideUnderValue") ? r.style.chart.bars.dataLabels.hideUnderValue = b.config.style.chart.bars.dataLabels.hideUnderValue : r.style.chart.bars.dataLabels.hideUnderValue = null, b.config && te(b.config, "style.chart.bars.dataLabels.hideUnderPercentage") ? r.style.chart.bars.dataLabels.hideUnderPercentage = b.config.style.chart.bars.dataLabels.hideUnderPercentage : r.style.chart.bars.dataLabels.hideUnderPercentage = null, r;
64
- }
65
- const Ee = w(() => e.value.style.chart.bars.dataLabels.hideUnderValue !== null), He = w(() => e.value.style.chart.bars.dataLabels.hideUnderPercentage !== null);
66
- ht(() => b.config, (a) => {
67
- e.value = Fe(), _e.value = !e.value.userOptions.showOnChartHover, Se(), Ve.value += 1, It.value += 1, Pt.value += 1, L.value.dataLabels.show = e.value.style.chart.bars.dataLabels.show, L.value.showTable = e.value.table.show, L.value.showTooltip = e.value.style.chart.tooltip.show;
68
- }, { deep: !0 }), ht(() => b.dataset, (a) => {
69
- Je();
70
- }, { deep: !0 });
71
- const L = p({
72
- dataLabels: {
73
- show: e.value.style.chart.bars.dataLabels.show
74
- },
75
- showTable: e.value.table.show,
76
- showTooltip: e.value.style.chart.tooltip.show
77
- }), { isPrinting: Be, isImaging: We, generatePdf: Ye, generateImage: Xe } = ga({
78
- elementId: `stackbar_${V.value}`,
79
- fileName: e.value.style.chart.title.text || "vue-ui-stackbar",
80
- options: e.value.userOptions.print
81
- }), ue = p({
82
- width: e.value.style.chart.width,
83
- height: e.value.style.chart.height,
84
- paddingRatio: {
85
- top: e.value.style.chart.padding.top / e.value.style.chart.height,
86
- right: e.value.style.chart.padding.right / e.value.style.chart.width,
87
- bottom: e.value.style.chart.padding.bottom / e.value.style.chart.height,
88
- left: e.value.style.chart.padding.left / e.value.style.chart.width
89
- }
90
- }), Ot = w(() => aa(e.value.customPalette)), A = vt(null), ee = vt(null), Ge = p(null);
91
- ct(() => {
92
- Se();
93
- });
94
- function Se() {
95
- if (la(b.dataset) ? gt({
96
- componentName: "VueUiStackbar",
97
- type: "dataset"
98
- }) : b.dataset.forEach((a, r) => {
99
- ra({
100
- datasetObject: a,
101
- requiredAttributes: ["name", "series"]
102
- }).forEach((t) => {
103
- Q.value = !1, gt({
104
- componentName: "VueUiStackbar",
105
- type: "datasetSerieAttribute",
106
- property: t,
107
- index: r
108
- });
109
- });
110
- }), setTimeout(() => {
111
- H.value = !0;
112
- }, 10), e.value.responsive) {
113
- const a = da(() => {
114
- H.value = !1;
115
- const { width: r, height: t } = ya({
116
- chart: R.value,
117
- title: e.value.style.chart.title.text ? Ne.value : null,
118
- legend: e.value.style.chart.legend.show ? Ie.value : null,
119
- slicer: e.value.style.chart.zoom.show && D.value > 1 ? Pe.value : null,
120
- source: Oe.value
121
- });
122
- requestAnimationFrame(() => {
123
- ue.value.width = r, ue.value.height = t, clearTimeout(Ge.value), Ge.value = setTimeout(() => {
124
- H.value = !0;
125
- }, 10);
126
- });
127
- });
128
- A.value && (ee.value && A.value.unobserve(ee.value), A.value.disconnect()), A.value = new ResizeObserver(a), ee.value = R.value.parentNode, A.value.observe(ee.value);
129
- }
130
- qe();
131
- }
132
- Kt(() => {
133
- A.value && (ee.value && A.value.unobserve(ee.value), A.value.disconnect());
134
- });
135
- const o = w(() => {
136
- const { height: a, width: r } = ue.value, { right: t } = ue.value.paddingRatio, l = e.value.style.chart.padding.top, c = r - r * t, u = a - e.value.style.chart.padding.bottom, C = e.value.style.chart.padding.left, B = r - C - r * t, W = a - l - e.value.style.chart.padding.bottom;
137
- return {
138
- chartHeight: a,
139
- chartWidth: r,
140
- top: l,
141
- right: c,
142
- bottom: u,
143
- left: C,
144
- width: B,
145
- height: W < 0 ? 0 : W
146
- };
147
- }), U = w(() => b.dataset.map((a, r) => {
148
- const t = sa(a.color) || Ot.value[r] || me[r] || me[r % me.length];
149
- return {
150
- ...a,
151
- // In distributed mode, all values are converted to positive
152
- series: JSON.parse(JSON.stringify(a.series)).map((l) => e.value.style.chart.bars.distributed ? Math.abs(l) : l),
153
- // Store signs to manage display of neg values in distributed mode
154
- signedSeries: a.series.map((l) => l >= 0 ? 1 : -1),
155
- absoluteIndex: r,
156
- id: yt(),
157
- color: t
158
- };
159
- })), D = w(() => Math.max(...U.value.filter((a) => !S.value.includes(a.id)).map((a) => a.series.length))), h = p({
160
- start: 0,
161
- end: Math.max(...b.dataset.map((a) => a.series.length))
162
- });
163
- function Je() {
164
- qe();
165
- }
166
- async function qe() {
167
- (e.value.style.chart.zoom.startIndex !== null || e.value.style.chart.zoom.endIndex !== null) && j.value ? (e.value.style.chart.zoom.startIndex !== null && (await be(), await be(), j.value && j.value.setStartValue(e.value.style.chart.zoom.startIndex)), e.value.style.chart.zoom.endIndex !== null && (await be(), await be(), j.value && j.value.setEndValue(Rt(e.value.style.chart.zoom.endIndex + 1)))) : (h.value = {
168
- start: 0,
169
- end: Math.max(...b.dataset.map((a) => a.series.length))
170
- }, Re.value += 1);
171
- }
172
- function Rt(a) {
173
- const r = Math.max(...b.dataset.map((t) => t.series.length));
174
- return a > r ? r : a < 0 || e.value.style.chart.zoom.startIndex !== null && a < e.value.style.chart.zoom.startIndex ? e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex + 1 : 1 : a;
175
- }
176
- const d = w(() => {
177
- let a;
178
- return e.value.orientation === "vertical" ? a = o.value.width / (h.value.end - h.value.start) : a = o.value.height / (h.value.end - h.value.start), a <= 0 ? 0 : a;
179
- }), le = w(() => pe(U.value.filter((a) => !S.value.includes(a.id))).slice(h.value.start, h.value.end)), Vt = w(() => pe(U.value.filter((a) => !S.value.includes(a.id)).map((a) => ({
180
- ...a,
181
- series: a.series.map((r, t) => a.signedSeries[t] === -1 && r >= 0 ? -r : r)
182
- }))).slice(h.value.start, h.value.end)), ce = w(() => {
183
- const a = U.value.filter((r) => !S.value.includes(r.id));
184
- return {
185
- positive: pe(a.map((r) => ({
186
- ...r,
187
- series: r.series.slice(h.value.start, h.value.end).map((t) => t >= 0 ? t : 0)
188
- }))),
189
- negative: pe(a.map((r) => ({
190
- ...r,
191
- series: r.series.slice(h.value.start, h.value.end).map((t) => t < 0 ? t : 0)
192
- })))
193
- };
194
- }), P = w(() => {
195
- const a = e.value.style.chart.grid.scale.scaleMax !== null && !e.value.style.chart.bars.distributed ? e.value.style.chart.grid.scale.scaleMax : Math.max(...ce.value.positive), r = Math.min(...ce.value.negative), t = e.value.style.chart.grid.scale.scaleMin !== null && !e.value.style.chart.bars.distributed ? e.value.style.chart.grid.scale.scaleMin : [-1 / 0, 1 / 0, NaN, void 0, null].includes(r) ? 0 : r, l = !e.value.style.chart.bars.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? bt(t > 0 ? 0 : t, a < 0 ? 0 : a, e.value.style.chart.grid.scale.ticks) : ft(t > 0 ? 0 : t, a < 0 ? 0 : a, e.value.style.chart.grid.scale.ticks);
196
- return l.ticks.map((c) => ({
197
- zero: o.value.bottom - o.value.height * (Math.abs(l.min) / (l.max + Math.abs(l.min))),
198
- y: o.value.bottom - o.value.height * ((c + Math.abs(l.min)) / (l.max + Math.abs(l.min))),
199
- x: o.value.left - 8,
200
- horizontal_zero: o.value.left + o.value.width * (Math.abs(l.min) / (l.max + Math.abs(l.min))),
201
- horizontal_x: o.value.left + o.value.width * ((c + Math.abs(l.min)) / (l.max + Math.abs(l.min))),
202
- horizontal_y: o.value.bottom - 8,
203
- value: c
204
- }));
205
- }), $ = w(() => wa({
206
- values: e.value.style.chart.grid.x.timeLabels.values,
207
- maxDatapoints: D.value,
208
- formatter: e.value.style.chart.grid.x.timeLabels.datetimeFormatter,
209
- start: h.value.start,
210
- end: h.value.end
211
- })), k = w(() => {
212
- if (!Q.value) return [];
213
- let a = Array(D.value).fill(0), r = Array(D.value).fill(0), t = Array(D.value).fill(0), l = Array(D.value).fill(0);
214
- const c = Math.max(...ce.value.positive) || 0, u = Math.min(...ce.value.negative), C = [-1 / 0, 1 / 0, NaN, void 0, null].includes(u) ? 0 : u, B = !e.value.style.chart.bars.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? bt(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : C > 0 ? 0 : C, e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : c < 0 ? 0 : c, e.value.style.chart.grid.scale.ticks) : ft(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : C > 0 ? 0 : C, e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : c < 0 ? 0 : c, e.value.style.chart.grid.scale.ticks), { min: W, max: re } = B, Y = re + (W >= 0 ? 0 : Math.abs(W)) || 1, M = o.value.height, ge = o.value.width, nt = P.value[0] ? P.value[0].zero : o.value.bottom, ut = P.value[0] ? P.value[0].horizontal_zero : o.value.left;
215
- return U.value.filter((se) => !S.value.includes(se.id)).map((se) => {
216
- const O = se.series.slice(h.value.start, h.value.end), Ht = se.signedSeries.slice(h.value.start, h.value.end), Bt = O.map((m, x) => o.value.left + d.value * x + d.value * e.value.style.chart.bars.gapRatio / 4), Wt = O.map((m, x) => o.value.top + d.value * x + d.value * e.value.style.chart.bars.gapRatio / 4), Yt = O.map((m, x) => {
217
- const N = e.value.style.chart.bars.distributed ? (m || 0) / le.value[x] : (m || 0) / Y;
218
- let X, I;
219
- return m > 0 ? (I = M * N, X = nt - I - a[x], a[x] += I) : (I = M * N, X = nt + t[x], t[x] += Math.abs(I)), X;
220
- }), Xt = O.map((m, x) => {
221
- const N = e.value.style.chart.bars.distributed ? (m || 0) / le.value[x] : (m || 0) / Y;
222
- let X, I;
223
- return m > 0 ? (I = ge * N, X = ut + r[x], r[x] += I) : (I = ge * N, X = ut - Math.abs(I) - l[x], l[x] += Math.abs(I)), X;
224
- }), Gt = O.map((m, x) => {
225
- const N = e.value.style.chart.bars.distributed ? (m || 0) / le.value[x] : (m || 0) / Y;
226
- return m > 0 ? M * N : M * Math.abs(N);
227
- }), Jt = O.map((m, x) => {
228
- const N = e.value.style.chart.bars.distributed ? (m || 0) / le.value[x] : (m || 0) / Y;
229
- return m > 0 ? ge * N : ge * Math.abs(N);
230
- }), qt = O.map((m) => Math.abs(m)).reduce((m, x) => m + x, 0);
231
- return {
232
- ...se,
233
- proportions: O.map((m, x) => e.value.style.chart.bars.distributed ? (m || 0) / le.value[x] : (m || 0) / qt),
234
- series: O,
235
- signedSeries: Ht,
236
- x: Bt,
237
- y: Yt,
238
- height: Gt,
239
- horizontal_width: Jt,
240
- horizontal_y: Wt,
241
- horizontal_x: Xt
242
- };
243
- });
244
- }), Ze = w(() => Vt.value.map((a, r) => ({
245
- value: a,
246
- sign: a >= 0 ? 1 : -1
247
- })));
248
- function he(a, r, t, l, c) {
249
- const u = c === -1 && a >= 0 ? -a : a;
250
- return ke(
251
- e.value.style.chart.bars.dataLabels.formatter,
252
- u,
253
- K({
254
- p: e.value.style.chart.bars.dataLabels.prefix,
255
- v: u,
256
- s: e.value.style.chart.bars.dataLabels.suffix,
257
- r: e.value.style.chart.bars.dataLabels.rounding
258
- }),
259
- { datapoint: r, seriesIndex: t, datapointIndex: l }
260
- );
261
- }
262
- function Ke(a, r, t, l) {
263
- return ke(
264
- e.value.style.chart.bars.dataLabels.formatter,
265
- a,
266
- K({
267
- v: isNaN(a) ? 0 : a,
268
- s: "%",
269
- r: e.value.style.chart.bars.dataLabels.rounding
270
- }),
271
- { datapoint: r, seriesIndex: t, datapointIndex: l }
272
- );
273
- }
274
- function Qe(a) {
275
- const r = JSON.parse(JSON.stringify(k.value)).map((t) => ({
276
- name: t.name,
277
- value: t.series[a] === 0 ? 0 : t.series[a] || null,
278
- proportion: t.proportions[a] || null,
279
- color: t.color,
280
- id: t.id
281
- }));
282
- ze("selectDatapoint", { datapoint: r, period: $.value[a] });
283
- }
284
- function je(a) {
285
- ae.value = a, ie.value = !0;
286
- const r = e.value.style.chart.tooltip.customFormat, t = JSON.parse(JSON.stringify(k.value)).map((c) => ({
287
- name: c.name,
288
- absoluteIndex: c.absoluteIndex,
289
- value: c.series[a] === 0 ? 0 : (c.signedSeries[a] === -1 && c.series[a] >= 0 ? -c.series[a] : c.series[a]) || null,
290
- proportion: c.proportions[a] || null,
291
- color: c.color,
292
- id: c.id
293
- }));
294
- Le.value = {
295
- datapoint: t,
296
- seriesIndex: a,
297
- config: e.value,
298
- series: k.value
299
- };
300
- const l = t.map((c) => Math.abs(c.value)).reduce((c, u) => c + u, 0);
301
- if (pt(r) && va(() => r({
302
- seriesIndex: a,
303
- datapoint: t,
304
- series: k.value,
305
- config: e.value
306
- })))
307
- Ce.value = r({
308
- seriesIndex: a,
309
- datapoint: t,
310
- series: k.value,
311
- config: e.value
312
- });
313
- else {
314
- const {
315
- showValue: c,
316
- showPercentage: u,
317
- borderColor: C,
318
- roundingValue: B,
319
- roundingPercentage: W
320
- } = e.value.style.chart.tooltip;
321
- let re = "";
322
- $.value[a] && $.value[a].text && e.value.style.chart.tooltip.showTimeLabel && (re += `<div style="width:100%;text-align:center;border-bottom:1px solid ${C};padding-bottom:6px;margin-bottom:3px;">${$.value[a].text}</div>`);
323
- const Y = [
324
- c && u ? "(" : "",
325
- c && u ? ")" : ""
326
- ];
327
- t.reverse().forEach((M) => {
328
- re += `
329
- <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
330
- <svg viewBox="0 0 60 60" height="14" width="14"><rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="${e.value.style.chart.bars.gradient.show ? `url(#gradient_${M.id})` : M.color}"/>${Nt.pattern ? `<rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="url(#pattern_${V.value}_${M.absoluteIndex})"/>` : ""}</svg>
331
- ${M.name}${c || u ? ":" : ""} ${c ? K({
332
- p: e.value.style.chart.bars.dataLabels.prefix,
333
- v: M.value,
334
- s: e.value.style.chart.bars.dataLabels.suffix,
335
- r: B
336
- }) : ""} ${Y[0]}${u ? K({
337
- v: isNaN(M.value / l) ? 0 : Math.abs(M.value) / l * 100,
338
- // Negs are absed to show relative proportion to absolute total. It's opinionated.
339
- s: "%",
340
- r: W
341
- }) : ""}${Y[1]}
342
- </div>
343
- `;
344
- }), Ce.value = `<div>${re}</div>`;
345
- }
346
- }
347
- function et(a) {
348
- ne.value = a, Te.value += 1;
349
- }
350
- function tt() {
351
- L.value.showTable = !L.value.showTable;
352
- }
353
- function at() {
354
- L.value.dataLabels.show = !L.value.dataLabels.show;
355
- }
356
- function lt() {
357
- L.value.showTooltip = !L.value.showTooltip;
358
- }
359
- function At() {
360
- return k.value;
361
- }
362
- const rt = w(() => {
363
- if (k.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
364
- const a = k.value.map(({ name: t, color: l }) => ({
365
- label: t,
366
- color: l
367
- })), r = [];
368
- return $.value.forEach((t) => {
369
- const l = [e.value.style.chart.grid.x.timeLabels.values[t.absoluteIndex] ? t.text : i + 1];
370
- U.value.forEach((c) => {
371
- l.push(Number((c.series[t.absoluteIndex] || 0).toFixed(e.value.table.td.roundingValue)));
372
- }), r.push(l);
373
- }), { head: a, body: r };
374
- });
375
- function st(a = null) {
376
- const r = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], t = ["", ...rt.value.head.map((C) => C.label)], l = rt.value.body, c = r.concat([t]).concat(l), u = ca(c);
377
- a ? a(u) : ha({ csvContent: u, title: e.value.style.chart.title.text || "vue-ui-stackbar" });
378
- }
379
- const ve = w(() => {
380
- const a = [""].concat(k.value.map((c) => c.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');
381
- let r = [];
382
- for (let c = 0; c < D.value; c += 1) {
383
- const u = k.value.map((C) => C.series[c] ?? 0).reduce((C, B) => C + B, 0);
384
- r.push([e.value.style.chart.grid.x.timeLabels.values.slice(h.value.start, h.value.end)[c] ? $.value[c].text : c + 1].concat(k.value.map((C) => (C.series[c] ?? 0).toFixed(e.value.table.td.roundingValue))).concat((u ?? 0).toFixed(e.value.table.td.roundingValue)));
385
- }
386
- const t = {
387
- th: {
388
- backgroundColor: e.value.table.th.backgroundColor,
389
- color: e.value.table.th.color,
390
- outline: e.value.table.th.outline
391
- },
392
- td: {
393
- backgroundColor: e.value.table.td.backgroundColor,
394
- color: e.value.table.td.color,
395
- outline: e.value.table.td.outline
396
- },
397
- breakpoint: e.value.table.responsiveBreakpoint
398
- }, l = [e.value.table.columnNames.period].concat(k.value.map((c) => c.name)).concat(e.value.table.columnNames.total);
399
- return { head: a, body: r.slice(0, h.value.end - h.value.start), config: t, colNames: l };
400
- });
401
- function Ut(a, r) {
402
- if (ze("selectLegend", k.value.find((t) => t.absoluteIndex === a)), S.value.includes(r.id))
403
- S.value = S.value.filter((t) => t !== r.id);
404
- else {
405
- if (S.value.length === U.value.length - 1) return;
406
- S.value.push(r.id);
407
- }
408
- }
409
- const ot = w(() => U.value.map((a, r) => ({
410
- ...a,
411
- shape: "square"
412
- })).map((a) => ({
413
- ...a,
414
- opacity: S.value.includes(a.id) ? 0.5 : 1,
415
- segregate: () => Ut(a.absoluteIndex, a),
416
- isSegregated: S.value.includes(a.id)
417
- }))), Dt = w(() => ({
418
- cy: "stackbar-legend",
419
- backgroundColor: e.value.style.chart.legend.backgroundColor,
420
- color: e.value.style.chart.legend.color,
421
- fontSize: e.value.style.chart.legend.fontSize,
422
- paddingBottom: 12,
423
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
424
- })), de = p(!1);
425
- function $e() {
426
- de.value = !de.value;
427
- }
428
- function ye(a, r) {
429
- const t = JSON.parse(JSON.stringify(k.value)).map((l) => ({
430
- name: l.name,
431
- value: l.series[r] === 0 ? 0 : (l.signedSeries[r] === -1 && l.series[r] >= 0 ? -l.series[r] : l.series[r]) || null,
432
- proportion: l.proportions[r] || null,
433
- color: l.color,
434
- id: l.id
435
- }));
436
- ze("selectTimeLabel", {
437
- datapoint: t,
438
- absoluteIndex: a.absoluteIndex,
439
- label: a.text
440
- });
441
- }
442
- const Ft = w(() => Math.max(...k.value.flatMap((a) => a.series)));
443
- function it(a, r) {
444
- return e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? He.value ? r * 100 >= e.value.style.chart.bars.dataLabels.hideUnderPercentage : e.value.style.chart.bars.dataLabels.hideEmptyPercentages ? r > 0 : !0 : He.value ? (Ee.value && console.warn("Vue Data UI - VueUiStackbar - You cannot set both dataLabels.hideUnderPercentage and dataLabels.hideUnderValue. Note that dataLabels.hideUnderPercentage takes precedence in this case."), a > Ft.value * e.value.style.chart.bars.dataLabels.hideUnderPercentage / 100) : Ee.value ? Math.abs(a) >= e.value.style.chart.bars.dataLabels.hideUnderValue : e.value.style.chart.bars.dataLabels.hideEmptyValues ? a !== 0 : !0;
445
- }
446
- async function Et({ scale: a = 2 } = {}) {
447
- if (!R.value) return;
448
- const { width: r, height: t } = R.value.getBoundingClientRect(), l = r / t, { imageUri: c, base64: u } = await za({ domElement: R.value, base64: !0, img: !0, scale: a });
449
- return {
450
- imageUri: c,
451
- base64: u,
452
- title: e.value.style.chart.title.text,
453
- width: r,
454
- height: t,
455
- aspectRatio: l
456
- };
457
- }
458
- return kt({
459
- getData: At,
460
- getImage: Et,
461
- generatePdf: Ye,
462
- generateCsv: st,
463
- generateImage: Xe,
464
- toggleTable: tt,
465
- toggleLabels: at,
466
- toggleTooltip: lt,
467
- toggleAnnotator: $e,
468
- toggleFullscreen: et
469
- }), (a, r) => (s(), n("div", {
470
- id: `stackbar_${V.value}`,
471
- ref_key: "stackbarChart",
472
- ref: R,
473
- class: oe({ "vue-ui-stackbar": !0, "vue-data-ui-wrapper-fullscreen": ne.value }),
474
- style: J(`background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color};font-family:${e.value.style.fontFamily}; position: relative; ${e.value.responsive ? "height: 100%" : ""}`),
475
- onMouseenter: r[6] || (r[6] = () => y(Ae)(!0)),
476
- onMouseleave: r[7] || (r[7] = () => y(Ae)(!1))
477
- }, [
478
- e.value.userOptions.buttons.annotator ? (s(), q(y(_t), {
479
- key: 0,
480
- svgRef: y(De),
481
- backgroundColor: e.value.style.chart.backgroundColor,
482
- color: e.value.style.chart.color,
483
- active: de.value,
484
- onClose: $e
485
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : g("", !0),
486
- z(a.$slots, "userConfig", {}, void 0, !0),
487
- e.value.style.chart.title.text ? (s(), n("div", {
488
- key: 1,
489
- ref_key: "chartTitle",
490
- ref: Ne,
491
- style: "width:100%;background:transparent;padding-bottom:24px"
492
- }, [
493
- (s(), q(xa, {
494
- key: `title_${Ve.value}`,
495
- config: {
496
- title: {
497
- cy: "stackbar-title",
498
- ...e.value.style.chart.title
499
- },
500
- subtitle: {
501
- cy: "stackbar-subtitle",
502
- ...e.value.style.chart.title.subtitle
503
- }
504
- }
505
- }, null, 8, ["config"]))
506
- ], 512)) : g("", !0),
507
- e.value.userOptions.show && Q.value && (y(Ue) || y(_e)) ? (s(), q(y(Mt), {
508
- ref: "details",
509
- key: `user_option_${Te.value}`,
510
- backgroundColor: e.value.style.chart.backgroundColor,
511
- color: e.value.style.chart.color,
512
- isPrinting: y(Be),
513
- isImaging: y(We),
514
- uid: V.value,
515
- hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
516
- hasPdf: e.value.userOptions.buttons.pdf,
517
- hasImg: e.value.userOptions.buttons.img,
518
- hasXls: e.value.userOptions.buttons.csv,
519
- hasTable: e.value.userOptions.buttons.table,
520
- hasLabel: e.value.userOptions.buttons.labels,
521
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
522
- isFullscreen: ne.value,
523
- chartElement: R.value,
524
- position: e.value.userOptions.position,
525
- isTooltip: L.value.showTooltip,
526
- titles: { ...e.value.userOptions.buttonTitles },
527
- hasAnnotator: e.value.userOptions.buttons.annotator,
528
- isAnnotation: de.value,
529
- callbacks: e.value.userOptions.callbacks,
530
- printScale: e.value.userOptions.print.scale,
531
- onToggleFullscreen: et,
532
- onGeneratePdf: y(Ye),
533
- onGenerateCsv: st,
534
- onGenerateImage: y(Xe),
535
- onToggleTable: tt,
536
- onToggleLabels: at,
537
- onToggleTooltip: lt,
538
- onToggleAnnotator: $e,
539
- style: J({
540
- visibility: y(Ue) ? y(_e) ? "visible" : "hidden" : "visible"
541
- })
542
- }, dt({ _: 2 }, [
543
- a.$slots.menuIcon ? {
544
- name: "menuIcon",
545
- fn: _(({ isOpen: t, color: l }) => [
546
- z(a.$slots, "menuIcon", F(E({ isOpen: t, color: l })), void 0, !0)
547
- ]),
548
- key: "0"
549
- } : void 0,
550
- a.$slots.optionTooltip ? {
551
- name: "optionTooltip",
552
- fn: _(() => [
553
- z(a.$slots, "optionTooltip", {}, void 0, !0)
554
- ]),
555
- key: "1"
556
- } : void 0,
557
- a.$slots.optionPdf ? {
558
- name: "optionPdf",
559
- fn: _(() => [
560
- z(a.$slots, "optionPdf", {}, void 0, !0)
561
- ]),
562
- key: "2"
563
- } : void 0,
564
- a.$slots.optionCsv ? {
565
- name: "optionCsv",
566
- fn: _(() => [
567
- z(a.$slots, "optionCsv", {}, void 0, !0)
568
- ]),
569
- key: "3"
570
- } : void 0,
571
- a.$slots.optionImg ? {
572
- name: "optionImg",
573
- fn: _(() => [
574
- z(a.$slots, "optionImg", {}, void 0, !0)
575
- ]),
576
- key: "4"
577
- } : void 0,
578
- a.$slots.optionTable ? {
579
- name: "optionTable",
580
- fn: _(() => [
581
- z(a.$slots, "optionTable", {}, void 0, !0)
582
- ]),
583
- key: "5"
584
- } : void 0,
585
- a.$slots.optionLabels ? {
586
- name: "optionLabels",
587
- fn: _(() => [
588
- z(a.$slots, "optionLabels", {}, void 0, !0)
589
- ]),
590
- key: "6"
591
- } : void 0,
592
- a.$slots.optionFullscreen ? {
593
- name: "optionFullscreen",
594
- fn: _(({ toggleFullscreen: t, isFullscreen: l }) => [
595
- z(a.$slots, "optionFullscreen", F(E({ toggleFullscreen: t, isFullscreen: l })), void 0, !0)
596
- ]),
597
- key: "7"
598
- } : void 0,
599
- a.$slots.optionAnnotator ? {
600
- name: "optionAnnotator",
601
- fn: _(({ toggleAnnotator: t, isAnnotator: l }) => [
602
- z(a.$slots, "optionAnnotator", F(E({ toggleAnnotator: t, isAnnotator: l })), void 0, !0)
603
- ]),
604
- key: "8"
605
- } : void 0
606
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : g("", !0),
607
- Q.value ? (s(), n("svg", {
608
- key: 3,
609
- ref_key: "svgRef",
610
- ref: De,
611
- xmlns: y(oa),
612
- viewBox: `0 0 ${o.value.chartWidth <= 0 ? 10 : o.value.chartWidth} ${o.value.chartHeight <= 0 ? 10 : o.value.chartHeight}`,
613
- style: J(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
614
- }, [
615
- fe(y(Ct)),
616
- a.$slots["chart-background"] ? (s(), n("foreignObject", {
617
- key: 0,
618
- x: o.value.left,
619
- y: o.value.top,
620
- width: o.value.width <= 0 ? 10 : o.value.width,
621
- height: o.value.height <= 0 ? 10 : o.value.height,
622
- style: {
623
- pointerEvents: "none"
624
- }
625
- }, [
626
- z(a.$slots, "chart-background", {}, void 0, !0)
627
- ], 8, Sa)) : g("", !0),
628
- e.value.style.chart.bars.gradient.show ? (s(), n("defs", $a, [
629
- (s(!0), n(v, null, f(k.value, (t, l) => (s(), n("linearGradient", {
630
- id: `gradient_${t.id}`,
631
- x1: "0%",
632
- y1: "0%",
633
- x2: "0%",
634
- y2: "100%"
635
- }, [
636
- Z("stop", {
637
- offset: "0%",
638
- "stop-color": t.color
639
- }, null, 8, Ta),
640
- Z("stop", {
641
- offset: "61.8%",
642
- "stop-color": y(ia)(t.color, e.value.style.chart.bars.gradient.intensity / 100)
643
- }, null, 8, Na),
644
- Z("stop", {
645
- offset: "100%",
646
- "stop-color": t.color
647
- }, null, 8, Ia)
648
- ], 8, Ma))), 256))
649
- ])) : g("", !0),
650
- e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "vertical" ? (s(!0), n(v, { key: 2 }, f(P.value, (t, l) => (s(), n("line", {
651
- x1: o.value.left,
652
- x2: o.value.right,
653
- y1: t.y,
654
- y2: t.y,
655
- stroke: e.value.style.chart.grid.x.linesColor,
656
- "stroke-width": e.value.style.chart.grid.x.linesThickness,
657
- "stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
658
- "stroke-linecap": "round"
659
- }, null, 8, Pa))), 256)) : g("", !0),
660
- e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "horizontal" ? (s(!0), n(v, { key: 3 }, f(h.value.end - h.value.start + 1, (t, l) => (s(), n("line", {
661
- x1: o.value.left,
662
- x2: o.value.right,
663
- y1: o.value.top + d.value * l,
664
- y2: o.value.top + d.value * l,
665
- stroke: e.value.style.chart.grid.x.linesColor,
666
- "stroke-width": e.value.style.chart.grid.x.linesThickness,
667
- "stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
668
- "stroke-linecap": "round"
669
- }, null, 8, Oa))), 256)) : g("", !0),
670
- e.value.style.chart.grid.y.showVerticalLines && e.value.orientation === "vertical" ? (s(!0), n(v, { key: 4 }, f(h.value.end - h.value.start + 1, (t, l) => (s(), n("line", {
671
- x1: o.value.left + d.value * l,
672
- x2: o.value.left + d.value * l,
673
- y1: o.value.top,
674
- y2: o.value.bottom,
675
- stroke: e.value.style.chart.grid.y.linesColor,
676
- "stroke-width": e.value.style.chart.grid.y.linesThickness,
677
- "stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
678
- "stroke-linecap": "round"
679
- }, null, 8, Ra))), 256)) : g("", !0),
680
- e.value.style.chart.grid.y.showVerticalLines && e.value.orientation === "horizontal" ? (s(!0), n(v, { key: 5 }, f(P.value, (t, l) => (s(), n("line", {
681
- x1: t.horizontal_x,
682
- x2: t.horizontal_x,
683
- y1: o.value.top,
684
- y2: o.value.bottom,
685
- stroke: e.value.style.chart.grid.y.linesColor,
686
- "stroke-width": e.value.style.chart.grid.y.linesThickness,
687
- "stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
688
- "stroke-linecap": "round"
689
- }, null, 8, Va))), 256)) : g("", !0),
690
- (s(!0), n(v, null, f(k.value, (t, l) => (s(), n("g", null, [
691
- a.$slots.pattern ? (s(), n("defs", Aa, [
692
- z(a.$slots, "pattern", Me({ ref_for: !0 }, { seriesIndex: t.absoluteIndex, patternId: `pattern_${V.value}_${t.absoluteIndex}` }), void 0, !0)
693
- ])) : g("", !0),
694
- e.value.orientation === "vertical" ? (s(), n(v, { key: 1 }, [
695
- (s(!0), n(v, null, f(t.x, (c, u) => (s(), n("rect", {
696
- x: c,
697
- y: t.y[u] < 0 ? 0 : t.y[u],
698
- height: t.height[u] < 0 ? 1e-4 : t.height[u] || 0,
699
- rx: e.value.style.chart.bars.borderRadius > t.height[u] / 2 ? (t.height[u] < 0 ? 0 : t.height[u]) / 2 : e.value.style.chart.bars.borderRadius,
700
- width: d.value * (1 - e.value.style.chart.bars.gapRatio / 2),
701
- fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${t.id})` : t.color,
702
- stroke: e.value.style.chart.backgroundColor,
703
- "stroke-width": e.value.style.chart.bars.strokeWidth,
704
- "stroke-linecap": "round",
705
- "stroke-linejoin": "round",
706
- class: oe({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": H.value })
707
- }, null, 10, Ua))), 256)),
708
- a.$slots.pattern ? (s(), n("g", Da, [
709
- (s(!0), n(v, null, f(t.x, (c, u) => (s(), n("rect", {
710
- x: c,
711
- y: t.y[u] < 0 ? 0 : t.y[u],
712
- height: t.height[u] < 0 ? 1e-4 : t.height[u] || 0,
713
- rx: e.value.style.chart.bars.borderRadius > t.height[u] / 2 ? (t.height[u] < 0 ? 0 : t.height[u]) / 2 : e.value.style.chart.bars.borderRadius,
714
- width: d.value * (1 - e.value.style.chart.bars.gapRatio / 2),
715
- fill: `url(#pattern_${V.value}_${t.absoluteIndex})`,
716
- stroke: e.value.style.chart.backgroundColor,
717
- "stroke-width": e.value.style.chart.bars.strokeWidth,
718
- "stroke-linecap": "round",
719
- "stroke-linejoin": "round",
720
- class: oe({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": H.value })
721
- }, null, 10, Fa))), 256))
722
- ])) : g("", !0)
723
- ], 64)) : (s(), n(v, { key: 2 }, [
724
- (s(!0), n(v, null, f(t.horizontal_x, (c, u) => (s(), n("rect", {
725
- x: y(xe)(c, o.value.left),
726
- y: t.horizontal_y[u] < 0 ? 0 : t.horizontal_y[u],
727
- width: y(xe)(t.horizontal_width[u] < 0 ? 1e-4 : t.horizontal_width[u]),
728
- rx: e.value.style.chart.bars.borderRadius > t.height[u] / 2 ? (t.height[u] < 0 ? 0 : t.height[u]) / 2 : e.value.style.chart.bars.borderRadius,
729
- height: d.value * (1 - e.value.style.chart.bars.gapRatio / 2),
730
- fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${t.id})` : t.color,
731
- stroke: e.value.style.chart.backgroundColor,
732
- "stroke-width": e.value.style.chart.bars.strokeWidth,
733
- "stroke-linecap": "round",
734
- "stroke-linejoin": "round",
735
- class: oe({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": H.value })
736
- }, null, 10, Ea))), 256)),
737
- a.$slots.pattern ? (s(), n("g", Ha, [
738
- (s(!0), n(v, null, f(t.horizontal_x, (c, u) => (s(), n("rect", {
739
- x: y(xe)(c, o.value.left),
740
- y: t.horizontal_y[u] < 0 ? 0 : t.horizontal_y[u],
741
- width: y(xe)(t.horizontal_width[u] < 0 ? 1e-4 : t.horizontal_width[u]),
742
- rx: e.value.style.chart.bars.borderRadius > t.height[u] / 2 ? (t.height[u] < 0 ? 0 : t.height[u]) / 2 : e.value.style.chart.bars.borderRadius,
743
- height: d.value * (1 - e.value.style.chart.bars.gapRatio / 2),
744
- fill: `url(#pattern_${V.value}_${t.absoluteIndex})`,
745
- stroke: e.value.style.chart.backgroundColor,
746
- "stroke-width": e.value.style.chart.bars.strokeWidth,
747
- "stroke-linecap": "round",
748
- "stroke-linejoin": "round",
749
- class: oe({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": H.value })
750
- }, null, 10, Ba))), 256))
751
- ])) : g("", !0)
752
- ], 64))
753
- ]))), 256)),
754
- e.value.style.chart.grid.x.showAxis ? (s(), n("line", {
755
- key: 6,
756
- x1: o.value.left,
757
- x2: o.value.right,
758
- y1: o.value.bottom,
759
- y2: o.value.bottom,
760
- stroke: e.value.style.chart.grid.x.axisColor,
761
- "stroke-width": e.value.style.chart.grid.x.axisThickness,
762
- "stroke-linecap": "round",
763
- "stroke-linejoin": "round"
764
- }, null, 8, Wa)) : g("", !0),
765
- e.value.style.chart.grid.y.showAxis && !e.value.style.chart.bars.distributed ? (s(), n("line", {
766
- key: 7,
767
- x1: o.value.left,
768
- x2: o.value.left,
769
- y1: o.value.top,
770
- y2: o.value.bottom,
771
- stroke: e.value.style.chart.grid.y.axisColor,
772
- "stroke-width": e.value.style.chart.grid.y.axisThickness,
773
- "stroke-linecap": "round",
774
- "stroke-linejoin": "round"
775
- }, null, 8, Ya)) : g("", !0),
776
- e.value.style.chart.grid.x.axisName.show && e.value.style.chart.grid.x.axisName.text ? (s(), n("text", {
777
- key: 8,
778
- x: o.value.left + o.value.width / 2,
779
- y: o.value.chartHeight + e.value.style.chart.grid.x.axisName.offsetY,
780
- "font-size": e.value.style.chart.grid.x.axisName.fontSize,
781
- fill: e.value.style.chart.grid.x.axisName.color,
782
- "font-weight": e.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
783
- "text-anchor": "middle"
784
- }, T(e.value.style.chart.grid.x.axisName.text), 9, Xa)) : g("", !0),
785
- e.value.style.chart.grid.y.axisName.show && e.value.style.chart.grid.y.axisName.text ? (s(), n("text", {
786
- key: 9,
787
- transform: `translate(${e.value.style.chart.grid.y.axisName.fontSize + e.value.style.chart.grid.y.axisName.offsetX}, ${o.value.top + o.value.height / 2}) rotate(-90)`,
788
- "font-size": e.value.style.chart.grid.y.axisName.fontSize,
789
- fill: e.value.style.chart.grid.y.axisName.color,
790
- "font-weight": e.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
791
- "text-anchor": "middle"
792
- }, T(e.value.style.chart.grid.y.axisName.text), 9, Ga)) : g("", !0),
793
- L.value.dataLabels.show && e.value.orientation === "vertical" ? (s(), n(v, { key: 10 }, [
794
- (s(!0), n(v, null, f(k.value, (t, l) => (s(), n("g", null, [
795
- (s(!0), n(v, null, f(t.x, (c, u) => (s(), n(v, null, [
796
- it(t.series[u], t.proportions[u]) ? (s(), n("text", {
797
- key: 0,
798
- x: c + d.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2,
799
- y: t.y[u] + t.height[u] / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
800
- "font-size": e.value.style.chart.bars.dataLabels.fontSize,
801
- fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? y(mt)(t.color) : e.value.style.chart.bars.dataLabels.color,
802
- "font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
803
- "text-anchor": "middle"
804
- }, T(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? Ke(t.proportions[u] * 100, t, l, u) : he(t.series[u], t, l, u, t.signedSeries[u])), 9, Ja)) : g("", !0)
805
- ], 64))), 256))
806
- ]))), 256)),
807
- e.value.style.chart.bars.totalValues.show && k.value.length > 1 ? (s(), n("g", qa, [
808
- (s(!0), n(v, null, f(Ze.value, (t, l) => (s(), n(v, null, [
809
- !e.value.style.chart.bars.dataLabels.hideEmptyValues || t.value !== 0 ? (s(), n("text", {
810
- key: 0,
811
- x: o.value.left + d.value * l + d.value / 2,
812
- y: o.value.top - e.value.style.chart.bars.totalValues.fontSize / 3,
813
- "text-anchor": "middle",
814
- "font-size": e.value.style.chart.bars.totalValues.fontSize,
815
- "font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
816
- fill: e.value.style.chart.bars.totalValues.color
817
- }, T(he(t.value, t, l, t.sign)), 9, Za)) : g("", !0)
818
- ], 64))), 256))
819
- ])) : g("", !0)
820
- ], 64)) : g("", !0),
821
- L.value.dataLabels.show && e.value.orientation === "horizontal" ? (s(), n(v, { key: 11 }, [
822
- (s(!0), n(v, null, f(k.value, (t, l) => (s(), n("g", null, [
823
- (s(!0), n(v, null, f(t.horizontal_x, (c, u) => (s(), n(v, null, [
824
- it(t.series[u], t.proportions[u]) ? (s(), n("text", {
825
- key: 0,
826
- x: c + (t.horizontal_width[u] < 0 ? 1e-4 : t.horizontal_width[u]) / 2,
827
- y: t.horizontal_y[u] + d.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
828
- "font-size": e.value.style.chart.bars.dataLabels.fontSize,
829
- fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? y(mt)(t.color) : e.value.style.chart.bars.dataLabels.color,
830
- "font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
831
- "text-anchor": "middle"
832
- }, T(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? Ke(t.proportions[u] * 100, t, l, u) : he(t.series[u], t, l, u, t.signedSeries[u])), 9, Ka)) : g("", !0)
833
- ], 64))), 256))
834
- ]))), 256)),
835
- e.value.style.chart.bars.totalValues.show && k.value.length > 1 ? (s(), n("g", Qa, [
836
- (s(!0), n(v, null, f(Ze.value, (t, l) => (s(), n(v, null, [
837
- !e.value.style.chart.bars.dataLabels.hideEmptyValues || t.value !== 0 ? (s(), n("text", {
838
- key: 0,
839
- x: o.value.right + e.value.style.chart.bars.totalValues.fontSize / 3,
840
- y: o.value.top + d.value * l + d.value / 2,
841
- "text-anchor": "start",
842
- "font-size": e.value.style.chart.bars.totalValues.fontSize,
843
- "font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
844
- fill: e.value.style.chart.bars.totalValues.color
845
- }, T(he(t.value, t, l, t.sign)), 9, ja)) : g("", !0)
846
- ], 64))), 256))
847
- ])) : g("", !0)
848
- ], 64)) : g("", !0),
849
- e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "vertical" ? (s(), n(v, { key: 12 }, [
850
- (s(!0), n(v, null, f(P.value, (t, l) => (s(), n("line", {
851
- x1: o.value.left,
852
- x2: o.value.left - 6,
853
- y1: t.y,
854
- y2: t.y,
855
- stroke: e.value.style.chart.grid.x.axisColor,
856
- "stroke-width": 1
857
- }, null, 8, el))), 256)),
858
- (s(!0), n(v, null, f(P.value, (t, l) => (s(), n("text", {
859
- x: t.x,
860
- y: t.y + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
861
- "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
862
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
863
- fill: e.value.style.chart.grid.y.axisLabels.color,
864
- "text-anchor": "end"
865
- }, T(y(ke)(
866
- e.value.style.chart.grid.y.axisLabels.formatter,
867
- t.value,
868
- y(K)({
869
- p: e.value.style.chart.bars.dataLabels.prefix,
870
- v: t.value,
871
- s: e.value.style.chart.bars.dataLabels.suffix,
872
- r: e.value.style.chart.grid.y.axisLabels.rounding
873
- }),
874
- { datapoint: t }
875
- )), 9, tl))), 256))
876
- ], 64)) : g("", !0),
877
- e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "horizontal" ? (s(), n(v, { key: 13 }, [
878
- (s(!0), n(v, null, f(P.value, (t, l) => (s(), n("line", {
879
- x1: t.horizontal_x,
880
- x2: t.horizontal_x,
881
- y1: o.value.bottom,
882
- y2: o.value.bottom + 6,
883
- stroke: e.value.style.chart.grid.x.axisColor,
884
- "stroke-width": 1,
885
- "stroke-linecap": "round"
886
- }, null, 8, al))), 256)),
887
- (s(!0), n(v, null, f(P.value, (t, l) => (s(), n("text", {
888
- "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
889
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
890
- fill: e.value.style.chart.grid.y.axisLabels.color,
891
- "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
892
- transform: `translate(${t.horizontal_x}, ${o.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`
893
- }, T(y(ke)(
894
- e.value.style.chart.grid.y.axisLabels.formatter,
895
- t.value,
896
- y(K)({
897
- p: e.value.style.chart.bars.dataLabels.prefix,
898
- v: t.value,
899
- s: e.value.style.chart.bars.dataLabels.suffix,
900
- r: e.value.style.chart.grid.y.axisLabels.rounding
901
- }),
902
- { datapoint: t }
903
- )), 9, ll))), 256))
904
- ], 64)) : g("", !0),
905
- e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "vertical" ? (s(), n(v, { key: 14 }, [
906
- a.$slots["time-label"] ? (s(), n("g", rl, [
907
- (s(!0), n(v, null, f($.value, (t, l) => (s(), n("g", null, [
908
- z(a.$slots, "time-label", Me({ ref_for: !0 }, {
909
- x: o.value.left + d.value * l + d.value / 2,
910
- y: o.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY,
911
- fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
912
- fill: e.value.style.chart.grid.x.timeLabels.color,
913
- transform: `translate(${o.value.left + d.value * l + d.value / 2}, ${o.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`,
914
- absoluteIndex: t.absoluteIndex,
915
- content: t.text,
916
- textAnchor: e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
917
- show: !0
918
- }), void 0, !0)
919
- ]))), 256))
920
- ])) : (s(), n("g", sl, [
921
- (s(!0), n(v, null, f($.value, (t, l) => (s(), n("g", null, [
922
- String(t.text).includes(`
923
- `) ? (s(), n("text", {
924
- key: l + "-multi",
925
- "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
926
- "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
927
- fill: e.value.style.chart.grid.x.timeLabels.color,
928
- transform: `
929
- translate(
930
- ${o.value.left + d.value * l + d.value / 2},
931
- ${o.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}
932
- ),
933
- rotate(${e.value.style.chart.grid.x.timeLabels.rotation})
934
- `,
935
- style: { cursor: "pointer" },
936
- innerHTML: y(na)({
937
- content: String(t.text),
938
- fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
939
- fill: e.value.style.chart.grid.x.timeLabels.color,
940
- x: 0,
941
- y: 0
942
- }),
943
- onClick: () => ye(t, l)
944
- }, null, 8, il)) : (s(), n("text", {
945
- key: l,
946
- "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
947
- "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
948
- "font-weight": e.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
949
- fill: e.value.style.chart.grid.x.timeLabels.color,
950
- transform: `translate(${o.value.left + d.value * l + d.value / 2}, ${o.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`,
951
- style: { cursor: "pointer" },
952
- onClick: () => ye(t, l)
953
- }, T(t.text), 9, ol))
954
- ]))), 256))
955
- ]))
956
- ], 64)) : g("", !0),
957
- e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "horizontal" ? (s(), n(v, { key: 15 }, [
958
- a.$slots["time-label"] ? (s(), n("g", nl, [
959
- (s(!0), n(v, null, f($.value, (t, l) => (s(), n("g", null, [
960
- z(a.$slots, "time-label", Me({ ref_for: !0 }, {
961
- x: o.value.left - 8,
962
- y: o.value.top + d.value * l + d.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
963
- fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
964
- fill: e.value.style.chart.grid.x.timeLabels.color,
965
- transform: null,
966
- absoluteIndex: t.absoluteIndex,
967
- content: t.text,
968
- textAnchor: "end",
969
- show: !0
970
- }), void 0, !0)
971
- ]))), 256))
972
- ])) : (s(), n("g", ul, [
973
- (s(!0), n(v, null, f($.value, (t, l) => (s(), n("g", null, [
974
- String(t.text).includes(`
975
- `) ? (s(), n("text", {
976
- key: 1,
977
- "text-anchor": "end",
978
- "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
979
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
980
- fill: e.value.style.chart.grid.y.axisLabels.color,
981
- x: o.value.left - 8,
982
- y: o.value.top + d.value * l + d.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
983
- style: { cursor: "pointer" },
984
- onClick: () => ye(t, l),
985
- innerHTML: y(ua)({
986
- content: String(t.text),
987
- fontSize: e.value.style.chart.grid.y.axisLabels.fontSize,
988
- fill: e.value.style.chart.grid.y.axisLabels.color,
989
- x: o.value.left - 8,
990
- y: 0
991
- })
992
- }, null, 8, hl)) : (s(), n("text", {
993
- key: 0,
994
- "text-anchor": "end",
995
- "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
996
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
997
- fill: e.value.style.chart.grid.y.axisLabels.color,
998
- x: o.value.left - 8,
999
- y: o.value.top + d.value * l + d.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1000
- style: {
1001
- cursor: "pointer"
1002
- },
1003
- onClick: () => ye(t, l)
1004
- }, T(t.text), 9, cl))
1005
- ]))), 256))
1006
- ]))
1007
- ], 64)) : g("", !0),
1008
- L.value.showTooltip && e.value.orientation === "vertical" ? (s(!0), n(v, { key: 16 }, f(h.value.end - h.value.start, (t, l) => (s(), n("rect", {
1009
- x: o.value.left + l * d.value,
1010
- y: o.value.top,
1011
- width: d.value,
1012
- height: o.value.height < 0 ? 0 : o.value.height,
1013
- onClick: (c) => Qe(l),
1014
- onMouseenter: (c) => je(l),
1015
- onMouseleave: r[0] || (r[0] = (c) => {
1016
- ae.value = null, ie.value = !1;
1017
- }),
1018
- fill: l === ae.value ? e.value.style.chart.highlighter.color : "transparent",
1019
- style: J({ opacity: e.value.style.chart.highlighter.opacity / 100 })
1020
- }, null, 44, vl))), 256)) : g("", !0),
1021
- L.value.showTooltip && e.value.orientation === "horizontal" ? (s(!0), n(v, { key: 17 }, f(h.value.end - h.value.start, (t, l) => (s(), n("rect", {
1022
- x: o.value.left,
1023
- y: o.value.top + l * d.value,
1024
- width: o.value.width < 0 ? 0 : o.value.width,
1025
- height: d.value,
1026
- onClick: (c) => Qe(l),
1027
- onMouseenter: (c) => je(l),
1028
- onMouseleave: r[1] || (r[1] = (c) => {
1029
- ae.value = null, ie.value = !1;
1030
- }),
1031
- fill: l === ae.value ? e.value.style.chart.highlighter.color : "transparent",
1032
- style: J({ opacity: e.value.style.chart.highlighter.opacity / 100 })
1033
- }, null, 44, dl))), 256)) : g("", !0),
1034
- z(a.$slots, "svg", F(E({ ...o.value })), void 0, !0)
1035
- ], 12, _a)) : g("", !0),
1036
- a.$slots.watermark ? (s(), n("div", yl, [
1037
- z(a.$slots, "watermark", F(E({ isPrinting: y(Be) || y(We) })), void 0, !0)
1038
- ])) : g("", !0),
1039
- Q.value ? g("", !0) : (s(), q(y(St), {
1040
- key: 5,
1041
- config: {
1042
- type: "bar",
1043
- style: {
1044
- backgroundColor: e.value.style.chart.backgroundColor,
1045
- bar: {
1046
- axis: {
1047
- color: "#CCCCCC"
1048
- },
1049
- color: "#CCCCCC"
1050
- }
1051
- }
1052
- }
1053
- }, null, 8, ["config"])),
1054
- Z("div", {
1055
- ref_key: "chartSlicer",
1056
- ref: Pe,
1057
- style: J(`width:100%;background:${e.value.style.chart.backgroundColor}`),
1058
- "data-dom-to-png-ignore": ""
1059
- }, [
1060
- e.value.style.chart.zoom.show && D.value > 1 ? (s(), q(pa, {
1061
- ref_key: "slicerComponent",
1062
- ref: j,
1063
- key: `slicer_${Re.value}`,
1064
- background: e.value.style.chart.zoom.color,
1065
- borderColor: e.value.style.chart.backgroundColor,
1066
- fontSize: e.value.style.chart.zoom.fontSize,
1067
- useResetSlot: e.value.style.chart.zoom.useResetSlot,
1068
- labelLeft: e.value.style.chart.grid.x.timeLabels.values[h.value.start] ? $.value[0].text : "",
1069
- labelRight: e.value.style.chart.grid.x.timeLabels.values[h.value.end - 1] ? $.value.at(-1).text : "",
1070
- textColor: e.value.style.chart.color,
1071
- inputColor: e.value.style.chart.zoom.color,
1072
- selectColor: e.value.style.chart.zoom.highlightColor,
1073
- max: Math.max(...we.dataset.map((t) => t.series.length)),
1074
- min: 0,
1075
- valueStart: h.value.start,
1076
- valueEnd: h.value.end,
1077
- start: h.value.start,
1078
- "onUpdate:start": r[2] || (r[2] = (t) => h.value.start = t),
1079
- end: h.value.end,
1080
- "onUpdate:end": r[3] || (r[3] = (t) => h.value.end = t),
1081
- refreshStartPoint: e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex : 0,
1082
- refreshEndPoint: e.value.style.chart.zoom.endIndex !== null ? e.value.style.chart.zoom.endIndex + 1 : Math.max(...we.dataset.map((t) => t.series.length)),
1083
- enableRangeHandles: e.value.style.chart.zoom.enableRangeHandles,
1084
- enableSelectionDrag: e.value.style.chart.zoom.enableSelectionDrag,
1085
- onReset: Je
1086
- }, {
1087
- "reset-action": _(({ reset: t }) => [
1088
- z(a.$slots, "reset-action", F(E({ reset: t })), void 0, !0)
1089
- ]),
1090
- _: 3
1091
- }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"])) : g("", !0)
1092
- ], 4),
1093
- fe(y($t), {
1094
- show: L.value.showTooltip && ie.value,
1095
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1096
- color: e.value.style.chart.tooltip.color,
1097
- fontSize: e.value.style.chart.tooltip.fontSize,
1098
- borderRadius: e.value.style.chart.tooltip.borderRadius,
1099
- borderColor: e.value.style.chart.tooltip.borderColor,
1100
- borderWidth: e.value.style.chart.tooltip.borderWidth,
1101
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1102
- position: e.value.style.chart.tooltip.position,
1103
- offsetY: e.value.style.chart.tooltip.offsetY,
1104
- parent: R.value,
1105
- content: Ce.value,
1106
- isFullscreen: ne.value,
1107
- isCustom: y(pt)(e.value.style.chart.tooltip.customFormat)
1108
- }, {
1109
- "tooltip-before": _(() => [
1110
- z(a.$slots, "tooltip-before", F(E({ ...Le.value })), void 0, !0)
1111
- ]),
1112
- "tooltip-after": _(() => [
1113
- z(a.$slots, "tooltip-after", F(E({ ...Le.value })), void 0, !0)
1114
- ]),
1115
- _: 3
1116
- }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
1117
- Z("div", {
1118
- ref_key: "chartLegend",
1119
- ref: Ie
1120
- }, [
1121
- e.value.style.chart.legend.show && Q.value ? (s(), q(ma, {
1122
- key: 0,
1123
- legendSet: ot.value,
1124
- config: Dt.value,
1125
- onClickMarker: r[4] || (r[4] = ({ legend: t }) => t.segregate())
1126
- }, dt({
1127
- item: _(({ legend: t }) => [
1128
- Z("div", {
1129
- onClick: (l) => t.segregate(),
1130
- style: J(`opacity:${S.value.includes(t.id) ? 0.5 : 1}`)
1131
- }, T(t.name), 13, gl)
1132
- ]),
1133
- _: 2
1134
- }, [
1135
- a.$slots.pattern ? {
1136
- name: "legend-pattern",
1137
- fn: _(({ legend: t, index: l }) => [
1138
- fe(ka, {
1139
- shape: t.shape,
1140
- radius: 30,
1141
- stroke: "none",
1142
- plot: { x: 30, y: 30 },
1143
- fill: `url(#pattern_${V.value}_${l})`
1144
- }, null, 8, ["shape", "fill"])
1145
- ]),
1146
- key: "0"
1147
- } : void 0
1148
- ]), 1032, ["legendSet", "config"])) : z(a.$slots, "legend", {
1149
- key: 1,
1150
- legend: ot.value
1151
- }, void 0, !0)
1152
- ], 512),
1153
- a.$slots.source ? (s(), n("div", {
1154
- key: 6,
1155
- ref_key: "source",
1156
- ref: Oe,
1157
- dir: "auto"
1158
- }, [
1159
- z(a.$slots, "source", {}, void 0, !0)
1160
- ], 512)) : g("", !0),
1161
- h.value.end - h.value.start < 200 ? (s(), q(y(zt), {
1162
- key: 7,
1163
- hideDetails: "",
1164
- config: {
1165
- open: L.value.showTable,
1166
- maxHeight: 1e4,
1167
- body: {
1168
- backgroundColor: e.value.style.chart.backgroundColor,
1169
- color: e.value.style.chart.color
1170
- },
1171
- head: {
1172
- backgroundColor: e.value.style.chart.backgroundColor,
1173
- color: e.value.style.chart.color
1174
- }
1175
- }
1176
- }, {
1177
- content: _(() => [
1178
- fe(y(Lt), {
1179
- colNames: ve.value.colNames,
1180
- head: ve.value.head,
1181
- body: ve.value.body,
1182
- config: ve.value.config,
1183
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
1184
- onClose: r[5] || (r[5] = (t) => L.value.showTable = !1)
1185
- }, {
1186
- th: _(({ th: t }) => [
1187
- Z("div", { innerHTML: t }, null, 8, bl)
1188
- ]),
1189
- td: _(({ td: t }) => [
1190
- Qt(T(isNaN(Number(t)) ? t : y(K)({
1191
- p: e.value.style.chart.bars.dataLabels.prefix,
1192
- v: t,
1193
- s: e.value.style.chart.bars.dataLabels.suffix,
1194
- r: e.value.table.td.roundingValue
1195
- })), 1)
1196
- ]),
1197
- _: 1
1198
- }, 8, ["colNames", "head", "body", "config", "title"])
1199
- ]),
1200
- _: 1
1201
- }, 8, ["config"])) : g("", !0)
1202
- ], 46, Ca));
1203
- }
1204
- }, Il = /* @__PURE__ */ La(fl, [["__scopeId", "data-v-95413bca"]]);
1205
- export {
1206
- Il as default
1207
- };