vue-data-ui 3.3.3 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/dist/{Arrow-ayTeSvpe.js → Arrow-CRe_nKB4.js} +1 -1
  2. package/dist/{BaseDraggableDialog-Cysanw8-.js → BaseDraggableDialog-CbuLbfrc.js} +2 -2
  3. package/dist/{BaseIcon-DG6cvf2h.js → BaseIcon-B5KaGWWC.js} +1 -1
  4. package/dist/{ColorPicker-CA8kKZjZ.js → ColorPicker-BMztHpBp.js} +10 -10
  5. package/dist/{DataTable-DUpZ_s2c.js → DataTable-DOx3zgih.js} +2 -2
  6. package/dist/{Legend-CCBZ2x8T.js → Legend-C8u37J42.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-D2IMGwaN.js → NonSvgPenAndPaper-BcxfJ-r2.js} +3 -3
  8. package/dist/{PackageVersion-CQvYRebC.js → PackageVersion-VpPtLYhK.js} +1 -1
  9. package/dist/{PenAndPaper-D9LruJaM.js → PenAndPaper-Dj2diYr0.js} +3 -3
  10. package/dist/{Shape-BS9UGhNq.js → Shape-BhNvlGIN.js} +1 -1
  11. package/dist/{Slicer-BOki89CB.js → Slicer-BHgEsIBU.js} +111 -111
  12. package/dist/SlicerPreview-Cobmb_1S.js +1148 -0
  13. package/dist/{SparkTooltip-svd8Hb6c.js → SparkTooltip-CL3cNRQ_.js} +1 -1
  14. package/dist/{Title-B6rAo9Oz.js → Title-CFmv95In.js} +1 -1
  15. package/dist/{Tooltip-DaInVNiV.js → Tooltip-Cs4v8OnI.js} +1 -1
  16. package/dist/{UserOptions-CJXSEhan.js → UserOptions-C0YT60JN.js} +2 -2
  17. package/dist/components/arrow.js +1 -1
  18. package/dist/components/vue-ui-3d-bar.js +1 -1
  19. package/dist/components/vue-ui-accordion.js +1 -1
  20. package/dist/components/vue-ui-age-pyramid.js +1 -1
  21. package/dist/components/vue-ui-annotator.js +1 -1
  22. package/dist/components/vue-ui-bullet.js +1 -1
  23. package/dist/components/vue-ui-candlestick.js +1 -1
  24. package/dist/components/vue-ui-carousel-table.js +1 -1
  25. package/dist/components/vue-ui-chestnut.js +1 -1
  26. package/dist/components/vue-ui-chord.js +1 -1
  27. package/dist/components/vue-ui-circle-pack.js +1 -1
  28. package/dist/components/vue-ui-cursor.js +1 -1
  29. package/dist/components/vue-ui-dashboard.js +1 -1
  30. package/dist/components/vue-ui-digits.js +1 -1
  31. package/dist/components/vue-ui-donut-evolution.js +1 -1
  32. package/dist/components/vue-ui-donut.js +1 -1
  33. package/dist/components/vue-ui-dumbbell.js +1 -1
  34. package/dist/components/vue-ui-flow.js +1 -1
  35. package/dist/components/vue-ui-funnel.js +1 -1
  36. package/dist/components/vue-ui-galaxy.js +1 -1
  37. package/dist/components/vue-ui-gauge.js +1 -1
  38. package/dist/components/vue-ui-gizmo.js +1 -1
  39. package/dist/components/vue-ui-heatmap.js +1 -1
  40. package/dist/components/vue-ui-history-plot.js +1 -1
  41. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  42. package/dist/components/vue-ui-icon.js +1 -1
  43. package/dist/components/vue-ui-kpi.js +1 -1
  44. package/dist/components/vue-ui-mini-loader.js +1 -1
  45. package/dist/components/vue-ui-molecule.js +1 -1
  46. package/dist/components/vue-ui-mood-radar.js +1 -1
  47. package/dist/components/vue-ui-nested-donuts.js +1 -1
  48. package/dist/components/vue-ui-onion.js +1 -1
  49. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  50. package/dist/components/vue-ui-quadrant.js +1 -1
  51. package/dist/components/vue-ui-quick-chart.js +1 -1
  52. package/dist/components/vue-ui-radar.js +1 -1
  53. package/dist/components/vue-ui-rating.js +1 -1
  54. package/dist/components/vue-ui-relation-circle.js +1 -1
  55. package/dist/components/vue-ui-ridgeline.js +1 -1
  56. package/dist/components/vue-ui-rings.js +1 -1
  57. package/dist/components/vue-ui-scatter.js +1 -1
  58. package/dist/components/vue-ui-skeleton.js +1 -1
  59. package/dist/components/vue-ui-smiley.js +1 -1
  60. package/dist/components/vue-ui-spark-trend.js +1 -1
  61. package/dist/components/vue-ui-sparkbar.js +1 -1
  62. package/dist/components/vue-ui-sparkgauge.js +1 -1
  63. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  64. package/dist/components/vue-ui-sparkline.js +1 -1
  65. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  66. package/dist/components/vue-ui-stackbar.js +1 -1
  67. package/dist/components/vue-ui-strip-plot.js +1 -1
  68. package/dist/components/vue-ui-table-heatmap.js +1 -1
  69. package/dist/components/vue-ui-table-sparkline.js +1 -1
  70. package/dist/components/vue-ui-table.js +1 -1
  71. package/dist/components/vue-ui-thermometer.js +1 -1
  72. package/dist/components/vue-ui-timer.js +1 -1
  73. package/dist/components/vue-ui-tiremarks.js +1 -1
  74. package/dist/components/vue-ui-treemap.js +1 -1
  75. package/dist/components/vue-ui-vertical-bar.js +1 -1
  76. package/dist/components/vue-ui-waffle.js +1 -1
  77. package/dist/components/vue-ui-wheel.js +1 -1
  78. package/dist/components/vue-ui-word-cloud.js +1 -1
  79. package/dist/components/vue-ui-world.js +1 -1
  80. package/dist/components/vue-ui-xy-canvas.js +1 -1
  81. package/dist/components/vue-ui-xy.js +1 -1
  82. package/dist/{dom-to-png-Tq92GZKA.js → dom-to-png-xQ7LXrxp.js} +1 -1
  83. package/dist/{img-DI-W68vp.js → img-CFY3JivG.js} +1 -1
  84. package/dist/{lib-CSDxt1Zh.js → lib-BcBZIm6u.js} +439 -395
  85. package/dist/{pdf-BzVpWnNO.js → pdf-O34i6EQX.js} +1 -1
  86. package/dist/style.css +1 -1
  87. package/dist/types/vue-data-ui.d.ts +82 -8
  88. package/dist/{useAutoSizeLabelsInsideViewbox-CtQ7pJ8G.js → useAutoSizeLabelsInsideViewbox-BHq4FD8x.js} +1 -1
  89. package/dist/{useNestedProp-Dh-ldrr5.js → useNestedProp-B7CiTRDS.js} +327 -240
  90. package/dist/{usePrinter-Cq8Pt6Lh.js → usePrinter-C1GiglOH.js} +2 -2
  91. package/dist/{vue-data-ui-CDY7snWF.js → vue-data-ui-oDJui39L.js} +64 -64
  92. package/dist/vue-data-ui.js +100 -100
  93. package/dist/{vue-ui-3d-bar-DbpiTjGu.js → vue-ui-3d-bar-wycTM073.js} +56 -56
  94. package/dist/{vue-ui-accordion-CaClZrCp.js → vue-ui-accordion-BKkTS12x.js} +3 -3
  95. package/dist/{vue-ui-age-pyramid-DuIxXz5p.js → vue-ui-age-pyramid-C5NUZ_Y7.js} +39 -39
  96. package/dist/{vue-ui-annotator-C2efSKQK.js → vue-ui-annotator-DkSYrnwb.js} +7 -7
  97. package/dist/{vue-ui-bullet-qpcqLKmp.js → vue-ui-bullet-CIsX5UJw.js} +7 -7
  98. package/dist/vue-ui-candlestick-BRFx3_KK.js +1334 -0
  99. package/dist/{vue-ui-carousel-table-CCTtArFX.js → vue-ui-carousel-table-hJySHJTu.js} +29 -29
  100. package/dist/{vue-ui-chestnut-CbvxJ8hy.js → vue-ui-chestnut-D4GjvQh0.js} +70 -70
  101. package/dist/{vue-ui-chord-Cp9nyIdv.js → vue-ui-chord-By2NOs0N.js} +35 -35
  102. package/dist/{vue-ui-circle-pack-kHzd0UYO.js → vue-ui-circle-pack-OCmAkTNs.js} +59 -59
  103. package/dist/{vue-ui-cursor-DEvkJRCz.js → vue-ui-cursor-iuati4v1.js} +2 -2
  104. package/dist/{vue-ui-dashboard-k_mz9iwy.js → vue-ui-dashboard-C7fwU9xb.js} +67 -67
  105. package/dist/{vue-ui-digits-CqWCkEu2.js → vue-ui-digits-eYxf3UFN.js} +2 -2
  106. package/dist/{vue-ui-donut-CDKS6sVu.js → vue-ui-donut-dVVBUQJz.js} +189 -189
  107. package/dist/{vue-ui-donut-evolution-C6cGI_P3.js → vue-ui-donut-evolution-BoWGaQP0.js} +82 -82
  108. package/dist/{vue-ui-dumbbell-ZjJst3xs.js → vue-ui-dumbbell-YMPZ3CVA.js} +66 -66
  109. package/dist/{vue-ui-flow-sX1PYIkr.js → vue-ui-flow-BE62rVS3.js} +75 -75
  110. package/dist/{vue-ui-funnel--VViM9gH.js → vue-ui-funnel-kNpDFAWo.js} +63 -63
  111. package/dist/{vue-ui-galaxy-Du0V9GF8.js → vue-ui-galaxy-BBBiXXyk.js} +62 -62
  112. package/dist/{vue-ui-gauge-BAe4p2g-.js → vue-ui-gauge-PQNTTl3Y.js} +58 -58
  113. package/dist/{vue-ui-gizmo-CfjwAt38.js → vue-ui-gizmo-D3gQxQz3.js} +3 -3
  114. package/dist/{vue-ui-heatmap-Q0jrPM5h.js → vue-ui-heatmap-CKWQButF.js} +104 -104
  115. package/dist/{vue-ui-history-plot-CLSN3mPy.js → vue-ui-history-plot-DYFzdR4Z.js} +91 -91
  116. package/dist/{vue-ui-kpi-CBRgXD1s.js → vue-ui-kpi-N8s0i48S.js} +3 -3
  117. package/dist/{vue-ui-mini-loader-3yCeDEPK.js → vue-ui-mini-loader-Db-9iQcC.js} +2 -2
  118. package/dist/{vue-ui-molecule-Ddh4hbX0.js → vue-ui-molecule-Cklyb74B.js} +102 -102
  119. package/dist/{vue-ui-mood-radar-CK8UF-ka.js → vue-ui-mood-radar-Cvq4ZuLe.js} +28 -28
  120. package/dist/{vue-ui-nested-donuts-DO0FV0tU.js → vue-ui-nested-donuts-Bm78P1ES.js} +60 -60
  121. package/dist/{vue-ui-onion-DXLqoj-4.js → vue-ui-onion-Bh5jTb31.js} +46 -46
  122. package/dist/{vue-ui-parallel-coordinate-plot-BlffHAHB.js → vue-ui-parallel-coordinate-plot-BKdN2OsW.js} +64 -64
  123. package/dist/{vue-ui-quadrant-pw2ALj7p.js → vue-ui-quadrant-BPhJzots.js} +8 -8
  124. package/dist/{vue-ui-quick-chart-9oGbV593.js → vue-ui-quick-chart-DbJR9CN3.js} +86 -86
  125. package/dist/vue-ui-radar-CrenQprr.js +938 -0
  126. package/dist/{vue-ui-rating-C4yZY1sb.js → vue-ui-rating-fR2WRHYO.js} +2 -2
  127. package/dist/{vue-ui-relation-circle-Duxv-A4H.js → vue-ui-relation-circle-BJ5RuZ0j.js} +31 -31
  128. package/dist/{vue-ui-ridgeline-B-q7J-C0.js → vue-ui-ridgeline-CKuom5Bu.js} +97 -97
  129. package/dist/{vue-ui-rings-PRAcmP1H.js → vue-ui-rings-B84GAEf4.js} +50 -50
  130. package/dist/{vue-ui-scatter-BLW4MJtJ.js → vue-ui-scatter-CBX-g9w3.js} +100 -100
  131. package/dist/{vue-ui-skeleton-D0PF0jxa.js → vue-ui-skeleton-CZ8xxpEU.js} +3 -3
  132. package/dist/{vue-ui-smiley-Be44gMTh.js → vue-ui-smiley-BKXuAviQ.js} +2 -2
  133. package/dist/{vue-ui-spark-trend-B2XY2dRa.js → vue-ui-spark-trend-DOf7-cIf.js} +18 -18
  134. package/dist/{vue-ui-sparkbar-DWQN4gvR.js → vue-ui-sparkbar-D-MPA2zf.js} +3 -3
  135. package/dist/{vue-ui-sparkgauge-fDhQGQ12.js → vue-ui-sparkgauge-B9xRiVSU.js} +6 -6
  136. package/dist/{vue-ui-sparkhistogram-f7Acvipt.js → vue-ui-sparkhistogram-BWb0lqQP.js} +4 -4
  137. package/dist/{vue-ui-sparkline-Ys3JW7Ap.js → vue-ui-sparkline-BF-qr8Ti.js} +23 -23
  138. package/dist/{vue-ui-sparkstackbar-Dv0HeSna.js → vue-ui-sparkstackbar-DnCUpk50.js} +17 -17
  139. package/dist/vue-ui-stackbar-DvJ8Hahn.js +1695 -0
  140. package/dist/{vue-ui-strip-plot-DN13ntF-.js → vue-ui-strip-plot-SAh1gIs5.js} +52 -52
  141. package/dist/{vue-ui-table-Qb5tDX1n.js → vue-ui-table-BJdDfMYD.js} +18 -18
  142. package/dist/{vue-ui-table-heatmap-hMrgJ25a.js → vue-ui-table-heatmap-DU6GKPVy.js} +32 -32
  143. package/dist/{vue-ui-table-sparkline-CdkFyJjv.js → vue-ui-table-sparkline-BBFEJ8c6.js} +28 -28
  144. package/dist/{vue-ui-thermometer-D7U2C7kJ.js → vue-ui-thermometer-D8DH6QSN.js} +22 -22
  145. package/dist/{vue-ui-timer-KtA4M2mV.js → vue-ui-timer-CaUdAHBE.js} +29 -29
  146. package/dist/{vue-ui-tiremarks-C6GTGszq.js → vue-ui-tiremarks-_sUH1d3J.js} +14 -14
  147. package/dist/{vue-ui-treemap-rhnl1TW9.js → vue-ui-treemap-DXduzuW4.js} +78 -78
  148. package/dist/{vue-ui-vertical-bar-n_Lvbd_X.js → vue-ui-vertical-bar-JdjmgwQj.js} +94 -94
  149. package/dist/{vue-ui-waffle-D-4whGLN.js → vue-ui-waffle-h8zoi4Rc.js} +68 -68
  150. package/dist/{vue-ui-wheel-D92HLjfr.js → vue-ui-wheel-Ck1Mx37j.js} +21 -21
  151. package/dist/{vue-ui-word-cloud-Df9AMw6v.js → vue-ui-word-cloud-CjWvuukM.js} +47 -47
  152. package/dist/{vue-ui-world-Bg9S35ug.js → vue-ui-world-Dw71_Mu2.js} +6 -6
  153. package/dist/vue-ui-xy-canvas-Dct7tf8w.js +1548 -0
  154. package/dist/vue-ui-xy-tSMgXqqb.js +3375 -0
  155. package/package.json +2 -2
  156. package/dist/vue-ui-candlestick-DTWbbdGH.js +0 -1073
  157. package/dist/vue-ui-radar-Csznqw19.js +0 -891
  158. package/dist/vue-ui-stackbar-DUlN5QiM.js +0 -1457
  159. package/dist/vue-ui-xy-Da6oy2rm.js +0 -4527
  160. package/dist/vue-ui-xy-canvas-0CLSIKpO.js +0 -1305
