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