vue-data-ui 3.0.0-next.7 → 3.0.0-next.71
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-Bl8urcli.js → Arrow-BZNpld6u.js} +1 -1
- package/dist/{BaseDraggableDialog-CyhpaZU5.js → BaseDraggableDialog-kg-eVvXZ.js} +2 -2
- package/dist/{BaseIcon-BCZfTCeM.js → BaseIcon-BdOEhJar.js} +1 -1
- package/dist/{ColorPicker-CSJf42vx.js → ColorPicker-CWvXlPxS.js} +2 -2
- package/dist/{DataTable-mQ6Wd-rR.js → DataTable-B3yakHEM.js} +2 -2
- package/dist/{Legend-B2hrDh4G.js → Legend-DiGLrlzP.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DQ8KsK4W.js → NonSvgPenAndPaper-C-ZjpJQd.js} +3 -3
- package/dist/{PackageVersion-CeEYZfaH.js → PackageVersion-6s4eI8W7.js} +1 -1
- package/dist/{PenAndPaper-DhSxfUrQ.js → PenAndPaper-JoUN7Ink.js} +3 -3
- package/dist/{Shape-C2qH26wh.js → Shape-CWIa2nta.js} +43 -37
- package/dist/Slicer-DYuvPkEM.js +602 -0
- package/dist/{SparkTooltip-BcHgW6YX.js → SparkTooltip-C_fUmbP7.js} +1 -1
- package/dist/{Title-B7Xb3YuE.js → Title-VLWyIYrj.js} +1 -1
- package/dist/{Tooltip-BidRoM5E.js → Tooltip-BS5naLS2.js} +23 -19
- package/dist/{UserOptions-0tvMM8PF.js → UserOptions-BV_xM-sB.js} +2 -2
- package/dist/{dom-to-png-CTrlbKHr.js → dom-to-png-PUk0ukSG.js} +1 -1
- package/dist/{img-D72yZNUg.js → img-DD_2wgY3.js} +1 -1
- package/dist/{index-Cg-RjxqH.js → index-DKpp7RIH.js} +2236 -1505
- package/dist/{pdf-DgX01_wu.js → pdf-0TQQyXWM.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +610 -22
- package/dist/types/vue-data-ui.d.ts +610 -22
- package/dist/useAutoSizeLabelsInsideViewbox-Qhry5WvH.js +81 -0
- package/dist/useFitSvgText-2crs6Fv5.js +69 -0
- package/dist/useLoading-D7YHNtLX.js +29 -0
- package/dist/useNestedProp-D-8c0o4p.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-BUzmyQf9.js → usePrinter-NUeckmCX.js} +2 -2
- package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
- package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
- package/dist/{vue-data-ui-DpO93ey5.js → vue-data-ui-BIXXEsFZ.js} +105 -100
- package/dist/vue-data-ui.js +23 -22
- package/dist/vue-ui-3d-bar-CVUfj12F.js +1323 -0
- package/dist/{vue-ui-accordion-CRomxzaL.js → vue-ui-accordion-Cpovz3RE.js} +3 -3
- package/dist/vue-ui-age-pyramid-CQWFaHLV.js +834 -0
- package/dist/{vue-ui-annotator-BAOxPiFx.js → vue-ui-annotator-C49Xw5Mh.js} +2 -2
- package/dist/vue-ui-bullet-DED2SuIa.js +571 -0
- package/dist/vue-ui-candlestick-DGgbevy6.js +999 -0
- package/dist/{vue-ui-carousel-table-DVGlPZIa.js → vue-ui-carousel-table-DKIgSB1T.js} +29 -29
- package/dist/{vue-ui-chestnut-P1v4ffD0.js → vue-ui-chestnut-D1bEM91d.js} +5 -5
- package/dist/vue-ui-chord-CBLSqtEP.js +1038 -0
- package/dist/{vue-ui-circle-pack-FXmemXgl.js → vue-ui-circle-pack-g2ts9NTG.js} +24 -24
- package/dist/{vue-ui-cursor-CdvMgIrP.js → vue-ui-cursor-DSxmPUD8.js} +2 -2
- package/dist/{vue-ui-dashboard-Vke0452J.js → vue-ui-dashboard-B6FfoNjQ.js} +62 -62
- package/dist/{vue-ui-digits-BVhyYqCs.js → vue-ui-digits-DKffQVgr.js} +2 -2
- package/dist/{vue-ui-donut-BpIivKcf.js → vue-ui-donut-CJrWc4-g.js} +320 -308
- package/dist/vue-ui-donut-evolution-Bys6cs-D.js +1075 -0
- package/dist/vue-ui-dumbbell-Cb_I__qC.js +1119 -0
- package/dist/vue-ui-flow-BzuT3ij5.js +841 -0
- package/dist/{vue-ui-funnel-BbFmbsft.js → vue-ui-funnel-Ctp7GDiN.js} +16 -16
- package/dist/vue-ui-galaxy-CRBy0aio.js +680 -0
- package/dist/vue-ui-gauge-NcQq5UFr.js +791 -0
- package/dist/vue-ui-gizmo-Cwfb8c-0.js +210 -0
- package/dist/vue-ui-heatmap-DElqpFVY.js +1078 -0
- package/dist/vue-ui-history-plot-De1Dvnhw.js +1073 -0
- package/dist/{vue-ui-kpi-jN_yMnLj.js → vue-ui-kpi-_bLScmgO.js} +26 -26
- package/dist/{vue-ui-mini-loader-rYr76x8g.js → vue-ui-mini-loader-PsHE_2Wy.js} +2 -2
- package/dist/{vue-ui-molecule-BWZHOQLi.js → vue-ui-molecule-CgiahnC6.js} +53 -51
- package/dist/vue-ui-mood-radar-dXVOOrhl.js +785 -0
- package/dist/vue-ui-nested-donuts-C0X6BetT.js +1286 -0
- package/dist/vue-ui-onion-C7sxQzk_.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-jwtnNX59.js +915 -0
- package/dist/{vue-ui-quadrant-BFFzfDw3.js → vue-ui-quadrant-DguDE91h.js} +512 -459
- package/dist/vue-ui-quick-chart-BpEDS08U.js +1761 -0
- package/dist/vue-ui-radar-lFrqTRqo.js +796 -0
- package/dist/{vue-ui-rating-BAauyqTn.js → vue-ui-rating-BHghXziv.js} +2 -2
- package/dist/vue-ui-relation-circle-C5W6NFOb.js +598 -0
- package/dist/vue-ui-ridgeline-A2DuFEDS.js +1153 -0
- package/dist/vue-ui-rings-BgJAm9_b.js +728 -0
- package/dist/vue-ui-scatter-COfpLChz.js +1178 -0
- package/dist/{vue-ui-skeleton-CUOhCY4p.js → vue-ui-skeleton-DMLCBUtZ.js} +3 -3
- package/dist/{vue-ui-smiley-B6SqWMov.js → vue-ui-smiley-ZopESYc_.js} +26 -26
- package/dist/vue-ui-spark-trend-CuSQ03fQ.js +315 -0
- package/dist/vue-ui-sparkbar-BCsX9M4q.js +351 -0
- package/dist/vue-ui-sparkgauge-DdyZLA0T.js +232 -0
- package/dist/vue-ui-sparkhistogram-CUxFgIcE.js +380 -0
- package/dist/vue-ui-sparkline-DOkofsLL.js +489 -0
- package/dist/vue-ui-sparkstackbar-Bq9PZzmH.js +421 -0
- package/dist/vue-ui-stackbar-B7ceoT0V.js +1370 -0
- package/dist/vue-ui-strip-plot-DYh-NGQN.js +915 -0
- package/dist/{vue-ui-table-heatmap-DazTE3fa.js → vue-ui-table-heatmap-BVTb1xuA.js} +5 -5
- package/dist/{vue-ui-table-Dwjl3L0p.js → vue-ui-table-pESH5KAJ.js} +11 -11
- package/dist/{vue-ui-table-sparkline-BXMPUEpN.js → vue-ui-table-sparkline-Bw-6l9lA.js} +14 -14
- package/dist/vue-ui-thermometer-BqqfmS-B.js +541 -0
- package/dist/{vue-ui-timer-yLvNAZL_.js → vue-ui-timer-CVisMxLS.js} +5 -5
- package/dist/vue-ui-tiremarks-K1dcCdpj.js +406 -0
- package/dist/vue-ui-treemap-Bz3c68s4.js +1035 -0
- package/dist/{vue-ui-vertical-bar-BrYCoVym.js → vue-ui-vertical-bar-BvtXpCjw.js} +71 -69
- package/dist/vue-ui-waffle-CYO7bIf1.js +910 -0
- package/dist/vue-ui-wheel-De1spwLh.js +379 -0
- package/dist/vue-ui-word-cloud-BMmVrx_T.js +765 -0
- package/dist/{vue-ui-world-B4Dqrk4l.js → vue-ui-world-Ccpr00nJ.js} +11 -9
- package/dist/vue-ui-xy-D4jaRKe3.js +3771 -0
- package/dist/{vue-ui-xy-canvas-D7fL36kT.js → vue-ui-xy-canvas-DE-Uu5oq.js} +265 -264
- package/package.json +1 -1
- package/dist/Slicer-BD8Z8VCW.js +0 -577
- package/dist/useLoading-Bt5Doa8m.js +0 -28
- package/dist/useNestedProp-C_G5E08Y.js +0 -13
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-3d-bar-D8imUwEz.js +0 -1227
- package/dist/vue-ui-age-pyramid-CV7gtFOC.js +0 -746
- package/dist/vue-ui-bullet-BtuMMBF7.js +0 -513
- package/dist/vue-ui-candlestick-BsRtXKrv.js +0 -873
- package/dist/vue-ui-chord-CIuzYmpM.js +0 -949
- package/dist/vue-ui-donut-evolution-BRlsCA4U.js +0 -903
- package/dist/vue-ui-dumbbell-D87Dumjh.js +0 -753
- package/dist/vue-ui-flow-D_L_xssL.js +0 -765
- package/dist/vue-ui-galaxy-Cn6vHbaw.js +0 -617
- package/dist/vue-ui-gauge-Ds4terqY.js +0 -738
- package/dist/vue-ui-gizmo-BTncpI62.js +0 -192
- package/dist/vue-ui-heatmap-B6GpjeWC.js +0 -877
- package/dist/vue-ui-history-plot-DTDzEeGq.js +0 -924
- package/dist/vue-ui-mood-radar-CPfS6f1L.js +0 -670
- package/dist/vue-ui-nested-donuts-Bsd2kGoJ.js +0 -1177
- package/dist/vue-ui-onion-BQ4nISXW.js +0 -701
- package/dist/vue-ui-parallel-coordinate-plot-BoHgVgbn.js +0 -807
- package/dist/vue-ui-quick-chart-oNMTeOAL.js +0 -1612
- package/dist/vue-ui-radar-98mXFZe-.js +0 -741
- package/dist/vue-ui-relation-circle-6oDCSxkO.js +0 -542
- package/dist/vue-ui-ridgeline-CugMGjOU.js +0 -969
- package/dist/vue-ui-rings-bsGXaD2m.js +0 -685
- package/dist/vue-ui-scatter-7ssLliGg.js +0 -1045
- package/dist/vue-ui-spark-trend-jauInkkN.js +0 -291
- package/dist/vue-ui-sparkbar-DXByIxQH.js +0 -301
- package/dist/vue-ui-sparkgauge-BMrV2gDi.js +0 -201
- package/dist/vue-ui-sparkhistogram-CoNM4G7o.js +0 -313
- package/dist/vue-ui-sparkline-DrN3_wS0.js +0 -459
- package/dist/vue-ui-sparkstackbar-W1a0JQi9.js +0 -381
- package/dist/vue-ui-stackbar-D1-gbUgE.js +0 -1207
- package/dist/vue-ui-strip-plot-KhfvrVuN.js +0 -761
- package/dist/vue-ui-thermometer-Cn6lJRs3.js +0 -495
- package/dist/vue-ui-tiremarks-BYsWePfK.js +0 -358
- package/dist/vue-ui-treemap-Ce7RVFG3.js +0 -965
- package/dist/vue-ui-waffle-CCrR2T1G.js +0 -863
- package/dist/vue-ui-wheel-BuxjnrDN.js +0 -352
- package/dist/vue-ui-word-cloud-C6fawHJE.js +0 -659
- package/dist/vue-ui-xy-ubRnv9iJ.js +0 -2980
|
@@ -0,0 +1,999 @@
|
|
|
1
|
+
import { defineAsyncComponent as D, computed as g, ref as r, toRefs as Rt, watch as pe, shallowRef as Xe, onMounted as Ot, onBeforeUnmount as je, watchEffect as Nt, nextTick as be, createElementBlock as i, openBlock as s, unref as u, normalizeStyle as me, normalizeClass as S, createBlock as N, createCommentVNode as p, createElementVNode as y, createVNode as Ye, createSlots as Pt, withCtx as x, renderSlot as b, normalizeProps as P, guardReactiveProps as E, Fragment as V, renderList as B, toDisplayString as Q, createTextVNode as Et } from "vue";
|
|
2
|
+
import { u as Vt, c as Bt, t as Mt, b as Ut, C as Z, o as qe, f as M, D as Wt, h as X, i as L, X as Dt, x as ee, s as Ht, E as Je, v as Gt, w as Xt, y as jt, z as Yt } from "./index-DKpp7RIH.js";
|
|
3
|
+
import { t as Ke, u as qt } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as Qe } from "./useNestedProp-D-8c0o4p.js";
|
|
5
|
+
import { u as Jt } from "./usePrinter-NUeckmCX.js";
|
|
6
|
+
import { u as Kt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
|
+
import { u as Qt } from "./useChartAccessibility-9icAAmYg.js";
|
|
8
|
+
import { u as Zt, B as el } from "./useLoading-D7YHNtLX.js";
|
|
9
|
+
import tl from "./Title-VLWyIYrj.js";
|
|
10
|
+
import { S as ll } from "./Slicer-DYuvPkEM.js";
|
|
11
|
+
import { u as al } from "./useTimeLabels-DkzmKfZn.js";
|
|
12
|
+
import ol from "./img-DD_2wgY3.js";
|
|
13
|
+
import { u as sl } from "./useTimeLabelCollider-CIsgDrl9.js";
|
|
14
|
+
import { _ as ul } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
|
+
const il = ["id"], nl = ["xmlns", "aria-label", "viewBox"], rl = ["x", "y", "width", "height"], vl = { key: 1 }, dl = ["id"], cl = ["stop-color"], yl = ["stop-color"], hl = ["stop-color"], fl = ["id"], gl = ["stop-color"], pl = ["stop-color"], bl = ["stop-color"], ml = { key: 0 }, xl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], kl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], wl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Al = ["x", "y", "font-size", "fill", "font-weight"], _l = ["transform", "text-anchor", "font-size", "fill", "font-weight"], Cl = ["transform", "text-anchor", "font-size", "fill", "font-weight"], $l = ["x", "y", "width", "height", "fill", "rx"], zl = { key: 0 }, Sl = ["cx", "cy", "r", "fill"], Ll = ["cx", "cy", "r", "fill"], Tl = { key: 1 }, Il = ["x", "y", "width", "height", "rx", "fill"], Fl = ["x", "y", "width", "height", "fill", "rx"], Rl = ["x", "y", "height", "width", "fill", "rx"], Ol = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width"], Nl = ["x", "y", "height", "width", "fill", "onMouseover", "onMouseleave", "onClick"], Pl = {
|
|
16
|
+
key: 4,
|
|
17
|
+
class: "vue-data-ui-watermark"
|
|
18
|
+
}, El = ["innerHTML"], Vl = {
|
|
19
|
+
__name: "vue-ui-candlestick",
|
|
20
|
+
props: {
|
|
21
|
+
config: {
|
|
22
|
+
type: Object,
|
|
23
|
+
default() {
|
|
24
|
+
return {};
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
dataset: {
|
|
28
|
+
type: Array,
|
|
29
|
+
default() {
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
setup(Ze, { expose: et }) {
|
|
35
|
+
const tt = D(() => import("./vue-ui-accordion-Cpovz3RE.js")), lt = D(() => import("./DataTable-B3yakHEM.js")), at = D(() => import("./PackageVersion-6s4eI8W7.js")), ot = D(() => import("./PenAndPaper-JoUN7Ink.js")), st = D(() => import("./Tooltip-BS5naLS2.js")), ut = D(() => import("./UserOptions-BV_xM-sB.js")), { vue_ui_candlestick: it } = Vt(), h = Ze, te = g(() => !!h.dataset && h.dataset.length), $ = r(!1), le = r(null), w = r(Bt()), nt = r(null), ae = r(!1), oe = r(""), se = r(void 0), xe = r(0), T = r(null), ke = r(null), we = r(null), Ae = r(null), _e = r(null), Ce = r(null), j = r(0), $e = r(0), ze = r(0), ue = r(null), H = r(null), e = r(re()), { loading: z, FINAL_DATASET: A, manualLoading: ie } = Zt({
|
|
36
|
+
...Rt(h),
|
|
37
|
+
FINAL_CONFIG: e,
|
|
38
|
+
prepareConfig: re,
|
|
39
|
+
callback: () => {
|
|
40
|
+
Promise.resolve().then(async () => {
|
|
41
|
+
await ye();
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
skeletonDataset: [
|
|
45
|
+
[17040672e5, 10, 20, 2, 10, 30],
|
|
46
|
+
[17067456e5, 10, 30, 5, 20, 50],
|
|
47
|
+
[17092512e5, 20, 50, 10, 30, 80],
|
|
48
|
+
[17119296e5, 30, 80, 20, 50, 130],
|
|
49
|
+
[17145216e5, 50, 130, 30, 100, 210],
|
|
50
|
+
[17172e8, 80, 210, 50, 150, 340],
|
|
51
|
+
[1719792e6, 130, 340, 80, 280, 550],
|
|
52
|
+
[17224704e5, 210, 550, 130, 450, 890],
|
|
53
|
+
[17251488e5, 340, 890, 210, 750, 1440],
|
|
54
|
+
[17277408e5, 550, 1440, 340, 1230, 2330],
|
|
55
|
+
[17304192e5, 890, 2330, 550, 1950, 3770],
|
|
56
|
+
[17330112e5, 1440, 3770, 890, 3200, 5100]
|
|
57
|
+
],
|
|
58
|
+
skeletonConfig: Mt({
|
|
59
|
+
defaultConfig: e.value,
|
|
60
|
+
userConfig: {
|
|
61
|
+
useCssAnimation: !1,
|
|
62
|
+
userOptions: { show: !1 },
|
|
63
|
+
table: { show: !1 },
|
|
64
|
+
style: {
|
|
65
|
+
backgroundColor: "#99999930",
|
|
66
|
+
layout: {
|
|
67
|
+
candle: {
|
|
68
|
+
colors: {
|
|
69
|
+
bearish: "#BABABA",
|
|
70
|
+
bullish: "#CACACA"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
grid: {
|
|
74
|
+
stroke: "#6A6A6A",
|
|
75
|
+
yAxis: {
|
|
76
|
+
dataLabels: { show: !1 },
|
|
77
|
+
scale: {
|
|
78
|
+
min: null,
|
|
79
|
+
max: null
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
wick: {
|
|
84
|
+
stroke: "#6A6A6A",
|
|
85
|
+
extremity: {
|
|
86
|
+
color: "#6A6A6A"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
tooltip: { show: !1 },
|
|
91
|
+
zoom: {
|
|
92
|
+
show: !1,
|
|
93
|
+
startIndex: null,
|
|
94
|
+
endIndex: null
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
})
|
|
99
|
+
}), { userOptionsVisible: ne, setUserOptionsVisibility: Se, keepUserOptionState: Le } = Kt({ config: e.value }), { svgRef: Te } = Qt({ config: e.value.style.title });
|
|
100
|
+
function re() {
|
|
101
|
+
const t = Qe({
|
|
102
|
+
userConfig: h.config,
|
|
103
|
+
defaultConfig: it
|
|
104
|
+
});
|
|
105
|
+
let a = {};
|
|
106
|
+
return t.theme ? a = {
|
|
107
|
+
...Qe({
|
|
108
|
+
userConfig: Ut.vue_ui_candlestick[t.theme] || h.config,
|
|
109
|
+
defaultConfig: t
|
|
110
|
+
})
|
|
111
|
+
} : a = t, h.config && Z(h.config, "style.zoom.startIndex") ? a.style.zoom.startIndex = h.config.style.zoom.startIndex : a.style.zoom.startIndex = null, h.config && Z(h.config, "style.zoom.endIndex") ? a.style.zoom.endIndex = h.config.style.zoom.endIndex : a.style.zoom.endIndex = null, h.config && Z(h.config, "style.layout.grid.yAxis.scale.min") ? a.style.layout.grid.yAxis.scale.min = h.config.style.layout.grid.yAxis.scale.min : a.style.layout.grid.yAxis.scale.min = null, h.config && Z(h.config, "style.layout.grid.yAxis.scale.max") ? a.style.layout.grid.yAxis.scale.max = h.config.style.layout.grid.yAxis.scale.max : a.style.layout.grid.yAxis.scale.max = null, a;
|
|
112
|
+
}
|
|
113
|
+
pe(() => h.config, (t) => {
|
|
114
|
+
z.value || (e.value = re()), ne.value = !e.value.userOptions.showOnChartHover, Ie(), j.value += 1, ze.value += 1, $e.value += 1, _.value.showTable = e.value.table.show, _.value.showTooltip = e.value.style.tooltip.show;
|
|
115
|
+
}, { deep: !0 }), pe(() => h.dataset, (t) => {
|
|
116
|
+
Array.isArray(t) && t.length > 0 && (ie.value = !1), c.value.start = 0, c.value.end = t.length, j.value += 1;
|
|
117
|
+
}, { deep: !0 });
|
|
118
|
+
const d = r({
|
|
119
|
+
height: e.value.style.height,
|
|
120
|
+
width: e.value.style.width,
|
|
121
|
+
xAxisFontSize: e.value.style.layout.grid.xAxis.dataLabels.fontSize,
|
|
122
|
+
yAxisFontSize: e.value.style.layout.grid.yAxis.dataLabels.fontSize
|
|
123
|
+
}), I = Xe(null), U = Xe(null);
|
|
124
|
+
Ot(() => {
|
|
125
|
+
Ie();
|
|
126
|
+
});
|
|
127
|
+
const F = g(() => !!e.value.debug);
|
|
128
|
+
function Ie() {
|
|
129
|
+
if (qe(h.dataset) && (M({
|
|
130
|
+
componentName: "VueUiCandlestick",
|
|
131
|
+
type: "dataset",
|
|
132
|
+
debug: F.value
|
|
133
|
+
}), ie.value = !0), qe(h.dataset) || (ie.value = e.value.loading), setTimeout(() => {
|
|
134
|
+
$.value = !0;
|
|
135
|
+
}, 10), e.value.responsive) {
|
|
136
|
+
const a = Ke(() => {
|
|
137
|
+
$.value = !1;
|
|
138
|
+
const { width: l, height: o } = qt({
|
|
139
|
+
chart: T.value,
|
|
140
|
+
title: e.value.style.title.text ? ke.value : null,
|
|
141
|
+
slicer: Ae.value,
|
|
142
|
+
legend: we.value,
|
|
143
|
+
source: _e.value,
|
|
144
|
+
noTitle: Ce.value
|
|
145
|
+
});
|
|
146
|
+
requestAnimationFrame(() => {
|
|
147
|
+
d.value.width = l, d.value.height = o - 12, e.value.responsiveProportionalSizing ? (d.value.xAxisFontSize = Je({
|
|
148
|
+
relator: Math.min(l, o),
|
|
149
|
+
adjuster: e.value.style.width,
|
|
150
|
+
source: e.value.style.layout.grid.xAxis.dataLabels.fontSize,
|
|
151
|
+
threshold: 6,
|
|
152
|
+
fallback: 6
|
|
153
|
+
}), d.value.yAxisFontSize = Je({
|
|
154
|
+
relator: Math.min(l, o),
|
|
155
|
+
adjuster: e.value.style.width,
|
|
156
|
+
source: e.value.style.layout.grid.yAxis.dataLabels.fontSize,
|
|
157
|
+
threshold: 6,
|
|
158
|
+
fallback: 6
|
|
159
|
+
})) : (d.value.xAxisFontSize = e.value.style.layout.grid.xAxis.dataLabels.fontSize, d.value.yAxisFontSize = e.value.style.layout.grid.yAxis.dataLabels.fontSize), le.value && clearTimeout(le.value), le.value = setTimeout(() => {
|
|
160
|
+
$.value = !0;
|
|
161
|
+
}, 10);
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
I.value && (U.value && I.value.unobserve(U.value), I.value.disconnect()), I.value = new ResizeObserver(a), U.value = T.value.parentNode, I.value.observe(U.value);
|
|
165
|
+
}
|
|
166
|
+
ye();
|
|
167
|
+
}
|
|
168
|
+
je(() => {
|
|
169
|
+
I.value && (U.value && I.value.unobserve(U.value), I.value.disconnect());
|
|
170
|
+
});
|
|
171
|
+
const { isPrinting: Fe, isImaging: Re, generatePdf: Oe, generateImage: Ne } = Jt({
|
|
172
|
+
elementId: `vue-ui-candlestick_${w.value}`,
|
|
173
|
+
fileName: e.value.style.title.text || "vue-ui-candlestick",
|
|
174
|
+
options: e.value.userOptions.print
|
|
175
|
+
}), rt = g(() => e.value.userOptions.show && !e.value.style.title.text), _ = r({
|
|
176
|
+
showTable: e.value.table.show,
|
|
177
|
+
showTooltip: e.value.style.tooltip.show
|
|
178
|
+
}), ve = r(0), vt = Ke((t) => {
|
|
179
|
+
ve.value = t;
|
|
180
|
+
}, 100);
|
|
181
|
+
Nt((t) => {
|
|
182
|
+
const a = H.value;
|
|
183
|
+
if (!a) return;
|
|
184
|
+
const l = new ResizeObserver((o) => {
|
|
185
|
+
vt(o[0].contentRect.height);
|
|
186
|
+
});
|
|
187
|
+
l.observe(a), t(() => l.disconnect());
|
|
188
|
+
}), je(() => {
|
|
189
|
+
ve.value = 0;
|
|
190
|
+
});
|
|
191
|
+
const Pe = g(() => {
|
|
192
|
+
let t = 0;
|
|
193
|
+
return H.value && (t = ve.value + d.value.xAxisFontSize), t;
|
|
194
|
+
});
|
|
195
|
+
function dt() {
|
|
196
|
+
let t = e.value.style.layout.grid.yAxis.dataLabels.offsetX;
|
|
197
|
+
return ue.value && (t = Array.from(ue.value.querySelectorAll("text")).reduce((o, m) => {
|
|
198
|
+
const f = m.getComputedTextLength();
|
|
199
|
+
return f > o ? f : o;
|
|
200
|
+
}, 0)), t + 13;
|
|
201
|
+
}
|
|
202
|
+
const n = g(() => {
|
|
203
|
+
const { top: t, right: a, bottom: l, left: o } = e.value.style.layout.padding, m = dt(), f = 12;
|
|
204
|
+
return {
|
|
205
|
+
top: t + f,
|
|
206
|
+
right: d.value.width - a,
|
|
207
|
+
left: o + m,
|
|
208
|
+
bottom: d.value.height - l - Pe.value,
|
|
209
|
+
width: d.value.width - o - a - m,
|
|
210
|
+
height: d.value.height - t - l - Pe.value - f
|
|
211
|
+
};
|
|
212
|
+
}), G = g(() => A.value.length), c = r({
|
|
213
|
+
start: 0,
|
|
214
|
+
end: G.value
|
|
215
|
+
}), Ee = g(() => A.value.map((t, a) => ({
|
|
216
|
+
...t,
|
|
217
|
+
absoluteIndex: a
|
|
218
|
+
})).slice(c.value.start, c.value.end)), de = g(() => (A.value.forEach((t, a) => {
|
|
219
|
+
[null, void 0].includes(t[0]) && M({
|
|
220
|
+
componentName: "VueUiCandlestick",
|
|
221
|
+
type: "datasetAttribute",
|
|
222
|
+
property: "period (index 0)",
|
|
223
|
+
index: a,
|
|
224
|
+
debug: F.value
|
|
225
|
+
}), [null, void 0].includes(t[1]) && M({
|
|
226
|
+
componentName: "VueUiCandlestick",
|
|
227
|
+
type: "datasetAttribute",
|
|
228
|
+
property: "open (index 1)",
|
|
229
|
+
index: a,
|
|
230
|
+
debug: F.value
|
|
231
|
+
}), [null, void 0].includes(t[2]) && M({
|
|
232
|
+
componentName: "VueUiCandlestick",
|
|
233
|
+
type: "datasetAttribute",
|
|
234
|
+
property: "high (index 2)",
|
|
235
|
+
index: a,
|
|
236
|
+
debug: F.value
|
|
237
|
+
}), [null, void 0].includes(t[3]) && M({
|
|
238
|
+
componentName: "VueUiCandlestick",
|
|
239
|
+
type: "datasetAttribute",
|
|
240
|
+
property: "low (index 3)",
|
|
241
|
+
index: a,
|
|
242
|
+
debug: F.value
|
|
243
|
+
}), [null, void 0].includes(t[4]) && M({
|
|
244
|
+
componentName: "VueUiCandlestick",
|
|
245
|
+
type: "datasetAttribute",
|
|
246
|
+
property: "last (index 4)",
|
|
247
|
+
index: a,
|
|
248
|
+
debug: F.value
|
|
249
|
+
}), [null, void 0].includes(t[5]) && M({
|
|
250
|
+
componentName: "VueUiCandlestick",
|
|
251
|
+
type: "datasetAttribute",
|
|
252
|
+
property: "volume (index 5)",
|
|
253
|
+
index: a,
|
|
254
|
+
debug: F.value
|
|
255
|
+
});
|
|
256
|
+
}), Ee.value.map((t) => ({
|
|
257
|
+
absoluteIndex: t.absoluteIndex,
|
|
258
|
+
period: t[0],
|
|
259
|
+
open: t[1],
|
|
260
|
+
high: t[2],
|
|
261
|
+
low: t[3],
|
|
262
|
+
last: t[4],
|
|
263
|
+
volume: t[5]
|
|
264
|
+
})))), v = g(() => n.value.width / Ee.value.length), Ve = g(() => {
|
|
265
|
+
const t = e.value.style.layout.grid.yAxis.scale.max === null ? Math.max(...de.value.map((l) => l.high)) : e.value.style.layout.grid.yAxis.scale.max, a = e.value.style.layout.grid.yAxis.scale.min === null ? 0 : e.value.style.layout.grid.yAxis.scale.min;
|
|
266
|
+
return {
|
|
267
|
+
max: t,
|
|
268
|
+
min: a
|
|
269
|
+
};
|
|
270
|
+
}), C = g(() => Wt(Ve.value.min, Ve.value.max, e.value.style.layout.grid.yAxis.dataLabels.steps));
|
|
271
|
+
function Y(t, a) {
|
|
272
|
+
return {
|
|
273
|
+
...t,
|
|
274
|
+
x: X(n.value.left + a * v.value + v.value / 2),
|
|
275
|
+
y: X(n.value.top + (1 - (t - C.value.min) / (C.value.max - C.value.min)) * n.value.height),
|
|
276
|
+
value: X(t)
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
const k = g(() => de.value.map((t, a) => {
|
|
280
|
+
const l = Y(t.open, a), o = Y(t.high, a), m = Y(t.low, a), f = Y(t.last, a), O = t.last > t.open;
|
|
281
|
+
return {
|
|
282
|
+
period: t.period,
|
|
283
|
+
open: l,
|
|
284
|
+
high: o,
|
|
285
|
+
low: m,
|
|
286
|
+
last: f,
|
|
287
|
+
volume: t.volume,
|
|
288
|
+
isBullish: O,
|
|
289
|
+
absoluteIndex: t.absoluteIndex
|
|
290
|
+
};
|
|
291
|
+
}));
|
|
292
|
+
function ct(t) {
|
|
293
|
+
return X((t - C.value.min) / (C.value.max - C.value.min));
|
|
294
|
+
}
|
|
295
|
+
const yt = g(() => C.value.ticks.map((t) => ({
|
|
296
|
+
y: n.value.bottom - n.value.height * ct(t),
|
|
297
|
+
value: X(t)
|
|
298
|
+
}))), ht = g(() => de.value.map((t) => t.period)), R = g(() => al({
|
|
299
|
+
values: A.value.map((t) => t[0]),
|
|
300
|
+
maxDatapoints: A.value.length,
|
|
301
|
+
formatter: e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter,
|
|
302
|
+
start: c.value.start,
|
|
303
|
+
end: c.value.end
|
|
304
|
+
})), Be = g(() => e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? {
|
|
305
|
+
start: R.value.find((t) => t.absoluteIndex === c.value.start).text,
|
|
306
|
+
end: R.value.find((t) => t.absoluteIndex === c.value.end - 1).text
|
|
307
|
+
} : {
|
|
308
|
+
start: A.value[c.value.start] ? A.value[c.value.start][0] : A.value[0][0],
|
|
309
|
+
end: A.value[c.value.end - 1] ? A.value[c.value.end - 1][0] : A.value.at(-1)[0]
|
|
310
|
+
}), ce = r(null);
|
|
311
|
+
function ft(t, a) {
|
|
312
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: a, seriesIndex: t + c.value.start });
|
|
313
|
+
}
|
|
314
|
+
function gt(t, a) {
|
|
315
|
+
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: a, seriesIndex: t + c.value.start }), se.value = void 0, ae.value = !1;
|
|
316
|
+
}
|
|
317
|
+
function pt(t, a) {
|
|
318
|
+
e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: a, seriesIndex: t + c.value.start }), se.value = t, ce.value = {
|
|
319
|
+
datapoint: a,
|
|
320
|
+
seriesIndex: t,
|
|
321
|
+
series: k.value,
|
|
322
|
+
config: e.value
|
|
323
|
+
};
|
|
324
|
+
const l = e.value.style.tooltip.customFormat;
|
|
325
|
+
if (jt(l) && Yt(() => l({
|
|
326
|
+
seriesIndex: t,
|
|
327
|
+
datapoint: a,
|
|
328
|
+
series: k.value,
|
|
329
|
+
config: e.value
|
|
330
|
+
})))
|
|
331
|
+
oe.value = l({
|
|
332
|
+
seriesIndex: t,
|
|
333
|
+
datapoint: a,
|
|
334
|
+
series: k.value,
|
|
335
|
+
config: e.value
|
|
336
|
+
});
|
|
337
|
+
else if (e.value.style.tooltip.show) {
|
|
338
|
+
let o = "";
|
|
339
|
+
const { period: m, open: f, high: O, low: fe, last: ge, volume: K, isBullish: Ge } = k.value[t], { period: Bl, open: At, high: _t, low: Ct, last: $t, volume: zt } = e.value.translations, St = e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? R.value[t].text : m;
|
|
340
|
+
o += `<div><svg style="margin-right:6px" viewBox="0 0 12 12" height="12" width="12"><rect x="0" y="0" height="12" width="12" rx="${e.value.style.layout.candle.borderRadius * 3}" stroke="${e.value.style.layout.candle.stroke}" stroke-width="${e.value.style.layout.candle.strokeWidth}"
|
|
341
|
+
fill="${e.value.style.layout.candle.gradient.show ? Ge ? `url(#bullish_gradient_${w.value})` : `url(#bearish_gradient_${w.value})` : Ge ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}"/></svg>${St}</div>`, o += `${zt} : <b>${isNaN(K) ? "-" : Number(K.toFixed(e.value.style.tooltip.roundingValue)).toLocaleString()}</b>`, o += `<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${e.value.style.tooltip.borderColor}">`;
|
|
342
|
+
const Lt = L({
|
|
343
|
+
p: e.value.style.tooltip.prefix,
|
|
344
|
+
v: f.value,
|
|
345
|
+
s: e.value.style.tooltip.suffix,
|
|
346
|
+
r: e.value.style.tooltip.roundingValue
|
|
347
|
+
});
|
|
348
|
+
o += `<div>${At}: <b>${Lt}</b></div>`;
|
|
349
|
+
const Tt = L({
|
|
350
|
+
p: e.value.style.tooltip.prefix,
|
|
351
|
+
v: O.value,
|
|
352
|
+
s: e.value.style.tooltip.suffix,
|
|
353
|
+
r: e.value.style.tooltip.roundingValue
|
|
354
|
+
});
|
|
355
|
+
o += `<div>${_t}: <b>${Tt}</b></div>`;
|
|
356
|
+
const It = L({
|
|
357
|
+
p: e.value.style.tooltip.prefix,
|
|
358
|
+
v: fe.value,
|
|
359
|
+
s: e.value.style.tooltip.suffix,
|
|
360
|
+
r: e.value.style.tooltip.roundingValue
|
|
361
|
+
});
|
|
362
|
+
o += `<div>${Ct}: <b>${It}</b></div>`;
|
|
363
|
+
const Ft = L({
|
|
364
|
+
p: e.value.style.tooltip.prefix,
|
|
365
|
+
v: ge.value,
|
|
366
|
+
s: e.value.style.tooltip.suffix,
|
|
367
|
+
r: e.value.style.tooltip.roundingValue
|
|
368
|
+
});
|
|
369
|
+
o += `<div>${$t}: <b>${Ft}</b></div>`, o += "</div>", oe.value = `<div style="text-align:right">${o}</div>`;
|
|
370
|
+
}
|
|
371
|
+
ae.value = !0;
|
|
372
|
+
}
|
|
373
|
+
function bt() {
|
|
374
|
+
ye();
|
|
375
|
+
}
|
|
376
|
+
const Me = r(null);
|
|
377
|
+
async function ye() {
|
|
378
|
+
await be(), await be();
|
|
379
|
+
const { startIndex: t, endIndex: a } = e.value.style.zoom, l = Me.value, o = G.value;
|
|
380
|
+
(t != null || a != null) && l ? (t != null && l.setStartValue(t), a != null && l.setEndValue(mt(a + 1))) : (c.value = { start: 0, end: o }, j.value += 1);
|
|
381
|
+
}
|
|
382
|
+
function mt(t) {
|
|
383
|
+
const a = G.value;
|
|
384
|
+
return t > a ? a : t < 0 || e.value.style.zoom.startIndex !== null && t < e.value.style.zoom.startIndex ? e.value.style.zoom.startIndex !== null ? e.value.style.zoom.startIndex + 1 : 1 : t;
|
|
385
|
+
}
|
|
386
|
+
function Ue(t = null) {
|
|
387
|
+
be(() => {
|
|
388
|
+
const a = [e.value.translations.period, e.value.translations.open, e.value.translations.high, e.value.translations.low, e.value.translations.last, e.value.translations.volume], l = k.value.map((f, O) => [
|
|
389
|
+
e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? R.value[O].text : f.period,
|
|
390
|
+
f.open.value,
|
|
391
|
+
f.high.value,
|
|
392
|
+
f.low.value,
|
|
393
|
+
f.last.value,
|
|
394
|
+
f.volume
|
|
395
|
+
]), o = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([a]).concat(l), m = Gt(o);
|
|
396
|
+
t ? t(m) : Xt({ csvContent: m, title: e.value.style.title.text || "vue-ui-candlestick" });
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
const q = g(() => {
|
|
400
|
+
const t = k.value.map((o, m) => {
|
|
401
|
+
const f = e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? R.value[m].text : o.period, O = L({
|
|
402
|
+
p: e.value.table.td.prefix,
|
|
403
|
+
v: o.open.value,
|
|
404
|
+
s: e.value.table.td.suffix,
|
|
405
|
+
r: e.value.table.td.roundingValue
|
|
406
|
+
}), fe = L({
|
|
407
|
+
p: e.value.table.td.prefix,
|
|
408
|
+
v: o.high.value,
|
|
409
|
+
s: e.value.table.td.suffix,
|
|
410
|
+
r: e.value.table.td.roundingValue
|
|
411
|
+
}), ge = L({
|
|
412
|
+
p: e.value.table.td.prefix,
|
|
413
|
+
v: o.low.value,
|
|
414
|
+
s: e.value.table.td.suffix,
|
|
415
|
+
r: e.value.table.td.roundingValue
|
|
416
|
+
}), K = L({
|
|
417
|
+
p: e.value.table.td.prefix,
|
|
418
|
+
v: o.last.value,
|
|
419
|
+
s: e.value.table.td.suffix,
|
|
420
|
+
r: e.value.table.td.roundingValue
|
|
421
|
+
});
|
|
422
|
+
return [
|
|
423
|
+
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" height="12" width="12" style="margin-right: 6px"><rect x="0" y="0" height="12" width="12" rx="${e.value.style.layout.candle.borderRadius * 3}" fill="${e.value.style.layout.candle.gradient.show ? o.isBullish ? `url(#bullish_gradient_${w.value}` : `url(#bearish_gradient_${w.value})` : o.isBullish ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}"/></svg> ${f}`,
|
|
424
|
+
O,
|
|
425
|
+
fe,
|
|
426
|
+
ge,
|
|
427
|
+
K,
|
|
428
|
+
`${isNaN(o.volume) ? "-" : o.volume.toLocaleString()}`
|
|
429
|
+
];
|
|
430
|
+
}), a = {
|
|
431
|
+
th: {
|
|
432
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
433
|
+
color: e.value.table.th.color,
|
|
434
|
+
outline: e.value.table.th.outline
|
|
435
|
+
},
|
|
436
|
+
td: {
|
|
437
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
438
|
+
color: e.value.table.td.color,
|
|
439
|
+
outline: e.value.table.td.outline
|
|
440
|
+
},
|
|
441
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
442
|
+
}, l = [
|
|
443
|
+
e.value.translations.period,
|
|
444
|
+
e.value.translations.open,
|
|
445
|
+
e.value.translations.high,
|
|
446
|
+
e.value.translations.low,
|
|
447
|
+
e.value.translations.last,
|
|
448
|
+
e.value.translations.volume
|
|
449
|
+
];
|
|
450
|
+
return { head: l, body: t, config: a, colNames: l };
|
|
451
|
+
}), W = r(!1);
|
|
452
|
+
function We(t) {
|
|
453
|
+
W.value = t, xe.value += 1;
|
|
454
|
+
}
|
|
455
|
+
function De() {
|
|
456
|
+
_.value.showTable = !_.value.showTable;
|
|
457
|
+
}
|
|
458
|
+
function He() {
|
|
459
|
+
_.value.showTooltip = !_.value.showTooltip;
|
|
460
|
+
}
|
|
461
|
+
const J = r(!1);
|
|
462
|
+
function he() {
|
|
463
|
+
J.value = !J.value;
|
|
464
|
+
}
|
|
465
|
+
async function xt({ scale: t = 2 } = {}) {
|
|
466
|
+
if (!T.value) return;
|
|
467
|
+
const { width: a, height: l } = T.value.getBoundingClientRect(), o = a / l, { imageUri: m, base64: f } = await ol({ domElement: T.value, base64: !0, img: !0, scale: t });
|
|
468
|
+
return {
|
|
469
|
+
imageUri: m,
|
|
470
|
+
base64: f,
|
|
471
|
+
title: e.value.style.title.text,
|
|
472
|
+
width: a,
|
|
473
|
+
height: l,
|
|
474
|
+
aspectRatio: o
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
const kt = g(() => d.value.width), wt = g(() => d.value.height);
|
|
478
|
+
return sl({
|
|
479
|
+
timeLabelsEls: H,
|
|
480
|
+
timeLabels: R,
|
|
481
|
+
slicer: c,
|
|
482
|
+
configRef: e,
|
|
483
|
+
rotationPath: ["style", "layout", "grid", "xAxis", "dataLabels", "rotation"],
|
|
484
|
+
autoRotatePath: ["style", "layout", "grid", "xAxis", "dataLabels", "autoRotate"],
|
|
485
|
+
isAutoSize: !1,
|
|
486
|
+
width: kt,
|
|
487
|
+
height: wt
|
|
488
|
+
}), pe(e, () => {
|
|
489
|
+
_.value = {
|
|
490
|
+
showTable: e.value.table.show,
|
|
491
|
+
showTooltip: e.value.style.tooltip.show
|
|
492
|
+
};
|
|
493
|
+
}, { immediate: !0 }), et({
|
|
494
|
+
getImage: xt,
|
|
495
|
+
generatePdf: Oe,
|
|
496
|
+
generateCsv: Ue,
|
|
497
|
+
generateImage: Ne,
|
|
498
|
+
toggleTable: De,
|
|
499
|
+
toggleTooltip: He,
|
|
500
|
+
toggleAnnotator: he,
|
|
501
|
+
toggleFullscreen: We
|
|
502
|
+
}), (t, a) => (s(), i("div", {
|
|
503
|
+
ref_key: "candlestickChart",
|
|
504
|
+
ref: T,
|
|
505
|
+
class: S(`vue-ui-candlestick ${W.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
506
|
+
style: me(`position:relative;font-family:${e.value.style.fontFamily}; text-align:center;background:${e.value.style.backgroundColor}; ${e.value.responsive ? "height: 100%" : ""}`),
|
|
507
|
+
id: `vue-ui-candlestick_${w.value}`,
|
|
508
|
+
onMouseenter: a[3] || (a[3] = () => u(Se)(!0)),
|
|
509
|
+
onMouseleave: a[4] || (a[4] = () => u(Se)(!1))
|
|
510
|
+
}, [
|
|
511
|
+
e.value.userOptions.buttons.annotator ? (s(), N(u(ot), {
|
|
512
|
+
key: 0,
|
|
513
|
+
svgRef: u(Te),
|
|
514
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
515
|
+
color: e.value.style.color,
|
|
516
|
+
active: J.value,
|
|
517
|
+
onClose: he
|
|
518
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : p("", !0),
|
|
519
|
+
rt.value ? (s(), i("div", {
|
|
520
|
+
key: 1,
|
|
521
|
+
ref_key: "noTitle",
|
|
522
|
+
ref: Ce,
|
|
523
|
+
class: "vue-data-ui-no-title-space",
|
|
524
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
525
|
+
}, null, 512)) : p("", !0),
|
|
526
|
+
e.value.style.title.text ? (s(), i("div", {
|
|
527
|
+
key: 2,
|
|
528
|
+
ref_key: "chartTitle",
|
|
529
|
+
ref: ke,
|
|
530
|
+
style: "width:100%;background:transparent"
|
|
531
|
+
}, [
|
|
532
|
+
(s(), N(tl, {
|
|
533
|
+
key: `title_${ze.value}`,
|
|
534
|
+
config: {
|
|
535
|
+
title: {
|
|
536
|
+
cy: "candlestick-div-title",
|
|
537
|
+
...e.value.style.title
|
|
538
|
+
},
|
|
539
|
+
subtitle: {
|
|
540
|
+
cy: "candlestick-div-subtitle",
|
|
541
|
+
...e.value.style.title.subtitle
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}, null, 8, ["config"]))
|
|
545
|
+
], 512)) : p("", !0),
|
|
546
|
+
e.value.userOptions.show && te.value && (u(Le) || u(ne)) ? (s(), N(u(ut), {
|
|
547
|
+
ref_key: "details",
|
|
548
|
+
ref: nt,
|
|
549
|
+
key: `user_options_${xe.value}`,
|
|
550
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
551
|
+
color: e.value.style.color,
|
|
552
|
+
isImaging: u(Re),
|
|
553
|
+
isPrinting: u(Fe),
|
|
554
|
+
uid: w.value,
|
|
555
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
|
|
556
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
557
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
558
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
559
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
560
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
561
|
+
isFullscreen: W.value,
|
|
562
|
+
isTooltip: _.value.showTooltip,
|
|
563
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
564
|
+
chartElement: T.value,
|
|
565
|
+
position: e.value.userOptions.position,
|
|
566
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
567
|
+
isAnnotation: J.value,
|
|
568
|
+
callbacks: e.value.userOptions.callbacks,
|
|
569
|
+
printScale: e.value.userOptions.print.scale,
|
|
570
|
+
onToggleFullscreen: We,
|
|
571
|
+
onGeneratePdf: u(Oe),
|
|
572
|
+
onGenerateCsv: Ue,
|
|
573
|
+
onGenerateImage: u(Ne),
|
|
574
|
+
onToggleTable: De,
|
|
575
|
+
onToggleTooltip: He,
|
|
576
|
+
onToggleAnnotator: he,
|
|
577
|
+
style: me({
|
|
578
|
+
visibility: u(Le) ? u(ne) ? "visible" : "hidden" : "visible"
|
|
579
|
+
})
|
|
580
|
+
}, Pt({ _: 2 }, [
|
|
581
|
+
t.$slots.menuIcon ? {
|
|
582
|
+
name: "menuIcon",
|
|
583
|
+
fn: x(({ isOpen: l, color: o }) => [
|
|
584
|
+
b(t.$slots, "menuIcon", P(E({ isOpen: l, color: o })), void 0, !0)
|
|
585
|
+
]),
|
|
586
|
+
key: "0"
|
|
587
|
+
} : void 0,
|
|
588
|
+
t.$slots.optionTooltip ? {
|
|
589
|
+
name: "optionTooltip",
|
|
590
|
+
fn: x(() => [
|
|
591
|
+
b(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
592
|
+
]),
|
|
593
|
+
key: "1"
|
|
594
|
+
} : void 0,
|
|
595
|
+
t.$slots.optionPdf ? {
|
|
596
|
+
name: "optionPdf",
|
|
597
|
+
fn: x(() => [
|
|
598
|
+
b(t.$slots, "optionPdf", {}, void 0, !0)
|
|
599
|
+
]),
|
|
600
|
+
key: "2"
|
|
601
|
+
} : void 0,
|
|
602
|
+
t.$slots.optionCsv ? {
|
|
603
|
+
name: "optionCsv",
|
|
604
|
+
fn: x(() => [
|
|
605
|
+
b(t.$slots, "optionCsv", {}, void 0, !0)
|
|
606
|
+
]),
|
|
607
|
+
key: "3"
|
|
608
|
+
} : void 0,
|
|
609
|
+
t.$slots.optionImg ? {
|
|
610
|
+
name: "optionImg",
|
|
611
|
+
fn: x(() => [
|
|
612
|
+
b(t.$slots, "optionImg", {}, void 0, !0)
|
|
613
|
+
]),
|
|
614
|
+
key: "4"
|
|
615
|
+
} : void 0,
|
|
616
|
+
t.$slots.optionTable ? {
|
|
617
|
+
name: "optionTable",
|
|
618
|
+
fn: x(() => [
|
|
619
|
+
b(t.$slots, "optionTable", {}, void 0, !0)
|
|
620
|
+
]),
|
|
621
|
+
key: "5"
|
|
622
|
+
} : void 0,
|
|
623
|
+
t.$slots.optionFullscreen ? {
|
|
624
|
+
name: "optionFullscreen",
|
|
625
|
+
fn: x(({ toggleFullscreen: l, isFullscreen: o }) => [
|
|
626
|
+
b(t.$slots, "optionFullscreen", P(E({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
|
|
627
|
+
]),
|
|
628
|
+
key: "6"
|
|
629
|
+
} : void 0,
|
|
630
|
+
t.$slots.optionAnnotator ? {
|
|
631
|
+
name: "optionAnnotator",
|
|
632
|
+
fn: x(({ toggleAnnotator: l, isAnnotator: o }) => [
|
|
633
|
+
b(t.$slots, "optionAnnotator", P(E({ toggleAnnotator: l, isAnnotator: o })), void 0, !0)
|
|
634
|
+
]),
|
|
635
|
+
key: "7"
|
|
636
|
+
} : void 0
|
|
637
|
+
]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : p("", !0),
|
|
638
|
+
(s(), i("svg", {
|
|
639
|
+
ref_key: "svgRef",
|
|
640
|
+
ref: Te,
|
|
641
|
+
xmlns: u(Dt),
|
|
642
|
+
"aria-label": e.value.style.title.text || "candlestick chart",
|
|
643
|
+
class: S({ "vue-data-ui-fullscreen--on": W.value, "vue-data-ui-fulscreen--off": !W.value }),
|
|
644
|
+
viewBox: `0 0 ${d.value.width <= 0 ? 10 : d.value.width} ${d.value.height <= 0 ? 10 : d.value.height}`,
|
|
645
|
+
style: me(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.color}`)
|
|
646
|
+
}, [
|
|
647
|
+
Ye(u(at)),
|
|
648
|
+
t.$slots["chart-background"] ? (s(), i("foreignObject", {
|
|
649
|
+
key: 0,
|
|
650
|
+
x: n.value.left,
|
|
651
|
+
y: n.value.top,
|
|
652
|
+
width: Math.max(0.1, n.value.width),
|
|
653
|
+
height: Math.max(0.1, n.value.height),
|
|
654
|
+
style: {
|
|
655
|
+
pointerEvents: "none"
|
|
656
|
+
}
|
|
657
|
+
}, [
|
|
658
|
+
b(t.$slots, "chart-background", {}, void 0, !0)
|
|
659
|
+
], 8, rl)) : p("", !0),
|
|
660
|
+
k.value.length > 0 ? (s(), i("g", vl, [
|
|
661
|
+
y("defs", null, [
|
|
662
|
+
y("linearGradient", {
|
|
663
|
+
id: `bearish_gradient_${w.value}`,
|
|
664
|
+
x2: "0%",
|
|
665
|
+
y2: "100%"
|
|
666
|
+
}, [
|
|
667
|
+
y("stop", {
|
|
668
|
+
offset: "0%",
|
|
669
|
+
"stop-color": e.value.style.layout.candle.colors.bearish
|
|
670
|
+
}, null, 8, cl),
|
|
671
|
+
y("stop", {
|
|
672
|
+
offset: "50%",
|
|
673
|
+
"stop-color": `${u(ee)(e.value.style.layout.candle.colors.bearish, 0.02)}DE`
|
|
674
|
+
}, null, 8, yl),
|
|
675
|
+
y("stop", {
|
|
676
|
+
offset: "100%",
|
|
677
|
+
"stop-color": `${u(ee)(e.value.style.layout.candle.colors.bearish, 0.05)}66`
|
|
678
|
+
}, null, 8, hl)
|
|
679
|
+
], 8, dl),
|
|
680
|
+
y("linearGradient", {
|
|
681
|
+
id: `bullish_gradient_${w.value}`,
|
|
682
|
+
x2: "0%",
|
|
683
|
+
y2: "100%"
|
|
684
|
+
}, [
|
|
685
|
+
y("stop", {
|
|
686
|
+
offset: "0%",
|
|
687
|
+
"stop-color": e.value.style.layout.candle.colors.bullish
|
|
688
|
+
}, null, 8, gl),
|
|
689
|
+
y("stop", {
|
|
690
|
+
offset: "50%",
|
|
691
|
+
"stop-color": `${u(ee)(e.value.style.layout.candle.colors.bullish, 0.02)}DE`
|
|
692
|
+
}, null, 8, pl),
|
|
693
|
+
y("stop", {
|
|
694
|
+
offset: "100%",
|
|
695
|
+
"stop-color": `${u(ee)(e.value.style.layout.candle.colors.bullish, 0.05)}66`
|
|
696
|
+
}, null, 8, bl)
|
|
697
|
+
], 8, fl)
|
|
698
|
+
]),
|
|
699
|
+
e.value.style.layout.grid.show ? (s(), i("g", ml, [
|
|
700
|
+
y("line", {
|
|
701
|
+
x1: n.value.left,
|
|
702
|
+
x2: n.value.left,
|
|
703
|
+
y1: n.value.top,
|
|
704
|
+
y2: n.value.bottom,
|
|
705
|
+
stroke: e.value.style.layout.grid.stroke,
|
|
706
|
+
"stroke-width": e.value.style.layout.grid.strokeWidth,
|
|
707
|
+
"stroke-linecap": "round"
|
|
708
|
+
}, null, 8, xl),
|
|
709
|
+
y("line", {
|
|
710
|
+
x1: n.value.left,
|
|
711
|
+
x2: n.value.right,
|
|
712
|
+
y1: n.value.bottom,
|
|
713
|
+
y2: n.value.bottom,
|
|
714
|
+
stroke: e.value.style.layout.grid.stroke,
|
|
715
|
+
"stroke-width": e.value.style.layout.grid.strokeWidth,
|
|
716
|
+
"stroke-linecap": "round"
|
|
717
|
+
}, null, 8, kl)
|
|
718
|
+
])) : p("", !0),
|
|
719
|
+
e.value.style.layout.grid.yAxis.dataLabels.show ? (s(), i("g", {
|
|
720
|
+
key: 1,
|
|
721
|
+
ref_key: "scaleLabels",
|
|
722
|
+
ref: ue
|
|
723
|
+
}, [
|
|
724
|
+
(s(!0), i(V, null, B(yt.value, (l, o) => (s(), i("g", null, [
|
|
725
|
+
l.value >= C.value.min && l.value <= C.value.max ? (s(), i("line", {
|
|
726
|
+
key: 0,
|
|
727
|
+
x1: n.value.left,
|
|
728
|
+
x2: n.value.left - 5,
|
|
729
|
+
y1: l.y,
|
|
730
|
+
y2: l.y,
|
|
731
|
+
stroke: e.value.style.layout.grid.stroke,
|
|
732
|
+
"stroke-width": e.value.style.layout.grid.strokeWidth,
|
|
733
|
+
"stroke-linecap": "round"
|
|
734
|
+
}, null, 8, wl)) : p("", !0),
|
|
735
|
+
l.value >= C.value.min && l.value <= C.value.max ? (s(), i("text", {
|
|
736
|
+
key: 1,
|
|
737
|
+
x: n.value.left - 8 + e.value.style.layout.grid.yAxis.dataLabels.offsetX,
|
|
738
|
+
y: l.y + d.value.yAxisFontSize / 3,
|
|
739
|
+
"font-size": d.value.yAxisFontSize,
|
|
740
|
+
"text-anchor": "end",
|
|
741
|
+
fill: e.value.style.layout.grid.yAxis.dataLabels.color,
|
|
742
|
+
"font-weight": e.value.style.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
|
|
743
|
+
}, Q(u(L)({
|
|
744
|
+
p: e.value.style.layout.grid.yAxis.dataLabels.prefix,
|
|
745
|
+
v: l.value,
|
|
746
|
+
s: e.value.style.layout.grid.yAxis.dataLabels.suffix,
|
|
747
|
+
r: e.value.style.layout.grid.yAxis.dataLabels.roundingValue
|
|
748
|
+
})), 9, Al)) : p("", !0)
|
|
749
|
+
]))), 256))
|
|
750
|
+
], 512)) : p("", !0),
|
|
751
|
+
e.value.style.layout.grid.xAxis.dataLabels.show && !e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? (s(), i("g", {
|
|
752
|
+
key: 2,
|
|
753
|
+
ref_key: "timeLabelsEls",
|
|
754
|
+
ref: H
|
|
755
|
+
}, [
|
|
756
|
+
(s(!0), i(V, null, B(ht.value, (l, o) => (s(), i("g", null, [
|
|
757
|
+
y("text", {
|
|
758
|
+
class: "vue-data-ui-time-label",
|
|
759
|
+
transform: `translate(${n.value.left + v.value * o + v.value / 2}, ${n.value.bottom + d.value.xAxisFontSize * 1.5}), rotate(${e.value.style.layout.grid.xAxis.dataLabels.rotation})`,
|
|
760
|
+
"text-anchor": e.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
|
|
761
|
+
"font-size": d.value.xAxisFontSize,
|
|
762
|
+
fill: e.value.style.layout.grid.xAxis.dataLabels.color,
|
|
763
|
+
"font-weight": e.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
|
|
764
|
+
}, Q(l), 9, _l)
|
|
765
|
+
]))), 256))
|
|
766
|
+
], 512)) : p("", !0),
|
|
767
|
+
e.value.style.layout.grid.xAxis.dataLabels.show && e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? (s(), i("g", {
|
|
768
|
+
key: 3,
|
|
769
|
+
ref_key: "timeLabelsEls",
|
|
770
|
+
ref: H
|
|
771
|
+
}, [
|
|
772
|
+
(s(!0), i(V, null, B(R.value, (l, o) => (s(), i("g", null, [
|
|
773
|
+
y("text", {
|
|
774
|
+
class: "vue-data-ui-time-label",
|
|
775
|
+
transform: `translate(${n.value.left + v.value * o + v.value / 2}, ${n.value.bottom + d.value.xAxisFontSize * 1.5}), rotate(${e.value.style.layout.grid.xAxis.dataLabels.rotation})`,
|
|
776
|
+
"text-anchor": e.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
|
|
777
|
+
"font-size": d.value.xAxisFontSize,
|
|
778
|
+
fill: e.value.style.layout.grid.xAxis.dataLabels.color,
|
|
779
|
+
"font-weight": e.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
|
|
780
|
+
}, Q(l.text), 9, Cl)
|
|
781
|
+
]))), 256))
|
|
782
|
+
], 512)) : p("", !0),
|
|
783
|
+
y("g", null, [
|
|
784
|
+
(s(!0), i(V, null, B(k.value, (l, o) => (s(), i("g", null, [
|
|
785
|
+
y("rect", {
|
|
786
|
+
x: l.open.x - e.value.style.layout.wick.strokeWidth / 2,
|
|
787
|
+
y: l.high.y,
|
|
788
|
+
width: e.value.style.layout.wick.strokeWidth,
|
|
789
|
+
height: Math.abs(l.high.y - l.low.y),
|
|
790
|
+
fill: e.value.style.layout.wick.stroke,
|
|
791
|
+
stroke: "none",
|
|
792
|
+
rx: e.value.style.layout.wick.strokeWidth / 2,
|
|
793
|
+
class: S({ "vue-data-ui-transition": $.value && !u(z) })
|
|
794
|
+
}, null, 10, $l),
|
|
795
|
+
e.value.style.layout.wick.extremity.shape === "circle" ? (s(), i("g", zl, [
|
|
796
|
+
y("circle", {
|
|
797
|
+
cx: l.high.x,
|
|
798
|
+
cy: l.high.y,
|
|
799
|
+
r: e.value.style.layout.wick.extremity.size === "auto" ? v.value / 20 : e.value.style.layout.wick.extremity.size,
|
|
800
|
+
fill: e.value.style.layout.wick.extremity.color,
|
|
801
|
+
class: S({ "vue-data-ui-transition": $.value && !u(z) })
|
|
802
|
+
}, null, 10, Sl),
|
|
803
|
+
y("circle", {
|
|
804
|
+
cx: l.low.x,
|
|
805
|
+
cy: l.low.y,
|
|
806
|
+
r: e.value.style.layout.wick.extremity.size === "auto" ? v.value / 20 : e.value.style.layout.wick.extremity.size,
|
|
807
|
+
fill: e.value.style.layout.wick.extremity.color,
|
|
808
|
+
class: S({ "vue-data-ui-transition": $.value && !u(z) })
|
|
809
|
+
}, null, 10, Ll)
|
|
810
|
+
])) : p("", !0),
|
|
811
|
+
e.value.style.layout.wick.extremity.shape === "line" ? (s(), i("g", Tl, [
|
|
812
|
+
y("rect", {
|
|
813
|
+
x: l.high.x - (e.value.style.layout.wick.extremity.size === "auto" ? v.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
|
|
814
|
+
y: l.high.y - e.value.style.layout.wick.strokeWidth / 2,
|
|
815
|
+
width: Math.abs(l.high.x - (e.value.style.layout.wick.extremity.size === "auto" ? v.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2 - (l.high.x + (e.value.style.layout.wick.extremity.size === "auto" ? v.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2)),
|
|
816
|
+
height: e.value.style.layout.wick.strokeWidth,
|
|
817
|
+
rx: e.value.style.layout.wick.strokeWidth / 2,
|
|
818
|
+
fill: e.value.style.layout.wick.extremity.color,
|
|
819
|
+
stroke: "none",
|
|
820
|
+
class: S({ "vue-data-ui-transition": $.value && !u(z) })
|
|
821
|
+
}, null, 10, Il),
|
|
822
|
+
y("rect", {
|
|
823
|
+
x: l.low.x - (e.value.style.layout.wick.extremity.size === "auto" ? v.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
|
|
824
|
+
y: l.low.y - e.value.style.layout.wick.strokeWidth / 2,
|
|
825
|
+
width: Math.abs(l.low.x - (e.value.style.layout.wick.extremity.size === "auto" ? v.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2 - (l.low.x + (e.value.style.layout.wick.extremity.size === "auto" ? v.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2)),
|
|
826
|
+
height: e.value.style.layout.wick.strokeWidth,
|
|
827
|
+
fill: e.value.style.layout.wick.extremity.color,
|
|
828
|
+
stroke: "none",
|
|
829
|
+
rx: e.value.style.layout.wick.strokeWidth / 2,
|
|
830
|
+
class: S({ "vue-data-ui-transition": $.value && !u(z) })
|
|
831
|
+
}, null, 10, Fl)
|
|
832
|
+
])) : p("", !0)
|
|
833
|
+
]))), 256))
|
|
834
|
+
]),
|
|
835
|
+
y("g", null, [
|
|
836
|
+
(s(!0), i(V, null, B(k.value, (l, o) => (s(), i("rect", {
|
|
837
|
+
x: l.open.x - v.value / 2 + v.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
|
|
838
|
+
y: l.isBullish ? l.last.y : l.open.y,
|
|
839
|
+
height: Math.abs(l.last.y - l.open.y) <= 0 ? 1e-4 : Math.abs(l.last.y - l.open.y),
|
|
840
|
+
width: v.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : v.value * e.value.style.layout.candle.widthRatio,
|
|
841
|
+
fill: e.value.style.layout.candle.gradient.underlayer,
|
|
842
|
+
rx: e.value.style.layout.candle.borderRadius,
|
|
843
|
+
stroke: "none",
|
|
844
|
+
class: S({ "vue-data-ui-transition": $.value && !u(z) })
|
|
845
|
+
}, null, 10, Rl))), 256)),
|
|
846
|
+
(s(!0), i(V, null, B(k.value, (l, o) => (s(), i("rect", {
|
|
847
|
+
x: l.open.x - v.value / 2 + v.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
|
|
848
|
+
y: l.isBullish ? l.last.y : l.open.y,
|
|
849
|
+
height: Math.abs(l.last.y - l.open.y) <= 0 ? 1e-4 : Math.abs(l.last.y - l.open.y),
|
|
850
|
+
width: v.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : v.value * e.value.style.layout.candle.widthRatio,
|
|
851
|
+
fill: l.isBullish ? e.value.style.layout.candle.gradient.show ? `url(#bullish_gradient_${w.value})` : e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.gradient.show ? `url(#bearish_gradient_${w.value})` : e.value.style.layout.candle.colors.bearish,
|
|
852
|
+
rx: e.value.style.layout.candle.borderRadius,
|
|
853
|
+
stroke: e.value.style.layout.candle.stroke,
|
|
854
|
+
"stroke-width": e.value.style.layout.candle.strokeWidth,
|
|
855
|
+
"stroke-linecap": "round",
|
|
856
|
+
"stroke-linejoin": "round",
|
|
857
|
+
class: S({ "vue-data-ui-transition": $.value && !u(z) })
|
|
858
|
+
}, null, 10, Ol))), 256))
|
|
859
|
+
]),
|
|
860
|
+
y("g", null, [
|
|
861
|
+
(s(!0), i(V, null, B(k.value, (l, o) => (s(), i("rect", {
|
|
862
|
+
x: n.value.left + o * v.value,
|
|
863
|
+
y: n.value.top,
|
|
864
|
+
height: n.value.height <= 0 ? 1e-4 : n.value.height,
|
|
865
|
+
width: v.value <= 0 ? 1e-4 : v.value,
|
|
866
|
+
fill: se.value === o ? u(Ht)(e.value.style.layout.selector.color, e.value.style.layout.selector.opacity) : "transparent",
|
|
867
|
+
onMouseover: () => pt(o, l),
|
|
868
|
+
onMouseleave: () => gt(o, l),
|
|
869
|
+
onClick: () => ft(o, l)
|
|
870
|
+
}, null, 40, Nl))), 256))
|
|
871
|
+
])
|
|
872
|
+
])) : p("", !0),
|
|
873
|
+
b(t.$slots, "svg", { svg: d.value }, void 0, !0)
|
|
874
|
+
], 14, nl)),
|
|
875
|
+
t.$slots.watermark ? (s(), i("div", Pl, [
|
|
876
|
+
b(t.$slots, "watermark", P(E({ isPrinting: u(Fe) || u(Re) })), void 0, !0)
|
|
877
|
+
])) : p("", !0),
|
|
878
|
+
e.value.style.zoom.show && te.value ? (s(), i("div", {
|
|
879
|
+
key: 5,
|
|
880
|
+
ref_key: "chartSlicer",
|
|
881
|
+
ref: Ae
|
|
882
|
+
}, [
|
|
883
|
+
(s(), N(ll, {
|
|
884
|
+
ref_key: "slicerComponent",
|
|
885
|
+
ref: Me,
|
|
886
|
+
key: `slicer_${j.value}`,
|
|
887
|
+
background: e.value.style.zoom.color,
|
|
888
|
+
borderColor: e.value.style.backgroundColor,
|
|
889
|
+
fontSize: e.value.style.zoom.fontSize,
|
|
890
|
+
useResetSlot: e.value.style.zoom.useResetSlot,
|
|
891
|
+
labelLeft: Be.value.start,
|
|
892
|
+
labelRight: Be.value.end,
|
|
893
|
+
textColor: e.value.style.color,
|
|
894
|
+
inputColor: e.value.style.zoom.color,
|
|
895
|
+
selectColor: e.value.style.zoom.highlightColor,
|
|
896
|
+
max: G.value,
|
|
897
|
+
min: 0,
|
|
898
|
+
valueStart: c.value.start,
|
|
899
|
+
valueEnd: c.value.end,
|
|
900
|
+
start: c.value.start,
|
|
901
|
+
"onUpdate:start": a[0] || (a[0] = (l) => c.value.start = l),
|
|
902
|
+
end: c.value.end,
|
|
903
|
+
"onUpdate:end": a[1] || (a[1] = (l) => c.value.end = l),
|
|
904
|
+
refreshStartPoint: e.value.style.zoom.startIndex !== null ? e.value.style.zoom.startIndex : 0,
|
|
905
|
+
refreshEndPoint: e.value.style.zoom.endIndex !== null ? e.value.style.zoom.endIndex + 1 : G.value,
|
|
906
|
+
enableRangeHandles: e.value.style.zoom.enableRangeHandles,
|
|
907
|
+
enableSelectionDrag: e.value.style.zoom.enableSelectionDrag,
|
|
908
|
+
onReset: bt
|
|
909
|
+
}, {
|
|
910
|
+
"reset-action": x(({ reset: l }) => [
|
|
911
|
+
b(t.$slots, "reset-action", P(E({ reset: l })), void 0, !0)
|
|
912
|
+
]),
|
|
913
|
+
_: 3
|
|
914
|
+
}, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"]))
|
|
915
|
+
], 512)) : p("", !0),
|
|
916
|
+
y("div", {
|
|
917
|
+
ref_key: "chartLegend",
|
|
918
|
+
ref: we
|
|
919
|
+
}, [
|
|
920
|
+
b(t.$slots, "legend", { legend: k.value }, void 0, !0)
|
|
921
|
+
], 512),
|
|
922
|
+
t.$slots.source ? (s(), i("div", {
|
|
923
|
+
key: 6,
|
|
924
|
+
ref_key: "source",
|
|
925
|
+
ref: _e,
|
|
926
|
+
dir: "auto"
|
|
927
|
+
}, [
|
|
928
|
+
b(t.$slots, "source", {}, void 0, !0)
|
|
929
|
+
], 512)) : p("", !0),
|
|
930
|
+
Ye(u(st), {
|
|
931
|
+
show: _.value.showTooltip && ae.value,
|
|
932
|
+
backgroundColor: e.value.style.tooltip.backgroundColor,
|
|
933
|
+
color: e.value.style.tooltip.color,
|
|
934
|
+
borderRadius: e.value.style.tooltip.borderRadius,
|
|
935
|
+
borderColor: e.value.style.tooltip.borderColor,
|
|
936
|
+
borderWidth: e.value.style.tooltip.borderWidth,
|
|
937
|
+
fontSize: e.value.style.tooltip.fontSize,
|
|
938
|
+
backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
|
|
939
|
+
position: e.value.style.tooltip.position,
|
|
940
|
+
offsetY: e.value.style.tooltip.offsetY,
|
|
941
|
+
parent: T.value,
|
|
942
|
+
content: oe.value,
|
|
943
|
+
isFullscreen: W.value,
|
|
944
|
+
isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function",
|
|
945
|
+
smooth: e.value.style.tooltip.smooth,
|
|
946
|
+
backdropFilter: e.value.style.tooltip.backdropFilter
|
|
947
|
+
}, {
|
|
948
|
+
"tooltip-before": x(() => [
|
|
949
|
+
b(t.$slots, "tooltip-before", P(E({ ...ce.value })), void 0, !0)
|
|
950
|
+
]),
|
|
951
|
+
"tooltip-after": x(() => [
|
|
952
|
+
b(t.$slots, "tooltip-after", P(E({ ...ce.value })), void 0, !0)
|
|
953
|
+
]),
|
|
954
|
+
_: 3
|
|
955
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
|
|
956
|
+
te.value ? (s(), N(u(tt), {
|
|
957
|
+
key: 7,
|
|
958
|
+
hideDetails: "",
|
|
959
|
+
config: {
|
|
960
|
+
open: _.value.showTable,
|
|
961
|
+
maxHeight: 1e4,
|
|
962
|
+
body: {
|
|
963
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
964
|
+
color: e.value.style.color
|
|
965
|
+
},
|
|
966
|
+
head: {
|
|
967
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
968
|
+
color: e.value.style.color
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
}, {
|
|
972
|
+
content: x(() => [
|
|
973
|
+
(s(), N(u(lt), {
|
|
974
|
+
key: `table_${$e.value}`,
|
|
975
|
+
colNames: q.value.colNames,
|
|
976
|
+
head: q.value.head,
|
|
977
|
+
body: q.value.body,
|
|
978
|
+
config: q.value.config,
|
|
979
|
+
title: `${e.value.style.title.text}${e.value.style.title.subtitle.text ? ` : ${e.value.style.title.subtitle.text}` : ""}`,
|
|
980
|
+
onClose: a[2] || (a[2] = (l) => _.value.showTable = !1)
|
|
981
|
+
}, {
|
|
982
|
+
th: x(({ th: l }) => [
|
|
983
|
+
Et(Q(l), 1)
|
|
984
|
+
]),
|
|
985
|
+
td: x(({ td: l }) => [
|
|
986
|
+
y("div", { innerHTML: l }, null, 8, El)
|
|
987
|
+
]),
|
|
988
|
+
_: 1
|
|
989
|
+
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
990
|
+
]),
|
|
991
|
+
_: 1
|
|
992
|
+
}, 8, ["config"])) : p("", !0),
|
|
993
|
+
u(z) ? (s(), N(el, { key: 8 })) : p("", !0)
|
|
994
|
+
], 46, il));
|
|
995
|
+
}
|
|
996
|
+
}, ea = /* @__PURE__ */ ul(Vl, [["__scopeId", "data-v-3f824beb"]]);
|
|
997
|
+
export {
|
|
998
|
+
ea as default
|
|
999
|
+
};
|