vue-data-ui 3.0.0-next.0 → 3.0.0-next.2

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 (102) hide show
  1. package/README.md +108 -67
  2. package/dist/{Arrow-CzFtSJ1v.js → Arrow-Dck2Ea5K.js} +1 -1
  3. package/dist/{BaseDraggableDialog-0S5xhs2P.js → BaseDraggableDialog-CatHZ1ns.js} +2 -2
  4. package/dist/{BaseIcon-DoDjTdD5.js → BaseIcon-BmZ4MREl.js} +1 -1
  5. package/dist/{ColorPicker-BGRchgqQ.js → ColorPicker-C1MXyD9Q.js} +2 -2
  6. package/dist/{DataTable-BBbOgI-a.js → DataTable-CgL0Rz0x.js} +2 -2
  7. package/dist/{Legend-Q4bOb-Nf.js → Legend-CYbP3Kfg.js} +12 -11
  8. package/dist/{NonSvgPenAndPaper-DNKRvsBB.js → NonSvgPenAndPaper-CcbcJm_U.js} +3 -3
  9. package/dist/{PackageVersion-D0VPY8-5.js → PackageVersion-CAkNkiIG.js} +1 -1
  10. package/dist/{PenAndPaper-DhBJsnob.js → PenAndPaper-Cx1-5zdD.js} +32 -32
  11. package/dist/{Shape-DbsLJ-SE.js → Shape-DBXkGxKt.js} +1 -1
  12. package/dist/{Slicer-DZEFp2GU.js → Slicer-nrMi5hzj.js} +2 -2
  13. package/dist/{SparkTooltip-CoOJR62O.js → SparkTooltip-fNzL4pIU.js} +1 -1
  14. package/dist/{Title-D29apS4l.js → Title-pVYRzQXY.js} +1 -1
  15. package/dist/Tooltip-NwATo4ZJ.js +157 -0
  16. package/dist/{UserOptions-Bdit7AWO.js → UserOptions-DAsRxxrf.js} +137 -129
  17. package/dist/{dom-to-png-BdPIrHOF.js → dom-to-png-BF_4H_6u.js} +1 -1
  18. package/dist/img-ku4zevVD.js +33 -0
  19. package/dist/{index-DMqAxz7R.js → index-BzfnuLnw.js} +1199 -1135
  20. package/dist/pdf-CguiIsUc.js +58 -0
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +1051 -217
  23. package/dist/types/vue-data-ui.d.ts +1051 -217
  24. package/dist/useLoading-Bt5Doa8m.js +28 -0
  25. package/dist/{useNestedProp-YgN3FV_8.js → useNestedProp-DorElw91.js} +1 -1
  26. package/dist/{usePrinter-COkTjv6C.js → usePrinter-C9qkgv0r.js} +2 -2
  27. package/dist/vue-data-ui-DQef_oFO.js +314 -0
  28. package/dist/vue-data-ui.js +13 -13
  29. package/dist/{vue-ui-3d-bar-Ojgjl20n.js → vue-ui-3d-bar-DPSamIA-.js} +261 -245
  30. package/dist/{vue-ui-accordion-P6eFHGQp.js → vue-ui-accordion-DgZK-qDz.js} +3 -3
  31. package/dist/{vue-ui-age-pyramid-IcMpAhiw.js → vue-ui-age-pyramid-DVeGKvf9.js} +233 -217
  32. package/dist/{vue-ui-annotator-Bk7d86-x.js → vue-ui-annotator-6ikkK-FK.js} +2 -2
  33. package/dist/{vue-ui-bullet-DCvWbCPk.js → vue-ui-bullet-Bg4hfFk2.js} +172 -156
  34. package/dist/{vue-ui-candlestick-DCf-88Yv.js → vue-ui-candlestick-Bi59FGXn.js} +271 -254
  35. package/dist/{vue-ui-carousel-table-DEsl0XUh.js → vue-ui-carousel-table-DitKhrFT.js} +17 -16
  36. package/dist/{vue-ui-chestnut-Cg10-3wu.js → vue-ui-chestnut-D8wGAZod.js} +419 -403
  37. package/dist/{vue-ui-chord-BWYzR6vf.js → vue-ui-chord-C-uTVCDP.js} +256 -240
  38. package/dist/{vue-ui-circle-pack-CO2Ra2-5.js → vue-ui-circle-pack-CPy6xcxv.js} +230 -214
  39. package/dist/{vue-ui-cursor-BbYHJDbV.js → vue-ui-cursor-Dd7vUd0q.js} +2 -2
  40. package/dist/{vue-ui-dashboard-DkCnNuse.js → vue-ui-dashboard-CKurbu8M.js} +62 -62
  41. package/dist/{vue-ui-digits-DRsphHt2.js → vue-ui-digits-DfdZI11G.js} +2 -2
  42. package/dist/{vue-ui-donut-evolution-B5F2-0bh.js → vue-ui-donut-evolution-CKbLO8yR.js} +370 -357
  43. package/dist/vue-ui-donut-tECBFvud.js +1532 -0
  44. package/dist/{vue-ui-dumbbell-DqqSxoSh.js → vue-ui-dumbbell-DI5Lj3r_.js} +216 -200
  45. package/dist/{vue-ui-flow-CTIcUJgV.js → vue-ui-flow-CjU48s9z.js} +217 -201
  46. package/dist/{vue-ui-funnel-k7KD7Xoc.js → vue-ui-funnel-DM_5vHZ4.js} +213 -197
  47. package/dist/{vue-ui-galaxy-C9EHaP4I.js → vue-ui-galaxy-ocvZgZJx.js} +215 -202
  48. package/dist/{vue-ui-gauge-CBiM_1-n.js → vue-ui-gauge-DajNoY-D.js} +220 -204
  49. package/dist/{vue-ui-gizmo-CAc7b2oK.js → vue-ui-gizmo-DTnzeQbm.js} +3 -3
  50. package/dist/{vue-ui-heatmap-B3ubrP2v.js → vue-ui-heatmap-CfBS8jQe.js} +244 -224
  51. package/dist/{vue-ui-history-plot-XCqccO3b.js → vue-ui-history-plot-BuOPWQoP.js} +268 -252
  52. package/dist/{vue-ui-kpi-DTGMDjaZ.js → vue-ui-kpi-DLGHOIRj.js} +3 -3
  53. package/dist/{vue-ui-mini-loader-Cn_7nvVq.js → vue-ui-mini-loader-CHAHi4c9.js} +2 -2
  54. package/dist/{vue-ui-molecule-BugMXFAK.js → vue-ui-molecule-R5-oDFeW.js} +204 -188
  55. package/dist/{vue-ui-mood-radar-Cv4dHZPL.js → vue-ui-mood-radar-Ddf2gaES.js} +206 -190
  56. package/dist/vue-ui-nested-donuts-CksklV83.js +1177 -0
  57. package/dist/{vue-ui-onion-Bha2hRAb.js → vue-ui-onion-D2n4zUkV.js} +196 -180
  58. package/dist/{vue-ui-parallel-coordinate-plot-DWJ2DWx4.js → vue-ui-parallel-coordinate-plot-CNWQqlxf.js} +194 -178
  59. package/dist/{vue-ui-quadrant-BKHZoTml.js → vue-ui-quadrant-CxNj2FEx.js} +321 -305
  60. package/dist/{vue-ui-quick-chart-D_k3lbU8.js → vue-ui-quick-chart-Bm_VmhJR.js} +347 -331
  61. package/dist/{vue-ui-radar-Co4EOjSk.js → vue-ui-radar-DSYMQJ6K.js} +193 -177
  62. package/dist/{vue-ui-rating-dtNN0EdX.js → vue-ui-rating-BiQpwXnc.js} +2 -2
  63. package/dist/{vue-ui-relation-circle-CR4UpQzM.js → vue-ui-relation-circle-Cdxe78Bm.js} +188 -172
  64. package/dist/{vue-ui-ridgeline-BKX97EnR.js → vue-ui-ridgeline-DpeM2hRi.js} +212 -196
  65. package/dist/{vue-ui-rings-EPTwyt6D.js → vue-ui-rings-BenmQHKv.js} +223 -210
  66. package/dist/{vue-ui-scatter-BlxzblSR.js → vue-ui-scatter-mDMY1H6U.js} +288 -273
  67. package/dist/{vue-ui-skeleton-CjN2ZdgT.js → vue-ui-skeleton-Ch_XkFuP.js} +3 -3
  68. package/dist/{vue-ui-smiley-DdF_ErYG.js → vue-ui-smiley-DTig5lTU.js} +2 -2
  69. package/dist/{vue-ui-spark-trend-RdOlCuT9.js → vue-ui-spark-trend-BkDsp8E0.js} +3 -3
  70. package/dist/{vue-ui-sparkbar-DWufRGcN.js → vue-ui-sparkbar-CgqoyBOm.js} +3 -3
  71. package/dist/{vue-ui-sparkgauge-IP1O3qyT.js → vue-ui-sparkgauge-B4jR_Y62.js} +3 -3
  72. package/dist/{vue-ui-sparkhistogram-Cnv9xZ8H.js → vue-ui-sparkhistogram-DfxjglLy.js} +4 -4
  73. package/dist/{vue-ui-sparkline-CYgeD5V3.js → vue-ui-sparkline-M3QR8xJE.js} +3 -3
  74. package/dist/{vue-ui-sparkstackbar-BCwoK9xd.js → vue-ui-sparkstackbar-B2Ls-Mb8.js} +3 -3
  75. package/dist/{vue-ui-stackbar-CqFIvfrK.js → vue-ui-stackbar-DIHkn6__.js} +497 -474
  76. package/dist/{vue-ui-strip-plot-Dq-kDRai.js → vue-ui-strip-plot-B_ZLbu2D.js} +241 -225
  77. package/dist/{vue-ui-table-vaIdQnPl.js → vue-ui-table-BhymhDOh.js} +3 -3
  78. package/dist/{vue-ui-table-heatmap-U_Td0cdh.js → vue-ui-table-heatmap-DokRh4dS.js} +26 -25
  79. package/dist/{vue-ui-table-sparkline-DkOaHx5L.js → vue-ui-table-sparkline-DxBZGKZJ.js} +8 -7
  80. package/dist/{vue-ui-thermometer-CzckBZgs.js → vue-ui-thermometer-e2L6IdF-.js} +170 -154
  81. package/dist/{vue-ui-timer-DSdUshUs.js → vue-ui-timer-BG2EwK3o.js} +5 -5
  82. package/dist/vue-ui-tiremarks-nzQH7woJ.js +358 -0
  83. package/dist/vue-ui-treemap-CZxyi6fl.js +965 -0
  84. package/dist/{vue-ui-vertical-bar-Dd4sYeAC.js → vue-ui-vertical-bar-DahdX1Sn.js} +382 -360
  85. package/dist/{vue-ui-waffle-DusUVY6y.js → vue-ui-waffle-D399D4UE.js} +234 -221
  86. package/dist/vue-ui-wheel-DtcwtHzJ.js +352 -0
  87. package/dist/{vue-ui-word-cloud-_7uYjJ5A.js → vue-ui-word-cloud-CTDceQsf.js} +249 -233
  88. package/dist/{vue-ui-world-COIyBHII.js → vue-ui-world-BjNSbqMZ.js} +239 -223
  89. package/dist/vue-ui-xy-BkTP-JpK.js +2958 -0
  90. package/dist/{vue-ui-xy-canvas-CuYRyub2.js → vue-ui-xy-canvas-BKAowbe0.js} +447 -431
  91. package/package.json +2 -2
  92. package/dist/Tooltip-hVZUY_s5.js +0 -149
  93. package/dist/img-BeMVTwmF.js +0 -20
  94. package/dist/pdf-DPxOdzfi.js +0 -51
  95. package/dist/useMouse-AicQS8Vf.js +0 -13
  96. package/dist/vue-data-ui-nceqWRts.js +0 -301
  97. package/dist/vue-ui-donut-DSE7ubVv.js +0 -1315
  98. package/dist/vue-ui-nested-donuts-CYe0Are_.js +0 -1154
  99. package/dist/vue-ui-tiremarks-B2WWklqG.js +0 -342
  100. package/dist/vue-ui-treemap-D1dgDhjG.js +0 -952
  101. package/dist/vue-ui-wheel-ClsKBh52.js +0 -336
  102. package/dist/vue-ui-xy-C_OUyzTC.js +0 -3135