@@ -1,1305 +0,0 @@
1
- import { defineAsyncComponent as ee, ref as c, computed as L, useSlots as el, onMounted as ha, watch as D, nextTick as fa, shallowRef as Me, onBeforeUnmount as al, createElementBlock as de, openBlock as S, unref as p, normalizeClass as ll, normalizeStyle as ae, createCommentVNode as H, createElementVNode as Y, createBlock as F, createSlots as ya, withCtx as m, renderSlot as k, normalizeProps as V, guardReactiveProps as Z, createVNode as ga, Teleport as tl, toDisplayString as Oe, resolveDynamicComponent as ol, mergeProps as ul, createTextVNode as pa } from "vue";
2
- import { c as rl, b as sl, p as G, B as he, e as nl, C as Re, a as le, d as te, h as ma, _ as il, J as vl, a7 as cl, o as dl, f as hl, z as ba, x as fl, y as yl, A as gl, s as fe, m as pl } from "./lib-CSDxt1Zh.js";
3
- import { d as ml, t as bl, u as xl, c as Ll, a as xa, l as C, r as De, b as P, p as La } from "./useResponsive-DfdjqQps.js";
4
- import { u as kl, a as Fe } from "./useNestedProp-Dh-ldrr5.js";
5
- import { u as Cl } from "./usePrinter-Cq8Pt6Lh.js";
6
- import { u as wl } from "./useUserOptionState-BIvW1Kz7.js";
7
- import { u as Sl } from "./useChartAccessibility-9icAAmYg.js";
8
- import { t as zl } from "./themes-Dw-dDudK.js";
9
- import $l from "./Legend-CCBZ2x8T.js";
10
- import Tl from "./Title-B6rAo9Oz.js";
11
- import { S as Il } from "./Slicer-BOki89CB.js";
12
- import Ml from "./vue-ui-accordion-CaClZrCp.js";
13
- import { u as Ol } from "./useTimeLabels-BGFjWgrv.js";
14
- import Rl from "./img-DI-W68vp.js";
15
- import Dl from "./BaseIcon-DG6cvf2h.js";
16
- import { _ as Fl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
- const Pl = ["id"], El = ["id"], Al = ["id"], Nl = ["onClick"], Hl = {
18
- key: 3,
19
- class: "vue-data-ui-watermark"
20
- }, Yl = ["innerHTML"], _l = {
21
- __name: "vue-ui-xy-canvas",
22
- props: {
23
- dataset: {
24
- type: Array,
25
- default() {
26
- return [];
27
- }
28
- },
29
- config: {
30
- type: Object,
31
- default() {
32
- return {};
33
- }
34
- }
35
- },
36
- emits: ["selectLegend"],
37
- setup(Pe, { expose: ka, emit: Ca }) {
38
- const wa = ee(() => import("./DataTable-DUpZ_s2c.js")), Sa = ee(() => import("./NonSvgPenAndPaper-D2IMGwaN.js")), za = ee(() => import("./vue-ui-skeleton-D0PF0jxa.js")), $a = ee(() => import("./Tooltip-DaInVNiV.js")), Ta = ee(() => import("./UserOptions-CJXSEhan.js")), Ia = ee(() => import("./BaseDraggableDialog-Cysanw8-.js")), { vue_ui_xy_canvas: Ma } = kl(), g = Pe, _ = c(rl()), I = c(null), oe = c(null), n = c(null), f = c(1), E = c(1), ye = c(!1), d = c(null), ge = c(""), Ee = c(null), $ = c([]), j = c(1), B = c(!0), q = c(!0), Le = c(null), Ae = c(0), Ne = c(0), ue = c(!1), He = c(null), Ye = c(null), _e = c(null), Be = c(null), ke = c(0), Ce = c(0), we = c(0), M = c(null), Ue = c(!1), re = c(null), Se = c(null), pe = L(() => !!g.dataset && g.dataset.length), Oa = Ca, Ra = el();
39
- ha(() => {
40
- Ra["chart-background"] && console.warn("VueUiXyCanvas does not support the #chart-background slot.");
41
- });
42
- const a = L({
43
- get: () => Ve(),
44
- set: (e) => e
45
- }), { userOptionsVisible: ze, setUserOptionsVisibility: We, keepUserOptionState: Xe } = wl({ config: a.value }), { svgRef: O } = Sl({ config: a.value.style.chart.title });
46
- function Ve() {
47
- const e = Fe({
48
- userConfig: g.config,
49
- defaultConfig: Ma
50
- });
51
- let l = {};
52
- return e.theme ? l = {
53
- ...Fe({
54
- userConfig: zl.vue_ui_xy_canvas[e.theme] || g.config,
55
- defaultConfig: e
56
- }),
57
- customPalette: sl[e.theme] || G
58
- } : l = e, g.config && he(g.config, "style.chart.scale.min") ? l.style.chart.scale.min = g.config.style.chart.scale.min : l.style.chart.scale.min = null, g.config && he(g.config, "style.chart.scale.max") ? l.style.chart.scale.max = g.config.style.chart.scale.max : l.style.chart.scale.max = null, g.config && he(g.config, "style.chart.zoom.startIndex") ? l.style.chart.zoom.startIndex = g.config.style.chart.zoom.startIndex : l.style.chart.zoom.startIndex = null, g.config && he(g.config, "style.chart.zoom.endIndex") ? l.style.chart.zoom.endIndex = g.config.style.chart.zoom.endIndex : l.style.chart.zoom.endIndex = null, g.config && he(g.config, "style.chart.grid.y.timeLabels") && (console.warn("VueUiXyCanvas: you are using the deprecated config.style.chart.grid.y.timeLabels. It is recommended to move this configuration to config.style.chart.grid.x.timeLabels."), l.style.chart.grid.x.timeLabels = Fe({
59
- defaultConfig: l.style.chart.grid.x.timeLabels,
60
- userConfig: g.config.style.chart.grid.y.timeLabels
61
- })), l;
62
- }
63
- D(() => g.config, (e) => {
64
- a.value = Ve(), ze.value = !a.value.userOptions.showOnChartHover, $e(), ke.value += 1, Ce.value += 1, we.value += 1, r.value.showTable = a.value.table.show, r.value.showDataLabels = a.value.style.chart.dataLabels.show, r.value.stacked = a.value.style.chart.stacked, r.value.showTooltip = a.value.style.chart.tooltip.show;
65
- }, { deep: !0 }), D(() => g.dataset, () => {
66
- $e(), ke.value += 1, Ce.value += 1, we.value += 1;
67
- }, { deep: !0 });
68
- const Ze = c(a.value.style.chart.aspectRatio), { isPrinting: Ge, isImaging: je, generatePdf: qe, generateImage: Je } = Cl({
69
- elementId: `xy_canvas_${_.value}`,
70
- fileName: a.value.style.chart.title.text || "vue-ui-xy-canvas",
71
- options: a.value.userOptions.print
72
- }), r = c({
73
- showTable: a.value.table.show,
74
- showDataLabels: a.value.style.chart.dataLabels.show,
75
- stacked: a.value.style.chart.stacked,
76
- showTooltip: a.value.style.chart.tooltip.show
77
- });
78
- function Ke(e) {
79
- ue.value = e, Ne.value += 1;
80
- }
81
- const Qe = L(() => nl(a.value.customPalette)), T = L(() => J.value ? Math.max(...J.value.filter((e, l) => !$.value.includes(e.absoluteIndex)).map((e) => e.series.length)) : 0), t = L(() => {
82
- const e = f.value - f.value * (a.value.style.chart.paddingProportions.left + a.value.style.chart.paddingProportions.right);
83
- return {
84
- canvasWidth: f.value,
85
- canvasHeight: E.value,
86
- left: f.value * a.value.style.chart.paddingProportions.left,
87
- top: E.value * a.value.style.chart.paddingProportions.top,
88
- right: f.value - f.value * a.value.style.chart.paddingProportions.right,
89
- bottom: E.value - E.value * a.value.style.chart.paddingProportions.bottom,
90
- width: e,
91
- height: E.value - E.value * (a.value.style.chart.paddingProportions.top + a.value.style.chart.paddingProportions.bottom),
92
- slot: e / (u.value.end - u.value.start)
93
- };
94
- });
95
- function ea(e, l) {
96
- return e / l;
97
- }
98
- function Da({ hasAutoScale: e, series: l, min: o, max: s, scale: i, yOffset: x, individualHeight: v, stackIndex: y = null }) {
99
- return l.map((W, z) => {
100
- const N = i.min < 0 ? Math.abs(i.min) : 0, X = ea(W + N, N + i.max);
101
- let ve, ce;
102
- e && (ve = i.min, ce = ea(W - ve, i.max - ve));
103
- let R = 0;
104
- return y === null ? R = t.value.bottom - t.value.height * (e ? ce : X) : R = t.value.bottom - x - v * (e ? ce : X), {
105
- x: t.value.left + t.value.slot * z + t.value.slot / 2,
106
- y: R,
107
- value: W
108
- };
109
- });
110
- }
111
- const b = L(() => {
112
- const e = a.value.style.chart.scale.min !== null ? a.value.style.chart.scale.min : Math.min(...J.value.filter((v, y) => !$.value.includes(v.absoluteIndex)).flatMap((v) => v.series.slice(u.value.start, u.value.end))), l = a.value.style.chart.scale.max !== null ? a.value.style.chart.scale.max : Math.max(...J.value.filter((v, y) => !$.value.includes(v.absoluteIndex)).flatMap((v) => v.series.slice(u.value.start, u.value.end))), o = Re(e < 0 ? e : 0, l === e ? e + 1 < 0 ? 0 : e + 1 : l < 0 ? 0 : l, a.value.style.chart.scale.ticks), s = o.min < 0 ? Math.abs(o.min) : 0, i = t.value.bottom - t.value.height * (s / (o.max + s)), x = o.ticks.map((v) => ({
113
- y: t.value.bottom - t.value.height * ((v + s) / (o.max + s)),
114
- x: t.value.left - 8,
115
- value: v
116
- }));
117
- return {
118
- absoluteMin: s,
119
- max: l,
120
- min: e,
121
- scale: o,
122
- yLabels: x,
123
- zero: i
124
- };
125
- }), Fa = L(() => h.value.map((e) => `
126
- <div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
127
- <svg viewBox="0 0 10 10" height="12" width="12">
128
- <circle cx="5" cy="5" r="5" fill="${e.color}"/>
129
- </svg>
130
- <span>${e.name ? e.name + ": " : ""}</span>
131
- <span>${le(
132
- a.value.style.chart.dataLabels.formatter,
133
- e.series[d.value],
134
- te({
135
- p: e.prefix || "",
136
- v: e.series[d.value],
137
- s: e.suffix || "",
138
- r: e.rounding || 0
139
- }),
140
- { datapoint: e, seriesIndex: d.value }
141
- )}</span>
142
- </div>
143
- `)), J = L(() => g.dataset.map((e, l) => ({
144
- ...e,
145
- series: il({
146
- data: vl(e.series),
147
- threshold: a.value.downsample.threshold
148
- }),
149
- absoluteIndex: l,
150
- color: ma(e.color || Qe.value[l] || G[l] || G[l % G.length])
151
- })));
152
- D(T, (e) => {
153
- e && aa();
154
- });
155
- const h = L(() => cl(J.value.filter((e, l) => !$.value.includes(e.absoluteIndex))).map((e, l) => ({
156
- ...e,
157
- series: e.series.slice(u.value.start, u.value.end)
158
- })).map((e, l) => {
159
- let o = [null, void 0].includes(e.scaleMin) ? Math.min(...e.series) || 0 : e.scaleMin, s = [null, void 0].includes(e.scaleMax) ? Math.max(...e.series) || 1 : e.scaleMax;
160
- o === s && (o = o >= 0 ? s - 1 : o, s = s >= 0 ? s : o + 1), e.series.filter((R) => ![null, void 0].includes(R)).map((R) => (R - o) / (s - o));
161
- const i = {
162
- valueMin: o,
163
- valueMax: s
164
- }, x = e.scaleSteps || a.value.style.chart.scale.ticks;
165
- let v;
166
- e.autoScaling ? v = Re(i.valueMin, i.valueMax, x) : v = Re(i.valueMin < 0 ? i.valueMin : 0, i.valueMax <= 0 ? 0 : i.valueMax, x);
167
- const y = r.value.stacked ? t.value.height * (1 - e.cumulatedStackRatio) : 0, W = r.value.stacked ? t.value.height / a.value.style.chart.stackGap : 0, z = r.value.stacked ? t.value.height * e.stackRatio - W : t.value.height, N = v.min < 0 ? Math.abs(v.min) : 0;
168
- let X;
169
- e.autoScaling && r.value.stacked && s <= 0 ? X = t.value.bottom - y - z : X = t.value.bottom - y - z * (N / (v.max + N));
170
- const ve = v.ticks.map((R, Qa) => ({
171
- y: t.value.bottom - y - z * (Qa / (v.ticks.length - 1)),
172
- x: t.value.left - 8,
173
- value: R
174
- })), ce = Da({
175
- hasAutoScale: r.value.stacked && e.autoScaling,
176
- series: e.series,
177
- min: r.value.stacked ? o : b.value.min,
178
- max: r.value.stacked ? s : b.value.max,
179
- scale: r.value.stacked ? v : b.value.scale,
180
- yOffset: y,
181
- individualHeight: z,
182
- stackIndex: r.value.stacked ? l : null
183
- });
184
- return {
185
- ...e,
186
- coordinatesLine: ce,
187
- min: o,
188
- max: s,
189
- localScale: v,
190
- localZero: X,
191
- localMin: N,
192
- localYLabels: ve,
193
- yOffset: y,
194
- individualHeight: z
195
- };
196
- })), u = c({
197
- start: 0,
198
- end: T.value
199
- });
200
- function aa() {
201
- ta();
202
- }
203
- const la = c(null);
204
- async function ta() {
205
- await fa(), await fa();
206
- const { startIndex: e, endIndex: l } = a.value.style.chart.zoom, o = la.value, s = T.value;
207
- u.value = { start: 0, end: s }, (e != null || l != null) && o ? (e != null ? o.setStartValue(e) : (u.value.start = 0, o.setStartValue(0)), l != null ? o.setEndValue(Pa(l + 1)) : (u.value.end = s, o.setEndValue(s))) : (u.value = { start: 0, end: s }, Ae.value += 1);
208
- }
209
- function Pa(e) {
210
- const l = T.value;
211
- return e > l ? l : e < 0 || a.value.style.chart.zoom.startIndex !== null && e < a.value.style.chart.zoom.startIndex ? a.value.style.chart.zoom.startIndex !== null ? a.value.style.chart.zoom.startIndex + 1 : 1 : e;
212
- }
213
- const Ea = L(() => h.value.filter((e) => ["line", "plot", void 0].includes(e.type))), w = L(() => h.value.filter((e) => e.type === "bar"));
214
- function Aa() {
215
- if (!O.value)
216
- return;
217
- const e = oe.value.offsetWidth, l = oe.value.offsetHeight;
218
- O.value.width = e * j.value * 2, O.value.height = l * j.value * 2, f.value = e * j.value * 2, E.value = l * j.value * 2, n.value.scale(j.value, j.value), se();
219
- }
220
- function Na() {
221
- if (n.value.clearRect(0, 0, 1e4, 1e4), n.value.fillStyle = a.value.style.chart.backgroundColor, n.value.fillRect(0, 0, t.value.canvasWidth, t.value.canvasHeight), r.value.stacked)
222
- a.value.style.chart.grid.y.verticalLines.show && u.value.end - u.value.start < a.value.style.chart.grid.y.verticalLines.hideUnderXLength ? h.value.forEach((e) => {
223
- for (let l = 0; l < u.value.end - u.value.start + 1; l += 1)
224
- C(
225
- n.value,
226
- [
227
- {
228
- x: t.value.left + t.value.slot * l,
229
- y: t.value.bottom - e.yOffset - e.individualHeight
230
- },
231
- {
232
- x: t.value.left + t.value.slot * l,
233
- y: t.value.bottom - e.yOffset
234
- }
235
- ],
236
- {
237
- color: a.value.style.chart.grid.y.verticalLines.color
238
- }
239
- );
240
- }) : a.value.style.chart.grid.y.verticalLines.show && u.value.end - u.value.start >= a.value.style.chart.grid.y.verticalLines.hideUnderXLength && h.value.forEach((e) => {
241
- for (let l = u.value.start; l < u.value.end; l += 1)
242
- l % Math.floor((u.value.end - u.value.start) / a.value.style.chart.grid.x.timeLabels.modulo) === 0 && C(
243
- n.value,
244
- [
245
- {
246
- x: t.value.left + t.value.slot * (l - u.value.start) + t.value.slot / 2,
247
- y: t.value.bottom - e.yOffset - e.individualHeight
248
- },
249
- {
250
- x: t.value.left + t.value.slot * (l - u.value.start) + t.value.slot / 2,
251
- y: t.value.bottom - e.yOffset
252
- }
253
- ],
254
- {
255
- color: a.value.style.chart.grid.y.verticalLines.color
256
- }
257
- );
258
- }), a.value.style.chart.grid.x.horizontalLines.show && (a.value.style.chart.grid.x.horizontalLines.alternate ? h.value.forEach((e) => {
259
- e.localYLabels.forEach((l, o) => {
260
- o < e.localYLabels.length - 1 && De(
261
- n.value,
262
- [
263
- { x: t.value.left, y: l.y },
264
- { x: t.value.right, y: l.y },
265
- { x: t.value.right, y: e.localYLabels[o + 1].y },
266
- { x: t.value.left, y: e.localYLabels[o + 1].y }
267
- ],
268
- {
269
- fillColor: o % 2 === 0 ? "transparent" : fe(a.value.style.chart.grid.x.horizontalLines.color, a.value.style.chart.grid.x.horizontalLines.opacity),
270
- strokeColor: "transparent"
271
- }
272
- );
273
- });
274
- }) : h.value.forEach((e) => {
275
- e.localYLabels.slice(u.value.start, u.value.end).forEach((l) => {
276
- C(
277
- n.value,
278
- [
279
- { x: t.value.left, y: l.y },
280
- { x: t.value.right, y: l.y }
281
- ],
282
- {
283
- color: a.value.style.chart.grid.x.horizontalLines.color
284
- }
285
- );
286
- });
287
- })), a.value.style.chart.grid.zeroLine.show && h.value.forEach((e) => {
288
- C(
289
- n.value,
290
- [
291
- { x: t.value.left, y: e.localZero },
292
- { x: t.value.right, y: e.localZero }
293
- ],
294
- {
295
- color: a.value.style.chart.grid.zeroLine.color,
296
- lineDash: a.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
297
- }
298
- );
299
- }), a.value.style.chart.grid.y.axisLabels.show && h.value.forEach((e) => {
300
- C(
301
- n.value,
302
- [
303
- { x: t.value.left, y: t.value.bottom - e.yOffset },
304
- { x: t.value.left, y: t.value.bottom - e.yOffset - e.individualHeight }
305
- ],
306
- {
307
- color: e.color
308
- }
309
- ), C(
310
- n.value,
311
- [
312
- { x: t.value.right, y: t.value.bottom - e.yOffset },
313
- { x: t.value.right, y: t.value.bottom - e.yOffset - e.individualHeight }
314
- ],
315
- {
316
- color: e.color
317
- }
318
- );
319
- }), h.value.forEach((e) => {
320
- P(
321
- n.value,
322
- e.name,
323
- f.value / 35,
324
- t.value.bottom - e.yOffset - e.individualHeight / 2,
325
- {
326
- align: "center",
327
- rotation: -90,
328
- color: e.color,
329
- font: `${Math.round(f.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`
330
- }
331
- );
332
- });
333
- else {
334
- if (a.value.style.chart.grid.y.verticalLines.show && u.value.end - u.value.start < a.value.style.chart.grid.y.verticalLines.hideUnderXLength)
335
- for (let e = 0; e < u.value.end - u.value.start + 1; e += 1)
336
- C(
337
- n.value,
338
- [
339
- { x: t.value.left + t.value.slot * e, y: t.value.top },
340
- { x: t.value.left + t.value.slot * e, y: t.value.bottom }
341
- ],
342
- {
343
- color: a.value.style.chart.grid.y.verticalLines.color
344
- }
345
- );
346
- else if (a.value.style.chart.grid.y.verticalLines.show && u.value.end - u.value.start >= a.value.style.chart.grid.y.verticalLines.hideUnderXLength)
347
- for (let e = u.value.start; e < u.value.end; e += 1)
348
- e % Math.floor((u.value.end - u.value.start) / a.value.style.chart.grid.x.timeLabels.modulo) === 0 && C(
349
- n.value,
350
- [
351
- { x: t.value.left + t.value.slot * (e - u.value.start) + t.value.slot / 2, y: t.value.top },
352
- { x: t.value.left + t.value.slot * (e - u.value.start) + t.value.slot / 2, y: t.value.bottom }
353
- ],
354
- {
355
- color: a.value.style.chart.grid.y.verticalLines.color
356
- }
357
- );
358
- a.value.style.chart.grid.x.horizontalLines.show && (a.value.style.chart.grid.x.horizontalLines.alternate ? b.value.yLabels.forEach((e, l) => {
359
- l < b.value.yLabels.length - 1 && De(
360
- n.value,
361
- [
362
- { x: t.value.left, y: e.y },
363
- { x: t.value.right, y: e.y },
364
- { x: t.value.right, y: b.value.yLabels[l + 1].y },
365
- { x: t.value.left, y: b.value.yLabels[l + 1].y }
366
- ],
367
- {
368
- fillColor: l % 2 === 0 ? "transparent" : fe(a.value.style.chart.grid.x.horizontalLines.color, a.value.style.chart.grid.x.horizontalLines.opacity),
369
- strokeColor: "transparent"
370
- }
371
- );
372
- }) : b.value.yLabels.forEach((e) => {
373
- C(
374
- n.value,
375
- [
376
- { x: t.value.left, y: e.y },
377
- { x: t.value.right, y: e.y }
378
- ],
379
- {
380
- color: a.value.style.chart.grid.x.horizontalLines.color
381
- }
382
- );
383
- })), a.value.style.chart.grid.y.showAxis && C(
384
- n.value,
385
- [
386
- { x: t.value.left, y: t.value.top },
387
- { x: t.value.left, y: t.value.bottom }
388
- ],
389
- {
390
- color: a.value.style.chart.grid.y.axisColor,
391
- lineWidth: a.value.style.chart.grid.y.axisThickness
392
- }
393
- ), a.value.style.chart.grid.x.showAxis && C(
394
- n.value,
395
- [
396
- { x: t.value.left, y: t.value.bottom },
397
- { x: t.value.right, y: t.value.bottom }
398
- ],
399
- {
400
- color: a.value.style.chart.grid.x.axisColor,
401
- lineWidth: a.value.style.chart.grid.x.axisThickness
402
- }
403
- ), a.value.style.chart.grid.zeroLine.show && C(
404
- n.value,
405
- [
406
- { x: t.value.left, y: b.value.zero },
407
- { x: t.value.right, y: b.value.zero }
408
- ],
409
- {
410
- color: a.value.style.chart.grid.zeroLine.color,
411
- lineDash: a.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
412
- }
413
- );
414
- }
415
- a.value.style.chart.grid.y.axisName && P(
416
- n.value,
417
- a.value.style.chart.grid.y.axisName,
418
- f.value - f.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio * 1.2,
419
- t.value.bottom - t.value.height / 2,
420
- {
421
- font: `${a.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(f.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
422
- color: a.value.style.chart.color,
423
- align: "center",
424
- rotation: 90
425
- }
426
- ), a.value.style.chart.grid.x.axisName && P(
427
- n.value,
428
- a.value.style.chart.grid.x.axisName,
429
- f.value / 2,
430
- E.value,
431
- {
432
- font: `${a.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(f.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
433
- color: a.value.style.chart.color,
434
- align: "center"
435
- }
436
- );
437
- }
438
- function Ha(e) {
439
- for (let l = 0; l < e.coordinatesLine.length; l += 1) {
440
- const o = (d.value === l ? f.value / 150 : a.value.style.chart.line.plots.show ? f.value / 200 : 0) * a.value.style.chart.line.plots.radiusRatio;
441
- xa(
442
- n.value,
443
- { x: e.coordinatesLine[l].x, y: e.coordinatesLine[l].y },
444
- o,
445
- {
446
- color: a.value.style.chart.backgroundColor,
447
- fillStyle: e.color
448
- }
449
- );
450
- }
451
- }
452
- function Ya() {
453
- h.value.forEach((e) => {
454
- e.showYMarker && ne(e) && P(
455
- n.value,
456
- le(
457
- a.value.style.chart.dataLabels.formatter,
458
- ne(e).value,
459
- te({
460
- p: e.prefix || a.value.style.chart.grid.y.axisLabels.prefix || "",
461
- v: ne(e).value,
462
- s: e.suffix || a.value.style.chart.grid.y.axisLabels.suffix || "",
463
- r: e.rounding || a.value.style.chart.grid.y.axisLabels.rounding || 0
464
- }),
465
- { datapoint: ne(e), seriesIndex: null }
466
- ),
467
- t.value.left - 8 + a.value.style.chart.grid.y.axisLabels.offsetX,
468
- ne(e).y,
469
- {
470
- align: "right",
471
- font: `${a.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(f.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
472
- color: e.color
473
- }
474
- );
475
- });
476
- }
477
- function _a() {
478
- a.value.style.chart.grid.y.axisLabels.show && (r.value.stacked ? h.value.forEach((e) => {
479
- e.localYLabels.forEach((l, o) => {
480
- P(
481
- n.value,
482
- le(
483
- a.value.style.chart.dataLabels.formatter,
484
- l.value,
485
- te({
486
- p: e.prefix || a.value.style.chart.grid.y.axisLabels.prefix || "",
487
- v: l.value,
488
- s: e.suffix || a.value.style.chart.grid.y.axisLabels.suffix || "",
489
- r: e.rounding || a.value.style.chart.grid.y.axisLabels.rounding || 0
490
- }),
491
- { datapoint: l, seriesIndex: o }
492
- ),
493
- l.x + a.value.style.chart.grid.y.axisLabels.offsetX,
494
- l.y,
495
- {
496
- align: "right",
497
- font: `${a.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(f.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
498
- color: e.color,
499
- globalAlpha: e.showYMarker && ![null, void 0].includes(d.value) ? 0.2 : 1
500
- }
501
- );
502
- });
503
- }) : b.value.yLabels.forEach((e, l) => {
504
- P(
505
- n.value,
506
- le(
507
- a.value.style.chart.dataLabels.formatter,
508
- e.value,
509
- te({
510
- p: a.value.style.chart.grid.y.axisLabels.prefix || "",
511
- v: e.value,
512
- s: a.value.style.chart.grid.y.axisLabels.suffix || "",
513
- r: a.value.style.chart.grid.y.axisLabels.rounding || 0
514
- }),
515
- { datapoint: e, seriesIndex: l }
516
- ),
517
- e.x + a.value.style.chart.grid.y.axisLabels.offsetX,
518
- e.y,
519
- {
520
- align: "right",
521
- font: `${a.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(f.value / 40 * a.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
522
- color: a.value.style.chart.grid.y.axisLabels.color,
523
- globalAlpha: h.value.some((o) => o.showYMarker) && ![null, void 0].includes(d.value) ? 0.2 : 1
524
- }
525
- );
526
- }));
527
- }
528
- function Ba(e) {
529
- for (let l = 0; l < e.coordinatesLine.length; l += 1)
530
- P(
531
- n.value,
532
- le(
533
- a.value.style.chart.dataLabels.formatter,
534
- e.coordinatesLine[l].value,
535
- te({
536
- p: e.prefix || "",
537
- v: e.coordinatesLine[l].value,
538
- s: e.suffix || "",
539
- r: e.rounding || 0
540
- }),
541
- { datapoint: e.coordinatesLine[l], seriesIndex: l }
542
- ),
543
- e.coordinatesLine[l].x,
544
- e.coordinatesLine[l].y + a.value.style.chart.dataLabels.offsetY,
545
- {
546
- align: "center",
547
- font: `${a.value.style.chart.dataLabels.bold ? "bold " : ""}${Math.round(f.value / 40 * a.value.style.chart.dataLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
548
- color: a.value.style.chart.dataLabels.useSerieColor ? e.color : a.value.style.chart.dataLabels.color
549
- }
550
- );
551
- }
552
- const U = L(() => Ol({
553
- values: a.value.style.chart.grid.x.timeLabels.values,
554
- maxDatapoints: T.value,
555
- formatter: a.value.style.chart.grid.x.timeLabels.datetimeFormatter,
556
- start: 0,
557
- end: a.value.style.chart.grid.x.timeLabels.values.length
558
- }));
559
- function Ua() {
560
- for (let e = u.value.start; e < u.value.end; e += 1)
561
- (u.value.end - u.value.start < a.value.style.chart.grid.x.timeLabels.modulo || u.value.end - u.value.start >= a.value.style.chart.grid.x.timeLabels.modulo && (e % Math.floor((u.value.end - u.value.start) / a.value.style.chart.grid.x.timeLabels.modulo) === 0 || e === d.value + u.value.start && a.value.style.chart.grid.x.timeLabels.showMarker)) && P(
562
- n.value,
563
- U.value[e] ? U.value[e].text : e + 1,
564
- t.value.left + t.value.slot * (e - u.value.start) + t.value.slot / 2,
565
- t.value.bottom + f.value / a.value.style.chart.grid.x.timeLabels.offsetY,
566
- {
567
- align: a.value.style.chart.grid.x.timeLabels.rotation === 0 ? "center" : a.value.style.chart.grid.x.timeLabels.rotation > 0 ? "left" : "right",
568
- font: `${a.value.style.chart.grid.x.timeLabels.bold ? "bold " : ""}${Math.round(f.value / 40 * a.value.style.chart.grid.x.timeLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
569
- color: a.value.style.chart.grid.x.timeLabels.showMarker ? fe(a.value.style.chart.grid.x.timeLabels.color, d.value !== null ? d.value + u.value.start === e ? 100 : 20 : 100) : a.value.style.chart.grid.x.timeLabels.color,
570
- rotation: a.value.style.chart.grid.x.timeLabels.rotation
571
- }
572
- );
573
- }
574
- function oa() {
575
- C(
576
- n.value,
577
- [
578
- { x: t.value.left + t.value.slot * d.value + t.value.slot / 2, y: t.value.top },
579
- { x: t.value.left + t.value.slot * d.value + t.value.slot / 2, y: t.value.bottom }
580
- ],
581
- {
582
- color: a.value.style.chart.selector.color,
583
- lineDash: a.value.style.chart.selector.dashed ? [8, 8] : [0, 0],
584
- lineWidth: 2
585
- }
586
- );
587
- }
588
- function Wa() {
589
- M.value && C(
590
- n.value,
591
- [
592
- { x: t.value.left, y: M.value },
593
- { x: t.value.right, y: M.value }
594
- ],
595
- {
596
- color: a.value.style.chart.selector.color,
597
- lineDash: a.value.style.chart.selector.dashed ? [8, 8] : [0, 0],
598
- lineWidth: 2
599
- }
600
- );
601
- }
602
- function Xa() {
603
- w.value.forEach((e, l) => {
604
- for (let o = 0; o < e.coordinatesLine.length; o += 1)
605
- De(
606
- n.value,
607
- [
608
- {
609
- x: t.value.left + t.value.slot * o + t.value.slot / 10 + (r.value.stacked ? 0 : t.value.slot / w.value.length * l - (l === 0 ? 0 : t.value.slot / (5 * w.value.length) * l)),
610
- y: r.value.stacked ? e.localZero : b.value.zero
611
- },
612
- {
613
- x: t.value.left + t.value.slot * o + t.value.slot / 10 + (r.value.stacked ? 0 : t.value.slot / w.value.length * l - (l === 0 ? 0 : t.value.slot / (5 * w.value.length) * l)) + t.value.slot * 0.8 / (r.value.stacked ? 1 : w.value.length),
614
- y: r.value.stacked ? e.localZero : b.value.zero
615
- },
616
- {
617
- x: t.value.left + t.value.slot * o + t.value.slot / 10 + (r.value.stacked ? 0 : t.value.slot / w.value.length * l - (l === 0 ? 0 : t.value.slot / (5 * w.value.length) * l)) + t.value.slot * 0.8 / (r.value.stacked ? 1 : w.value.length),
618
- y: e.coordinatesLine[o].y
619
- },
620
- {
621
- x: t.value.left + t.value.slot * o + t.value.slot / 10 + (r.value.stacked ? 0 : t.value.slot / w.value.length * l - (l === 0 ? 0 : t.value.slot / (5 * w.value.length) * l)),
622
- y: e.coordinatesLine[o].y
623
- }
624
- ],
625
- {
626
- strokeColor: a.value.style.chart.backgroundColor,
627
- gradient: {
628
- type: "linear",
629
- start: {
630
- x: e.coordinatesLine[o].x,
631
- y: e.coordinatesLine[o].y
632
- },
633
- end: {
634
- x: e.coordinatesLine[o].x,
635
- y: r.value.stacked ? e.localZero : b.value.zero
636
- },
637
- stops: [
638
- { offset: 0, color: e.color },
639
- { offset: 1, color: a.value.style.chart.bar.gradient.show ? pl(e.color, 0.5) : e.color }
640
- ]
641
- }
642
- }
643
- ), r.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && P(
644
- n.value,
645
- le(
646
- a.value.style.chart.dataLabels.formatter,
647
- e.coordinatesLine[o].value,
648
- te({
649
- p: e.prefix || "",
650
- v: e.coordinatesLine[o].value,
651
- s: e.suffix || "",
652
- r: e.rounding || 0
653
- }),
654
- { datapoint: e.coordinatesLine[o], seriesIndex: o }
655
- ),
656
- t.value.left + t.value.slot * o + t.value.slot / 10 + (r.value.stacked ? 0 : t.value.slot / w.value.length * l - (l === 0 ? 0 : t.value.slot / (5 * w.value.length) * l)) + t.value.slot * 0.4 / (r.value.stacked ? 1 : w.value.length),
657
- (e.coordinatesLine[o].value < 0 ? r.value.stacked ? e.localZero : b.value.zero : e.coordinatesLine[o].y) + a.value.style.chart.dataLabels.offsetY,
658
- {
659
- align: "center",
660
- font: `${Math.round(f.value / 40 * a.value.style.chart.dataLabels.fontSizeRatio)}px ${a.value.style.fontFamily}`,
661
- color: a.value.style.chart.dataLabels.useSerieColor ? e.color : a.value.style.chart.dataLabels.color,
662
- strokeColor: a.value.style.chart.backgroundColor,
663
- lineWidth: 0.8
664
- }
665
- );
666
- });
667
- }
668
- function Va(e) {
669
- e.useArea ? r.value.stacked ? La(
670
- n.value,
671
- [{ x: e.coordinatesLine[0].x, y: e.localZero }, ...e.coordinatesLine, { x: e.coordinatesLine.at(-1).x, y: e.localZero }],
672
- {
673
- fillColor: fe(e.color, a.value.style.chart.area.opacity),
674
- strokeColor: "transparent"
675
- }
676
- ) : La(
677
- n.value,
678
- [{ x: e.coordinatesLine[0].x, y: b.value.zero }, ...e.coordinatesLine, { x: e.coordinatesLine.at(-1).x, y: b.value.zero }],
679
- {
680
- fillColor: fe(e.color, a.value.style.chart.area.opacity),
681
- strokeColor: "transparent"
682
- }
683
- ) : C(n.value, e.coordinatesLine, {
684
- color: e.color,
685
- lineWidth: 3
686
- });
687
- }
688
- function Za() {
689
- h.value.forEach((e, l) => {
690
- C(
691
- n.value,
692
- [
693
- { x: t.value.left, y: t.value.bottom - e.yOffset },
694
- { x: t.value.right, y: t.value.bottom - e.yOffset }
695
- ],
696
- {
697
- color: a.value.style.chart.grid.x.horizontalLines.color,
698
- lineWidth: 1
699
- }
700
- );
701
- });
702
- }
703
- function se() {
704
- Na(), B.value ? (d.value !== null && a.value.style.chart.selector.show && oa(), Xa(), r.value.stacked && a.value.style.chart.grid.x.showAxis && Za(), Ea.value.forEach((e) => {
705
- (e.type === "line" || !e.type) && Va(e), q.value && (Ha(e), r.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && Ba(e));
706
- }), Le.value = Ll(O.value)) : (Le.value && (n.value.clearRect(0, 0, 1e4, 1e4), n.value.drawImage(Le.value, 0, 0)), d.value !== null && a.value.style.chart.selector.show && oa(), d.value !== null && h.value.forEach((e) => {
707
- if (e.type === "line" || !e.type || e.type === "plot") {
708
- if (!e.coordinatesLine[d.value]) return;
709
- e.coordinatesLine[d.value].x !== void 0 && e.coordinatesLine[d.value].y !== void 0 && xa(
710
- n.value,
711
- {
712
- x: e.coordinatesLine[d.value].x,
713
- y: e.coordinatesLine[d.value].y
714
- },
715
- f.value / 150 * a.value.style.chart.line.plots.radiusRatio,
716
- {
717
- color: a.value.style.chart.backgroundColor,
718
- fillStyle: e.color
719
- }
720
- );
721
- }
722
- })), a.value.style.chart.grid.x.timeLabels.show && Ua(), a.value.style.chart.selector.show && a.value.style.chart.selector.showHorizontalSelector && Wa(), _a(), Ya(), B.value = !1;
723
- }
724
- const me = ml(() => {
725
- q.value = !0, Aa();
726
- }, T.value > 200 ? 10 : 1, !q.value);
727
- function ne(e) {
728
- if ([null, void 0].includes(d.value) || !e.coordinatesLine[d.value]) return !1;
729
- const { y: l, value: o } = e.coordinatesLine[d.value];
730
- return { y: l, value: o };
731
- }
732
- function Ga(e) {
733
- const { left: l, top: o } = O.value.getBoundingClientRect(), s = e.clientX - l;
734
- if (M.value = (e.clientY - o) * 2, (M.value < t.value.top || M.value > t.value.bottom) && (M.value = null), s * 2 < t.value.left || s * 2 > t.value.right) {
735
- ye.value = !1, d.value = null;
736
- return;
737
- }
738
- const i = s * 2 - t.value.left;
739
- if (d.value = Math.floor(i / t.value.slot), ye.value = !0, !q.value) return;
740
- let x = "";
741
- const v = a.value.style.chart.tooltip.customFormat;
742
- ba(v) && gl(() => v({
743
- seriesIndex: d.value,
744
- datapoint: h.value.map((y) => ({
745
- shape: y.shape || null,
746
- name: y.name,
747
- color: y.color,
748
- type: y.type || "line",
749
- value: y.series.find((W, z) => z === d.value)
750
- })),
751
- series: h.value,
752
- config: a.value
753
- })) ? ge.value = v({
754
- seriesIndex: d.value,
755
- datapoint: h.value.map((y) => ({
756
- shape: y.shape || null,
757
- name: y.name,
758
- color: y.color,
759
- type: y.type || "line",
760
- value: y.series.find((W, z) => z === d.value)
761
- })),
762
- series: h.value,
763
- config: a.value
764
- }) : (a.value.style.chart.grid.x.timeLabels.values.slice(u.value.start, u.value.end)[d.value] && (x += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${a.value.style.chart.tooltip.borderColor}; width:100%">${U.value.slice(u.value.start, u.value.end)[d.value].text}</div>`), x += Fa.value.join(""), ge.value = x), q.value = !1;
765
- }
766
- D(() => d.value, (e) => {
767
- me();
768
- }), D(() => u.value, (e) => {
769
- B.value = !0, se();
770
- }, {
771
- deep: !0
772
- }), D(() => r.value.showDataLabels, (e) => {
773
- B.value = !0, se();
774
- }), D(() => M.value, (e) => {
775
- e && se();
776
- }), D(() => r.value.stacked, (e) => {
777
- B.value = !0, q.value = !0, me();
778
- });
779
- function ja() {
780
- ye.value = !1, d.value = null, ge.value = "", M.value = null, se();
781
- }
782
- const A = Me(null), K = Me(null), Q = Me(null);
783
- ha(() => {
784
- Ue.value = !0, $e();
785
- });
786
- function $e() {
787
- if (dl(g.dataset) ? hl({
788
- componentName: "VueUiXyCanvas",
789
- type: "dataset"
790
- }) : O.value && (n.value = O.value.getContext("2d", { willReadFrequently: !0 })), a.value.responsive) {
791
- const e = bl(() => {
792
- const { width: l, height: o } = xl({
793
- chart: I.value,
794
- title: a.value.style.chart.title.text ? He.value : null,
795
- legend: a.value.style.chart.legend.show ? Ye.value : null,
796
- slicer: a.value.style.chart.zoom.show && T.value > 1 ? _e.value : null,
797
- source: Be.value
798
- });
799
- requestAnimationFrame(() => {
800
- Ze.value = `${l} / ${o}`;
801
- });
802
- });
803
- A.value && (K.value && A.value.unobserve(K.value), A.value.disconnect()), A.value = new ResizeObserver(e), K.value = I.value.parentNode, A.value.observe(K.value);
804
- }
805
- Q.value && Q.value.disconnect(), Q.value = new ResizeObserver((e) => {
806
- for (const l of e)
807
- l.contentBoxSize && oe.value && (B.value = !0, me());
808
- }), Q.value.observe(oe.value), ta();
809
- }
810
- al(() => {
811
- Q.value && Q.value.disconnect(), A.value && (K.value && A.value.unobserve(K.value), A.value.disconnect());
812
- });
813
- function ua(e) {
814
- Oa("selectLegend", h.value.find((l) => l.absoluteIndex === e)), $.value.includes(e) ? $.value = $.value.filter((l) => l !== e) : $.value.push(e), B.value = !0, me();
815
- }
816
- const ra = L(() => J.value.map((e, l) => ({
817
- ...e,
818
- name: e.name,
819
- color: ma(e.color) || Qe.value[l] || G[l] || G[l % G.length],
820
- shape: e.shape || "circle",
821
- prefix: e.prefix || "",
822
- suffix: e.suffix || "",
823
- rounding: e.rounding || 0
824
- })).map((e) => ({
825
- ...e,
826
- opacity: $.value.includes(e.absoluteIndex) ? 0.5 : 1,
827
- segregate: () => ua(e.absoluteIndex),
828
- isSegregated: $.value.includes(e.absoluteIndex)
829
- }))), qa = L(() => ({
830
- cy: "donut-div-legend",
831
- backgroundColor: a.value.style.chart.legend.backgroundColor,
832
- color: a.value.style.chart.legend.color,
833
- fontSize: a.value.style.chart.legend.fontSize,
834
- paddingBottom: 12,
835
- fontWeight: a.value.style.chart.legend.bold ? "bold" : ""
836
- })), be = L(() => {
837
- const e = [""].concat(h.value.map((i) => i.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>');
838
- let l = [];
839
- for (let i = 0; i < T.value; i += 1) {
840
- const x = h.value.map((v) => v.series[i] ?? 0).reduce((v, y) => v + y, 0);
841
- l.push([a.value.style.chart.grid.x.timeLabels.values.slice(u.value.start, u.value.end)[i] ? U.value.slice(u.value.start, u.value.end)[i].text : i + 1].concat(h.value.map((v) => (v.series[i] ?? 0).toFixed(a.value.table.rounding))).concat((x ?? 0).toFixed(a.value.table.rounding)));
842
- }
843
- const o = {
844
- th: {
845
- backgroundColor: a.value.table.th.backgroundColor,
846
- color: a.value.table.th.color,
847
- outline: a.value.table.th.outline
848
- },
849
- td: {
850
- backgroundColor: a.value.table.td.backgroundColor,
851
- color: a.value.table.td.color,
852
- outline: a.value.table.td.outline
853
- },
854
- breakpoint: a.value.table.responsiveBreakpoint
855
- }, s = [a.value.table.columnNames.period].concat(h.value.map((i) => i.name)).concat(a.value.table.columnNames.total);
856
- return { head: e, body: l.slice(0, u.value.end - u.value.start), config: o, colNames: s };
857
- }), sa = L(() => {
858
- if (h.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
859
- const e = h.value.map((o) => ({
860
- label: o.name,
861
- color: o.color,
862
- type: o.type
863
- })), l = [];
864
- for (let o = u.value.start; o < u.value.end; o += 1) {
865
- const s = [a.value.style.chart.grid.x.timeLabels.values[o] ? U.value[o].text : o + 1];
866
- h.value.forEach((i) => {
867
- s.push(Number((i.series[o] || 0).toFixed(a.value.table.rounding)));
868
- }), l.push(s);
869
- }
870
- return { head: e, body: l };
871
- });
872
- function Te(e = null) {
873
- const l = [[a.value.style.chart.title.text], [a.value.style.chart.title.subtitle.text], [""]], o = ["", ...sa.value.head.map((v) => v.label)], s = sa.value.body, i = l.concat([o]).concat(s), x = fl(i);
874
- e ? e(x) : yl({ csvContent: x, title: a.value.style.chart.title.text || "vue-ui-xy-canvas" });
875
- }
876
- function Ja() {
877
- return h.value;
878
- }
879
- function na() {
880
- r.value.showTable = !r.value.showTable;
881
- }
882
- function ia() {
883
- r.value.showDataLabels = !r.value.showDataLabels;
884
- }
885
- function va() {
886
- r.value.stacked = !r.value.stacked;
887
- }
888
- function ca() {
889
- r.value.showTooltip = !r.value.showTooltip;
890
- }
891
- const xe = c(!1);
892
- function Ie() {
893
- xe.value = !xe.value;
894
- }
895
- async function Ka({ scale: e = 2 } = {}) {
896
- if (!I.value) return;
897
- const { width: l, height: o } = I.value.getBoundingClientRect(), s = l / o, { imageUri: i, base64: x } = await Rl({ domElement: I.value, base64: !0, img: !0, scale: e });
898
- return {
899
- imageUri: i,
900
- base64: x,
901
- title: a.value.style.chart.title.text,
902
- width: l,
903
- height: o,
904
- aspectRatio: s
905
- };
906
- }
907
- const ie = L(() => {
908
- const e = a.value.table.useDialog && !a.value.table.show, l = r.value.showTable;
909
- return {
910
- component: e ? Ia : Ml,
911
- title: `${a.value.style.chart.title.text}${a.value.style.chart.title.subtitle.text ? `: ${a.value.style.chart.title.subtitle.text}` : ""}`,
912
- props: e ? {
913
- backgroundColor: a.value.table.th.backgroundColor,
914
- color: a.value.table.th.color,
915
- headerColor: a.value.table.th.color,
916
- headerBg: a.value.table.th.backgroundColor,
917
- isFullscreen: ue.value,
918
- fullscreenParent: I.value,
919
- forcedWidth: Math.min(800, window.innerWidth * 0.8)
920
- } : {
921
- hideDetails: !0,
922
- config: {
923
- open: l,
924
- maxHeight: 1e4,
925
- body: {
926
- backgroundColor: a.value.style.chart.backgroundColor,
927
- color: a.value.style.chart.color
928
- },
929
- head: {
930
- backgroundColor: a.value.style.chart.backgroundColor,
931
- color: a.value.style.chart.color
932
- }
933
- }
934
- }
935
- };
936
- });
937
- D(() => r.value.showTable, (e) => {
938
- a.value.table.show || (e && a.value.table.useDialog && re.value ? re.value.open() : "close" in re.value && re.value.close());
939
- });
940
- function da() {
941
- r.value.showTable = !1, Se.value && Se.value.setTableIconState(!1);
942
- }
943
- return ka({
944
- getData: Ja,
945
- getImage: Ka,
946
- generateCsv: Te,
947
- generatePdf: qe,
948
- generateImage: Je,
949
- toggleTable: na,
950
- toggleLabels: ia,
951
- toggleStack: va,
952
- toggleTooltip: ca,
953
- toggleAnnotator: Ie,
954
- toggleFullscreen: Ke
955
- }), (e, l) => (S(), de("div", {
956
- style: ae(`width:100%; position:relative; ${a.value.responsive ? "height: 100%" : ""}`),
957
- ref_key: "xy",
958
- ref: I,
959
- id: `xy_canvas_${_.value}`,
960
- class: ll(`vue-data-ui-component vue-ui-xy-canvas ${ue.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
961
- onMouseenter: l[5] || (l[5] = () => p(We)(!0)),
962
- onMouseleave: l[6] || (l[6] = () => p(We)(!1))
963
- }, [
964
- a.value.style.chart.title.text ? (S(), de("div", {
965
- key: 0,
966
- ref_key: "chartTitle",
967
- ref: He,
968
- style: ae(`width:100%;background:${a.value.style.chart.backgroundColor};`)
969
- }, [
970
- (S(), F(Tl, {
971
- key: `title_${ke.value}`,
972
- config: {
973
- title: {
974
- cy: "xy-canvas-title",
975
- ...a.value.style.chart.title
976
- },
977
- subtitle: {
978
- cy: "xy-canvas-subtitle",
979
- ...a.value.style.chart.title.subtitle
980
- }
981
- }
982
- }, null, 8, ["config"]))
983
- ], 4)) : H("", !0),
984
- Y("div", {
985
- id: `legend-top-${_.value}`
986
- }, null, 8, El),
987
- a.value.userOptions.show && pe.value && (p(Xe) || p(ze)) ? (S(), F(p(Ta), {
988
- ref_key: "userOptionsRef",
989
- ref: Se,
990
- key: `user_option_${Ne.value}`,
991
- backgroundColor: a.value.style.chart.backgroundColor,
992
- color: a.value.style.chart.color,
993
- isPrinting: p(Ge),
994
- isImaging: p(je),
995
- uid: _.value,
996
- hasTooltip: a.value.userOptions.buttons.tooltip && a.value.style.chart.tooltip.show,
997
- hasPdf: a.value.userOptions.buttons.pdf,
998
- hasImg: a.value.userOptions.buttons.img,
999
- hasXls: a.value.userOptions.buttons.csv,
1000
- hasLabel: a.value.userOptions.buttons.labels,
1001
- hasStack: Pe.dataset.length > 1 && a.value.userOptions.buttons.stack,
1002
- hasFullscreen: a.value.userOptions.buttons.fullscreen,
1003
- hasTable: u.value.end - u.value.start <= 730 && a.value.userOptions.buttons.table,
1004
- isFullscreen: ue.value,
1005
- isTooltip: r.value.showTooltip,
1006
- isStacked: r.value.stacked,
1007
- titles: { ...a.value.userOptions.buttonTitles },
1008
- chartElement: I.value,
1009
- position: a.value.userOptions.position,
1010
- hasAnnotator: a.value.userOptions.buttons.annotator,
1011
- isAnnotation: xe.value,
1012
- callbacks: a.value.userOptions.callbacks,
1013
- printScale: a.value.userOptions.print.scale,
1014
- tableDialog: a.value.table.useDialog,
1015
- onToggleFullscreen: Ke,
1016
- onGeneratePdf: p(qe),
1017
- onGenerateCsv: Te,
1018
- onGenerateImage: p(Je),
1019
- onToggleTable: na,
1020
- onToggleLabels: ia,
1021
- onToggleStack: va,
1022
- onToggleTooltip: ca,
1023
- onToggleAnnotator: Ie,
1024
- style: ae({
1025
- visibility: p(Xe) ? p(ze) ? "visible" : "hidden" : "visible"
1026
- })
1027
- }, ya({ _: 2 }, [
1028
- e.$slots.menuIcon ? {
1029
- name: "menuIcon",
1030
- fn: m(({ isOpen: o, color: s }) => [
1031
- k(e.$slots, "menuIcon", V(Z({ isOpen: o, color: s })), void 0, !0)
1032
- ]),
1033
- key: "0"
1034
- } : void 0,
1035
- e.$slots.optionTooltip ? {
1036
- name: "optionTooltip",
1037
- fn: m(() => [
1038
- k(e.$slots, "optionTooltip", {}, void 0, !0)
1039
- ]),
1040
- key: "1"
1041
- } : void 0,
1042
- e.$slots.optionPdf ? {
1043
- name: "optionPdf",
1044
- fn: m(() => [
1045
- k(e.$slots, "optionPdf", {}, void 0, !0)
1046
- ]),
1047
- key: "2"
1048
- } : void 0,
1049
- e.$slots.optionCsv ? {
1050
- name: "optionCsv",
1051
- fn: m(() => [
1052
- k(e.$slots, "optionCsv", {}, void 0, !0)
1053
- ]),
1054
- key: "3"
1055
- } : void 0,
1056
- e.$slots.optionImg ? {
1057
- name: "optionImg",
1058
- fn: m(() => [
1059
- k(e.$slots, "optionImg", {}, void 0, !0)
1060
- ]),
1061
- key: "4"
1062
- } : void 0,
1063
- e.$slots.optionTable ? {
1064
- name: "optionTable",
1065
- fn: m(() => [
1066
- k(e.$slots, "optionTable", {}, void 0, !0)
1067
- ]),
1068
- key: "5"
1069
- } : void 0,
1070
- e.$slots.optionLabels ? {
1071
- name: "optionLabels",
1072
- fn: m(() => [
1073
- k(e.$slots, "optionLabels", {}, void 0, !0)
1074
- ]),
1075
- key: "6"
1076
- } : void 0,
1077
- e.$slots.optionStack ? {
1078
- name: "optionStack",
1079
- fn: m(() => [
1080
- k(e.$slots, "optionStack", {}, void 0, !0)
1081
- ]),
1082
- key: "7"
1083
- } : void 0,
1084
- e.$slots.optionFullscreen ? {
1085
- name: "optionFullscreen",
1086
- fn: m(({ toggleFullscreen: o, isFullscreen: s }) => [
1087
- k(e.$slots, "optionFullscreen", V(Z({ toggleFullscreen: o, isFullscreen: s })), void 0, !0)
1088
- ]),
1089
- key: "8"
1090
- } : void 0,
1091
- e.$slots.optionAnnotator ? {
1092
- name: "optionAnnotator",
1093
- fn: m(({ toggleAnnotator: o, isAnnotator: s }) => [
1094
- k(e.$slots, "optionAnnotator", V(Z({ toggleAnnotator: o, isAnnotator: s })), void 0, !0)
1095
- ]),
1096
- key: "9"
1097
- } : void 0
1098
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasLabel", "hasStack", "hasFullscreen", "hasTable", "isFullscreen", "isTooltip", "isStacked", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : H("", !0),
1099
- Y("div", {
1100
- class: "vue-ui-xy-canvas",
1101
- style: ae(`position: relative; aspect-ratio: ${Ze.value}`),
1102
- ref_key: "container",
1103
- ref: oe
1104
- }, [
1105
- pe.value ? (S(), de("canvas", {
1106
- key: 0,
1107
- ref_key: "canvas",
1108
- ref: O,
1109
- style: { width: "100%", height: "100%" },
1110
- onMousemove: l[0] || (l[0] = (o) => Ga(o)),
1111
- onMouseleave: ja
1112
- }, null, 544)) : (S(), F(p(za), {
1113
- key: 1,
1114
- config: {
1115
- type: "line",
1116
- style: {
1117
- backgroundColor: a.value.style.chart.backgroundColor,
1118
- line: {
1119
- axis: {
1120
- color: "#CCCCCC"
1121
- },
1122
- path: {
1123
- color: "#CCCCCC",
1124
- strokeWidth: 0.5
1125
- }
1126
- }
1127
- }
1128
- }
1129
- }, null, 8, ["config"])),
1130
- ga(p($a), {
1131
- show: r.value.showTooltip && ye.value,
1132
- backgroundColor: a.value.style.chart.tooltip.backgroundColor,
1133
- color: a.value.style.chart.tooltip.color,
1134
- fontSize: a.value.style.chart.tooltip.fontSize,
1135
- borderRadius: a.value.style.chart.tooltip.borderRadius,
1136
- borderColor: a.value.style.chart.tooltip.borderColor,
1137
- borderWidth: a.value.style.chart.tooltip.borderWidth,
1138
- position: a.value.style.chart.tooltip.position,
1139
- offsetY: a.value.style.chart.tooltip.offsetY,
1140
- parent: p(O),
1141
- content: ge.value,
1142
- isFullscreen: ue.value,
1143
- backgroundOpacity: a.value.style.chart.tooltip.backgroundOpacity,
1144
- isCustom: p(ba)(a.value.style.chart.tooltip.customFormat),
1145
- smooth: a.value.style.chart.tooltip.smooth,
1146
- backdropFilter: a.value.style.chart.tooltip.backdropFilter,
1147
- smoothForce: a.value.style.chart.tooltip.smoothForce,
1148
- smoothSnapThreshold: a.value.style.chart.tooltip.smoothSnapThreshold
1149
- }, {
1150
- "tooltip-before": m(() => [
1151
- k(e.$slots, "tooltip-before", V(Z({ ...Ee.value })), void 0, !0)
1152
- ]),
1153
- "tooltip-after": m(() => [
1154
- k(e.$slots, "tooltip-after", V(Z({ ...Ee.value })), void 0, !0)
1155
- ]),
1156
- _: 3
1157
- }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "position", "offsetY", "parent", "content", "isFullscreen", "backgroundOpacity", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"])
1158
- ], 4),
1159
- Y("div", {
1160
- ref_key: "chartSlicer",
1161
- ref: _e,
1162
- style: ae(`width:100%;background:${a.value.style.chart.backgroundColor}`),
1163
- "data-dom-to-png-ignore": ""
1164
- }, [
1165
- a.value.style.chart.zoom.show && T.value > 1 ? (S(), F(Il, {
1166
- ref_key: "slicerComponent",
1167
- ref: la,
1168
- key: `slicer_${Ae.value}`,
1169
- background: a.value.style.chart.zoom.color,
1170
- borderColor: a.value.style.chart.backgroundColor,
1171
- fontSize: a.value.style.chart.zoom.fontSize,
1172
- useResetSlot: a.value.style.chart.zoom.useResetSlot,
1173
- labelLeft: a.value.style.chart.grid.x.timeLabels.values[u.value.start] ? U.value[u.value.start].text : "",
1174
- labelRight: a.value.style.chart.grid.x.timeLabels.values[u.value.end - 1] ? U.value[u.value.end - 1].text : "",
1175
- textColor: a.value.style.chart.color,
1176
- inputColor: a.value.style.chart.zoom.color,
1177
- selectColor: a.value.style.chart.zoom.highlightColor,
1178
- max: T.value,
1179
- min: 0,
1180
- valueStart: u.value.start,
1181
- valueEnd: u.value.end,
1182
- start: u.value.start,
1183
- "onUpdate:start": l[1] || (l[1] = (o) => u.value.start = o),
1184
- end: u.value.end,
1185
- "onUpdate:end": l[2] || (l[2] = (o) => u.value.end = o),
1186
- refreshStartPoint: a.value.style.chart.zoom.startIndex !== null ? a.value.style.chart.zoom.startIndex : 0,
1187
- refreshEndPoint: a.value.style.chart.zoom.endIndex !== null ? a.value.style.chart.zoom.endIndex + 1 : T.value,
1188
- enableRangeHandles: a.value.style.chart.zoom.enableRangeHandles,
1189
- enableSelectionDrag: a.value.style.chart.zoom.enableSelectionDrag,
1190
- focusOnDrag: a.value.style.chart.zoom.focusOnDrag,
1191
- focusRangeRatio: a.value.style.chart.zoom.focusRangeRatio,
1192
- onReset: aa
1193
- }, {
1194
- "reset-action": m(({ reset: o }) => [
1195
- k(e.$slots, "reset-action", V(Z({ reset: o })), void 0, !0)
1196
- ]),
1197
- _: 3
1198
- }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag", "focusOnDrag", "focusRangeRatio"])) : H("", !0)
1199
- ], 4),
1200
- Y("div", {
1201
- id: `legend-bottom-${_.value}`
1202
- }, null, 8, Al),
1203
- Ue.value ? (S(), F(tl, {
1204
- key: 2,
1205
- to: a.value.style.chart.legend.position === "top" ? `#legend-top-${_.value}` : `#legend-bottom-${_.value}`
1206
- }, [
1207
- Y("div", {
1208
- ref_key: "chartLegend",
1209
- ref: Ye
1210
- }, [
1211
- a.value.style.chart.legend.show && pe.value ? (S(), F($l, {
1212
- legendSet: ra.value,
1213
- config: qa.value,
1214
- key: `legend_${we.value}`,
1215
- onClickMarker: l[3] || (l[3] = ({ i: o }) => ua(o))
1216
- }, {
1217
- item: m(({ legend: o, index: s }) => [
1218
- Y("div", {
1219
- onClick: (i) => o.segregate(),
1220
- style: ae(`opacity:${$.value.includes(s) ? 0.5 : 1}`)
1221
- }, Oe(o.name), 13, Nl)
1222
- ]),
1223
- _: 1
1224
- }, 8, ["legendSet", "config"])) : k(e.$slots, "legend", {
1225
- key: 1,
1226
- legend: ra.value
1227
- }, void 0, !0)
1228
- ], 512)
1229
- ], 8, ["to"])) : H("", !0),
1230
- e.$slots.watermark ? (S(), de("div", Hl, [
1231
- k(e.$slots, "watermark", V(Z({ isPrinting: p(Ge) || p(je) })), void 0, !0)
1232
- ])) : H("", !0),
1233
- e.$slots.source ? (S(), de("div", {
1234
- key: 4,
1235
- ref_key: "source",
1236
- ref: Be,
1237
- dir: "auto"
1238
- }, [
1239
- k(e.$slots, "source", {}, void 0, !0)
1240
- ], 512)) : H("", !0),
1241
- pe.value && a.value.userOptions.buttons.table ? (S(), F(ol(ie.value.component), ul({ key: 5 }, ie.value.props, {
1242
- ref_key: "tableUnit",
1243
- ref: re,
1244
- onClose: da
1245
- }), ya({
1246
- content: m(() => [
1247
- (S(), F(p(wa), {
1248
- key: `table_${Ce.value}`,
1249
- colNames: be.value.colNames,
1250
- head: be.value.head,
1251
- body: be.value.body,
1252
- config: be.value.config,
1253
- title: a.value.table.useDialog ? "" : ie.value.title,
1254
- withCloseButton: !a.value.table.useDialog,
1255
- onClose: da
1256
- }, {
1257
- th: m(({ th: o }) => [
1258
- Y("div", { innerHTML: o }, null, 8, Yl)
1259
- ]),
1260
- td: m(({ td: o }) => [
1261
- pa(Oe(o), 1)
1262
- ]),
1263
- _: 1
1264
- }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
1265
- ]),
1266
- _: 2
1267
- }, [
1268
- a.value.table.useDialog ? {
1269
- name: "title",
1270
- fn: m(() => [
1271
- pa(Oe(ie.value.title), 1)
1272
- ]),
1273
- key: "0"
1274
- } : void 0,
1275
- a.value.table.useDialog ? {
1276
- name: "actions",
1277
- fn: m(() => [
1278
- Y("button", {
1279
- tabindex: "0",
1280
- class: "vue-ui-user-options-button",
1281
- onClick: l[4] || (l[4] = (o) => Te(a.value.userOptions.callbacks.csv))
1282
- }, [
1283
- ga(Dl, {
1284
- name: "excel",
1285
- stroke: ie.value.props.color
1286
- }, null, 8, ["stroke"])
1287
- ])
1288
- ]),
1289
- key: "1"
1290
- } : void 0
1291
- ]), 1040)) : H("", !0),
1292
- a.value.userOptions.buttons.annotator && h.value.length ? (S(), F(p(Sa), {
1293
- key: 6,
1294
- parent: I.value,
1295
- backgroundColor: a.value.style.chart.backgroundColor,
1296
- color: a.value.style.chart.color,
1297
- active: xe.value,
1298
- onClose: Ie
1299
- }, null, 8, ["parent", "backgroundColor", "color", "active"])) : H("", !0)
1300
- ], 46, Pl));
1301
- }
1302
- }, ot = /* @__PURE__ */ Fl(_l, [["__scopeId", "data-v-a22cfedc"]]);
1303
- export {
1304
- ot as default
1305
- };