vue-data-ui 2.12.3 → 2.12.5
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-7DZD153U.js → Arrow-CD7YT-M0.js} +1 -1
- package/dist/BaseDraggableDialog-BjFEob7i.js +186 -0
- package/dist/{BaseIcon-4Tt-jDsF.js → BaseIcon-CgSWwnK7.js} +1 -1
- package/dist/{ColorPicker-D9cQ_1h3.js → ColorPicker-w8R8Tqdv.js} +3 -3
- package/dist/{DataTable-CXRbXtrU.js → DataTable-CicthvOV.js} +2 -2
- package/dist/{Legend-CMVT8Hmn.js → Legend-0UY0Mmli.js} +4 -4
- package/dist/{PackageVersion-DrcIKw3H.js → PackageVersion-Cw2caN1c.js} +1 -1
- package/dist/{PenAndPaper-B52M1Af-.js → PenAndPaper-DLsvRwoD.js} +3 -3
- package/dist/{Shape-DsC3hyrC.js → Shape-DICeBEtN.js} +1 -1
- package/dist/{Slicer-9d1_C4bi.js → Slicer-D1nsbsWE.js} +2 -2
- package/dist/{Title-9qKNVCMA.js → Title-xO1jFsSw.js} +1 -1
- package/dist/{Tooltip-n2JxyMqg.js → Tooltip-LKe8L-Mg.js} +1 -1
- package/dist/{dom-to-png-mBFxJrIS.js → dom-to-png-CS4NRYd_.js} +1 -1
- package/dist/{img-DrpWNEaa.js → img-CsXjm5I4.js} +1 -1
- package/dist/{index-CK9QG5R4.js → index-vjCxtaM0.js} +441 -393
- package/dist/{pdf-BalkhgZX.js → pdf-DHexTTpK.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +12 -0
- package/dist/types/vue-data-ui.d.ts +12 -0
- package/dist/{useNestedProp-X5zYwXdP.js → useNestedProp-Du1hnYFA.js} +1 -1
- package/dist/{usePrinter-BZsCVIwN.js → usePrinter-CcgJXHIK.js} +3 -3
- package/dist/{vue-data-ui-65FSOU9n.js → vue-data-ui-BOrA3Tc9.js} +63 -63
- package/dist/vue-data-ui.js +23 -23
- package/dist/{vue-ui-3d-bar-CaLDkBVj.js → vue-ui-3d-bar-Z8yAd4bw.js} +9 -9
- package/dist/{vue-ui-accordion-BA3mkouQ.js → vue-ui-accordion-CAN430Oy.js} +3 -3
- package/dist/{vue-ui-age-pyramid-DdlGpZy9.js → vue-ui-age-pyramid-C6PZU9Ez.js} +10 -10
- package/dist/{vue-ui-annotator-CKvRES98.js → vue-ui-annotator-CqoDLx3t.js} +2 -2
- package/dist/{vue-ui-bullet-CdcJXA6l.js → vue-ui-bullet-DZC3aY3d.js} +8 -8
- package/dist/{vue-ui-candlestick-CkllTOUY.js → vue-ui-candlestick-B5mq_lgW.js} +11 -11
- package/dist/{vue-ui-carousel-table-D3vCB81N.js → vue-ui-carousel-table-CBwerU49.js} +4 -4
- package/dist/{vue-ui-chestnut-BE16kanb.js → vue-ui-chestnut-COyOAY28.js} +8 -8
- package/dist/{vue-ui-chord-BpsjJuE7.js → vue-ui-chord-Cw0F_jHM.js} +12 -12
- package/dist/{vue-ui-circle-pack-C438GSXx.js → vue-ui-circle-pack-BtpaZLYs.js} +9 -9
- package/dist/{vue-ui-cursor-a30lAfyb.js → vue-ui-cursor-CWXqmlVy.js} +2 -2
- package/dist/{vue-ui-dashboard-BkRc89ac.js → vue-ui-dashboard-Ba2tF4md.js} +62 -62
- package/dist/{vue-ui-digits-C3f9FAdw.js → vue-ui-digits-BV7yyUdY.js} +2 -2
- package/dist/{vue-ui-donut-Dwsm3xe8.js → vue-ui-donut-CRdQFQgA.js} +103 -103
- package/dist/vue-ui-donut-evolution-De3-5OgR.js +871 -0
- package/dist/{vue-ui-dumbbell-CIICXHWw.js → vue-ui-dumbbell-SDCcLJIc.js} +10 -10
- package/dist/{vue-ui-flow-Bs4GfLdc.js → vue-ui-flow-CrqGSDNK.js} +24 -24
- package/dist/{vue-ui-funnel-CASIJPoW.js → vue-ui-funnel-CcDOoxp8.js} +9 -9
- package/dist/{vue-ui-galaxy-BoTSH1dz.js → vue-ui-galaxy-jlDp0DRJ.js} +32 -32
- package/dist/{vue-ui-gauge-Cfvwu5jW.js → vue-ui-gauge-8t8rWb1C.js} +19 -19
- package/dist/{vue-ui-gizmo-HB1PEZIT.js → vue-ui-gizmo-CFwdrMYP.js} +3 -3
- package/dist/{vue-ui-heatmap-BXQslQxq.js → vue-ui-heatmap-BT-mIeZp.js} +32 -32
- package/dist/{vue-ui-history-plot-qW_cLH2J.js → vue-ui-history-plot-crLloc7J.js} +11 -11
- package/dist/{vue-ui-kpi-CHTFlQmm.js → vue-ui-kpi-96v4ZIYo.js} +3 -3
- package/dist/{vue-ui-mini-loader-CZFa8WdC.js → vue-ui-mini-loader-rBHBxNIT.js} +2 -2
- package/dist/{vue-ui-molecule-2XWcGAxa.js → vue-ui-molecule-DSr_bHGG.js} +22 -22
- package/dist/{vue-ui-mood-radar-B0wwOAcZ.js → vue-ui-mood-radar-DrVSXIY4.js} +11 -11
- package/dist/{vue-ui-nested-donuts-CD47r6S8.js → vue-ui-nested-donuts-C9Ah9lgv.js} +56 -56
- package/dist/{vue-ui-onion-BrefEoKM.js → vue-ui-onion-DwNPyn4X.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-Ci9k0ZMR.js → vue-ui-parallel-coordinate-plot-tSuK6xWu.js} +36 -36
- package/dist/{vue-ui-quadrant-DRd3t6uQ.js → vue-ui-quadrant-C0Kaoo7K.js} +41 -41
- package/dist/{vue-ui-quick-chart-DVyuMMNZ.js → vue-ui-quick-chart-xMh_Ygct.js} +9 -9
- package/dist/{vue-ui-radar-BMlo5wj_.js → vue-ui-radar-C1jSDQt_.js} +12 -12
- package/dist/{vue-ui-rating-BZLepZbE.js → vue-ui-rating-6Kb7hsKF.js} +11 -11
- package/dist/{vue-ui-relation-circle-BMWf_-ts.js → vue-ui-relation-circle-fh0Hl9m0.js} +7 -7
- package/dist/vue-ui-ridgeline-BBvPVQjC.js +924 -0
- package/dist/{vue-ui-rings-CyN6PZZw.js → vue-ui-rings-B92cXv7f.js} +12 -12
- package/dist/{vue-ui-scatter-Dm24n28E.js → vue-ui-scatter-Bt1aty87.js} +60 -60
- package/dist/{vue-ui-skeleton-CCPLO_mW.js → vue-ui-skeleton-DfOIDTJM.js} +19 -19
- package/dist/{vue-ui-smiley-D5GLTCkV.js → vue-ui-smiley-sVgBnkbx.js} +2 -2
- package/dist/{vue-ui-spark-trend-DM-YH2Vz.js → vue-ui-spark-trend-D6uzJ4Qd.js} +5 -5
- package/dist/{vue-ui-sparkbar-Dp-Vp0Bz.js → vue-ui-sparkbar-D4c2EE7J.js} +4 -4
- package/dist/{vue-ui-sparkgauge-AhGrljqS.js → vue-ui-sparkgauge-DaQ6iz98.js} +9 -9
- package/dist/{vue-ui-sparkhistogram-C_WzbJka.js → vue-ui-sparkhistogram-D_YnmM2T.js} +5 -5
- package/dist/{vue-ui-sparkline-D3TgSaqu.js → vue-ui-sparkline-C2HuTMDz.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-Dx1gnUfv.js → vue-ui-sparkstackbar-DecnmqgJ.js} +5 -5
- package/dist/{vue-ui-stackbar-kPpS5ytk.js → vue-ui-stackbar-D1eNs1j_.js} +13 -13
- package/dist/{vue-ui-strip-plot-DMgQkOFL.js → vue-ui-strip-plot-iPZ8Hhmr.js} +11 -11
- package/dist/{vue-ui-table-DhN_orHh.js → vue-ui-table-BFjE28sw.js} +3 -3
- package/dist/{vue-ui-table-heatmap-CghBmNfB.js → vue-ui-table-heatmap-DipFDu39.js} +4 -4
- package/dist/{vue-ui-table-sparkline-DwZ6dDd7.js → vue-ui-table-sparkline-CGAecOZh.js} +5 -5
- package/dist/{vue-ui-thermometer-Bk2nGclO.js → vue-ui-thermometer-Cx_yr-hs.js} +7 -7
- package/dist/{vue-ui-timer-C7G-xWU0.js → vue-ui-timer-ClVmS8MH.js} +5 -5
- package/dist/{vue-ui-tiremarks-DInEjYlc.js → vue-ui-tiremarks-4Sa3RCSv.js} +7 -7
- package/dist/{vue-ui-treemap-BKvkNCsR.js → vue-ui-treemap-CD5pPg7v.js} +12 -12
- package/dist/{vue-ui-vertical-bar-DiQI4bPT.js → vue-ui-vertical-bar-BHYCnFEN.js} +12 -12
- package/dist/{vue-ui-waffle-z1dbL3gf.js → vue-ui-waffle-DEPUbrOt.js} +27 -27
- package/dist/{vue-ui-wheel-cH-wbQMg.js → vue-ui-wheel-qU0bgJsi.js} +7 -7
- package/dist/{vue-ui-word-cloud-L7hmGLCt.js → vue-ui-word-cloud-z2ZguOdy.js} +49 -49
- package/dist/{vue-ui-world-DNbRBwbT.js → vue-ui-world-DStJ5i0i.js} +11 -11
- package/dist/{vue-ui-xy-CHkLFwbF.js → vue-ui-xy-CEop49z6.js} +16 -16
- package/dist/{vue-ui-xy-canvas-CXZZH9wb.js → vue-ui-xy-canvas-DV0BVdZb.js} +12 -12
- package/package.json +1 -1
- package/dist/vue-ui-donut-evolution-HVTx2TzC.js +0 -948
- package/dist/vue-ui-ridgeline-DoNIDa-r.js +0 -1102
|
@@ -0,0 +1,924 @@
|
|
|
1
|
+
import { computed as g, ref as i, onMounted as bt, onBeforeUnmount as xt, watch as Xe, createElementBlock as n, openBlock as r, unref as c, normalizeStyle as M, normalizeClass as W, createBlock as T, createCommentVNode as h, renderSlot as p, createElementVNode as d, createSlots as Re, withCtx as m, normalizeProps as j, guardReactiveProps as Y, Fragment as f, renderList as $, mergeProps as Ee, toDisplayString as F, createVNode as kt, createTextVNode as He, nextTick as At } from "vue";
|
|
2
|
+
import { u as $t, c as ne, o as Ct, e as ue, g as Ve, b as wt, d as _t, p as q, am as Be, a9 as Mt, T as Ue, U as Tt, V as Pt, X as Ot, G as St, i as J, f as K, t as zt, a as Lt, q as Nt, r as Dt, J as It } from "./index-vjCxtaM0.js";
|
|
3
|
+
import { u as Ft } from "./useUserOptionState-BIvW1Kz7.js";
|
|
4
|
+
import { u as Xt } from "./useChartAccessibility-BWojgys7.js";
|
|
5
|
+
import { u as Rt, U as Et } from "./usePrinter-CcgJXHIK.js";
|
|
6
|
+
import { t as Ht, u as Vt } from "./useResponsive-JZ9xq-JV.js";
|
|
7
|
+
import { u as Ge } from "./useNestedProp-Du1hnYFA.js";
|
|
8
|
+
import Bt from "./vue-ui-accordion-CAN430Oy.js";
|
|
9
|
+
import { B as Ut } from "./BaseDraggableDialog-BjFEob7i.js";
|
|
10
|
+
import { D as Gt } from "./DataTable-CicthvOV.js";
|
|
11
|
+
import { L as Wt } from "./Legend-0UY0Mmli.js";
|
|
12
|
+
import { _ as jt } from "./PenAndPaper-DLsvRwoD.js";
|
|
13
|
+
import { _ as Yt } from "./Shape-DICeBEtN.js";
|
|
14
|
+
import qt from "./vue-ui-skeleton-DfOIDTJM.js";
|
|
15
|
+
import { _ as Jt } from "./Title-xO1jFsSw.js";
|
|
16
|
+
import Kt from "./vue-ui-xy-CEop49z6.js";
|
|
17
|
+
import { _ as Qt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
18
|
+
const Zt = ["id"], el = ["xmlns", "viewBox"], tl = ["id"], ll = ["stop-color"], al = ["stop-color"], ol = ["stop-color"], sl = ["stop-color"], rl = ["id"], nl = ["stop-color"], ul = ["stop-color"], il = ["stop-color"], cl = ["stop-color"], hl = { key: 0 }, vl = ["fill", "d"], dl = ["stroke", "stroke-width", "d"], yl = ["fill", "d"], fl = ["stroke", "stroke-dasharray", "stroke-width", "d"], gl = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], pl = ["cx", "cy", "stroke", "stroke-width", "r", "fill"], ml = ["x", "y", "font-size", "font-weight", "fill", "text-decoration", "onMouseenter", "onClick"], bl = { key: 0 }, xl = ["font-size", "fill", "font-weight", "transform", "text-anchor"], kl = ["x", "y", "width", "height", "onMouseenter", "onClick"], Al = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], $l = ["cx", "cy", "stroke", "stroke-width", "r", "fill"], Cl = ["x", "y", "text-anchor", "font-size", "fill"], wl = {
|
|
19
|
+
key: 5,
|
|
20
|
+
class: "vue-data-ui-watermark"
|
|
21
|
+
}, _l = ["onClick"], Ml = ["innerHTML"], Tl = {
|
|
22
|
+
__name: "vue-ui-ridgeline",
|
|
23
|
+
props: {
|
|
24
|
+
config: {
|
|
25
|
+
type: Object,
|
|
26
|
+
default() {
|
|
27
|
+
return {};
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
dataset: {
|
|
31
|
+
type: Array,
|
|
32
|
+
default() {
|
|
33
|
+
return [];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
emits: ["selectLegend", "selectDatapoint", "selectX"],
|
|
38
|
+
setup(We, { expose: je, emit: Ye }) {
|
|
39
|
+
const { vue_ui_ridgeline: qe } = $t(), x = We, O = g({
|
|
40
|
+
get() {
|
|
41
|
+
return !!x.dataset && x.dataset.length;
|
|
42
|
+
},
|
|
43
|
+
set(l) {
|
|
44
|
+
return l;
|
|
45
|
+
}
|
|
46
|
+
}), Q = Ye, V = i(null), ie = i(null), ce = i(null), B = i(null), he = i(null), ve = i(null), de = i(0), Je = i(0), ye = i(0), C = i(ne()), fe = i(0), Ke = i(0), ge = i(512), v = i(null), N = i(null), Z = i(null), pe = i(0);
|
|
47
|
+
function me() {
|
|
48
|
+
const l = Ge({
|
|
49
|
+
userConfig: x.config,
|
|
50
|
+
defaultConfig: qe
|
|
51
|
+
});
|
|
52
|
+
return l.theme ? {
|
|
53
|
+
...Ge({
|
|
54
|
+
userConfig: Lt.vue_ui_ridgeline[l.theme] || x.config,
|
|
55
|
+
defaultConfig: l
|
|
56
|
+
}),
|
|
57
|
+
customPalette: zt[l.theme] || q
|
|
58
|
+
} : l;
|
|
59
|
+
}
|
|
60
|
+
const e = g({
|
|
61
|
+
get: () => me(),
|
|
62
|
+
set: (l) => l
|
|
63
|
+
}), w = i(Math.min(
|
|
64
|
+
e.value.style.chart.areas.height,
|
|
65
|
+
e.value.style.chart.areas.rowHeight
|
|
66
|
+
)), {
|
|
67
|
+
userOptionsVisible: ee,
|
|
68
|
+
setUserOptionsVisibility: be,
|
|
69
|
+
keepUserOptionState: xe
|
|
70
|
+
} = Ft({ config: e.value }), { svgRef: te } = Xt({ config: e.value.style.chart.title });
|
|
71
|
+
bt(le), xt(() => {
|
|
72
|
+
B.value && B.value.disconnect();
|
|
73
|
+
});
|
|
74
|
+
function le() {
|
|
75
|
+
if (Ct(x.dataset) ? ue({
|
|
76
|
+
componentName: "VueUiRidgeline",
|
|
77
|
+
type: "dataset"
|
|
78
|
+
}) : x.dataset.forEach((l, s) => {
|
|
79
|
+
Ve({
|
|
80
|
+
datasetObject: l,
|
|
81
|
+
requiredAttributes: ["name", "datapoints"]
|
|
82
|
+
}).forEach((t) => {
|
|
83
|
+
O.value = !1, ue({
|
|
84
|
+
componentName: "VueUiRidgeline",
|
|
85
|
+
type: "datasetSerieAttribute",
|
|
86
|
+
property: t,
|
|
87
|
+
index: s
|
|
88
|
+
});
|
|
89
|
+
}), l.datapoints.length && l.datapoints.forEach((t, o) => {
|
|
90
|
+
Ve({
|
|
91
|
+
datasetObject: t,
|
|
92
|
+
requiredAttributes: ["name", "values"]
|
|
93
|
+
}).forEach((a) => {
|
|
94
|
+
O.value = !1, ue({
|
|
95
|
+
componentName: "VueUiRidgeline",
|
|
96
|
+
type: "datasetSerieAttribute",
|
|
97
|
+
property: `datapoint.${a}`,
|
|
98
|
+
index: `${s}-${o}`
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
}), Ke.value = x.dataset.length, w.value = Math.min(
|
|
103
|
+
e.value.style.chart.areas.height,
|
|
104
|
+
e.value.style.chart.areas.rowHeight
|
|
105
|
+
), e.value.responsive) {
|
|
106
|
+
const l = Ht(() => {
|
|
107
|
+
const { width: s, height: t } = Vt({
|
|
108
|
+
chart: V.value,
|
|
109
|
+
title: e.value.style.chart.title.text ? ie.value : null,
|
|
110
|
+
legend: e.value.style.chart.legend.show ? ce.value : null,
|
|
111
|
+
source: he.value,
|
|
112
|
+
noTitle: ve.value,
|
|
113
|
+
padding: e.value.style.chart.padding
|
|
114
|
+
});
|
|
115
|
+
requestAnimationFrame(() => {
|
|
116
|
+
ge.value = s, w.value = t / x.dataset.length, pe.value = t;
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
B.value = new ResizeObserver(l), B.value.observe(V.value.parentNode);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
const { isPrinting: ke, isImaging: Ae, generatePdf: $e, generateImage: Ce } = Rt({
|
|
123
|
+
elementId: `vue-ui-ridgeline_${C.value}`,
|
|
124
|
+
fileName: e.value.style.chart.title.text || "vue-ui-ridgeline",
|
|
125
|
+
options: e.value.userOptions.print
|
|
126
|
+
}), Qe = g(() => e.value.userOptions.show && !e.value.style.chart.title.text), Ze = g(() => wt(e.value.customPalette)), X = i({
|
|
127
|
+
showTable: e.value.table.show
|
|
128
|
+
});
|
|
129
|
+
Xe(() => x.config, (l) => {
|
|
130
|
+
e.value = me(), ee.value = !e.value.userOptions.showOnChartHover, le(), de.value += 1, ye.value += 1, w.value = Math.min(
|
|
131
|
+
e.value.style.chart.areas.height,
|
|
132
|
+
e.value.style.chart.areas.rowHeight
|
|
133
|
+
), X.value.showTable = e.value.table.show;
|
|
134
|
+
}, { deep: !0 }), Xe(() => x.dataset, le, { deep: !0 });
|
|
135
|
+
const ae = g(() => e.value.style.chart.areas.height / e.value.style.chart.areas.rowHeight);
|
|
136
|
+
function we(l) {
|
|
137
|
+
P.value.includes(l) ? P.value = P.value.filter((s) => s !== l) : P.value.push(l), Q("selectLegend", I.value);
|
|
138
|
+
}
|
|
139
|
+
const _ = g(() => O.value ? x.dataset.map((l, s) => ({
|
|
140
|
+
...l,
|
|
141
|
+
labelLen: lt(l.name, e.value.style.chart.yAxis.labels.fontSize),
|
|
142
|
+
uid: ne(),
|
|
143
|
+
datapoints: l.datapoints.map((t, o) => {
|
|
144
|
+
const a = t.color ? _t(t.color) : Ze.value[o] || q[o] || q[o % q.length], u = Be(t.name);
|
|
145
|
+
return {
|
|
146
|
+
...t,
|
|
147
|
+
color: a,
|
|
148
|
+
id: u
|
|
149
|
+
};
|
|
150
|
+
})
|
|
151
|
+
})) : []), _e = g(() => e.value.style.chart.padding.top + w.value * x.dataset.length + w.value * ae.value), k = g(() => ({
|
|
152
|
+
fullHeight: y.value.padding.top + y.value.padding.bottom + y.value.height,
|
|
153
|
+
top: y.value.padding.top,
|
|
154
|
+
left: y.value.padding.left,
|
|
155
|
+
right: y.value.width - y.value.padding.right,
|
|
156
|
+
bottom: y.value.padding.top + y.value.height,
|
|
157
|
+
width: y.value.width - (y.value.padding.left + y.value.padding.right)
|
|
158
|
+
})), y = g(() => {
|
|
159
|
+
const l = e.value.style.chart.padding;
|
|
160
|
+
return {
|
|
161
|
+
width: ge.value,
|
|
162
|
+
height: _e.value,
|
|
163
|
+
padding: l
|
|
164
|
+
};
|
|
165
|
+
}), D = g(() => {
|
|
166
|
+
const l = Math.max(..._.value.map((u) => u.labelLen)), s = Math.max(..._.value.flatMap((u) => u.datapoints.map((A) => A.values.length))), t = y.value.padding.left + l + 16 + e.value.style.chart.yAxis.labels.offsetX, o = (k.value.width - t) / s, a = [];
|
|
167
|
+
for (let u = 0; u < s; u += 1)
|
|
168
|
+
a.push({
|
|
169
|
+
selectorX: t + o * u,
|
|
170
|
+
x: t + o * u - o / 2,
|
|
171
|
+
y: k.value.top,
|
|
172
|
+
label: e.value.style.chart.xAxis.labels.values[u] || "",
|
|
173
|
+
index: u,
|
|
174
|
+
width: o,
|
|
175
|
+
height: _e.value
|
|
176
|
+
});
|
|
177
|
+
return a;
|
|
178
|
+
});
|
|
179
|
+
function et(l) {
|
|
180
|
+
Q("selectX", _.value.map((s) => s.datapoints.map((t) => ({
|
|
181
|
+
dp: t,
|
|
182
|
+
selected: t.values[l.index]
|
|
183
|
+
}))));
|
|
184
|
+
}
|
|
185
|
+
function tt(l, s) {
|
|
186
|
+
return l.length * s / 2 + s;
|
|
187
|
+
}
|
|
188
|
+
function Me(l, s, t) {
|
|
189
|
+
const o = tt(s, t);
|
|
190
|
+
return l + o > k.value.right;
|
|
191
|
+
}
|
|
192
|
+
function lt(l, s, t = "sans-serif") {
|
|
193
|
+
const a = document.createElement("canvas").getContext("2d"), u = typeof s == "number" ? `${s}px` : s;
|
|
194
|
+
return a.font = `${u} ${t}`, a.measureText(l).width;
|
|
195
|
+
}
|
|
196
|
+
const I = g(() => {
|
|
197
|
+
w.value;
|
|
198
|
+
const l = Math.max(..._.value.map((b) => b.labelLen)), s = Math.max(..._.value.flatMap((b) => b.datapoints.map((S) => S.values.length))), t = Math.max(..._.value.flatMap((b) => b.datapoints.flatMap((S) => S.values))), o = Math.min(..._.value.flatMap((b) => b.datapoints.flatMap((S) => S.values))), a = y.value.padding.left + l + 16 + e.value.style.chart.yAxis.labels.offsetX, u = (k.value.width - a) / s, A = Math.abs(Math.min(o, 0)), Le = t + A;
|
|
199
|
+
function Ne(b) {
|
|
200
|
+
return isNaN(b / Le) ? 0 : b / Le;
|
|
201
|
+
}
|
|
202
|
+
return _.value.map((b, S) => {
|
|
203
|
+
const De = k.value.top + w.value * S, z = k.value.top + De + w.value * ae.value * (1 - Ne(A));
|
|
204
|
+
return {
|
|
205
|
+
...b,
|
|
206
|
+
label: {
|
|
207
|
+
x: a - e.value.style.chart.yAxis.labels.fontSize,
|
|
208
|
+
y: z
|
|
209
|
+
},
|
|
210
|
+
datapoints: b.datapoints.map((E) => {
|
|
211
|
+
const L = E.values.map((H, yt) => {
|
|
212
|
+
const ft = isNaN(H) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(H) ? 0 : H || 0, gt = a + u * yt, pt = k.value.top + De + w.value * ae.value * (1 - Ne(ft + A)), mt = H === Math.max(...E.values);
|
|
213
|
+
return {
|
|
214
|
+
x: gt,
|
|
215
|
+
y: pt,
|
|
216
|
+
value: H,
|
|
217
|
+
isMaxPoint: mt,
|
|
218
|
+
zero: z
|
|
219
|
+
};
|
|
220
|
+
}), ct = `${Mt(L, z, !1, !1)}`, ht = `M ${a},${z} ${Ue(L)} ${L.at(-1).x},${z}`, vt = `M ${a},${z} ${L.at(-1).x},${z}`, Ie = `M ${Tt(L)}`, Fe = `M ${Ue(L)}`, dt = Pt(
|
|
221
|
+
e.value.style.chart.areas.smooth ? Ie : Fe
|
|
222
|
+
);
|
|
223
|
+
return {
|
|
224
|
+
...E,
|
|
225
|
+
uid: ne(),
|
|
226
|
+
plots: L,
|
|
227
|
+
smoothPath: ct,
|
|
228
|
+
straightPath: ht,
|
|
229
|
+
zeroPath: vt,
|
|
230
|
+
pathLength: dt,
|
|
231
|
+
smoothPathRidge: Ie,
|
|
232
|
+
straightPathRidge: Fe
|
|
233
|
+
};
|
|
234
|
+
}).filter((E) => !P.value.includes(E.id))
|
|
235
|
+
};
|
|
236
|
+
});
|
|
237
|
+
}), P = i([]);
|
|
238
|
+
function at(l) {
|
|
239
|
+
const s = /* @__PURE__ */ new Map();
|
|
240
|
+
return l.forEach((t) => {
|
|
241
|
+
t.datapoints.forEach((o, a) => {
|
|
242
|
+
const u = Be(o.name);
|
|
243
|
+
s.has(u) || s.set(u, {
|
|
244
|
+
id: u,
|
|
245
|
+
name: o.name,
|
|
246
|
+
color: o.color,
|
|
247
|
+
shape: "circle",
|
|
248
|
+
segregate: () => we(u),
|
|
249
|
+
isSegregated: P.value.includes(u),
|
|
250
|
+
opacity: P.value.includes(u) ? 0.5 : 1
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
}), Array.from(s.values());
|
|
254
|
+
}
|
|
255
|
+
const oe = g(() => at(_.value)), ot = g(() => ({
|
|
256
|
+
cy: "donut-div-legend",
|
|
257
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
258
|
+
color: e.value.style.chart.legend.color,
|
|
259
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
260
|
+
paddingBottom: 12,
|
|
261
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
262
|
+
})), R = i(!1);
|
|
263
|
+
function st(l) {
|
|
264
|
+
R.value = l, fe.value += 1;
|
|
265
|
+
}
|
|
266
|
+
const Te = i({}), Pe = i([]);
|
|
267
|
+
function rt(l) {
|
|
268
|
+
Q("selectDatapoint", l), e.value.style.chart.dialog.show && (Pe.value = l.datapoints.map((s) => ({
|
|
269
|
+
name: s.name,
|
|
270
|
+
color: s.color,
|
|
271
|
+
type: "line",
|
|
272
|
+
useArea: !0,
|
|
273
|
+
smooth: e.value.style.chart.areas.smooth,
|
|
274
|
+
series: s.values
|
|
275
|
+
})), N.value = l, Te.value = It({
|
|
276
|
+
...e.value.style.chart.dialog.xyChart,
|
|
277
|
+
responsive: !0,
|
|
278
|
+
// Overriding
|
|
279
|
+
chart: {
|
|
280
|
+
...e.value.style.chart.dialog.xyChart.chart,
|
|
281
|
+
grid: {
|
|
282
|
+
...e.value.style.chart.dialog.xyChart.chart.grid,
|
|
283
|
+
labels: {
|
|
284
|
+
...e.value.style.chart.dialog.xyChart.chart.grid.labels,
|
|
285
|
+
xAxisLabels: {
|
|
286
|
+
...e.value.style.chart.dialog.xyChart.chart.grid.labels.xAxisLabels,
|
|
287
|
+
values: e.value.style.chart.xAxis.labels.values
|
|
288
|
+
// Overriding
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
tooltip: {
|
|
293
|
+
...e.value.style.chart.dialog.xyChart.chart.tooltip,
|
|
294
|
+
showTimeLabel: e.value.style.chart.xAxis.labels.values.length > 0
|
|
295
|
+
// Overriding
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}), Z.value && Z.value.open());
|
|
299
|
+
}
|
|
300
|
+
const se = i(null);
|
|
301
|
+
function nt(l) {
|
|
302
|
+
se.value = l;
|
|
303
|
+
}
|
|
304
|
+
function ut() {
|
|
305
|
+
se.value = null;
|
|
306
|
+
}
|
|
307
|
+
const U = i(!1);
|
|
308
|
+
function re() {
|
|
309
|
+
U.value = !U.value;
|
|
310
|
+
}
|
|
311
|
+
function Oe() {
|
|
312
|
+
X.value.showTable = !X.value.showTable;
|
|
313
|
+
}
|
|
314
|
+
const Se = g(() => ({ body: I.value.flatMap((t) => t.datapoints.flatMap((o) => ({
|
|
315
|
+
...o,
|
|
316
|
+
rowName: `${t.name}: ${o.name}`
|
|
317
|
+
}))).map((t) => [
|
|
318
|
+
{
|
|
319
|
+
name: t.rowName,
|
|
320
|
+
color: t.color
|
|
321
|
+
},
|
|
322
|
+
...t.values
|
|
323
|
+
]) })), G = g(() => {
|
|
324
|
+
const l = [
|
|
325
|
+
e.value.table.columnNames.series,
|
|
326
|
+
...e.value.style.chart.xAxis.labels.values
|
|
327
|
+
], s = {
|
|
328
|
+
th: {
|
|
329
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
330
|
+
color: e.value.table.th.color,
|
|
331
|
+
outline: e.value.table.th.outline
|
|
332
|
+
},
|
|
333
|
+
td: {
|
|
334
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
335
|
+
color: e.value.table.td.color,
|
|
336
|
+
outline: e.value.table.td.outline
|
|
337
|
+
},
|
|
338
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
339
|
+
};
|
|
340
|
+
return {
|
|
341
|
+
colNames: [
|
|
342
|
+
e.value.table.columnNames.series,
|
|
343
|
+
...e.value.style.chart.xAxis.labels.values
|
|
344
|
+
],
|
|
345
|
+
head: l,
|
|
346
|
+
body: Se.value.body,
|
|
347
|
+
config: s
|
|
348
|
+
};
|
|
349
|
+
});
|
|
350
|
+
function ze() {
|
|
351
|
+
At(() => {
|
|
352
|
+
const l = [
|
|
353
|
+
[e.value.table.columnNames.series, ...e.value.style.chart.xAxis.labels.values.map((o) => [o])],
|
|
354
|
+
...Se.value.body.map((o, a) => [o[0].name, ...o.slice(1)])
|
|
355
|
+
], s = [
|
|
356
|
+
[e.value.style.chart.title.text],
|
|
357
|
+
[e.value.style.chart.title.subtitle.text]
|
|
358
|
+
].concat(l), t = Nt(s);
|
|
359
|
+
Dt({
|
|
360
|
+
csvContent: t,
|
|
361
|
+
title: e.value.style.chart.title.text || "vue-ui-ridgeline"
|
|
362
|
+
});
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
function it() {
|
|
366
|
+
return I.value;
|
|
367
|
+
}
|
|
368
|
+
return je({
|
|
369
|
+
getData: it,
|
|
370
|
+
generateImage: Ce,
|
|
371
|
+
generatePdf: $e,
|
|
372
|
+
generateCsv: ze,
|
|
373
|
+
toggleAnnotator: re,
|
|
374
|
+
toggleTable: Oe
|
|
375
|
+
}), (l, s) => (r(), n("div", {
|
|
376
|
+
ref_key: "ridgelineChart",
|
|
377
|
+
ref: V,
|
|
378
|
+
class: W(`vue-ui-ridgeline ${R.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
379
|
+
id: `vue-ui-ridgeline_${C.value}`,
|
|
380
|
+
style: M({
|
|
381
|
+
fontFamily: e.value.style.fontFamily,
|
|
382
|
+
width: "100%",
|
|
383
|
+
textAlign: "center",
|
|
384
|
+
background: e.value.style.chart.backgroundColor,
|
|
385
|
+
height: e.value.responsive ? "100%" : void 0
|
|
386
|
+
}),
|
|
387
|
+
onMouseenter: s[4] || (s[4] = () => c(be)(!0)),
|
|
388
|
+
onMouseleave: s[5] || (s[5] = () => c(be)(!1))
|
|
389
|
+
}, [
|
|
390
|
+
e.value.userOptions.buttons.annotator && c(te) ? (r(), T(jt, {
|
|
391
|
+
key: 0,
|
|
392
|
+
color: e.value.style.chart.color,
|
|
393
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
394
|
+
active: U.value,
|
|
395
|
+
svgRef: c(te),
|
|
396
|
+
onClose: re
|
|
397
|
+
}, null, 8, ["color", "backgroundColor", "active", "svgRef"])) : h("", !0),
|
|
398
|
+
p(l.$slots, "userConfig", {}, void 0, !0),
|
|
399
|
+
Qe.value ? (r(), n("div", {
|
|
400
|
+
key: 1,
|
|
401
|
+
ref_key: "noTitle",
|
|
402
|
+
ref: ve,
|
|
403
|
+
class: "vue-data-ui-no-title-space",
|
|
404
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
405
|
+
}, null, 512)) : h("", !0),
|
|
406
|
+
e.value.style.chart.title.text ? (r(), n("div", {
|
|
407
|
+
key: 2,
|
|
408
|
+
ref_key: "chartTitle",
|
|
409
|
+
ref: ie,
|
|
410
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
411
|
+
}, [
|
|
412
|
+
(r(), T(Jt, {
|
|
413
|
+
key: `title_${de.value}`,
|
|
414
|
+
config: {
|
|
415
|
+
title: {
|
|
416
|
+
cy: "ridgeline-div-title",
|
|
417
|
+
...e.value.style.chart.title
|
|
418
|
+
},
|
|
419
|
+
subtitle: {
|
|
420
|
+
cy: "ridgeline-div-subtitle",
|
|
421
|
+
...e.value.style.chart.title.subtitle
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}, null, 8, ["config"]))
|
|
425
|
+
], 512)) : h("", !0),
|
|
426
|
+
e.value.userOptions.show && O.value && (c(xe) || c(ee)) ? (r(), T(Et, {
|
|
427
|
+
ref: "details",
|
|
428
|
+
key: `user_option_${fe.value}`,
|
|
429
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
430
|
+
color: e.value.style.chart.color,
|
|
431
|
+
isPrinting: c(ke),
|
|
432
|
+
isImaging: c(Ae),
|
|
433
|
+
uid: C.value,
|
|
434
|
+
hasTooltip: !1,
|
|
435
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
436
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
437
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
438
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
439
|
+
hasLabel: !1,
|
|
440
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
441
|
+
isFullscreen: R.value,
|
|
442
|
+
chartElement: V.value,
|
|
443
|
+
position: e.value.userOptions.position,
|
|
444
|
+
isTooltip: !1,
|
|
445
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
446
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
447
|
+
isAnnotation: U.value,
|
|
448
|
+
style: M({
|
|
449
|
+
visibility: c(xe) ? c(ee) ? "visible" : "hidden" : "visible"
|
|
450
|
+
}),
|
|
451
|
+
onToggleFullscreen: st,
|
|
452
|
+
onGeneratePdf: c($e),
|
|
453
|
+
onGenerateCsv: ze,
|
|
454
|
+
onGenerateImage: c(Ce),
|
|
455
|
+
onToggleTable: Oe,
|
|
456
|
+
onToggleAnnotator: re
|
|
457
|
+
}, Re({ _: 2 }, [
|
|
458
|
+
l.$slots.menuIcon ? {
|
|
459
|
+
name: "menuIcon",
|
|
460
|
+
fn: m(({ isOpen: t, color: o }) => [
|
|
461
|
+
p(l.$slots, "menuIcon", j(Y({ isOpen: t, color: o })), void 0, !0)
|
|
462
|
+
]),
|
|
463
|
+
key: "0"
|
|
464
|
+
} : void 0,
|
|
465
|
+
l.$slots.optionTooltip ? {
|
|
466
|
+
name: "optionTooltip",
|
|
467
|
+
fn: m(() => [
|
|
468
|
+
p(l.$slots, "optionTooltip", {}, void 0, !0)
|
|
469
|
+
]),
|
|
470
|
+
key: "1"
|
|
471
|
+
} : void 0,
|
|
472
|
+
l.$slots.optionPdf ? {
|
|
473
|
+
name: "optionPdf",
|
|
474
|
+
fn: m(() => [
|
|
475
|
+
p(l.$slots, "optionPdf", {}, void 0, !0)
|
|
476
|
+
]),
|
|
477
|
+
key: "2"
|
|
478
|
+
} : void 0,
|
|
479
|
+
l.$slots.optionCsv ? {
|
|
480
|
+
name: "optionCsv",
|
|
481
|
+
fn: m(() => [
|
|
482
|
+
p(l.$slots, "optionCsv", {}, void 0, !0)
|
|
483
|
+
]),
|
|
484
|
+
key: "3"
|
|
485
|
+
} : void 0,
|
|
486
|
+
l.$slots.optionImg ? {
|
|
487
|
+
name: "optionImg",
|
|
488
|
+
fn: m(() => [
|
|
489
|
+
p(l.$slots, "optionImg", {}, void 0, !0)
|
|
490
|
+
]),
|
|
491
|
+
key: "4"
|
|
492
|
+
} : void 0,
|
|
493
|
+
l.$slots.optionTable ? {
|
|
494
|
+
name: "optionTable",
|
|
495
|
+
fn: m(() => [
|
|
496
|
+
p(l.$slots, "optionTable", {}, void 0, !0)
|
|
497
|
+
]),
|
|
498
|
+
key: "5"
|
|
499
|
+
} : void 0,
|
|
500
|
+
l.$slots.optionFullscreen ? {
|
|
501
|
+
name: "optionFullscreen",
|
|
502
|
+
fn: m(({ toggleFullscreen: t, isFullscreen: o }) => [
|
|
503
|
+
p(l.$slots, "optionFullscreen", j(Y({ toggleFullscreen: t, isFullscreen: o })), void 0, !0)
|
|
504
|
+
]),
|
|
505
|
+
key: "6"
|
|
506
|
+
} : void 0,
|
|
507
|
+
l.$slots.optionAnnotator ? {
|
|
508
|
+
name: "optionAnnotator",
|
|
509
|
+
fn: m(({ toggleAnnotator: t, isAnnotator: o }) => [
|
|
510
|
+
p(l.$slots, "optionAnnotator", j(Y({ toggleAnnotator: t, isAnnotator: o })), void 0, !0)
|
|
511
|
+
]),
|
|
512
|
+
key: "7"
|
|
513
|
+
} : void 0
|
|
514
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "style", "onGeneratePdf", "onGenerateImage"])) : h("", !0),
|
|
515
|
+
O.value ? (r(), n("svg", {
|
|
516
|
+
key: 4,
|
|
517
|
+
ref_key: "svgRef",
|
|
518
|
+
ref: te,
|
|
519
|
+
xmlns: c(Ot),
|
|
520
|
+
class: W({ "vue-data-ui-fullscreen--on": R.value, "vue-data-ui-fulscreen--off": !R.value }),
|
|
521
|
+
viewBox: `0 0 ${y.value.width <= 0 ? 10 : y.value.width} ${k.value.fullHeight <= 0 ? 10 : k.value.fullHeight}`,
|
|
522
|
+
style: M(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color};${e.value.responsive ? `height: ${pe.value}px; width: 100%;` : ""}`)
|
|
523
|
+
}, [
|
|
524
|
+
d("defs", null, [
|
|
525
|
+
(r(!0), n(f, null, $(oe.value, (t, o) => (r(), n("linearGradient", {
|
|
526
|
+
id: `gradient-${t.id}-${C.value}`,
|
|
527
|
+
x1: "50%",
|
|
528
|
+
y1: "0%",
|
|
529
|
+
x2: "50%",
|
|
530
|
+
y2: "100%"
|
|
531
|
+
}, [
|
|
532
|
+
d("stop", {
|
|
533
|
+
offset: "0%",
|
|
534
|
+
"stop-color": t.color,
|
|
535
|
+
"stop-opacity": "1"
|
|
536
|
+
}, null, 8, ll),
|
|
537
|
+
d("stop", {
|
|
538
|
+
offset: "30%",
|
|
539
|
+
"stop-color": t.color,
|
|
540
|
+
"stop-opacity": "0.7"
|
|
541
|
+
}, null, 8, al),
|
|
542
|
+
d("stop", {
|
|
543
|
+
offset: "70%",
|
|
544
|
+
"stop-color": t.color,
|
|
545
|
+
"stop-opacity": "0.3"
|
|
546
|
+
}, null, 8, ol),
|
|
547
|
+
d("stop", {
|
|
548
|
+
offset: "100%",
|
|
549
|
+
"stop-color": t.color,
|
|
550
|
+
"stop-opacity": "0.1"
|
|
551
|
+
}, null, 8, sl)
|
|
552
|
+
], 8, tl))), 256)),
|
|
553
|
+
(r(!0), n(f, null, $(I.value, (t, o) => (r(), n(f, null, [
|
|
554
|
+
(r(!0), n(f, null, $(t.datapoints, (a, u) => (r(), n("linearGradient", {
|
|
555
|
+
key: `grad${a.id}`,
|
|
556
|
+
id: `gradient-single-${C.value}-${a.uid}`,
|
|
557
|
+
x1: "50%",
|
|
558
|
+
y1: "0%",
|
|
559
|
+
x2: "50%",
|
|
560
|
+
y2: "100%"
|
|
561
|
+
}, [
|
|
562
|
+
d("stop", {
|
|
563
|
+
offset: "0%",
|
|
564
|
+
"stop-color": a.color,
|
|
565
|
+
"stop-opacity": "1"
|
|
566
|
+
}, null, 8, nl),
|
|
567
|
+
d("stop", {
|
|
568
|
+
offset: "30%",
|
|
569
|
+
"stop-color": a.color,
|
|
570
|
+
"stop-opacity": "0.7"
|
|
571
|
+
}, null, 8, ul),
|
|
572
|
+
d("stop", {
|
|
573
|
+
offset: "70%",
|
|
574
|
+
"stop-color": a.color,
|
|
575
|
+
"stop-opacity": "0.3"
|
|
576
|
+
}, null, 8, il),
|
|
577
|
+
d("stop", {
|
|
578
|
+
offset: "100%",
|
|
579
|
+
"stop-color": a.color,
|
|
580
|
+
"stop-opacity": "0.1"
|
|
581
|
+
}, null, 8, cl)
|
|
582
|
+
], 8, rl))), 128))
|
|
583
|
+
], 64))), 256))
|
|
584
|
+
]),
|
|
585
|
+
(r(!0), n(f, null, $(I.value, (t, o) => (r(), n("g", {
|
|
586
|
+
key: `ds-${o}`
|
|
587
|
+
}, [
|
|
588
|
+
(r(!0), n(f, null, $(t.datapoints, (a, u) => (r(), n("g", {
|
|
589
|
+
key: a.id
|
|
590
|
+
}, [
|
|
591
|
+
l.$slots.pattern ? (r(), n("g", hl, [
|
|
592
|
+
d("defs", null, [
|
|
593
|
+
p(l.$slots, "pattern", Ee({ ref_for: !0 }, { datapointIndex: o, seriesIndex: u, patternId: `pattern_${C.value}_${a.uid}` }), void 0, !0)
|
|
594
|
+
])
|
|
595
|
+
])) : h("", !0),
|
|
596
|
+
d("path", {
|
|
597
|
+
fill: l.$slots.pattern ? `url(#pattern_${C.value}_${a.uid})` : e.value.style.chart.backgroundColor,
|
|
598
|
+
stroke: "none",
|
|
599
|
+
"stroke-linecap": "round",
|
|
600
|
+
d: e.value.style.chart.areas.smooth ? a.smoothPath : a.straightPath,
|
|
601
|
+
style: M({
|
|
602
|
+
opacity: e.value.style.chart.areas.opacity
|
|
603
|
+
})
|
|
604
|
+
}, null, 12, vl),
|
|
605
|
+
d("path", {
|
|
606
|
+
fill: "none",
|
|
607
|
+
stroke: e.value.style.chart.areas.stroke.useSerieColor ? a.color : e.value.style.chart.areas.stroke.color,
|
|
608
|
+
"stroke-width": e.value.style.chart.areas.strokeWidth,
|
|
609
|
+
d: e.value.style.chart.areas.smooth ? a.smoothPathRidge : a.straightPathRidge,
|
|
610
|
+
"stroke-linecap": "round",
|
|
611
|
+
"stroke-linejoin": "round",
|
|
612
|
+
class: W({ "vue-ui-ridgeline-animate": e.value.useCssAnimation }),
|
|
613
|
+
style: M({
|
|
614
|
+
strokeDasharray: a.pathLength,
|
|
615
|
+
strokeDashoffset: e.value.useCssAnimation ? a.pathLength : 0
|
|
616
|
+
})
|
|
617
|
+
}, null, 14, dl),
|
|
618
|
+
d("path", {
|
|
619
|
+
fill: e.value.style.chart.areas.useGradient ? e.value.style.chart.areas.useCommonColor ? `url(#gradient-${a.id}-${C.value})` : `url(#gradient-single-${C.value}-${a.uid})` : a.color,
|
|
620
|
+
stroke: "none",
|
|
621
|
+
d: e.value.style.chart.areas.smooth ? a.smoothPath : a.straightPath,
|
|
622
|
+
"stroke-linecap": "round",
|
|
623
|
+
"stroke-linejoin": "round",
|
|
624
|
+
class: W({ "vue-ui-ridgeline-animate": e.value.useCssAnimation }),
|
|
625
|
+
style: M({
|
|
626
|
+
strokeDasharray: a.pathLength,
|
|
627
|
+
strokeDashoffset: e.value.useCssAnimation ? a.pathLength : 0
|
|
628
|
+
})
|
|
629
|
+
}, null, 14, yl),
|
|
630
|
+
e.value.style.chart.zeroLine.show ? (r(), n("path", {
|
|
631
|
+
key: 1,
|
|
632
|
+
stroke: e.value.style.chart.zeroLine.useSerieColor ? a.color : e.value.style.chart.zeroLine.stroke,
|
|
633
|
+
"stroke-dasharray": e.value.style.chart.zeroLine.strokeDasharray,
|
|
634
|
+
"stroke-width": e.value.style.chart.zeroLine.strokeWidth,
|
|
635
|
+
d: a.zeroPath,
|
|
636
|
+
"stroke-linecap": "round"
|
|
637
|
+
}, null, 8, fl)) : h("", !0),
|
|
638
|
+
e.value.style.chart.areas.maxPoint.show && a.plots.length > 1 ? (r(!0), n(f, { key: 2 }, $(a.plots, (A) => (r(), n(f, null, [
|
|
639
|
+
A.isMaxPoint ? (r(), n("line", {
|
|
640
|
+
key: 0,
|
|
641
|
+
x1: A.x,
|
|
642
|
+
y1: A.y,
|
|
643
|
+
x2: A.x,
|
|
644
|
+
y2: A.zero,
|
|
645
|
+
stroke: e.value.style.chart.areas.maxPoint.adaptStrokeToBackground ? c(St)(a.color) : e.value.style.chart.areas.maxPoint.stroke,
|
|
646
|
+
"stroke-width": e.value.style.chart.areas.maxPoint.strokeWidth,
|
|
647
|
+
"stroke-linecap": "round",
|
|
648
|
+
"stroke-dasharray": e.value.style.chart.areas.maxPoint.strokeDasharray
|
|
649
|
+
}, null, 8, gl)) : h("", !0)
|
|
650
|
+
], 64))), 256)) : h("", !0),
|
|
651
|
+
a.plots.length === 1 ? (r(), n("circle", {
|
|
652
|
+
key: 3,
|
|
653
|
+
cx: a.plots[0].x,
|
|
654
|
+
cy: a.plots[0].y,
|
|
655
|
+
stroke: e.value.style.chart.selector.dot.stroke,
|
|
656
|
+
"stroke-width": e.value.style.chart.selector.dot.strokeWidth,
|
|
657
|
+
r: e.value.style.chart.selector.dot.radius,
|
|
658
|
+
fill: e.value.style.chart.selector.dot.useDatapointColor ? a.color : e.value.style.chart.selector.dot.fill,
|
|
659
|
+
style: {
|
|
660
|
+
pointerEvents: "none"
|
|
661
|
+
}
|
|
662
|
+
}, null, 8, pl)) : h("", !0)
|
|
663
|
+
]))), 128)),
|
|
664
|
+
d("text", {
|
|
665
|
+
x: t.label.x,
|
|
666
|
+
y: t.label.y,
|
|
667
|
+
"text-anchor": "end",
|
|
668
|
+
"font-size": e.value.style.chart.yAxis.labels.fontSize,
|
|
669
|
+
"font-weight": e.value.style.chart.yAxis.labels.bold ? "bold" : "normal",
|
|
670
|
+
fill: e.value.style.chart.yAxis.labels.color,
|
|
671
|
+
style: M({
|
|
672
|
+
cursor: e.value.style.chart.dialog.show ? "pointer" : "default"
|
|
673
|
+
}),
|
|
674
|
+
"text-decoration": e.value.style.chart.dialog.show && (se.value === o || N.value && t.uid === N.value.uid) ? "underline" : "",
|
|
675
|
+
onMouseenter: (a) => nt(o),
|
|
676
|
+
onMouseleave: ut,
|
|
677
|
+
onClick: (a) => rt(t)
|
|
678
|
+
}, F(t.name), 45, ml)
|
|
679
|
+
]))), 128)),
|
|
680
|
+
e.value.style.chart.xAxis.labels.values.length ? (r(), n("g", bl, [
|
|
681
|
+
(r(!0), n(f, null, $(D.value, (t, o) => p(l.$slots, "time-label", Ee({ ref_for: !0 }, {
|
|
682
|
+
show: t && !e.value.style.chart.xAxis.labels.showOnlyFirstAndLast && !e.value.style.chart.xAxis.labels.showOnlyAtModulo || t && e.value.style.chart.xAxis.labels.showOnlyFirstAndLast && (o === 0 || o === D.value.length - 1) || t && v.value && v.value.index === o || t && !e.value.style.chart.xAxis.labels.showOnlyFirstAndLast && e.value.style.chart.xAxis.labels.showOnlyAtModulo && o % Math.floor(D.value.length / e.value.style.chart.xAxis.labels.modulo) === 0,
|
|
683
|
+
fontSize: e.value.style.chart.xAxis.labels.fontSize,
|
|
684
|
+
content: t.label,
|
|
685
|
+
textAnchor: e.value.style.chart.xAxis.labels.rotation > 0 ? "start" : e.value.style.chart.xAxis.labels.rotation < 0 ? "end" : "middle",
|
|
686
|
+
fill: e.value.style.chart.xAxis.labels.color,
|
|
687
|
+
transform: `translate(${t.selectorX}, ${k.value.top + t.height + e.value.style.chart.xAxis.labels.offsetY}), rotate(${e.value.style.chart.xAxis.labels.rotation})`,
|
|
688
|
+
x: t.selectorX,
|
|
689
|
+
y: k.value.top + t.height + e.value.style.chart.xAxis.labels.offsetY
|
|
690
|
+
}), () => [
|
|
691
|
+
t && !e.value.style.chart.xAxis.labels.showOnlyFirstAndLast && !e.value.style.chart.xAxis.labels.showOnlyAtModulo || t && e.value.style.chart.xAxis.labels.showOnlyFirstAndLast && (o === 0 || o === D.value.length - 1) || t && v.value && v.value.index === o || t && !e.value.style.chart.xAxis.labels.showOnlyFirstAndLast && e.value.style.chart.xAxis.labels.showOnlyAtModulo && o % Math.floor(D.value.length / e.value.style.chart.xAxis.labels.modulo) === 0 ? (r(), n("text", {
|
|
692
|
+
key: 0,
|
|
693
|
+
"font-size": e.value.style.chart.xAxis.labels.fontSize,
|
|
694
|
+
fill: e.value.style.chart.xAxis.labels.color,
|
|
695
|
+
"font-weight": e.value.style.chart.xAxis.labels.bold ? "bold" : "normal",
|
|
696
|
+
transform: `translate(${t.selectorX}, ${k.value.top + t.height + e.value.style.chart.xAxis.labels.offsetY}), rotate(${e.value.style.chart.xAxis.labels.rotation})`,
|
|
697
|
+
"text-anchor": e.value.style.chart.xAxis.labels.rotation > 0 ? "start" : e.value.style.chart.xAxis.labels.rotation < 0 ? "end" : "middle",
|
|
698
|
+
style: M({
|
|
699
|
+
opacity: v.value ? v.value.index === o ? 1 : 0.2 : 1
|
|
700
|
+
})
|
|
701
|
+
}, F(t.label), 13, xl)) : h("", !0)
|
|
702
|
+
], !0)), 256))
|
|
703
|
+
])) : h("", !0),
|
|
704
|
+
d("g", null, [
|
|
705
|
+
(r(!0), n(f, null, $(D.value, (t, o) => (r(), n("rect", {
|
|
706
|
+
x: t.x,
|
|
707
|
+
y: t.y,
|
|
708
|
+
width: t.width < 0 ? 0.1 : t.width,
|
|
709
|
+
height: t.height < 0 ? 0.1 : t.height,
|
|
710
|
+
fill: "transparent",
|
|
711
|
+
onMouseenter: (a) => v.value = t,
|
|
712
|
+
onMouseleave: s[0] || (s[0] = (a) => v.value = null),
|
|
713
|
+
onClick: () => et(t)
|
|
714
|
+
}, null, 40, kl))), 256)),
|
|
715
|
+
e.value.style.chart.selector.show && v.value ? (r(), n("line", {
|
|
716
|
+
key: 0,
|
|
717
|
+
x1: v.value.selectorX,
|
|
718
|
+
x2: v.value.selectorX,
|
|
719
|
+
y1: v.value.y,
|
|
720
|
+
y2: v.value.y + v.value.height - w.value / 2,
|
|
721
|
+
stroke: e.value.style.chart.selector.stroke,
|
|
722
|
+
"stroke-width": e.value.style.chart.selector.strokeWidth,
|
|
723
|
+
"stroke-dasharray": e.value.style.chart.selector.strokeDasharray,
|
|
724
|
+
"stroke-linecap": "round",
|
|
725
|
+
style: { pointerEvents: "none" }
|
|
726
|
+
}, null, 8, Al)) : h("", !0),
|
|
727
|
+
v.value ? (r(!0), n(f, { key: 1 }, $(I.value, (t) => (r(), n(f, null, [
|
|
728
|
+
(r(!0), n(f, null, $(t.datapoints, (o) => (r(), n(f, null, [
|
|
729
|
+
(r(!0), n(f, null, $(o.plots, (a, u) => (r(), n(f, null, [
|
|
730
|
+
v.value && v.value.index === u ? (r(), n("circle", {
|
|
731
|
+
key: 0,
|
|
732
|
+
cx: a.x,
|
|
733
|
+
cy: a.y,
|
|
734
|
+
stroke: e.value.style.chart.selector.dot.stroke,
|
|
735
|
+
"stroke-width": e.value.style.chart.selector.dot.strokeWidth,
|
|
736
|
+
r: e.value.style.chart.selector.dot.radius,
|
|
737
|
+
fill: e.value.style.chart.selector.dot.useDatapointColor ? o.color : e.value.style.chart.selector.dot.fill,
|
|
738
|
+
style: {
|
|
739
|
+
pointerEvents: "none"
|
|
740
|
+
}
|
|
741
|
+
}, null, 8, $l)) : h("", !0),
|
|
742
|
+
v.value && v.value.index === u ? (r(), n("text", {
|
|
743
|
+
key: 1,
|
|
744
|
+
x: Me(
|
|
745
|
+
a.x,
|
|
746
|
+
c(J)(
|
|
747
|
+
e.value.style.chart.selector.labels.formatter,
|
|
748
|
+
a.value,
|
|
749
|
+
c(K)({
|
|
750
|
+
p: e.value.style.chart.xAxis.labels.prefix,
|
|
751
|
+
v: a.value,
|
|
752
|
+
s: e.value.style.chart.xAxis.labels.suffix,
|
|
753
|
+
r: e.value.style.chart.selector.labels.rounding
|
|
754
|
+
})
|
|
755
|
+
),
|
|
756
|
+
e.value.style.chart.selector.labels.fontSize
|
|
757
|
+
) ? a.x - e.value.style.chart.selector.labels.fontSize / 2 : a.x + e.value.style.chart.selector.labels.fontSize / 2,
|
|
758
|
+
y: a.y + e.value.style.chart.selector.labels.fontSize / 3,
|
|
759
|
+
"text-anchor": Me(
|
|
760
|
+
a.x,
|
|
761
|
+
c(J)(
|
|
762
|
+
e.value.style.chart.selector.labels.formatter,
|
|
763
|
+
a.value,
|
|
764
|
+
c(K)({
|
|
765
|
+
p: e.value.style.chart.xAxis.labels.prefix,
|
|
766
|
+
v: a.value,
|
|
767
|
+
s: e.value.style.chart.xAxis.labels.suffix,
|
|
768
|
+
r: e.value.style.chart.selector.labels.rounding
|
|
769
|
+
})
|
|
770
|
+
),
|
|
771
|
+
e.value.style.chart.selector.labels.fontSize
|
|
772
|
+
) ? "end" : "start",
|
|
773
|
+
"font-size": e.value.style.chart.selector.labels.fontSize,
|
|
774
|
+
fill: e.value.style.chart.selector.labels.color,
|
|
775
|
+
style: {
|
|
776
|
+
pointerEvents: "none"
|
|
777
|
+
}
|
|
778
|
+
}, F(c(J)(
|
|
779
|
+
e.value.style.chart.selector.labels.formatter,
|
|
780
|
+
a.value,
|
|
781
|
+
c(K)({
|
|
782
|
+
p: e.value.style.chart.xAxis.labels.prefix,
|
|
783
|
+
v: a.value,
|
|
784
|
+
s: e.value.style.chart.xAxis.labels.suffix,
|
|
785
|
+
r: e.value.style.chart.selector.labels.rounding
|
|
786
|
+
})
|
|
787
|
+
)), 9, Cl)) : h("", !0)
|
|
788
|
+
], 64))), 256))
|
|
789
|
+
], 64))), 256))
|
|
790
|
+
], 64))), 256)) : h("", !0)
|
|
791
|
+
]),
|
|
792
|
+
p(l.$slots, "svg", { svg: y.value }, void 0, !0)
|
|
793
|
+
], 14, el)) : h("", !0),
|
|
794
|
+
l.$slots.watermark ? (r(), n("div", wl, [
|
|
795
|
+
p(l.$slots, "watermark", j(Y({ isPrinting: c(ke) || c(Ae) })), void 0, !0)
|
|
796
|
+
])) : h("", !0),
|
|
797
|
+
O.value ? h("", !0) : (r(), T(qt, {
|
|
798
|
+
key: 6,
|
|
799
|
+
config: {
|
|
800
|
+
type: "ridgeline",
|
|
801
|
+
style: {
|
|
802
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
803
|
+
ridgeline: {
|
|
804
|
+
color: "#CCCCCC"
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
}, null, 8, ["config"])),
|
|
809
|
+
d("div", {
|
|
810
|
+
ref_key: "chartLegend",
|
|
811
|
+
ref: ce
|
|
812
|
+
}, [
|
|
813
|
+
e.value.style.chart.legend.show ? (r(), T(Wt, {
|
|
814
|
+
key: `legend_${ye.value}`,
|
|
815
|
+
legendSet: oe.value,
|
|
816
|
+
config: ot.value,
|
|
817
|
+
onClickMarker: s[1] || (s[1] = ({ legend: t }) => we(t.id))
|
|
818
|
+
}, Re({
|
|
819
|
+
item: m(({ legend: t }) => [
|
|
820
|
+
d("div", {
|
|
821
|
+
style: M(`opacity:${P.value.includes(t.id) ? 0.5 : 1}`),
|
|
822
|
+
onClick: (o) => t.segregate()
|
|
823
|
+
}, F(t.name), 13, _l)
|
|
824
|
+
]),
|
|
825
|
+
_: 2
|
|
826
|
+
}, [
|
|
827
|
+
l.$slots.pattern ? {
|
|
828
|
+
name: "legend-pattern",
|
|
829
|
+
fn: m(({ legend: t, index: o }) => [
|
|
830
|
+
kt(Yt, {
|
|
831
|
+
shape: t.shape,
|
|
832
|
+
radius: 30,
|
|
833
|
+
stroke: "none",
|
|
834
|
+
plot: { x: 30, y: 30 },
|
|
835
|
+
fill: `url(#pattern_${C.value}_${o})`
|
|
836
|
+
}, null, 8, ["shape", "fill"])
|
|
837
|
+
]),
|
|
838
|
+
key: "0"
|
|
839
|
+
} : void 0
|
|
840
|
+
]), 1032, ["legendSet", "config"])) : h("", !0),
|
|
841
|
+
p(l.$slots, "legend", { legend: oe.value }, void 0, !0)
|
|
842
|
+
], 512),
|
|
843
|
+
l.$slots.source ? (r(), n("div", {
|
|
844
|
+
key: 7,
|
|
845
|
+
ref_key: "source",
|
|
846
|
+
ref: he,
|
|
847
|
+
dir: "auto"
|
|
848
|
+
}, [
|
|
849
|
+
p(l.$slots, "source", {}, void 0, !0)
|
|
850
|
+
], 512)) : h("", !0),
|
|
851
|
+
O.value ? (r(), T(Bt, {
|
|
852
|
+
key: 8,
|
|
853
|
+
hideDetails: "",
|
|
854
|
+
config: {
|
|
855
|
+
open: X.value.showTable,
|
|
856
|
+
maxHeight: 1e4,
|
|
857
|
+
body: {
|
|
858
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
859
|
+
color: e.value.style.chart.color
|
|
860
|
+
},
|
|
861
|
+
head: {
|
|
862
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
863
|
+
color: e.value.style.chart.color
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
}, {
|
|
867
|
+
content: m(() => [
|
|
868
|
+
(r(), T(Gt, {
|
|
869
|
+
key: `table_${Je.value}`,
|
|
870
|
+
colNames: G.value.colNames,
|
|
871
|
+
head: G.value.head,
|
|
872
|
+
body: G.value.body,
|
|
873
|
+
config: G.value.config,
|
|
874
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` :${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
875
|
+
onClose: s[2] || (s[2] = (t) => X.value.showTable = !1)
|
|
876
|
+
}, {
|
|
877
|
+
th: m(({ th: t }) => [
|
|
878
|
+
d("div", { innerHTML: t }, null, 8, Ml)
|
|
879
|
+
]),
|
|
880
|
+
td: m(({ td: t }) => [
|
|
881
|
+
He(F(t.name ? t.name : c(J)(
|
|
882
|
+
e.value.style.chart.selector.labels.formatter,
|
|
883
|
+
t,
|
|
884
|
+
c(K)({
|
|
885
|
+
p: e.value.style.chart.xAxis.labels.prefix,
|
|
886
|
+
v: t,
|
|
887
|
+
s: e.value.style.chart.xAxis.labels.suffix,
|
|
888
|
+
r: e.value.table.td.roundingValue
|
|
889
|
+
})
|
|
890
|
+
)), 1)
|
|
891
|
+
]),
|
|
892
|
+
_: 1
|
|
893
|
+
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
894
|
+
]),
|
|
895
|
+
_: 1
|
|
896
|
+
}, 8, ["config"])) : h("", !0),
|
|
897
|
+
e.value.style.chart.dialog.show ? (r(), T(Ut, {
|
|
898
|
+
key: 9,
|
|
899
|
+
ref_key: "dialog",
|
|
900
|
+
ref: Z,
|
|
901
|
+
onClose: s[3] || (s[3] = (t) => N.value = null),
|
|
902
|
+
backgroundColor: e.value.style.chart.dialog.backgroundColor,
|
|
903
|
+
color: e.value.style.chart.dialog.color,
|
|
904
|
+
headerBg: e.value.style.chart.dialog.header.backgroundColor,
|
|
905
|
+
headerColor: e.value.style.chart.dialog.header.color
|
|
906
|
+
}, {
|
|
907
|
+
title: m(() => [
|
|
908
|
+
He(F(N.value.name), 1)
|
|
909
|
+
]),
|
|
910
|
+
default: m(() => [
|
|
911
|
+
N.value ? (r(), T(Kt, {
|
|
912
|
+
key: 0,
|
|
913
|
+
config: Te.value,
|
|
914
|
+
dataset: Pe.value
|
|
915
|
+
}, null, 8, ["config", "dataset"])) : h("", !0)
|
|
916
|
+
]),
|
|
917
|
+
_: 1
|
|
918
|
+
}, 8, ["backgroundColor", "color", "headerBg", "headerColor"])) : h("", !0)
|
|
919
|
+
], 46, Zt));
|
|
920
|
+
}
|
|
921
|
+
}, Wl = /* @__PURE__ */ Qt(Tl, [["__scopeId", "data-v-9c3affc2"]]);
|
|
922
|
+
export {
|
|
923
|
+
Wl as default
|
|
924
|
+
};
|