@@ -1,19 +1,20 @@
1
- import { useCssVars as _t, defineAsyncComponent as H, useSlots as $t, computed as m, ref as d, watch as Xe, shallowRef as He, onMounted as We, onBeforeUnmount as wt, createElementBlock as i, openBlock as u, unref as r, normalizeStyle as c, normalizeClass as B, createBlock as R, createCommentVNode as y, renderSlot as b, createVNode as Q, createSlots as pe, withCtx as k, normalizeProps as W, guardReactiveProps as G, createElementVNode as n, toDisplayString as h, Fragment as j, renderList as q, mergeProps as xt, withKeys as Ct, createTextVNode as Tt } from "vue";
2
- import { u as Lt, c as Nt, t as Pt, p as D, a as St, b as Vt, o as Ge, e as Z, v as N, d as ye, i as ne, f as E, X as It, s as ge, w as Ot, q as Ft, r as Mt, x as zt, y as At } from "./index-DMqAxz7R.js";
3
- import { t as Bt, u as Rt } from "./useResponsive-DfdjqQps.js";
4
- import { u as je } from "./useNestedProp-YgN3FV_8.js";
5
- import { u as Dt } from "./usePrinter-COkTjv6C.js";
6
- import { u as Et } from "./useUserOptionState-BIvW1Kz7.js";
7
- import { u as Ut } from "./useChartAccessibility-9icAAmYg.js";
8
- import Xt from "./vue-ui-accordion-P6eFHGQp.js";
9
- import qe from "./Legend-Q4bOb-Nf.js";
10
- import Ht from "./Title-D29apS4l.js";
11
- import { _ as Ye } from "./Shape-DbsLJ-SE.js";
12
- import { _ as Wt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
- const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "height"], Kt = ["id"], Jt = ["stop-color"], Qt = ["stop-color"], Zt = { key: 1 }, el = ["x", "y", "width", "height", "fill", "rx"], tl = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], ll = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], al = ["x2", "y1", "y2", "stroke", "stroke-width"], ol = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], nl = ["x", "y", "text-anchor", "font-size", "fill", "font-weight"], ul = ["x", "y", "font-size", "fill", "font-weight"], sl = ["x", "y", "font-size", "fill", "font-weight"], rl = ["x", "y", "font-size", "fill", "font-weight"], il = ["y", "width", "height", "fill", "onMouseenter"], dl = {
1
+ import { useCssVars as Ct, defineAsyncComponent as W, useSlots as Tt, computed as _, ref as d, watch as We, shallowRef as Ge, onMounted as je, onBeforeUnmount as Lt, createElementBlock as i, openBlock as u, unref as r, normalizeStyle as c, normalizeClass as R, createBlock as D, createCommentVNode as y, renderSlot as k, createVNode as Q, createSlots as pe, withCtx as $, normalizeProps as G, guardReactiveProps as j, createElementVNode as n, toDisplayString as h, Fragment as q, renderList as Y, mergeProps as Nt, withKeys as Pt, createTextVNode as St } from "vue";
2
+ import { u as Vt, c as It, t as Ot, p as E, a as Ft, C as ye, b as Mt, o as qe, e as Z, v as N, d as fe, i as ne, f as U, X as zt, s as ge, w as At, q as Bt, r as Rt, x as Dt, y as Et } from "./index-BzfnuLnw.js";
3
+ import { t as Ut, u as Xt } from "./useResponsive-DfdjqQps.js";
4
+ import { u as Ye } from "./useNestedProp-DorElw91.js";
5
+ import { u as Ht } from "./usePrinter-C9qkgv0r.js";
6
+ import { u as Wt } from "./useUserOptionState-BIvW1Kz7.js";
7
+ import { u as Gt } from "./useChartAccessibility-9icAAmYg.js";
8
+ import jt from "./vue-ui-accordion-DgZK-qDz.js";
9
+ import Ke from "./Legend-CYbP3Kfg.js";
10
+ import qt from "./Title-pVYRzQXY.js";
11
+ import { _ as Je } from "./Shape-DBXkGxKt.js";
12
+ import Yt from "./img-ku4zevVD.js";
13
+ import { _ as Kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
+ const Jt = ["id"], Qt = ["onClick"], Zt = ["xmlns", "viewBox"], ea = ["width", "height"], ta = ["id"], aa = ["stop-color"], la = ["stop-color"], oa = { key: 1 }, na = ["x", "y", "width", "height", "fill", "rx"], ua = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], sa = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], ra = ["x2", "y1", "y2", "stroke", "stroke-width"], ia = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], da = ["x", "y", "text-anchor", "font-size", "fill", "font-weight"], va = ["x", "y", "font-size", "fill", "font-weight"], ca = ["x", "y", "font-size", "fill", "font-weight"], ha = ["x", "y", "font-size", "fill", "font-weight"], pa = ["y", "width", "height", "fill", "onMouseenter", "onMouseleave", "onClick"], ya = {
14
15
  key: 6,
15
16
  class: "vue-data-ui-watermark"
16
- }, vl = ["onClick"], cl = { style: "width:100%;padding-top: 36px;position:relative" }, hl = { class: "vue-ui-data-table" }, pl = { key: 0 }, yl = { style: { width: "100%" } }, gl = ["data-cell"], fl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, bl = ["data-cell"], ml = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, kl = ["data-cell"], _l = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, $l = ["data-cell"], wl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, xl = ["data-cell"], Cl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Tl = ["data-cell"], Ll = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Nl = ["data-cell"], Pl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Sl = {
17
+ }, fa = ["onClick"], ga = { style: "width:100%;padding-top: 36px;position:relative" }, ba = { class: "vue-ui-data-table" }, ma = { key: 0 }, ka = { style: { width: "100%" } }, _a = ["data-cell"], $a = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, wa = ["data-cell"], xa = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ca = ["data-cell"], Ta = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, La = ["data-cell"], Na = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Pa = ["data-cell"], Sa = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Va = ["data-cell"], Ia = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Oa = ["data-cell"], Fa = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ma = {
17
18
  __name: "vue-ui-vertical-bar",
18
19
  props: {
19
20
  config: {
@@ -30,82 +31,83 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
30
31
  }
31
32
  },
32
33
  emits: ["selectLegend"],
33
- setup(Ke, { expose: Je, emit: Qe }) {
34
- _t((l) => ({
35
- "8661a912": l.tdo
34
+ setup(Qe, { expose: Ze, emit: et }) {
35
+ Ct((a) => ({
36
+ c77ebc28: a.tdo
36
37
  }));
37
- const Ze = H(() => import("./BaseIcon-DoDjTdD5.js")), et = H(() => import("./PackageVersion-D0VPY8-5.js")), tt = H(() => import("./PenAndPaper-DhBJsnob.js")), lt = H(() => import("./vue-ui-skeleton-CjN2ZdgT.js")), at = H(() => import("./Tooltip-hVZUY_s5.js")), ot = H(() => import("./UserOptions-Bdit7AWO.js")), { vue_ui_vertical_bar: nt } = Lt(), ut = $t(), T = Ke, ee = m(() => !!T.dataset && T.dataset.length), C = d(Nt()), st = d(null), ue = d(!1), se = d(""), te = d(0), rt = d(null), fe = d(0), Y = d(null), be = d(null), re = d(null), me = d(null), ke = d(null), _e = d(0), ie = d(0), it = Qe, e = m({
38
- get: () => Ce(),
39
- set: (l) => l
40
- }), { userOptionsVisible: de, setUserOptionsVisibility: $e, keepUserOptionState: we } = Et({ config: e.value }), { svgRef: xe } = Ut({ config: e.value.style.chart.title });
41
- function Ce() {
42
- const l = je({
43
- userConfig: T.config,
44
- defaultConfig: nt
38
+ const tt = W(() => import("./BaseIcon-BmZ4MREl.js")), at = W(() => import("./PackageVersion-CAkNkiIG.js")), lt = W(() => import("./PenAndPaper-Cx1-5zdD.js")), ot = W(() => import("./vue-ui-skeleton-Ch_XkFuP.js")), nt = W(() => import("./Tooltip-NwATo4ZJ.js")), ut = W(() => import("./UserOptions-DAsRxxrf.js")), { vue_ui_vertical_bar: st } = Vt(), rt = Tt(), f = Qe, ee = _(() => !!f.dataset && f.dataset.length), T = d(It()), it = d(null), ue = d(!1), se = d(""), te = d(0), dt = d(null), be = d(0), I = d(null), me = d(null), re = d(null), ke = d(null), _e = d(null), $e = d(0), ie = d(0), vt = et, e = _({
39
+ get: () => Te(),
40
+ set: (a) => a
41
+ }), { userOptionsVisible: de, setUserOptionsVisibility: we, keepUserOptionState: xe } = Wt({ config: e.value }), { svgRef: Ce } = Gt({ config: e.value.style.chart.title });
42
+ function Te() {
43
+ const a = Ye({
44
+ userConfig: f.config,
45
+ defaultConfig: st
45
46
  });
46
- return l.theme ? {
47
- ...je({
48
- userConfig: St.vue_ui_vertical_bar[l.theme] || T.config,
49
- defaultConfig: l
47
+ let l = {};
48
+ return a.theme ? l = {
49
+ ...Ye({
50
+ userConfig: Ft.vue_ui_vertical_bar[a.theme] || f.config,
51
+ defaultConfig: a
50
52
  }),
51
- customPalette: Pt[l.theme] || D
52
- } : l;
53
+ customPalette: Ot[a.theme] || E
54
+ } : l = a, f.config && ye(f.config, "events.datapointEnter") ? l.events.datapointEnter = f.config.events.datapointEnter : l.events.datapointEnter = null, f.config && ye(f.config, "events.datapointLeave") ? l.events.datapointLeave = f.config.events.datapointLeave : l.events.datapointLeave = null, f.config && ye(f.config, "events.datapointClick") ? l.events.datapointClick = f.config.events.datapointClick : l.events.datapointClick = null, l;
53
55
  }
54
- Xe(() => T.config, (l) => {
55
- e.value = Ce(), de.value = !e.value.userOptions.showOnChartHover, Oe(), _e.value += 1, ie.value += 1, v.value = e.value.style.chart.layout.bars.height, f.value = e.value.style.chart.layout.bars.gap, $.value.showTable = e.value.table.show, $.value.sortDesc = e.value.style.chart.layout.bars.sort === "desc", $.value.showTooltip = e.value.style.chart.tooltip.show;
56
- }, { deep: !0 }), Xe(() => T.dataset, le, { deep: !0 });
57
- const { isPrinting: Te, isImaging: Le, generatePdf: Ne, generateImage: Pe } = Dt({
58
- elementId: `vue-ui-vertical-bar_${C.value}`,
56
+ We(() => f.config, (a) => {
57
+ e.value = Te(), de.value = !e.value.userOptions.showOnChartHover, Fe(), $e.value += 1, ie.value += 1, v.value = e.value.style.chart.layout.bars.height, m.value = e.value.style.chart.layout.bars.gap, w.value.showTable = e.value.table.show, w.value.sortDesc = e.value.style.chart.layout.bars.sort === "desc", w.value.showTooltip = e.value.style.chart.tooltip.show;
58
+ }, { deep: !0 }), We(() => f.dataset, ae, { deep: !0 });
59
+ const { isPrinting: Le, isImaging: Ne, generatePdf: Pe, generateImage: Se } = Ht({
60
+ elementId: `vue-ui-vertical-bar_${T.value}`,
59
61
  fileName: e.value.style.chart.title.text || "vue-ui-vertical-bar",
60
62
  options: e.value.userOptions.print
61
- }), dt = m(() => e.value.userOptions.show && !e.value.style.chart.title.text), Se = m(() => Vt(e.value.customPalette)), Ve = d(null), Ie = d(!1), vt = m(() => e.value.table.responsiveBreakpoint), I = He(null), U = He(null);
62
- We(() => {
63
- Oe();
63
+ }), ct = _(() => e.value.userOptions.show && !e.value.style.chart.title.text), Ve = _(() => Mt(e.value.customPalette)), Ie = d(null), Oe = d(!1), ht = _(() => e.value.table.responsiveBreakpoint), O = Ge(null), X = Ge(null);
64
+ je(() => {
65
+ Fe();
64
66
  });
65
- function Oe() {
66
- if (Ge(T.dataset) && Z({
67
+ function Fe() {
68
+ if (qe(f.dataset) && Z({
67
69
  componentName: "VueUiVerticalBar",
68
70
  type: "dataset"
69
- }), te.value = T.dataset.flatMap((l) => l.children && l.children.length > 0 ? l.children.length : 1).reduce((l, a) => l + a, 0), ct(), e.value.responsive) {
70
- const l = Bt(() => {
71
- const { width: a, height: t } = Rt({
72
- chart: Y.value,
73
- title: e.value.style.chart.title.text ? be.value : null,
71
+ }), te.value = f.dataset.flatMap((a) => a.children && a.children.length > 0 ? a.children.length : 1).reduce((a, l) => a + l, 0), pt(), e.value.responsive) {
72
+ const a = Ut(() => {
73
+ const { width: l, height: t } = Xt({
74
+ chart: I.value,
75
+ title: e.value.style.chart.title.text ? me.value : null,
74
76
  legend: e.value.style.chart.legend.show ? re.value : null,
75
- source: me.value,
76
- noTitle: ke.value
77
+ source: ke.value,
78
+ noTitle: _e.value
77
79
  });
78
80
  requestAnimationFrame(() => {
79
- ze.value = a, v.value = t / te.value - f.value * 2;
81
+ Ae.value = l, v.value = t / te.value - m.value * 2;
80
82
  });
81
83
  });
82
- I.value && (U.value && I.value.unobserve(U.value), I.value.disconnect()), I.value = new ResizeObserver(l), U.value = Y.value.parentNode, I.value.observe(U.value);
84
+ O.value && (X.value && O.value.unobserve(X.value), O.value.disconnect()), O.value = new ResizeObserver(a), X.value = I.value.parentNode, O.value.observe(X.value);
83
85
  }
84
86
  }
85
- wt(() => {
86
- I.value && (U.value && I.value.unobserve(U.value), I.value.disconnect());
87
+ Lt(() => {
88
+ O.value && (X.value && O.value.unobserve(X.value), O.value.disconnect());
87
89
  });
88
- function ct() {
89
- new ResizeObserver((a) => {
90
- a.forEach((t) => {
91
- Ie.value = t.contentRect.width < vt.value;
90
+ function pt() {
91
+ new ResizeObserver((l) => {
92
+ l.forEach((t) => {
93
+ Oe.value = t.contentRect.width < ht.value;
92
94
  });
93
- }).observe(Ve.value);
95
+ }).observe(Ie.value);
94
96
  }
95
- const $ = d({
97
+ const w = d({
96
98
  showTable: e.value.table.show,
97
99
  sortDesc: e.value.style.chart.layout.bars.sort === "desc",
98
100
  showTooltip: e.value.style.chart.tooltip.show
99
- }), Fe = m(() => $.value.sortDesc), F = m(() => (T.dataset.forEach((l, a) => {
100
- !l.value && !l.children && Z({
101
+ }), Me = _(() => w.value.sortDesc), M = _(() => (f.dataset.forEach((a, l) => {
102
+ !a.value && !a.children && Z({
101
103
  componentName: "VueUiVerticalBar",
102
104
  type: "datasetAttributeEmpty",
103
- property: `value (index ${a})`
104
- }), l.children && (Ge(l.children) ? Z({
105
+ property: `value (index ${l})`
106
+ }), a.children && (qe(a.children) ? Z({
105
107
  componentName: "VueUiVerticalBar",
106
108
  type: "datasetAttributeEmpty",
107
- property: `children (index ${a})`
108
- }) : l.children.forEach((t, o) => {
109
+ property: `children (index ${l})`
110
+ }) : a.children.forEach((t, o) => {
109
111
  [null, void 0].includes(t.name) && Z({
110
112
  componentName: "VueUiVerticalBar",
111
113
  type: "datasetSerieAttribute",
@@ -114,57 +116,57 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
114
116
  index: o
115
117
  });
116
118
  }));
117
- }), T.dataset.map((l, a) => {
118
- const t = `vertical_parent_${a}_${C.value}`, o = l.children && l.children.length > 0, _ = N(l.value ? l.value : o ? l.children.map((p) => p.value || 0).reduce((p, V) => p + V, 0) : 0), x = _ >= 0 ? 1 : -1;
119
+ }), f.dataset.map((a, l) => {
120
+ const t = `vertical_parent_${l}_${T.value}`, o = a.children && a.children.length > 0, b = N(a.value ? a.value : o ? a.children.map((p) => p.value || 0).reduce((p, V) => p + V, 0) : 0), x = b >= 0 ? 1 : -1;
119
121
  return {
120
- ...l,
122
+ ...a,
121
123
  id: t,
122
- absoluteIndex: a,
124
+ absoluteIndex: l,
123
125
  shape: "square",
124
126
  opacity: P.value.includes(t) ? 0.5 : 1,
125
- value: Math.abs(_),
127
+ value: Math.abs(b),
126
128
  sign: x,
127
129
  hasChildren: o,
128
130
  isChild: !1,
129
131
  segregate: () => K(t),
130
132
  isSegregated: P.value.includes(t),
131
- color: ye(l.color) || Se.value[a] || D[a] || D[a % D.length],
132
- children: !l.children || !l.children.length ? [] : l.children.toSorted(ae.value ? () => 0 : (p, V) => Fe.value ? V.value - p.value : p.value - V.value).map((p, V) => ({
133
+ color: fe(a.color) || Ve.value[l] || E[l] || E[l % E.length],
134
+ children: !a.children || !a.children.length ? [] : a.children.toSorted(le.value ? () => 0 : (p, V) => Me.value ? V.value - p.value : p.value - V.value).map((p, V) => ({
133
135
  ...p,
134
136
  value: N(Math.abs(p.value)),
135
- absoluteIndex: a,
137
+ absoluteIndex: l,
136
138
  sign: p.value >= 0 ? 1 : -1,
137
139
  isChild: !0,
138
140
  parentId: t,
139
- parentName: l.name,
140
- parentValue: _,
141
+ parentName: a.name,
142
+ parentValue: b,
141
143
  parentSign: x,
142
- id: `vertical_child_${a}_${V}_${C.value}`,
144
+ id: `vertical_child_${l}_${V}_${T.value}`,
143
145
  childIndex: V,
144
- color: ye(p.color) || ye(l.color) || Se.value[a] || D[a] || D[a % D.length]
146
+ color: fe(p.color) || fe(a.color) || Ve.value[l] || E[l] || E[l % E.length]
145
147
  })).map((p, V) => ({
146
148
  ...p,
147
149
  isFirstChild: V === 0,
148
- isLastChild: V === l.children.length - 1
150
+ isLastChild: V === a.children.length - 1
149
151
  }))
150
152
  };
151
- }).toSorted(ae.value ? () => 0 : (l, a) => Fe.value ? a.value - l.value : l.value - a.value))), Me = m(() => ({
153
+ }).toSorted(le.value ? () => 0 : (a, l) => Me.value ? l.value - a.value : a.value - l.value))), ze = _(() => ({
152
154
  cy: "vertical-bar-div-legend",
153
155
  backgroundColor: e.value.style.chart.legend.backgroundColor,
154
156
  color: e.value.style.chart.legend.color,
155
157
  fontSize: e.value.style.chart.legend.fontSize,
156
158
  paddingBottom: 12,
157
159
  fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
158
- })), v = d(e.value.style.chart.layout.bars.height), f = d(e.value.style.chart.layout.bars.gap), ht = m(() => (v.value + f.value) * te.value), ze = d(512), g = m(() => ({
159
- width: ze.value,
160
- height: ht.value,
160
+ })), v = d(e.value.style.chart.layout.bars.height), m = d(e.value.style.chart.layout.bars.gap), yt = _(() => (v.value + m.value) * te.value), Ae = d(512), g = _(() => ({
161
+ width: Ae.value,
162
+ height: yt.value,
161
163
  padding: {
162
164
  top: 12,
163
165
  left: 128 + e.value.style.chart.layout.bars.offsetX,
164
166
  right: 64 + e.value.style.chart.layout.bars.paddingRight,
165
167
  bottom: 12
166
168
  }
167
- })), s = m(() => ({
169
+ })), s = _(() => ({
168
170
  fullHeight: g.value.padding.top + g.value.padding.bottom + g.value.height,
169
171
  top: g.value.padding.top,
170
172
  left: g.value.padding.left,
@@ -172,103 +174,109 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
172
174
  bottom: g.value.padding.top + g.value.height,
173
175
  width: g.value.width - (g.value.padding.left + g.value.padding.right)
174
176
  }));
175
- function le() {
176
- te.value = M.value.flatMap((l) => l.children && l.children.length > 0 ? l.children.length : 1).reduce((l, a) => l + a, 0);
177
+ function ae() {
178
+ te.value = z.value.flatMap((a) => a.children && a.children.length > 0 ? a.children.length : 1).reduce((a, l) => a + l, 0);
177
179
  }
178
180
  const P = d([]);
179
- function K(l) {
180
- P.value.includes(l) ? P.value = P.value.filter((a) => a !== l) : P.value.push(l), le(), it("selectLegend", M.value);
181
+ function K(a) {
182
+ P.value.includes(a) ? P.value = P.value.filter((l) => l !== a) : P.value.push(a), ae(), vt("selectLegend", z.value);
181
183
  }
182
- const M = m(() => F.value.filter((l) => !P.value.includes(l.id))), S = m(() => M.value.map((l) => Math.abs(l.value)).reduce((l, a) => l + a, 0));
183
- function Ae(l, a = !1, t = 0) {
184
- return a ? E({
185
- v: N(Math.abs(l) / S.value * 100),
184
+ const z = _(() => M.value.filter((a) => !P.value.includes(a.id))), S = _(() => z.value.map((a) => Math.abs(a.value)).reduce((a, l) => a + l, 0));
185
+ function Be(a, l = !1, t = 0) {
186
+ return l ? U({
187
+ v: N(Math.abs(a) / S.value * 100),
186
188
  s: "%",
187
189
  r: t
188
- }) : Math.abs(l) / S.value;
190
+ }) : Math.abs(a) / S.value;
189
191
  }
190
- const z = m(() => M.value.flatMap((l) => l.hasChildren ? l.children : l)), A = m(() => z.value.map((l) => l.sign).includes(-1)), pt = m(() => Math.max(...M.value.flatMap((l) => l.children && l.children.length ? Math.max(...l.children.map((a) => a.value)) : l.value)));
191
- function w(l) {
192
- const a = l / pt.value;
193
- return s.value.width / (A.value ? 2 : 1) * a;
192
+ const A = _(() => z.value.flatMap((a) => a.hasChildren ? a.children : a)), B = _(() => A.value.map((a) => a.sign).includes(-1)), ft = _(() => Math.max(...z.value.flatMap((a) => a.children && a.children.length ? Math.max(...a.children.map((l) => l.value)) : a.value)));
193
+ function C(a) {
194
+ const l = a / ft.value;
195
+ return s.value.width / (B.value ? 2 : 1) * l;
194
196
  }
195
- function yt(l) {
196
- return w(l) + s.value.left;
197
+ function gt(a) {
198
+ return C(a) + s.value.left;
197
199
  }
198
- function J(l, a) {
199
- const t = M.value.find((x) => x.id === l.parentId), o = s.value.top + (f.value + v.value) * a, _ = t.children.length * (f.value + v.value);
200
+ function J(a, l) {
201
+ const t = z.value.find((x) => x.id === a.parentId), o = s.value.top + (m.value + v.value) * l, b = t.children.length * (m.value + v.value);
200
202
  return {
201
- y: o + _ / 2 - e.value.style.chart.layout.bars.parentLabels.fontSize,
203
+ y: o + b / 2 - e.value.style.chart.layout.bars.parentLabels.fontSize,
202
204
  name: t.name,
203
205
  value: [void 0, NaN, null].includes(t.value) ? "" : t.sign === 1 ? t.value : -t.value,
204
- percentageToTotal: isNaN(t.value / S.value) ? "" : Ae(t.value, !0, e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),
206
+ percentageToTotal: isNaN(t.value / S.value) ? "" : Be(t.value, !0, e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),
205
207
  sign: t.sign
206
208
  };
207
209
  }
208
- function gt() {
209
- return M.value;
210
+ function bt() {
211
+ return z.value;
210
212
  }
211
213
  const ve = d(null), ce = d(null);
212
- function ft(l, a) {
213
- ce.value = {
214
- datapoint: l,
215
- seriesIndex: a,
216
- series: F.value,
214
+ function mt({ datapoint: a, seriesIndex: l }) {
215
+ e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: a, seriesIndex: l });
216
+ }
217
+ function kt({ datapoint: a, seriesIndex: l }) {
218
+ e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: a, seriesIndex: l }), dt.value = null, ue.value = !1, ve.value = null;
219
+ }
220
+ function _t(a, l) {
221
+ e.value.events.datapointEnter && e.value.events.datapointEnter({ datpoint: a, seriesIndex: l }), ce.value = {
222
+ datapoint: a,
223
+ seriesIndex: l,
224
+ series: M.value,
217
225
  config: e.value
218
- }, ue.value = !0, ve.value = l.id;
226
+ }, ue.value = !0, ve.value = a.id;
219
227
  let t = "";
220
- const o = l.isChild ? l.parentName : l.name, _ = l.isChild ? l.name : "", x = e.value.style.chart.tooltip.customFormat;
221
- zt(x) && At(() => x({
222
- datapoint: l,
223
- series: F.value,
228
+ const o = a.isChild ? a.parentName : a.name, b = a.isChild ? a.name : "", x = e.value.style.chart.tooltip.customFormat;
229
+ Dt(x) && Et(() => x({
230
+ datapoint: a,
231
+ series: M.value,
224
232
  config: e.value,
225
- seriesIndex: a
233
+ seriesIndex: l
226
234
  })) ? se.value = x({
227
- datapoint: l,
228
- series: F.value,
235
+ datapoint: a,
236
+ series: M.value,
229
237
  config: e.value,
230
- seriesIndex: a
238
+ seriesIndex: l
231
239
  }) : (t += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
232
- <div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="${l.color}"/>${ut.pattern ? `<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${C.value}_${l.absoluteIndex})"/>` : ""}</svg> ${o}</div>
233
- ${_ ? `<div>${_}</div>` : ""}
240
+ <div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="${a.color}"/>${rt.pattern ? `<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${T.value}_${a.absoluteIndex})"/>` : ""}</svg> ${o}</div>
241
+ ${b ? `<div>${b}</div>` : ""}
234
242
  </div>`, e.value.style.chart.tooltip.showValue && (t += `<div>${e.value.translations.value}: <b>${ne(
235
243
  e.value.style.chart.layout.bars.dataLabels.value.formatter,
236
- l.sign === 1 ? l.value : -l.value,
237
- E({
244
+ a.sign === 1 ? a.value : -a.value,
245
+ U({
238
246
  p: e.value.style.chart.tooltip.prefix,
239
- v: l.sign === 1 ? l.value : -l.value,
247
+ v: a.sign === 1 ? a.value : -a.value,
240
248
  s: e.value.style.chart.tooltip.suffix,
241
249
  r: e.value.style.chart.tooltip.roundingValue
242
250
  }),
243
- { datapoint: l, seriesIndex: a }
244
- )}</b></div>`), e.value.style.chart.tooltip.showPercentage && (t += `<div>${e.value.translations.percentageToTotal} : <b>${E({
245
- v: Math.abs(l.value) / S.value * 100,
251
+ { datapoint: a, seriesIndex: l }
252
+ )}</b></div>`), e.value.style.chart.tooltip.showPercentage && (t += `<div>${e.value.translations.percentageToTotal} : <b>${U({
253
+ v: Math.abs(a.value) / S.value * 100,
246
254
  s: "%",
247
255
  r: e.value.style.chart.tooltip.roundingPercentage
248
- })}</b></div>`, l.isChild && (t += `<div>${e.value.translations.percentageToSerie}: <b>${E({
249
- v: Math.abs(l.value) / Math.abs(l.parentValue) * 100,
256
+ })}</b></div>`, a.isChild && (t += `<div>${e.value.translations.percentageToSerie}: <b>${U({
257
+ v: Math.abs(a.value) / Math.abs(a.parentValue) * 100,
250
258
  s: "%",
251
259
  r: e.value.style.chart.tooltip.roundingPercentage
252
260
  })}</b></div>`)), se.value = `<div style="text-align:left">${t}</div>`);
253
261
  }
254
- function Be(l, a, t, o) {
262
+ function Re(a, l, t, o) {
255
263
  if (!e.value.style.chart.layout.bars.dataLabels.value.show)
256
264
  return "";
257
- const _ = ne(
265
+ const b = ne(
258
266
  e.value.style.chart.layout.bars.dataLabels.value.formatter,
259
- N(o === -1 && l >= 0 ? -l : l),
260
- E({
267
+ N(o === -1 && a >= 0 ? -a : a),
268
+ U({
261
269
  p: e.value.style.chart.layout.bars.dataLabels.value.prefix,
262
- v: N(o === -1 && l >= 0 ? -l : l),
270
+ v: N(o === -1 && a >= 0 ? -a : a),
263
271
  s: e.value.style.chart.layout.bars.dataLabels.value.suffix,
264
272
  r: e.value.style.chart.layout.bars.dataLabels.value.roundingValue
265
273
  }),
266
- { datapoint: a, seriesIndex: t }
267
- ), x = `(${Ae(l, !0, e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;
268
- return `${_}${e.value.style.chart.layout.bars.dataLabels.percentage.show ? ` ${x}` : ""}`;
274
+ { datapoint: l, seriesIndex: t }
275
+ ), x = `(${Be(a, !0, e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;
276
+ return `${b}${e.value.style.chart.layout.bars.dataLabels.percentage.show ? ` ${x}` : ""}`;
269
277
  }
270
- const L = m(() => {
271
- const l = [
278
+ const L = _(() => {
279
+ const a = [
272
280
  e.value.translations.parentName,
273
281
  e.value.translations.value,
274
282
  e.value.translations.percentageToTotal,
@@ -276,7 +284,7 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
276
284
  e.value.translations.value,
277
285
  e.value.translations.percentageToSerie,
278
286
  e.value.translations.percentageToTotal
279
- ], a = z.value.map((t) => t.isChild ? t.isFirstChild ? {
287
+ ], l = A.value.map((t) => t.isChild ? t.isFirstChild ? {
280
288
  color: t.color,
281
289
  parentName: t.parentName,
282
290
  parentValue: t.parentValue,
@@ -304,10 +312,10 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
304
312
  childPercentageToParent: "",
305
313
  childPercentageToTotal: ""
306
314
  });
307
- return { head: l, body: a };
315
+ return { head: a, body: l };
308
316
  });
309
- function Re(l = null) {
310
- const a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], t = L.value.head, o = L.value.body.map((p) => [
317
+ function De(a = null) {
318
+ const l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], t = L.value.head, o = L.value.body.map((p) => [
311
319
  p.parentName,
312
320
  p.parentValue,
313
321
  p.percentageToTotal,
@@ -315,84 +323,98 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
315
323
  p.childValue,
316
324
  p.childPercentageToParent,
317
325
  p.childPercentageToTotal
318
- ]), _ = a.concat([t]).concat(o), x = Ft(_);
319
- l ? l(x) : Mt({ csvContent: x, title: e.value.style.chart.title.text || "vue-ui-vertical-bar" });
326
+ ]), b = l.concat([t]).concat(o), x = Bt(b);
327
+ a ? a(x) : Rt({ csvContent: x, title: e.value.style.chart.title.text || "vue-ui-vertical-bar" });
320
328
  }
321
- const X = d(!1);
322
- function bt(l) {
323
- X.value = l, fe.value += 1;
329
+ const H = d(!1);
330
+ function Ee(a) {
331
+ H.value = a, be.value += 1;
324
332
  }
325
- function De() {
326
- $.value.showTable = !$.value.showTable;
333
+ function Ue() {
334
+ w.value.showTable = !w.value.showTable;
327
335
  }
328
- const mt = d({
336
+ const $t = d({
329
337
  none: 0,
330
338
  asc: 1,
331
339
  desc: 2
332
- }), O = d(0), ae = d(!1);
333
- We(() => {
340
+ }), F = d(0), le = d(!1);
341
+ je(() => {
334
342
  ["none", "asc", "desc"].includes(e.value.style.chart.layout.bars.sort) || Z({
335
343
  componentName: "VueUiVerticalBar",
336
344
  type: "attributeWrongValue",
337
345
  property: "style.chart.layout.bars.sort",
338
346
  key: e.value.style.chart.layout.bars.sort
339
- }), O.value = mt.value[e.value.style.chart.layout.bars.sort], $.value.sortDesc = O.value === 2, ae.value = O.value === 0;
347
+ }), F.value = $t.value[e.value.style.chart.layout.bars.sort], w.value.sortDesc = F.value === 2, le.value = F.value === 0;
340
348
  });
341
- function kt() {
342
- O.value += 1, O.value > 2 && (O.value = 0);
349
+ function wt() {
350
+ F.value += 1, F.value > 2 && (F.value = 0);
343
351
  }
344
- function Ee() {
345
- kt(), $.value.sortDesc = O.value === 2, ae.value = O.value === 0, le();
352
+ function Xe() {
353
+ wt(), w.value.sortDesc = F.value === 2, le.value = F.value === 0, ae();
346
354
  }
347
- function Ue() {
348
- $.value.showTooltip = !$.value.showTooltip;
355
+ function He() {
356
+ w.value.showTooltip = !w.value.showTooltip;
349
357
  }
350
358
  const oe = d(!1);
351
359
  function he() {
352
360
  oe.value = !oe.value;
353
361
  }
354
- return Je({
355
- getData: gt,
356
- recalculateHeight: le,
357
- generatePdf: Ne,
358
- generateCsv: Re,
359
- generateImage: Pe,
360
- toggleTable: De,
361
- toggleSort: Ee,
362
- toggleTooltip: Ue,
363
- toggleAnnotator: he
364
- }), (l, a) => (u(), i("div", {
365
- class: B(`vue-ui-vertical-bar ${X.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
362
+ async function xt({ scale: a = 2 } = {}) {
363
+ if (!I.value) return;
364
+ const { width: l, height: t } = I.value.getBoundingClientRect(), o = l / t, { imageUri: b, base64: x } = await Yt({ domElement: I.value, base64: !0, img: !0, scale: a });
365
+ return {
366
+ imageUri: b,
367
+ base64: x,
368
+ title: e.value.style.chart.title.text,
369
+ width: l,
370
+ height: t,
371
+ aspectRatio: o
372
+ };
373
+ }
374
+ return Ze({
375
+ getData: bt,
376
+ getImage: xt,
377
+ recalculateHeight: ae,
378
+ generatePdf: Pe,
379
+ generateCsv: De,
380
+ generateImage: Se,
381
+ toggleTable: Ue,
382
+ toggleSort: Xe,
383
+ toggleTooltip: He,
384
+ toggleAnnotator: he,
385
+ toggleFullscreen: Ee
386
+ }), (a, l) => (u(), i("div", {
387
+ class: R(`vue-ui-vertical-bar ${H.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
366
388
  ref_key: "verticalBarChart",
367
- ref: Y,
368
- id: `vue-ui-vertical-bar_${C.value}`,
389
+ ref: I,
390
+ id: `vue-ui-vertical-bar_${T.value}`,
369
391
  style: c(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
370
- onMouseenter: a[5] || (a[5] = () => r($e)(!0)),
371
- onMouseleave: a[6] || (a[6] = () => r($e)(!1))
392
+ onMouseenter: l[4] || (l[4] = () => r(we)(!0)),
393
+ onMouseleave: l[5] || (l[5] = () => r(we)(!1))
372
394
  }, [
373
- e.value.userOptions.buttons.annotator ? (u(), R(r(tt), {
395
+ e.value.userOptions.buttons.annotator ? (u(), D(r(lt), {
374
396
  key: 0,
375
- svgRef: r(xe),
397
+ svgRef: r(Ce),
376
398
  backgroundColor: e.value.style.chart.backgroundColor,
377
399
  color: e.value.style.chart.color,
378
400
  active: oe.value,
379
401
  onClose: he
380
402
  }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : y("", !0),
381
- dt.value ? (u(), i("div", {
403
+ ct.value ? (u(), i("div", {
382
404
  key: 1,
383
405
  ref_key: "noTitle",
384
- ref: ke,
406
+ ref: _e,
385
407
  class: "vue-data-ui-no-title-space",
386
408
  style: "height:36px; width: 100%;background:transparent"
387
409
  }, null, 512)) : y("", !0),
388
410
  e.value.style.chart.title.text ? (u(), i("div", {
389
411
  key: 2,
390
412
  ref_key: "chartTitle",
391
- ref: be,
413
+ ref: me,
392
414
  style: "width:100%;background:transparent;padding-bottom:12px"
393
415
  }, [
394
- (u(), R(Ht, {
395
- key: `title_${_e.value}`,
416
+ (u(), D(qt, {
417
+ key: `title_${$e.value}`,
396
418
  config: {
397
419
  title: {
398
420
  cy: "vertical-bar-div-title",
@@ -405,15 +427,15 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
405
427
  }
406
428
  }, null, 8, ["config"]))
407
429
  ], 512)) : y("", !0),
408
- e.value.userOptions.show && ee.value && (r(we) || r(de)) ? (u(), R(r(ot), {
430
+ e.value.userOptions.show && ee.value && (r(xe) || r(de)) ? (u(), D(r(ut), {
409
431
  ref_key: "details",
410
- ref: st,
411
- key: `user_options_${fe.value}`,
432
+ ref: it,
433
+ key: `user_options_${be.value}`,
412
434
  backgroundColor: e.value.style.chart.backgroundColor,
413
435
  color: e.value.style.chart.color,
414
- isImaging: r(Le),
415
- isPrinting: r(Te),
416
- uid: C.value,
436
+ isImaging: r(Ne),
437
+ isPrinting: r(Le),
438
+ uid: T.value,
417
439
  hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
418
440
  hasPdf: e.value.userOptions.buttons.pdf,
419
441
  hasImg: e.value.userOptions.buttons.img,
@@ -421,135 +443,136 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
421
443
  hasTable: e.value.userOptions.buttons.table,
422
444
  hasSort: e.value.userOptions.buttons.sort,
423
445
  hasFullscreen: e.value.userOptions.buttons.fullscreen,
424
- isFullscreen: X.value,
425
- isTooltip: $.value.showTooltip,
446
+ isFullscreen: H.value,
447
+ isTooltip: w.value.showTooltip,
426
448
  titles: { ...e.value.userOptions.buttonTitles },
427
- chartElement: Y.value,
449
+ chartElement: I.value,
428
450
  position: e.value.userOptions.position,
429
451
  hasAnnotator: e.value.userOptions.buttons.annotator,
430
452
  isAnnotation: oe.value,
431
453
  callbacks: e.value.userOptions.callbacks,
432
- onToggleFullscreen: bt,
433
- onGeneratePdf: r(Ne),
434
- onGenerateCsv: Re,
435
- onGenerateImage: r(Pe),
436
- onToggleTable: De,
437
- onToggleSort: Ee,
438
- onToggleTooltip: Ue,
454
+ printScale: e.value.userOptions.print.scale,
455
+ onToggleFullscreen: Ee,
456
+ onGeneratePdf: r(Pe),
457
+ onGenerateCsv: De,
458
+ onGenerateImage: r(Se),
459
+ onToggleTable: Ue,
460
+ onToggleSort: Xe,
461
+ onToggleTooltip: He,
439
462
  onToggleAnnotator: he,
440
463
  style: c({
441
- visibility: r(we) ? r(de) ? "visible" : "hidden" : "visible"
464
+ visibility: r(xe) ? r(de) ? "visible" : "hidden" : "visible"
442
465
  })
443
466
  }, pe({ _: 2 }, [
444
- l.$slots.menuIcon ? {
467
+ a.$slots.menuIcon ? {
445
468
  name: "menuIcon",
446
- fn: k(({ isOpen: t, color: o }) => [
447
- b(l.$slots, "menuIcon", W(G({ isOpen: t, color: o })), void 0, !0)
469
+ fn: $(({ isOpen: t, color: o }) => [
470
+ k(a.$slots, "menuIcon", G(j({ isOpen: t, color: o })), void 0, !0)
448
471
  ]),
449
472
  key: "0"
450
473
  } : void 0,
451
- l.$slots.optionTooltip ? {
474
+ a.$slots.optionTooltip ? {
452
475
  name: "optionTooltip",
453
- fn: k(() => [
454
- b(l.$slots, "optionTooltip", {}, void 0, !0)
476
+ fn: $(() => [
477
+ k(a.$slots, "optionTooltip", {}, void 0, !0)
455
478
  ]),
456
479
  key: "1"
457
480
  } : void 0,
458
- l.$slots.optionPdf ? {
481
+ a.$slots.optionPdf ? {
459
482
  name: "optionPdf",
460
- fn: k(() => [
461
- b(l.$slots, "optionPdf", {}, void 0, !0)
483
+ fn: $(() => [
484
+ k(a.$slots, "optionPdf", {}, void 0, !0)
462
485
  ]),
463
486
  key: "2"
464
487
  } : void 0,
465
- l.$slots.optionCsv ? {
488
+ a.$slots.optionCsv ? {
466
489
  name: "optionCsv",
467
- fn: k(() => [
468
- b(l.$slots, "optionCsv", {}, void 0, !0)
490
+ fn: $(() => [
491
+ k(a.$slots, "optionCsv", {}, void 0, !0)
469
492
  ]),
470
493
  key: "3"
471
494
  } : void 0,
472
- l.$slots.optionImg ? {
495
+ a.$slots.optionImg ? {
473
496
  name: "optionImg",
474
- fn: k(() => [
475
- b(l.$slots, "optionImg", {}, void 0, !0)
497
+ fn: $(() => [
498
+ k(a.$slots, "optionImg", {}, void 0, !0)
476
499
  ]),
477
500
  key: "4"
478
501
  } : void 0,
479
- l.$slots.optionTable ? {
502
+ a.$slots.optionTable ? {
480
503
  name: "optionTable",
481
- fn: k(() => [
482
- b(l.$slots, "optionTable", {}, void 0, !0)
504
+ fn: $(() => [
505
+ k(a.$slots, "optionTable", {}, void 0, !0)
483
506
  ]),
484
507
  key: "5"
485
508
  } : void 0,
486
- l.$slots.optionLabels ? {
509
+ a.$slots.optionLabels ? {
487
510
  name: "optionLabels",
488
- fn: k(() => [
489
- b(l.$slots, "optionLabels", {}, void 0, !0)
511
+ fn: $(() => [
512
+ k(a.$slots, "optionLabels", {}, void 0, !0)
490
513
  ]),
491
514
  key: "6"
492
515
  } : void 0,
493
- l.$slots.optionSort ? {
516
+ a.$slots.optionSort ? {
494
517
  name: "optionSort",
495
- fn: k(() => [
496
- b(l.$slots, "optionSort", {}, void 0, !0)
518
+ fn: $(() => [
519
+ k(a.$slots, "optionSort", {}, void 0, !0)
497
520
  ]),
498
521
  key: "7"
499
522
  } : void 0,
500
- l.$slots.optionFullscreen ? {
523
+ a.$slots.optionFullscreen ? {
501
524
  name: "optionFullscreen",
502
- fn: k(({ toggleFullscreen: t, isFullscreen: o }) => [
503
- b(l.$slots, "optionFullscreen", W(G({ toggleFullscreen: t, isFullscreen: o })), void 0, !0)
525
+ fn: $(({ toggleFullscreen: t, isFullscreen: o }) => [
526
+ k(a.$slots, "optionFullscreen", G(j({ toggleFullscreen: t, isFullscreen: o })), void 0, !0)
504
527
  ]),
505
528
  key: "8"
506
529
  } : void 0,
507
- l.$slots.optionAnnotator ? {
530
+ a.$slots.optionAnnotator ? {
508
531
  name: "optionAnnotator",
509
- fn: k(({ toggleAnnotator: t, isAnnotator: o }) => [
510
- b(l.$slots, "optionAnnotator", W(G({ toggleAnnotator: t, isAnnotator: o })), void 0, !0)
532
+ fn: $(({ toggleAnnotator: t, isAnnotator: o }) => [
533
+ k(a.$slots, "optionAnnotator", G(j({ toggleAnnotator: t, isAnnotator: o })), void 0, !0)
511
534
  ]),
512
535
  key: "9"
513
536
  } : void 0
514
- ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasSort", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "onGeneratePdf", "onGenerateImage", "style"])) : y("", !0),
537
+ ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasSort", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : y("", !0),
515
538
  e.value.style.chart.legend.show && e.value.style.chart.legend.position === "top" ? (u(), i("div", {
516
539
  key: 4,
517
540
  ref_key: "chartLegend",
518
541
  ref: re
519
542
  }, [
520
- (u(), R(qe, {
543
+ (u(), D(Ke, {
521
544
  key: `legend_top_${ie.value}`,
522
- legendSet: F.value,
523
- config: Me.value,
524
- onClickMarker: a[0] || (a[0] = ({ legend: t }) => K(t.id))
545
+ legendSet: M.value,
546
+ config: ze.value,
547
+ onClickMarker: l[0] || (l[0] = ({ legend: t }) => K(t.id))
525
548
  }, pe({
526
- item: k(({ legend: t, index: o }) => [
549
+ item: $(({ legend: t, index: o }) => [
527
550
  n("div", {
528
- onClick: (_) => K(t.id),
551
+ onClick: (b) => K(t.id),
529
552
  style: c(`opacity:${P.value.includes(t.id) ? 0.5 : 1}`)
530
553
  }, h(t.name) + ": " + h(r(ne)(
531
554
  e.value.style.chart.layout.bars.dataLabels.value.formatter,
532
555
  t.value,
533
- r(E)({
556
+ r(U)({
534
557
  p: e.value.style.chart.legend.prefix,
535
558
  v: t.value,
536
559
  s: e.value.style.chart.legend.suffix,
537
560
  r: e.value.style.chart.legend.roundingValue
538
561
  }),
539
562
  { datapoint: t, seriesIndex: o }
540
- )), 13, jt)
563
+ )), 13, Qt)
541
564
  ]),
542
565
  _: 2
543
566
  }, [
544
- l.$slots.pattern ? {
567
+ a.$slots.pattern ? {
545
568
  name: "legend-pattern",
546
- fn: k(({ legend: t, index: o }) => [
547
- Q(Ye, {
569
+ fn: $(({ legend: t, index: o }) => [
570
+ Q(Je, {
548
571
  shape: t.shape,
549
572
  radius: 30,
550
573
  stroke: "none",
551
574
  plot: { x: 30, y: 30 },
552
- fill: `url(#pattern_${C.value}_${o})`
575
+ fill: `url(#pattern_${T.value}_${o})`
553
576
  }, null, 8, ["shape", "fill"])
554
577
  ]),
555
578
  key: "0"
@@ -559,14 +582,14 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
559
582
  ee.value ? (u(), i("svg", {
560
583
  key: 5,
561
584
  ref_key: "svgRef",
562
- ref: xe,
563
- xmlns: r(It),
564
- class: B({ "vue-data-ui-fullscreen--on": X.value, "vue-data-ui-fulscreen--off": !X.value }),
585
+ ref: Ce,
586
+ xmlns: r(zt),
587
+ class: R({ "vue-data-ui-fullscreen--on": H.value, "vue-data-ui-fulscreen--off": !H.value }),
565
588
  viewBox: `0 0 ${g.value.width <= 0 ? 10 : g.value.width} ${s.value.fullHeight <= 0 ? 10 : s.value.fullHeight}`,
566
589
  style: c(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
567
590
  }, [
568
- Q(r(et)),
569
- l.$slots["chart-background"] ? (u(), i("foreignObject", {
591
+ Q(r(at)),
592
+ a.$slots["chart-background"] ? (u(), i("foreignObject", {
570
593
  key: 0,
571
594
  x: 0,
572
595
  y: 0,
@@ -576,75 +599,75 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
576
599
  pointerEvents: "none"
577
600
  }
578
601
  }, [
579
- b(l.$slots, "chart-background", {}, void 0, !0)
580
- ], 8, Yt)) : y("", !0),
581
- (u(!0), i(j, null, q(z.value, (t, o) => (u(), i("linearGradient", {
602
+ k(a.$slots, "chart-background", {}, void 0, !0)
603
+ ], 8, ea)) : y("", !0),
604
+ (u(!0), i(q, null, Y(A.value, (t, o) => (u(), i("linearGradient", {
582
605
  x1: "0%",
583
606
  y1: "0%",
584
607
  x2: "100%",
585
608
  y2: "0%",
586
- id: `vertical_bar_gradient_${C.value}_${o}`
609
+ id: `vertical_bar_gradient_${T.value}_${o}`
587
610
  }, [
588
611
  n("stop", {
589
612
  offset: "0%",
590
613
  "stop-color": t.color
591
- }, null, 8, Jt),
614
+ }, null, 8, aa),
592
615
  n("stop", {
593
616
  offset: "100%",
594
- "stop-color": r(ge)(r(Ot)(t.color, 0.03), 100 - e.value.style.chart.layout.bars.gradientIntensity)
595
- }, null, 8, Qt)
596
- ], 8, Kt))), 256)),
597
- l.$slots.pattern ? (u(), i("g", Zt, [
598
- (u(!0), i(j, null, q(z.value, (t) => (u(), i("defs", null, [
599
- b(l.$slots, "pattern", xt({ ref_for: !0 }, { seriesIndex: t.absoluteIndex, patternId: `pattern_${C.value}_${t.absoluteIndex}` }), void 0, !0)
617
+ "stop-color": r(ge)(r(At)(t.color, 0.03), 100 - e.value.style.chart.layout.bars.gradientIntensity)
618
+ }, null, 8, la)
619
+ ], 8, ta))), 256)),
620
+ a.$slots.pattern ? (u(), i("g", oa, [
621
+ (u(!0), i(q, null, Y(A.value, (t) => (u(), i("defs", null, [
622
+ k(a.$slots, "pattern", Nt({ ref_for: !0 }, { seriesIndex: t.absoluteIndex, patternId: `pattern_${T.value}_${t.absoluteIndex}` }), void 0, !0)
600
623
  ]))), 256))
601
624
  ])) : y("", !0),
602
- (u(!0), i(j, null, q(z.value, (t, o) => (u(), i("g", null, [
625
+ (u(!0), i(q, null, Y(A.value, (t, o) => (u(), i("g", null, [
603
626
  n("rect", {
604
- x: r(N)(A.value ? s.value.left + s.value.width / 2 - (t.sign === 1 ? 0 : w(t.value) <= 0 ? 1e-4 : w(t.value)) : s.value.left),
605
- y: s.value.top + (f.value + v.value) * o,
606
- width: r(N)(w(t.value) <= 0 ? 1e-4 : w(t.value)),
627
+ x: r(N)(B.value ? s.value.left + s.value.width / 2 - (t.sign === 1 ? 0 : C(t.value) <= 0 ? 1e-4 : C(t.value)) : s.value.left),
628
+ y: s.value.top + (m.value + v.value) * o,
629
+ width: r(N)(C(t.value) <= 0 ? 1e-4 : C(t.value)),
607
630
  height: v.value <= 0 ? 1e-4 : v.value,
608
631
  fill: e.value.style.chart.layout.bars.underlayerColor,
609
632
  rx: e.value.style.chart.layout.bars.borderRadius,
610
- class: B({ animated: e.value.useCssAnimation })
611
- }, null, 10, el)
633
+ class: R({ animated: e.value.useCssAnimation })
634
+ }, null, 10, na)
612
635
  ]))), 256)),
613
- (u(!0), i(j, null, q(z.value, (t, o) => (u(), i("g", null, [
636
+ (u(!0), i(q, null, Y(A.value, (t, o) => (u(), i("g", null, [
614
637
  n("rect", {
615
- x: r(N)(A.value ? s.value.left + s.value.width / 2 - (t.sign === 1 ? 0 : w(t.value) <= 0 ? 1e-4 : w(t.value)) : s.value.left),
616
- y: s.value.top + (f.value + v.value) * o,
617
- width: r(N)(w(t.value) <= 0 ? 1e-4 : w(t.value)),
638
+ x: r(N)(B.value ? s.value.left + s.value.width / 2 - (t.sign === 1 ? 0 : C(t.value) <= 0 ? 1e-4 : C(t.value)) : s.value.left),
639
+ y: s.value.top + (m.value + v.value) * o,
640
+ width: r(N)(C(t.value) <= 0 ? 1e-4 : C(t.value)),
618
641
  height: v.value <= 0 ? 1e-4 : v.value,
619
- fill: e.value.style.chart.layout.bars.useGradient ? `url(#vertical_bar_gradient_${C.value}_${o})` : r(ge)(t.color, e.value.style.chart.layout.bars.fillOpacity),
642
+ fill: e.value.style.chart.layout.bars.useGradient ? `url(#vertical_bar_gradient_${T.value}_${o})` : r(ge)(t.color, e.value.style.chart.layout.bars.fillOpacity),
620
643
  rx: e.value.style.chart.layout.bars.borderRadius,
621
644
  stroke: e.value.style.chart.layout.bars.useStroke ? t.color : "none",
622
645
  "stroke-width": e.value.style.chart.layout.bars.useStroke ? e.value.style.chart.layout.bars.strokeWidth : 0,
623
- class: B({ animated: e.value.useCssAnimation })
624
- }, null, 10, tl),
625
- l.$slots.pattern ? (u(), i("rect", {
646
+ class: R({ animated: e.value.useCssAnimation })
647
+ }, null, 10, ua),
648
+ a.$slots.pattern ? (u(), i("rect", {
626
649
  key: 0,
627
- x: r(N)(A.value ? s.value.left + s.value.width / 2 - (t.sign === 1 ? 0 : w(t.value) <= 0 ? 1e-4 : w(t.value)) : s.value.left),
628
- y: s.value.top + (f.value + v.value) * o,
629
- width: r(N)(w(t.value) <= 0 ? 1e-4 : w(t.value)),
650
+ x: r(N)(B.value ? s.value.left + s.value.width / 2 - (t.sign === 1 ? 0 : C(t.value) <= 0 ? 1e-4 : C(t.value)) : s.value.left),
651
+ y: s.value.top + (m.value + v.value) * o,
652
+ width: r(N)(C(t.value) <= 0 ? 1e-4 : C(t.value)),
630
653
  height: v.value <= 0 ? 1e-4 : v.value,
631
- fill: `url(#pattern_${C.value}_${t.absoluteIndex})`,
654
+ fill: `url(#pattern_${T.value}_${t.absoluteIndex})`,
632
655
  rx: e.value.style.chart.layout.bars.borderRadius,
633
656
  stroke: e.value.style.chart.layout.bars.useStroke ? t.color : "none",
634
657
  "stroke-width": e.value.style.chart.layout.bars.useStroke ? e.value.style.chart.layout.bars.strokeWidth : 0,
635
- class: B({ animated: e.value.useCssAnimation })
636
- }, null, 10, ll)) : y("", !0),
637
- (!t.isChild || t.isLastChild) && e.value.style.chart.layout.separators.show && o !== z.value.length - 1 ? (u(), i("line", {
658
+ class: R({ animated: e.value.useCssAnimation })
659
+ }, null, 10, sa)) : y("", !0),
660
+ (!t.isChild || t.isLastChild) && e.value.style.chart.layout.separators.show && o !== A.value.length - 1 ? (u(), i("line", {
638
661
  key: 1,
639
662
  x1: 0,
640
663
  x2: s.value.left,
641
- y1: v.value + f.value / 2 + s.value.top + (f.value + v.value) * o,
642
- y2: v.value + f.value / 2 + s.value.top + (f.value + v.value) * o,
664
+ y1: v.value + m.value / 2 + s.value.top + (m.value + v.value) * o,
665
+ y2: v.value + m.value / 2 + s.value.top + (m.value + v.value) * o,
643
666
  stroke: e.value.style.chart.layout.separators.color,
644
667
  "stroke-width": e.value.style.chart.layout.separators.strokeWidth,
645
668
  "stroke-linecap": "round"
646
- }, null, 8, al)) : y("", !0),
647
- A.value && e.value.style.chart.layout.separators.show ? (u(), i("line", {
669
+ }, null, 8, ra)) : y("", !0),
670
+ B.value && e.value.style.chart.layout.separators.show ? (u(), i("line", {
648
671
  key: 2,
649
672
  x1: s.value.left + s.value.width / 2,
650
673
  x2: s.value.left + s.value.width / 2,
@@ -653,24 +676,24 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
653
676
  stroke: e.value.style.chart.layout.separators.color,
654
677
  "stroke-width": e.value.style.chart.layout.separators.strokeWidth,
655
678
  "stroke-linecap": "round"
656
- }, null, 8, ol)) : y("", !0),
679
+ }, null, 8, ia)) : y("", !0),
657
680
  n("text", {
658
- x: A.value ? s.value.left + s.value.width / 2 + (t.sign === 1 ? -12 : 12) + (t.sign === 1 ? -e.value.style.chart.layout.bars.dataLabels.offsetX : e.value.style.chart.layout.bars.dataLabels.offsetX) : yt(t.value) + 3 + e.value.style.chart.layout.bars.dataLabels.offsetX,
659
- y: s.value.top + (f.value + v.value) * o + v.value / 2 + e.value.style.chart.layout.bars.dataLabels.fontSize / 2,
660
- "text-anchor": !A.value || t.sign === -1 ? "start" : "end",
681
+ x: B.value ? s.value.left + s.value.width / 2 + (t.sign === 1 ? -12 : 12) + (t.sign === 1 ? -e.value.style.chart.layout.bars.dataLabels.offsetX : e.value.style.chart.layout.bars.dataLabels.offsetX) : gt(t.value) + 3 + e.value.style.chart.layout.bars.dataLabels.offsetX,
682
+ y: s.value.top + (m.value + v.value) * o + v.value / 2 + e.value.style.chart.layout.bars.dataLabels.fontSize / 2,
683
+ "text-anchor": !B.value || t.sign === -1 ? "start" : "end",
661
684
  "font-size": e.value.style.chart.layout.bars.dataLabels.fontSize,
662
685
  fill: e.value.style.chart.layout.bars.dataLabels.color,
663
686
  "font-weight": e.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal"
664
- }, h(Be(t.value, t, o, t.sign)), 9, nl),
687
+ }, h(Re(t.value, t, o, t.sign)), 9, da),
665
688
  (t.isChild || !t.hasChildren) && e.value.style.chart.layout.bars.nameLabels.show ? (u(), i("text", {
666
689
  key: 3,
667
690
  "text-anchor": "end",
668
691
  x: s.value.left - 3 + e.value.style.chart.layout.bars.nameLabels.offsetX,
669
- y: s.value.top + (f.value + v.value) * o + v.value / 2 + e.value.style.chart.layout.bars.nameLabels.fontSize / 2,
692
+ y: s.value.top + (m.value + v.value) * o + v.value / 2 + e.value.style.chart.layout.bars.nameLabels.fontSize / 2,
670
693
  "font-size": e.value.style.chart.layout.bars.nameLabels.fontSize,
671
694
  fill: e.value.style.chart.layout.bars.nameLabels.color,
672
695
  "font-weight": e.value.style.chart.layout.bars.nameLabels.bold ? "bold" : "normal"
673
- }, h(t.name), 9, ul)) : y("", !0),
696
+ }, h(t.name), 9, va)) : y("", !0),
674
697
  t.isChild && t.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (u(), i("text", {
675
698
  key: 4,
676
699
  x: 3 + e.value.style.chart.layout.bars.parentLabels.offsetX,
@@ -679,7 +702,7 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
679
702
  fill: e.value.style.chart.layout.bars.parentLabels.color,
680
703
  "font-weight": e.value.style.chart.layout.bars.parentLabels.bold ? "bold" : "normal",
681
704
  "text-anchor": "start"
682
- }, h(J(t, o).name), 9, sl)) : y("", !0),
705
+ }, h(J(t, o).name), 9, ca)) : y("", !0),
683
706
  t.isChild && t.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (u(), i("text", {
684
707
  key: 5,
685
708
  x: 3 + e.value.style.chart.layout.bars.parentLabels.offsetX,
@@ -688,25 +711,24 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
688
711
  fill: e.value.style.chart.layout.bars.parentLabels.color,
689
712
  "font-weight": e.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal",
690
713
  "text-anchor": "start"
691
- }, h(Be(J(t, o).value), J(t, o), o, t.parentSign || t.sign), 9, rl)) : y("", !0),
714
+ }, h(Re(J(t, o).value), J(t, o), o, t.parentSign || t.sign), 9, ha)) : y("", !0),
692
715
  n("rect", {
693
716
  x: 0,
694
- y: s.value.top + (f.value + v.value) * o - f.value / 2,
717
+ y: s.value.top + (m.value + v.value) * o - m.value / 2,
695
718
  width: g.value.width <= 0 ? 1e-4 : g.value.width,
696
- height: v.value + f.value <= 0 ? 1e-4 : v.value + f.value,
719
+ height: v.value + m.value <= 0 ? 1e-4 : v.value + m.value,
697
720
  fill: ve.value === t.id ? r(ge)(e.value.style.chart.layout.highlighter.color, e.value.style.chart.layout.highlighter.opacity) : "transparent",
698
- onMouseenter: (_) => ft(t, o),
699
- onMouseleave: a[1] || (a[1] = (_) => {
700
- rt.value = null, ue.value = !1, ve.value = null;
701
- })
702
- }, null, 40, il)
721
+ onMouseenter: (b) => _t(t, o),
722
+ onMouseleave: (b) => kt({ datapoint: t, seriesIndex: o }),
723
+ onClick: (b) => mt({ datapoint: t, seriesIndex: o })
724
+ }, null, 40, pa)
703
725
  ]))), 256)),
704
- b(l.$slots, "svg", { svg: g.value }, void 0, !0)
705
- ], 14, qt)) : y("", !0),
706
- l.$slots.watermark ? (u(), i("div", dl, [
707
- b(l.$slots, "watermark", W(G({ isPrinting: r(Te) || r(Le) })), void 0, !0)
726
+ k(a.$slots, "svg", { svg: g.value }, void 0, !0)
727
+ ], 14, Zt)) : y("", !0),
728
+ a.$slots.watermark ? (u(), i("div", ya, [
729
+ k(a.$slots, "watermark", G(j({ isPrinting: r(Le) || r(Ne) })), void 0, !0)
708
730
  ])) : y("", !0),
709
- ee.value ? y("", !0) : (u(), R(r(lt), {
731
+ ee.value ? y("", !0) : (u(), D(r(ot), {
710
732
  key: 7,
711
733
  config: {
712
734
  type: "verticalBar",
@@ -726,56 +748,56 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
726
748
  ref_key: "chartLegend",
727
749
  ref: re
728
750
  }, [
729
- (u(), R(qe, {
751
+ (u(), D(Ke, {
730
752
  key: `legend_bottom_${ie.value}`,
731
- legendSet: F.value,
732
- config: Me.value,
733
- onClickMarker: a[2] || (a[2] = ({ legend: t }) => K(t.id))
753
+ legendSet: M.value,
754
+ config: ze.value,
755
+ onClickMarker: l[1] || (l[1] = ({ legend: t }) => K(t.id))
734
756
  }, pe({
735
- item: k(({ legend: t, index: o }) => [
757
+ item: $(({ legend: t, index: o }) => [
736
758
  n("div", {
737
- onClick: (_) => K(t.id),
759
+ onClick: (b) => K(t.id),
738
760
  style: c(`opacity:${P.value.includes(t.id) ? 0.5 : 1}`)
739
761
  }, h(t.name) + ": " + h(r(ne)(
740
762
  e.value.style.chart.layout.bars.dataLabels.value.formatter,
741
763
  t.value,
742
- r(E)({
764
+ r(U)({
743
765
  p: e.value.style.chart.legend.prefix,
744
766
  v: t.value,
745
767
  s: e.value.style.chart.legend.suffix,
746
768
  r: e.value.style.chart.legend.roundingValue
747
769
  }),
748
770
  { datapoint: t, seriesIndex: o }
749
- )), 13, vl)
771
+ )), 13, fa)
750
772
  ]),
751
773
  _: 2
752
774
  }, [
753
- l.$slots.pattern ? {
775
+ a.$slots.pattern ? {
754
776
  name: "legend-pattern",
755
- fn: k(({ legend: t, index: o }) => [
756
- Q(Ye, {
777
+ fn: $(({ legend: t, index: o }) => [
778
+ Q(Je, {
757
779
  shape: t.shape,
758
780
  radius: 30,
759
781
  stroke: "none",
760
782
  plot: { x: 30, y: 30 },
761
- fill: `url(#pattern_${C.value}_${o})`
783
+ fill: `url(#pattern_${T.value}_${o})`
762
784
  }, null, 8, ["shape", "fill"])
763
785
  ]),
764
786
  key: "0"
765
787
  } : void 0
766
788
  ]), 1032, ["legendSet", "config"]))
767
789
  ], 512)) : y("", !0),
768
- b(l.$slots, "legend", { legend: F.value }, void 0, !0),
769
- l.$slots.source ? (u(), i("div", {
790
+ k(a.$slots, "legend", { legend: M.value }, void 0, !0),
791
+ a.$slots.source ? (u(), i("div", {
770
792
  key: 9,
771
793
  ref_key: "source",
772
- ref: me,
794
+ ref: ke,
773
795
  dir: "auto"
774
796
  }, [
775
- b(l.$slots, "source", {}, void 0, !0)
797
+ k(a.$slots, "source", {}, void 0, !0)
776
798
  ], 512)) : y("", !0),
777
- Q(r(at), {
778
- show: $.value.showTooltip && ue.value && P.value.length < T.dataset.length,
799
+ Q(r(nt), {
800
+ show: w.value.showTooltip && ue.value && P.value.length < f.dataset.length,
779
801
  backgroundColor: e.value.style.chart.tooltip.backgroundColor,
780
802
  color: e.value.style.chart.tooltip.color,
781
803
  borderRadius: e.value.style.chart.tooltip.borderRadius,
@@ -785,24 +807,24 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
785
807
  backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
786
808
  position: e.value.style.chart.tooltip.position,
787
809
  offsetY: e.value.style.chart.tooltip.offsetY,
788
- parent: Y.value,
810
+ parent: I.value,
789
811
  content: se.value,
790
- isFullscreen: X.value,
812
+ isFullscreen: H.value,
791
813
  isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function"
792
814
  }, {
793
- "tooltip-before": k(() => [
794
- b(l.$slots, "tooltip-before", W(G({ ...ce.value })), void 0, !0)
815
+ "tooltip-before": $(() => [
816
+ k(a.$slots, "tooltip-before", G(j({ ...ce.value })), void 0, !0)
795
817
  ]),
796
- "tooltip-after": k(() => [
797
- b(l.$slots, "tooltip-after", W(G({ ...ce.value })), void 0, !0)
818
+ "tooltip-after": $(() => [
819
+ k(a.$slots, "tooltip-after", G(j({ ...ce.value })), void 0, !0)
798
820
  ]),
799
821
  _: 3
800
822
  }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
801
- ee.value ? (u(), R(Xt, {
823
+ ee.value ? (u(), D(jt, {
802
824
  key: 10,
803
825
  hideDetails: "",
804
826
  config: {
805
- open: $.value.showTable,
827
+ open: w.value.showTable,
806
828
  maxHeight: 1e4,
807
829
  body: {
808
830
  backgroundColor: e.value.style.chart.backgroundColor,
@@ -814,21 +836,21 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
814
836
  }
815
837
  }
816
838
  }, {
817
- content: k(() => [
839
+ content: $(() => [
818
840
  n("div", {
819
841
  ref_key: "tableContainer",
820
- ref: Ve,
842
+ ref: Ie,
821
843
  class: "vue-ui-vertical-bar-table atom-data-table"
822
844
  }, [
823
- n("div", cl, [
845
+ n("div", ga, [
824
846
  n("div", {
825
847
  role: "button",
826
848
  tabindex: "0",
827
849
  style: c(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${e.value.table.th.backgroundColor};`),
828
- onClick: a[3] || (a[3] = (t) => $.value.showTable = !1),
829
- onKeypress: a[4] || (a[4] = Ct((t) => $.value.showTable = !1, ["enter"]))
850
+ onClick: l[2] || (l[2] = (t) => w.value.showTable = !1),
851
+ onKeypress: l[3] || (l[3] = Pt((t) => w.value.showTable = !1, ["enter"]))
830
852
  }, [
831
- Q(r(Ze), {
853
+ Q(r(tt), {
832
854
  name: "close",
833
855
  stroke: e.value.table.th.color,
834
856
  "stroke-width": 2
@@ -836,25 +858,25 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
836
858
  ], 36),
837
859
  n("div", {
838
860
  style: { width: "100%", "container-type": "inline-size" },
839
- class: B({ "vue-ui-responsive": Ie.value })
861
+ class: R({ "vue-ui-responsive": Oe.value })
840
862
  }, [
841
- n("table", hl, [
863
+ n("table", ba, [
842
864
  n("caption", {
843
865
  style: c({ backgroundColor: e.value.table.th.backgroundColor, color: e.value.table.th.color, outline: e.value.table.th.outline }),
844
866
  class: "vue-ui-data-table__caption"
845
867
  }, [
846
- Tt(h(e.value.style.chart.title.text) + " ", 1),
847
- e.value.style.chart.title.subtitle.text ? (u(), i("span", pl, h(e.value.style.chart.title.subtitle.text), 1)) : y("", !0)
868
+ St(h(e.value.style.chart.title.text) + " ", 1),
869
+ e.value.style.chart.title.subtitle.text ? (u(), i("span", ma, h(e.value.style.chart.title.subtitle.text), 1)) : y("", !0)
848
870
  ], 4),
849
871
  n("thead", null, [
850
872
  n("tr", {
851
873
  role: "row",
852
874
  style: c(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color}`)
853
875
  }, [
854
- (u(!0), i(j, null, q(L.value.head, (t) => (u(), i("th", {
876
+ (u(!0), i(q, null, Y(L.value.head, (t) => (u(), i("th", {
855
877
  style: c(`outline:${e.value.table.th.outline}`)
856
878
  }, [
857
- n("div", yl, h(t), 1)
879
+ n("div", ka, h(t), 1)
858
880
  ], 4))), 256))
859
881
  ], 4),
860
882
  n("tr", null, [
@@ -882,8 +904,8 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
882
904
  ])
883
905
  ]),
884
906
  n("tbody", null, [
885
- (u(!0), i(j, null, q(L.value.body, (t, o) => (u(), i("tr", {
886
- class: B({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": o % 2 === 0, "vue-ui-data-table__tbody__row-odd": o % 2 !== 0 }),
907
+ (u(!0), i(q, null, Y(L.value.body, (t, o) => (u(), i("tr", {
908
+ class: R({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": o % 2 === 0, "vue-ui-data-table__tbody__row-odd": o % 2 !== 0 }),
887
909
  style: c(`background:${e.value.table.td.backgroundColor};color:${e.value.table.td.color}`)
888
910
  }, [
889
911
  n("td", {
@@ -891,56 +913,56 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
891
913
  style: c(`outline:${e.value.table.td.outline};font-variant-numeric: tabular-nums;`),
892
914
  "data-cell": L.value.head[0] ?? ""
893
915
  }, [
894
- n("div", fl, [
916
+ n("div", $a, [
895
917
  t.color ? (u(), i("span", {
896
918
  key: 0,
897
919
  style: c(`color:${t.color};margin-right:3px`)
898
920
  }, "⬤", 4)) : y("", !0),
899
921
  n("span", null, h(t.parentName), 1)
900
922
  ])
901
- ], 12, gl),
923
+ ], 12, _a),
902
924
  n("td", {
903
925
  class: "vue-ui-data-table__tbody__td",
904
926
  style: c(`outline:${e.value.table.td.outline}`),
905
927
  "data-cell": L.value.head[1] ?? ""
906
928
  }, [
907
- n("div", ml, h(e.value.table.td.prefix) + h(["", NaN, void 0].includes(t.parentValue) ? "" : t.parentValue.toFixed(e.value.table.td.roundingValue)) + h(e.value.table.td.suffix), 1)
908
- ], 12, bl),
929
+ n("div", xa, h(e.value.table.td.prefix) + h(["", NaN, void 0].includes(t.parentValue) ? "" : t.parentValue.toFixed(e.value.table.td.roundingValue)) + h(e.value.table.td.suffix), 1)
930
+ ], 12, wa),
909
931
  n("td", {
910
932
  class: "vue-ui-data-table__tbody__td",
911
933
  style: c(`outline:${e.value.table.td.outline}`),
912
934
  "data-cell": L.value.head[2] ?? ""
913
935
  }, [
914
- n("div", _l, h(["", NaN, void 0].includes(t.percentageToTotal) ? "" : `${(t.percentageToTotal * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
915
- ], 12, kl),
936
+ n("div", Ta, h(["", NaN, void 0].includes(t.percentageToTotal) ? "" : `${(t.percentageToTotal * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
937
+ ], 12, Ca),
916
938
  n("td", {
917
939
  class: "vue-ui-data-table__tbody__td",
918
940
  style: c(`outline:${e.value.table.td.outline}`),
919
941
  "data-cell": L.value.head[3] ?? ""
920
942
  }, [
921
- n("div", wl, h(t.childName), 1)
922
- ], 12, $l),
943
+ n("div", Na, h(t.childName), 1)
944
+ ], 12, La),
923
945
  n("td", {
924
946
  class: "vue-ui-data-table__tbody__td",
925
947
  style: c(`outline:${e.value.table.td.outline}`),
926
948
  "data-cell": L.value.head[4] ?? ""
927
949
  }, [
928
- n("div", Cl, h(e.value.table.td.prefix) + h(["", NaN, void 0].includes(t.childValue) ? "" : t.childValue.toFixed(e.value.table.td.roundingValue)) + h(e.value.table.td.suffix), 1)
929
- ], 12, xl),
950
+ n("div", Sa, h(e.value.table.td.prefix) + h(["", NaN, void 0].includes(t.childValue) ? "" : t.childValue.toFixed(e.value.table.td.roundingValue)) + h(e.value.table.td.suffix), 1)
951
+ ], 12, Pa),
930
952
  n("td", {
931
953
  class: "vue-ui-data-table__tbody__td",
932
954
  style: c(`outline:${e.value.table.td.outline}`),
933
955
  "data-cell": L.value.head[5] ?? ""
934
956
  }, [
935
- n("div", Ll, h(["", NaN, void 0].includes(t.childPercentageToParent) ? "" : `${(t.childPercentageToParent * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
936
- ], 12, Tl),
957
+ n("div", Ia, h(["", NaN, void 0].includes(t.childPercentageToParent) ? "" : `${(t.childPercentageToParent * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
958
+ ], 12, Va),
937
959
  n("td", {
938
960
  class: "vue-ui-data-table__tbody__td",
939
961
  style: c(`outline:${e.value.table.td.outline}`),
940
962
  "data-cell": L.value.head[6] ?? ""
941
963
  }, [
942
- n("div", Pl, h(["", NaN, void 0].includes(t.childPercentageToTotal) ? "" : `${(t.childPercentageToTotal * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
943
- ], 12, Nl)
964
+ n("div", Fa, h(["", NaN, void 0].includes(t.childPercentageToTotal) ? "" : `${(t.childPercentageToTotal * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
965
+ ], 12, Oa)
944
966
  ], 6))), 256))
945
967
  ])
946
968
  ])
@@ -950,9 +972,9 @@ const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "
950
972
  ]),
951
973
  _: 1
952
974
  }, 8, ["config"])) : y("", !0)
953
- ], 46, Gt));
975
+ ], 46, Jt));
954
976
  }
955
- }, Xl = /* @__PURE__ */ Wt(Sl, [["__scopeId", "data-v-56a29a80"]]);
977
+ }, Ya = /* @__PURE__ */ Kt(Ma, [["__scopeId", "data-v-5bfdccb4"]]);
956
978
  export {
957
- Xl as default
979
+ Ya as default
958
980
  };