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.
- package/dist/{Arrow-ayTeSvpe.js → Arrow-CRe_nKB4.js} +1 -1
- package/dist/{BaseDraggableDialog-Cysanw8-.js → BaseDraggableDialog-CbuLbfrc.js} +2 -2
- package/dist/{BaseIcon-DG6cvf2h.js → BaseIcon-B5KaGWWC.js} +1 -1
- package/dist/{ColorPicker-CA8kKZjZ.js → ColorPicker-BMztHpBp.js} +10 -10
- package/dist/{DataTable-DUpZ_s2c.js → DataTable-DOx3zgih.js} +2 -2
- package/dist/{Legend-CCBZ2x8T.js → Legend-C8u37J42.js} +2 -2
- package/dist/{NonSvgPenAndPaper-D2IMGwaN.js → NonSvgPenAndPaper-BcxfJ-r2.js} +3 -3
- package/dist/{PackageVersion-CQvYRebC.js → PackageVersion-VpPtLYhK.js} +1 -1
- package/dist/{PenAndPaper-D9LruJaM.js → PenAndPaper-Dj2diYr0.js} +3 -3
- package/dist/{Shape-BS9UGhNq.js → Shape-BhNvlGIN.js} +1 -1
- package/dist/{Slicer-BOki89CB.js → Slicer-BHgEsIBU.js} +111 -111
- package/dist/SlicerPreview-Cobmb_1S.js +1148 -0
- package/dist/{SparkTooltip-svd8Hb6c.js → SparkTooltip-CL3cNRQ_.js} +1 -1
- package/dist/{Title-B6rAo9Oz.js → Title-CFmv95In.js} +1 -1
- package/dist/{Tooltip-DaInVNiV.js → Tooltip-Cs4v8OnI.js} +1 -1
- package/dist/{UserOptions-CJXSEhan.js → UserOptions-C0YT60JN.js} +2 -2
- package/dist/components/arrow.js +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{dom-to-png-Tq92GZKA.js → dom-to-png-xQ7LXrxp.js} +1 -1
- package/dist/{img-DI-W68vp.js → img-CFY3JivG.js} +1 -1
- package/dist/{lib-CSDxt1Zh.js → lib-BcBZIm6u.js} +439 -395
- package/dist/{pdf-BzVpWnNO.js → pdf-O34i6EQX.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +82 -8
- package/dist/{useAutoSizeLabelsInsideViewbox-CtQ7pJ8G.js → useAutoSizeLabelsInsideViewbox-BHq4FD8x.js} +1 -1
- package/dist/{useNestedProp-Dh-ldrr5.js → useNestedProp-B7CiTRDS.js} +327 -240
- package/dist/{usePrinter-Cq8Pt6Lh.js → usePrinter-C1GiglOH.js} +2 -2
- package/dist/{vue-data-ui-CDY7snWF.js → vue-data-ui-oDJui39L.js} +64 -64
- package/dist/vue-data-ui.js +100 -100
- package/dist/{vue-ui-3d-bar-DbpiTjGu.js → vue-ui-3d-bar-wycTM073.js} +56 -56
- package/dist/{vue-ui-accordion-CaClZrCp.js → vue-ui-accordion-BKkTS12x.js} +3 -3
- package/dist/{vue-ui-age-pyramid-DuIxXz5p.js → vue-ui-age-pyramid-C5NUZ_Y7.js} +39 -39
- package/dist/{vue-ui-annotator-C2efSKQK.js → vue-ui-annotator-DkSYrnwb.js} +7 -7
- package/dist/{vue-ui-bullet-qpcqLKmp.js → vue-ui-bullet-CIsX5UJw.js} +7 -7
- package/dist/vue-ui-candlestick-BRFx3_KK.js +1334 -0
- package/dist/{vue-ui-carousel-table-CCTtArFX.js → vue-ui-carousel-table-hJySHJTu.js} +29 -29
- package/dist/{vue-ui-chestnut-CbvxJ8hy.js → vue-ui-chestnut-D4GjvQh0.js} +70 -70
- package/dist/{vue-ui-chord-Cp9nyIdv.js → vue-ui-chord-By2NOs0N.js} +35 -35
- package/dist/{vue-ui-circle-pack-kHzd0UYO.js → vue-ui-circle-pack-OCmAkTNs.js} +59 -59
- package/dist/{vue-ui-cursor-DEvkJRCz.js → vue-ui-cursor-iuati4v1.js} +2 -2
- package/dist/{vue-ui-dashboard-k_mz9iwy.js → vue-ui-dashboard-C7fwU9xb.js} +67 -67
- package/dist/{vue-ui-digits-CqWCkEu2.js → vue-ui-digits-eYxf3UFN.js} +2 -2
- package/dist/{vue-ui-donut-CDKS6sVu.js → vue-ui-donut-dVVBUQJz.js} +189 -189
- package/dist/{vue-ui-donut-evolution-C6cGI_P3.js → vue-ui-donut-evolution-BoWGaQP0.js} +82 -82
- package/dist/{vue-ui-dumbbell-ZjJst3xs.js → vue-ui-dumbbell-YMPZ3CVA.js} +66 -66
- package/dist/{vue-ui-flow-sX1PYIkr.js → vue-ui-flow-BE62rVS3.js} +75 -75
- package/dist/{vue-ui-funnel--VViM9gH.js → vue-ui-funnel-kNpDFAWo.js} +63 -63
- package/dist/{vue-ui-galaxy-Du0V9GF8.js → vue-ui-galaxy-BBBiXXyk.js} +62 -62
- package/dist/{vue-ui-gauge-BAe4p2g-.js → vue-ui-gauge-PQNTTl3Y.js} +58 -58
- package/dist/{vue-ui-gizmo-CfjwAt38.js → vue-ui-gizmo-D3gQxQz3.js} +3 -3
- package/dist/{vue-ui-heatmap-Q0jrPM5h.js → vue-ui-heatmap-CKWQButF.js} +104 -104
- package/dist/{vue-ui-history-plot-CLSN3mPy.js → vue-ui-history-plot-DYFzdR4Z.js} +91 -91
- package/dist/{vue-ui-kpi-CBRgXD1s.js → vue-ui-kpi-N8s0i48S.js} +3 -3
- package/dist/{vue-ui-mini-loader-3yCeDEPK.js → vue-ui-mini-loader-Db-9iQcC.js} +2 -2
- package/dist/{vue-ui-molecule-Ddh4hbX0.js → vue-ui-molecule-Cklyb74B.js} +102 -102
- package/dist/{vue-ui-mood-radar-CK8UF-ka.js → vue-ui-mood-radar-Cvq4ZuLe.js} +28 -28
- package/dist/{vue-ui-nested-donuts-DO0FV0tU.js → vue-ui-nested-donuts-Bm78P1ES.js} +60 -60
- package/dist/{vue-ui-onion-DXLqoj-4.js → vue-ui-onion-Bh5jTb31.js} +46 -46
- package/dist/{vue-ui-parallel-coordinate-plot-BlffHAHB.js → vue-ui-parallel-coordinate-plot-BKdN2OsW.js} +64 -64
- package/dist/{vue-ui-quadrant-pw2ALj7p.js → vue-ui-quadrant-BPhJzots.js} +8 -8
- package/dist/{vue-ui-quick-chart-9oGbV593.js → vue-ui-quick-chart-DbJR9CN3.js} +86 -86
- package/dist/vue-ui-radar-CrenQprr.js +938 -0
- package/dist/{vue-ui-rating-C4yZY1sb.js → vue-ui-rating-fR2WRHYO.js} +2 -2
- package/dist/{vue-ui-relation-circle-Duxv-A4H.js → vue-ui-relation-circle-BJ5RuZ0j.js} +31 -31
- package/dist/{vue-ui-ridgeline-B-q7J-C0.js → vue-ui-ridgeline-CKuom5Bu.js} +97 -97
- package/dist/{vue-ui-rings-PRAcmP1H.js → vue-ui-rings-B84GAEf4.js} +50 -50
- package/dist/{vue-ui-scatter-BLW4MJtJ.js → vue-ui-scatter-CBX-g9w3.js} +100 -100
- package/dist/{vue-ui-skeleton-D0PF0jxa.js → vue-ui-skeleton-CZ8xxpEU.js} +3 -3
- package/dist/{vue-ui-smiley-Be44gMTh.js → vue-ui-smiley-BKXuAviQ.js} +2 -2
- package/dist/{vue-ui-spark-trend-B2XY2dRa.js → vue-ui-spark-trend-DOf7-cIf.js} +18 -18
- package/dist/{vue-ui-sparkbar-DWQN4gvR.js → vue-ui-sparkbar-D-MPA2zf.js} +3 -3
- package/dist/{vue-ui-sparkgauge-fDhQGQ12.js → vue-ui-sparkgauge-B9xRiVSU.js} +6 -6
- package/dist/{vue-ui-sparkhistogram-f7Acvipt.js → vue-ui-sparkhistogram-BWb0lqQP.js} +4 -4
- package/dist/{vue-ui-sparkline-Ys3JW7Ap.js → vue-ui-sparkline-BF-qr8Ti.js} +23 -23
- package/dist/{vue-ui-sparkstackbar-Dv0HeSna.js → vue-ui-sparkstackbar-DnCUpk50.js} +17 -17
- package/dist/vue-ui-stackbar-DvJ8Hahn.js +1695 -0
- package/dist/{vue-ui-strip-plot-DN13ntF-.js → vue-ui-strip-plot-SAh1gIs5.js} +52 -52
- package/dist/{vue-ui-table-Qb5tDX1n.js → vue-ui-table-BJdDfMYD.js} +18 -18
- package/dist/{vue-ui-table-heatmap-hMrgJ25a.js → vue-ui-table-heatmap-DU6GKPVy.js} +32 -32
- package/dist/{vue-ui-table-sparkline-CdkFyJjv.js → vue-ui-table-sparkline-BBFEJ8c6.js} +28 -28
- package/dist/{vue-ui-thermometer-D7U2C7kJ.js → vue-ui-thermometer-D8DH6QSN.js} +22 -22
- package/dist/{vue-ui-timer-KtA4M2mV.js → vue-ui-timer-CaUdAHBE.js} +29 -29
- package/dist/{vue-ui-tiremarks-C6GTGszq.js → vue-ui-tiremarks-_sUH1d3J.js} +14 -14
- package/dist/{vue-ui-treemap-rhnl1TW9.js → vue-ui-treemap-DXduzuW4.js} +78 -78
- package/dist/{vue-ui-vertical-bar-n_Lvbd_X.js → vue-ui-vertical-bar-JdjmgwQj.js} +94 -94
- package/dist/{vue-ui-waffle-D-4whGLN.js → vue-ui-waffle-h8zoi4Rc.js} +68 -68
- package/dist/{vue-ui-wheel-D92HLjfr.js → vue-ui-wheel-Ck1Mx37j.js} +21 -21
- package/dist/{vue-ui-word-cloud-Df9AMw6v.js → vue-ui-word-cloud-CjWvuukM.js} +47 -47
- package/dist/{vue-ui-world-Bg9S35ug.js → vue-ui-world-Dw71_Mu2.js} +6 -6
- package/dist/vue-ui-xy-canvas-Dct7tf8w.js +1548 -0
- package/dist/vue-ui-xy-tSMgXqqb.js +3375 -0
- package/package.json +2 -2
- package/dist/vue-ui-candlestick-DTWbbdGH.js +0 -1073
- package/dist/vue-ui-radar-Csznqw19.js +0 -891
- package/dist/vue-ui-stackbar-DUlN5QiM.js +0 -1457
- package/dist/vue-ui-xy-Da6oy2rm.js +0 -4527
- package/dist/vue-ui-xy-canvas-0CLSIKpO.js +0 -1305
|
@@ -0,0 +1,1695 @@
|
|
|
1
|
+
import { defineAsyncComponent as J, useSlots as pl, computed as g, ref as d, onMounted as sa, toRefs as xl, watch as we, shallowRef as ra, onBeforeUnmount as ct, watchEffect as oa, nextTick as kl, createElementBlock as n, openBlock as r, normalizeStyle as se, normalizeClass as ue, createBlock as Z, createCommentVNode as b, renderSlot as _, createElementVNode as Q, createVNode as Le, unref as f, createSlots as vt, withCtx as M, normalizeProps as K, guardReactiveProps as j, Fragment as p, renderList as k, mergeProps as Se, toDisplayString as F, Teleport as wl, resolveDynamicComponent as Ll, createTextVNode as na } from "vue";
|
|
2
|
+
import { u as Sl, a as ia } from "./useNestedProp-B7CiTRDS.js";
|
|
3
|
+
import { c as ua, t as zl, b as Cl, p as Ee, O as ce, e as _l, o as ca, f as va, g as Ml, h as Tl, aj as ze, n as ha, m as da, v as $l, X as Al, S as Pl, r as Ve, J as ya, a as Ue, d as re, M as Nl, $ as Rl, G as ga, P as Ol, Q as Il, H as Fl } from "./lib-BcBZIm6u.js";
|
|
4
|
+
import { t as ht, u as Dl } from "./useResponsive-DfdjqQps.js";
|
|
5
|
+
import { u as El } from "./usePrinter-C1GiglOH.js";
|
|
6
|
+
import { u as Vl, B as Ul } from "./BaseScanner-BgWxam9d.js";
|
|
7
|
+
import { u as ba, a as Bl, l as Hl } from "./useTimeLabels-BGFjWgrv.js";
|
|
8
|
+
import { u as Xl } from "./useSvgExport-DrjCWun4.js";
|
|
9
|
+
import { u as Wl } from "./useUserOptionState-BIvW1Kz7.js";
|
|
10
|
+
import { u as Yl } from "./useChartAccessibility-9icAAmYg.js";
|
|
11
|
+
import { u as Gl } from "./useTimeLabelCollider-CIsgDrl9.js";
|
|
12
|
+
import ql from "./img-CFY3JivG.js";
|
|
13
|
+
import Jl from "./Title-CFmv95In.js";
|
|
14
|
+
import { _ as Zl } from "./Shape-BhNvlGIN.js";
|
|
15
|
+
import { t as Ql } from "./themes-Dw-dDudK.js";
|
|
16
|
+
import Kl from "./Legend-C8u37J42.js";
|
|
17
|
+
import { S as jl } from "./SlicerPreview-Cobmb_1S.js";
|
|
18
|
+
import { _ as es } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
19
|
+
const ts = ["id"], as = ["id"], ls = ["xmlns", "viewBox"], ss = ["x", "y", "width", "height"], rs = { key: 1 }, os = ["id"], ns = ["stop-color"], is = ["stop-color"], us = ["stop-color"], cs = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], vs = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], hs = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], ds = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], ys = { key: 0 }, gs = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], bs = { key: 0 }, ms = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], fs = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], ps = { key: 0 }, xs = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], ks = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ws = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ls = ["x", "y", "font-size", "fill", "font-weight"], Ss = ["transform", "font-size", "fill", "font-weight"], zs = ["x", "y", "font-size", "fill", "font-weight"], Cs = ["x", "y", "font-size", "font-weight", "fill"], _s = ["x", "y", "font-size", "fill", "font-weight"], Ms = ["x", "y", "font-size", "font-weight", "fill"], Ts = ["x1", "x2", "y1", "y2", "stroke"], $s = ["x", "y", "font-size", "font-weight", "fill"], As = ["x1", "x2", "y1", "y2", "stroke"], Ps = ["font-size", "font-weight", "fill", "text-anchor", "transform"], Ns = { key: 0 }, Rs = { key: 1 }, Os = ["text-anchor", "font-size", "font-weight", "fill", "transform", "onClick"], Is = ["text-anchor", "font-size", "fill", "transform", "innerHTML", "onClick"], Fs = { key: 0 }, Ds = { key: 1 }, Es = ["font-size", "font-weight", "fill", "x", "y", "onClick"], Vs = ["font-size", "font-weight", "fill", "x", "y", "onClick", "innerHTML"], Us = ["x", "y", "width", "height", "onClick", "onMouseenter", "onMouseleave", "fill"], Bs = ["x", "y", "width", "height", "onClick", "onMouseenter", "onMouseleave", "fill"], Hs = ["data-start", "data-end"], Xs = {
|
|
20
|
+
key: 3,
|
|
21
|
+
class: "vue-data-ui-watermark"
|
|
22
|
+
}, Ws = ["x", "y", "height", "width", "fill", "stroke"], Ys = ["id"], Gs = ["onClick"], qs = ["innerHTML"], Js = {
|
|
23
|
+
__name: "vue-ui-stackbar",
|
|
24
|
+
props: {
|
|
25
|
+
config: {
|
|
26
|
+
type: Object,
|
|
27
|
+
default() {
|
|
28
|
+
return {};
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
dataset: {
|
|
32
|
+
type: Array,
|
|
33
|
+
default() {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
selectedXIndex: {
|
|
38
|
+
type: Number,
|
|
39
|
+
default: void 0
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
emits: ["selectDatapoint", "selectLegend", "selectTimeLabel", "selectX"],
|
|
43
|
+
setup(Be, { expose: ma, emit: fa }) {
|
|
44
|
+
const pa = J(() => import("./Tooltip-Cs4v8OnI.js")), xa = J(() => import("./BaseIcon-B5KaGWWC.js")), ka = J(() => import("./vue-ui-accordion-BKkTS12x.js")), wa = J(() => import("./DataTable-DOx3zgih.js")), La = J(() => import("./PenAndPaper-Dj2diYr0.js")), Sa = J(() => import("./UserOptions-C0YT60JN.js")), za = J(() => import("./PackageVersion-VpPtLYhK.js")), Ca = J(() => import("./BaseDraggableDialog-CbuLbfrc.js")), { vue_ui_stackbar: _a } = Sl(), Ma = pl(), x = Be, ve = fa, he = g({
|
|
45
|
+
get() {
|
|
46
|
+
return !!x.dataset && x.dataset.length;
|
|
47
|
+
},
|
|
48
|
+
set(a) {
|
|
49
|
+
return a;
|
|
50
|
+
}
|
|
51
|
+
}), X = d(null), D = d(ua()), He = d(!1), Xe = d(null), We = d(""), N = d([]), dt = d(0), yt = d(null), gt = d(null), de = d(null), bt = d(null), ye = d(!1), U = d(null), ee = d(!1), mt = d(0), Ta = d(0), $a = d(0), ft = d(!1), ge = d(null), Ye = d(null), Ge = d(null), qe = d(null), te = d(null), ae = d(null), Aa = d(null), pt = d(null), Je = d(null);
|
|
52
|
+
sa(() => {
|
|
53
|
+
ft.value = !0, tt();
|
|
54
|
+
});
|
|
55
|
+
const e = d(je()), { loading: be, FINAL_DATASET: Ze, manualLoading: Ce } = Vl({
|
|
56
|
+
...xl(x),
|
|
57
|
+
FINAL_CONFIG: e,
|
|
58
|
+
prepareConfig: je,
|
|
59
|
+
callback: () => {
|
|
60
|
+
Promise.resolve().then(async () => {
|
|
61
|
+
await Oe();
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
skeletonDataset: [
|
|
65
|
+
{
|
|
66
|
+
name: "",
|
|
67
|
+
series: [2, 3, 5, 8, 13, 21],
|
|
68
|
+
color: "#BABABA"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: "",
|
|
72
|
+
series: [1, 2, 3, 5, 8, 13],
|
|
73
|
+
color: "#CACACA"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
skeletonConfig: zl({
|
|
77
|
+
defaultConfig: e.value,
|
|
78
|
+
userConfig: {
|
|
79
|
+
userOptions: { show: !1 },
|
|
80
|
+
useCssAnimation: !1,
|
|
81
|
+
table: { show: !1 },
|
|
82
|
+
tooltip: { show: !1 },
|
|
83
|
+
style: {
|
|
84
|
+
chart: {
|
|
85
|
+
backgroundColor: "#99999930",
|
|
86
|
+
bars: {
|
|
87
|
+
totalValues: { show: !1 },
|
|
88
|
+
dataLabels: { show: !1 }
|
|
89
|
+
},
|
|
90
|
+
grid: {
|
|
91
|
+
scale: {
|
|
92
|
+
scaleMin: 0,
|
|
93
|
+
scaleMax: 40
|
|
94
|
+
},
|
|
95
|
+
x: {
|
|
96
|
+
axisColor: "#6A6A6A",
|
|
97
|
+
linesColor: "#6A6A6A",
|
|
98
|
+
axisName: { show: !1 },
|
|
99
|
+
timeLabels: { show: !1 }
|
|
100
|
+
},
|
|
101
|
+
y: {
|
|
102
|
+
axisColor: "#6A6A6A",
|
|
103
|
+
linesColor: "#6A6A6A",
|
|
104
|
+
axisName: { show: !1 },
|
|
105
|
+
axisLabels: { show: !1 }
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
legend: {
|
|
109
|
+
backgroundColor: "transparent"
|
|
110
|
+
},
|
|
111
|
+
padding: {
|
|
112
|
+
left: 24,
|
|
113
|
+
right: 24,
|
|
114
|
+
bottom: 12
|
|
115
|
+
},
|
|
116
|
+
zoom: {
|
|
117
|
+
show: !1,
|
|
118
|
+
startIndex: null,
|
|
119
|
+
endIndex: null
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
})
|
|
125
|
+
}), { userOptionsVisible: Qe, setUserOptionsVisibility: xt, keepUserOptionState: kt } = Wl({ config: e.value }), { svgRef: Ke } = Yl({ config: e.value.style.chart.title });
|
|
126
|
+
function Pa() {
|
|
127
|
+
xt(!0);
|
|
128
|
+
}
|
|
129
|
+
function Na() {
|
|
130
|
+
xt(!1), ve("selectX", { seriesIndex: null, datapoint: null }), U.value = null;
|
|
131
|
+
}
|
|
132
|
+
function je() {
|
|
133
|
+
const a = ia({
|
|
134
|
+
userConfig: x.config,
|
|
135
|
+
defaultConfig: _a
|
|
136
|
+
});
|
|
137
|
+
let l = {};
|
|
138
|
+
return a.theme ? l = {
|
|
139
|
+
...ia({
|
|
140
|
+
userConfig: Ql.vue_ui_stackbar[a.theme] || x.config,
|
|
141
|
+
defaultConfig: a
|
|
142
|
+
}),
|
|
143
|
+
customPalette: Cl[a.theme] || Ee
|
|
144
|
+
} : l = a, x.config && ce(x.config, "style.chart.grid.scale.scaleMin") ? l.style.chart.grid.scale.scaleMin = x.config.style.chart.grid.scale.scaleMin : l.style.chart.grid.scale.scaleMin = null, x.config && ce(x.config, "style.chart.grid.scale.scaleMax") ? l.style.chart.grid.scale.scaleMax = x.config.style.chart.grid.scale.scaleMax : l.style.chart.grid.scale.scaleMax = null, x.config && ce(x.config, "style.chart.zoom.startIndex") ? l.style.chart.zoom.startIndex = x.config.style.chart.zoom.startIndex : l.style.chart.zoom.startIndex = null, x.config && ce(x.config, "style.chart.zoom.endIndex") ? l.style.chart.zoom.endIndex = x.config.style.chart.zoom.endIndex : l.style.chart.zoom.endIndex = null, x.config && ce(x.config, "style.chart.bars.dataLabels.hideUnderValue") ? l.style.chart.bars.dataLabels.hideUnderValue = x.config.style.chart.bars.dataLabels.hideUnderValue : l.style.chart.bars.dataLabels.hideUnderValue = null, x.config && ce(x.config, "style.chart.bars.dataLabels.hideUnderPercentage") ? l.style.chart.bars.dataLabels.hideUnderPercentage = x.config.style.chart.bars.dataLabels.hideUnderPercentage : l.style.chart.bars.dataLabels.hideUnderPercentage = null, l;
|
|
145
|
+
}
|
|
146
|
+
const wt = g(() => e.value.style.chart.bars.dataLabels.hideUnderValue !== null), Lt = g(() => e.value.style.chart.bars.dataLabels.hideUnderPercentage !== null);
|
|
147
|
+
we(() => x.config, (a) => {
|
|
148
|
+
be.value || (e.value = je()), Qe.value = !e.value.userOptions.showOnChartHover, tt(), mt.value += 1, Ta.value += 1, $a.value += 1, T.value.dataLabels.show = e.value.style.chart.bars.dataLabels.show, T.value.showTable = e.value.table.show, T.value.showTooltip = e.value.style.chart.tooltip.show, Te();
|
|
149
|
+
}, { deep: !0 }), we(() => x.dataset, (a) => {
|
|
150
|
+
Array.isArray(a) && a.length > 0 && (Ce.value = !1), Pt();
|
|
151
|
+
}, { deep: !0 });
|
|
152
|
+
const T = d({
|
|
153
|
+
dataLabels: {
|
|
154
|
+
show: e.value.style.chart.bars.dataLabels.show
|
|
155
|
+
},
|
|
156
|
+
showTable: e.value.table.show,
|
|
157
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
158
|
+
});
|
|
159
|
+
we(e, () => {
|
|
160
|
+
T.value = {
|
|
161
|
+
dataLabels: {
|
|
162
|
+
show: e.value.style.chart.bars.dataLabels.show
|
|
163
|
+
},
|
|
164
|
+
showTable: e.value.table.show,
|
|
165
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
166
|
+
};
|
|
167
|
+
}, { immediate: !0 });
|
|
168
|
+
const { isPrinting: St, isImaging: zt, generatePdf: Ct, generateImage: _t } = El({
|
|
169
|
+
elementId: `stackbar_${D.value}`,
|
|
170
|
+
fileName: e.value.style.chart.title.text || "vue-ui-stackbar",
|
|
171
|
+
options: e.value.userOptions.print
|
|
172
|
+
}), oe = d({
|
|
173
|
+
width: e.value.style.chart.width,
|
|
174
|
+
height: e.value.style.chart.height,
|
|
175
|
+
paddingRatio: {
|
|
176
|
+
top: e.value.style.chart.padding.top / e.value.style.chart.height,
|
|
177
|
+
right: e.value.style.chart.padding.right / e.value.style.chart.width,
|
|
178
|
+
bottom: e.value.style.chart.padding.bottom / e.value.style.chart.height,
|
|
179
|
+
left: e.value.style.chart.padding.left / e.value.style.chart.width
|
|
180
|
+
}
|
|
181
|
+
}), Ra = g(() => _l(e.value.customPalette)), G = ra(null), ne = ra(null), Mt = d(null);
|
|
182
|
+
sa(() => {
|
|
183
|
+
tt();
|
|
184
|
+
});
|
|
185
|
+
const et = g(() => !!e.value.debug);
|
|
186
|
+
function tt() {
|
|
187
|
+
if (ca(x.dataset) ? (va({
|
|
188
|
+
componentName: "VueUiStackbar",
|
|
189
|
+
type: "dataset",
|
|
190
|
+
debug: et.value
|
|
191
|
+
}), Ce.value = !0) : x.dataset.forEach((a, l) => {
|
|
192
|
+
Ml({
|
|
193
|
+
datasetObject: a,
|
|
194
|
+
requiredAttributes: ["name", "series"]
|
|
195
|
+
}).forEach((t) => {
|
|
196
|
+
he.value = !1, va({
|
|
197
|
+
componentName: "VueUiStackbar",
|
|
198
|
+
type: "datasetSerieAttribute",
|
|
199
|
+
property: t,
|
|
200
|
+
index: l,
|
|
201
|
+
debug: et.value
|
|
202
|
+
}), Ce.value = !0;
|
|
203
|
+
});
|
|
204
|
+
}), ca(x.dataset) || (Ce.value = e.value.loading), setTimeout(() => {
|
|
205
|
+
ee.value = !0;
|
|
206
|
+
}, 10), e.value.responsive) {
|
|
207
|
+
const a = ht(() => {
|
|
208
|
+
ee.value = !1;
|
|
209
|
+
const { width: l, height: t } = Dl({
|
|
210
|
+
chart: X.value,
|
|
211
|
+
title: e.value.style.chart.title.text ? yt.value : null,
|
|
212
|
+
legend: e.value.style.chart.legend.show ? gt.value : null,
|
|
213
|
+
slicer: e.value.style.chart.zoom.show && A.value > 6 ? de.value.$el : null,
|
|
214
|
+
source: bt.value
|
|
215
|
+
});
|
|
216
|
+
requestAnimationFrame(() => {
|
|
217
|
+
oe.value.width = l, oe.value.height = t - 12, clearTimeout(Mt.value), Mt.value = setTimeout(() => {
|
|
218
|
+
ee.value = !0;
|
|
219
|
+
}, 10);
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
G.value && (ne.value && G.value.unobserve(ne.value), G.value.disconnect()), G.value = new ResizeObserver(a), ne.value = X.value.parentNode, G.value.observe(ne.value);
|
|
223
|
+
}
|
|
224
|
+
Oe();
|
|
225
|
+
}
|
|
226
|
+
ct(() => {
|
|
227
|
+
G.value && (ne.value && G.value.unobserve(ne.value), G.value.disconnect());
|
|
228
|
+
});
|
|
229
|
+
function Oa() {
|
|
230
|
+
let a = 0;
|
|
231
|
+
e.value.orientation === "vertical" && te.value && (a = Array.from(te.value.querySelectorAll("text")).reduce((s, c) => {
|
|
232
|
+
const o = c.getComputedTextLength();
|
|
233
|
+
return o > s ? o : s;
|
|
234
|
+
}, 0)), e.value.orientation === "horizontal" && ae.value && (a = Array.from(ae.value.querySelectorAll("text")).reduce((s, c) => {
|
|
235
|
+
const o = c.getComputedTextLength();
|
|
236
|
+
return o > s ? o : s;
|
|
237
|
+
}, 0));
|
|
238
|
+
const l = qe.value ? qe.value.getBoundingClientRect().width : 0;
|
|
239
|
+
return a + l + (l ? 24 : 0);
|
|
240
|
+
}
|
|
241
|
+
const _e = d(0), Me = d(0), Ia = ht((a) => {
|
|
242
|
+
_e.value = a;
|
|
243
|
+
}, 100);
|
|
244
|
+
oa((a) => {
|
|
245
|
+
const l = e.value.orientation === "vertical" ? ae.value : te.value;
|
|
246
|
+
if (!l) return;
|
|
247
|
+
const t = new ResizeObserver((s) => {
|
|
248
|
+
Ia(s[0].contentRect.height);
|
|
249
|
+
});
|
|
250
|
+
t.observe(l), a(() => t.disconnect());
|
|
251
|
+
});
|
|
252
|
+
const Fa = ht((a) => {
|
|
253
|
+
Me.value = a + e.value.style.chart.bars.totalValues.fontSize;
|
|
254
|
+
}, 100);
|
|
255
|
+
oa((a) => {
|
|
256
|
+
if (e.value.orientation === "vertical") return;
|
|
257
|
+
const l = pt.value;
|
|
258
|
+
if (!l) return;
|
|
259
|
+
const t = new ResizeObserver((s) => {
|
|
260
|
+
Fa(s[0].contentRect.width);
|
|
261
|
+
});
|
|
262
|
+
t.observe(l), a(() => t.disconnect());
|
|
263
|
+
}), ct(() => {
|
|
264
|
+
_e.value = 0, Me.value = 0;
|
|
265
|
+
});
|
|
266
|
+
const Tt = g(() => {
|
|
267
|
+
let a = 0;
|
|
268
|
+
Ge.value && (a = Ge.value.getBBox().height);
|
|
269
|
+
let l = 0;
|
|
270
|
+
return e.value.orientation === "vertical" && ae.value && (l = _e.value), e.value.orientation === "horizontal" && te.value && (l = _e.value), a + l;
|
|
271
|
+
}), u = g(() => {
|
|
272
|
+
const { height: a, width: l } = oe.value, { right: t } = oe.value.paddingRatio;
|
|
273
|
+
let s = e.value.style.chart.bars.totalValues.show && x.dataset && x.dataset.length > 1 ? e.value.style.chart.bars.totalValues.fontSize * 1.3 : 0, c = 0;
|
|
274
|
+
e.value.style.chart.grid.y.axisLabels.show && (c = Oa());
|
|
275
|
+
const o = e.value.style.chart.padding.top + s, w = l - l * t - Me.value, C = a - e.value.style.chart.padding.bottom - Tt.value - s, I = e.value.style.chart.padding.left + c, H = l - I - l * t - Me.value, E = a - o - e.value.style.chart.padding.bottom - Tt.value - s;
|
|
276
|
+
return {
|
|
277
|
+
chartHeight: a,
|
|
278
|
+
chartWidth: l,
|
|
279
|
+
top: o,
|
|
280
|
+
right: w,
|
|
281
|
+
bottom: C,
|
|
282
|
+
left: I,
|
|
283
|
+
width: Math.max(0, H),
|
|
284
|
+
height: Math.max(0, E)
|
|
285
|
+
};
|
|
286
|
+
}), Da = g(() => {
|
|
287
|
+
const { left: a, top: l, width: t, height: s } = u.value, c = v.value.start, o = v.value.end, w = Math.max(1, o - c), C = Math.max(0, Math.min(w, (O.value.start ?? c) - c)), I = Math.max(0, Math.min(w, (O.value.end ?? o) - c)), H = Math.max(0, I - C), E = {
|
|
288
|
+
fill: e.value.style.chart.zoom.preview.fill,
|
|
289
|
+
stroke: e.value.style.chart.zoom.preview.stroke,
|
|
290
|
+
"stroke-width": e.value.style.chart.zoom.preview.strokeWidth,
|
|
291
|
+
"stroke-dasharray": e.value.style.chart.zoom.preview.strokeDasharray,
|
|
292
|
+
"stroke-linecap": "round",
|
|
293
|
+
"stroke-linejoin": "round",
|
|
294
|
+
style: {
|
|
295
|
+
pointerEvents: "none",
|
|
296
|
+
transition: "none !important",
|
|
297
|
+
animation: "none !important"
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
if (e.value.orientation === "horizontal") {
|
|
301
|
+
const $ = s / w;
|
|
302
|
+
return {
|
|
303
|
+
x: a,
|
|
304
|
+
y: l + C * $,
|
|
305
|
+
width: t,
|
|
306
|
+
height: H * $,
|
|
307
|
+
...E
|
|
308
|
+
};
|
|
309
|
+
} else {
|
|
310
|
+
const $ = t / w;
|
|
311
|
+
return {
|
|
312
|
+
x: a + C * $,
|
|
313
|
+
y: l,
|
|
314
|
+
width: H * $,
|
|
315
|
+
height: s,
|
|
316
|
+
...E
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
}), W = g(() => Ze.value.map((a, l) => {
|
|
320
|
+
const t = Tl(a.color) || Ra.value[l] || Ee[l] || Ee[l % Ee.length];
|
|
321
|
+
return {
|
|
322
|
+
...a,
|
|
323
|
+
// In distributed mode, all values are converted to positive
|
|
324
|
+
series: JSON.parse(JSON.stringify(a.series)).map((s) => e.value.style.chart.bars.distributed ? Math.abs(s) : s),
|
|
325
|
+
// Store signs to manage display of neg values in distributed mode
|
|
326
|
+
signedSeries: a.series.map((s) => s >= 0 ? 1 : -1),
|
|
327
|
+
absoluteIndex: l,
|
|
328
|
+
id: ua(),
|
|
329
|
+
color: t
|
|
330
|
+
};
|
|
331
|
+
})), A = g(() => Math.max(...W.value.filter((a) => !N.value.includes(a.id)).map((a) => a.series.length)));
|
|
332
|
+
function Ea(a) {
|
|
333
|
+
Je.value = a;
|
|
334
|
+
}
|
|
335
|
+
const v = d({
|
|
336
|
+
start: 0,
|
|
337
|
+
end: Math.max(...Ze.value.map((a) => a.series.length))
|
|
338
|
+
}), O = d({ start: 0, end: Math.max(...Ze.value.map((a) => a.series.length)) }), $t = g(() => e.value.style.chart.zoom.preview.enable && (O.value.start !== v.value.start || O.value.end !== v.value.end));
|
|
339
|
+
function At(a, l) {
|
|
340
|
+
O.value[a] = l;
|
|
341
|
+
}
|
|
342
|
+
function Te() {
|
|
343
|
+
const a = A.value;
|
|
344
|
+
let l = Math.max(0, Math.min(v.value.start ?? 0, a - 1)), t = Math.max(l + 1, Math.min(v.value.end ?? a, a));
|
|
345
|
+
(!Number.isFinite(l) || !Number.isFinite(t) || t <= l) && (l = 0, t = a), v.value.start = l, v.value.end = t, O.value.start = l, O.value.end = t, de.value && (de.value.setStartValue(l), de.value.setEndValue(t));
|
|
346
|
+
}
|
|
347
|
+
const me = d(null);
|
|
348
|
+
function Va() {
|
|
349
|
+
return new Promise((a) => requestAnimationFrame(
|
|
350
|
+
() => requestAnimationFrame(() => a())
|
|
351
|
+
));
|
|
352
|
+
}
|
|
353
|
+
ct(() => {
|
|
354
|
+
me.value && cancelAnimationFrame(me.value);
|
|
355
|
+
});
|
|
356
|
+
async function Pt() {
|
|
357
|
+
Oe(), await kl(), me.value && cancelAnimationFrame(me.value), me.value = requestAnimationFrame(async () => {
|
|
358
|
+
await Va(), Oe();
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
const m = g(() => {
|
|
362
|
+
let a;
|
|
363
|
+
return e.value.orientation === "vertical" ? a = u.value.width / (v.value.end - v.value.start) : a = u.value.height / (v.value.end - v.value.start), a <= 0 ? 0 : a;
|
|
364
|
+
}), fe = g(() => ze(W.value.filter((a) => !N.value.includes(a.id))).slice(v.value.start, v.value.end)), le = g(() => e.value.style.chart.zoom.minimap.show ? ze(W.value.filter((a) => !N.value.includes(a.id))) : []), Ua = g(() => e.value.style.chart.zoom.minimap.show ? [{
|
|
365
|
+
name: "",
|
|
366
|
+
series: le.value,
|
|
367
|
+
color: "#000000",
|
|
368
|
+
isVisible: !0
|
|
369
|
+
}] : []), Ba = g(() => ze(W.value.filter((a) => !N.value.includes(a.id)).map((a) => ({
|
|
370
|
+
...a,
|
|
371
|
+
series: a.series.map((l, t) => a.signedSeries[t] === -1 && l >= 0 ? -l : l)
|
|
372
|
+
}))).slice(v.value.start, v.value.end)), $e = g(() => {
|
|
373
|
+
const a = W.value.filter((l) => !N.value.includes(l.id));
|
|
374
|
+
return {
|
|
375
|
+
positive: ze(a.map((l) => ({
|
|
376
|
+
...l,
|
|
377
|
+
series: l.series.slice(v.value.start, v.value.end).map((t) => t >= 0 ? t : 0)
|
|
378
|
+
}))),
|
|
379
|
+
negative: ze(a.map((l) => ({
|
|
380
|
+
...l,
|
|
381
|
+
series: l.series.slice(v.value.start, v.value.end).map((t) => t < 0 ? t : 0)
|
|
382
|
+
})))
|
|
383
|
+
};
|
|
384
|
+
}), B = g(() => {
|
|
385
|
+
const a = e.value.style.chart.grid.scale.scaleMax !== null && !e.value.style.chart.bars.distributed ? e.value.style.chart.grid.scale.scaleMax : Math.max(...$e.value.positive), l = Math.min(...$e.value.negative), t = e.value.style.chart.grid.scale.scaleMin !== null && !e.value.style.chart.bars.distributed ? e.value.style.chart.grid.scale.scaleMin : [-1 / 0, 1 / 0, NaN, void 0, null].includes(l) ? 0 : l, s = !e.value.style.chart.bars.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? ha(t > 0 ? 0 : t, a < 0 ? 0 : a, e.value.style.chart.grid.scale.ticks) : da(t > 0 ? 0 : t, a < 0 ? 0 : a, e.value.style.chart.grid.scale.ticks);
|
|
386
|
+
return s.ticks.map((c) => ({
|
|
387
|
+
zero: u.value.bottom - u.value.height * (Math.abs(s.min) / (s.max + Math.abs(s.min))),
|
|
388
|
+
y: u.value.bottom - u.value.height * ((c + Math.abs(s.min)) / (s.max + Math.abs(s.min))),
|
|
389
|
+
x: u.value.left - 8,
|
|
390
|
+
horizontal_zero: u.value.left + u.value.width * (Math.abs(s.min) / (s.max + Math.abs(s.min))),
|
|
391
|
+
horizontal_x: u.value.left + u.value.width * ((c + Math.abs(s.min)) / (s.max + Math.abs(s.min))),
|
|
392
|
+
horizontal_y: u.value.bottom - 8,
|
|
393
|
+
value: c
|
|
394
|
+
}));
|
|
395
|
+
}), R = g(() => ba({
|
|
396
|
+
values: e.value.style.chart.grid.x.timeLabels.values,
|
|
397
|
+
maxDatapoints: A.value,
|
|
398
|
+
formatter: e.value.style.chart.grid.x.timeLabels.datetimeFormatter,
|
|
399
|
+
start: v.value.start,
|
|
400
|
+
end: v.value.end
|
|
401
|
+
})), pe = g(() => ba({
|
|
402
|
+
values: e.value.style.chart.grid.x.timeLabels.values,
|
|
403
|
+
maxDatapoints: A.value,
|
|
404
|
+
formatter: e.value.style.chart.grid.x.timeLabels.datetimeFormatter,
|
|
405
|
+
start: 0,
|
|
406
|
+
end: A.value
|
|
407
|
+
})), Ha = g(() => {
|
|
408
|
+
const a = e.value.style.chart.grid.x.timeLabels.modulo;
|
|
409
|
+
return R.value.length ? Math.min(a, [...new Set(R.value.map((l) => l.text))].length) : a;
|
|
410
|
+
}), Nt = g(() => {
|
|
411
|
+
const a = e.value.style.chart.grid.x.timeLabels, l = R.value || [], t = pe.value || [], s = v.value.start ?? 0, c = U.value, o = A.value, w = l.map((I) => I?.text ?? ""), C = t.map((I) => I?.text ?? "");
|
|
412
|
+
return $l(
|
|
413
|
+
!!a.showOnlyFirstAndLast,
|
|
414
|
+
!!a.showOnlyAtModulo,
|
|
415
|
+
Math.max(1, Ha.value || 1),
|
|
416
|
+
w,
|
|
417
|
+
C,
|
|
418
|
+
s,
|
|
419
|
+
c,
|
|
420
|
+
o
|
|
421
|
+
);
|
|
422
|
+
}), Rt = g(() => {
|
|
423
|
+
const a = e.value.style.chart.grid.x.timeLabels.datetimeFormatter, l = Bl({
|
|
424
|
+
useUTC: a.useUTC,
|
|
425
|
+
locale: Hl[a.locale] || { months: [], shortMonths: [], days: [], shortDays: [] },
|
|
426
|
+
januaryAsYear: a.januaryAsYear
|
|
427
|
+
});
|
|
428
|
+
return (t, s) => {
|
|
429
|
+
const o = e.value.style.chart.grid.x.timeLabels.values?.[t];
|
|
430
|
+
return o == null ? "" : (l.formatDate(new Date(o), s), l.formatDate(new Date(o), s));
|
|
431
|
+
};
|
|
432
|
+
}), Ot = g(() => (e.value.style.chart.grid.x.timeLabels.values || []).map((l, t) => ({
|
|
433
|
+
text: Rt.value(t, e.value.style.chart.zoom.timeFormat),
|
|
434
|
+
absoluteIndex: t
|
|
435
|
+
}))), at = g(() => (e.value.style.chart.grid.x.timeLabels.values || []).map((l, t) => ({
|
|
436
|
+
text: Rt.value(t, e.value.style.chart.tooltip.timeFormat),
|
|
437
|
+
absoluteIndex: t
|
|
438
|
+
}))), L = g(() => {
|
|
439
|
+
if (!he.value && !be.value) return [];
|
|
440
|
+
let a = Array(A.value).fill(0), l = Array(A.value).fill(0), t = Array(A.value).fill(0), s = Array(A.value).fill(0);
|
|
441
|
+
const c = Math.max(...$e.value.positive) || 0, o = Math.min(...$e.value.negative), w = [-1 / 0, 1 / 0, NaN, void 0, null].includes(o) ? 0 : o, C = !e.value.style.chart.bars.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? ha(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : w > 0 ? 0 : w, e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : c < 0 ? 0 : c, e.value.style.chart.grid.scale.ticks) : da(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : w > 0 ? 0 : w, e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : c < 0 ? 0 : c, e.value.style.chart.grid.scale.ticks), { min: I, max: H } = C, E = H + (I >= 0 ? 0 : Math.abs(I)) || 1, $ = u.value.height, Fe = u.value.width, Qt = B.value[0] ? B.value[0].zero : u.value.bottom, Kt = B.value[0] ? B.value[0].horizontal_zero : u.value.left;
|
|
442
|
+
let jt = Array(le.value.length).fill(0), ea = Array(le.value.length).fill(0);
|
|
443
|
+
return W.value.filter((ie) => !N.value.includes(ie.id)).map((ie) => {
|
|
444
|
+
const q = ie.series.slice(), ta = q.map((h, y) => jt[y]), ol = q.map((h, y) => ea[y]);
|
|
445
|
+
q.forEach((h, y) => {
|
|
446
|
+
(Number(h) || 0) >= 0 ? jt[y] += Number(h) || 0 : ea[y] += Math.abs(Number(h) || 0);
|
|
447
|
+
});
|
|
448
|
+
const Y = ie.series.slice(v.value.start, v.value.end), nl = ie.signedSeries.slice(v.value.start, v.value.end), il = Y.map((h, y) => u.value.left + m.value * y + m.value * e.value.style.chart.bars.gapRatio / 4), De = (le.value || []).filter(Number.isFinite), nt = De.length ? Math.max(...De) : 0, it = De.length ? Math.min(...De) : 0;
|
|
449
|
+
function aa({ minimapH: h }) {
|
|
450
|
+
const S = nt > 0, P = it < 0;
|
|
451
|
+
if (S && P) {
|
|
452
|
+
const V = Math.max(nt, Math.abs(it)) || 1e-9;
|
|
453
|
+
return {
|
|
454
|
+
pxPerUnit: h / 2 / V,
|
|
455
|
+
zero: h / 2
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
if (S) {
|
|
459
|
+
const V = Math.max(1e-9, nt);
|
|
460
|
+
return {
|
|
461
|
+
pxPerUnit: h / V,
|
|
462
|
+
zero: h
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
const z = Math.max(1e-9, Math.abs(it));
|
|
466
|
+
return {
|
|
467
|
+
pxPerUnit: h / z,
|
|
468
|
+
zero: 0
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
const ul = ({ left: h, unitW: y }) => {
|
|
472
|
+
const S = y * (e.value.style.chart.bars.gapRatio / 4);
|
|
473
|
+
return q.map((P, z) => h + y * z + S);
|
|
474
|
+
}, cl = Y.map((h, y) => u.value.top + m.value * y + m.value * e.value.style.chart.bars.gapRatio / 4), vl = Y.map((h, y) => {
|
|
475
|
+
const S = e.value.style.chart.bars.distributed ? (h || 0) / fe.value[y] : (h || 0) / E;
|
|
476
|
+
let P, z;
|
|
477
|
+
return h > 0 ? (z = $ * S, P = Qt - z - a[y], a[y] += z) : (z = $ * S, P = Qt + t[y], t[y] += Math.abs(z)), P;
|
|
478
|
+
}), hl = ({ minimapH: h }) => {
|
|
479
|
+
if (e.value.style.chart.bars.distributed)
|
|
480
|
+
return q.map((z, V) => {
|
|
481
|
+
const ut = Math.abs(Number(z) || 0), la = Math.abs(le.value?.[V] || 0) || 1e-9, fl = (ta[V] + ut) / la;
|
|
482
|
+
return h - fl * h;
|
|
483
|
+
});
|
|
484
|
+
const { pxPerUnit: y, zero: S } = aa({ minimapH: h });
|
|
485
|
+
return q.map((P, z) => {
|
|
486
|
+
const V = Number(P) || 0;
|
|
487
|
+
return V >= 0 ? S - (ta[z] + V) * y : S + ol[z] * y;
|
|
488
|
+
});
|
|
489
|
+
}, dl = Y.map((h, y) => {
|
|
490
|
+
const S = e.value.style.chart.bars.distributed ? (h || 0) / fe.value[y] : (h || 0) / E;
|
|
491
|
+
let P, z;
|
|
492
|
+
return h > 0 ? (z = Fe * S, P = Kt + l[y], l[y] += z) : (z = Fe * S, P = Kt - Math.abs(z) - s[y], s[y] += Math.abs(z)), P;
|
|
493
|
+
}), yl = Y.map((h, y) => {
|
|
494
|
+
const S = e.value.style.chart.bars.distributed ? (h || 0) / fe.value[y] : (h || 0) / E;
|
|
495
|
+
return h > 0 ? $ * S : $ * Math.abs(S);
|
|
496
|
+
}), gl = ({ minimapH: h }) => {
|
|
497
|
+
if (e.value.style.chart.bars.distributed)
|
|
498
|
+
return q.map((P, z) => {
|
|
499
|
+
const V = Math.abs(Number(P) || 0), ut = Math.abs(le.value?.[z] || 0) || 1e-9;
|
|
500
|
+
return V / ut * h;
|
|
501
|
+
});
|
|
502
|
+
const { pxPerUnit: y } = aa({ minimapH: h });
|
|
503
|
+
return q.map((S) => Math.abs(Number(S) || 0) * y);
|
|
504
|
+
}, bl = Y.map((h, y) => {
|
|
505
|
+
const S = e.value.style.chart.bars.distributed ? (h || 0) / fe.value[y] : (h || 0) / E;
|
|
506
|
+
return h > 0 ? Fe * S : Fe * Math.abs(S);
|
|
507
|
+
}), ml = Y.map((h) => Math.abs(h)).reduce((h, y) => h + y, 0);
|
|
508
|
+
return {
|
|
509
|
+
...ie,
|
|
510
|
+
proportions: Y.map((h, y) => e.value.style.chart.bars.distributed ? (h || 0) / fe.value[y] : (h || 0) / ml),
|
|
511
|
+
series: Y,
|
|
512
|
+
signedSeries: nl,
|
|
513
|
+
x: il,
|
|
514
|
+
y: vl,
|
|
515
|
+
height: yl,
|
|
516
|
+
horizontal_width: bl,
|
|
517
|
+
horizontal_y: cl,
|
|
518
|
+
horizontal_x: dl,
|
|
519
|
+
xMinimap: ul,
|
|
520
|
+
yMinimap: hl,
|
|
521
|
+
heightMinimap: gl
|
|
522
|
+
};
|
|
523
|
+
});
|
|
524
|
+
}), It = g(() => Ba.value.map((a, l) => ({
|
|
525
|
+
value: a,
|
|
526
|
+
sign: a >= 0 ? 1 : -1
|
|
527
|
+
})));
|
|
528
|
+
function Ae(a, l, t, s, c) {
|
|
529
|
+
const o = c === -1 && a >= 0 ? -a : a;
|
|
530
|
+
return Ue(
|
|
531
|
+
e.value.style.chart.bars.dataLabels.formatter,
|
|
532
|
+
o,
|
|
533
|
+
re({
|
|
534
|
+
p: e.value.style.chart.bars.dataLabels.prefix,
|
|
535
|
+
v: o,
|
|
536
|
+
s: e.value.style.chart.bars.dataLabels.suffix,
|
|
537
|
+
r: e.value.style.chart.bars.dataLabels.rounding
|
|
538
|
+
}),
|
|
539
|
+
{ datapoint: l, seriesIndex: t, datapointIndex: s }
|
|
540
|
+
);
|
|
541
|
+
}
|
|
542
|
+
function Ft(a, l, t, s) {
|
|
543
|
+
return Ue(
|
|
544
|
+
e.value.style.chart.bars.dataLabels.formatter,
|
|
545
|
+
a,
|
|
546
|
+
re({
|
|
547
|
+
v: isNaN(a) ? 0 : a,
|
|
548
|
+
s: "%",
|
|
549
|
+
r: e.value.style.chart.bars.dataLabels.rounding
|
|
550
|
+
}),
|
|
551
|
+
{ datapoint: l, seriesIndex: t, datapointIndex: s }
|
|
552
|
+
);
|
|
553
|
+
}
|
|
554
|
+
function Dt(a) {
|
|
555
|
+
const l = JSON.parse(JSON.stringify(L.value)).map((t) => ({
|
|
556
|
+
name: t.name,
|
|
557
|
+
value: t.series[a] === 0 ? 0 : t.series[a] || null,
|
|
558
|
+
proportion: t.proportions[a] || null,
|
|
559
|
+
color: t.color,
|
|
560
|
+
id: t.id
|
|
561
|
+
}));
|
|
562
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: a + v.value.start }), ve("selectDatapoint", { datapoint: l, period: R.value[a] });
|
|
563
|
+
}
|
|
564
|
+
function lt(a) {
|
|
565
|
+
return JSON.parse(JSON.stringify(L.value)).map((l) => ({
|
|
566
|
+
name: l.name,
|
|
567
|
+
absoluteIndex: l.absoluteIndex,
|
|
568
|
+
value: l.series[a] === 0 ? 0 : (l.signedSeries[a] === -1 && l.series[a] >= 0 ? -l.series[a] : l.series[a]) || null,
|
|
569
|
+
proportion: l.proportions[a] || null,
|
|
570
|
+
color: l.color,
|
|
571
|
+
id: l.id,
|
|
572
|
+
timeLabel: pe.value[a]
|
|
573
|
+
}));
|
|
574
|
+
}
|
|
575
|
+
function Et(a) {
|
|
576
|
+
if (e.value.events.datapointLeave) {
|
|
577
|
+
const l = lt(a);
|
|
578
|
+
e.value.events.datapointLeave({ datapoint: l, seriesIndex: a + v.value.start });
|
|
579
|
+
}
|
|
580
|
+
He.value = null, U.value = null;
|
|
581
|
+
}
|
|
582
|
+
const Xa = g(() => Array(A.value).fill(0).map((a, l) => lt(l)));
|
|
583
|
+
we(() => x.selectedXIndex, (a) => {
|
|
584
|
+
if ([null, void 0].includes(x.selectedXIndex)) {
|
|
585
|
+
U.value = null;
|
|
586
|
+
return;
|
|
587
|
+
}
|
|
588
|
+
const l = a - v.value.start;
|
|
589
|
+
l < 0 || a >= v.value.end ? U.value = null : U.value = l ?? null;
|
|
590
|
+
}, { immediate: !0 });
|
|
591
|
+
function Vt(a) {
|
|
592
|
+
U.value = a, He.value = !0;
|
|
593
|
+
const l = e.value.style.chart.tooltip.customFormat, t = lt(a);
|
|
594
|
+
rl({ seriesIndex: a, datapoint: t }), e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: a + v.value.start }), Xe.value = {
|
|
595
|
+
datapoint: t,
|
|
596
|
+
seriesIndex: a,
|
|
597
|
+
config: e.value,
|
|
598
|
+
series: L.value
|
|
599
|
+
};
|
|
600
|
+
const s = t.map((c) => Math.abs(c.value)).reduce((c, o) => c + o, 0);
|
|
601
|
+
if (ga(l) && Fl(() => l({
|
|
602
|
+
seriesIndex: a,
|
|
603
|
+
datapoint: t,
|
|
604
|
+
series: L.value,
|
|
605
|
+
config: e.value
|
|
606
|
+
})))
|
|
607
|
+
We.value = l({
|
|
608
|
+
seriesIndex: a,
|
|
609
|
+
datapoint: t,
|
|
610
|
+
series: L.value,
|
|
611
|
+
config: e.value
|
|
612
|
+
});
|
|
613
|
+
else {
|
|
614
|
+
const {
|
|
615
|
+
showValue: c,
|
|
616
|
+
showPercentage: o,
|
|
617
|
+
borderColor: w,
|
|
618
|
+
roundingValue: C,
|
|
619
|
+
roundingPercentage: I
|
|
620
|
+
} = e.value.style.chart.tooltip;
|
|
621
|
+
let H = "";
|
|
622
|
+
(R.value[a] && R.value[a].text || at.value[a] && at.value[a].text && e.value.style.chart.tooltip.showTimeLabel) && (H += `<div style="width:100%;text-align:center;border-bottom:1px solid ${w};padding-bottom:6px;margin-bottom:3px;">${e.value.style.chart.tooltip.useDefaultTimeFormat ? R.value[a]?.text : at.value[a]?.text || pe.value[a]?.text || ""}</div>`);
|
|
623
|
+
const E = [
|
|
624
|
+
c && o ? "(" : "",
|
|
625
|
+
c && o ? ")" : ""
|
|
626
|
+
];
|
|
627
|
+
t.reverse().forEach(($) => {
|
|
628
|
+
H += `
|
|
629
|
+
<div style="display:flex;flex-direction:row;align-items:center;gap:4px">
|
|
630
|
+
<svg viewBox="0 0 60 60" height="14" width="14"><rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="${e.value.style.chart.bars.gradient.show ? `url(#gradient_${$.id})` : $.color}"/>${Ma.pattern ? `<rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="url(#pattern_${D.value}_${$.absoluteIndex})"/>` : ""}</svg>
|
|
631
|
+
${$.name}${c || o ? ":" : ""} ${c ? re({
|
|
632
|
+
p: e.value.style.chart.bars.dataLabels.prefix,
|
|
633
|
+
v: $.value,
|
|
634
|
+
s: e.value.style.chart.bars.dataLabels.suffix,
|
|
635
|
+
r: C
|
|
636
|
+
}) : ""} ${E[0]}${o ? re({
|
|
637
|
+
v: isNaN($.value / s) ? 0 : Math.abs($.value) / s * 100,
|
|
638
|
+
// Negs are absed to show relative proportion to absolute total. It's opinionated.
|
|
639
|
+
s: "%",
|
|
640
|
+
r: I
|
|
641
|
+
}) : ""}${E[1]}
|
|
642
|
+
</div>
|
|
643
|
+
`;
|
|
644
|
+
}), We.value = `<div>${H}</div>`;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
const Wa = g(() => oe.value.width), Ya = g(() => oe.value.height);
|
|
648
|
+
Gl({
|
|
649
|
+
timeLabelsEls: e.value.orientation === "vertical" ? ae : te,
|
|
650
|
+
timeLabels: R,
|
|
651
|
+
slicer: v,
|
|
652
|
+
configRef: e,
|
|
653
|
+
rotationPath: ["style", "chart", "grid", "x", "timeLabels", "rotation"],
|
|
654
|
+
autoRotatePath: ["style", "chart", "grid", "x", "timeLabels", "autoRotate", "enable"],
|
|
655
|
+
isAutoSize: !1,
|
|
656
|
+
width: Wa,
|
|
657
|
+
height: Ya,
|
|
658
|
+
rotation: e.value.style.chart.grid.x.timeLabels.autoRotate.angle
|
|
659
|
+
});
|
|
660
|
+
function Ut(a) {
|
|
661
|
+
ye.value = a, dt.value += 1;
|
|
662
|
+
}
|
|
663
|
+
function Bt() {
|
|
664
|
+
T.value.showTable = !T.value.showTable;
|
|
665
|
+
}
|
|
666
|
+
function Ht() {
|
|
667
|
+
T.value.dataLabels.show = !T.value.dataLabels.show;
|
|
668
|
+
}
|
|
669
|
+
function Xt() {
|
|
670
|
+
T.value.showTooltip = !T.value.showTooltip;
|
|
671
|
+
}
|
|
672
|
+
function Ga() {
|
|
673
|
+
return L.value;
|
|
674
|
+
}
|
|
675
|
+
const Wt = g(() => {
|
|
676
|
+
if (L.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
|
|
677
|
+
const a = L.value.map(({ name: t, color: s }) => ({
|
|
678
|
+
label: t,
|
|
679
|
+
color: s
|
|
680
|
+
})), l = [];
|
|
681
|
+
return R.value.forEach((t) => {
|
|
682
|
+
const s = [e.value.style.chart.grid.x.timeLabels.values[t.absoluteIndex] ? t.text : i + 1];
|
|
683
|
+
W.value.forEach((c) => {
|
|
684
|
+
s.push(Number((c.series[t.absoluteIndex] || 0).toFixed(e.value.table.td.roundingValue)));
|
|
685
|
+
}), l.push(s);
|
|
686
|
+
}), { head: a, body: l };
|
|
687
|
+
});
|
|
688
|
+
function st(a = null) {
|
|
689
|
+
const l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], t = ["", ...Wt.value.head.map((w) => w.label)], s = Wt.value.body, c = l.concat([t]).concat(s), o = Ol(c);
|
|
690
|
+
a ? a(o) : Il({ csvContent: o, title: e.value.style.chart.title.text || "vue-ui-stackbar" });
|
|
691
|
+
}
|
|
692
|
+
const Pe = g(() => {
|
|
693
|
+
const a = [""].concat(L.value.map((c) => c.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');
|
|
694
|
+
let l = [];
|
|
695
|
+
for (let c = 0; c < A.value; c += 1) {
|
|
696
|
+
const o = L.value.map((w) => w.series[c] ?? 0).reduce((w, C) => w + C, 0);
|
|
697
|
+
l.push([e.value.style.chart.grid.x.timeLabels.values.slice(v.value.start, v.value.end)[c] ? R.value[c].text : c + 1].concat(L.value.map((w) => (w.series[c] ?? 0).toFixed(e.value.table.td.roundingValue))).concat((o ?? 0).toFixed(e.value.table.td.roundingValue)));
|
|
698
|
+
}
|
|
699
|
+
const t = {
|
|
700
|
+
th: {
|
|
701
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
702
|
+
color: e.value.table.th.color,
|
|
703
|
+
outline: e.value.table.th.outline
|
|
704
|
+
},
|
|
705
|
+
td: {
|
|
706
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
707
|
+
color: e.value.table.td.color,
|
|
708
|
+
outline: e.value.table.td.outline
|
|
709
|
+
},
|
|
710
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
711
|
+
}, s = [e.value.table.columnNames.period].concat(L.value.map((c) => c.name)).concat(e.value.table.columnNames.total);
|
|
712
|
+
return { head: a, body: l.slice(0, v.value.end - v.value.start), config: t, colNames: s };
|
|
713
|
+
});
|
|
714
|
+
function qa(a, l) {
|
|
715
|
+
if (ve("selectLegend", L.value.find((t) => t.absoluteIndex === a)), N.value.includes(l.id))
|
|
716
|
+
N.value = N.value.filter((t) => t !== l.id);
|
|
717
|
+
else {
|
|
718
|
+
if (N.value.length === W.value.length - 1) return;
|
|
719
|
+
N.value.push(l.id);
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
const rt = g(() => W.value.map((a, l) => ({
|
|
723
|
+
...a,
|
|
724
|
+
shape: "square"
|
|
725
|
+
})).map((a) => ({
|
|
726
|
+
...a,
|
|
727
|
+
opacity: N.value.includes(a.id) ? 0.5 : 1,
|
|
728
|
+
segregate: () => qa(a.absoluteIndex, a),
|
|
729
|
+
isSegregated: N.value.includes(a.id)
|
|
730
|
+
}))), Ja = g(() => ({
|
|
731
|
+
cy: "stackbar-legend",
|
|
732
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
733
|
+
color: e.value.style.chart.legend.color,
|
|
734
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
735
|
+
paddingBottom: 12,
|
|
736
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
737
|
+
})), Ne = d(!1);
|
|
738
|
+
function ot() {
|
|
739
|
+
Ne.value = !Ne.value;
|
|
740
|
+
}
|
|
741
|
+
function Re(a, l) {
|
|
742
|
+
const t = JSON.parse(JSON.stringify(L.value)).map((s) => ({
|
|
743
|
+
name: s.name,
|
|
744
|
+
value: s.series[l] === 0 ? 0 : (s.signedSeries[l] === -1 && s.series[l] >= 0 ? -s.series[l] : s.series[l]) || null,
|
|
745
|
+
proportion: s.proportions[l] || null,
|
|
746
|
+
color: s.color,
|
|
747
|
+
id: s.id
|
|
748
|
+
}));
|
|
749
|
+
ve("selectTimeLabel", {
|
|
750
|
+
datapoint: t,
|
|
751
|
+
absoluteIndex: a.absoluteIndex,
|
|
752
|
+
label: a.text
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
const Za = g(() => Math.max(...L.value.flatMap((a) => a.series)));
|
|
756
|
+
function Yt(a, l) {
|
|
757
|
+
return e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? Lt.value ? l * 100 >= e.value.style.chart.bars.dataLabels.hideUnderPercentage : e.value.style.chart.bars.dataLabels.hideEmptyPercentages ? l > 0 : !0 : Lt.value ? (wt.value && et.value && console.warn("Vue Data UI - VueUiStackbar - You cannot set both dataLabels.hideUnderPercentage and dataLabels.hideUnderValue. Note that dataLabels.hideUnderPercentage takes precedence in this case."), a > Za.value * e.value.style.chart.bars.dataLabels.hideUnderPercentage / 100) : wt.value ? Math.abs(a) >= e.value.style.chart.bars.dataLabels.hideUnderValue : e.value.style.chart.bars.dataLabels.hideEmptyValues ? a !== 0 : !0;
|
|
758
|
+
}
|
|
759
|
+
async function Qa({ scale: a = 2 } = {}) {
|
|
760
|
+
if (!X.value) return;
|
|
761
|
+
const { width: l, height: t } = X.value.getBoundingClientRect(), s = l / t, { imageUri: c, base64: o } = await ql({ domElement: X.value, base64: !0, img: !0, scale: a });
|
|
762
|
+
return {
|
|
763
|
+
imageUri: c,
|
|
764
|
+
base64: o,
|
|
765
|
+
title: e.value.style.chart.title.text,
|
|
766
|
+
width: l,
|
|
767
|
+
height: t,
|
|
768
|
+
aspectRatio: s
|
|
769
|
+
};
|
|
770
|
+
}
|
|
771
|
+
const xe = g(() => {
|
|
772
|
+
const a = e.value.table.useDialog && !e.value.table.show, l = T.value.showTable;
|
|
773
|
+
return {
|
|
774
|
+
component: a ? Ca : ka,
|
|
775
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
776
|
+
props: a ? {
|
|
777
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
778
|
+
color: e.value.table.th.color,
|
|
779
|
+
headerColor: e.value.table.th.color,
|
|
780
|
+
headerBg: e.value.table.th.backgroundColor,
|
|
781
|
+
isFullscreen: ye.value,
|
|
782
|
+
fullscreenParent: X.value,
|
|
783
|
+
forcedWidth: Math.min(800, window.innerWidth * 0.8)
|
|
784
|
+
} : {
|
|
785
|
+
hideDetails: !0,
|
|
786
|
+
config: {
|
|
787
|
+
open: l,
|
|
788
|
+
maxHeight: 1e4,
|
|
789
|
+
body: {
|
|
790
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
791
|
+
color: e.value.style.chart.color
|
|
792
|
+
},
|
|
793
|
+
head: {
|
|
794
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
795
|
+
color: e.value.style.chart.color
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
};
|
|
800
|
+
});
|
|
801
|
+
we(() => T.value.showTable, (a) => {
|
|
802
|
+
e.value.table.show || (a && e.value.table.useDialog && ge.value ? ge.value.open() : "close" in ge.value && ge.value.close());
|
|
803
|
+
});
|
|
804
|
+
function Gt() {
|
|
805
|
+
T.value.showTable = !1, Ye.value && Ye.value.setTableIconState(!1);
|
|
806
|
+
}
|
|
807
|
+
const Ka = g(() => e.value.style.chart.backgroundColor), ja = g(() => e.value.style.chart.legend), el = g(() => e.value.style.chart.title), { exportSvg: tl, getSvg: al } = Xl({
|
|
808
|
+
svg: Ke,
|
|
809
|
+
title: el,
|
|
810
|
+
legend: ja,
|
|
811
|
+
legendItems: rt,
|
|
812
|
+
backgroundColor: Ka
|
|
813
|
+
});
|
|
814
|
+
async function qt({ isCb: a }) {
|
|
815
|
+
if (a) {
|
|
816
|
+
const { blob: l, url: t, text: s, dataUrl: c } = await al();
|
|
817
|
+
e.value.userOptions.callbacks.svg({ blob: l, url: t, text: s, dataUrl: c });
|
|
818
|
+
} else
|
|
819
|
+
tl();
|
|
820
|
+
}
|
|
821
|
+
function Jt(a) {
|
|
822
|
+
const l = A.value;
|
|
823
|
+
return a > l ? l : a < 0 || a < v.value.start ? e.value.style.chart.zoom.startIndex !== null ? v.value.start + 1 : 1 : a;
|
|
824
|
+
}
|
|
825
|
+
const ke = d(!1), Zt = d(!1);
|
|
826
|
+
function Oe() {
|
|
827
|
+
if (!ke.value) {
|
|
828
|
+
ke.value = !0;
|
|
829
|
+
try {
|
|
830
|
+
const { startIndex: a, endIndex: l } = e.value.style.chart.zoom, t = A.value, s = a ?? 0, c = l != null ? Math.min(Jt(l + 1), t) : t;
|
|
831
|
+
Ie.value = !0, v.value.start = s, v.value.end = c, O.value.start = s, O.value.end = c, Te(), Zt.value = !0;
|
|
832
|
+
} finally {
|
|
833
|
+
queueMicrotask(() => {
|
|
834
|
+
Ie.value = !1;
|
|
835
|
+
}), ke.value = !1;
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
const Ie = d(!1);
|
|
840
|
+
function ll(a) {
|
|
841
|
+
ke.value || Ie.value || a !== v.value.start && (v.value.start = a, O.value.start = a, Te());
|
|
842
|
+
}
|
|
843
|
+
function sl(a) {
|
|
844
|
+
if (ke.value || Ie.value) return;
|
|
845
|
+
const l = Jt(a);
|
|
846
|
+
l !== v.value.end && (v.value.end = l, O.value.end = l, Te());
|
|
847
|
+
}
|
|
848
|
+
function rl({ seriesIndex: a, datapoint: l }) {
|
|
849
|
+
const t = v.value.start + a;
|
|
850
|
+
ve("selectX", {
|
|
851
|
+
dataset: l,
|
|
852
|
+
index: t,
|
|
853
|
+
indexLabel: e.value.style.chart.grid.x.timeLabels.values[t]
|
|
854
|
+
});
|
|
855
|
+
}
|
|
856
|
+
return ma({
|
|
857
|
+
getData: Ga,
|
|
858
|
+
getImage: Qa,
|
|
859
|
+
generatePdf: Ct,
|
|
860
|
+
generateCsv: st,
|
|
861
|
+
generateImage: _t,
|
|
862
|
+
generateSvg: qt,
|
|
863
|
+
toggleTable: Bt,
|
|
864
|
+
toggleLabels: Ht,
|
|
865
|
+
toggleTooltip: Xt,
|
|
866
|
+
toggleAnnotator: ot,
|
|
867
|
+
toggleFullscreen: Ut
|
|
868
|
+
}), (a, l) => (r(), n("div", {
|
|
869
|
+
id: `stackbar_${D.value}`,
|
|
870
|
+
ref_key: "stackbarChart",
|
|
871
|
+
ref: X,
|
|
872
|
+
class: ue({ "vue-data-ui-component": !0, "vue-ui-stackbar": !0, "vue-data-ui-wrapper-fullscreen": ye.value }),
|
|
873
|
+
style: se(`background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color};font-family:${e.value.style.fontFamily}; position: relative; ${e.value.responsive ? "height: 100%" : ""}`),
|
|
874
|
+
onMouseenter: Pa,
|
|
875
|
+
onMouseleave: Na
|
|
876
|
+
}, [
|
|
877
|
+
e.value.userOptions.buttons.annotator ? (r(), Z(f(La), {
|
|
878
|
+
key: 0,
|
|
879
|
+
svgRef: f(Ke),
|
|
880
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
881
|
+
color: e.value.style.chart.color,
|
|
882
|
+
active: Ne.value,
|
|
883
|
+
onClose: ot
|
|
884
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : b("", !0),
|
|
885
|
+
_(a.$slots, "userConfig", {}, void 0, !0),
|
|
886
|
+
e.value.style.chart.title.text ? (r(), n("div", {
|
|
887
|
+
key: 1,
|
|
888
|
+
ref_key: "chartTitle",
|
|
889
|
+
ref: yt,
|
|
890
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
891
|
+
}, [
|
|
892
|
+
(r(), Z(Jl, {
|
|
893
|
+
key: `title_${mt.value}`,
|
|
894
|
+
config: {
|
|
895
|
+
title: {
|
|
896
|
+
cy: "stackbar-title",
|
|
897
|
+
...e.value.style.chart.title
|
|
898
|
+
},
|
|
899
|
+
subtitle: {
|
|
900
|
+
cy: "stackbar-subtitle",
|
|
901
|
+
...e.value.style.chart.title.subtitle
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
}, null, 8, ["config"]))
|
|
905
|
+
], 512)) : b("", !0),
|
|
906
|
+
Q("div", {
|
|
907
|
+
id: `legend-top-${D.value}`
|
|
908
|
+
}, null, 8, as),
|
|
909
|
+
e.value.userOptions.show && he.value && (f(kt) || f(Qe)) ? (r(), Z(f(Sa), {
|
|
910
|
+
ref_key: "userOptionsRef",
|
|
911
|
+
ref: Ye,
|
|
912
|
+
key: `user_option_${dt.value}`,
|
|
913
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
914
|
+
color: e.value.style.chart.color,
|
|
915
|
+
isPrinting: f(St),
|
|
916
|
+
isImaging: f(zt),
|
|
917
|
+
uid: D.value,
|
|
918
|
+
hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
|
|
919
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
920
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
921
|
+
hasSvg: e.value.userOptions.buttons.svg,
|
|
922
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
923
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
924
|
+
hasLabel: e.value.userOptions.buttons.labels,
|
|
925
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
926
|
+
isFullscreen: ye.value,
|
|
927
|
+
chartElement: X.value,
|
|
928
|
+
position: e.value.userOptions.position,
|
|
929
|
+
isTooltip: T.value.showTooltip,
|
|
930
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
931
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
932
|
+
isAnnotation: Ne.value,
|
|
933
|
+
callbacks: e.value.userOptions.callbacks,
|
|
934
|
+
printScale: e.value.userOptions.print.scale,
|
|
935
|
+
tableDialog: e.value.table.useDialog,
|
|
936
|
+
onToggleFullscreen: Ut,
|
|
937
|
+
onGeneratePdf: f(Ct),
|
|
938
|
+
onGenerateCsv: st,
|
|
939
|
+
onGenerateImage: f(_t),
|
|
940
|
+
onGenerateSvg: qt,
|
|
941
|
+
onToggleTable: Bt,
|
|
942
|
+
onToggleLabels: Ht,
|
|
943
|
+
onToggleTooltip: Xt,
|
|
944
|
+
onToggleAnnotator: ot,
|
|
945
|
+
style: se({
|
|
946
|
+
visibility: f(kt) ? f(Qe) ? "visible" : "hidden" : "visible"
|
|
947
|
+
})
|
|
948
|
+
}, vt({ _: 2 }, [
|
|
949
|
+
a.$slots.menuIcon ? {
|
|
950
|
+
name: "menuIcon",
|
|
951
|
+
fn: M(({ isOpen: t, color: s }) => [
|
|
952
|
+
_(a.$slots, "menuIcon", K(j({ isOpen: t, color: s })), void 0, !0)
|
|
953
|
+
]),
|
|
954
|
+
key: "0"
|
|
955
|
+
} : void 0,
|
|
956
|
+
a.$slots.optionTooltip ? {
|
|
957
|
+
name: "optionTooltip",
|
|
958
|
+
fn: M(() => [
|
|
959
|
+
_(a.$slots, "optionTooltip", {}, void 0, !0)
|
|
960
|
+
]),
|
|
961
|
+
key: "1"
|
|
962
|
+
} : void 0,
|
|
963
|
+
a.$slots.optionPdf ? {
|
|
964
|
+
name: "optionPdf",
|
|
965
|
+
fn: M(() => [
|
|
966
|
+
_(a.$slots, "optionPdf", {}, void 0, !0)
|
|
967
|
+
]),
|
|
968
|
+
key: "2"
|
|
969
|
+
} : void 0,
|
|
970
|
+
a.$slots.optionCsv ? {
|
|
971
|
+
name: "optionCsv",
|
|
972
|
+
fn: M(() => [
|
|
973
|
+
_(a.$slots, "optionCsv", {}, void 0, !0)
|
|
974
|
+
]),
|
|
975
|
+
key: "3"
|
|
976
|
+
} : void 0,
|
|
977
|
+
a.$slots.optionImg ? {
|
|
978
|
+
name: "optionImg",
|
|
979
|
+
fn: M(() => [
|
|
980
|
+
_(a.$slots, "optionImg", {}, void 0, !0)
|
|
981
|
+
]),
|
|
982
|
+
key: "4"
|
|
983
|
+
} : void 0,
|
|
984
|
+
a.$slots.optionTable ? {
|
|
985
|
+
name: "optionTable",
|
|
986
|
+
fn: M(() => [
|
|
987
|
+
_(a.$slots, "optionTable", {}, void 0, !0)
|
|
988
|
+
]),
|
|
989
|
+
key: "5"
|
|
990
|
+
} : void 0,
|
|
991
|
+
a.$slots.optionLabels ? {
|
|
992
|
+
name: "optionLabels",
|
|
993
|
+
fn: M(() => [
|
|
994
|
+
_(a.$slots, "optionLabels", {}, void 0, !0)
|
|
995
|
+
]),
|
|
996
|
+
key: "6"
|
|
997
|
+
} : void 0,
|
|
998
|
+
a.$slots.optionFullscreen ? {
|
|
999
|
+
name: "optionFullscreen",
|
|
1000
|
+
fn: M(({ toggleFullscreen: t, isFullscreen: s }) => [
|
|
1001
|
+
_(a.$slots, "optionFullscreen", K(j({ toggleFullscreen: t, isFullscreen: s })), void 0, !0)
|
|
1002
|
+
]),
|
|
1003
|
+
key: "7"
|
|
1004
|
+
} : void 0,
|
|
1005
|
+
a.$slots.optionAnnotator ? {
|
|
1006
|
+
name: "optionAnnotator",
|
|
1007
|
+
fn: M(({ toggleAnnotator: t, isAnnotator: s }) => [
|
|
1008
|
+
_(a.$slots, "optionAnnotator", K(j({ toggleAnnotator: t, isAnnotator: s })), void 0, !0)
|
|
1009
|
+
]),
|
|
1010
|
+
key: "8"
|
|
1011
|
+
} : void 0
|
|
1012
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : b("", !0),
|
|
1013
|
+
(r(), n("svg", {
|
|
1014
|
+
ref_key: "svgRef",
|
|
1015
|
+
ref: Ke,
|
|
1016
|
+
xmlns: f(Al),
|
|
1017
|
+
viewBox: `0 0 ${u.value.chartWidth <= 0 ? 10 : u.value.chartWidth} ${u.value.chartHeight <= 0 ? 10 : u.value.chartHeight}`,
|
|
1018
|
+
class: ue({ "vue-data-ui-loading": f(be) }),
|
|
1019
|
+
style: se(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
|
|
1020
|
+
}, [
|
|
1021
|
+
Le(f(za)),
|
|
1022
|
+
a.$slots["chart-background"] ? (r(), n("foreignObject", {
|
|
1023
|
+
key: 0,
|
|
1024
|
+
x: u.value.left,
|
|
1025
|
+
y: u.value.top,
|
|
1026
|
+
width: u.value.width <= 0 ? 10 : u.value.width,
|
|
1027
|
+
height: u.value.height <= 0 ? 10 : u.value.height,
|
|
1028
|
+
style: {
|
|
1029
|
+
pointerEvents: "none"
|
|
1030
|
+
}
|
|
1031
|
+
}, [
|
|
1032
|
+
_(a.$slots, "chart-background", {}, void 0, !0)
|
|
1033
|
+
], 8, ss)) : b("", !0),
|
|
1034
|
+
e.value.style.chart.bars.gradient.show ? (r(), n("defs", rs, [
|
|
1035
|
+
(r(!0), n(p, null, k(L.value, (t, s) => (r(), n("linearGradient", {
|
|
1036
|
+
id: `gradient_${t.id}`,
|
|
1037
|
+
x1: "0%",
|
|
1038
|
+
y1: "0%",
|
|
1039
|
+
x2: "0%",
|
|
1040
|
+
y2: "100%"
|
|
1041
|
+
}, [
|
|
1042
|
+
Q("stop", {
|
|
1043
|
+
offset: "0%",
|
|
1044
|
+
"stop-color": t.color
|
|
1045
|
+
}, null, 8, ns),
|
|
1046
|
+
Q("stop", {
|
|
1047
|
+
offset: "61.8%",
|
|
1048
|
+
"stop-color": f(Pl)(t.color, e.value.style.chart.bars.gradient.intensity / 100)
|
|
1049
|
+
}, null, 8, is),
|
|
1050
|
+
Q("stop", {
|
|
1051
|
+
offset: "100%",
|
|
1052
|
+
"stop-color": t.color
|
|
1053
|
+
}, null, 8, us)
|
|
1054
|
+
], 8, os))), 256))
|
|
1055
|
+
])) : b("", !0),
|
|
1056
|
+
e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "vertical" ? (r(!0), n(p, { key: 2 }, k(B.value, (t, s) => (r(), n("line", {
|
|
1057
|
+
x1: u.value.left,
|
|
1058
|
+
x2: u.value.right,
|
|
1059
|
+
y1: t.y,
|
|
1060
|
+
y2: t.y,
|
|
1061
|
+
stroke: e.value.style.chart.grid.x.linesColor,
|
|
1062
|
+
"stroke-width": e.value.style.chart.grid.x.linesThickness,
|
|
1063
|
+
"stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
|
|
1064
|
+
"stroke-linecap": "round"
|
|
1065
|
+
}, null, 8, cs))), 256)) : b("", !0),
|
|
1066
|
+
e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "horizontal" ? (r(!0), n(p, { key: 3 }, k(v.value.end - v.value.start + 1, (t, s) => (r(), n("line", {
|
|
1067
|
+
x1: u.value.left,
|
|
1068
|
+
x2: u.value.right,
|
|
1069
|
+
y1: u.value.top + m.value * s,
|
|
1070
|
+
y2: u.value.top + m.value * s,
|
|
1071
|
+
stroke: e.value.style.chart.grid.x.linesColor,
|
|
1072
|
+
"stroke-width": e.value.style.chart.grid.x.linesThickness,
|
|
1073
|
+
"stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
|
|
1074
|
+
"stroke-linecap": "round"
|
|
1075
|
+
}, null, 8, vs))), 256)) : b("", !0),
|
|
1076
|
+
e.value.style.chart.grid.y.showVerticalLines && e.value.orientation === "vertical" ? (r(!0), n(p, { key: 4 }, k(v.value.end - v.value.start + 1, (t, s) => (r(), n("line", {
|
|
1077
|
+
x1: u.value.left + m.value * s,
|
|
1078
|
+
x2: u.value.left + m.value * s,
|
|
1079
|
+
y1: u.value.top,
|
|
1080
|
+
y2: u.value.bottom,
|
|
1081
|
+
stroke: e.value.style.chart.grid.y.linesColor,
|
|
1082
|
+
"stroke-width": e.value.style.chart.grid.y.linesThickness,
|
|
1083
|
+
"stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
|
|
1084
|
+
"stroke-linecap": "round"
|
|
1085
|
+
}, null, 8, hs))), 256)) : b("", !0),
|
|
1086
|
+
e.value.style.chart.grid.y.showVerticalLines && e.value.orientation === "horizontal" ? (r(!0), n(p, { key: 5 }, k(B.value, (t, s) => (r(), n("line", {
|
|
1087
|
+
x1: t.horizontal_x,
|
|
1088
|
+
x2: t.horizontal_x,
|
|
1089
|
+
y1: u.value.top,
|
|
1090
|
+
y2: u.value.bottom,
|
|
1091
|
+
stroke: e.value.style.chart.grid.y.linesColor,
|
|
1092
|
+
"stroke-width": e.value.style.chart.grid.y.linesThickness,
|
|
1093
|
+
"stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
|
|
1094
|
+
"stroke-linecap": "round"
|
|
1095
|
+
}, null, 8, ds))), 256)) : b("", !0),
|
|
1096
|
+
(r(!0), n(p, null, k(L.value, (t, s) => (r(), n("g", null, [
|
|
1097
|
+
a.$slots.pattern ? (r(), n("defs", ys, [
|
|
1098
|
+
_(a.$slots, "pattern", Se({ ref_for: !0 }, { seriesIndex: t.absoluteIndex, patternId: `pattern_${D.value}_${t.absoluteIndex}` }), void 0, !0)
|
|
1099
|
+
])) : b("", !0),
|
|
1100
|
+
e.value.orientation === "vertical" ? (r(), n(p, { key: 1 }, [
|
|
1101
|
+
(r(!0), n(p, null, k(t.x, (c, o) => (r(), n("rect", {
|
|
1102
|
+
x: c,
|
|
1103
|
+
y: t.y[o] < 0 ? 0 : t.y[o],
|
|
1104
|
+
height: t.height[o] < 0 ? 1e-4 : t.height[o] || 0,
|
|
1105
|
+
rx: e.value.style.chart.bars.borderRadius > t.height[o] / 2 ? (t.height[o] < 0 ? 0 : t.height[o]) / 2 : e.value.style.chart.bars.borderRadius,
|
|
1106
|
+
width: m.value * (1 - e.value.style.chart.bars.gapRatio / 2),
|
|
1107
|
+
fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${t.id})` : t.color,
|
|
1108
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1109
|
+
"stroke-width": e.value.style.chart.bars.strokeWidth,
|
|
1110
|
+
"stroke-linecap": "round",
|
|
1111
|
+
"stroke-linejoin": "round",
|
|
1112
|
+
class: ue({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": ee.value })
|
|
1113
|
+
}, null, 10, gs))), 256)),
|
|
1114
|
+
a.$slots.pattern ? (r(), n("g", bs, [
|
|
1115
|
+
(r(!0), n(p, null, k(t.x, (c, o) => (r(), n("rect", {
|
|
1116
|
+
x: c,
|
|
1117
|
+
y: t.y[o] < 0 ? 0 : t.y[o],
|
|
1118
|
+
height: t.height[o] < 0 ? 1e-4 : t.height[o] || 0,
|
|
1119
|
+
rx: e.value.style.chart.bars.borderRadius > t.height[o] / 2 ? (t.height[o] < 0 ? 0 : t.height[o]) / 2 : e.value.style.chart.bars.borderRadius,
|
|
1120
|
+
width: m.value * (1 - e.value.style.chart.bars.gapRatio / 2),
|
|
1121
|
+
fill: `url(#pattern_${D.value}_${t.absoluteIndex})`,
|
|
1122
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1123
|
+
"stroke-width": e.value.style.chart.bars.strokeWidth,
|
|
1124
|
+
"stroke-linecap": "round",
|
|
1125
|
+
"stroke-linejoin": "round",
|
|
1126
|
+
class: ue({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": ee.value })
|
|
1127
|
+
}, null, 10, ms))), 256))
|
|
1128
|
+
])) : b("", !0)
|
|
1129
|
+
], 64)) : (r(), n(p, { key: 2 }, [
|
|
1130
|
+
(r(!0), n(p, null, k(t.horizontal_x, (c, o) => (r(), n("rect", {
|
|
1131
|
+
x: f(Ve)(c, u.value.left),
|
|
1132
|
+
y: t.horizontal_y[o] < 0 ? 0 : t.horizontal_y[o],
|
|
1133
|
+
width: f(Ve)(t.horizontal_width[o] < 0 ? 1e-4 : t.horizontal_width[o]),
|
|
1134
|
+
rx: e.value.style.chart.bars.borderRadius > t.height[o] / 2 ? (t.height[o] < 0 ? 0 : t.height[o]) / 2 : e.value.style.chart.bars.borderRadius,
|
|
1135
|
+
height: m.value * (1 - e.value.style.chart.bars.gapRatio / 2),
|
|
1136
|
+
fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${t.id})` : t.color,
|
|
1137
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1138
|
+
"stroke-width": e.value.style.chart.bars.strokeWidth,
|
|
1139
|
+
"stroke-linecap": "round",
|
|
1140
|
+
"stroke-linejoin": "round",
|
|
1141
|
+
class: ue({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": ee.value })
|
|
1142
|
+
}, null, 10, fs))), 256)),
|
|
1143
|
+
a.$slots.pattern ? (r(), n("g", ps, [
|
|
1144
|
+
(r(!0), n(p, null, k(t.horizontal_x, (c, o) => (r(), n("rect", {
|
|
1145
|
+
x: f(Ve)(c, u.value.left),
|
|
1146
|
+
y: t.horizontal_y[o] < 0 ? 0 : t.horizontal_y[o],
|
|
1147
|
+
width: f(Ve)(t.horizontal_width[o] < 0 ? 1e-4 : t.horizontal_width[o]),
|
|
1148
|
+
rx: e.value.style.chart.bars.borderRadius > t.height[o] / 2 ? (t.height[o] < 0 ? 0 : t.height[o]) / 2 : e.value.style.chart.bars.borderRadius,
|
|
1149
|
+
height: m.value * (1 - e.value.style.chart.bars.gapRatio / 2),
|
|
1150
|
+
fill: `url(#pattern_${D.value}_${t.absoluteIndex})`,
|
|
1151
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1152
|
+
"stroke-width": e.value.style.chart.bars.strokeWidth,
|
|
1153
|
+
"stroke-linecap": "round",
|
|
1154
|
+
"stroke-linejoin": "round",
|
|
1155
|
+
class: ue({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": ee.value })
|
|
1156
|
+
}, null, 10, xs))), 256))
|
|
1157
|
+
])) : b("", !0)
|
|
1158
|
+
], 64))
|
|
1159
|
+
]))), 256)),
|
|
1160
|
+
e.value.style.chart.grid.x.showAxis ? (r(), n("line", {
|
|
1161
|
+
key: 6,
|
|
1162
|
+
x1: u.value.left,
|
|
1163
|
+
x2: u.value.right,
|
|
1164
|
+
y1: u.value.bottom,
|
|
1165
|
+
y2: u.value.bottom,
|
|
1166
|
+
stroke: e.value.style.chart.grid.x.axisColor,
|
|
1167
|
+
"stroke-width": e.value.style.chart.grid.x.axisThickness,
|
|
1168
|
+
"stroke-linecap": "round",
|
|
1169
|
+
"stroke-linejoin": "round"
|
|
1170
|
+
}, null, 8, ks)) : b("", !0),
|
|
1171
|
+
e.value.style.chart.grid.y.showAxis && !e.value.style.chart.bars.distributed ? (r(), n("line", {
|
|
1172
|
+
key: 7,
|
|
1173
|
+
x1: u.value.left,
|
|
1174
|
+
x2: u.value.left,
|
|
1175
|
+
y1: u.value.top,
|
|
1176
|
+
y2: u.value.bottom,
|
|
1177
|
+
stroke: e.value.style.chart.grid.y.axisColor,
|
|
1178
|
+
"stroke-width": e.value.style.chart.grid.y.axisThickness,
|
|
1179
|
+
"stroke-linecap": "round",
|
|
1180
|
+
"stroke-linejoin": "round"
|
|
1181
|
+
}, null, 8, ws)) : b("", !0),
|
|
1182
|
+
e.value.style.chart.grid.x.axisName.show && e.value.style.chart.grid.x.axisName.text ? (r(), n("text", {
|
|
1183
|
+
key: 8,
|
|
1184
|
+
ref_key: "xAxisLabel",
|
|
1185
|
+
ref: Ge,
|
|
1186
|
+
x: u.value.left + u.value.width / 2,
|
|
1187
|
+
y: u.value.chartHeight - 3,
|
|
1188
|
+
"font-size": e.value.style.chart.grid.x.axisName.fontSize,
|
|
1189
|
+
fill: e.value.style.chart.grid.x.axisName.color,
|
|
1190
|
+
"font-weight": e.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
|
|
1191
|
+
"text-anchor": "middle"
|
|
1192
|
+
}, F(e.value.style.chart.grid.x.axisName.text), 9, Ls)) : b("", !0),
|
|
1193
|
+
e.value.style.chart.grid.y.axisName.show && e.value.style.chart.grid.y.axisName.text ? (r(), n("text", {
|
|
1194
|
+
key: 9,
|
|
1195
|
+
ref_key: "yAxisLabel",
|
|
1196
|
+
ref: qe,
|
|
1197
|
+
transform: `translate(${e.value.style.chart.grid.y.axisName.fontSize}, ${u.value.top + u.value.height / 2}) rotate(-90)`,
|
|
1198
|
+
"font-size": e.value.style.chart.grid.y.axisName.fontSize,
|
|
1199
|
+
fill: e.value.style.chart.grid.y.axisName.color,
|
|
1200
|
+
"font-weight": e.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
|
|
1201
|
+
"text-anchor": "middle"
|
|
1202
|
+
}, F(e.value.style.chart.grid.y.axisName.text), 9, Ss)) : b("", !0),
|
|
1203
|
+
T.value.dataLabels.show && e.value.orientation === "vertical" ? (r(), n(p, { key: 10 }, [
|
|
1204
|
+
(r(!0), n(p, null, k(L.value, (t, s) => (r(), n("g", null, [
|
|
1205
|
+
(r(!0), n(p, null, k(t.x, (c, o) => (r(), n(p, null, [
|
|
1206
|
+
Yt(t.series[o], t.proportions[o]) ? (r(), n("text", {
|
|
1207
|
+
key: 0,
|
|
1208
|
+
x: c + m.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2,
|
|
1209
|
+
y: t.y[o] + t.height[o] / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
|
|
1210
|
+
"font-size": e.value.style.chart.bars.dataLabels.fontSize,
|
|
1211
|
+
fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? f(ya)(t.color) : e.value.style.chart.bars.dataLabels.color,
|
|
1212
|
+
"font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
|
|
1213
|
+
"text-anchor": "middle"
|
|
1214
|
+
}, F(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? Ft(t.proportions[o] * 100, t, s, o) : Ae(t.series[o], t, s, o, t.signedSeries[o])), 9, zs)) : b("", !0)
|
|
1215
|
+
], 64))), 256))
|
|
1216
|
+
]))), 256)),
|
|
1217
|
+
e.value.style.chart.bars.totalValues.show && L.value.length > 1 ? (r(), n("g", {
|
|
1218
|
+
key: 0,
|
|
1219
|
+
ref_key: "sumTop",
|
|
1220
|
+
ref: Aa
|
|
1221
|
+
}, [
|
|
1222
|
+
(r(!0), n(p, null, k(It.value, (t, s) => (r(), n(p, null, [
|
|
1223
|
+
!e.value.style.chart.bars.dataLabels.hideEmptyValues || t.value !== 0 ? (r(), n("text", {
|
|
1224
|
+
key: 0,
|
|
1225
|
+
x: u.value.left + m.value * s + m.value / 2,
|
|
1226
|
+
y: e.value.style.chart.bars.totalValues.fontSize,
|
|
1227
|
+
"text-anchor": "middle",
|
|
1228
|
+
"font-size": e.value.style.chart.bars.totalValues.fontSize,
|
|
1229
|
+
"font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
|
|
1230
|
+
fill: e.value.style.chart.bars.totalValues.color
|
|
1231
|
+
}, F(Ae(t.value, t, s, t.sign)), 9, Cs)) : b("", !0)
|
|
1232
|
+
], 64))), 256))
|
|
1233
|
+
], 512)) : b("", !0)
|
|
1234
|
+
], 64)) : b("", !0),
|
|
1235
|
+
T.value.dataLabels.show && e.value.orientation === "horizontal" ? (r(), n(p, { key: 11 }, [
|
|
1236
|
+
(r(!0), n(p, null, k(L.value, (t, s) => (r(), n("g", null, [
|
|
1237
|
+
(r(!0), n(p, null, k(t.horizontal_x, (c, o) => (r(), n(p, null, [
|
|
1238
|
+
Yt(t.series[o], t.proportions[o]) ? (r(), n("text", {
|
|
1239
|
+
key: 0,
|
|
1240
|
+
x: c + (t.horizontal_width[o] < 0 ? 1e-4 : t.horizontal_width[o]) / 2,
|
|
1241
|
+
y: t.horizontal_y[o] + m.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
|
|
1242
|
+
"font-size": e.value.style.chart.bars.dataLabels.fontSize,
|
|
1243
|
+
fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? f(ya)(t.color) : e.value.style.chart.bars.dataLabels.color,
|
|
1244
|
+
"font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
|
|
1245
|
+
"text-anchor": "middle"
|
|
1246
|
+
}, F(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? Ft(t.proportions[o] * 100, t, s, o) : Ae(t.series[o], t, s, o, t.signedSeries[o])), 9, _s)) : b("", !0)
|
|
1247
|
+
], 64))), 256))
|
|
1248
|
+
]))), 256)),
|
|
1249
|
+
e.value.style.chart.bars.totalValues.show && L.value.length > 1 ? (r(), n("g", {
|
|
1250
|
+
key: 0,
|
|
1251
|
+
ref_key: "sumRight",
|
|
1252
|
+
ref: pt
|
|
1253
|
+
}, [
|
|
1254
|
+
(r(!0), n(p, null, k(It.value, (t, s) => (r(), n(p, null, [
|
|
1255
|
+
!e.value.style.chart.bars.dataLabels.hideEmptyValues || t.value !== 0 ? (r(), n("text", {
|
|
1256
|
+
key: 0,
|
|
1257
|
+
x: u.value.right + e.value.style.chart.bars.totalValues.fontSize / 3,
|
|
1258
|
+
y: u.value.top + m.value * s + m.value / 2,
|
|
1259
|
+
"text-anchor": "start",
|
|
1260
|
+
"font-size": e.value.style.chart.bars.totalValues.fontSize,
|
|
1261
|
+
"font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
|
|
1262
|
+
fill: e.value.style.chart.bars.totalValues.color
|
|
1263
|
+
}, F(Ae(t.value, t, s, t.sign)), 9, Ms)) : b("", !0)
|
|
1264
|
+
], 64))), 256))
|
|
1265
|
+
], 512)) : b("", !0)
|
|
1266
|
+
], 64)) : b("", !0),
|
|
1267
|
+
e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "vertical" ? (r(), n("g", {
|
|
1268
|
+
key: 12,
|
|
1269
|
+
ref_key: "scaleLabels",
|
|
1270
|
+
ref: te
|
|
1271
|
+
}, [
|
|
1272
|
+
(r(!0), n(p, null, k(B.value, (t, s) => (r(), n("line", {
|
|
1273
|
+
x1: u.value.left,
|
|
1274
|
+
x2: u.value.left - 6,
|
|
1275
|
+
y1: t.y,
|
|
1276
|
+
y2: t.y,
|
|
1277
|
+
stroke: e.value.style.chart.grid.x.axisColor,
|
|
1278
|
+
"stroke-width": 1
|
|
1279
|
+
}, null, 8, Ts))), 256)),
|
|
1280
|
+
(r(!0), n(p, null, k(B.value, (t, s) => (r(), n("text", {
|
|
1281
|
+
x: t.x,
|
|
1282
|
+
y: t.y + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
|
|
1283
|
+
"font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
|
|
1284
|
+
"font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
|
|
1285
|
+
fill: e.value.style.chart.grid.y.axisLabels.color,
|
|
1286
|
+
"text-anchor": "end"
|
|
1287
|
+
}, F(f(Ue)(
|
|
1288
|
+
e.value.style.chart.grid.y.axisLabels.formatter,
|
|
1289
|
+
t.value,
|
|
1290
|
+
f(re)({
|
|
1291
|
+
p: e.value.style.chart.bars.dataLabels.prefix,
|
|
1292
|
+
v: t.value,
|
|
1293
|
+
s: e.value.style.chart.bars.dataLabels.suffix,
|
|
1294
|
+
r: e.value.style.chart.grid.y.axisLabels.rounding
|
|
1295
|
+
}),
|
|
1296
|
+
{ datapoint: t }
|
|
1297
|
+
)), 9, $s))), 256))
|
|
1298
|
+
], 512)) : b("", !0),
|
|
1299
|
+
e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "horizontal" ? (r(), n("g", {
|
|
1300
|
+
key: 13,
|
|
1301
|
+
ref_key: "scaleLabels",
|
|
1302
|
+
ref: te
|
|
1303
|
+
}, [
|
|
1304
|
+
(r(!0), n(p, null, k(B.value, (t, s) => (r(), n("line", {
|
|
1305
|
+
x1: t.horizontal_x,
|
|
1306
|
+
x2: t.horizontal_x,
|
|
1307
|
+
y1: u.value.bottom,
|
|
1308
|
+
y2: u.value.bottom + 6,
|
|
1309
|
+
stroke: e.value.style.chart.grid.x.axisColor,
|
|
1310
|
+
"stroke-width": 1,
|
|
1311
|
+
"stroke-linecap": "round"
|
|
1312
|
+
}, null, 8, As))), 256)),
|
|
1313
|
+
(r(!0), n(p, null, k(B.value, (t, s) => (r(), n("text", {
|
|
1314
|
+
class: "vue-data-ui-time-label",
|
|
1315
|
+
"font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1316
|
+
"font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
|
|
1317
|
+
fill: e.value.style.chart.grid.y.axisLabels.color,
|
|
1318
|
+
"text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
1319
|
+
transform: `translate(${t.horizontal_x}, ${u.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`
|
|
1320
|
+
}, F(f(Ue)(
|
|
1321
|
+
e.value.style.chart.grid.y.axisLabels.formatter,
|
|
1322
|
+
t.value,
|
|
1323
|
+
f(re)({
|
|
1324
|
+
p: e.value.style.chart.bars.dataLabels.prefix,
|
|
1325
|
+
v: t.value,
|
|
1326
|
+
s: e.value.style.chart.bars.dataLabels.suffix,
|
|
1327
|
+
r: e.value.style.chart.grid.y.axisLabels.rounding
|
|
1328
|
+
}),
|
|
1329
|
+
{ datapoint: t }
|
|
1330
|
+
)), 9, Ps))), 256))
|
|
1331
|
+
], 512)) : b("", !0),
|
|
1332
|
+
e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "vertical" ? (r(), n("g", {
|
|
1333
|
+
key: 14,
|
|
1334
|
+
ref_key: "timeLabelsEls",
|
|
1335
|
+
ref: ae
|
|
1336
|
+
}, [
|
|
1337
|
+
a.$slots["time-label"] ? (r(), n("g", Ns, [
|
|
1338
|
+
(r(!0), n(p, null, k(Nt.value, (t, s) => (r(), n("g", null, [
|
|
1339
|
+
_(a.$slots, "time-label", Se({ ref_for: !0 }, {
|
|
1340
|
+
x: u.value.left + m.value * s + m.value / 2,
|
|
1341
|
+
y: u.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY,
|
|
1342
|
+
fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1343
|
+
fill: e.value.style.chart.grid.x.timeLabels.color,
|
|
1344
|
+
transform: `translate(${u.value.left + m.value * s + m.value / 2}, ${u.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`,
|
|
1345
|
+
absoluteIndex: t.absoluteIndex,
|
|
1346
|
+
content: t.text,
|
|
1347
|
+
textAnchor: e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
1348
|
+
show: !0
|
|
1349
|
+
}), void 0, !0)
|
|
1350
|
+
]))), 256))
|
|
1351
|
+
])) : (r(), n("g", Rs, [
|
|
1352
|
+
(r(!0), n(p, null, k(Nt.value, (t, s) => (r(), n("g", null, [
|
|
1353
|
+
String(t.text).includes(`
|
|
1354
|
+
`) ? (r(), n("text", {
|
|
1355
|
+
key: s + "-multi",
|
|
1356
|
+
"text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
1357
|
+
"font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1358
|
+
fill: e.value.style.chart.grid.x.timeLabels.color,
|
|
1359
|
+
transform: `
|
|
1360
|
+
translate(
|
|
1361
|
+
${u.value.left + m.value * s + m.value / 2},
|
|
1362
|
+
${u.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}
|
|
1363
|
+
),
|
|
1364
|
+
rotate(${e.value.style.chart.grid.x.timeLabels.rotation})
|
|
1365
|
+
`,
|
|
1366
|
+
style: { cursor: "pointer" },
|
|
1367
|
+
innerHTML: f(Nl)({
|
|
1368
|
+
content: String(t.text),
|
|
1369
|
+
fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1370
|
+
fill: e.value.style.chart.grid.x.timeLabels.color,
|
|
1371
|
+
x: 0,
|
|
1372
|
+
y: 0
|
|
1373
|
+
}),
|
|
1374
|
+
onClick: () => Re(t, s)
|
|
1375
|
+
}, null, 8, Is)) : (r(), n("text", {
|
|
1376
|
+
class: "vue-data-ui-time-label",
|
|
1377
|
+
key: s,
|
|
1378
|
+
"text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
1379
|
+
"font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1380
|
+
"font-weight": e.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
|
|
1381
|
+
fill: e.value.style.chart.grid.x.timeLabels.color,
|
|
1382
|
+
transform: `translate(${u.value.left + m.value * s + m.value / 2}, ${u.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`,
|
|
1383
|
+
style: { cursor: "pointer" },
|
|
1384
|
+
onClick: () => Re(t, s)
|
|
1385
|
+
}, F(t.text), 9, Os))
|
|
1386
|
+
]))), 256))
|
|
1387
|
+
]))
|
|
1388
|
+
], 512)) : b("", !0),
|
|
1389
|
+
e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "horizontal" ? (r(), n("g", {
|
|
1390
|
+
key: 15,
|
|
1391
|
+
ref_key: "timeLabelsEls",
|
|
1392
|
+
ref: ae
|
|
1393
|
+
}, [
|
|
1394
|
+
a.$slots["time-label"] ? (r(), n("g", Fs, [
|
|
1395
|
+
(r(!0), n(p, null, k(R.value, (t, s) => (r(), n("g", null, [
|
|
1396
|
+
_(a.$slots, "time-label", Se({ ref_for: !0 }, {
|
|
1397
|
+
x: u.value.left - 8,
|
|
1398
|
+
y: u.value.top + m.value * s + m.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
|
|
1399
|
+
fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1400
|
+
fill: e.value.style.chart.grid.x.timeLabels.color,
|
|
1401
|
+
transform: null,
|
|
1402
|
+
absoluteIndex: t.absoluteIndex,
|
|
1403
|
+
content: t.text,
|
|
1404
|
+
textAnchor: "end",
|
|
1405
|
+
show: !0
|
|
1406
|
+
}), void 0, !0)
|
|
1407
|
+
]))), 256))
|
|
1408
|
+
])) : (r(), n("g", Ds, [
|
|
1409
|
+
(r(!0), n(p, null, k(R.value, (t, s) => (r(), n("g", null, [
|
|
1410
|
+
String(t.text).includes(`
|
|
1411
|
+
`) ? (r(), n("text", {
|
|
1412
|
+
key: 1,
|
|
1413
|
+
"text-anchor": "end",
|
|
1414
|
+
"font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
|
|
1415
|
+
"font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
|
|
1416
|
+
fill: e.value.style.chart.grid.y.axisLabels.color,
|
|
1417
|
+
x: u.value.left - 8,
|
|
1418
|
+
y: u.value.top + m.value * s + m.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
|
|
1419
|
+
style: { cursor: "pointer" },
|
|
1420
|
+
onClick: () => Re(t, s),
|
|
1421
|
+
innerHTML: f(Rl)({
|
|
1422
|
+
content: String(t.text),
|
|
1423
|
+
fontSize: e.value.style.chart.grid.y.axisLabels.fontSize,
|
|
1424
|
+
fill: e.value.style.chart.grid.y.axisLabels.color,
|
|
1425
|
+
x: u.value.left - 8,
|
|
1426
|
+
y: 0
|
|
1427
|
+
})
|
|
1428
|
+
}, null, 8, Vs)) : (r(), n("text", {
|
|
1429
|
+
key: 0,
|
|
1430
|
+
"text-anchor": "end",
|
|
1431
|
+
"font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
|
|
1432
|
+
"font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
|
|
1433
|
+
fill: e.value.style.chart.grid.y.axisLabels.color,
|
|
1434
|
+
x: u.value.left - 8,
|
|
1435
|
+
y: u.value.top + m.value * s + m.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
|
|
1436
|
+
style: {
|
|
1437
|
+
cursor: "pointer"
|
|
1438
|
+
},
|
|
1439
|
+
onClick: () => Re(t, s)
|
|
1440
|
+
}, F(t.text), 9, Es))
|
|
1441
|
+
]))), 256))
|
|
1442
|
+
]))
|
|
1443
|
+
], 512)) : b("", !0),
|
|
1444
|
+
T.value.showTooltip && e.value.orientation === "vertical" ? (r(!0), n(p, { key: 16 }, k(v.value.end - v.value.start, (t, s) => (r(), n("rect", {
|
|
1445
|
+
x: u.value.left + s * m.value,
|
|
1446
|
+
y: u.value.top,
|
|
1447
|
+
width: m.value,
|
|
1448
|
+
height: u.value.height < 0 ? 0 : u.value.height,
|
|
1449
|
+
onClick: () => Dt(s),
|
|
1450
|
+
onMouseenter: () => Vt(s),
|
|
1451
|
+
onMouseleave: () => Et(s),
|
|
1452
|
+
fill: s === U.value || s === Je.value ? e.value.style.chart.highlighter.color : "transparent",
|
|
1453
|
+
style: se({ opacity: e.value.style.chart.highlighter.opacity / 100 })
|
|
1454
|
+
}, null, 44, Us))), 256)) : b("", !0),
|
|
1455
|
+
T.value.showTooltip && e.value.orientation === "horizontal" ? (r(!0), n(p, { key: 17 }, k(v.value.end - v.value.start, (t, s) => (r(), n("rect", {
|
|
1456
|
+
x: u.value.left,
|
|
1457
|
+
y: u.value.top + s * m.value,
|
|
1458
|
+
width: u.value.width < 0 ? 0 : u.value.width,
|
|
1459
|
+
height: m.value,
|
|
1460
|
+
onClick: () => Dt(s),
|
|
1461
|
+
onMouseenter: () => Vt(s),
|
|
1462
|
+
onMouseleave: () => Et(s),
|
|
1463
|
+
fill: s === U.value || s === Je.value ? e.value.style.chart.highlighter.color : "transparent",
|
|
1464
|
+
style: se({ opacity: e.value.style.chart.highlighter.opacity / 100 })
|
|
1465
|
+
}, null, 44, Bs))), 256)) : b("", !0),
|
|
1466
|
+
$t.value ? (r(), n("rect", Se({ key: 18 }, Da.value, {
|
|
1467
|
+
"data-start": v.value.start,
|
|
1468
|
+
"data-end": v.value.end
|
|
1469
|
+
}), null, 16, Hs)) : b("", !0),
|
|
1470
|
+
_(a.$slots, "svg", K(j({ ...u.value })), void 0, !0)
|
|
1471
|
+
], 14, ls)),
|
|
1472
|
+
a.$slots.watermark ? (r(), n("div", Xs, [
|
|
1473
|
+
_(a.$slots, "watermark", K(j({ isPrinting: f(St) || f(zt) })), void 0, !0)
|
|
1474
|
+
])) : b("", !0),
|
|
1475
|
+
e.value.style.chart.zoom.show && A.value > 6 && he.value && Zt.value ? (r(), Z(jl, {
|
|
1476
|
+
key: 4,
|
|
1477
|
+
ref_key: "chartSlicer",
|
|
1478
|
+
ref: de,
|
|
1479
|
+
allMinimaps: Ua.value,
|
|
1480
|
+
background: e.value.style.chart.zoom.color,
|
|
1481
|
+
borderColor: e.value.style.chart.backgroundColor,
|
|
1482
|
+
customFormat: e.value.style.chart.zoom.customFormat,
|
|
1483
|
+
cutNullValues: !1,
|
|
1484
|
+
enableRangeHandles: e.value.style.chart.zoom.enableRangeHandles,
|
|
1485
|
+
enableSelectionDrag: e.value.style.chart.zoom.enableSelectionDrag,
|
|
1486
|
+
end: v.value.end,
|
|
1487
|
+
focusOnDrag: e.value.style.chart.zoom.focusOnDrag,
|
|
1488
|
+
focusRangeRatio: e.value.style.chart.zoom.focusRangeRatio,
|
|
1489
|
+
fontSize: e.value.style.chart.zoom.fontSize,
|
|
1490
|
+
immediate: !e.value.style.chart.zoom.preview.enable,
|
|
1491
|
+
inputColor: e.value.style.chart.zoom.color,
|
|
1492
|
+
isPreview: $t.value,
|
|
1493
|
+
labelLeft: e.value.style.chart.grid.x.timeLabels.values[v.value.start] ? R.value[0].text : "",
|
|
1494
|
+
labelRight: e.value.style.chart.grid.x.timeLabels.values[v.value.end - 1] ? R.value.at(-1).text : "",
|
|
1495
|
+
max: Math.max(...Be.dataset.map((t) => t.series.length)),
|
|
1496
|
+
min: 0,
|
|
1497
|
+
minimap: le.value,
|
|
1498
|
+
minimapCompact: e.value.style.chart.zoom.minimap.compact,
|
|
1499
|
+
minimapFrameColor: e.value.style.chart.zoom.minimap.frameColor,
|
|
1500
|
+
minimapIndicatorColor: e.value.style.chart.zoom.minimap.indicatorColor,
|
|
1501
|
+
minimapMerged: !1,
|
|
1502
|
+
minimapSelectedColor: e.value.style.chart.zoom.minimap.selectedColor,
|
|
1503
|
+
minimapSelectedColorOpacity: e.value.style.chart.zoom.minimap.selectedColorOpacity,
|
|
1504
|
+
minimapSelectedIndex: U.value,
|
|
1505
|
+
minimapSelectionRadius: 1,
|
|
1506
|
+
preciseLabels: Ot.value.length ? Ot.value : pe.value,
|
|
1507
|
+
refreshEndPoint: e.value.style.chart.zoom.endIndex !== null ? e.value.style.chart.zoom.endIndex + 1 : Math.max(...Be.dataset.map((t) => t.series.length)),
|
|
1508
|
+
refreshStartPoint: e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex : 0,
|
|
1509
|
+
selectColor: e.value.style.chart.zoom.highlightColor,
|
|
1510
|
+
selectedSeries: Xa.value,
|
|
1511
|
+
smoothMinimap: !1,
|
|
1512
|
+
start: v.value.start,
|
|
1513
|
+
textColor: e.value.style.chart.color,
|
|
1514
|
+
timeLabels: pe.value,
|
|
1515
|
+
usePreciseLabels: e.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !e.value.style.chart.zoom.useDefaultFormat,
|
|
1516
|
+
valueEnd: v.value.end,
|
|
1517
|
+
valueStart: v.value.start,
|
|
1518
|
+
verticalHandles: e.value.style.chart.zoom.minimap.verticalHandles,
|
|
1519
|
+
"onUpdate:end": sl,
|
|
1520
|
+
"onUpdate:start": ll,
|
|
1521
|
+
onTrapMouse: Ea,
|
|
1522
|
+
onReset: Pt,
|
|
1523
|
+
onFutureEnd: l[0] || (l[0] = (t) => At("end", t)),
|
|
1524
|
+
onFutureStart: l[1] || (l[1] = (t) => At("start", t))
|
|
1525
|
+
}, {
|
|
1526
|
+
"reset-action": M(({ reset: t }) => [
|
|
1527
|
+
_(a.$slots, "reset-action", K(j({ reset: t })), void 0, !0)
|
|
1528
|
+
]),
|
|
1529
|
+
slotMap: M(({ width: t, height: s, unitW: c }) => [
|
|
1530
|
+
(r(!0), n(p, null, k(L.value, (o) => (r(), n("g", {
|
|
1531
|
+
key: o.id
|
|
1532
|
+
}, [
|
|
1533
|
+
(r(!0), n(p, null, k(o.xMinimap({ left: 0, unitW: c }), (w, C) => (r(), n("rect", {
|
|
1534
|
+
key: C,
|
|
1535
|
+
x: C === 0 ? w - c * (e.value.style.chart.bars.gapRatio / 4) : w - c / 2,
|
|
1536
|
+
y: Math.max(0, Math.min(s, o.yMinimap({ minimapH: s })[C])),
|
|
1537
|
+
height: o.heightMinimap({ minimapH: s })[C],
|
|
1538
|
+
width: [0, A.value - 1].includes(C) ? c * (1 - e.value.style.chart.bars.gapRatio / 2) / 2 : c * (1 - e.value.style.chart.bars.gapRatio / 2),
|
|
1539
|
+
fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${o.id})` : o.color,
|
|
1540
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1541
|
+
"stroke-width": 0.5,
|
|
1542
|
+
rx: "0",
|
|
1543
|
+
"stroke-linecap": "round",
|
|
1544
|
+
"stroke-linejoin": "round",
|
|
1545
|
+
style: se({
|
|
1546
|
+
opacity: C >= O.value.start && C <= O.value.end ? 1 : 0.62
|
|
1547
|
+
})
|
|
1548
|
+
}, null, 12, Ws))), 128))
|
|
1549
|
+
]))), 128))
|
|
1550
|
+
]),
|
|
1551
|
+
_: 3
|
|
1552
|
+
}, 8, ["allMinimaps", "background", "borderColor", "customFormat", "enableRangeHandles", "enableSelectionDrag", "end", "focusOnDrag", "focusRangeRatio", "fontSize", "immediate", "inputColor", "isPreview", "labelLeft", "labelRight", "max", "minimap", "minimapCompact", "minimapFrameColor", "minimapIndicatorColor", "minimapSelectedColor", "minimapSelectedColorOpacity", "minimapSelectedIndex", "preciseLabels", "refreshEndPoint", "refreshStartPoint", "selectColor", "selectedSeries", "start", "textColor", "timeLabels", "usePreciseLabels", "valueEnd", "valueStart", "verticalHandles"])) : b("", !0),
|
|
1553
|
+
Le(f(pa), {
|
|
1554
|
+
show: T.value.showTooltip && He.value,
|
|
1555
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
1556
|
+
color: e.value.style.chart.tooltip.color,
|
|
1557
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
1558
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
1559
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
1560
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
1561
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
1562
|
+
position: e.value.style.chart.tooltip.position,
|
|
1563
|
+
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
1564
|
+
parent: X.value,
|
|
1565
|
+
content: We.value,
|
|
1566
|
+
isFullscreen: ye.value,
|
|
1567
|
+
isCustom: f(ga)(e.value.style.chart.tooltip.customFormat),
|
|
1568
|
+
smooth: e.value.style.chart.tooltip.smooth,
|
|
1569
|
+
backdropFilter: e.value.style.chart.tooltip.backdropFilter,
|
|
1570
|
+
smoothForce: e.value.style.chart.tooltip.smoothForce,
|
|
1571
|
+
smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold
|
|
1572
|
+
}, {
|
|
1573
|
+
"tooltip-before": M(() => [
|
|
1574
|
+
_(a.$slots, "tooltip-before", K(j({ ...Xe.value })), void 0, !0)
|
|
1575
|
+
]),
|
|
1576
|
+
"tooltip-after": M(() => [
|
|
1577
|
+
_(a.$slots, "tooltip-after", K(j({ ...Xe.value })), void 0, !0)
|
|
1578
|
+
]),
|
|
1579
|
+
_: 3
|
|
1580
|
+
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
|
|
1581
|
+
Q("div", {
|
|
1582
|
+
id: `legend-bottom-${D.value}`
|
|
1583
|
+
}, null, 8, Ys),
|
|
1584
|
+
ft.value ? (r(), Z(wl, {
|
|
1585
|
+
key: 5,
|
|
1586
|
+
to: e.value.style.chart.legend.position === "top" ? `#legend-top-${D.value}` : `#legend-bottom-${D.value}`
|
|
1587
|
+
}, [
|
|
1588
|
+
Q("div", {
|
|
1589
|
+
ref_key: "chartLegend",
|
|
1590
|
+
ref: gt
|
|
1591
|
+
}, [
|
|
1592
|
+
e.value.style.chart.legend.show ? (r(), Z(Kl, {
|
|
1593
|
+
key: 0,
|
|
1594
|
+
legendSet: rt.value,
|
|
1595
|
+
config: Ja.value,
|
|
1596
|
+
onClickMarker: l[2] || (l[2] = ({ legend: t }) => t.segregate())
|
|
1597
|
+
}, vt({
|
|
1598
|
+
item: M(({ legend: t }) => [
|
|
1599
|
+
f(be) ? b("", !0) : (r(), n("div", {
|
|
1600
|
+
key: 0,
|
|
1601
|
+
onClick: (s) => t.segregate(),
|
|
1602
|
+
style: se(`opacity:${N.value.includes(t.id) ? 0.5 : 1}`)
|
|
1603
|
+
}, F(t.name), 13, Gs))
|
|
1604
|
+
]),
|
|
1605
|
+
_: 2
|
|
1606
|
+
}, [
|
|
1607
|
+
a.$slots.pattern ? {
|
|
1608
|
+
name: "legend-pattern",
|
|
1609
|
+
fn: M(({ legend: t, index: s }) => [
|
|
1610
|
+
Le(Zl, {
|
|
1611
|
+
shape: t.shape,
|
|
1612
|
+
radius: 30,
|
|
1613
|
+
stroke: "none",
|
|
1614
|
+
plot: { x: 30, y: 30 },
|
|
1615
|
+
fill: `url(#pattern_${D.value}_${s})`
|
|
1616
|
+
}, null, 8, ["shape", "fill"])
|
|
1617
|
+
]),
|
|
1618
|
+
key: "0"
|
|
1619
|
+
} : void 0
|
|
1620
|
+
]), 1032, ["legendSet", "config"])) : _(a.$slots, "legend", {
|
|
1621
|
+
key: 1,
|
|
1622
|
+
legend: rt.value
|
|
1623
|
+
}, void 0, !0)
|
|
1624
|
+
], 512)
|
|
1625
|
+
], 8, ["to"])) : b("", !0),
|
|
1626
|
+
a.$slots.source ? (r(), n("div", {
|
|
1627
|
+
key: 6,
|
|
1628
|
+
ref_key: "source",
|
|
1629
|
+
ref: bt,
|
|
1630
|
+
dir: "auto"
|
|
1631
|
+
}, [
|
|
1632
|
+
_(a.$slots, "source", {}, void 0, !0)
|
|
1633
|
+
], 512)) : b("", !0),
|
|
1634
|
+
he.value && e.value.userOptions.buttons.table ? (r(), Z(Ll(xe.value.component), Se({ key: 7 }, xe.value.props, {
|
|
1635
|
+
ref_key: "tableUnit",
|
|
1636
|
+
ref: ge,
|
|
1637
|
+
onClose: Gt
|
|
1638
|
+
}), vt({
|
|
1639
|
+
content: M(() => [
|
|
1640
|
+
Le(f(wa), {
|
|
1641
|
+
colNames: Pe.value.colNames,
|
|
1642
|
+
head: Pe.value.head,
|
|
1643
|
+
body: Pe.value.body,
|
|
1644
|
+
config: Pe.value.config,
|
|
1645
|
+
title: e.value.table.useDialog ? "" : xe.value.title,
|
|
1646
|
+
withCloseButton: !e.value.table.useDialog,
|
|
1647
|
+
onClose: Gt
|
|
1648
|
+
}, {
|
|
1649
|
+
th: M(({ th: t }) => [
|
|
1650
|
+
Q("div", { innerHTML: t }, null, 8, qs)
|
|
1651
|
+
]),
|
|
1652
|
+
td: M(({ td: t }) => [
|
|
1653
|
+
na(F(isNaN(Number(t)) ? t : f(re)({
|
|
1654
|
+
p: e.value.style.chart.bars.dataLabels.prefix,
|
|
1655
|
+
v: t,
|
|
1656
|
+
s: e.value.style.chart.bars.dataLabels.suffix,
|
|
1657
|
+
r: e.value.table.td.roundingValue
|
|
1658
|
+
})), 1)
|
|
1659
|
+
]),
|
|
1660
|
+
_: 1
|
|
1661
|
+
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"])
|
|
1662
|
+
]),
|
|
1663
|
+
_: 2
|
|
1664
|
+
}, [
|
|
1665
|
+
e.value.table.useDialog ? {
|
|
1666
|
+
name: "title",
|
|
1667
|
+
fn: M(() => [
|
|
1668
|
+
na(F(xe.value.title), 1)
|
|
1669
|
+
]),
|
|
1670
|
+
key: "0"
|
|
1671
|
+
} : void 0,
|
|
1672
|
+
e.value.table.useDialog ? {
|
|
1673
|
+
name: "actions",
|
|
1674
|
+
fn: M(() => [
|
|
1675
|
+
Q("button", {
|
|
1676
|
+
tabindex: "0",
|
|
1677
|
+
class: "vue-ui-user-options-button",
|
|
1678
|
+
onClick: l[3] || (l[3] = (t) => st(e.value.userOptions.callbacks.csv))
|
|
1679
|
+
}, [
|
|
1680
|
+
Le(f(xa), {
|
|
1681
|
+
name: "excel",
|
|
1682
|
+
stroke: xe.value.props.color
|
|
1683
|
+
}, null, 8, ["stroke"])
|
|
1684
|
+
])
|
|
1685
|
+
]),
|
|
1686
|
+
key: "1"
|
|
1687
|
+
} : void 0
|
|
1688
|
+
]), 1040)) : b("", !0),
|
|
1689
|
+
f(be) ? (r(), Z(Ul, { key: 8 })) : b("", !0)
|
|
1690
|
+
], 46, ts));
|
|
1691
|
+
}
|
|
1692
|
+
}, gr = /* @__PURE__ */ es(Js, [["__scopeId", "data-v-587f99fc"]]);
|
|
1693
|
+
export {
|
|
1694
|
+
gr as default
|
|
1695
|
+
};
|