vue-data-ui 3.19.6 → 3.19.8
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/{BaseDraggableDialog-BQcmQAK5.js → BaseDraggableDialog-DUUu2E2Q.js} +1 -1
- package/dist/{BaseIcon-CEmt3Ifx.js → BaseIcon-DM1x8hQF.js} +6 -3
- package/dist/{BaseLegendToggle-DUIqQmwM.js → BaseLegendToggle-CJTwLGXL.js} +1 -1
- package/dist/{BaseZoomControls-Ce1yqas1.js → BaseZoomControls-BkajQ8q9.js} +1 -1
- package/dist/{ColorPicker-DS_QkH3W.js → ColorPicker-DTQeqKUV.js} +1 -1
- package/dist/{DataTable-BvDJEAma.js → DataTable-DmE8Oo4i.js} +1 -1
- package/dist/{NonSvgPenAndPaper-D4Gh7O43.js → NonSvgPenAndPaper-tvWXeCsd.js} +2 -2
- package/dist/{PackageVersion-C7CvErYQ.js → PackageVersion-zJAUEmyB.js} +1 -1
- package/dist/{PenAndPaper-DwpL8Z0l.js → PenAndPaper-DNgm6y3l.js} +2 -2
- package/dist/{Slicer-BlfyiHHD.js → Slicer-CPWGgGSp.js} +1 -1
- package/dist/{SlicerPreview-CG1jpZqZ.js → SlicerPreview-BU3ZeHjR.js} +1 -1
- package/dist/{UserOptions-B57xo6D2.js → UserOptions-D7zR0tnR.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +11 -0
- package/dist/{useConfig-lKgU652n.js → useConfig-ByaaSKhz.js} +5 -0
- package/dist/{useObjectBindings-C3q0I8Zm.js → useObjectBindings-BR1sGimd.js} +1 -1
- package/dist/utils.js +1 -1
- package/dist/{vue-data-ui-BBnKbdCT.js → vue-data-ui-Dv8MNDbS.js} +68 -68
- package/dist/vue-data-ui.js +69 -69
- package/dist/{vue-ui-3d-bar-gMuK6OMP.js → vue-ui-3d-bar-DVsF4qGd.js} +2 -2
- package/dist/{vue-ui-accordion-CNtzLReQ.js → vue-ui-accordion-BX9WL-QF.js} +2 -2
- package/dist/{vue-ui-age-pyramid-B_D1wPY4.js → vue-ui-age-pyramid-Bu3bocZx.js} +2 -2
- package/dist/{vue-ui-annotator-KPkeXw8q.js → vue-ui-annotator-Be3VpH8Z.js} +4 -4
- package/dist/{vue-ui-bullet-Ci3tqx6A.js → vue-ui-bullet-COSSZ7RU.js} +2 -2
- package/dist/{vue-ui-bump-31Kryh02.js → vue-ui-bump-C1w-a4ad.js} +3 -3
- package/dist/vue-ui-candlestick-zO0Jmsen.js +1826 -0
- package/dist/{vue-ui-carousel-table-D3j0UTQ1.js → vue-ui-carousel-table-Q2uTIELA.js} +2 -2
- package/dist/{vue-ui-chestnut-Cgf0vAxo.js → vue-ui-chestnut-DdNKhXkN.js} +2 -2
- package/dist/{vue-ui-chord-DGma5NsS.js → vue-ui-chord-CYzGIRtA.js} +2 -2
- package/dist/{vue-ui-circle-pack-EvRfcXnZ.js → vue-ui-circle-pack-Dp5_ugXW.js} +2 -2
- package/dist/{vue-ui-cursor-BX8kHXVE.js → vue-ui-cursor-DBViygOD.js} +2 -2
- package/dist/{vue-ui-dag-DuOokTx4.js → vue-ui-dag-BA2vr2Ub.js} +3 -3
- package/dist/{vue-ui-dashboard-BeZCujZv.js → vue-ui-dashboard-D11FCHnp.js} +67 -67
- package/dist/{vue-ui-digits-nIgbeL-K.js → vue-ui-digits-CIXbRR97.js} +2 -2
- package/dist/{vue-ui-donut-FzQwgIbN.js → vue-ui-donut-BSanYbqb.js} +3 -3
- package/dist/{vue-ui-donut-evolution-CwLYRDws.js → vue-ui-donut-evolution-BVttNIzH.js} +228 -218
- package/dist/{vue-ui-dumbbell-BmujSKH2.js → vue-ui-dumbbell-D-KcBLOF.js} +2 -2
- package/dist/{vue-ui-flow-D4jeyY5a.js → vue-ui-flow-Dly7N0Nb.js} +2 -2
- package/dist/{vue-ui-funnel-DQ1fOfXW.js → vue-ui-funnel-COwXzAbB.js} +2 -2
- package/dist/{vue-ui-galaxy-Wldw6HHG.js → vue-ui-galaxy-Cg9VStNF.js} +3 -3
- package/dist/{vue-ui-gauge-BzV3y_h3.js → vue-ui-gauge-DHWCS6jR.js} +2 -2
- package/dist/{vue-ui-geo-WLEkf2a9.js → vue-ui-geo-CV0FBeuB.js} +3 -3
- package/dist/{vue-ui-gizmo-C0vr-wLL.js → vue-ui-gizmo-5rdIvscj.js} +2 -2
- package/dist/{vue-ui-heatmap-RmaAnr9m.js → vue-ui-heatmap-kiQ6q3q4.js} +3 -3
- package/dist/{vue-ui-history-plot-Dyf2Atb2.js → vue-ui-history-plot-CgPjudHv.js} +3 -3
- package/dist/{vue-ui-horizontal-bar-DG4paRTj.js → vue-ui-horizontal-bar-CpQCmBQD.js} +4 -4
- package/dist/{vue-ui-kpi-TBQhSM0a.js → vue-ui-kpi-Bz7QeCTV.js} +2 -2
- package/dist/{vue-ui-mini-loader-BpLz9pDO.js → vue-ui-mini-loader-DDJUya9e.js} +1 -1
- package/dist/{vue-ui-molecule-Df4zCHL5.js → vue-ui-molecule-CvfwMxYY.js} +2 -2
- package/dist/{vue-ui-mood-radar-RQqmJU_9.js → vue-ui-mood-radar-D0lanJ__.js} +2 -2
- package/dist/{vue-ui-nested-donuts-C7VIp7mz.js → vue-ui-nested-donuts-C-LWBXmg.js} +3 -3
- package/dist/{vue-ui-onion-DP4NWU3Y.js → vue-ui-onion-u9hGe4VA.js} +3 -3
- package/dist/{vue-ui-parallel-coordinate-plot-a7OvbsVh.js → vue-ui-parallel-coordinate-plot-BJ5OjYTH.js} +3 -3
- package/dist/{vue-ui-quadrant-C4GxyyE3.js → vue-ui-quadrant-BVFJ5Vur.js} +3 -3
- package/dist/{vue-ui-quick-chart-BNCkZiiG.js → vue-ui-quick-chart-Cd5lGyph.js} +4 -4
- package/dist/{vue-ui-radar-Dcq3bWA4.js → vue-ui-radar-BsRGxgXN.js} +3 -3
- package/dist/{vue-ui-rating-DBxf9Vwv.js → vue-ui-rating-D_QR_A3V.js} +1 -1
- package/dist/{vue-ui-relation-circle-CZ1UtEIM.js → vue-ui-relation-circle-MxYh6hSt.js} +2 -2
- package/dist/{vue-ui-ridgeline-CsNDB48W.js → vue-ui-ridgeline-BtNEP6ba.js} +3 -3
- package/dist/{vue-ui-rings-Bwd_i2eo.js → vue-ui-rings-Pj7yMeOV.js} +3 -3
- package/dist/{vue-ui-scatter-DAa8MnhH.js → vue-ui-scatter-DrS1nrwL.js} +3 -3
- package/dist/{vue-ui-skeleton-CPy9DsSC.js → vue-ui-skeleton-Cqv1KG4y.js} +2 -2
- package/dist/{vue-ui-smiley-2xc8AwPP.js → vue-ui-smiley-rFdGxZK6.js} +1 -1
- package/dist/{vue-ui-spark-trend-CM06cEvG.js → vue-ui-spark-trend-eHleRq-z.js} +2 -2
- package/dist/{vue-ui-sparkbar-CSDRWMhb.js → vue-ui-sparkbar-BHJTG_on.js} +2 -2
- package/dist/{vue-ui-sparkgauge-CKeKTyBH.js → vue-ui-sparkgauge-DpAEwvLX.js} +2 -2
- package/dist/{vue-ui-sparkhistogram-BSnU2_Q0.js → vue-ui-sparkhistogram-BlMH_NJk.js} +2 -2
- package/dist/{vue-ui-sparkline-DhkrfLYf.js → vue-ui-sparkline-BAWc3ROJ.js} +2 -2
- package/dist/{vue-ui-sparkstackbar-D3vn49rn.js → vue-ui-sparkstackbar-BI8zG-DG.js} +3 -3
- package/dist/vue-ui-stackbar-28FVVqVu.js +2267 -0
- package/dist/vue-ui-stackline-DwtlEdOE.js +2395 -0
- package/dist/{vue-ui-strip-plot-DLH2Jc91.js → vue-ui-strip-plot-DX36qFKk.js} +2 -2
- package/dist/{vue-ui-table-DBWGRgw6.js → vue-ui-table-DdZ_DkqT.js} +5 -5
- package/dist/{vue-ui-table-heatmap-D0SM6A1L.js → vue-ui-table-heatmap-BFKyJTr1.js} +2 -2
- package/dist/{vue-ui-table-sparkline-BShpt1UR.js → vue-ui-table-sparkline-BSV1jn7r.js} +2 -2
- package/dist/{vue-ui-thermometer-BIH00QYu.js → vue-ui-thermometer-Io8LdW1o.js} +2 -2
- package/dist/{vue-ui-timer-vcaC2CGp.js → vue-ui-timer-BkdpZ-lw.js} +3 -3
- package/dist/{vue-ui-tiremarks-BmhvsqeP.js → vue-ui-tiremarks-GC773Hw1.js} +2 -2
- package/dist/{vue-ui-treemap-C-M5PHTS.js → vue-ui-treemap-C0dtbfbZ.js} +4 -4
- package/dist/{vue-ui-waffle-DnpUe9aj.js → vue-ui-waffle-BvzfNmJC.js} +3 -3
- package/dist/{vue-ui-wheel-D21hTOn0.js → vue-ui-wheel-Dm9V8TAH.js} +2 -2
- package/dist/{vue-ui-word-cloud-C4SPxSlX.js → vue-ui-word-cloud-Ne_B9Elc.js} +3 -3
- package/dist/{vue-ui-world-DSq_cPCv.js → vue-ui-world-Bp38MZij.js} +3 -3
- package/dist/{vue-ui-xy-Iep0AjyV.js → vue-ui-xy-BCeOqJYR.js} +1169 -1104
- package/dist/{vue-ui-xy-canvas-DjTurM4m.js → vue-ui-xy-canvas-B06Rit63.js} +6 -6
- package/package.json +1 -1
- package/dist/vue-ui-candlestick-DU0MXtKT.js +0 -1814
- package/dist/vue-ui-stackbar-BR7tZmWR.js +0 -2253
- package/dist/vue-ui-stackline-Dj9N60Js.js +0 -2381
|
@@ -0,0 +1,1826 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
|
|
2
|
+
import { G as t, H as n, J as r, Mt as i, Rt as a, S as o, St as s, X as c, h as l, jt as ee, nt as te, pt as ne, s as re, t as ie, v as u, zt as ae } from "./lib-BkiwukKO.js";
|
|
3
|
+
import { n as oe, r as se, t as ce } from "./useTimeLabels-C0x7zUXP.js";
|
|
4
|
+
import { t as le } from "./useConfig-ByaaSKhz.js";
|
|
5
|
+
import { t as ue } from "./usePrinter-X0yWOynH.js";
|
|
6
|
+
import { n as de, t as fe } from "./BaseScanner-C7dmAref.js";
|
|
7
|
+
import { t as pe } from "./useSvgExport-Dtu973wa.js";
|
|
8
|
+
import { t as me } from "./useNestedProp-Ck4hsrpu.js";
|
|
9
|
+
import { t as he } from "./useThemeCheck-rFK9Zlb_.js";
|
|
10
|
+
import { t as ge } from "./useTimeLabelCollider-Dm55Emzg.js";
|
|
11
|
+
import { t as _e } from "./img-BjOr008R.js";
|
|
12
|
+
import { n as ve } from "./Title-__gWq2g6.js";
|
|
13
|
+
import { t as ye } from "./_plugin-vue_export-helper-Dq1MygBL.js";
|
|
14
|
+
import { c as be } from "./canvas-lib-DTaADQOK.js";
|
|
15
|
+
import { t as xe } from "./useResponsive-CrAInupd.js";
|
|
16
|
+
import { t as Se } from "./SlicerPreview-BU3ZeHjR.js";
|
|
17
|
+
import { t as Ce } from "./A11yDataTable-q2-8fSlJ.js";
|
|
18
|
+
import { t as we } from "./useUserOptionState-CjPJPTg2.js";
|
|
19
|
+
import { t as Te } from "./useChartAccessibility-Do37qcw2.js";
|
|
20
|
+
import { t as Ee } from "./vue_ui_candlestick-sY6UtOop.js";
|
|
21
|
+
import { Fragment as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createSlots as De, createTextVNode as Oe, createVNode as ke, defineAsyncComponent as _, guardReactiveProps as v, mergeProps as Ae, nextTick as je, normalizeClass as y, normalizeProps as b, normalizeStyle as Me, onBeforeUnmount as Ne, onMounted as Pe, openBlock as x, ref as S, renderList as C, renderSlot as w, resolveDynamicComponent as Fe, shallowRef as Ie, toDisplayString as T, toRefs as Le, unref as E, watch as Re, watchEffect as ze, withCtx as D } from "vue";
|
|
22
|
+
//#region src/components/vue-ui-candlestick.vue
|
|
23
|
+
var Be = /* @__PURE__ */ e({ default: () => Ot }), Ve = ["id"], He = ["id"], Ue = { style: { position: "relative" } }, We = [
|
|
24
|
+
"xmlns",
|
|
25
|
+
"aria-describedby",
|
|
26
|
+
"viewBox"
|
|
27
|
+
], Ge = [
|
|
28
|
+
"x",
|
|
29
|
+
"y",
|
|
30
|
+
"width",
|
|
31
|
+
"height"
|
|
32
|
+
], Ke = { key: 1 }, qe = ["id"], Je = ["stop-color"], Ye = ["stop-color"], Xe = ["stop-color"], Ze = ["id"], Qe = ["stop-color"], $e = ["stop-color"], et = ["stop-color"], tt = { key: 0 }, nt = [
|
|
33
|
+
"x1",
|
|
34
|
+
"x2",
|
|
35
|
+
"y1",
|
|
36
|
+
"y2",
|
|
37
|
+
"stroke",
|
|
38
|
+
"stroke-width"
|
|
39
|
+
], rt = [
|
|
40
|
+
"x1",
|
|
41
|
+
"x2",
|
|
42
|
+
"y1",
|
|
43
|
+
"y2",
|
|
44
|
+
"stroke",
|
|
45
|
+
"stroke-width"
|
|
46
|
+
], it = [
|
|
47
|
+
"x1",
|
|
48
|
+
"x2",
|
|
49
|
+
"y1",
|
|
50
|
+
"y2",
|
|
51
|
+
"stroke",
|
|
52
|
+
"stroke-width",
|
|
53
|
+
"stroke-dasharray"
|
|
54
|
+
], at = [
|
|
55
|
+
"x1",
|
|
56
|
+
"x2",
|
|
57
|
+
"y1",
|
|
58
|
+
"y2",
|
|
59
|
+
"stroke",
|
|
60
|
+
"stroke-width",
|
|
61
|
+
"stroke-dasharray"
|
|
62
|
+
], ot = [
|
|
63
|
+
"x1",
|
|
64
|
+
"x2",
|
|
65
|
+
"y1",
|
|
66
|
+
"y2",
|
|
67
|
+
"stroke",
|
|
68
|
+
"stroke-width"
|
|
69
|
+
], st = [
|
|
70
|
+
"x1",
|
|
71
|
+
"x2",
|
|
72
|
+
"y1",
|
|
73
|
+
"y2",
|
|
74
|
+
"stroke",
|
|
75
|
+
"stroke-width"
|
|
76
|
+
], ct = [
|
|
77
|
+
"x",
|
|
78
|
+
"y",
|
|
79
|
+
"text-anchor",
|
|
80
|
+
"font-size",
|
|
81
|
+
"fill",
|
|
82
|
+
"font-weight"
|
|
83
|
+
], lt = [
|
|
84
|
+
"transform",
|
|
85
|
+
"text-anchor",
|
|
86
|
+
"font-size",
|
|
87
|
+
"fill",
|
|
88
|
+
"font-weight"
|
|
89
|
+
], ut = [
|
|
90
|
+
"transform",
|
|
91
|
+
"text-anchor",
|
|
92
|
+
"font-size",
|
|
93
|
+
"fill",
|
|
94
|
+
"font-weight"
|
|
95
|
+
], dt = [
|
|
96
|
+
"x",
|
|
97
|
+
"y",
|
|
98
|
+
"width",
|
|
99
|
+
"height",
|
|
100
|
+
"fill",
|
|
101
|
+
"rx"
|
|
102
|
+
], ft = { key: 0 }, pt = [
|
|
103
|
+
"cx",
|
|
104
|
+
"cy",
|
|
105
|
+
"r",
|
|
106
|
+
"fill"
|
|
107
|
+
], mt = [
|
|
108
|
+
"cx",
|
|
109
|
+
"cy",
|
|
110
|
+
"r",
|
|
111
|
+
"fill"
|
|
112
|
+
], ht = { key: 1 }, gt = [
|
|
113
|
+
"x",
|
|
114
|
+
"y",
|
|
115
|
+
"width",
|
|
116
|
+
"height",
|
|
117
|
+
"rx",
|
|
118
|
+
"fill"
|
|
119
|
+
], _t = [
|
|
120
|
+
"x",
|
|
121
|
+
"y",
|
|
122
|
+
"width",
|
|
123
|
+
"height",
|
|
124
|
+
"fill",
|
|
125
|
+
"rx"
|
|
126
|
+
], vt = [
|
|
127
|
+
"x",
|
|
128
|
+
"y",
|
|
129
|
+
"height",
|
|
130
|
+
"width",
|
|
131
|
+
"fill",
|
|
132
|
+
"rx"
|
|
133
|
+
], yt = [
|
|
134
|
+
"x",
|
|
135
|
+
"y",
|
|
136
|
+
"height",
|
|
137
|
+
"width",
|
|
138
|
+
"fill",
|
|
139
|
+
"rx",
|
|
140
|
+
"stroke",
|
|
141
|
+
"stroke-width"
|
|
142
|
+
], bt = ["d", "stroke"], xt = [
|
|
143
|
+
"x",
|
|
144
|
+
"y",
|
|
145
|
+
"height",
|
|
146
|
+
"width",
|
|
147
|
+
"fill",
|
|
148
|
+
"onMouseover",
|
|
149
|
+
"onMouseleave",
|
|
150
|
+
"onClick"
|
|
151
|
+
], St = ["data-start", "data-end"], Ct = {
|
|
152
|
+
key: 0,
|
|
153
|
+
style: {
|
|
154
|
+
position: "absolute",
|
|
155
|
+
top: "100%",
|
|
156
|
+
left: "0",
|
|
157
|
+
width: "100%"
|
|
158
|
+
},
|
|
159
|
+
"data-dom-to-png-ignore": "",
|
|
160
|
+
"aria-hidden": "true"
|
|
161
|
+
}, wt = {
|
|
162
|
+
key: 5,
|
|
163
|
+
class: "vue-data-ui-watermark"
|
|
164
|
+
}, Tt = ["d", "stroke"], Et = [
|
|
165
|
+
"d",
|
|
166
|
+
"stroke",
|
|
167
|
+
"stroke-width"
|
|
168
|
+
], Dt = ["innerHTML"], Ot = /* @__PURE__ */ ye({
|
|
169
|
+
__name: "vue-ui-candlestick",
|
|
170
|
+
props: {
|
|
171
|
+
config: {
|
|
172
|
+
type: Object,
|
|
173
|
+
default() {
|
|
174
|
+
return {};
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
dataset: {
|
|
178
|
+
type: Array,
|
|
179
|
+
default() {
|
|
180
|
+
return [];
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
selectedXIndex: {
|
|
184
|
+
type: Number,
|
|
185
|
+
default: void 0
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
emits: ["selectX", "copyAlt"],
|
|
189
|
+
setup(e, { expose: ye, emit: Be }) {
|
|
190
|
+
let Ot = _(() => import("./BaseIcon-DM1x8hQF.js").then((e) => e.n)), kt = _(() => import("./Tooltip-CuWEYGr3.js")), At = _(() => import("./vue-ui-accordion-BX9WL-QF.js").then((e) => e.n)), jt = _(() => import("./DataTable-DmE8Oo4i.js")), Mt = _(() => import("./PenAndPaper-DNgm6y3l.js").then((e) => e.t)), Nt = _(() => import("./UserOptions-D7zR0tnR.js").then((e) => e.n)), Pt = _(() => import("./PackageVersion-zJAUEmyB.js").then((e) => e.t)), Ft = _(() => import("./BaseDraggableDialog-DUUu2E2Q.js").then((e) => e.n)), { vue_ui_candlestick: It } = le(), { isThemeValid: Lt, warnInvalidTheme: Rt } = he(), O = e, zt = Be, Bt = f(() => !!O.dataset && O.dataset.length), k = S(!1), Vt = S(null), A = S(n()), Ht = S(!1), Ut = S(""), j = S(void 0), Wt = S(0), M = S(null), Gt = S(null), Kt = S(null), qt = S(null), Jt = S(null), Yt = S(null), Xt = S(0), Zt = S(0), Qt = S(0), $t = S(null), en = S(null), tn = S(null), nn = S(null), rn = S(null), an = S(!1), on = S(!1), N = S(null), sn = S({
|
|
191
|
+
x: 0,
|
|
192
|
+
y: 0
|
|
193
|
+
}), cn = S("pointer"), ln = S(!1), P = S(vn()), un = f(() => P.value.userOptions.useCursorPointer), dn = f(() => ae({
|
|
194
|
+
defaultConfig: {
|
|
195
|
+
useCssAnimation: !1,
|
|
196
|
+
userOptions: { show: !1 },
|
|
197
|
+
table: { show: !1 },
|
|
198
|
+
style: {
|
|
199
|
+
backgroundColor: "#99999930",
|
|
200
|
+
layout: {
|
|
201
|
+
candle: { colors: {
|
|
202
|
+
bearish: "#BABABA",
|
|
203
|
+
bullish: "#CACACA"
|
|
204
|
+
} },
|
|
205
|
+
grid: {
|
|
206
|
+
stroke: "#6A6A6A",
|
|
207
|
+
verticalLines: { stroke: "#6A6A6A" },
|
|
208
|
+
horizontalLines: { stroke: "#6A6A6A" },
|
|
209
|
+
yAxis: {
|
|
210
|
+
dataLabels: { show: !1 },
|
|
211
|
+
scale: {
|
|
212
|
+
min: null,
|
|
213
|
+
max: null
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
wick: {
|
|
218
|
+
stroke: "#6A6A6A",
|
|
219
|
+
extremity: { color: "#6A6A6A" }
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
tooltip: { show: !1 },
|
|
223
|
+
zoom: {
|
|
224
|
+
show: !1,
|
|
225
|
+
startIndex: null,
|
|
226
|
+
endIndex: null
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
userConfig: P.value.skeletonConfig ?? {}
|
|
231
|
+
})), { loading: F, FINAL_DATASET: I, manualLoading: fn } = de({
|
|
232
|
+
...Le(O),
|
|
233
|
+
FINAL_CONFIG: P,
|
|
234
|
+
prepareConfig: vn,
|
|
235
|
+
callback: () => {
|
|
236
|
+
Promise.resolve().then(async () => {
|
|
237
|
+
await dr();
|
|
238
|
+
});
|
|
239
|
+
},
|
|
240
|
+
skeletonDataset: O.config?.skeletonDataset ?? [
|
|
241
|
+
[
|
|
242
|
+
17040672e5,
|
|
243
|
+
10,
|
|
244
|
+
20,
|
|
245
|
+
2,
|
|
246
|
+
10,
|
|
247
|
+
30
|
|
248
|
+
],
|
|
249
|
+
[
|
|
250
|
+
17067456e5,
|
|
251
|
+
10,
|
|
252
|
+
30,
|
|
253
|
+
5,
|
|
254
|
+
20,
|
|
255
|
+
50
|
|
256
|
+
],
|
|
257
|
+
[
|
|
258
|
+
17092512e5,
|
|
259
|
+
20,
|
|
260
|
+
50,
|
|
261
|
+
10,
|
|
262
|
+
30,
|
|
263
|
+
80
|
|
264
|
+
],
|
|
265
|
+
[
|
|
266
|
+
17119296e5,
|
|
267
|
+
30,
|
|
268
|
+
80,
|
|
269
|
+
20,
|
|
270
|
+
50,
|
|
271
|
+
130
|
|
272
|
+
],
|
|
273
|
+
[
|
|
274
|
+
17145216e5,
|
|
275
|
+
50,
|
|
276
|
+
130,
|
|
277
|
+
30,
|
|
278
|
+
100,
|
|
279
|
+
210
|
|
280
|
+
],
|
|
281
|
+
[
|
|
282
|
+
17172e8,
|
|
283
|
+
80,
|
|
284
|
+
210,
|
|
285
|
+
50,
|
|
286
|
+
150,
|
|
287
|
+
340
|
|
288
|
+
],
|
|
289
|
+
[
|
|
290
|
+
1719792e6,
|
|
291
|
+
130,
|
|
292
|
+
340,
|
|
293
|
+
80,
|
|
294
|
+
280,
|
|
295
|
+
550
|
|
296
|
+
],
|
|
297
|
+
[
|
|
298
|
+
17224704e5,
|
|
299
|
+
210,
|
|
300
|
+
550,
|
|
301
|
+
130,
|
|
302
|
+
450,
|
|
303
|
+
890
|
|
304
|
+
],
|
|
305
|
+
[
|
|
306
|
+
17251488e5,
|
|
307
|
+
340,
|
|
308
|
+
890,
|
|
309
|
+
210,
|
|
310
|
+
750,
|
|
311
|
+
1440
|
|
312
|
+
],
|
|
313
|
+
[
|
|
314
|
+
17277408e5,
|
|
315
|
+
550,
|
|
316
|
+
1440,
|
|
317
|
+
340,
|
|
318
|
+
1230,
|
|
319
|
+
2330
|
|
320
|
+
],
|
|
321
|
+
[
|
|
322
|
+
17304192e5,
|
|
323
|
+
890,
|
|
324
|
+
2330,
|
|
325
|
+
550,
|
|
326
|
+
1950,
|
|
327
|
+
3770
|
|
328
|
+
],
|
|
329
|
+
[
|
|
330
|
+
17330112e5,
|
|
331
|
+
1440,
|
|
332
|
+
3770,
|
|
333
|
+
890,
|
|
334
|
+
3200,
|
|
335
|
+
5100
|
|
336
|
+
]
|
|
337
|
+
],
|
|
338
|
+
skeletonConfig: ae({
|
|
339
|
+
defaultConfig: P.value,
|
|
340
|
+
userConfig: dn.value
|
|
341
|
+
})
|
|
342
|
+
}), { userOptionsVisible: pn, setUserOptionsVisibility: mn, keepUserOptionState: hn } = we({ config: P.value }), { svgRef: L } = Te({ config: P.value.style.title });
|
|
343
|
+
function gn() {
|
|
344
|
+
mn(!0);
|
|
345
|
+
}
|
|
346
|
+
function _n() {
|
|
347
|
+
mn(!1), zt("selectX", {
|
|
348
|
+
seriesIndex: null,
|
|
349
|
+
datapoint: null
|
|
350
|
+
}), j.value = null;
|
|
351
|
+
}
|
|
352
|
+
function vn() {
|
|
353
|
+
let e = me({
|
|
354
|
+
userConfig: O.config,
|
|
355
|
+
defaultConfig: It
|
|
356
|
+
}), t = {}, n = e.theme;
|
|
357
|
+
if (n) if (!Lt.value(e)) Rt(e), t = e;
|
|
358
|
+
else {
|
|
359
|
+
let r = me({
|
|
360
|
+
userConfig: Ee[n] || O.config,
|
|
361
|
+
defaultConfig: e
|
|
362
|
+
});
|
|
363
|
+
t = { ...me({
|
|
364
|
+
userConfig: O.config,
|
|
365
|
+
defaultConfig: r
|
|
366
|
+
}) };
|
|
367
|
+
}
|
|
368
|
+
else t = e;
|
|
369
|
+
return t;
|
|
370
|
+
}
|
|
371
|
+
Re(() => O.config, (e) => {
|
|
372
|
+
F.value || (P.value = vn()), pn.value = !P.value.userOptions.showOnChartHover, yn(), Xt.value += 1, Qt.value += 1, Zt.value += 1, H.value.showTable = P.value.table.show, H.value.showTooltip = P.value.style.tooltip.show, Mn();
|
|
373
|
+
}, { deep: !0 }), Re(() => O.dataset, (e) => {
|
|
374
|
+
Array.isArray(e) && e.length > 0 && (fn.value = !1), sr();
|
|
375
|
+
}, { deep: !0 });
|
|
376
|
+
let R = S({
|
|
377
|
+
height: P.value.style.height,
|
|
378
|
+
width: P.value.style.width,
|
|
379
|
+
xAxisFontSize: P.value.style.layout.grid.xAxis.dataLabels.fontSize,
|
|
380
|
+
yAxisFontSize: P.value.style.layout.grid.yAxis.dataLabels.fontSize
|
|
381
|
+
}), z = Ie(null), B = Ie(null);
|
|
382
|
+
Pe(() => {
|
|
383
|
+
yn();
|
|
384
|
+
});
|
|
385
|
+
let V = f(() => !!P.value.debug);
|
|
386
|
+
function yn() {
|
|
387
|
+
if (s(O.dataset) && (c({
|
|
388
|
+
componentName: "VueUiCandlestick",
|
|
389
|
+
type: "dataset",
|
|
390
|
+
debug: V.value
|
|
391
|
+
}), fn.value = !0), s(O.dataset) || (fn.value = P.value.loading), setTimeout(() => {
|
|
392
|
+
k.value = !0;
|
|
393
|
+
}, 10), P.value.responsive) {
|
|
394
|
+
let e = be(() => {
|
|
395
|
+
k.value = !1;
|
|
396
|
+
let { width: e, height: t } = xe({
|
|
397
|
+
chart: M.value,
|
|
398
|
+
title: P.value.style.title.text ? Gt.value : null,
|
|
399
|
+
slicer: P.value.style.zoom.show && G.value > 6 ? qt.value.$el : null,
|
|
400
|
+
legend: Kt.value,
|
|
401
|
+
source: Jt.value,
|
|
402
|
+
noTitle: Yt.value
|
|
403
|
+
});
|
|
404
|
+
requestAnimationFrame(() => {
|
|
405
|
+
R.value.width = e, R.value.height = t - 12, P.value.responsiveProportionalSizing ? (R.value.xAxisFontSize = a({
|
|
406
|
+
relator: Math.min(e, t),
|
|
407
|
+
adjuster: P.value.style.width,
|
|
408
|
+
source: P.value.style.layout.grid.xAxis.dataLabels.fontSize,
|
|
409
|
+
threshold: 6,
|
|
410
|
+
fallback: 6
|
|
411
|
+
}), R.value.yAxisFontSize = a({
|
|
412
|
+
relator: Math.min(e, t),
|
|
413
|
+
adjuster: P.value.style.width,
|
|
414
|
+
source: P.value.style.layout.grid.yAxis.dataLabels.fontSize,
|
|
415
|
+
threshold: 6,
|
|
416
|
+
fallback: 6
|
|
417
|
+
})) : (R.value.xAxisFontSize = P.value.style.layout.grid.xAxis.dataLabels.fontSize, R.value.yAxisFontSize = P.value.style.layout.grid.yAxis.dataLabels.fontSize), Vt.value && clearTimeout(Vt.value), Vt.value = setTimeout(() => {
|
|
418
|
+
k.value = !0;
|
|
419
|
+
}, 10);
|
|
420
|
+
});
|
|
421
|
+
});
|
|
422
|
+
z.value && (B.value && z.value.unobserve(B.value), z.value.disconnect()), z.value = new ResizeObserver(e), B.value = M.value.parentNode, z.value.observe(B.value);
|
|
423
|
+
}
|
|
424
|
+
dr();
|
|
425
|
+
}
|
|
426
|
+
Ne(() => {
|
|
427
|
+
z.value && (B.value && z.value.unobserve(B.value), z.value.disconnect());
|
|
428
|
+
});
|
|
429
|
+
let { isPrinting: bn, isImaging: xn, generatePdf: Sn, generateImage: Cn } = ue({
|
|
430
|
+
elementId: `vue-ui-candlestick_${A.value}`,
|
|
431
|
+
fileName: P.value.style.title.text || "vue-ui-candlestick",
|
|
432
|
+
options: P.value.userOptions.print
|
|
433
|
+
}), wn = f(() => P.value.userOptions.show && !P.value.style.title.text), H = S({
|
|
434
|
+
showTable: P.value.table.show,
|
|
435
|
+
showTooltip: P.value.style.tooltip.show
|
|
436
|
+
}), Tn = S(0), En = be((e) => {
|
|
437
|
+
Tn.value = e;
|
|
438
|
+
}, 100);
|
|
439
|
+
ze((e) => {
|
|
440
|
+
let t = en.value;
|
|
441
|
+
if (!t) return;
|
|
442
|
+
let n = new ResizeObserver((e) => {
|
|
443
|
+
En(e[0].contentRect.height);
|
|
444
|
+
});
|
|
445
|
+
n.observe(t), e(() => n.disconnect());
|
|
446
|
+
}), Ne(() => {
|
|
447
|
+
Tn.value = 0;
|
|
448
|
+
});
|
|
449
|
+
let Dn = f(() => {
|
|
450
|
+
let e = 0;
|
|
451
|
+
return en.value && (e = Tn.value + R.value.xAxisFontSize), e;
|
|
452
|
+
}), U = f(() => P.value.style.layout.grid.yAxis.position === "right");
|
|
453
|
+
function On() {
|
|
454
|
+
let e = P.value.style.layout.grid.yAxis.dataLabels.offsetX;
|
|
455
|
+
$t.value && (e = Array.from($t.value.querySelectorAll("text")).reduce((e, t) => {
|
|
456
|
+
let n = t.getComputedTextLength();
|
|
457
|
+
return n > e ? n : e;
|
|
458
|
+
}, 0));
|
|
459
|
+
let t = P.value.style.layout.grid.yAxis.axisName?.show ? P.value.style.layout.grid.yAxis.axisName.fontSize + P.value.style.layout.grid.yAxis.axisName.offsetX : 0, n = e + 13 + t;
|
|
460
|
+
return {
|
|
461
|
+
left: U.value ? 0 : n,
|
|
462
|
+
right: U.value ? n : 0,
|
|
463
|
+
scaleLabelsWidth: e,
|
|
464
|
+
yAxisNameWidth: t,
|
|
465
|
+
crosshair: 13
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
let W = f(() => {
|
|
469
|
+
let { top: e, right: t, bottom: n, left: r } = P.value.style.layout.padding, i = On();
|
|
470
|
+
return {
|
|
471
|
+
top: e + 12,
|
|
472
|
+
right: R.value.width - t - i.right,
|
|
473
|
+
left: r + i.left,
|
|
474
|
+
bottom: R.value.height - n - Dn.value,
|
|
475
|
+
width: R.value.width - r - t - i.left - i.right,
|
|
476
|
+
height: R.value.height - e - n - Dn.value - 12,
|
|
477
|
+
scaleLabelsWidth: i.scaleLabelsWidth,
|
|
478
|
+
yAxisNameWidth: i.yAxisNameWidth,
|
|
479
|
+
crosshair: i.crosshair
|
|
480
|
+
};
|
|
481
|
+
}), kn = f(() => {
|
|
482
|
+
let { left: e, top: t, width: n, height: r } = W.value, i = K.value.start, a = K.value.end - i, o = n / a, s = q.value.start - i, c = q.value.end - i, l = Math.max(0, Math.min(a, s)), ee = Math.max(0, Math.min(a, c));
|
|
483
|
+
return {
|
|
484
|
+
x: e + l * o,
|
|
485
|
+
y: t,
|
|
486
|
+
width: (ee - l) * o,
|
|
487
|
+
height: r,
|
|
488
|
+
fill: P.value.style.zoom.preview.fill,
|
|
489
|
+
stroke: P.value.style.zoom.preview.stroke,
|
|
490
|
+
"stroke-width": P.value.style.zoom.preview.strokeWidth,
|
|
491
|
+
"stroke-dasharray": P.value.style.zoom.preview.strokeDasharray,
|
|
492
|
+
"stroke-linecap": "round",
|
|
493
|
+
"stroke-linejoin": "round",
|
|
494
|
+
style: {
|
|
495
|
+
pointerEvents: "none",
|
|
496
|
+
transition: "none !important",
|
|
497
|
+
animation: "none !important"
|
|
498
|
+
}
|
|
499
|
+
};
|
|
500
|
+
}), G = f(() => I.value.length), K = S({
|
|
501
|
+
start: 0,
|
|
502
|
+
end: G.value
|
|
503
|
+
}), q = S({
|
|
504
|
+
start: 0,
|
|
505
|
+
end: G.value
|
|
506
|
+
}), An = f(() => P.value.style.zoom.preview.enable && (q.value.start !== K.value.start || q.value.end !== K.value.end));
|
|
507
|
+
function jn(e, t) {
|
|
508
|
+
q.value[e] = t;
|
|
509
|
+
}
|
|
510
|
+
function Mn() {
|
|
511
|
+
let e = Math.max(0, Math.min(K.value.start ?? 0, G.value - 1)), t = Math.max(e + 1, Math.min(K.value.end ?? G.value, G.value));
|
|
512
|
+
(!Number.isFinite(e) || !Number.isFinite(t) || t <= e) && (e = 0, t = G.value), K.value.start = e, K.value.end = t, q.value.start = e, q.value.end = t, qt.value && (qt.value.setStartValue(e), qt.value.setEndValue(t));
|
|
513
|
+
}
|
|
514
|
+
let Nn = f(() => I.value.map((e, t) => ({
|
|
515
|
+
...e,
|
|
516
|
+
absoluteIndex: t
|
|
517
|
+
}))), Pn = f(() => Nn.value.slice(K.value.start, K.value.end)), J = f(() => (I.value.forEach((e, t) => {
|
|
518
|
+
[null, void 0].includes(e[0]) && c({
|
|
519
|
+
componentName: "VueUiCandlestick",
|
|
520
|
+
type: "datasetAttribute",
|
|
521
|
+
property: "period (index 0)",
|
|
522
|
+
index: t,
|
|
523
|
+
debug: V.value
|
|
524
|
+
}), [null, void 0].includes(e[1]) && c({
|
|
525
|
+
componentName: "VueUiCandlestick",
|
|
526
|
+
type: "datasetAttribute",
|
|
527
|
+
property: "open (index 1)",
|
|
528
|
+
index: t,
|
|
529
|
+
debug: V.value
|
|
530
|
+
}), [null, void 0].includes(e[2]) && c({
|
|
531
|
+
componentName: "VueUiCandlestick",
|
|
532
|
+
type: "datasetAttribute",
|
|
533
|
+
property: "high (index 2)",
|
|
534
|
+
index: t,
|
|
535
|
+
debug: V.value
|
|
536
|
+
}), [null, void 0].includes(e[3]) && c({
|
|
537
|
+
componentName: "VueUiCandlestick",
|
|
538
|
+
type: "datasetAttribute",
|
|
539
|
+
property: "low (index 3)",
|
|
540
|
+
index: t,
|
|
541
|
+
debug: V.value
|
|
542
|
+
}), [null, void 0].includes(e[4]) && c({
|
|
543
|
+
componentName: "VueUiCandlestick",
|
|
544
|
+
type: "datasetAttribute",
|
|
545
|
+
property: "close (index 4)",
|
|
546
|
+
index: t,
|
|
547
|
+
debug: V.value
|
|
548
|
+
}), [null, void 0].includes(e[5]) && c({
|
|
549
|
+
componentName: "VueUiCandlestick",
|
|
550
|
+
type: "datasetAttribute",
|
|
551
|
+
property: "volume (index 5)",
|
|
552
|
+
index: t,
|
|
553
|
+
debug: V.value
|
|
554
|
+
});
|
|
555
|
+
}), Pn.value.map((e) => ({
|
|
556
|
+
absoluteIndex: e.absoluteIndex,
|
|
557
|
+
period: e[0],
|
|
558
|
+
open: e[1],
|
|
559
|
+
high: e[2],
|
|
560
|
+
low: e[3],
|
|
561
|
+
close: e[4],
|
|
562
|
+
volume: e[5]
|
|
563
|
+
})))), Fn = f(() => Nn.value.map((e) => ({
|
|
564
|
+
absoluteIndex: e.absoluteIndex,
|
|
565
|
+
period: e[0],
|
|
566
|
+
open: e[1],
|
|
567
|
+
high: e[2],
|
|
568
|
+
low: e[3],
|
|
569
|
+
close: e[4],
|
|
570
|
+
volume: e[5]
|
|
571
|
+
}))), Y = f(() => W.value.width / Pn.value.length), In = f(() => ({
|
|
572
|
+
max: P.value.style.layout.grid.yAxis.scale.max === null ? Math.max(...J.value.map((e) => e.high)) : P.value.style.layout.grid.yAxis.scale.max,
|
|
573
|
+
min: P.value.style.layout.grid.yAxis.scale.min === null ? 0 : P.value.style.layout.grid.yAxis.scale.min
|
|
574
|
+
})), X = f(() => l(In.value.min, In.value.max, P.value.style.layout.grid.yAxis.dataLabels.steps));
|
|
575
|
+
function Ln(e, t, n = null, r = null) {
|
|
576
|
+
return {
|
|
577
|
+
...e,
|
|
578
|
+
x: u(W.value.left + t * Y.value + Y.value / 2),
|
|
579
|
+
y: u(W.value.top + (1 - (e - X.value.min) / (X.value.max - X.value.min)) * W.value.height),
|
|
580
|
+
value: u(e),
|
|
581
|
+
isMax: e === n,
|
|
582
|
+
isMin: e === r
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
let Z = f(() => {
|
|
586
|
+
let e = {
|
|
587
|
+
o: Math.max(...J.value.map((e) => e.open)),
|
|
588
|
+
h: Math.max(...J.value.map((e) => e.high)),
|
|
589
|
+
l: Math.max(...J.value.map((e) => e.low)),
|
|
590
|
+
c: Math.max(...J.value.map((e) => e.low))
|
|
591
|
+
}, t = {
|
|
592
|
+
o: Math.min(...J.value.map((e) => e.open)),
|
|
593
|
+
h: Math.min(...J.value.map((e) => e.high)),
|
|
594
|
+
l: Math.min(...J.value.map((e) => e.low)),
|
|
595
|
+
c: Math.min(...J.value.map((e) => e.low))
|
|
596
|
+
}, n = Math.max(...J.value.map((e) => e.volume)), r = Math.min(...J.value.map((e) => e.volume));
|
|
597
|
+
return J.value.map((i, a) => {
|
|
598
|
+
let o = Ln(i.open, a, e.o, t.o), s = Ln(i.high, a, e.h, t.h), c = Ln(i.low, a, e.l, t.l), l = Ln(i.close, a, e.c, t.c), ee = i.close > i.open, te = i.volume === n, ne = i.volume === r;
|
|
599
|
+
return {
|
|
600
|
+
period: i.period,
|
|
601
|
+
open: o,
|
|
602
|
+
high: s,
|
|
603
|
+
low: c,
|
|
604
|
+
close: l,
|
|
605
|
+
volume: i.volume,
|
|
606
|
+
isBullish: ee,
|
|
607
|
+
absoluteIndex: i.absoluteIndex,
|
|
608
|
+
isMaxVolume: te,
|
|
609
|
+
isMinVolume: ne
|
|
610
|
+
};
|
|
611
|
+
});
|
|
612
|
+
});
|
|
613
|
+
function Rn({ item: e, index: t, minimapH: n, unitW: r }) {
|
|
614
|
+
let i = P.value.style.layout.grid.yAxis.scale.min ?? 0, a = P.value.style.layout.grid.yAxis.scale.max ?? Math.max(...I.value.map((e) => e[2]));
|
|
615
|
+
return {
|
|
616
|
+
...e,
|
|
617
|
+
x: u(t * r),
|
|
618
|
+
y: u((1 - (e - i) / (a - i)) * n),
|
|
619
|
+
value: u(e)
|
|
620
|
+
};
|
|
621
|
+
}
|
|
622
|
+
let zn = f(() => ({ minimapH: e, unitW: t }) => Fn.value.map((n, r) => {
|
|
623
|
+
let i = Rn({
|
|
624
|
+
item: n.open,
|
|
625
|
+
index: r,
|
|
626
|
+
minimapH: e,
|
|
627
|
+
unitW: t
|
|
628
|
+
}), a = Rn({
|
|
629
|
+
item: n.high,
|
|
630
|
+
index: r,
|
|
631
|
+
minimapH: e,
|
|
632
|
+
unitW: t
|
|
633
|
+
}), o = Rn({
|
|
634
|
+
item: n.low,
|
|
635
|
+
index: r,
|
|
636
|
+
minimapH: e,
|
|
637
|
+
unitW: t
|
|
638
|
+
}), s = Rn({
|
|
639
|
+
item: n.close,
|
|
640
|
+
index: r,
|
|
641
|
+
minimapH: e,
|
|
642
|
+
unitW: t
|
|
643
|
+
}), c = n.close > n.open;
|
|
644
|
+
return {
|
|
645
|
+
period: n.period,
|
|
646
|
+
open: i,
|
|
647
|
+
high: a,
|
|
648
|
+
low: o,
|
|
649
|
+
close: s,
|
|
650
|
+
volume: n.volume,
|
|
651
|
+
isBullish: c,
|
|
652
|
+
absoluteIndex: n.absoluteIndex
|
|
653
|
+
};
|
|
654
|
+
})), Bn = f(() => P.value.style.zoom.minimap.show ? [{
|
|
655
|
+
name: "",
|
|
656
|
+
series: I.value.map((e) => e[2]),
|
|
657
|
+
color: "#000000",
|
|
658
|
+
isVisible: !0
|
|
659
|
+
}] : []);
|
|
660
|
+
function Vn(e) {
|
|
661
|
+
return u((e - X.value.min) / (X.value.max - X.value.min));
|
|
662
|
+
}
|
|
663
|
+
let Hn = f(() => X.value.ticks.map((e) => ({
|
|
664
|
+
y: W.value.bottom - W.value.height * Vn(e),
|
|
665
|
+
value: u(e)
|
|
666
|
+
}))), Un = f(() => J.value.map((e) => e.period)), Q = S([]), Wn = S([]), Gn = 0;
|
|
667
|
+
ze(() => {
|
|
668
|
+
let e = ++Gn;
|
|
669
|
+
(async () => {
|
|
670
|
+
let t = await ce({
|
|
671
|
+
values: I.value.map((e) => e[0]),
|
|
672
|
+
maxDatapoints: I.value.length,
|
|
673
|
+
formatter: P.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter,
|
|
674
|
+
start: K.value.start,
|
|
675
|
+
end: K.value.end
|
|
676
|
+
});
|
|
677
|
+
e === Gn && (Q.value = t);
|
|
678
|
+
})();
|
|
679
|
+
});
|
|
680
|
+
let Kn = 0;
|
|
681
|
+
ze(() => {
|
|
682
|
+
let e = ++Kn;
|
|
683
|
+
(async () => {
|
|
684
|
+
let t = await ce({
|
|
685
|
+
values: I.value.map((e) => e[0]),
|
|
686
|
+
maxDatapoints: I.value.length,
|
|
687
|
+
formatter: P.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter,
|
|
688
|
+
start: 0,
|
|
689
|
+
end: G.value
|
|
690
|
+
});
|
|
691
|
+
e === Kn && (Wn.value = t);
|
|
692
|
+
})();
|
|
693
|
+
});
|
|
694
|
+
let qn = f(() => {
|
|
695
|
+
let e = P.value.style.layout.grid.xAxis.dataLabels.modulo;
|
|
696
|
+
return Q.value.length ? Math.min(e, [...new Set(Q.value.map((e) => e.text))].length) : e;
|
|
697
|
+
}), Jn = S({
|
|
698
|
+
months: [],
|
|
699
|
+
shortMonths: [],
|
|
700
|
+
days: [],
|
|
701
|
+
shortDays: []
|
|
702
|
+
}), Yn = 0;
|
|
703
|
+
ze(() => {
|
|
704
|
+
let e = ++Yn, t = P.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter;
|
|
705
|
+
(async () => {
|
|
706
|
+
let n = await se(t.locale).catch(() => se("en"));
|
|
707
|
+
e === Yn && (Jn.value = n.data);
|
|
708
|
+
})();
|
|
709
|
+
});
|
|
710
|
+
let Xn = f(() => {
|
|
711
|
+
let e = P.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter, t = oe({
|
|
712
|
+
useUTC: e.useUTC,
|
|
713
|
+
locale: Jn.value,
|
|
714
|
+
januaryAsYear: e.januaryAsYear
|
|
715
|
+
});
|
|
716
|
+
return (e, n) => {
|
|
717
|
+
let r = I.value.map((e) => e[0])?.[e];
|
|
718
|
+
return r == null ? "" : t.formatDate(new Date(r), n);
|
|
719
|
+
};
|
|
720
|
+
}), Zn = f(() => (I.value.map((e) => e[0]) || []).map((e, t) => ({
|
|
721
|
+
text: Xn.value(t, P.value.style.tooltip.timeFormat),
|
|
722
|
+
absoluteIndex: t
|
|
723
|
+
}))), Qn = f(() => (I.value.map((e) => e[0]) || []).map((e, t) => ({
|
|
724
|
+
text: Xn.value(t, P.value.style.zoom.timeFormat),
|
|
725
|
+
absoluteIndex: t
|
|
726
|
+
}))), $n = f(() => {
|
|
727
|
+
let e = P.value.style.layout.grid.xAxis.dataLabels, t = Q.value || [], n = Wn.value || [], r = K.value.start ?? 0, i = j.value, a = G.value, o = t.map((e) => e?.text ?? ""), s = n.map((e) => e?.text ?? "");
|
|
728
|
+
return re(!!e.showOnlyFirstAndLast, !!e.showOnlyAtModulo, Math.max(1, qn.value || 1), o, s, r, i, a);
|
|
729
|
+
}), er = f(() => P.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? {
|
|
730
|
+
start: Q.value.find((e) => e.absoluteIndex === K.value.start)?.text ?? "",
|
|
731
|
+
end: Q.value.find((e) => e.absoluteIndex === K.value.end - 1)?.text ?? ""
|
|
732
|
+
} : {
|
|
733
|
+
start: I.value[K.value.start] ? I.value[K.value.start][0] : I.value[0][0],
|
|
734
|
+
end: I.value[K.value.end - 1] ? I.value[K.value.end - 1][0] : I.value.at(-1)[0]
|
|
735
|
+
}), tr = S(null);
|
|
736
|
+
function nr(e, t) {
|
|
737
|
+
P.value.events.datapointClick && P.value.events.datapointClick({
|
|
738
|
+
datapoint: t,
|
|
739
|
+
seriesIndex: e + K.value.start
|
|
740
|
+
});
|
|
741
|
+
}
|
|
742
|
+
function rr(e, t) {
|
|
743
|
+
P.value.events.datapointLeave && P.value.events.datapointLeave({
|
|
744
|
+
datapoint: t,
|
|
745
|
+
seriesIndex: e + K.value.start
|
|
746
|
+
}), j.value = void 0, Ht.value = !1, N.value = null, cn.value = "pointer";
|
|
747
|
+
}
|
|
748
|
+
Re(() => O.selectedXIndex, (e) => {
|
|
749
|
+
if ([null, void 0].includes(O.selectedXIndex)) {
|
|
750
|
+
j.value = null;
|
|
751
|
+
return;
|
|
752
|
+
}
|
|
753
|
+
let t = e - K.value.start;
|
|
754
|
+
t < 0 || e >= K.value.end ? j.value = null : j.value = t ?? null;
|
|
755
|
+
}, { immediate: !0 });
|
|
756
|
+
function ir(e, n, r = "pointer") {
|
|
757
|
+
P.value.events.datapointEnter && P.value.events.datapointEnter({
|
|
758
|
+
datapoint: n,
|
|
759
|
+
seriesIndex: e + K.value.start
|
|
760
|
+
}), j.value = e, N.value = e, cn.value = r, tr.value = {
|
|
761
|
+
datapoint: n,
|
|
762
|
+
seriesIndex: e,
|
|
763
|
+
series: Z.value,
|
|
764
|
+
config: P.value
|
|
765
|
+
}, Mr({
|
|
766
|
+
seriesIndex: e,
|
|
767
|
+
datapoint: n
|
|
768
|
+
});
|
|
769
|
+
let i = P.value.style.tooltip.customFormat;
|
|
770
|
+
if (ne(i) && te(() => i({
|
|
771
|
+
seriesIndex: e,
|
|
772
|
+
datapoint: n,
|
|
773
|
+
series: Z.value,
|
|
774
|
+
config: P.value
|
|
775
|
+
}))) Ut.value = i({
|
|
776
|
+
seriesIndex: e,
|
|
777
|
+
datapoint: n,
|
|
778
|
+
series: Z.value,
|
|
779
|
+
config: P.value
|
|
780
|
+
});
|
|
781
|
+
else if (P.value.style.tooltip.show) {
|
|
782
|
+
let r = "", { period: i, open: a, high: o, low: s, close: c, volume: l, isBullish: ee } = Z.value[e], { period: te, open: ne, high: re, low: ie, close: u, volume: ae } = P.value.translations, oe = P.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? P.value.style.tooltip.useDefaultTimeFormat ? Q.value[e].text : Zn.value[e].text : i;
|
|
783
|
+
r += `<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="${P.value.style.layout.candle.borderRadius * 3}" stroke="${P.value.style.layout.candle.stroke}" stroke-width="${P.value.style.layout.candle.strokeWidth}"
|
|
784
|
+
fill="${P.value.style.layout.candle.gradient.show ? ee ? `url(#bullish_gradient_${A.value})` : `url(#bearish_gradient_${A.value})` : ee ? P.value.style.layout.candle.colors.bullish : P.value.style.layout.candle.colors.bearish}"/></svg>${oe}</div>`, r += `${ae} : <b>${isNaN(l) ? "-" : Number(l.toFixed(P.value.style.tooltip.roundingValue)).toLocaleString()}</b>`, r += `<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${P.value.style.tooltip.borderColor}">`;
|
|
785
|
+
let se = t({
|
|
786
|
+
p: P.value.style.tooltip.prefix,
|
|
787
|
+
v: a.value,
|
|
788
|
+
s: P.value.style.tooltip.suffix,
|
|
789
|
+
r: P.value.style.tooltip.roundingValue
|
|
790
|
+
}), ce = t({
|
|
791
|
+
p: P.value.style.tooltip.prefix,
|
|
792
|
+
v: o.value,
|
|
793
|
+
s: P.value.style.tooltip.suffix,
|
|
794
|
+
r: P.value.style.tooltip.roundingValue
|
|
795
|
+
}), le = t({
|
|
796
|
+
p: P.value.style.tooltip.prefix,
|
|
797
|
+
v: s.value,
|
|
798
|
+
s: P.value.style.tooltip.suffix,
|
|
799
|
+
r: P.value.style.tooltip.roundingValue
|
|
800
|
+
}), ue = t({
|
|
801
|
+
p: P.value.style.tooltip.prefix,
|
|
802
|
+
v: c.value,
|
|
803
|
+
s: P.value.style.tooltip.suffix,
|
|
804
|
+
r: P.value.style.tooltip.roundingValue
|
|
805
|
+
});
|
|
806
|
+
P.value.style.tooltip.showChart ? r += `<div style="width:100%;display:flex;align-items:center;justify-content:center;">
|
|
807
|
+
<svg viewBox="0 0 100 100" width="100px" style="background: transparent; overflow: visible">
|
|
808
|
+
<g>
|
|
809
|
+
<line x1="50" x2="50" y1="20" y2="80" stroke="${n.isBullish ? P.value.style.layout.candle.colors.bullish : P.value.style.layout.candle.colors.bearish}" stroke-width="2" stroke-linecap="round" />
|
|
810
|
+
${n.isBullish ? `
|
|
811
|
+
<line x1="45" x2="50" y1="65" y2="65" stroke="${P.value.style.layout.candle.colors.bullish}" stroke-width="1.5" stroke-linecap="round" />
|
|
812
|
+
<line x1="50" x2="55" y1="35" y2="35" stroke="${P.value.style.layout.candle.colors.bullish}" stroke-width="1.5" stroke-linecap="round" />
|
|
813
|
+
<text x="38" y="70" text-anchor="end" fill="${P.value.style.tooltip.color}">${se}</text>
|
|
814
|
+
<text x="62" y="40" text-anchor="start" fill="${P.value.style.tooltip.color}">${ue}</text>
|
|
815
|
+
` : `
|
|
816
|
+
<line x1="45" x2="50" y1="35" y2="35" stroke="${P.value.style.layout.candle.colors.bearish}" stroke-width="1.5" stroke-linecap="round" />
|
|
817
|
+
<line x1="50" x2="55" y1="65" y2="65" stroke="${P.value.style.layout.candle.colors.bearish}" stroke-width="1.5" stroke-linecap="round" />
|
|
818
|
+
<text x="40" y="40" text-anchor="end" fill="${P.value.style.tooltip.color}">${se}</text>
|
|
819
|
+
<text x="60" y="70" text-anchor="start" fill="${P.value.style.tooltip.color}">${ue}</text>
|
|
820
|
+
`}
|
|
821
|
+
<text x="50" y="13" text-anchor="middle" fill="${P.value.style.tooltip.color}">${ce}</text>
|
|
822
|
+
<text x="50" y="97" text-anchor="middle" fill="${P.value.style.tooltip.color}">${le}</text>
|
|
823
|
+
<g>
|
|
824
|
+
</svg>
|
|
825
|
+
<div>
|
|
826
|
+
` : (r += `<div>${ne}: <b>${se}</b></div>`, r += `<div>${re}: <b>${ce}</b></div>`, r += `<div>${ie}: <b>${le}</b></div>`, r += `<div>${u}: <b>${ue}</b></div>`), r += "</div>", Ut.value = `<div style="text-align:right">${r}</div>`;
|
|
827
|
+
}
|
|
828
|
+
Ht.value = !0;
|
|
829
|
+
}
|
|
830
|
+
let ar = S(null);
|
|
831
|
+
function or() {
|
|
832
|
+
return new Promise((e) => requestAnimationFrame(() => requestAnimationFrame(() => e())));
|
|
833
|
+
}
|
|
834
|
+
Ne(() => {
|
|
835
|
+
ar.value && cancelAnimationFrame(ar.value);
|
|
836
|
+
});
|
|
837
|
+
async function sr() {
|
|
838
|
+
dr(), await je(), ar.value && cancelAnimationFrame(ar.value), ar.value = requestAnimationFrame(async () => {
|
|
839
|
+
await or(), dr();
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
let cr = S(!1), lr = S(!1), ur = S(!1);
|
|
843
|
+
function dr() {
|
|
844
|
+
if (!cr.value) {
|
|
845
|
+
cr.value = !0;
|
|
846
|
+
try {
|
|
847
|
+
let { startIndex: e, endIndex: t } = P.value.style.zoom, n = G.value, r = e ?? 0, i = t == null ? n : Math.min(fr(t + 1), n);
|
|
848
|
+
ur.value = !0, K.value.start = r, K.value.end = i, q.value.start = r, q.value.end = i, Mn(), lr.value = !0;
|
|
849
|
+
} finally {
|
|
850
|
+
queueMicrotask(() => {
|
|
851
|
+
ur.value = !1;
|
|
852
|
+
}), cr.value = !1;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
function fr(e) {
|
|
857
|
+
let t = G.value;
|
|
858
|
+
return e > t ? t : e < 0 || e < K.value.start ? P.value.style.zoom.startIndex === null ? 1 : P.value.style.zoom.startIndex + 1 : e;
|
|
859
|
+
}
|
|
860
|
+
function pr(e = null) {
|
|
861
|
+
je(() => {
|
|
862
|
+
let t = [
|
|
863
|
+
P.value.translations.period,
|
|
864
|
+
P.value.translations.open,
|
|
865
|
+
P.value.translations.high,
|
|
866
|
+
P.value.translations.low,
|
|
867
|
+
P.value.translations.close,
|
|
868
|
+
P.value.translations.volume
|
|
869
|
+
], n = Z.value.map((e, t) => [
|
|
870
|
+
P.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? Q.value[t].text : e.period,
|
|
871
|
+
e.open.value,
|
|
872
|
+
e.high.value,
|
|
873
|
+
e.low.value,
|
|
874
|
+
e.close.value,
|
|
875
|
+
e.volume
|
|
876
|
+
]), i = o([
|
|
877
|
+
[P.value.style.title.text],
|
|
878
|
+
[P.value.style.title.subtitle.text],
|
|
879
|
+
[
|
|
880
|
+
[""],
|
|
881
|
+
[""],
|
|
882
|
+
[""]
|
|
883
|
+
],
|
|
884
|
+
t
|
|
885
|
+
].concat(n));
|
|
886
|
+
e ? e(i) : r({
|
|
887
|
+
csvContent: i,
|
|
888
|
+
title: P.value.style.title.text || "vue-ui-candlestick"
|
|
889
|
+
});
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
let mr = f(() => {
|
|
893
|
+
let e = Z.value.map((e, n) => {
|
|
894
|
+
let r = P.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? Q.value?.[n]?.text ?? "" : e.period, i = t({
|
|
895
|
+
p: P.value.table.td.prefix,
|
|
896
|
+
v: e.open.value,
|
|
897
|
+
s: P.value.table.td.suffix,
|
|
898
|
+
r: P.value.table.td.roundingValue
|
|
899
|
+
}), a = t({
|
|
900
|
+
p: P.value.table.td.prefix,
|
|
901
|
+
v: e.high.value,
|
|
902
|
+
s: P.value.table.td.suffix,
|
|
903
|
+
r: P.value.table.td.roundingValue
|
|
904
|
+
}), o = t({
|
|
905
|
+
p: P.value.table.td.prefix,
|
|
906
|
+
v: e.low.value,
|
|
907
|
+
s: P.value.table.td.suffix,
|
|
908
|
+
r: P.value.table.td.roundingValue
|
|
909
|
+
}), s = t({
|
|
910
|
+
p: P.value.table.td.prefix,
|
|
911
|
+
v: e.close.value,
|
|
912
|
+
s: P.value.table.td.suffix,
|
|
913
|
+
r: P.value.table.td.roundingValue
|
|
914
|
+
});
|
|
915
|
+
return [
|
|
916
|
+
`<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="${P.value.style.layout.candle.borderRadius * 3}" fill="${P.value.style.layout.candle.gradient.show ? e.isBullish ? `url(#bullish_gradient_${A.value}` : `url(#bearish_gradient_${A.value})` : e.isBullish ? P.value.style.layout.candle.colors.bullish : P.value.style.layout.candle.colors.bearish}"/></svg> ${r}`,
|
|
917
|
+
i,
|
|
918
|
+
a,
|
|
919
|
+
o,
|
|
920
|
+
s,
|
|
921
|
+
`${isNaN(e.volume) ? "-" : e.volume.toLocaleString()}`
|
|
922
|
+
];
|
|
923
|
+
}), n = Z.value.map((e, n) => [
|
|
924
|
+
P.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? Q.value?.[n]?.text ?? "" : e.period,
|
|
925
|
+
t({
|
|
926
|
+
p: P.value.table.td.prefix,
|
|
927
|
+
v: e.open.value,
|
|
928
|
+
s: P.value.table.td.suffix,
|
|
929
|
+
r: P.value.table.td.roundingValue
|
|
930
|
+
}),
|
|
931
|
+
t({
|
|
932
|
+
p: P.value.table.td.prefix,
|
|
933
|
+
v: e.high.value,
|
|
934
|
+
s: P.value.table.td.suffix,
|
|
935
|
+
r: P.value.table.td.roundingValue
|
|
936
|
+
}),
|
|
937
|
+
t({
|
|
938
|
+
p: P.value.table.td.prefix,
|
|
939
|
+
v: e.low.value,
|
|
940
|
+
s: P.value.table.td.suffix,
|
|
941
|
+
r: P.value.table.td.roundingValue
|
|
942
|
+
}),
|
|
943
|
+
t({
|
|
944
|
+
p: P.value.table.td.prefix,
|
|
945
|
+
v: e.close.value,
|
|
946
|
+
s: P.value.table.td.suffix,
|
|
947
|
+
r: P.value.table.td.roundingValue
|
|
948
|
+
}),
|
|
949
|
+
`${isNaN(e.volume) ? "-" : e.volume}`
|
|
950
|
+
]), r = {
|
|
951
|
+
th: {
|
|
952
|
+
backgroundColor: P.value.table.th.backgroundColor,
|
|
953
|
+
color: P.value.table.th.color,
|
|
954
|
+
outline: P.value.table.th.outline
|
|
955
|
+
},
|
|
956
|
+
td: {
|
|
957
|
+
backgroundColor: P.value.table.td.backgroundColor,
|
|
958
|
+
color: P.value.table.td.color,
|
|
959
|
+
outline: P.value.table.td.outline
|
|
960
|
+
},
|
|
961
|
+
breakpoint: P.value.table.responsiveBreakpoint
|
|
962
|
+
}, i = [
|
|
963
|
+
P.value.translations.period,
|
|
964
|
+
P.value.translations.open,
|
|
965
|
+
P.value.translations.high,
|
|
966
|
+
P.value.translations.low,
|
|
967
|
+
P.value.translations.last,
|
|
968
|
+
P.value.translations.volume
|
|
969
|
+
];
|
|
970
|
+
return {
|
|
971
|
+
head: i,
|
|
972
|
+
body: e,
|
|
973
|
+
bodyA11y: n,
|
|
974
|
+
config: r,
|
|
975
|
+
colNames: i
|
|
976
|
+
};
|
|
977
|
+
}), $ = S(!1);
|
|
978
|
+
function hr(e) {
|
|
979
|
+
$.value = e, Wt.value += 1;
|
|
980
|
+
}
|
|
981
|
+
function gr() {
|
|
982
|
+
H.value.showTable = !H.value.showTable;
|
|
983
|
+
}
|
|
984
|
+
function _r() {
|
|
985
|
+
H.value.showTooltip = !H.value.showTooltip;
|
|
986
|
+
}
|
|
987
|
+
let vr = S(!1);
|
|
988
|
+
function yr() {
|
|
989
|
+
vr.value = !vr.value;
|
|
990
|
+
}
|
|
991
|
+
async function br({ scale: e = 2 } = {}) {
|
|
992
|
+
if (!M.value) return;
|
|
993
|
+
let { width: t, height: n } = M.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await _e({
|
|
994
|
+
domElement: M.value,
|
|
995
|
+
base64: !0,
|
|
996
|
+
img: !0,
|
|
997
|
+
scale: e
|
|
998
|
+
});
|
|
999
|
+
return {
|
|
1000
|
+
imageUri: i,
|
|
1001
|
+
base64: a,
|
|
1002
|
+
title: P.value.style.title.text,
|
|
1003
|
+
width: t,
|
|
1004
|
+
height: n,
|
|
1005
|
+
aspectRatio: r
|
|
1006
|
+
};
|
|
1007
|
+
}
|
|
1008
|
+
let xr = f(() => R.value.width), Sr = f(() => R.value.height);
|
|
1009
|
+
ge({
|
|
1010
|
+
timeLabelsEls: en,
|
|
1011
|
+
timeLabels: Q,
|
|
1012
|
+
slicer: K,
|
|
1013
|
+
configRef: P,
|
|
1014
|
+
rotationPath: [
|
|
1015
|
+
"style",
|
|
1016
|
+
"layout",
|
|
1017
|
+
"grid",
|
|
1018
|
+
"xAxis",
|
|
1019
|
+
"dataLabels",
|
|
1020
|
+
"rotation"
|
|
1021
|
+
],
|
|
1022
|
+
autoRotatePath: [
|
|
1023
|
+
"style",
|
|
1024
|
+
"layout",
|
|
1025
|
+
"grid",
|
|
1026
|
+
"xAxis",
|
|
1027
|
+
"dataLabels",
|
|
1028
|
+
"autoRotate",
|
|
1029
|
+
"enable"
|
|
1030
|
+
],
|
|
1031
|
+
isAutoSize: !1,
|
|
1032
|
+
rotation: P.value.style.layout.grid.xAxis.dataLabels.autoRotate.angle,
|
|
1033
|
+
width: xr,
|
|
1034
|
+
height: Sr
|
|
1035
|
+
}), Re(P, () => {
|
|
1036
|
+
H.value = {
|
|
1037
|
+
showTable: P.value.table.show,
|
|
1038
|
+
showTooltip: P.value.style.tooltip.show
|
|
1039
|
+
};
|
|
1040
|
+
}, { immediate: !0 });
|
|
1041
|
+
let Cr = f(() => {
|
|
1042
|
+
let e = P.value.table.useDialog && !P.value.table.show, t = H.value.showTable;
|
|
1043
|
+
return {
|
|
1044
|
+
component: e ? Ft : At,
|
|
1045
|
+
title: `${P.value.style.title.text}${P.value.style.title.subtitle.text ? `: ${P.value.style.title.subtitle.text}` : ""}`,
|
|
1046
|
+
props: e ? {
|
|
1047
|
+
backgroundColor: P.value.table.th.backgroundColor,
|
|
1048
|
+
color: P.value.table.th.color,
|
|
1049
|
+
headerColor: P.value.table.th.color,
|
|
1050
|
+
headerBg: P.value.table.th.backgroundColor,
|
|
1051
|
+
isFullscreen: $.value,
|
|
1052
|
+
fullscreenParent: M.value,
|
|
1053
|
+
forcedWidth: Math.min(800, window.innerWidth * .8),
|
|
1054
|
+
isCursorPointer: un.value
|
|
1055
|
+
} : {
|
|
1056
|
+
hideDetails: !0,
|
|
1057
|
+
config: {
|
|
1058
|
+
open: t,
|
|
1059
|
+
maxHeight: 1e4,
|
|
1060
|
+
body: {
|
|
1061
|
+
backgroundColor: P.value.style.backgroundColor,
|
|
1062
|
+
color: P.value.style.color
|
|
1063
|
+
},
|
|
1064
|
+
head: {
|
|
1065
|
+
backgroundColor: P.value.style.backgroundColor,
|
|
1066
|
+
color: P.value.style.color
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
};
|
|
1071
|
+
});
|
|
1072
|
+
Re(() => H.value.showTable, (e) => {
|
|
1073
|
+
P.value.table.show || (e && P.value.table.useDialog && tn.value ? tn.value.open() : "close" in tn.value && tn.value.close());
|
|
1074
|
+
});
|
|
1075
|
+
function wr() {
|
|
1076
|
+
H.value.showTable = !1, nn.value && nn.value.setTableIconState(!1);
|
|
1077
|
+
}
|
|
1078
|
+
let Tr = f(() => P.value.style.backgroundColor), { exportSvg: Er, getSvg: Dr } = pe({
|
|
1079
|
+
svg: L,
|
|
1080
|
+
title: f(() => P.value.style.title),
|
|
1081
|
+
backgroundColor: Tr
|
|
1082
|
+
});
|
|
1083
|
+
async function Or({ isCb: e }) {
|
|
1084
|
+
on.value = !0, await je();
|
|
1085
|
+
try {
|
|
1086
|
+
if (e) {
|
|
1087
|
+
let { blob: e, url: t, text: n, dataUrl: r } = await Dr();
|
|
1088
|
+
await Promise.resolve(P.value.userOptions.callbacks.svg({
|
|
1089
|
+
blob: e,
|
|
1090
|
+
url: t,
|
|
1091
|
+
text: n,
|
|
1092
|
+
dataUrl: r
|
|
1093
|
+
}));
|
|
1094
|
+
} else await Promise.resolve(Er());
|
|
1095
|
+
} finally {
|
|
1096
|
+
on.value = !1;
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
function kr(e) {
|
|
1100
|
+
rn.value = e;
|
|
1101
|
+
}
|
|
1102
|
+
function Ar(e) {
|
|
1103
|
+
cr.value || ur.value || e !== K.value.start && (K.value.start = e, q.value.start = e, Mn());
|
|
1104
|
+
}
|
|
1105
|
+
function jr(e) {
|
|
1106
|
+
if (cr.value || ur.value) return;
|
|
1107
|
+
let t = fr(e);
|
|
1108
|
+
t !== K.value.end && (K.value.end = t, q.value.end = t, Mn());
|
|
1109
|
+
}
|
|
1110
|
+
function Mr({ seriesIndex: e, datapoint: t }) {
|
|
1111
|
+
zt("selectX", {
|
|
1112
|
+
dataset: t,
|
|
1113
|
+
index: K.value.start + e,
|
|
1114
|
+
indexLabel: ""
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
function Nr(e) {
|
|
1118
|
+
if (e?.stage === "start") {
|
|
1119
|
+
an.value = !0;
|
|
1120
|
+
return;
|
|
1121
|
+
}
|
|
1122
|
+
if (e?.stage === "end") {
|
|
1123
|
+
an.value = !1;
|
|
1124
|
+
return;
|
|
1125
|
+
}
|
|
1126
|
+
Cn();
|
|
1127
|
+
}
|
|
1128
|
+
async function Pr() {
|
|
1129
|
+
if (zt("copyAlt", {
|
|
1130
|
+
config: P.value,
|
|
1131
|
+
dataset: Z.value
|
|
1132
|
+
}), !P.value.userOptions.callbacks.altCopy) {
|
|
1133
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
1134
|
+
return;
|
|
1135
|
+
}
|
|
1136
|
+
await Promise.resolve(P.value.userOptions.callbacks.altCopy({
|
|
1137
|
+
config: P.value,
|
|
1138
|
+
dataset: Z.value
|
|
1139
|
+
}));
|
|
1140
|
+
}
|
|
1141
|
+
function Fr() {
|
|
1142
|
+
N.value = null, ln.value = !0;
|
|
1143
|
+
}
|
|
1144
|
+
function Ir() {
|
|
1145
|
+
N.value = null, cn.value = "pointer", Ht.value = !1, j.value = void 0, ln.value = !1;
|
|
1146
|
+
}
|
|
1147
|
+
function Lr(e) {
|
|
1148
|
+
if (!L.value || vr.value || document.activeElement !== L.value || !Z.value.length) return;
|
|
1149
|
+
let t = e.key === "ArrowLeft", n = e.key === "ArrowRight", r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
|
|
1150
|
+
if (!t && !n && !r && !i) return;
|
|
1151
|
+
if (e.preventDefault(), e.stopPropagation(), i) {
|
|
1152
|
+
N.value = null, cn.value = "pointer", Ht.value = !1, j.value = void 0;
|
|
1153
|
+
return;
|
|
1154
|
+
}
|
|
1155
|
+
if (r) {
|
|
1156
|
+
if (N.value === null) return;
|
|
1157
|
+
let e = Z.value[N.value];
|
|
1158
|
+
if (!e) return;
|
|
1159
|
+
nr(N.value, e);
|
|
1160
|
+
return;
|
|
1161
|
+
}
|
|
1162
|
+
let a = N.value, o = j.value, s = a !== null && a >= 0 && a < Z.value.length, c = o != null && o >= 0 && o < Z.value.length;
|
|
1163
|
+
s ? n ? (a += 1, a >= Z.value.length && (a = 0)) : t && (--a, a < 0 && (a = Z.value.length - 1)) : c ? (a = n ? o + 1 : o - 1, a >= Z.value.length && (a = 0), a < 0 && (a = Z.value.length - 1)) : a = n ? 0 : Z.value.length - 1;
|
|
1164
|
+
let l = Z.value[a];
|
|
1165
|
+
l && (Rr(a), ir(a, l, "keyboard"));
|
|
1166
|
+
}
|
|
1167
|
+
function Rr(e) {
|
|
1168
|
+
if (!Number.isFinite(e) || !L.value) return;
|
|
1169
|
+
let t = W.value.left + Y.value * e + Y.value / 2, n = W.value.top + W.value.height / 2, r = L.value.getBoundingClientRect();
|
|
1170
|
+
sn.value = {
|
|
1171
|
+
x: r.left + t / R.value.width * r.width,
|
|
1172
|
+
y: r.top + n / R.value.height * r.height
|
|
1173
|
+
};
|
|
1174
|
+
}
|
|
1175
|
+
let zr = f(() => ({
|
|
1176
|
+
headers: mr.value?.colNames ?? [],
|
|
1177
|
+
rows: mr.value?.bodyA11y ?? []
|
|
1178
|
+
}));
|
|
1179
|
+
return ye({
|
|
1180
|
+
getImage: br,
|
|
1181
|
+
generatePdf: Sn,
|
|
1182
|
+
generateCsv: pr,
|
|
1183
|
+
generateImage: Cn,
|
|
1184
|
+
generateSvg: Or,
|
|
1185
|
+
toggleTable: gr,
|
|
1186
|
+
toggleTooltip: _r,
|
|
1187
|
+
toggleAnnotator: yr,
|
|
1188
|
+
toggleFullscreen: hr,
|
|
1189
|
+
copyAlt: Pr
|
|
1190
|
+
}), (e, n) => (x(), h("div", {
|
|
1191
|
+
ref_key: "candlestickChart",
|
|
1192
|
+
ref: M,
|
|
1193
|
+
class: y(`vue-data-ui-component vue-ui-candlestick ${$.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${P.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
1194
|
+
style: Me(`position:relative;font-family:${P.value.style.fontFamily}; text-align:center;background:${P.value.style.backgroundColor}; ${P.value.responsive ? "height: 100%" : ""}`),
|
|
1195
|
+
id: `vue-ui-candlestick_${A.value}`,
|
|
1196
|
+
onMouseenter: gn,
|
|
1197
|
+
onMouseleave: _n
|
|
1198
|
+
}, [
|
|
1199
|
+
g("div", {
|
|
1200
|
+
id: `chart-instructions-${A.value}`,
|
|
1201
|
+
class: "sr-only"
|
|
1202
|
+
}, [g("p", null, T(P.value.a11y.translations.keyboardNavigation), 1)], 8, He),
|
|
1203
|
+
zr.value?.rows?.length ? (x(), p(Ce, {
|
|
1204
|
+
key: 0,
|
|
1205
|
+
uid: A.value,
|
|
1206
|
+
head: zr.value.headers,
|
|
1207
|
+
body: zr.value.rows,
|
|
1208
|
+
notice: P.value.a11y.translations.tableAvailable,
|
|
1209
|
+
caption: P.value.a11y.translations.tableCaption
|
|
1210
|
+
}, null, 8, [
|
|
1211
|
+
"uid",
|
|
1212
|
+
"head",
|
|
1213
|
+
"body",
|
|
1214
|
+
"notice",
|
|
1215
|
+
"caption"
|
|
1216
|
+
])) : m("", !0),
|
|
1217
|
+
P.value.userOptions.buttons.annotator ? (x(), p(E(Mt), {
|
|
1218
|
+
key: 1,
|
|
1219
|
+
svgRef: E(L),
|
|
1220
|
+
backgroundColor: P.value.style.backgroundColor,
|
|
1221
|
+
color: P.value.style.color,
|
|
1222
|
+
active: vr.value,
|
|
1223
|
+
isCursorPointer: un.value,
|
|
1224
|
+
onClose: yr
|
|
1225
|
+
}, {
|
|
1226
|
+
"annotator-action-close": D(() => [w(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
1227
|
+
"annotator-action-color": D(({ color: t }) => [w(e.$slots, "annotator-action-color", b(v({ color: t })), void 0, !0)]),
|
|
1228
|
+
"annotator-action-draw": D(({ mode: t }) => [w(e.$slots, "annotator-action-draw", b(v({ mode: t })), void 0, !0)]),
|
|
1229
|
+
"annotator-action-undo": D(({ disabled: t }) => [w(e.$slots, "annotator-action-undo", b(v({ disabled: t })), void 0, !0)]),
|
|
1230
|
+
"annotator-action-redo": D(({ disabled: t }) => [w(e.$slots, "annotator-action-redo", b(v({ disabled: t })), void 0, !0)]),
|
|
1231
|
+
"annotator-action-delete": D(({ disabled: t }) => [w(e.$slots, "annotator-action-delete", b(v({ disabled: t })), void 0, !0)]),
|
|
1232
|
+
_: 3
|
|
1233
|
+
}, 8, [
|
|
1234
|
+
"svgRef",
|
|
1235
|
+
"backgroundColor",
|
|
1236
|
+
"color",
|
|
1237
|
+
"active",
|
|
1238
|
+
"isCursorPointer"
|
|
1239
|
+
])) : m("", !0),
|
|
1240
|
+
wn.value ? (x(), h("div", {
|
|
1241
|
+
key: 2,
|
|
1242
|
+
ref_key: "noTitle",
|
|
1243
|
+
ref: Yt,
|
|
1244
|
+
class: "vue-data-ui-no-title-space",
|
|
1245
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
1246
|
+
}, null, 512)) : m("", !0),
|
|
1247
|
+
P.value.style.title.text ? (x(), h("div", {
|
|
1248
|
+
key: 3,
|
|
1249
|
+
ref_key: "chartTitle",
|
|
1250
|
+
ref: Gt,
|
|
1251
|
+
style: "width:100%;background:transparent"
|
|
1252
|
+
}, [(x(), p(ve, {
|
|
1253
|
+
key: `title_${Qt.value}`,
|
|
1254
|
+
config: {
|
|
1255
|
+
title: {
|
|
1256
|
+
cy: "candlestick-div-title",
|
|
1257
|
+
...P.value.style.title
|
|
1258
|
+
},
|
|
1259
|
+
subtitle: {
|
|
1260
|
+
cy: "candlestick-div-subtitle",
|
|
1261
|
+
...P.value.style.title.subtitle
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
}, null, 8, ["config"]))], 512)) : m("", !0),
|
|
1265
|
+
P.value.userOptions.show && Bt.value && (E(hn) || E(pn)) ? (x(), p(E(Nt), {
|
|
1266
|
+
ref_key: "userOptionsRef",
|
|
1267
|
+
ref: nn,
|
|
1268
|
+
key: `user_options_${Wt.value}`,
|
|
1269
|
+
backgroundColor: P.value.style.backgroundColor,
|
|
1270
|
+
color: P.value.style.color,
|
|
1271
|
+
isImaging: E(xn),
|
|
1272
|
+
isPrinting: E(bn),
|
|
1273
|
+
uid: A.value,
|
|
1274
|
+
hasTooltip: P.value.userOptions.buttons.tooltip && P.value.style.tooltip.show,
|
|
1275
|
+
hasPdf: P.value.userOptions.buttons.pdf,
|
|
1276
|
+
hasImg: P.value.userOptions.buttons.img,
|
|
1277
|
+
hasSvg: P.value.userOptions.buttons.svg,
|
|
1278
|
+
hasXls: P.value.userOptions.buttons.csv,
|
|
1279
|
+
hasTable: P.value.userOptions.buttons.table,
|
|
1280
|
+
hasFullscreen: P.value.userOptions.buttons.fullscreen,
|
|
1281
|
+
hasAltCopy: P.value.userOptions.buttons.altCopy,
|
|
1282
|
+
isFullscreen: $.value,
|
|
1283
|
+
isTooltip: H.value.showTooltip,
|
|
1284
|
+
titles: { ...P.value.userOptions.buttonTitles },
|
|
1285
|
+
chartElement: M.value,
|
|
1286
|
+
position: P.value.userOptions.position,
|
|
1287
|
+
hasAnnotator: P.value.userOptions.buttons.annotator,
|
|
1288
|
+
isAnnotation: vr.value,
|
|
1289
|
+
callbacks: P.value.userOptions.callbacks,
|
|
1290
|
+
printScale: P.value.userOptions.print.scale,
|
|
1291
|
+
tableDialog: P.value.table.useDialog,
|
|
1292
|
+
isCursorPointer: un.value,
|
|
1293
|
+
onToggleFullscreen: hr,
|
|
1294
|
+
onGeneratePdf: E(Sn),
|
|
1295
|
+
onGenerateCsv: pr,
|
|
1296
|
+
onGenerateImage: Nr,
|
|
1297
|
+
onGenerateSvg: Or,
|
|
1298
|
+
onToggleTable: gr,
|
|
1299
|
+
onToggleTooltip: _r,
|
|
1300
|
+
onToggleAnnotator: yr,
|
|
1301
|
+
onCopyAlt: Pr,
|
|
1302
|
+
style: Me({ visibility: E(hn) ? E(pn) ? "visible" : "hidden" : "visible" })
|
|
1303
|
+
}, De({ _: 2 }, [
|
|
1304
|
+
e.$slots.menuIcon ? {
|
|
1305
|
+
name: "menuIcon",
|
|
1306
|
+
fn: D(({ isOpen: t, color: n }) => [w(e.$slots, "menuIcon", b(v({
|
|
1307
|
+
isOpen: t,
|
|
1308
|
+
color: n
|
|
1309
|
+
})), void 0, !0)]),
|
|
1310
|
+
key: "0"
|
|
1311
|
+
} : void 0,
|
|
1312
|
+
e.$slots.optionTooltip ? {
|
|
1313
|
+
name: "optionTooltip",
|
|
1314
|
+
fn: D(() => [w(e.$slots, "optionTooltip", {}, void 0, !0)]),
|
|
1315
|
+
key: "1"
|
|
1316
|
+
} : void 0,
|
|
1317
|
+
e.$slots.optionPdf ? {
|
|
1318
|
+
name: "optionPdf",
|
|
1319
|
+
fn: D(() => [w(e.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1320
|
+
key: "2"
|
|
1321
|
+
} : void 0,
|
|
1322
|
+
e.$slots.optionCsv ? {
|
|
1323
|
+
name: "optionCsv",
|
|
1324
|
+
fn: D(() => [w(e.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1325
|
+
key: "3"
|
|
1326
|
+
} : void 0,
|
|
1327
|
+
e.$slots.optionImg ? {
|
|
1328
|
+
name: "optionImg",
|
|
1329
|
+
fn: D(() => [w(e.$slots, "optionImg", {}, void 0, !0)]),
|
|
1330
|
+
key: "4"
|
|
1331
|
+
} : void 0,
|
|
1332
|
+
e.$slots.optionSvg ? {
|
|
1333
|
+
name: "optionSvg",
|
|
1334
|
+
fn: D(() => [w(e.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1335
|
+
key: "5"
|
|
1336
|
+
} : void 0,
|
|
1337
|
+
e.$slots.optionTable ? {
|
|
1338
|
+
name: "optionTable",
|
|
1339
|
+
fn: D(() => [w(e.$slots, "optionTable", {}, void 0, !0)]),
|
|
1340
|
+
key: "6"
|
|
1341
|
+
} : void 0,
|
|
1342
|
+
e.$slots.optionFullscreen ? {
|
|
1343
|
+
name: "optionFullscreen",
|
|
1344
|
+
fn: D(({ toggleFullscreen: t, isFullscreen: n }) => [w(e.$slots, "optionFullscreen", b(v({
|
|
1345
|
+
toggleFullscreen: t,
|
|
1346
|
+
isFullscreen: n
|
|
1347
|
+
})), void 0, !0)]),
|
|
1348
|
+
key: "7"
|
|
1349
|
+
} : void 0,
|
|
1350
|
+
e.$slots.optionAnnotator ? {
|
|
1351
|
+
name: "optionAnnotator",
|
|
1352
|
+
fn: D(({ toggleAnnotator: t, isAnnotator: n }) => [w(e.$slots, "optionAnnotator", b(v({
|
|
1353
|
+
toggleAnnotator: t,
|
|
1354
|
+
isAnnotator: n
|
|
1355
|
+
})), void 0, !0)]),
|
|
1356
|
+
key: "8"
|
|
1357
|
+
} : void 0,
|
|
1358
|
+
e.$slots.optionAltCopy ? {
|
|
1359
|
+
name: "optionAltCopy",
|
|
1360
|
+
fn: D(({ altCopy: t }) => [w(e.$slots, "optionAltCopy", b(v({ altCopy: t })), void 0, !0)]),
|
|
1361
|
+
key: "9"
|
|
1362
|
+
} : void 0,
|
|
1363
|
+
e.$slots["custom-menu-before"] ? {
|
|
1364
|
+
name: "custom-menu-before",
|
|
1365
|
+
fn: D(() => [w(e.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
1366
|
+
key: "10"
|
|
1367
|
+
} : void 0,
|
|
1368
|
+
e.$slots["custom-menu-after"] ? {
|
|
1369
|
+
name: "custom-menu-after",
|
|
1370
|
+
fn: D(() => [w(e.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
1371
|
+
key: "11"
|
|
1372
|
+
} : void 0
|
|
1373
|
+
]), 1032, /* @__PURE__ */ "backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.style".split("."))) : m("", !0),
|
|
1374
|
+
g("div", Ue, [(x(), h("svg", {
|
|
1375
|
+
ref_key: "svgRef",
|
|
1376
|
+
ref: L,
|
|
1377
|
+
xmlns: E(ie),
|
|
1378
|
+
"aria-describedby": `chart-instructions-${A.value}`,
|
|
1379
|
+
class: y({
|
|
1380
|
+
"vue-data-ui-fullscreen--on": $.value,
|
|
1381
|
+
"vue-data-ui-fulscreen--off": !$.value
|
|
1382
|
+
}),
|
|
1383
|
+
viewBox: `0 0 ${R.value.width <= 0 ? 10 : R.value.width} ${R.value.height <= 0 ? 10 : R.value.height}`,
|
|
1384
|
+
style: Me(`max-width:100%;overflow:visible;background:transparent;color:${P.value.style.color}`),
|
|
1385
|
+
tabindex: "0",
|
|
1386
|
+
onFocus: Fr,
|
|
1387
|
+
onBlur: Ir,
|
|
1388
|
+
onKeydown: Lr
|
|
1389
|
+
}, [
|
|
1390
|
+
ke(E(Pt)),
|
|
1391
|
+
e.$slots["chart-background"] ? (x(), h("foreignObject", {
|
|
1392
|
+
key: 0,
|
|
1393
|
+
x: W.value.left,
|
|
1394
|
+
y: W.value.top,
|
|
1395
|
+
width: Math.max(.1, W.value.width),
|
|
1396
|
+
height: Math.max(.1, W.value.height),
|
|
1397
|
+
style: { pointerEvents: "none" }
|
|
1398
|
+
}, [w(e.$slots, "chart-background", {}, void 0, !0)], 8, Ge)) : m("", !0),
|
|
1399
|
+
Z.value.length > 0 ? (x(), h("g", Ke, [
|
|
1400
|
+
g("defs", null, [g("linearGradient", {
|
|
1401
|
+
id: `bearish_gradient_${A.value}`,
|
|
1402
|
+
x2: "0%",
|
|
1403
|
+
y2: "100%"
|
|
1404
|
+
}, [
|
|
1405
|
+
g("stop", {
|
|
1406
|
+
offset: "0%",
|
|
1407
|
+
"stop-color": P.value.style.layout.candle.colors.bearish
|
|
1408
|
+
}, null, 8, Je),
|
|
1409
|
+
g("stop", {
|
|
1410
|
+
offset: "50%",
|
|
1411
|
+
"stop-color": `${E(i)(P.value.style.layout.candle.colors.bearish, .02)}DE`
|
|
1412
|
+
}, null, 8, Ye),
|
|
1413
|
+
g("stop", {
|
|
1414
|
+
offset: "100%",
|
|
1415
|
+
"stop-color": `${E(i)(P.value.style.layout.candle.colors.bearish, .05)}66`
|
|
1416
|
+
}, null, 8, Xe)
|
|
1417
|
+
], 8, qe), g("linearGradient", {
|
|
1418
|
+
id: `bullish_gradient_${A.value}`,
|
|
1419
|
+
x2: "0%",
|
|
1420
|
+
y2: "100%"
|
|
1421
|
+
}, [
|
|
1422
|
+
g("stop", {
|
|
1423
|
+
offset: "0%",
|
|
1424
|
+
"stop-color": P.value.style.layout.candle.colors.bullish
|
|
1425
|
+
}, null, 8, Qe),
|
|
1426
|
+
g("stop", {
|
|
1427
|
+
offset: "50%",
|
|
1428
|
+
"stop-color": `${E(i)(P.value.style.layout.candle.colors.bullish, .02)}DE`
|
|
1429
|
+
}, null, 8, $e),
|
|
1430
|
+
g("stop", {
|
|
1431
|
+
offset: "100%",
|
|
1432
|
+
"stop-color": `${E(i)(P.value.style.layout.candle.colors.bullish, .05)}66`
|
|
1433
|
+
}, null, 8, et)
|
|
1434
|
+
], 8, Ze)]),
|
|
1435
|
+
P.value.style.layout.grid.show ? (x(), h("g", tt, [
|
|
1436
|
+
g("line", {
|
|
1437
|
+
x1: U.value ? W.value.right : W.value.left,
|
|
1438
|
+
x2: U.value ? W.value.right : W.value.left,
|
|
1439
|
+
y1: W.value.top,
|
|
1440
|
+
y2: W.value.bottom,
|
|
1441
|
+
stroke: P.value.style.layout.grid.stroke,
|
|
1442
|
+
"stroke-width": P.value.style.layout.grid.strokeWidth,
|
|
1443
|
+
"stroke-linecap": "round"
|
|
1444
|
+
}, null, 8, nt),
|
|
1445
|
+
g("line", {
|
|
1446
|
+
x1: W.value.left,
|
|
1447
|
+
x2: W.value.right,
|
|
1448
|
+
y1: W.value.bottom,
|
|
1449
|
+
y2: W.value.bottom,
|
|
1450
|
+
stroke: P.value.style.layout.grid.stroke,
|
|
1451
|
+
"stroke-width": P.value.style.layout.grid.strokeWidth,
|
|
1452
|
+
"stroke-linecap": "round"
|
|
1453
|
+
}, null, 8, rt),
|
|
1454
|
+
P.value.style.layout.grid.horizontalLines.show ? (x(!0), h(d, { key: 0 }, C(Hn.value, (e) => (x(), h("line", {
|
|
1455
|
+
x1: W.value.left,
|
|
1456
|
+
x2: W.value.right,
|
|
1457
|
+
y1: e.y,
|
|
1458
|
+
y2: e.y,
|
|
1459
|
+
stroke: P.value.style.layout.grid.horizontalLines.stroke,
|
|
1460
|
+
"stroke-width": P.value.style.layout.grid.horizontalLines.strokeWidth,
|
|
1461
|
+
"stroke-dasharray": P.value.style.layout.grid.horizontalLines.strokeDasharray,
|
|
1462
|
+
"stroke-linecap": "round"
|
|
1463
|
+
}, null, 8, it))), 256)) : m("", !0),
|
|
1464
|
+
P.value.style.layout.grid.verticalLines.show ? (x(!0), h(d, { key: 1 }, C($n.value, (e, t) => (x(), h("g", null, [e.text ? (x(), h("line", {
|
|
1465
|
+
key: 0,
|
|
1466
|
+
x1: W.value.left + Y.value * t + Y.value / 2,
|
|
1467
|
+
x2: W.value.left + Y.value * t + Y.value / 2,
|
|
1468
|
+
y1: W.value.top,
|
|
1469
|
+
y2: W.value.bottom,
|
|
1470
|
+
stroke: P.value.style.layout.grid.verticalLines.stroke,
|
|
1471
|
+
"stroke-width": P.value.style.layout.grid.verticalLines.strokeWidth,
|
|
1472
|
+
"stroke-dasharray": P.value.style.layout.grid.verticalLines.strokeDasharray,
|
|
1473
|
+
"stroke-linecap": "round"
|
|
1474
|
+
}, null, 8, at)) : m("", !0)]))), 256)) : m("", !0),
|
|
1475
|
+
P.value.style.layout.grid.xAxis.ticks.show ? (x(!0), h(d, { key: 2 }, C($n.value, (e, t) => (x(), h("g", null, [e.text ? (x(), h("line", {
|
|
1476
|
+
key: 0,
|
|
1477
|
+
x1: W.value.left + Y.value * t + Y.value / 2,
|
|
1478
|
+
x2: W.value.left + Y.value * t + Y.value / 2,
|
|
1479
|
+
y1: W.value.bottom,
|
|
1480
|
+
y2: W.value.bottom + 3,
|
|
1481
|
+
stroke: P.value.style.layout.grid.stroke,
|
|
1482
|
+
"stroke-width": P.value.style.layout.grid.strokeWidth,
|
|
1483
|
+
"stroke-linecap": "round"
|
|
1484
|
+
}, null, 8, ot)) : m("", !0)]))), 256)) : m("", !0)
|
|
1485
|
+
])) : m("", !0),
|
|
1486
|
+
P.value.style.layout.grid.yAxis.dataLabels.show ? (x(), h("g", {
|
|
1487
|
+
key: 1,
|
|
1488
|
+
ref_key: "scaleLabels",
|
|
1489
|
+
ref: $t
|
|
1490
|
+
}, [(x(!0), h(d, null, C(Hn.value, (e, n) => (x(), h("g", null, [e.value >= X.value.min && e.value <= X.value.max ? (x(), h("line", {
|
|
1491
|
+
key: 0,
|
|
1492
|
+
x1: U.value ? W.value.right : W.value.left,
|
|
1493
|
+
x2: U.value ? W.value.right + 5 : W.value.left - 5,
|
|
1494
|
+
y1: e.y,
|
|
1495
|
+
y2: e.y,
|
|
1496
|
+
stroke: P.value.style.layout.grid.stroke,
|
|
1497
|
+
"stroke-width": P.value.style.layout.grid.strokeWidth,
|
|
1498
|
+
"stroke-linecap": "round"
|
|
1499
|
+
}, null, 8, st)) : m("", !0), e.value >= X.value.min && e.value <= X.value.max ? (x(), h("text", {
|
|
1500
|
+
key: 1,
|
|
1501
|
+
x: U.value ? W.value.right + 8 + P.value.style.layout.grid.yAxis.dataLabels.offsetX : W.value.left - 8 + P.value.style.layout.grid.yAxis.dataLabels.offsetX,
|
|
1502
|
+
y: e.y + R.value.yAxisFontSize / 3,
|
|
1503
|
+
"text-anchor": U.value ? "start" : "end",
|
|
1504
|
+
"font-size": R.value.yAxisFontSize,
|
|
1505
|
+
fill: P.value.style.layout.grid.yAxis.dataLabels.color,
|
|
1506
|
+
"font-weight": P.value.style.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
|
|
1507
|
+
}, T(E(t)({
|
|
1508
|
+
p: P.value.style.layout.grid.yAxis.dataLabels.prefix,
|
|
1509
|
+
v: e.value,
|
|
1510
|
+
s: P.value.style.layout.grid.yAxis.dataLabels.suffix,
|
|
1511
|
+
r: P.value.style.layout.grid.yAxis.dataLabels.roundingValue
|
|
1512
|
+
})), 9, ct)) : m("", !0)]))), 256))], 512)) : m("", !0),
|
|
1513
|
+
P.value.style.layout.grid.xAxis.dataLabels.show && !P.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? (x(), h("g", {
|
|
1514
|
+
key: 2,
|
|
1515
|
+
ref_key: "timeLabelsEls",
|
|
1516
|
+
ref: en
|
|
1517
|
+
}, [(x(!0), h(d, null, C(Un.value, (e, t) => (x(), h("g", null, [g("text", {
|
|
1518
|
+
class: "vue-data-ui-time-label",
|
|
1519
|
+
transform: `translate(${W.value.left + Y.value * t + Y.value / 2}, ${W.value.bottom + R.value.xAxisFontSize * 1.5}), rotate(${P.value.style.layout.grid.xAxis.dataLabels.rotation})`,
|
|
1520
|
+
"text-anchor": P.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : P.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
|
|
1521
|
+
"font-size": R.value.xAxisFontSize,
|
|
1522
|
+
fill: P.value.style.layout.grid.xAxis.dataLabels.color,
|
|
1523
|
+
"font-weight": P.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
|
|
1524
|
+
}, T(e), 9, lt)]))), 256))], 512)) : m("", !0),
|
|
1525
|
+
P.value.style.layout.grid.xAxis.dataLabels.show && P.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? (x(), h("g", {
|
|
1526
|
+
key: 3,
|
|
1527
|
+
ref_key: "timeLabelsEls",
|
|
1528
|
+
ref: en
|
|
1529
|
+
}, [(x(!0), h(d, null, C($n.value, (e, t) => (x(), h("g", null, [g("text", {
|
|
1530
|
+
class: "vue-data-ui-time-label",
|
|
1531
|
+
transform: `translate(${W.value.left + Y.value * t + Y.value / 2}, ${W.value.bottom + R.value.xAxisFontSize * 1.5}), rotate(${P.value.style.layout.grid.xAxis.dataLabels.rotation})`,
|
|
1532
|
+
"text-anchor": P.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : P.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
|
|
1533
|
+
"font-size": R.value.xAxisFontSize,
|
|
1534
|
+
fill: P.value.style.layout.grid.xAxis.dataLabels.color,
|
|
1535
|
+
"font-weight": P.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
|
|
1536
|
+
}, T(e?.text ?? ""), 9, ut)]))), 256))], 512)) : m("", !0),
|
|
1537
|
+
P.value.type === "candlestick" ? (x(), h(d, { key: 4 }, [g("g", null, [(x(!0), h(d, null, C(Z.value, (e, t) => (x(), h("g", null, [
|
|
1538
|
+
g("rect", {
|
|
1539
|
+
x: e.open.x - P.value.style.layout.wick.strokeWidth / 2,
|
|
1540
|
+
y: e.high.y,
|
|
1541
|
+
width: P.value.style.layout.wick.strokeWidth,
|
|
1542
|
+
height: Math.abs(e.high.y - e.low.y),
|
|
1543
|
+
fill: P.value.style.layout.wick.stroke,
|
|
1544
|
+
stroke: "none",
|
|
1545
|
+
rx: P.value.style.layout.wick.strokeWidth / 2,
|
|
1546
|
+
class: y({ "vue-data-ui-transition": k.value && !E(F) })
|
|
1547
|
+
}, null, 10, dt),
|
|
1548
|
+
P.value.style.layout.wick.extremity.shape === "circle" ? (x(), h("g", ft, [g("circle", {
|
|
1549
|
+
cx: e.high.x,
|
|
1550
|
+
cy: e.high.y,
|
|
1551
|
+
r: P.value.style.layout.wick.extremity.size === "auto" ? Y.value / 20 : P.value.style.layout.wick.extremity.size,
|
|
1552
|
+
fill: P.value.style.layout.wick.extremity.color,
|
|
1553
|
+
class: y({ "vue-data-ui-transition": k.value && !E(F) })
|
|
1554
|
+
}, null, 10, pt), g("circle", {
|
|
1555
|
+
cx: e.low.x,
|
|
1556
|
+
cy: e.low.y,
|
|
1557
|
+
r: P.value.style.layout.wick.extremity.size === "auto" ? Y.value / 20 : P.value.style.layout.wick.extremity.size,
|
|
1558
|
+
fill: P.value.style.layout.wick.extremity.color,
|
|
1559
|
+
class: y({ "vue-data-ui-transition": k.value && !E(F) })
|
|
1560
|
+
}, null, 10, mt)])) : m("", !0),
|
|
1561
|
+
P.value.style.layout.wick.extremity.shape === "line" ? (x(), h("g", ht, [g("rect", {
|
|
1562
|
+
x: e.high.x - (P.value.style.layout.wick.extremity.size === "auto" ? Y.value * P.value.style.layout.candle.widthRatio : P.value.style.layout.wick.extremity.size) / 2,
|
|
1563
|
+
y: e.high.y - P.value.style.layout.wick.strokeWidth / 2,
|
|
1564
|
+
width: Math.abs(e.high.x - (P.value.style.layout.wick.extremity.size === "auto" ? Y.value * P.value.style.layout.candle.widthRatio : P.value.style.layout.wick.extremity.size) / 2 - (e.high.x + (P.value.style.layout.wick.extremity.size === "auto" ? Y.value * P.value.style.layout.candle.widthRatio : P.value.style.layout.wick.extremity.size) / 2)),
|
|
1565
|
+
height: P.value.style.layout.wick.strokeWidth,
|
|
1566
|
+
rx: P.value.style.layout.wick.strokeWidth / 2,
|
|
1567
|
+
fill: P.value.style.layout.wick.extremity.color,
|
|
1568
|
+
stroke: "none",
|
|
1569
|
+
class: y({ "vue-data-ui-transition": k.value && !E(F) })
|
|
1570
|
+
}, null, 10, gt), g("rect", {
|
|
1571
|
+
x: e.low.x - (P.value.style.layout.wick.extremity.size === "auto" ? Y.value * P.value.style.layout.candle.widthRatio : P.value.style.layout.wick.extremity.size) / 2,
|
|
1572
|
+
y: e.low.y - P.value.style.layout.wick.strokeWidth / 2,
|
|
1573
|
+
width: Math.abs(e.low.x - (P.value.style.layout.wick.extremity.size === "auto" ? Y.value * P.value.style.layout.candle.widthRatio : P.value.style.layout.wick.extremity.size) / 2 - (e.low.x + (P.value.style.layout.wick.extremity.size === "auto" ? Y.value * P.value.style.layout.candle.widthRatio : P.value.style.layout.wick.extremity.size) / 2)),
|
|
1574
|
+
height: P.value.style.layout.wick.strokeWidth,
|
|
1575
|
+
fill: P.value.style.layout.wick.extremity.color,
|
|
1576
|
+
stroke: "none",
|
|
1577
|
+
rx: P.value.style.layout.wick.strokeWidth / 2,
|
|
1578
|
+
class: y({ "vue-data-ui-transition": k.value && !E(F) })
|
|
1579
|
+
}, null, 10, _t)])) : m("", !0)
|
|
1580
|
+
]))), 256))]), g("g", null, [(x(!0), h(d, null, C(Z.value, (e, t) => (x(), h("rect", {
|
|
1581
|
+
x: e.open.x - Y.value / 2 + Y.value * (1 - P.value.style.layout.candle.widthRatio) / 2,
|
|
1582
|
+
y: e.isBullish ? e.close.y : e.open.y,
|
|
1583
|
+
height: Math.abs(e.close.y - e.open.y) <= 0 ? 1e-4 : Math.abs(e.close.y - e.open.y),
|
|
1584
|
+
width: Y.value * P.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : Y.value * P.value.style.layout.candle.widthRatio,
|
|
1585
|
+
fill: P.value.style.layout.candle.gradient.underlayer,
|
|
1586
|
+
rx: P.value.style.layout.candle.borderRadius,
|
|
1587
|
+
stroke: "none",
|
|
1588
|
+
class: y({ "vue-data-ui-transition": k.value && !E(F) })
|
|
1589
|
+
}, null, 10, vt))), 256)), (x(!0), h(d, null, C(Z.value, (e, t) => (x(), h("rect", {
|
|
1590
|
+
x: e.open.x - Y.value / 2 + Y.value * (1 - P.value.style.layout.candle.widthRatio) / 2,
|
|
1591
|
+
y: e.isBullish ? e.close.y : e.open.y,
|
|
1592
|
+
height: Math.abs(e.close.y - e.open.y) <= 0 ? 1e-4 : Math.abs(e.close.y - e.open.y),
|
|
1593
|
+
width: Y.value * P.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : Y.value * P.value.style.layout.candle.widthRatio,
|
|
1594
|
+
fill: e.isBullish ? P.value.style.layout.candle.gradient.show ? `url(#bullish_gradient_${A.value})` : P.value.style.layout.candle.colors.bullish : P.value.style.layout.candle.gradient.show ? `url(#bearish_gradient_${A.value})` : P.value.style.layout.candle.colors.bearish,
|
|
1595
|
+
rx: P.value.style.layout.candle.borderRadius,
|
|
1596
|
+
stroke: P.value.style.layout.candle.stroke,
|
|
1597
|
+
"stroke-width": P.value.style.layout.candle.strokeWidth,
|
|
1598
|
+
"stroke-linecap": "round",
|
|
1599
|
+
"stroke-linejoin": "round",
|
|
1600
|
+
class: y({ "vue-data-ui-transition": k.value && !E(F) })
|
|
1601
|
+
}, null, 10, yt))), 256))])], 64)) : m("", !0),
|
|
1602
|
+
P.value.type === "ohlc" ? (x(!0), h(d, { key: 5 }, C(Z.value, (e, t) => (x(), h("g", null, [g("path", {
|
|
1603
|
+
d: `M ${e.high.x},${e.high.y} ${e.low.x},${e.low.y} M${e.open.x - Math.min(6, Y.value / 3)},${e.open.y} ${e.open.x},${e.open.y} M${e.close.x},${e.close.y} ${e.close.x + Math.min(6, Y.value / 3)},${e.close.y}`,
|
|
1604
|
+
stroke: e.isBullish ? P.value.style.layout.candle.colors.bullish : P.value.style.layout.candle.colors.bearish,
|
|
1605
|
+
"stroke-width": 1
|
|
1606
|
+
}, null, 8, bt)]))), 256)) : m("", !0),
|
|
1607
|
+
g("g", null, [(x(!0), h(d, null, C(Z.value, (e, t) => (x(), h("rect", {
|
|
1608
|
+
x: W.value.left + t * Y.value,
|
|
1609
|
+
y: W.value.top,
|
|
1610
|
+
height: W.value.height <= 0 ? 1e-4 : W.value.height,
|
|
1611
|
+
width: Y.value <= 0 ? 1e-4 : Y.value,
|
|
1612
|
+
fill: j.value === t || rn.value === t ? E(ee)(P.value.style.layout.selector.color, P.value.style.layout.selector.opacity) : "transparent",
|
|
1613
|
+
onMouseover: () => ir(t, e, "pointer"),
|
|
1614
|
+
onMouseleave: () => rr(t, e),
|
|
1615
|
+
onClick: () => nr(t, e)
|
|
1616
|
+
}, null, 40, xt))), 256))])
|
|
1617
|
+
])) : m("", !0),
|
|
1618
|
+
An.value ? (x(), h("rect", Ae({ key: 2 }, kn.value, {
|
|
1619
|
+
"data-start": K.value.start,
|
|
1620
|
+
"data-end": K.value.end
|
|
1621
|
+
}), null, 16, St)) : m("", !0),
|
|
1622
|
+
w(e.$slots, "svg", { svg: {
|
|
1623
|
+
...R.value,
|
|
1624
|
+
data: Z.value,
|
|
1625
|
+
drawingArea: W.value,
|
|
1626
|
+
isPrintingImg: E(bn) || E(xn) || an.value,
|
|
1627
|
+
isPrintingSvg: on.value
|
|
1628
|
+
} }, void 0, !0)
|
|
1629
|
+
], 46, We)), e.$slots.hint ? (x(), h("div", Ct, [w(e.$slots, "hint", b(v({
|
|
1630
|
+
hint: P.value.a11y.translations.keyboardNavigation,
|
|
1631
|
+
isVisible: ln.value
|
|
1632
|
+
})), void 0, !0)])) : m("", !0)]),
|
|
1633
|
+
e.$slots.watermark ? (x(), h("div", wt, [w(e.$slots, "watermark", b(v({ isPrinting: E(bn) || E(xn) || an.value || on.value })), void 0, !0)])) : m("", !0),
|
|
1634
|
+
P.value.style.zoom.show && G.value > 6 && Bt.value && lr.value ? (x(), p(Se, {
|
|
1635
|
+
key: 6,
|
|
1636
|
+
ref_key: "chartSlicer",
|
|
1637
|
+
ref: qt,
|
|
1638
|
+
allMinimaps: Bn.value,
|
|
1639
|
+
background: P.value.style.zoom.color,
|
|
1640
|
+
borderColor: P.value.style.backgroundColor,
|
|
1641
|
+
customFormat: P.value.style.zoom.customFormat,
|
|
1642
|
+
cutNullValues: !1,
|
|
1643
|
+
enableRangeHandles: P.value.style.zoom.enableRangeHandles,
|
|
1644
|
+
enableSelectionDrag: P.value.style.zoom.enableSelectionDrag,
|
|
1645
|
+
end: K.value.end,
|
|
1646
|
+
focusOnDrag: P.value.style.zoom.focusOnDrag,
|
|
1647
|
+
focusRangeRatio: P.value.style.zoom.focusRangeRatio,
|
|
1648
|
+
fontSize: P.value.style.zoom.fontSize,
|
|
1649
|
+
immediate: !P.value.style.zoom.preview.enable,
|
|
1650
|
+
inputColor: P.value.style.zoom.color,
|
|
1651
|
+
isPreview: An.value,
|
|
1652
|
+
labelLeft: er.value.start || "",
|
|
1653
|
+
labelRight: er.value.end || "",
|
|
1654
|
+
max: G.value,
|
|
1655
|
+
min: 0,
|
|
1656
|
+
minimap: P.value.style.zoom.minimap.show ? E(I).map((e) => e[2]) : [],
|
|
1657
|
+
minimapCompact: P.value.style.zoom.minimap.compact,
|
|
1658
|
+
minimapFrameColor: P.value.style.zoom.minimap.frameColor,
|
|
1659
|
+
minimapIndicatorColor: P.value.style.zoom.minimap.indicatorColor,
|
|
1660
|
+
minimapMerged: !1,
|
|
1661
|
+
minimapSelectedColor: P.value.style.zoom.minimap.selectedColor,
|
|
1662
|
+
minimapSelectedColorOpacity: P.value.style.zoom.minimap.selectedColorOpacity,
|
|
1663
|
+
minimapSelectedIndex: j.value,
|
|
1664
|
+
minimapSelectionRadius: 1,
|
|
1665
|
+
preciseLabels: Qn.value,
|
|
1666
|
+
refreshEndPoint: P.value.style.zoom.endIndex === null ? G.value : P.value.style.zoom.endIndex + 1,
|
|
1667
|
+
refreshStartPoint: P.value.style.zoom.startIndex === null ? 0 : P.value.style.zoom.startIndex,
|
|
1668
|
+
selectColor: P.value.style.zoom.highlightColor,
|
|
1669
|
+
selectedSeries: E(I),
|
|
1670
|
+
smoothMinimap: !1,
|
|
1671
|
+
start: K.value.start,
|
|
1672
|
+
textColor: P.value.style.color,
|
|
1673
|
+
timeLabels: Wn.value,
|
|
1674
|
+
usePreciseLabels: P.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable && !P.value.style.zoom.useDefaultFormat,
|
|
1675
|
+
useResetSlot: P.value.style.zoom.useResetSlot,
|
|
1676
|
+
valueEnd: K.value.end,
|
|
1677
|
+
valueStart: K.value.start,
|
|
1678
|
+
verticalHandles: P.value.style.zoom.minimap.verticalHandles,
|
|
1679
|
+
minScale: P.value.style.layout.grid.yAxis.scale.min,
|
|
1680
|
+
maxScale: P.value.style.layout.grid.yAxis.scale.max,
|
|
1681
|
+
maxWidth: P.value.style.zoom.maxWidth,
|
|
1682
|
+
additionalMinimapHeight: P.value.style.zoom.minimap.additionalHeight,
|
|
1683
|
+
handleType: P.value.style.zoom.minimap.handleType,
|
|
1684
|
+
handleIconColor: P.value.style.zoom.minimap.handleIconColor,
|
|
1685
|
+
handleBorderWidth: P.value.style.zoom.minimap.handleBorderWidth,
|
|
1686
|
+
handleBorderColor: P.value.style.zoom.minimap.handleBorderColor,
|
|
1687
|
+
handleFill: P.value.style.zoom.minimap.handleFill,
|
|
1688
|
+
handleWidth: P.value.style.zoom.minimap.handleWidth,
|
|
1689
|
+
"onUpdate:end": jr,
|
|
1690
|
+
"onUpdate:start": Ar,
|
|
1691
|
+
onTrapMouse: kr,
|
|
1692
|
+
onReset: sr,
|
|
1693
|
+
onFutureEnd: n[0] ||= (e) => jn("end", e),
|
|
1694
|
+
onFutureStart: n[1] ||= (e) => jn("start", e)
|
|
1695
|
+
}, {
|
|
1696
|
+
"reset-action": D(({ reset: t }) => [w(e.$slots, "reset-action", b(v({ reset: t })), void 0, !0)]),
|
|
1697
|
+
slotMap: D(({ height: e, unitW: t }) => [(x(!0), h(d, null, C(zn.value({
|
|
1698
|
+
minimapH: e,
|
|
1699
|
+
unitW: t
|
|
1700
|
+
}), (e, n) => (x(), h("g", null, [g("path", {
|
|
1701
|
+
d: `M ${e.high.x},${e.high.y} ${e.low.x},${e.low.y}`,
|
|
1702
|
+
stroke: e.isBullish ? P.value.style.layout.candle.colors.bullish : P.value.style.layout.candle.colors.bearish,
|
|
1703
|
+
"stroke-width": 1,
|
|
1704
|
+
style: Me({ opacity: n >= q.value.start && n <= q.value.end ? 1 : .6 })
|
|
1705
|
+
}, null, 12, Tt), g("path", {
|
|
1706
|
+
d: `M ${e.open.x},${e.open.y} ${e.close.x},${e.close.y}`,
|
|
1707
|
+
stroke: e.isBullish ? P.value.style.layout.candle.colors.bullish : P.value.style.layout.candle.colors.bearish,
|
|
1708
|
+
"stroke-width": Math.min(6, t / 1.5),
|
|
1709
|
+
style: Me({ opacity: n >= q.value.start && n <= q.value.end ? 1 : .6 })
|
|
1710
|
+
}, null, 12, Et)]))), 256))]),
|
|
1711
|
+
_: 3
|
|
1712
|
+
}, 8, /* @__PURE__ */ "allMinimaps.background.borderColor.customFormat.enableRangeHandles.enableSelectionDrag.end.focusOnDrag.focusRangeRatio.fontSize.immediate.inputColor.isPreview.labelLeft.labelRight.max.minimap.minimapCompact.minimapFrameColor.minimapIndicatorColor.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectedIndex.preciseLabels.refreshEndPoint.refreshStartPoint.selectColor.selectedSeries.start.textColor.timeLabels.usePreciseLabels.useResetSlot.valueEnd.valueStart.verticalHandles.minScale.maxScale.maxWidth.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth".split("."))) : m("", !0),
|
|
1713
|
+
g("div", {
|
|
1714
|
+
ref_key: "chartLegend",
|
|
1715
|
+
ref: Kt
|
|
1716
|
+
}, [w(e.$slots, "legend", { legend: Z.value }, void 0, !0)], 512),
|
|
1717
|
+
e.$slots.source ? (x(), h("div", {
|
|
1718
|
+
key: 7,
|
|
1719
|
+
ref_key: "source",
|
|
1720
|
+
ref: Jt,
|
|
1721
|
+
dir: "auto"
|
|
1722
|
+
}, [w(e.$slots, "source", {}, void 0, !0)], 512)) : m("", !0),
|
|
1723
|
+
ke(E(kt), {
|
|
1724
|
+
teleportTo: P.value.style.tooltip.teleportTo,
|
|
1725
|
+
show: H.value.showTooltip && Ht.value,
|
|
1726
|
+
backgroundColor: P.value.style.tooltip.backgroundColor,
|
|
1727
|
+
color: P.value.style.tooltip.color,
|
|
1728
|
+
borderRadius: P.value.style.tooltip.borderRadius,
|
|
1729
|
+
borderColor: P.value.style.tooltip.borderColor,
|
|
1730
|
+
borderWidth: P.value.style.tooltip.borderWidth,
|
|
1731
|
+
fontSize: P.value.style.tooltip.fontSize,
|
|
1732
|
+
backgroundOpacity: P.value.style.tooltip.backgroundOpacity,
|
|
1733
|
+
position: P.value.style.tooltip.position,
|
|
1734
|
+
offsetX: P.value.style.tooltip.offsetX,
|
|
1735
|
+
offsetY: P.value.style.tooltip.offsetY,
|
|
1736
|
+
parent: M.value,
|
|
1737
|
+
content: Ut.value,
|
|
1738
|
+
isFullscreen: $.value,
|
|
1739
|
+
isCustom: P.value.style.tooltip.customFormat && typeof P.value.style.tooltip.customFormat == "function",
|
|
1740
|
+
smooth: P.value.style.tooltip.smooth,
|
|
1741
|
+
backdropFilter: P.value.style.tooltip.backdropFilter,
|
|
1742
|
+
smoothForce: P.value.style.tooltip.smoothForce,
|
|
1743
|
+
smoothSnapThreshold: P.value.style.tooltip.smoothSnapThreshold,
|
|
1744
|
+
isA11yMode: cn.value === "keyboard",
|
|
1745
|
+
a11yPosition: sn.value
|
|
1746
|
+
}, {
|
|
1747
|
+
"tooltip-before": D(() => [w(e.$slots, "tooltip-before", b(v({ ...tr.value })), void 0, !0)]),
|
|
1748
|
+
tooltip: D(() => [w(e.$slots, "tooltip", b(v({ ...tr.value })), void 0, !0)]),
|
|
1749
|
+
"tooltip-after": D(() => [w(e.$slots, "tooltip-after", b(v({ ...tr.value })), void 0, !0)]),
|
|
1750
|
+
_: 3
|
|
1751
|
+
}, 8, [
|
|
1752
|
+
"teleportTo",
|
|
1753
|
+
"show",
|
|
1754
|
+
"backgroundColor",
|
|
1755
|
+
"color",
|
|
1756
|
+
"borderRadius",
|
|
1757
|
+
"borderColor",
|
|
1758
|
+
"borderWidth",
|
|
1759
|
+
"fontSize",
|
|
1760
|
+
"backgroundOpacity",
|
|
1761
|
+
"position",
|
|
1762
|
+
"offsetX",
|
|
1763
|
+
"offsetY",
|
|
1764
|
+
"parent",
|
|
1765
|
+
"content",
|
|
1766
|
+
"isFullscreen",
|
|
1767
|
+
"isCustom",
|
|
1768
|
+
"smooth",
|
|
1769
|
+
"backdropFilter",
|
|
1770
|
+
"smoothForce",
|
|
1771
|
+
"smoothSnapThreshold",
|
|
1772
|
+
"isA11yMode",
|
|
1773
|
+
"a11yPosition"
|
|
1774
|
+
]),
|
|
1775
|
+
Bt.value && P.value.userOptions.buttons.table ? (x(), p(Fe(Cr.value.component), Ae({ key: 8 }, Cr.value.props, {
|
|
1776
|
+
ref_key: "tableUnit",
|
|
1777
|
+
ref: tn,
|
|
1778
|
+
onClose: wr
|
|
1779
|
+
}), De({
|
|
1780
|
+
content: D(() => [(x(), p(E(jt), {
|
|
1781
|
+
key: `table_${Zt.value}`,
|
|
1782
|
+
colNames: mr.value.colNames,
|
|
1783
|
+
head: mr.value.head,
|
|
1784
|
+
body: mr.value.body,
|
|
1785
|
+
config: mr.value.config,
|
|
1786
|
+
title: P.value.table.useDialog ? "" : Cr.value.title,
|
|
1787
|
+
withCloseButton: !P.value.table.useDialog,
|
|
1788
|
+
isCursorPointer: un.value,
|
|
1789
|
+
onClose: wr
|
|
1790
|
+
}, {
|
|
1791
|
+
th: D(({ th: e }) => [Oe(T(e), 1)]),
|
|
1792
|
+
td: D(({ td: e }) => [g("div", { innerHTML: e }, null, 8, Dt)]),
|
|
1793
|
+
_: 1
|
|
1794
|
+
}, 8, [
|
|
1795
|
+
"colNames",
|
|
1796
|
+
"head",
|
|
1797
|
+
"body",
|
|
1798
|
+
"config",
|
|
1799
|
+
"title",
|
|
1800
|
+
"withCloseButton",
|
|
1801
|
+
"isCursorPointer"
|
|
1802
|
+
]))]),
|
|
1803
|
+
_: 2
|
|
1804
|
+
}, [P.value.table.useDialog ? {
|
|
1805
|
+
name: "title",
|
|
1806
|
+
fn: D(() => [Oe(T(Cr.value.title), 1)]),
|
|
1807
|
+
key: "0"
|
|
1808
|
+
} : void 0, P.value.table.useDialog ? {
|
|
1809
|
+
name: "actions",
|
|
1810
|
+
fn: D(() => [g("button", {
|
|
1811
|
+
tabindex: "0",
|
|
1812
|
+
class: "vue-ui-user-options-button",
|
|
1813
|
+
onClick: n[2] ||= (e) => pr(P.value.userOptions.callbacks.csv),
|
|
1814
|
+
style: Me({ cursor: un.value ? "pointer" : "default" })
|
|
1815
|
+
}, [ke(E(Ot), {
|
|
1816
|
+
name: "fileCsv",
|
|
1817
|
+
stroke: Cr.value.props.color
|
|
1818
|
+
}, null, 8, ["stroke"])], 4)]),
|
|
1819
|
+
key: "1"
|
|
1820
|
+
} : void 0]), 1040)) : m("", !0),
|
|
1821
|
+
w(e.$slots, "skeleton", {}, () => [E(F) ? (x(), p(fe, { key: 0 })) : m("", !0)], !0)
|
|
1822
|
+
], 46, Ve));
|
|
1823
|
+
}
|
|
1824
|
+
}, [["__scopeId", "data-v-6b89a6b9"]]);
|
|
1825
|
+
//#endregion
|
|
1826
|
+
export { Be as n, Ot as t };
|