vue-data-ui 3.3.3 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-ayTeSvpe.js → Arrow-CRe_nKB4.js} +1 -1
- package/dist/{BaseDraggableDialog-Cysanw8-.js → BaseDraggableDialog-CbuLbfrc.js} +2 -2
- package/dist/{BaseIcon-DG6cvf2h.js → BaseIcon-B5KaGWWC.js} +1 -1
- package/dist/{ColorPicker-CA8kKZjZ.js → ColorPicker-BMztHpBp.js} +10 -10
- package/dist/{DataTable-DUpZ_s2c.js → DataTable-DOx3zgih.js} +2 -2
- package/dist/{Legend-CCBZ2x8T.js → Legend-C8u37J42.js} +2 -2
- package/dist/{NonSvgPenAndPaper-D2IMGwaN.js → NonSvgPenAndPaper-BcxfJ-r2.js} +3 -3
- package/dist/{PackageVersion-CQvYRebC.js → PackageVersion-VpPtLYhK.js} +1 -1
- package/dist/{PenAndPaper-D9LruJaM.js → PenAndPaper-Dj2diYr0.js} +3 -3
- package/dist/{Shape-BS9UGhNq.js → Shape-BhNvlGIN.js} +1 -1
- package/dist/{Slicer-BOki89CB.js → Slicer-BHgEsIBU.js} +111 -111
- package/dist/SlicerPreview-Cobmb_1S.js +1148 -0
- package/dist/{SparkTooltip-svd8Hb6c.js → SparkTooltip-CL3cNRQ_.js} +1 -1
- package/dist/{Title-B6rAo9Oz.js → Title-CFmv95In.js} +1 -1
- package/dist/{Tooltip-DaInVNiV.js → Tooltip-Cs4v8OnI.js} +1 -1
- package/dist/{UserOptions-CJXSEhan.js → UserOptions-C0YT60JN.js} +2 -2
- package/dist/components/arrow.js +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{dom-to-png-Tq92GZKA.js → dom-to-png-xQ7LXrxp.js} +1 -1
- package/dist/{img-DI-W68vp.js → img-CFY3JivG.js} +1 -1
- package/dist/{lib-CSDxt1Zh.js → lib-BcBZIm6u.js} +439 -395
- package/dist/{pdf-BzVpWnNO.js → pdf-O34i6EQX.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +82 -8
- package/dist/{useAutoSizeLabelsInsideViewbox-CtQ7pJ8G.js → useAutoSizeLabelsInsideViewbox-BHq4FD8x.js} +1 -1
- package/dist/{useNestedProp-Dh-ldrr5.js → useNestedProp-B7CiTRDS.js} +327 -240
- package/dist/{usePrinter-Cq8Pt6Lh.js → usePrinter-C1GiglOH.js} +2 -2
- package/dist/{vue-data-ui-CDY7snWF.js → vue-data-ui-oDJui39L.js} +64 -64
- package/dist/vue-data-ui.js +100 -100
- package/dist/{vue-ui-3d-bar-DbpiTjGu.js → vue-ui-3d-bar-wycTM073.js} +56 -56
- package/dist/{vue-ui-accordion-CaClZrCp.js → vue-ui-accordion-BKkTS12x.js} +3 -3
- package/dist/{vue-ui-age-pyramid-DuIxXz5p.js → vue-ui-age-pyramid-C5NUZ_Y7.js} +39 -39
- package/dist/{vue-ui-annotator-C2efSKQK.js → vue-ui-annotator-DkSYrnwb.js} +7 -7
- package/dist/{vue-ui-bullet-qpcqLKmp.js → vue-ui-bullet-CIsX5UJw.js} +7 -7
- package/dist/vue-ui-candlestick-BRFx3_KK.js +1334 -0
- package/dist/{vue-ui-carousel-table-CCTtArFX.js → vue-ui-carousel-table-hJySHJTu.js} +29 -29
- package/dist/{vue-ui-chestnut-CbvxJ8hy.js → vue-ui-chestnut-D4GjvQh0.js} +70 -70
- package/dist/{vue-ui-chord-Cp9nyIdv.js → vue-ui-chord-By2NOs0N.js} +35 -35
- package/dist/{vue-ui-circle-pack-kHzd0UYO.js → vue-ui-circle-pack-OCmAkTNs.js} +59 -59
- package/dist/{vue-ui-cursor-DEvkJRCz.js → vue-ui-cursor-iuati4v1.js} +2 -2
- package/dist/{vue-ui-dashboard-k_mz9iwy.js → vue-ui-dashboard-C7fwU9xb.js} +67 -67
- package/dist/{vue-ui-digits-CqWCkEu2.js → vue-ui-digits-eYxf3UFN.js} +2 -2
- package/dist/{vue-ui-donut-CDKS6sVu.js → vue-ui-donut-dVVBUQJz.js} +189 -189
- package/dist/{vue-ui-donut-evolution-C6cGI_P3.js → vue-ui-donut-evolution-BoWGaQP0.js} +82 -82
- package/dist/{vue-ui-dumbbell-ZjJst3xs.js → vue-ui-dumbbell-YMPZ3CVA.js} +66 -66
- package/dist/{vue-ui-flow-sX1PYIkr.js → vue-ui-flow-BE62rVS3.js} +75 -75
- package/dist/{vue-ui-funnel--VViM9gH.js → vue-ui-funnel-kNpDFAWo.js} +63 -63
- package/dist/{vue-ui-galaxy-Du0V9GF8.js → vue-ui-galaxy-BBBiXXyk.js} +62 -62
- package/dist/{vue-ui-gauge-BAe4p2g-.js → vue-ui-gauge-PQNTTl3Y.js} +58 -58
- package/dist/{vue-ui-gizmo-CfjwAt38.js → vue-ui-gizmo-D3gQxQz3.js} +3 -3
- package/dist/{vue-ui-heatmap-Q0jrPM5h.js → vue-ui-heatmap-CKWQButF.js} +104 -104
- package/dist/{vue-ui-history-plot-CLSN3mPy.js → vue-ui-history-plot-DYFzdR4Z.js} +91 -91
- package/dist/{vue-ui-kpi-CBRgXD1s.js → vue-ui-kpi-N8s0i48S.js} +3 -3
- package/dist/{vue-ui-mini-loader-3yCeDEPK.js → vue-ui-mini-loader-Db-9iQcC.js} +2 -2
- package/dist/{vue-ui-molecule-Ddh4hbX0.js → vue-ui-molecule-Cklyb74B.js} +102 -102
- package/dist/{vue-ui-mood-radar-CK8UF-ka.js → vue-ui-mood-radar-Cvq4ZuLe.js} +28 -28
- package/dist/{vue-ui-nested-donuts-DO0FV0tU.js → vue-ui-nested-donuts-Bm78P1ES.js} +60 -60
- package/dist/{vue-ui-onion-DXLqoj-4.js → vue-ui-onion-Bh5jTb31.js} +46 -46
- package/dist/{vue-ui-parallel-coordinate-plot-BlffHAHB.js → vue-ui-parallel-coordinate-plot-BKdN2OsW.js} +64 -64
- package/dist/{vue-ui-quadrant-pw2ALj7p.js → vue-ui-quadrant-BPhJzots.js} +8 -8
- package/dist/{vue-ui-quick-chart-9oGbV593.js → vue-ui-quick-chart-DbJR9CN3.js} +86 -86
- package/dist/vue-ui-radar-CrenQprr.js +938 -0
- package/dist/{vue-ui-rating-C4yZY1sb.js → vue-ui-rating-fR2WRHYO.js} +2 -2
- package/dist/{vue-ui-relation-circle-Duxv-A4H.js → vue-ui-relation-circle-BJ5RuZ0j.js} +31 -31
- package/dist/{vue-ui-ridgeline-B-q7J-C0.js → vue-ui-ridgeline-CKuom5Bu.js} +97 -97
- package/dist/{vue-ui-rings-PRAcmP1H.js → vue-ui-rings-B84GAEf4.js} +50 -50
- package/dist/{vue-ui-scatter-BLW4MJtJ.js → vue-ui-scatter-CBX-g9w3.js} +100 -100
- package/dist/{vue-ui-skeleton-D0PF0jxa.js → vue-ui-skeleton-CZ8xxpEU.js} +3 -3
- package/dist/{vue-ui-smiley-Be44gMTh.js → vue-ui-smiley-BKXuAviQ.js} +2 -2
- package/dist/{vue-ui-spark-trend-B2XY2dRa.js → vue-ui-spark-trend-DOf7-cIf.js} +18 -18
- package/dist/{vue-ui-sparkbar-DWQN4gvR.js → vue-ui-sparkbar-D-MPA2zf.js} +3 -3
- package/dist/{vue-ui-sparkgauge-fDhQGQ12.js → vue-ui-sparkgauge-B9xRiVSU.js} +6 -6
- package/dist/{vue-ui-sparkhistogram-f7Acvipt.js → vue-ui-sparkhistogram-BWb0lqQP.js} +4 -4
- package/dist/{vue-ui-sparkline-Ys3JW7Ap.js → vue-ui-sparkline-BF-qr8Ti.js} +23 -23
- package/dist/{vue-ui-sparkstackbar-Dv0HeSna.js → vue-ui-sparkstackbar-DnCUpk50.js} +17 -17
- package/dist/vue-ui-stackbar-DvJ8Hahn.js +1695 -0
- package/dist/{vue-ui-strip-plot-DN13ntF-.js → vue-ui-strip-plot-SAh1gIs5.js} +52 -52
- package/dist/{vue-ui-table-Qb5tDX1n.js → vue-ui-table-BJdDfMYD.js} +18 -18
- package/dist/{vue-ui-table-heatmap-hMrgJ25a.js → vue-ui-table-heatmap-DU6GKPVy.js} +32 -32
- package/dist/{vue-ui-table-sparkline-CdkFyJjv.js → vue-ui-table-sparkline-BBFEJ8c6.js} +28 -28
- package/dist/{vue-ui-thermometer-D7U2C7kJ.js → vue-ui-thermometer-D8DH6QSN.js} +22 -22
- package/dist/{vue-ui-timer-KtA4M2mV.js → vue-ui-timer-CaUdAHBE.js} +29 -29
- package/dist/{vue-ui-tiremarks-C6GTGszq.js → vue-ui-tiremarks-_sUH1d3J.js} +14 -14
- package/dist/{vue-ui-treemap-rhnl1TW9.js → vue-ui-treemap-DXduzuW4.js} +78 -78
- package/dist/{vue-ui-vertical-bar-n_Lvbd_X.js → vue-ui-vertical-bar-JdjmgwQj.js} +94 -94
- package/dist/{vue-ui-waffle-D-4whGLN.js → vue-ui-waffle-h8zoi4Rc.js} +68 -68
- package/dist/{vue-ui-wheel-D92HLjfr.js → vue-ui-wheel-Ck1Mx37j.js} +21 -21
- package/dist/{vue-ui-word-cloud-Df9AMw6v.js → vue-ui-word-cloud-CjWvuukM.js} +47 -47
- package/dist/{vue-ui-world-Bg9S35ug.js → vue-ui-world-Dw71_Mu2.js} +6 -6
- package/dist/vue-ui-xy-canvas-Dct7tf8w.js +1548 -0
- package/dist/vue-ui-xy-tSMgXqqb.js +3375 -0
- package/package.json +2 -2
- package/dist/vue-ui-candlestick-DTWbbdGH.js +0 -1073
- package/dist/vue-ui-radar-Csznqw19.js +0 -891
- package/dist/vue-ui-stackbar-DUlN5QiM.js +0 -1457
- package/dist/vue-ui-xy-Da6oy2rm.js +0 -4527
- package/dist/vue-ui-xy-canvas-0CLSIKpO.js +0 -1305
|
@@ -0,0 +1,1334 @@
|
|
|
1
|
+
import { defineAsyncComponent as V, computed as c, ref as y, toRefs as Al, watch as oe, shallowRef as xt, onMounted as Cl, onBeforeUnmount as Me, watchEffect as $l, nextTick as bt, createElementBlock as u, openBlock as s, normalizeStyle as se, normalizeClass as B, createBlock as H, createCommentVNode as m, createElementVNode as p, createVNode as Oe, unref as h, createSlots as kt, withCtx as k, renderSlot as w, normalizeProps as G, guardReactiveProps as j, Fragment as _, renderList as S, toDisplayString as ue, mergeProps as wt, resolveDynamicComponent as _l, createTextVNode as At } from "vue";
|
|
2
|
+
import { c as zl, t as Sl, O as he, o as Ct, f as q, m as Ll, x as U, v as Tl, d as N, X as Fl, i as me, s as Il, R as $t, P as Rl, Q as Ml, G as Ol, H as Dl } from "./lib-BcBZIm6u.js";
|
|
3
|
+
import { t as _t, u as Pl } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as Bl, a as zt } from "./useNestedProp-B7CiTRDS.js";
|
|
5
|
+
import { u as Nl } from "./usePrinter-C1GiglOH.js";
|
|
6
|
+
import { u as El, B as Vl } from "./BaseScanner-BgWxam9d.js";
|
|
7
|
+
import { u as St, a as Ul, l as Wl } from "./useTimeLabels-BGFjWgrv.js";
|
|
8
|
+
import { u as Xl } from "./useSvgExport-DrjCWun4.js";
|
|
9
|
+
import { u as Hl } from "./useUserOptionState-BIvW1Kz7.js";
|
|
10
|
+
import { u as Gl } from "./useChartAccessibility-9icAAmYg.js";
|
|
11
|
+
import { u as jl } from "./useTimeLabelCollider-CIsgDrl9.js";
|
|
12
|
+
import ql from "./img-CFY3JivG.js";
|
|
13
|
+
import Yl from "./Title-CFmv95In.js";
|
|
14
|
+
import { t as Ql } from "./themes-Dw-dDudK.js";
|
|
15
|
+
import { S as Jl } from "./SlicerPreview-Cobmb_1S.js";
|
|
16
|
+
import { _ as Kl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
|
+
const Zl = ["id"], ea = ["xmlns", "aria-label", "viewBox"], ta = ["x", "y", "width", "height"], la = { key: 1 }, aa = ["id"], oa = ["stop-color"], sa = ["stop-color"], ua = ["stop-color"], ia = ["id"], na = ["stop-color"], ra = ["stop-color"], va = ["stop-color"], da = { key: 0 }, ca = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ya = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ha = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], ma = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], pa = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], fa = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ga = ["x", "y", "font-size", "fill", "font-weight"], xa = ["transform", "text-anchor", "font-size", "fill", "font-weight"], ba = ["transform", "text-anchor", "font-size", "fill", "font-weight"], ka = ["x", "y", "width", "height", "fill", "rx"], wa = { key: 0 }, Aa = ["cx", "cy", "r", "fill"], Ca = ["cx", "cy", "r", "fill"], $a = { key: 1 }, _a = ["x", "y", "width", "height", "rx", "fill"], za = ["x", "y", "width", "height", "fill", "rx"], Sa = ["x", "y", "height", "width", "fill", "rx"], La = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width"], Ta = ["d", "stroke"], Fa = ["x", "y", "height", "width", "fill", "onMouseover", "onMouseleave", "onClick"], Ia = ["data-start", "data-end"], Ra = {
|
|
18
|
+
key: 4,
|
|
19
|
+
class: "vue-data-ui-watermark"
|
|
20
|
+
}, Ma = ["d", "stroke"], Oa = ["d", "stroke", "stroke-width"], Da = ["innerHTML"], Pa = {
|
|
21
|
+
__name: "vue-ui-candlestick",
|
|
22
|
+
props: {
|
|
23
|
+
config: {
|
|
24
|
+
type: Object,
|
|
25
|
+
default() {
|
|
26
|
+
return {};
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
dataset: {
|
|
30
|
+
type: Array,
|
|
31
|
+
default() {
|
|
32
|
+
return [];
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
selectedXIndex: {
|
|
36
|
+
type: Number,
|
|
37
|
+
default: void 0
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
emits: ["selectX"],
|
|
41
|
+
setup(Lt, { expose: Tt, emit: Ft }) {
|
|
42
|
+
const It = V(() => import("./BaseIcon-B5KaGWWC.js")), Rt = V(() => import("./Tooltip-Cs4v8OnI.js")), Mt = V(() => import("./vue-ui-accordion-BKkTS12x.js")), Ot = V(() => import("./DataTable-DOx3zgih.js")), Dt = V(() => import("./PenAndPaper-Dj2diYr0.js")), Pt = V(() => import("./UserOptions-C0YT60JN.js")), Bt = V(() => import("./PackageVersion-VpPtLYhK.js")), Nt = V(() => import("./BaseDraggableDialog-CbuLbfrc.js")), { vue_ui_candlestick: Et } = Bl(), g = Lt, De = Ft, pe = c(() => !!g.dataset && g.dataset.length), I = y(!1), fe = y(null), L = y(zl()), ge = y(!1), xe = y(""), M = y(void 0), Pe = y(0), O = y(null), Be = y(null), Ne = y(null), J = y(null), Ee = y(null), Ve = y(null), Vt = y(0), Ue = y(0), We = y(0), be = y(null), K = y(null), Z = y(null), ke = y(null), Xe = y(null), e = y($e()), { loading: D, FINAL_DATASET: x, manualLoading: we } = El({
|
|
43
|
+
...Al(g),
|
|
44
|
+
FINAL_CONFIG: e,
|
|
45
|
+
prepareConfig: $e,
|
|
46
|
+
callback: () => {
|
|
47
|
+
Promise.resolve().then(async () => {
|
|
48
|
+
await de();
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
skeletonDataset: [
|
|
52
|
+
[17040672e5, 10, 20, 2, 10, 30],
|
|
53
|
+
[17067456e5, 10, 30, 5, 20, 50],
|
|
54
|
+
[17092512e5, 20, 50, 10, 30, 80],
|
|
55
|
+
[17119296e5, 30, 80, 20, 50, 130],
|
|
56
|
+
[17145216e5, 50, 130, 30, 100, 210],
|
|
57
|
+
[17172e8, 80, 210, 50, 150, 340],
|
|
58
|
+
[1719792e6, 130, 340, 80, 280, 550],
|
|
59
|
+
[17224704e5, 210, 550, 130, 450, 890],
|
|
60
|
+
[17251488e5, 340, 890, 210, 750, 1440],
|
|
61
|
+
[17277408e5, 550, 1440, 340, 1230, 2330],
|
|
62
|
+
[17304192e5, 890, 2330, 550, 1950, 3770],
|
|
63
|
+
[17330112e5, 1440, 3770, 890, 3200, 5100]
|
|
64
|
+
],
|
|
65
|
+
skeletonConfig: Sl({
|
|
66
|
+
defaultConfig: e.value,
|
|
67
|
+
userConfig: {
|
|
68
|
+
useCssAnimation: !1,
|
|
69
|
+
userOptions: { show: !1 },
|
|
70
|
+
table: { show: !1 },
|
|
71
|
+
style: {
|
|
72
|
+
backgroundColor: "#99999930",
|
|
73
|
+
layout: {
|
|
74
|
+
candle: {
|
|
75
|
+
colors: {
|
|
76
|
+
bearish: "#BABABA",
|
|
77
|
+
bullish: "#CACACA"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
grid: {
|
|
81
|
+
stroke: "#6A6A6A",
|
|
82
|
+
verticalLines: {
|
|
83
|
+
stroke: "#6A6A6A"
|
|
84
|
+
},
|
|
85
|
+
horizontalLines: {
|
|
86
|
+
stroke: "#6A6A6A"
|
|
87
|
+
},
|
|
88
|
+
yAxis: {
|
|
89
|
+
dataLabels: { show: !1 },
|
|
90
|
+
scale: {
|
|
91
|
+
min: null,
|
|
92
|
+
max: null
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
wick: {
|
|
97
|
+
stroke: "#6A6A6A",
|
|
98
|
+
extremity: {
|
|
99
|
+
color: "#6A6A6A"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
tooltip: { show: !1 },
|
|
104
|
+
zoom: {
|
|
105
|
+
show: !1,
|
|
106
|
+
startIndex: null,
|
|
107
|
+
endIndex: null
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
})
|
|
112
|
+
}), { userOptionsVisible: Ae, setUserOptionsVisibility: He, keepUserOptionState: Ge } = Hl({ config: e.value }), { svgRef: Ce } = Gl({ config: e.value.style.title });
|
|
113
|
+
function Ut() {
|
|
114
|
+
He(!0);
|
|
115
|
+
}
|
|
116
|
+
function Wt() {
|
|
117
|
+
He(!1), De("selectX", { seriesIndex: null, datapoint: null }), M.value = null;
|
|
118
|
+
}
|
|
119
|
+
function $e() {
|
|
120
|
+
const t = zt({
|
|
121
|
+
userConfig: g.config,
|
|
122
|
+
defaultConfig: Et
|
|
123
|
+
});
|
|
124
|
+
let a = {};
|
|
125
|
+
return t.theme ? a = {
|
|
126
|
+
...zt({
|
|
127
|
+
userConfig: Ql.vue_ui_candlestick[t.theme] || g.config,
|
|
128
|
+
defaultConfig: t
|
|
129
|
+
})
|
|
130
|
+
} : a = t, g.config && he(g.config, "style.zoom.startIndex") ? a.style.zoom.startIndex = g.config.style.zoom.startIndex : a.style.zoom.startIndex = null, g.config && he(g.config, "style.zoom.endIndex") ? a.style.zoom.endIndex = g.config.style.zoom.endIndex : a.style.zoom.endIndex = null, g.config && he(g.config, "style.layout.grid.yAxis.scale.min") ? a.style.layout.grid.yAxis.scale.min = g.config.style.layout.grid.yAxis.scale.min : a.style.layout.grid.yAxis.scale.min = null, g.config && he(g.config, "style.layout.grid.yAxis.scale.max") ? a.style.layout.grid.yAxis.scale.max = g.config.style.layout.grid.yAxis.scale.max : a.style.layout.grid.yAxis.scale.max = null, a;
|
|
131
|
+
}
|
|
132
|
+
oe(() => g.config, (t) => {
|
|
133
|
+
D.value || (e.value = $e()), Ae.value = !e.value.userOptions.showOnChartHover, je(), Vt.value += 1, We.value += 1, Ue.value += 1, z.value.showTable = e.value.table.show, z.value.showTooltip = e.value.style.tooltip.show, ie();
|
|
134
|
+
}, { deep: !0 }), oe(() => g.dataset, (t) => {
|
|
135
|
+
Array.isArray(t) && t.length > 0 && (we.value = !1), nt();
|
|
136
|
+
}, { deep: !0 });
|
|
137
|
+
const f = y({
|
|
138
|
+
height: e.value.style.height,
|
|
139
|
+
width: e.value.style.width,
|
|
140
|
+
xAxisFontSize: e.value.style.layout.grid.xAxis.dataLabels.fontSize,
|
|
141
|
+
yAxisFontSize: e.value.style.layout.grid.yAxis.dataLabels.fontSize
|
|
142
|
+
}), E = xt(null), Y = xt(null);
|
|
143
|
+
Cl(() => {
|
|
144
|
+
je();
|
|
145
|
+
});
|
|
146
|
+
const W = c(() => !!e.value.debug);
|
|
147
|
+
function je() {
|
|
148
|
+
if (Ct(g.dataset) && (q({
|
|
149
|
+
componentName: "VueUiCandlestick",
|
|
150
|
+
type: "dataset",
|
|
151
|
+
debug: W.value
|
|
152
|
+
}), we.value = !0), Ct(g.dataset) || (we.value = e.value.loading), setTimeout(() => {
|
|
153
|
+
I.value = !0;
|
|
154
|
+
}, 10), e.value.responsive) {
|
|
155
|
+
const a = _t(() => {
|
|
156
|
+
I.value = !1;
|
|
157
|
+
const { width: l, height: o } = Pl({
|
|
158
|
+
chart: O.value,
|
|
159
|
+
title: e.value.style.title.text ? Be.value : null,
|
|
160
|
+
slicer: e.value.style.zoom.show && C.value > 6 ? J.value.$el : null,
|
|
161
|
+
legend: Ne.value,
|
|
162
|
+
source: Ee.value,
|
|
163
|
+
noTitle: Ve.value
|
|
164
|
+
});
|
|
165
|
+
requestAnimationFrame(() => {
|
|
166
|
+
f.value.width = l, f.value.height = o - 12, e.value.responsiveProportionalSizing ? (f.value.xAxisFontSize = $t({
|
|
167
|
+
relator: Math.min(l, o),
|
|
168
|
+
adjuster: e.value.style.width,
|
|
169
|
+
source: e.value.style.layout.grid.xAxis.dataLabels.fontSize,
|
|
170
|
+
threshold: 6,
|
|
171
|
+
fallback: 6
|
|
172
|
+
}), f.value.yAxisFontSize = $t({
|
|
173
|
+
relator: Math.min(l, o),
|
|
174
|
+
adjuster: e.value.style.width,
|
|
175
|
+
source: e.value.style.layout.grid.yAxis.dataLabels.fontSize,
|
|
176
|
+
threshold: 6,
|
|
177
|
+
fallback: 6
|
|
178
|
+
})) : (f.value.xAxisFontSize = e.value.style.layout.grid.xAxis.dataLabels.fontSize, f.value.yAxisFontSize = e.value.style.layout.grid.yAxis.dataLabels.fontSize), fe.value && clearTimeout(fe.value), fe.value = setTimeout(() => {
|
|
179
|
+
I.value = !0;
|
|
180
|
+
}, 10);
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
E.value && (Y.value && E.value.unobserve(Y.value), E.value.disconnect()), E.value = new ResizeObserver(a), Y.value = O.value.parentNode, E.value.observe(Y.value);
|
|
184
|
+
}
|
|
185
|
+
de();
|
|
186
|
+
}
|
|
187
|
+
Me(() => {
|
|
188
|
+
E.value && (Y.value && E.value.unobserve(Y.value), E.value.disconnect());
|
|
189
|
+
});
|
|
190
|
+
const { isPrinting: qe, isImaging: Ye, generatePdf: Qe, generateImage: Je } = Nl({
|
|
191
|
+
elementId: `vue-ui-candlestick_${L.value}`,
|
|
192
|
+
fileName: e.value.style.title.text || "vue-ui-candlestick",
|
|
193
|
+
options: e.value.userOptions.print
|
|
194
|
+
}), Xt = c(() => e.value.userOptions.show && !e.value.style.title.text), z = y({
|
|
195
|
+
showTable: e.value.table.show,
|
|
196
|
+
showTooltip: e.value.style.tooltip.show
|
|
197
|
+
}), _e = y(0), Ht = _t((t) => {
|
|
198
|
+
_e.value = t;
|
|
199
|
+
}, 100);
|
|
200
|
+
$l((t) => {
|
|
201
|
+
const a = K.value;
|
|
202
|
+
if (!a) return;
|
|
203
|
+
const l = new ResizeObserver((o) => {
|
|
204
|
+
Ht(o[0].contentRect.height);
|
|
205
|
+
});
|
|
206
|
+
l.observe(a), t(() => l.disconnect());
|
|
207
|
+
}), Me(() => {
|
|
208
|
+
_e.value = 0;
|
|
209
|
+
});
|
|
210
|
+
const Ke = c(() => {
|
|
211
|
+
let t = 0;
|
|
212
|
+
return K.value && (t = _e.value + f.value.xAxisFontSize), t;
|
|
213
|
+
});
|
|
214
|
+
function Gt() {
|
|
215
|
+
let t = e.value.style.layout.grid.yAxis.dataLabels.offsetX;
|
|
216
|
+
return be.value && (t = Array.from(be.value.querySelectorAll("text")).reduce((o, i) => {
|
|
217
|
+
const d = i.getComputedTextLength();
|
|
218
|
+
return d > o ? d : o;
|
|
219
|
+
}, 0)), t + 13;
|
|
220
|
+
}
|
|
221
|
+
const n = c(() => {
|
|
222
|
+
const { top: t, right: a, bottom: l, left: o } = e.value.style.layout.padding, i = Gt(), d = 12;
|
|
223
|
+
return {
|
|
224
|
+
top: t + d,
|
|
225
|
+
right: f.value.width - a,
|
|
226
|
+
left: o + i,
|
|
227
|
+
bottom: f.value.height - l - Ke.value,
|
|
228
|
+
width: f.value.width - o - a - i,
|
|
229
|
+
height: f.value.height - t - l - Ke.value - d
|
|
230
|
+
};
|
|
231
|
+
}), jt = c(() => {
|
|
232
|
+
const { left: t, top: a, width: l, height: o } = n.value, i = r.value.start, b = r.value.end - i, R = l / b, F = A.value.start - i, Q = A.value.end - i, ae = Math.max(0, Math.min(b, F)), pt = Math.max(0, Math.min(b, Q));
|
|
233
|
+
return {
|
|
234
|
+
x: t + ae * R,
|
|
235
|
+
y: a,
|
|
236
|
+
width: (pt - ae) * R,
|
|
237
|
+
height: o,
|
|
238
|
+
fill: e.value.style.zoom.preview.fill,
|
|
239
|
+
stroke: e.value.style.zoom.preview.stroke,
|
|
240
|
+
"stroke-width": e.value.style.zoom.preview.strokeWidth,
|
|
241
|
+
"stroke-dasharray": e.value.style.zoom.preview.strokeDasharray,
|
|
242
|
+
"stroke-linecap": "round",
|
|
243
|
+
"stroke-linejoin": "round",
|
|
244
|
+
style: {
|
|
245
|
+
pointerEvents: "none",
|
|
246
|
+
transition: "none !important",
|
|
247
|
+
animation: "none !important"
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
}), C = c(() => x.value.length), r = y({
|
|
251
|
+
start: 0,
|
|
252
|
+
end: C.value
|
|
253
|
+
}), A = y({ start: 0, end: C.value }), Ze = c(() => e.value.style.zoom.preview.enable && (A.value.start !== r.value.start || A.value.end !== r.value.end));
|
|
254
|
+
function et(t, a) {
|
|
255
|
+
A.value[t] = a;
|
|
256
|
+
}
|
|
257
|
+
function ie() {
|
|
258
|
+
let t = Math.max(0, Math.min(r.value.start ?? 0, C.value - 1)), a = Math.max(t + 1, Math.min(r.value.end ?? C.value, C.value));
|
|
259
|
+
(!Number.isFinite(t) || !Number.isFinite(a) || a <= t) && (t = 0, a = C.value), r.value.start = t, r.value.end = a, A.value.start = t, A.value.end = a, J.value && (J.value.setStartValue(t), J.value.setEndValue(a));
|
|
260
|
+
}
|
|
261
|
+
const tt = c(() => x.value.map((t, a) => ({
|
|
262
|
+
...t,
|
|
263
|
+
absoluteIndex: a
|
|
264
|
+
}))), lt = c(() => tt.value.slice(r.value.start, r.value.end)), ze = c(() => (x.value.forEach((t, a) => {
|
|
265
|
+
[null, void 0].includes(t[0]) && q({
|
|
266
|
+
componentName: "VueUiCandlestick",
|
|
267
|
+
type: "datasetAttribute",
|
|
268
|
+
property: "period (index 0)",
|
|
269
|
+
index: a,
|
|
270
|
+
debug: W.value
|
|
271
|
+
}), [null, void 0].includes(t[1]) && q({
|
|
272
|
+
componentName: "VueUiCandlestick",
|
|
273
|
+
type: "datasetAttribute",
|
|
274
|
+
property: "open (index 1)",
|
|
275
|
+
index: a,
|
|
276
|
+
debug: W.value
|
|
277
|
+
}), [null, void 0].includes(t[2]) && q({
|
|
278
|
+
componentName: "VueUiCandlestick",
|
|
279
|
+
type: "datasetAttribute",
|
|
280
|
+
property: "high (index 2)",
|
|
281
|
+
index: a,
|
|
282
|
+
debug: W.value
|
|
283
|
+
}), [null, void 0].includes(t[3]) && q({
|
|
284
|
+
componentName: "VueUiCandlestick",
|
|
285
|
+
type: "datasetAttribute",
|
|
286
|
+
property: "low (index 3)",
|
|
287
|
+
index: a,
|
|
288
|
+
debug: W.value
|
|
289
|
+
}), [null, void 0].includes(t[4]) && q({
|
|
290
|
+
componentName: "VueUiCandlestick",
|
|
291
|
+
type: "datasetAttribute",
|
|
292
|
+
property: "last (index 4)",
|
|
293
|
+
index: a,
|
|
294
|
+
debug: W.value
|
|
295
|
+
}), [null, void 0].includes(t[5]) && q({
|
|
296
|
+
componentName: "VueUiCandlestick",
|
|
297
|
+
type: "datasetAttribute",
|
|
298
|
+
property: "volume (index 5)",
|
|
299
|
+
index: a,
|
|
300
|
+
debug: W.value
|
|
301
|
+
});
|
|
302
|
+
}), lt.value.map((t) => ({
|
|
303
|
+
absoluteIndex: t.absoluteIndex,
|
|
304
|
+
period: t[0],
|
|
305
|
+
open: t[1],
|
|
306
|
+
high: t[2],
|
|
307
|
+
low: t[3],
|
|
308
|
+
last: t[4],
|
|
309
|
+
volume: t[5]
|
|
310
|
+
})))), qt = c(() => tt.value.map((t) => ({
|
|
311
|
+
absoluteIndex: t.absoluteIndex,
|
|
312
|
+
period: t[0],
|
|
313
|
+
open: t[1],
|
|
314
|
+
high: t[2],
|
|
315
|
+
low: t[3],
|
|
316
|
+
last: t[4],
|
|
317
|
+
volume: t[5]
|
|
318
|
+
}))), v = c(() => n.value.width / lt.value.length), at = c(() => {
|
|
319
|
+
const t = e.value.style.layout.grid.yAxis.scale.max === null ? Math.max(...ze.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;
|
|
320
|
+
return {
|
|
321
|
+
max: t,
|
|
322
|
+
min: a
|
|
323
|
+
};
|
|
324
|
+
}), T = c(() => Ll(at.value.min, at.value.max, e.value.style.layout.grid.yAxis.dataLabels.steps));
|
|
325
|
+
function ne(t, a) {
|
|
326
|
+
return {
|
|
327
|
+
...t,
|
|
328
|
+
x: U(n.value.left + a * v.value + v.value / 2),
|
|
329
|
+
y: U(n.value.top + (1 - (t - T.value.min) / (T.value.max - T.value.min)) * n.value.height),
|
|
330
|
+
value: U(t)
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
const $ = c(() => ze.value.map((t, a) => {
|
|
334
|
+
const l = ne(t.open, a), o = ne(t.high, a), i = ne(t.low, a), d = ne(t.last, a), b = t.last > t.open;
|
|
335
|
+
return {
|
|
336
|
+
period: t.period,
|
|
337
|
+
open: l,
|
|
338
|
+
high: o,
|
|
339
|
+
low: i,
|
|
340
|
+
last: d,
|
|
341
|
+
volume: t.volume,
|
|
342
|
+
isBullish: b,
|
|
343
|
+
absoluteIndex: t.absoluteIndex
|
|
344
|
+
};
|
|
345
|
+
}));
|
|
346
|
+
function re({ item: t, index: a, minimapH: l, unitW: o }) {
|
|
347
|
+
const i = e.value.style.layout.grid.yAxis.scale.min ?? 0, d = e.value.style.layout.grid.yAxis.scale.max ?? Math.max(...x.value.map((b) => b[2]));
|
|
348
|
+
return {
|
|
349
|
+
...t,
|
|
350
|
+
x: U(a * o),
|
|
351
|
+
y: U((1 - (t - i) / (d - i)) * l),
|
|
352
|
+
value: U(t)
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
const Yt = c(() => ({ minimapH: t, unitW: a }) => qt.value.map((l, o) => {
|
|
356
|
+
const i = re({ item: l.open, index: o, minimapH: t, unitW: a }), d = re({ item: l.high, index: o, minimapH: t, unitW: a }), b = re({ item: l.low, index: o, minimapH: t, unitW: a }), R = re({ item: l.last, index: o, minimapH: t, unitW: a }), F = l.last > l.open;
|
|
357
|
+
return {
|
|
358
|
+
period: l.period,
|
|
359
|
+
open: i,
|
|
360
|
+
high: d,
|
|
361
|
+
low: b,
|
|
362
|
+
last: R,
|
|
363
|
+
volume: l.volume,
|
|
364
|
+
isBullish: F,
|
|
365
|
+
absoluteIndex: l.absoluteIndex
|
|
366
|
+
};
|
|
367
|
+
})), Qt = c(() => e.value.style.zoom.minimap.show ? [{
|
|
368
|
+
name: "",
|
|
369
|
+
series: x.value.map((t) => t[2]),
|
|
370
|
+
color: "#000000",
|
|
371
|
+
isVisible: !0
|
|
372
|
+
}] : []);
|
|
373
|
+
function Jt(t) {
|
|
374
|
+
return U((t - T.value.min) / (T.value.max - T.value.min));
|
|
375
|
+
}
|
|
376
|
+
const ot = c(() => T.value.ticks.map((t) => ({
|
|
377
|
+
y: n.value.bottom - n.value.height * Jt(t),
|
|
378
|
+
value: U(t)
|
|
379
|
+
}))), Kt = c(() => ze.value.map((t) => t.period)), P = c(() => St({
|
|
380
|
+
values: x.value.map((t) => t[0]),
|
|
381
|
+
maxDatapoints: x.value.length,
|
|
382
|
+
formatter: e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter,
|
|
383
|
+
start: r.value.start,
|
|
384
|
+
end: r.value.end
|
|
385
|
+
})), st = c(() => St({
|
|
386
|
+
values: x.value.map((t) => t[0]),
|
|
387
|
+
maxDatapoints: x.value.length,
|
|
388
|
+
formatter: e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter,
|
|
389
|
+
start: 0,
|
|
390
|
+
end: C.value
|
|
391
|
+
})), Zt = c(() => {
|
|
392
|
+
const t = e.value.style.layout.grid.xAxis.dataLabels.modulo;
|
|
393
|
+
return P.value.length ? Math.min(t, [...new Set(P.value.map((a) => a.text))].length) : t;
|
|
394
|
+
}), ut = c(() => {
|
|
395
|
+
const t = e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter, a = Ul({
|
|
396
|
+
useUTC: t.useUTC,
|
|
397
|
+
locale: Wl[t.locale] || { months: [], shortMonths: [], days: [], shortDays: [] },
|
|
398
|
+
januaryAsYear: t.januaryAsYear
|
|
399
|
+
});
|
|
400
|
+
return (l, o) => {
|
|
401
|
+
const d = x.value.map((b) => b[0])?.[l];
|
|
402
|
+
return d == null ? "" : a.formatDate(new Date(d), o);
|
|
403
|
+
};
|
|
404
|
+
}), el = c(() => (x.value.map((a) => a[0]) || []).map((a, l) => ({
|
|
405
|
+
text: ut.value(l, e.value.style.tooltip.timeFormat),
|
|
406
|
+
absoluteIndex: l
|
|
407
|
+
}))), tl = c(() => (x.value.map((a) => a[0]) || []).map((a, l) => ({
|
|
408
|
+
text: ut.value(l, e.value.style.zoom.timeFormat),
|
|
409
|
+
absoluteIndex: l
|
|
410
|
+
}))), Se = c(() => {
|
|
411
|
+
const t = e.value.style.layout.grid.xAxis.dataLabels, a = P.value || [], l = st.value || [], o = r.value.start ?? 0, i = M.value, d = C.value, b = a.map((F) => F?.text ?? ""), R = l.map((F) => F?.text ?? "");
|
|
412
|
+
return Tl(
|
|
413
|
+
!!t.showOnlyFirstAndLast,
|
|
414
|
+
!!t.showOnlyAtModulo,
|
|
415
|
+
Math.max(1, Zt.value || 1),
|
|
416
|
+
b,
|
|
417
|
+
R,
|
|
418
|
+
o,
|
|
419
|
+
i,
|
|
420
|
+
d
|
|
421
|
+
);
|
|
422
|
+
}), it = c(() => e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? {
|
|
423
|
+
start: P.value.find((t) => t.absoluteIndex === r.value.start).text,
|
|
424
|
+
end: P.value.find((t) => t.absoluteIndex === r.value.end - 1).text
|
|
425
|
+
} : {
|
|
426
|
+
start: x.value[r.value.start] ? x.value[r.value.start][0] : x.value[0][0],
|
|
427
|
+
end: x.value[r.value.end - 1] ? x.value[r.value.end - 1][0] : x.value.at(-1)[0]
|
|
428
|
+
}), Le = y(null);
|
|
429
|
+
function ll(t, a) {
|
|
430
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: a, seriesIndex: t + r.value.start });
|
|
431
|
+
}
|
|
432
|
+
function al(t, a) {
|
|
433
|
+
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: a, seriesIndex: t + r.value.start }), M.value = void 0, ge.value = !1;
|
|
434
|
+
}
|
|
435
|
+
oe(() => g.selectedXIndex, (t) => {
|
|
436
|
+
if ([null, void 0].includes(g.selectedXIndex)) {
|
|
437
|
+
M.value = null;
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
const a = t - r.value.start;
|
|
441
|
+
a < 0 || t >= r.value.end ? M.value = null : M.value = a ?? null;
|
|
442
|
+
}, { immediate: !0 });
|
|
443
|
+
function ol(t, a) {
|
|
444
|
+
e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: a, seriesIndex: t + r.value.start }), M.value = t, Le.value = {
|
|
445
|
+
datapoint: a,
|
|
446
|
+
seriesIndex: t,
|
|
447
|
+
series: $.value,
|
|
448
|
+
config: e.value
|
|
449
|
+
}, pl({ seriesIndex: t, datapoint: a });
|
|
450
|
+
const l = e.value.style.tooltip.customFormat;
|
|
451
|
+
if (Ol(l) && Dl(() => l({
|
|
452
|
+
seriesIndex: t,
|
|
453
|
+
datapoint: a,
|
|
454
|
+
series: $.value,
|
|
455
|
+
config: e.value
|
|
456
|
+
})))
|
|
457
|
+
xe.value = l({
|
|
458
|
+
seriesIndex: t,
|
|
459
|
+
datapoint: a,
|
|
460
|
+
series: $.value,
|
|
461
|
+
config: e.value
|
|
462
|
+
});
|
|
463
|
+
else if (e.value.style.tooltip.show) {
|
|
464
|
+
let o = "";
|
|
465
|
+
const { period: i, open: d, high: b, low: R, last: F, volume: Q, isBullish: ae } = $.value[t], { period: pt, open: fl, high: gl, low: xl, last: bl, volume: kl } = e.value.translations, wl = e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? e.value.style.tooltip.useDefaultTimeFormat ? P.value[t].text : el.value[t].text : i;
|
|
466
|
+
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}"
|
|
467
|
+
fill="${e.value.style.layout.candle.gradient.show ? ae ? `url(#bullish_gradient_${L.value})` : `url(#bearish_gradient_${L.value})` : ae ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}"/></svg>${wl}</div>`, o += `${kl} : <b>${isNaN(Q) ? "-" : Number(Q.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}">`;
|
|
468
|
+
const Ie = N({
|
|
469
|
+
p: e.value.style.tooltip.prefix,
|
|
470
|
+
v: d.value,
|
|
471
|
+
s: e.value.style.tooltip.suffix,
|
|
472
|
+
r: e.value.style.tooltip.roundingValue
|
|
473
|
+
}), ft = N({
|
|
474
|
+
p: e.value.style.tooltip.prefix,
|
|
475
|
+
v: b.value,
|
|
476
|
+
s: e.value.style.tooltip.suffix,
|
|
477
|
+
r: e.value.style.tooltip.roundingValue
|
|
478
|
+
}), gt = N({
|
|
479
|
+
p: e.value.style.tooltip.prefix,
|
|
480
|
+
v: R.value,
|
|
481
|
+
s: e.value.style.tooltip.suffix,
|
|
482
|
+
r: e.value.style.tooltip.roundingValue
|
|
483
|
+
}), Re = N({
|
|
484
|
+
p: e.value.style.tooltip.prefix,
|
|
485
|
+
v: F.value,
|
|
486
|
+
s: e.value.style.tooltip.suffix,
|
|
487
|
+
r: e.value.style.tooltip.roundingValue
|
|
488
|
+
});
|
|
489
|
+
e.value.style.tooltip.showChart ? o += `<div style="width:100%;display:flex;align-items:center;justify-content:center;">
|
|
490
|
+
<svg viewBox="0 0 100 100" width="100px" style="background: transparent; overflow: visible">
|
|
491
|
+
<g>
|
|
492
|
+
<line x1="50" x2="50" y1="20" y2="80" stroke="${a.isBullish ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}" stroke-width="2" stroke-linecap="round" />
|
|
493
|
+
${a.isBullish ? `
|
|
494
|
+
<line x1="45" x2="50" y1="65" y2="65" stroke="${e.value.style.layout.candle.colors.bullish}" stroke-width="1.5" stroke-linecap="round" />
|
|
495
|
+
<line x1="50" x2="55" y1="35" y2="35" stroke="${e.value.style.layout.candle.colors.bullish}" stroke-width="1.5" stroke-linecap="round" />
|
|
496
|
+
<text x="38" y="70" text-anchor="end" fill="${e.value.style.tooltip.color}">${Ie}</text>
|
|
497
|
+
<text x="62" y="40" text-anchor="start" fill="${e.value.style.tooltip.color}">${Re}</text>
|
|
498
|
+
` : `
|
|
499
|
+
<line x1="45" x2="50" y1="35" y2="35" stroke="${e.value.style.layout.candle.colors.bearish}" stroke-width="1.5" stroke-linecap="round" />
|
|
500
|
+
<line x1="50" x2="55" y1="65" y2="65" stroke="${e.value.style.layout.candle.colors.bearish}" stroke-width="1.5" stroke-linecap="round" />
|
|
501
|
+
<text x="40" y="40" text-anchor="end" fill="${e.value.style.tooltip.color}">${Ie}</text>
|
|
502
|
+
<text x="60" y="70" text-anchor="start" fill="${e.value.style.tooltip.color}">${Re}</text>
|
|
503
|
+
`}
|
|
504
|
+
<text x="50" y="13" text-anchor="middle" fill="${e.value.style.tooltip.color}">${ft}</text>
|
|
505
|
+
<text x="50" y="97" text-anchor="middle" fill="${e.value.style.tooltip.color}">${gt}</text>
|
|
506
|
+
<g>
|
|
507
|
+
</svg>
|
|
508
|
+
<div>
|
|
509
|
+
` : (o += `<div>${fl}: <b>${Ie}</b></div>`, o += `<div>${gl}: <b>${ft}</b></div>`, o += `<div>${xl}: <b>${gt}</b></div>`, o += `<div>${bl}: <b>${Re}</b></div>`), o += "</div>", xe.value = `<div style="text-align:right">${o}</div>`;
|
|
510
|
+
}
|
|
511
|
+
ge.value = !0;
|
|
512
|
+
}
|
|
513
|
+
const ee = y(null);
|
|
514
|
+
function sl() {
|
|
515
|
+
return new Promise((t) => requestAnimationFrame(
|
|
516
|
+
() => requestAnimationFrame(() => t())
|
|
517
|
+
));
|
|
518
|
+
}
|
|
519
|
+
Me(() => {
|
|
520
|
+
ee.value && cancelAnimationFrame(ee.value);
|
|
521
|
+
});
|
|
522
|
+
async function nt() {
|
|
523
|
+
de(), await bt(), ee.value && cancelAnimationFrame(ee.value), ee.value = requestAnimationFrame(async () => {
|
|
524
|
+
await sl(), de();
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
const te = y(!1), rt = y(!1), ve = y(!1);
|
|
528
|
+
function de() {
|
|
529
|
+
if (!te.value) {
|
|
530
|
+
te.value = !0;
|
|
531
|
+
try {
|
|
532
|
+
const { startIndex: t, endIndex: a } = e.value.style.zoom, l = C.value, o = t ?? 0, i = a != null ? Math.min(vt(a + 1), l) : l;
|
|
533
|
+
ve.value = !0, r.value.start = o, r.value.end = i, A.value.start = o, A.value.end = i, ie(), rt.value = !0;
|
|
534
|
+
} finally {
|
|
535
|
+
queueMicrotask(() => {
|
|
536
|
+
ve.value = !1;
|
|
537
|
+
}), te.value = !1;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
function vt(t) {
|
|
542
|
+
const a = C.value;
|
|
543
|
+
return t > a ? a : t < 0 || t < r.value.start ? e.value.style.zoom.startIndex !== null ? e.value.style.zoom.startIndex + 1 : 1 : t;
|
|
544
|
+
}
|
|
545
|
+
function Te(t = null) {
|
|
546
|
+
bt(() => {
|
|
547
|
+
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 = $.value.map((d, b) => [
|
|
548
|
+
e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? P.value[b].text : d.period,
|
|
549
|
+
d.open.value,
|
|
550
|
+
d.high.value,
|
|
551
|
+
d.low.value,
|
|
552
|
+
d.last.value,
|
|
553
|
+
d.volume
|
|
554
|
+
]), o = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([a]).concat(l), i = Rl(o);
|
|
555
|
+
t ? t(i) : Ml({ csvContent: i, title: e.value.style.title.text || "vue-ui-candlestick" });
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
const ce = c(() => {
|
|
559
|
+
const t = $.value.map((o, i) => {
|
|
560
|
+
const d = e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? P.value[i].text : o.period, b = N({
|
|
561
|
+
p: e.value.table.td.prefix,
|
|
562
|
+
v: o.open.value,
|
|
563
|
+
s: e.value.table.td.suffix,
|
|
564
|
+
r: e.value.table.td.roundingValue
|
|
565
|
+
}), R = N({
|
|
566
|
+
p: e.value.table.td.prefix,
|
|
567
|
+
v: o.high.value,
|
|
568
|
+
s: e.value.table.td.suffix,
|
|
569
|
+
r: e.value.table.td.roundingValue
|
|
570
|
+
}), F = N({
|
|
571
|
+
p: e.value.table.td.prefix,
|
|
572
|
+
v: o.low.value,
|
|
573
|
+
s: e.value.table.td.suffix,
|
|
574
|
+
r: e.value.table.td.roundingValue
|
|
575
|
+
}), Q = N({
|
|
576
|
+
p: e.value.table.td.prefix,
|
|
577
|
+
v: o.last.value,
|
|
578
|
+
s: e.value.table.td.suffix,
|
|
579
|
+
r: e.value.table.td.roundingValue
|
|
580
|
+
});
|
|
581
|
+
return [
|
|
582
|
+
`<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_${L.value}` : `url(#bearish_gradient_${L.value})` : o.isBullish ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}"/></svg> ${d}`,
|
|
583
|
+
b,
|
|
584
|
+
R,
|
|
585
|
+
F,
|
|
586
|
+
Q,
|
|
587
|
+
`${isNaN(o.volume) ? "-" : o.volume.toLocaleString()}`
|
|
588
|
+
];
|
|
589
|
+
}), a = {
|
|
590
|
+
th: {
|
|
591
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
592
|
+
color: e.value.table.th.color,
|
|
593
|
+
outline: e.value.table.th.outline
|
|
594
|
+
},
|
|
595
|
+
td: {
|
|
596
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
597
|
+
color: e.value.table.td.color,
|
|
598
|
+
outline: e.value.table.td.outline
|
|
599
|
+
},
|
|
600
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
601
|
+
}, l = [
|
|
602
|
+
e.value.translations.period,
|
|
603
|
+
e.value.translations.open,
|
|
604
|
+
e.value.translations.high,
|
|
605
|
+
e.value.translations.low,
|
|
606
|
+
e.value.translations.last,
|
|
607
|
+
e.value.translations.volume
|
|
608
|
+
];
|
|
609
|
+
return { head: l, body: t, config: a, colNames: l };
|
|
610
|
+
}), X = y(!1);
|
|
611
|
+
function dt(t) {
|
|
612
|
+
X.value = t, Pe.value += 1;
|
|
613
|
+
}
|
|
614
|
+
function ct() {
|
|
615
|
+
z.value.showTable = !z.value.showTable;
|
|
616
|
+
}
|
|
617
|
+
function yt() {
|
|
618
|
+
z.value.showTooltip = !z.value.showTooltip;
|
|
619
|
+
}
|
|
620
|
+
const ye = y(!1);
|
|
621
|
+
function Fe() {
|
|
622
|
+
ye.value = !ye.value;
|
|
623
|
+
}
|
|
624
|
+
async function ul({ scale: t = 2 } = {}) {
|
|
625
|
+
if (!O.value) return;
|
|
626
|
+
const { width: a, height: l } = O.value.getBoundingClientRect(), o = a / l, { imageUri: i, base64: d } = await ql({ domElement: O.value, base64: !0, img: !0, scale: t });
|
|
627
|
+
return {
|
|
628
|
+
imageUri: i,
|
|
629
|
+
base64: d,
|
|
630
|
+
title: e.value.style.title.text,
|
|
631
|
+
width: a,
|
|
632
|
+
height: l,
|
|
633
|
+
aspectRatio: o
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
const il = c(() => f.value.width), nl = c(() => f.value.height);
|
|
637
|
+
jl({
|
|
638
|
+
timeLabelsEls: K,
|
|
639
|
+
timeLabels: P,
|
|
640
|
+
slicer: r,
|
|
641
|
+
configRef: e,
|
|
642
|
+
rotationPath: ["style", "layout", "grid", "xAxis", "dataLabels", "rotation"],
|
|
643
|
+
autoRotatePath: ["style", "layout", "grid", "xAxis", "dataLabels", "autoRotate", "enable"],
|
|
644
|
+
isAutoSize: !1,
|
|
645
|
+
rotation: e.value.style.layout.grid.xAxis.dataLabels.autoRotate.angle,
|
|
646
|
+
width: il,
|
|
647
|
+
height: nl
|
|
648
|
+
}), oe(e, () => {
|
|
649
|
+
z.value = {
|
|
650
|
+
showTable: e.value.table.show,
|
|
651
|
+
showTooltip: e.value.style.tooltip.show
|
|
652
|
+
};
|
|
653
|
+
}, { immediate: !0 });
|
|
654
|
+
const le = c(() => {
|
|
655
|
+
const t = e.value.table.useDialog && !e.value.table.show, a = z.value.showTable;
|
|
656
|
+
return {
|
|
657
|
+
component: t ? Nt : Mt,
|
|
658
|
+
title: `${e.value.style.title.text}${e.value.style.title.subtitle.text ? `: ${e.value.style.title.subtitle.text}` : ""}`,
|
|
659
|
+
props: t ? {
|
|
660
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
661
|
+
color: e.value.table.th.color,
|
|
662
|
+
headerColor: e.value.table.th.color,
|
|
663
|
+
headerBg: e.value.table.th.backgroundColor,
|
|
664
|
+
isFullscreen: X.value,
|
|
665
|
+
fullscreenParent: O.value,
|
|
666
|
+
forcedWidth: Math.min(800, window.innerWidth * 0.8)
|
|
667
|
+
} : {
|
|
668
|
+
hideDetails: !0,
|
|
669
|
+
config: {
|
|
670
|
+
open: a,
|
|
671
|
+
maxHeight: 1e4,
|
|
672
|
+
body: {
|
|
673
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
674
|
+
color: e.value.style.color
|
|
675
|
+
},
|
|
676
|
+
head: {
|
|
677
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
678
|
+
color: e.value.style.color
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
};
|
|
683
|
+
});
|
|
684
|
+
oe(() => z.value.showTable, (t) => {
|
|
685
|
+
e.value.table.show || (t && e.value.table.useDialog && Z.value ? Z.value.open() : "close" in Z.value && Z.value.close());
|
|
686
|
+
});
|
|
687
|
+
function ht() {
|
|
688
|
+
z.value.showTable = !1, ke.value && ke.value.setTableIconState(!1);
|
|
689
|
+
}
|
|
690
|
+
const rl = c(() => e.value.style.backgroundColor), vl = c(() => e.value.style.title), { exportSvg: dl, getSvg: cl } = Xl({
|
|
691
|
+
svg: Ce,
|
|
692
|
+
title: vl,
|
|
693
|
+
backgroundColor: rl
|
|
694
|
+
});
|
|
695
|
+
async function mt({ isCb: t }) {
|
|
696
|
+
if (t) {
|
|
697
|
+
const { blob: a, url: l, text: o, dataUrl: i } = await cl();
|
|
698
|
+
e.value.userOptions.callbacks.svg({ blob: a, url: l, text: o, dataUrl: i });
|
|
699
|
+
} else
|
|
700
|
+
dl();
|
|
701
|
+
}
|
|
702
|
+
function yl(t) {
|
|
703
|
+
Xe.value = t;
|
|
704
|
+
}
|
|
705
|
+
function hl(t) {
|
|
706
|
+
te.value || ve.value || t !== r.value.start && (r.value.start = t, A.value.start = t, ie());
|
|
707
|
+
}
|
|
708
|
+
function ml(t) {
|
|
709
|
+
if (te.value || ve.value) return;
|
|
710
|
+
const a = vt(t);
|
|
711
|
+
a !== r.value.end && (r.value.end = a, A.value.end = a, ie());
|
|
712
|
+
}
|
|
713
|
+
function pl({ seriesIndex: t, datapoint: a }) {
|
|
714
|
+
const l = r.value.start + t;
|
|
715
|
+
De("selectX", {
|
|
716
|
+
dataset: a,
|
|
717
|
+
index: l,
|
|
718
|
+
indexLabel: ""
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
return Tt({
|
|
722
|
+
getImage: ul,
|
|
723
|
+
generatePdf: Qe,
|
|
724
|
+
generateCsv: Te,
|
|
725
|
+
generateImage: Je,
|
|
726
|
+
generateSvg: mt,
|
|
727
|
+
toggleTable: ct,
|
|
728
|
+
toggleTooltip: yt,
|
|
729
|
+
toggleAnnotator: Fe,
|
|
730
|
+
toggleFullscreen: dt
|
|
731
|
+
}), (t, a) => (s(), u("div", {
|
|
732
|
+
ref_key: "candlestickChart",
|
|
733
|
+
ref: O,
|
|
734
|
+
class: B(`vue-data-ui-component vue-ui-candlestick ${X.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
735
|
+
style: se(`position:relative;font-family:${e.value.style.fontFamily}; text-align:center;background:${e.value.style.backgroundColor}; ${e.value.responsive ? "height: 100%" : ""}`),
|
|
736
|
+
id: `vue-ui-candlestick_${L.value}`,
|
|
737
|
+
onMouseenter: Ut,
|
|
738
|
+
onMouseleave: Wt
|
|
739
|
+
}, [
|
|
740
|
+
e.value.userOptions.buttons.annotator ? (s(), H(h(Dt), {
|
|
741
|
+
key: 0,
|
|
742
|
+
svgRef: h(Ce),
|
|
743
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
744
|
+
color: e.value.style.color,
|
|
745
|
+
active: ye.value,
|
|
746
|
+
onClose: Fe
|
|
747
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : m("", !0),
|
|
748
|
+
Xt.value ? (s(), u("div", {
|
|
749
|
+
key: 1,
|
|
750
|
+
ref_key: "noTitle",
|
|
751
|
+
ref: Ve,
|
|
752
|
+
class: "vue-data-ui-no-title-space",
|
|
753
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
754
|
+
}, null, 512)) : m("", !0),
|
|
755
|
+
e.value.style.title.text ? (s(), u("div", {
|
|
756
|
+
key: 2,
|
|
757
|
+
ref_key: "chartTitle",
|
|
758
|
+
ref: Be,
|
|
759
|
+
style: "width:100%;background:transparent"
|
|
760
|
+
}, [
|
|
761
|
+
(s(), H(Yl, {
|
|
762
|
+
key: `title_${We.value}`,
|
|
763
|
+
config: {
|
|
764
|
+
title: {
|
|
765
|
+
cy: "candlestick-div-title",
|
|
766
|
+
...e.value.style.title
|
|
767
|
+
},
|
|
768
|
+
subtitle: {
|
|
769
|
+
cy: "candlestick-div-subtitle",
|
|
770
|
+
...e.value.style.title.subtitle
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
}, null, 8, ["config"]))
|
|
774
|
+
], 512)) : m("", !0),
|
|
775
|
+
e.value.userOptions.show && pe.value && (h(Ge) || h(Ae)) ? (s(), H(h(Pt), {
|
|
776
|
+
ref_key: "userOptionsRef",
|
|
777
|
+
ref: ke,
|
|
778
|
+
key: `user_options_${Pe.value}`,
|
|
779
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
780
|
+
color: e.value.style.color,
|
|
781
|
+
isImaging: h(Ye),
|
|
782
|
+
isPrinting: h(qe),
|
|
783
|
+
uid: L.value,
|
|
784
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
|
|
785
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
786
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
787
|
+
hasSvg: e.value.userOptions.buttons.svg,
|
|
788
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
789
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
790
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
791
|
+
isFullscreen: X.value,
|
|
792
|
+
isTooltip: z.value.showTooltip,
|
|
793
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
794
|
+
chartElement: O.value,
|
|
795
|
+
position: e.value.userOptions.position,
|
|
796
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
797
|
+
isAnnotation: ye.value,
|
|
798
|
+
callbacks: e.value.userOptions.callbacks,
|
|
799
|
+
printScale: e.value.userOptions.print.scale,
|
|
800
|
+
tableDialog: e.value.table.useDialog,
|
|
801
|
+
onToggleFullscreen: dt,
|
|
802
|
+
onGeneratePdf: h(Qe),
|
|
803
|
+
onGenerateCsv: Te,
|
|
804
|
+
onGenerateImage: h(Je),
|
|
805
|
+
onGenerateSvg: mt,
|
|
806
|
+
onToggleTable: ct,
|
|
807
|
+
onToggleTooltip: yt,
|
|
808
|
+
onToggleAnnotator: Fe,
|
|
809
|
+
style: se({
|
|
810
|
+
visibility: h(Ge) ? h(Ae) ? "visible" : "hidden" : "visible"
|
|
811
|
+
})
|
|
812
|
+
}, kt({ _: 2 }, [
|
|
813
|
+
t.$slots.menuIcon ? {
|
|
814
|
+
name: "menuIcon",
|
|
815
|
+
fn: k(({ isOpen: l, color: o }) => [
|
|
816
|
+
w(t.$slots, "menuIcon", G(j({ isOpen: l, color: o })), void 0, !0)
|
|
817
|
+
]),
|
|
818
|
+
key: "0"
|
|
819
|
+
} : void 0,
|
|
820
|
+
t.$slots.optionTooltip ? {
|
|
821
|
+
name: "optionTooltip",
|
|
822
|
+
fn: k(() => [
|
|
823
|
+
w(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
824
|
+
]),
|
|
825
|
+
key: "1"
|
|
826
|
+
} : void 0,
|
|
827
|
+
t.$slots.optionPdf ? {
|
|
828
|
+
name: "optionPdf",
|
|
829
|
+
fn: k(() => [
|
|
830
|
+
w(t.$slots, "optionPdf", {}, void 0, !0)
|
|
831
|
+
]),
|
|
832
|
+
key: "2"
|
|
833
|
+
} : void 0,
|
|
834
|
+
t.$slots.optionCsv ? {
|
|
835
|
+
name: "optionCsv",
|
|
836
|
+
fn: k(() => [
|
|
837
|
+
w(t.$slots, "optionCsv", {}, void 0, !0)
|
|
838
|
+
]),
|
|
839
|
+
key: "3"
|
|
840
|
+
} : void 0,
|
|
841
|
+
t.$slots.optionImg ? {
|
|
842
|
+
name: "optionImg",
|
|
843
|
+
fn: k(() => [
|
|
844
|
+
w(t.$slots, "optionImg", {}, void 0, !0)
|
|
845
|
+
]),
|
|
846
|
+
key: "4"
|
|
847
|
+
} : void 0,
|
|
848
|
+
t.$slots.optionTable ? {
|
|
849
|
+
name: "optionTable",
|
|
850
|
+
fn: k(() => [
|
|
851
|
+
w(t.$slots, "optionTable", {}, void 0, !0)
|
|
852
|
+
]),
|
|
853
|
+
key: "5"
|
|
854
|
+
} : void 0,
|
|
855
|
+
t.$slots.optionFullscreen ? {
|
|
856
|
+
name: "optionFullscreen",
|
|
857
|
+
fn: k(({ toggleFullscreen: l, isFullscreen: o }) => [
|
|
858
|
+
w(t.$slots, "optionFullscreen", G(j({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
|
|
859
|
+
]),
|
|
860
|
+
key: "6"
|
|
861
|
+
} : void 0,
|
|
862
|
+
t.$slots.optionAnnotator ? {
|
|
863
|
+
name: "optionAnnotator",
|
|
864
|
+
fn: k(({ toggleAnnotator: l, isAnnotator: o }) => [
|
|
865
|
+
w(t.$slots, "optionAnnotator", G(j({ toggleAnnotator: l, isAnnotator: o })), void 0, !0)
|
|
866
|
+
]),
|
|
867
|
+
key: "7"
|
|
868
|
+
} : void 0
|
|
869
|
+
]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : m("", !0),
|
|
870
|
+
(s(), u("svg", {
|
|
871
|
+
ref_key: "svgRef",
|
|
872
|
+
ref: Ce,
|
|
873
|
+
xmlns: h(Fl),
|
|
874
|
+
"aria-label": e.value.style.title.text || "candlestick chart",
|
|
875
|
+
class: B({ "vue-data-ui-fullscreen--on": X.value, "vue-data-ui-fulscreen--off": !X.value }),
|
|
876
|
+
viewBox: `0 0 ${f.value.width <= 0 ? 10 : f.value.width} ${f.value.height <= 0 ? 10 : f.value.height}`,
|
|
877
|
+
style: se(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.color}`)
|
|
878
|
+
}, [
|
|
879
|
+
Oe(h(Bt)),
|
|
880
|
+
t.$slots["chart-background"] ? (s(), u("foreignObject", {
|
|
881
|
+
key: 0,
|
|
882
|
+
x: n.value.left,
|
|
883
|
+
y: n.value.top,
|
|
884
|
+
width: Math.max(0.1, n.value.width),
|
|
885
|
+
height: Math.max(0.1, n.value.height),
|
|
886
|
+
style: {
|
|
887
|
+
pointerEvents: "none"
|
|
888
|
+
}
|
|
889
|
+
}, [
|
|
890
|
+
w(t.$slots, "chart-background", {}, void 0, !0)
|
|
891
|
+
], 8, ta)) : m("", !0),
|
|
892
|
+
$.value.length > 0 ? (s(), u("g", la, [
|
|
893
|
+
p("defs", null, [
|
|
894
|
+
p("linearGradient", {
|
|
895
|
+
id: `bearish_gradient_${L.value}`,
|
|
896
|
+
x2: "0%",
|
|
897
|
+
y2: "100%"
|
|
898
|
+
}, [
|
|
899
|
+
p("stop", {
|
|
900
|
+
offset: "0%",
|
|
901
|
+
"stop-color": e.value.style.layout.candle.colors.bearish
|
|
902
|
+
}, null, 8, oa),
|
|
903
|
+
p("stop", {
|
|
904
|
+
offset: "50%",
|
|
905
|
+
"stop-color": `${h(me)(e.value.style.layout.candle.colors.bearish, 0.02)}DE`
|
|
906
|
+
}, null, 8, sa),
|
|
907
|
+
p("stop", {
|
|
908
|
+
offset: "100%",
|
|
909
|
+
"stop-color": `${h(me)(e.value.style.layout.candle.colors.bearish, 0.05)}66`
|
|
910
|
+
}, null, 8, ua)
|
|
911
|
+
], 8, aa),
|
|
912
|
+
p("linearGradient", {
|
|
913
|
+
id: `bullish_gradient_${L.value}`,
|
|
914
|
+
x2: "0%",
|
|
915
|
+
y2: "100%"
|
|
916
|
+
}, [
|
|
917
|
+
p("stop", {
|
|
918
|
+
offset: "0%",
|
|
919
|
+
"stop-color": e.value.style.layout.candle.colors.bullish
|
|
920
|
+
}, null, 8, na),
|
|
921
|
+
p("stop", {
|
|
922
|
+
offset: "50%",
|
|
923
|
+
"stop-color": `${h(me)(e.value.style.layout.candle.colors.bullish, 0.02)}DE`
|
|
924
|
+
}, null, 8, ra),
|
|
925
|
+
p("stop", {
|
|
926
|
+
offset: "100%",
|
|
927
|
+
"stop-color": `${h(me)(e.value.style.layout.candle.colors.bullish, 0.05)}66`
|
|
928
|
+
}, null, 8, va)
|
|
929
|
+
], 8, ia)
|
|
930
|
+
]),
|
|
931
|
+
e.value.style.layout.grid.show ? (s(), u("g", da, [
|
|
932
|
+
p("line", {
|
|
933
|
+
x1: n.value.left,
|
|
934
|
+
x2: n.value.left,
|
|
935
|
+
y1: n.value.top,
|
|
936
|
+
y2: n.value.bottom,
|
|
937
|
+
stroke: e.value.style.layout.grid.stroke,
|
|
938
|
+
"stroke-width": e.value.style.layout.grid.strokeWidth,
|
|
939
|
+
"stroke-linecap": "round"
|
|
940
|
+
}, null, 8, ca),
|
|
941
|
+
p("line", {
|
|
942
|
+
x1: n.value.left,
|
|
943
|
+
x2: n.value.right,
|
|
944
|
+
y1: n.value.bottom,
|
|
945
|
+
y2: n.value.bottom,
|
|
946
|
+
stroke: e.value.style.layout.grid.stroke,
|
|
947
|
+
"stroke-width": e.value.style.layout.grid.strokeWidth,
|
|
948
|
+
"stroke-linecap": "round"
|
|
949
|
+
}, null, 8, ya),
|
|
950
|
+
e.value.style.layout.grid.horizontalLines.show ? (s(!0), u(_, { key: 0 }, S(ot.value, (l) => (s(), u("line", {
|
|
951
|
+
x1: n.value.left,
|
|
952
|
+
x2: n.value.right,
|
|
953
|
+
y1: l.y,
|
|
954
|
+
y2: l.y,
|
|
955
|
+
stroke: e.value.style.layout.grid.horizontalLines.stroke,
|
|
956
|
+
"stroke-width": e.value.style.layout.grid.horizontalLines.strokeWidth,
|
|
957
|
+
"stroke-dasharray": e.value.style.layout.grid.horizontalLines.strokeDasharray,
|
|
958
|
+
"stroke-linecap": "round"
|
|
959
|
+
}, null, 8, ha))), 256)) : m("", !0),
|
|
960
|
+
e.value.style.layout.grid.verticalLines.show ? (s(!0), u(_, { key: 1 }, S(Se.value, (l, o) => (s(), u("g", null, [
|
|
961
|
+
l.text ? (s(), u("line", {
|
|
962
|
+
key: 0,
|
|
963
|
+
x1: n.value.left + v.value * o + v.value / 2,
|
|
964
|
+
x2: n.value.left + v.value * o + v.value / 2,
|
|
965
|
+
y1: n.value.top,
|
|
966
|
+
y2: n.value.bottom,
|
|
967
|
+
stroke: e.value.style.layout.grid.verticalLines.stroke,
|
|
968
|
+
"stroke-width": e.value.style.layout.grid.verticalLines.strokeWidth,
|
|
969
|
+
"stroke-dasharray": e.value.style.layout.grid.verticalLines.strokeDasharray,
|
|
970
|
+
"stroke-linecap": "round"
|
|
971
|
+
}, null, 8, ma)) : m("", !0)
|
|
972
|
+
]))), 256)) : m("", !0),
|
|
973
|
+
e.value.style.layout.grid.xAxis.ticks.show ? (s(!0), u(_, { key: 2 }, S(Se.value, (l, o) => (s(), u("g", null, [
|
|
974
|
+
l.text ? (s(), u("line", {
|
|
975
|
+
key: 0,
|
|
976
|
+
x1: n.value.left + v.value * o + v.value / 2,
|
|
977
|
+
x2: n.value.left + v.value * o + v.value / 2,
|
|
978
|
+
y1: n.value.bottom,
|
|
979
|
+
y2: n.value.bottom + 3,
|
|
980
|
+
stroke: e.value.style.layout.grid.stroke,
|
|
981
|
+
"stroke-width": e.value.style.layout.grid.strokeWidth,
|
|
982
|
+
"stroke-linecap": "round"
|
|
983
|
+
}, null, 8, pa)) : m("", !0)
|
|
984
|
+
]))), 256)) : m("", !0)
|
|
985
|
+
])) : m("", !0),
|
|
986
|
+
e.value.style.layout.grid.yAxis.dataLabels.show ? (s(), u("g", {
|
|
987
|
+
key: 1,
|
|
988
|
+
ref_key: "scaleLabels",
|
|
989
|
+
ref: be
|
|
990
|
+
}, [
|
|
991
|
+
(s(!0), u(_, null, S(ot.value, (l, o) => (s(), u("g", null, [
|
|
992
|
+
l.value >= T.value.min && l.value <= T.value.max ? (s(), u("line", {
|
|
993
|
+
key: 0,
|
|
994
|
+
x1: n.value.left,
|
|
995
|
+
x2: n.value.left - 5,
|
|
996
|
+
y1: l.y,
|
|
997
|
+
y2: l.y,
|
|
998
|
+
stroke: e.value.style.layout.grid.stroke,
|
|
999
|
+
"stroke-width": e.value.style.layout.grid.strokeWidth,
|
|
1000
|
+
"stroke-linecap": "round"
|
|
1001
|
+
}, null, 8, fa)) : m("", !0),
|
|
1002
|
+
l.value >= T.value.min && l.value <= T.value.max ? (s(), u("text", {
|
|
1003
|
+
key: 1,
|
|
1004
|
+
x: n.value.left - 8 + e.value.style.layout.grid.yAxis.dataLabels.offsetX,
|
|
1005
|
+
y: l.y + f.value.yAxisFontSize / 3,
|
|
1006
|
+
"font-size": f.value.yAxisFontSize,
|
|
1007
|
+
"text-anchor": "end",
|
|
1008
|
+
fill: e.value.style.layout.grid.yAxis.dataLabels.color,
|
|
1009
|
+
"font-weight": e.value.style.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
|
|
1010
|
+
}, ue(h(N)({
|
|
1011
|
+
p: e.value.style.layout.grid.yAxis.dataLabels.prefix,
|
|
1012
|
+
v: l.value,
|
|
1013
|
+
s: e.value.style.layout.grid.yAxis.dataLabels.suffix,
|
|
1014
|
+
r: e.value.style.layout.grid.yAxis.dataLabels.roundingValue
|
|
1015
|
+
})), 9, ga)) : m("", !0)
|
|
1016
|
+
]))), 256))
|
|
1017
|
+
], 512)) : m("", !0),
|
|
1018
|
+
e.value.style.layout.grid.xAxis.dataLabels.show && !e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? (s(), u("g", {
|
|
1019
|
+
key: 2,
|
|
1020
|
+
ref_key: "timeLabelsEls",
|
|
1021
|
+
ref: K
|
|
1022
|
+
}, [
|
|
1023
|
+
(s(!0), u(_, null, S(Kt.value, (l, o) => (s(), u("g", null, [
|
|
1024
|
+
p("text", {
|
|
1025
|
+
class: "vue-data-ui-time-label",
|
|
1026
|
+
transform: `translate(${n.value.left + v.value * o + v.value / 2}, ${n.value.bottom + f.value.xAxisFontSize * 1.5}), rotate(${e.value.style.layout.grid.xAxis.dataLabels.rotation})`,
|
|
1027
|
+
"text-anchor": e.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
|
|
1028
|
+
"font-size": f.value.xAxisFontSize,
|
|
1029
|
+
fill: e.value.style.layout.grid.xAxis.dataLabels.color,
|
|
1030
|
+
"font-weight": e.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
|
|
1031
|
+
}, ue(l), 9, xa)
|
|
1032
|
+
]))), 256))
|
|
1033
|
+
], 512)) : m("", !0),
|
|
1034
|
+
e.value.style.layout.grid.xAxis.dataLabels.show && e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable ? (s(), u("g", {
|
|
1035
|
+
key: 3,
|
|
1036
|
+
ref_key: "timeLabelsEls",
|
|
1037
|
+
ref: K
|
|
1038
|
+
}, [
|
|
1039
|
+
(s(!0), u(_, null, S(Se.value, (l, o) => (s(), u("g", null, [
|
|
1040
|
+
p("text", {
|
|
1041
|
+
class: "vue-data-ui-time-label",
|
|
1042
|
+
transform: `translate(${n.value.left + v.value * o + v.value / 2}, ${n.value.bottom + f.value.xAxisFontSize * 1.5}), rotate(${e.value.style.layout.grid.xAxis.dataLabels.rotation})`,
|
|
1043
|
+
"text-anchor": e.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
|
|
1044
|
+
"font-size": f.value.xAxisFontSize,
|
|
1045
|
+
fill: e.value.style.layout.grid.xAxis.dataLabels.color,
|
|
1046
|
+
"font-weight": e.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
|
|
1047
|
+
}, ue(l.text), 9, ba)
|
|
1048
|
+
]))), 256))
|
|
1049
|
+
], 512)) : m("", !0),
|
|
1050
|
+
e.value.type === "candlestick" ? (s(), u(_, { key: 4 }, [
|
|
1051
|
+
p("g", null, [
|
|
1052
|
+
(s(!0), u(_, null, S($.value, (l, o) => (s(), u("g", null, [
|
|
1053
|
+
p("rect", {
|
|
1054
|
+
x: l.open.x - e.value.style.layout.wick.strokeWidth / 2,
|
|
1055
|
+
y: l.high.y,
|
|
1056
|
+
width: e.value.style.layout.wick.strokeWidth,
|
|
1057
|
+
height: Math.abs(l.high.y - l.low.y),
|
|
1058
|
+
fill: e.value.style.layout.wick.stroke,
|
|
1059
|
+
stroke: "none",
|
|
1060
|
+
rx: e.value.style.layout.wick.strokeWidth / 2,
|
|
1061
|
+
class: B({ "vue-data-ui-transition": I.value && !h(D) })
|
|
1062
|
+
}, null, 10, ka),
|
|
1063
|
+
e.value.style.layout.wick.extremity.shape === "circle" ? (s(), u("g", wa, [
|
|
1064
|
+
p("circle", {
|
|
1065
|
+
cx: l.high.x,
|
|
1066
|
+
cy: l.high.y,
|
|
1067
|
+
r: e.value.style.layout.wick.extremity.size === "auto" ? v.value / 20 : e.value.style.layout.wick.extremity.size,
|
|
1068
|
+
fill: e.value.style.layout.wick.extremity.color,
|
|
1069
|
+
class: B({ "vue-data-ui-transition": I.value && !h(D) })
|
|
1070
|
+
}, null, 10, Aa),
|
|
1071
|
+
p("circle", {
|
|
1072
|
+
cx: l.low.x,
|
|
1073
|
+
cy: l.low.y,
|
|
1074
|
+
r: e.value.style.layout.wick.extremity.size === "auto" ? v.value / 20 : e.value.style.layout.wick.extremity.size,
|
|
1075
|
+
fill: e.value.style.layout.wick.extremity.color,
|
|
1076
|
+
class: B({ "vue-data-ui-transition": I.value && !h(D) })
|
|
1077
|
+
}, null, 10, Ca)
|
|
1078
|
+
])) : m("", !0),
|
|
1079
|
+
e.value.style.layout.wick.extremity.shape === "line" ? (s(), u("g", $a, [
|
|
1080
|
+
p("rect", {
|
|
1081
|
+
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,
|
|
1082
|
+
y: l.high.y - e.value.style.layout.wick.strokeWidth / 2,
|
|
1083
|
+
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)),
|
|
1084
|
+
height: e.value.style.layout.wick.strokeWidth,
|
|
1085
|
+
rx: e.value.style.layout.wick.strokeWidth / 2,
|
|
1086
|
+
fill: e.value.style.layout.wick.extremity.color,
|
|
1087
|
+
stroke: "none",
|
|
1088
|
+
class: B({ "vue-data-ui-transition": I.value && !h(D) })
|
|
1089
|
+
}, null, 10, _a),
|
|
1090
|
+
p("rect", {
|
|
1091
|
+
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,
|
|
1092
|
+
y: l.low.y - e.value.style.layout.wick.strokeWidth / 2,
|
|
1093
|
+
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)),
|
|
1094
|
+
height: e.value.style.layout.wick.strokeWidth,
|
|
1095
|
+
fill: e.value.style.layout.wick.extremity.color,
|
|
1096
|
+
stroke: "none",
|
|
1097
|
+
rx: e.value.style.layout.wick.strokeWidth / 2,
|
|
1098
|
+
class: B({ "vue-data-ui-transition": I.value && !h(D) })
|
|
1099
|
+
}, null, 10, za)
|
|
1100
|
+
])) : m("", !0)
|
|
1101
|
+
]))), 256))
|
|
1102
|
+
]),
|
|
1103
|
+
p("g", null, [
|
|
1104
|
+
(s(!0), u(_, null, S($.value, (l, o) => (s(), u("rect", {
|
|
1105
|
+
x: l.open.x - v.value / 2 + v.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
|
|
1106
|
+
y: l.isBullish ? l.last.y : l.open.y,
|
|
1107
|
+
height: Math.abs(l.last.y - l.open.y) <= 0 ? 1e-4 : Math.abs(l.last.y - l.open.y),
|
|
1108
|
+
width: v.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : v.value * e.value.style.layout.candle.widthRatio,
|
|
1109
|
+
fill: e.value.style.layout.candle.gradient.underlayer,
|
|
1110
|
+
rx: e.value.style.layout.candle.borderRadius,
|
|
1111
|
+
stroke: "none",
|
|
1112
|
+
class: B({ "vue-data-ui-transition": I.value && !h(D) })
|
|
1113
|
+
}, null, 10, Sa))), 256)),
|
|
1114
|
+
(s(!0), u(_, null, S($.value, (l, o) => (s(), u("rect", {
|
|
1115
|
+
x: l.open.x - v.value / 2 + v.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
|
|
1116
|
+
y: l.isBullish ? l.last.y : l.open.y,
|
|
1117
|
+
height: Math.abs(l.last.y - l.open.y) <= 0 ? 1e-4 : Math.abs(l.last.y - l.open.y),
|
|
1118
|
+
width: v.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : v.value * e.value.style.layout.candle.widthRatio,
|
|
1119
|
+
fill: l.isBullish ? e.value.style.layout.candle.gradient.show ? `url(#bullish_gradient_${L.value})` : e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.gradient.show ? `url(#bearish_gradient_${L.value})` : e.value.style.layout.candle.colors.bearish,
|
|
1120
|
+
rx: e.value.style.layout.candle.borderRadius,
|
|
1121
|
+
stroke: e.value.style.layout.candle.stroke,
|
|
1122
|
+
"stroke-width": e.value.style.layout.candle.strokeWidth,
|
|
1123
|
+
"stroke-linecap": "round",
|
|
1124
|
+
"stroke-linejoin": "round",
|
|
1125
|
+
class: B({ "vue-data-ui-transition": I.value && !h(D) })
|
|
1126
|
+
}, null, 10, La))), 256))
|
|
1127
|
+
])
|
|
1128
|
+
], 64)) : m("", !0),
|
|
1129
|
+
e.value.type === "ohlc" ? (s(!0), u(_, { key: 5 }, S($.value, (l, o) => (s(), u("g", null, [
|
|
1130
|
+
p("path", {
|
|
1131
|
+
d: `M ${l.high.x},${l.high.y} ${l.low.x},${l.low.y} M${l.open.x - Math.min(6, v.value / 3)},${l.open.y} ${l.open.x},${l.open.y} M${l.last.x},${l.last.y} ${l.last.x + Math.min(6, v.value / 3)},${l.last.y}`,
|
|
1132
|
+
stroke: l.isBullish ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish,
|
|
1133
|
+
"stroke-width": 1
|
|
1134
|
+
}, null, 8, Ta)
|
|
1135
|
+
]))), 256)) : m("", !0),
|
|
1136
|
+
p("g", null, [
|
|
1137
|
+
(s(!0), u(_, null, S($.value, (l, o) => (s(), u("rect", {
|
|
1138
|
+
x: n.value.left + o * v.value,
|
|
1139
|
+
y: n.value.top,
|
|
1140
|
+
height: n.value.height <= 0 ? 1e-4 : n.value.height,
|
|
1141
|
+
width: v.value <= 0 ? 1e-4 : v.value,
|
|
1142
|
+
fill: M.value === o || Xe.value === o ? h(Il)(e.value.style.layout.selector.color, e.value.style.layout.selector.opacity) : "transparent",
|
|
1143
|
+
onMouseover: () => ol(o, l),
|
|
1144
|
+
onMouseleave: () => al(o, l),
|
|
1145
|
+
onClick: () => ll(o, l)
|
|
1146
|
+
}, null, 40, Fa))), 256))
|
|
1147
|
+
])
|
|
1148
|
+
])) : m("", !0),
|
|
1149
|
+
Ze.value ? (s(), u("rect", wt({ key: 2 }, jt.value, {
|
|
1150
|
+
"data-start": r.value.start,
|
|
1151
|
+
"data-end": r.value.end
|
|
1152
|
+
}), null, 16, Ia)) : m("", !0),
|
|
1153
|
+
w(t.$slots, "svg", { svg: f.value }, void 0, !0)
|
|
1154
|
+
], 14, ea)),
|
|
1155
|
+
t.$slots.watermark ? (s(), u("div", Ra, [
|
|
1156
|
+
w(t.$slots, "watermark", G(j({ isPrinting: h(qe) || h(Ye) })), void 0, !0)
|
|
1157
|
+
])) : m("", !0),
|
|
1158
|
+
e.value.style.zoom.show && C.value > 6 && pe.value && rt.value ? (s(), H(Jl, {
|
|
1159
|
+
key: 5,
|
|
1160
|
+
ref_key: "chartSlicer",
|
|
1161
|
+
ref: J,
|
|
1162
|
+
allMinimaps: Qt.value,
|
|
1163
|
+
background: e.value.style.zoom.color,
|
|
1164
|
+
borderColor: e.value.style.backgroundColor,
|
|
1165
|
+
customFormat: e.value.style.zoom.customFormat,
|
|
1166
|
+
cutNullValues: !1,
|
|
1167
|
+
enableRangeHandles: e.value.style.zoom.enableRangeHandles,
|
|
1168
|
+
enableSelectionDrag: e.value.style.zoom.enableSelectionDrag,
|
|
1169
|
+
end: r.value.end,
|
|
1170
|
+
focusOnDrag: e.value.style.zoom.focusOnDrag,
|
|
1171
|
+
focusRangeRatio: e.value.style.zoom.focusRangeRatio,
|
|
1172
|
+
fontSize: e.value.style.zoom.fontSize,
|
|
1173
|
+
immediate: !e.value.style.zoom.preview.enable,
|
|
1174
|
+
inputColor: e.value.style.zoom.color,
|
|
1175
|
+
isPreview: Ze.value,
|
|
1176
|
+
labelLeft: it.value.start || "",
|
|
1177
|
+
labelRight: it.value.end || "",
|
|
1178
|
+
max: C.value,
|
|
1179
|
+
min: 0,
|
|
1180
|
+
minimap: e.value.style.zoom.minimap.show ? h(x).map((l) => l[2]) : [],
|
|
1181
|
+
minimapCompact: e.value.style.zoom.minimap.compact,
|
|
1182
|
+
minimapFrameColor: e.value.style.zoom.minimap.frameColor,
|
|
1183
|
+
minimapIndicatorColor: e.value.style.zoom.minimap.indicatorColor,
|
|
1184
|
+
minimapMerged: !1,
|
|
1185
|
+
minimapSelectedColor: e.value.style.zoom.minimap.selectedColor,
|
|
1186
|
+
minimapSelectedColorOpacity: e.value.style.zoom.minimap.selectedColorOpacity,
|
|
1187
|
+
minimapSelectedIndex: M.value,
|
|
1188
|
+
minimapSelectionRadius: 1,
|
|
1189
|
+
preciseLabels: tl.value,
|
|
1190
|
+
refreshEndPoint: e.value.style.zoom.endIndex !== null ? e.value.style.zoom.endIndex + 1 : C.value,
|
|
1191
|
+
refreshStartPoint: e.value.style.zoom.startIndex !== null ? e.value.style.zoom.startIndex : 0,
|
|
1192
|
+
selectColor: e.value.style.zoom.highlightColor,
|
|
1193
|
+
selectedSeries: h(x),
|
|
1194
|
+
smoothMinimap: !1,
|
|
1195
|
+
start: r.value.start,
|
|
1196
|
+
textColor: e.value.style.color,
|
|
1197
|
+
timeLabels: st.value,
|
|
1198
|
+
usePreciseLabels: e.value.style.layout.grid.xAxis.dataLabels.datetimeFormatter.enable && !e.value.style.zoom.useDefaultFormat,
|
|
1199
|
+
useResetSlot: e.value.style.zoom.useResetSlot,
|
|
1200
|
+
valueEnd: r.value.end,
|
|
1201
|
+
valueStart: r.value.start,
|
|
1202
|
+
verticalHandles: e.value.style.zoom.minimap.verticalHandles,
|
|
1203
|
+
"onUpdate:end": ml,
|
|
1204
|
+
"onUpdate:start": hl,
|
|
1205
|
+
onTrapMouse: yl,
|
|
1206
|
+
onReset: nt,
|
|
1207
|
+
onFutureEnd: a[0] || (a[0] = (l) => et("end", l)),
|
|
1208
|
+
onFutureStart: a[1] || (a[1] = (l) => et("start", l))
|
|
1209
|
+
}, {
|
|
1210
|
+
"reset-action": k(({ reset: l }) => [
|
|
1211
|
+
w(t.$slots, "reset-action", G(j({ reset: l })), void 0, !0)
|
|
1212
|
+
]),
|
|
1213
|
+
slotMap: k(({ height: l, unitW: o }) => [
|
|
1214
|
+
(s(!0), u(_, null, S(Yt.value({ minimapH: l, unitW: o }), (i, d) => (s(), u("g", null, [
|
|
1215
|
+
p("path", {
|
|
1216
|
+
d: `M ${i.high.x},${i.high.y} ${i.low.x},${i.low.y}`,
|
|
1217
|
+
stroke: i.isBullish ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish,
|
|
1218
|
+
"stroke-width": 1,
|
|
1219
|
+
style: se({
|
|
1220
|
+
opacity: d >= A.value.start && d <= A.value.end ? 1 : 0.6
|
|
1221
|
+
})
|
|
1222
|
+
}, null, 12, Ma),
|
|
1223
|
+
p("path", {
|
|
1224
|
+
d: `M ${i.open.x},${i.open.y} ${i.last.x},${i.last.y}`,
|
|
1225
|
+
stroke: i.isBullish ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish,
|
|
1226
|
+
"stroke-width": Math.min(6, o / 1.5),
|
|
1227
|
+
style: se({
|
|
1228
|
+
opacity: d >= A.value.start && d <= A.value.end ? 1 : 0.6
|
|
1229
|
+
})
|
|
1230
|
+
}, null, 12, Oa)
|
|
1231
|
+
]))), 256))
|
|
1232
|
+
]),
|
|
1233
|
+
_: 3
|
|
1234
|
+
}, 8, ["allMinimaps", "background", "borderColor", "customFormat", "enableRangeHandles", "enableSelectionDrag", "end", "focusOnDrag", "focusRangeRatio", "fontSize", "immediate", "inputColor", "isPreview", "labelLeft", "labelRight", "max", "minimap", "minimapCompact", "minimapFrameColor", "minimapIndicatorColor", "minimapSelectedColor", "minimapSelectedColorOpacity", "minimapSelectedIndex", "preciseLabels", "refreshEndPoint", "refreshStartPoint", "selectColor", "selectedSeries", "start", "textColor", "timeLabels", "usePreciseLabels", "useResetSlot", "valueEnd", "valueStart", "verticalHandles"])) : m("", !0),
|
|
1235
|
+
p("div", {
|
|
1236
|
+
ref_key: "chartLegend",
|
|
1237
|
+
ref: Ne
|
|
1238
|
+
}, [
|
|
1239
|
+
w(t.$slots, "legend", { legend: $.value }, void 0, !0)
|
|
1240
|
+
], 512),
|
|
1241
|
+
t.$slots.source ? (s(), u("div", {
|
|
1242
|
+
key: 6,
|
|
1243
|
+
ref_key: "source",
|
|
1244
|
+
ref: Ee,
|
|
1245
|
+
dir: "auto"
|
|
1246
|
+
}, [
|
|
1247
|
+
w(t.$slots, "source", {}, void 0, !0)
|
|
1248
|
+
], 512)) : m("", !0),
|
|
1249
|
+
Oe(h(Rt), {
|
|
1250
|
+
show: z.value.showTooltip && ge.value,
|
|
1251
|
+
backgroundColor: e.value.style.tooltip.backgroundColor,
|
|
1252
|
+
color: e.value.style.tooltip.color,
|
|
1253
|
+
borderRadius: e.value.style.tooltip.borderRadius,
|
|
1254
|
+
borderColor: e.value.style.tooltip.borderColor,
|
|
1255
|
+
borderWidth: e.value.style.tooltip.borderWidth,
|
|
1256
|
+
fontSize: e.value.style.tooltip.fontSize,
|
|
1257
|
+
backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
|
|
1258
|
+
position: e.value.style.tooltip.position,
|
|
1259
|
+
offsetY: e.value.style.tooltip.offsetY,
|
|
1260
|
+
parent: O.value,
|
|
1261
|
+
content: xe.value,
|
|
1262
|
+
isFullscreen: X.value,
|
|
1263
|
+
isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function",
|
|
1264
|
+
smooth: e.value.style.tooltip.smooth,
|
|
1265
|
+
backdropFilter: e.value.style.tooltip.backdropFilter,
|
|
1266
|
+
smoothForce: e.value.style.tooltip.smoothForce,
|
|
1267
|
+
smoothSnapThreshold: e.value.style.tooltip.smoothSnapThreshold
|
|
1268
|
+
}, {
|
|
1269
|
+
"tooltip-before": k(() => [
|
|
1270
|
+
w(t.$slots, "tooltip-before", G(j({ ...Le.value })), void 0, !0)
|
|
1271
|
+
]),
|
|
1272
|
+
"tooltip-after": k(() => [
|
|
1273
|
+
w(t.$slots, "tooltip-after", G(j({ ...Le.value })), void 0, !0)
|
|
1274
|
+
]),
|
|
1275
|
+
_: 3
|
|
1276
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
|
|
1277
|
+
pe.value && e.value.userOptions.buttons.table ? (s(), H(_l(le.value.component), wt({ key: 7 }, le.value.props, {
|
|
1278
|
+
ref_key: "tableUnit",
|
|
1279
|
+
ref: Z,
|
|
1280
|
+
onClose: ht
|
|
1281
|
+
}), kt({
|
|
1282
|
+
content: k(() => [
|
|
1283
|
+
(s(), H(h(Ot), {
|
|
1284
|
+
key: `table_${Ue.value}`,
|
|
1285
|
+
colNames: ce.value.colNames,
|
|
1286
|
+
head: ce.value.head,
|
|
1287
|
+
body: ce.value.body,
|
|
1288
|
+
config: ce.value.config,
|
|
1289
|
+
title: e.value.table.useDialog ? "" : le.value.title,
|
|
1290
|
+
withCloseButton: !e.value.table.useDialog,
|
|
1291
|
+
onClose: ht
|
|
1292
|
+
}, {
|
|
1293
|
+
th: k(({ th: l }) => [
|
|
1294
|
+
At(ue(l), 1)
|
|
1295
|
+
]),
|
|
1296
|
+
td: k(({ td: l }) => [
|
|
1297
|
+
p("div", { innerHTML: l }, null, 8, Da)
|
|
1298
|
+
]),
|
|
1299
|
+
_: 1
|
|
1300
|
+
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
|
|
1301
|
+
]),
|
|
1302
|
+
_: 2
|
|
1303
|
+
}, [
|
|
1304
|
+
e.value.table.useDialog ? {
|
|
1305
|
+
name: "title",
|
|
1306
|
+
fn: k(() => [
|
|
1307
|
+
At(ue(le.value.title), 1)
|
|
1308
|
+
]),
|
|
1309
|
+
key: "0"
|
|
1310
|
+
} : void 0,
|
|
1311
|
+
e.value.table.useDialog ? {
|
|
1312
|
+
name: "actions",
|
|
1313
|
+
fn: k(() => [
|
|
1314
|
+
p("button", {
|
|
1315
|
+
tabindex: "0",
|
|
1316
|
+
class: "vue-ui-user-options-button",
|
|
1317
|
+
onClick: a[2] || (a[2] = (l) => Te(e.value.userOptions.callbacks.csv))
|
|
1318
|
+
}, [
|
|
1319
|
+
Oe(h(It), {
|
|
1320
|
+
name: "excel",
|
|
1321
|
+
stroke: le.value.props.color
|
|
1322
|
+
}, null, 8, ["stroke"])
|
|
1323
|
+
])
|
|
1324
|
+
]),
|
|
1325
|
+
key: "1"
|
|
1326
|
+
} : void 0
|
|
1327
|
+
]), 1040)) : m("", !0),
|
|
1328
|
+
h(D) ? (s(), H(Vl, { key: 8 })) : m("", !0)
|
|
1329
|
+
], 46, Zl));
|
|
1330
|
+
}
|
|
1331
|
+
}, eo = /* @__PURE__ */ Kl(Pa, [["__scopeId", "data-v-4f042a77"]]);
|
|
1332
|
+
export {
|
|
1333
|
+
eo as default
|
|
1334
|
+
};
|