vue-data-ui 3.25.13 → 3.26.0
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/README.md +53 -53
- package/dist/{Arrow-BhZDUeMp.js → Arrow-Bt3aGRMb.js} +1 -1
- package/dist/{BaseDraggableDialog-Ck6R5Q0K.js → BaseDraggableDialog-C1Slb3Yh.js} +2 -2
- package/dist/{BaseIcon-Dlz7gfx0.js → BaseIcon-BV75ei8X.js} +1 -1
- package/dist/{BaseLegendToggle-DGG65LAR.js → BaseLegendToggle-DtS_Oj3B.js} +1 -1
- package/dist/{BaseZoomControls-BK0PxEa8.js → BaseZoomControls-DIhoeyZu.js} +2 -2
- package/dist/{ColorPicker-DMTwxvi_.js → ColorPicker--Y89hTnE.js} +2 -2
- package/dist/{DataTable-BD1eZ0zB.js → DataTable-DX5fToAo.js} +2 -2
- package/dist/{HillActions-CiP2m7Nz.js → HillActions-D6weVdns.js} +1 -1
- package/dist/{Legend-C0Ln0VNe.js → Legend-Dv90gh-6.js} +2 -2
- package/dist/{NonSvgPenAndPaper-BjrMLISf.js → NonSvgPenAndPaper-D2BM5C1-.js} +3 -3
- package/dist/{PackageVersion-D5QkTJQU.js → PackageVersion-DhXk363L.js} +1 -1
- package/dist/{PenAndPaper-XdUD8uB3.js → PenAndPaper-DkQ4sEhs.js} +3 -3
- package/dist/{Shape-VCdxvFV9.js → Shape-B_kDj1gF.js} +1 -1
- package/dist/SlicerPreview-BgyIezm0.js +1730 -0
- package/dist/{SparkTooltip-B1gRxPfb.js → SparkTooltip-BNpyQ021.js} +1 -1
- package/dist/{Title-DeqmC-vN.js → Title-C2JKI5td.js} +1 -1
- package/dist/{Tooltip-DZ4a3XJQ.js → Tooltip-2NAb_Rrx.js} +1 -1
- package/dist/{UserOptions-wFD9vo9g.js → UserOptions-Dgn3StKw.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-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-hill.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-label.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/{dom-to-png-DdqmzDdY.js → dom-to-png-DKdtTkNC.js} +1 -1
- package/dist/{exposedLib-BBtjpydc.js → exposedLib-DN6QRAx2.js} +1 -1
- package/dist/{img-W50sC9SC.js → img-CaIaBHA0.js} +1 -1
- package/dist/{labelUtils-Dvm-7rse.js → labelUtils-CD5XzcAo.js} +1 -1
- package/dist/{lib-DOpaUOQx.js → lib-CklJ7rIN.js} +29 -18
- package/dist/{package-Cmcke8zR.js → package-BVRea5S_.js} +1 -1
- package/dist/{pdf-zGbDDpCi.js → pdf-6hacmnKW.js} +1 -1
- package/dist/{render-common-CG1wuHZY.js → render-common-ChwuwzU3.js} +2 -2
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +110 -5
- package/dist/types/vue-ui-candlestick.d.ts +4 -0
- package/dist/types/vue-ui-donut-evolution.d.ts +4 -0
- package/dist/types/vue-ui-quick-chart.d.ts +4 -0
- package/dist/types/vue-ui-sparkline.d.ts +5 -1
- package/dist/types/vue-ui-stackbar.d.ts +4 -0
- package/dist/types/vue-ui-stackline.d.ts +4 -0
- package/dist/types/vue-ui-xy-canvas.d.ts +2 -0
- package/dist/types/vue-ui-xy.d.ts +2 -0
- package/dist/{useConfig-C2uy4ltq.js → useConfig-DObkR9Aa.js} +49 -4
- package/dist/{useNestedProp-Bux0f4iY.js → useNestedProp-Tc9i6ZcN.js} +1 -1
- package/dist/{useObjectBindings-CEuNiBIT.js → useObjectBindings-CPmyIJxB.js} +9 -9
- package/dist/{usePrinter-BBBooAGP.js → usePrinter-Dp3X1vqr.js} +2 -2
- package/dist/utils.js +3 -3
- package/dist/vue-data-ui-Dr0uoRD_.js +191 -0
- package/dist/vue-data-ui.js +74 -74
- package/dist/{vue-ui-3d-bar-Ckauu3d4.js → vue-ui-3d-bar-BvJwq13N.js} +7 -7
- package/dist/{vue-ui-accordion-yHZMJLaY.js → vue-ui-accordion-15kKhkup.js} +4 -4
- package/dist/{vue-ui-age-pyramid-BczIt1-U.js → vue-ui-age-pyramid-CVzina7X.js} +7 -7
- package/dist/{vue-ui-annotator-BGB6K6u0.js → vue-ui-annotator-J4Wo2_DR.js} +7 -7
- package/dist/{vue-ui-bullet-BoTsLccZ.js → vue-ui-bullet-CuI5_uF1.js} +8 -8
- package/dist/{vue-ui-bump-B5ztSSQO.js → vue-ui-bump-GGNG4vwu.js} +7 -7
- package/dist/vue-ui-candlestick-Ca9dvzvk.js +2144 -0
- package/dist/{vue-ui-carousel-table-D-3KSWok.js → vue-ui-carousel-table-DOxh9sEm.js} +5 -5
- package/dist/{vue-ui-chestnut-W2l-W0_e.js → vue-ui-chestnut-DQhC_gB8.js} +6 -6
- package/dist/{vue-ui-chord-BFPQsMj8.js → vue-ui-chord-Blnvne2p.js} +9 -9
- package/dist/{vue-ui-circle-pack-BtPc1BR3.js → vue-ui-circle-pack-mNHA1U8B.js} +7 -7
- package/dist/{vue-ui-cursor-CpNOiwkt.js → vue-ui-cursor-D2hgivhn.js} +4 -4
- package/dist/{vue-ui-dag-i-zPwLcN.js → vue-ui-dag-DDSyO2ts.js} +8 -8
- package/dist/{vue-ui-dashboard-DtaW9a2P.js → vue-ui-dashboard-C9MnWAnE.js} +70 -70
- package/dist/{vue-ui-digits-BIlec9af.js → vue-ui-digits-h7H-yHd0.js} +4 -4
- package/dist/{vue-ui-donut-CJlBEyxu.js → vue-ui-donut-D-8OekQ5.js} +3 -3
- package/dist/vue-ui-donut-evolution-CJ6tIbgl.js +1869 -0
- package/dist/{vue-ui-donut-Bgf-n95J.js → vue-ui-donut-oY4iu5pY.js} +11 -11
- package/dist/{vue-ui-dumbbell-C112YLkC.js → vue-ui-dumbbell-52gWeLGK.js} +8 -8
- package/dist/{vue-ui-flow-j4bDg9Zd.js → vue-ui-flow-edMUCkcr.js} +8 -8
- package/dist/{vue-ui-funnel-CVHpfBCW.js → vue-ui-funnel-B08mSlHH.js} +7 -7
- package/dist/{vue-ui-galaxy-ChGpUWh8.js → vue-ui-galaxy-CV59UO9t.js} +10 -10
- package/dist/{vue-ui-gauge-Cp00vXfG.js → vue-ui-gauge-BnBzapom.js} +7 -7
- package/dist/{vue-ui-geo-B4hDk5NO.js → vue-ui-geo-BCmDw5me.js} +8 -8
- package/dist/{vue-ui-gizmo-D6nCCsS4.js → vue-ui-gizmo-BZBV8haQ.js} +4 -4
- package/dist/{vue-ui-heatmap-scVJc1cw.js → vue-ui-heatmap-CjiffI23.js} +8 -8
- package/dist/{vue-ui-hill-DnYUHGAK.js → vue-ui-hill-D5WV6zro.js} +7 -7
- package/dist/{vue-ui-history-plot-C5qAMaaW.js → vue-ui-history-plot-Bd06L1Od.js} +9 -9
- package/dist/{vue-ui-horizontal-bar-nEG4uvpv.js → vue-ui-horizontal-bar-B5Yp6Uql.js} +11 -11
- package/dist/{vue-ui-kpi-DOxId6xg.js → vue-ui-kpi-CNreX8BM.js} +4 -4
- package/dist/{vue-ui-label-BDKY7BI7.js → vue-ui-label-BDP67zvQ.js} +4 -4
- package/dist/{vue-ui-mini-loader-BknVs9VJ.js → vue-ui-mini-loader-pzS7SsP4.js} +3 -3
- package/dist/{vue-ui-molecule-_x232mMu.js → vue-ui-molecule-DqeRhja8.js} +6 -6
- package/dist/{vue-ui-mood-radar-D-F4855V.js → vue-ui-mood-radar-Cgl_QD-j.js} +8 -8
- package/dist/{vue-ui-nested-donuts-0E5IllFW.js → vue-ui-nested-donuts-MDPBZLnW.js} +10 -10
- package/dist/{vue-ui-onion-Eip0S1H7.js → vue-ui-onion-kgZ3uV3c.js} +10 -10
- package/dist/{vue-ui-parallel-coordinate-plot-DO0sQdJw.js → vue-ui-parallel-coordinate-plot-CJbZCsPd.js} +10 -10
- package/dist/{vue-ui-quadrant-CA0ClWfL.js → vue-ui-quadrant-B9efnVWT.js} +10 -10
- package/dist/{vue-ui-quick-chart-D-VuAoll.js → vue-ui-quick-chart-hNOMlqTI.js} +1053 -681
- package/dist/{vue-ui-radar-BTD7Y0Ps.js → vue-ui-radar-DJO16PTU.js} +9 -9
- package/dist/{vue-ui-rating-C_Qj6gnP.js → vue-ui-rating-BYLWm5aG.js} +3 -3
- package/dist/{vue-ui-relation-circle-CcxLBVFV.js → vue-ui-relation-circle-DVF3RlHU.js} +7 -7
- package/dist/{vue-ui-ridgeline-BZrzbbhb.js → vue-ui-ridgeline-DvgIu54T.js} +10 -10
- package/dist/{vue-ui-rings-CO48GOP2.js → vue-ui-rings-DVU7F6bL.js} +11 -11
- package/dist/{vue-ui-scatter-DrxUgZbQ.js → vue-ui-scatter-BtlRfhTt.js} +10 -10
- package/dist/{vue-ui-skeleton-CeKjW4MX.js → vue-ui-skeleton-DcMhyC4L.js} +4 -4
- package/dist/{vue-ui-smiley-BvRwx69s.js → vue-ui-smiley-qHvZQJcB.js} +3 -3
- package/dist/{vue-ui-spark-trend-DnujGRyt.js → vue-ui-spark-trend-BuHZP190.js} +4 -4
- package/dist/{vue-ui-sparkbar-Cd_uhYGD.js → vue-ui-sparkbar-MH9VeqdO.js} +4 -4
- package/dist/{vue-ui-sparkgauge-hT31YEtt.js → vue-ui-sparkgauge-Bg_IFD0m.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-PKlTYhKA.js → vue-ui-sparkhistogram-DZu07vIL.js} +5 -5
- package/dist/vue-ui-sparkline-LwEiJPe6.js +2067 -0
- package/dist/{vue-ui-sparkstackbar-R0ij2vi1.js → vue-ui-sparkstackbar-hbIoybeq.js} +5 -5
- package/dist/vue-ui-stackbar-CaxNkWPz.js +2660 -0
- package/dist/vue-ui-stackline-BJqnZXeR.js +2829 -0
- package/dist/{vue-ui-strip-plot-DR3N56rS.js → vue-ui-strip-plot-BWK3JQr6.js} +8 -8
- package/dist/{vue-ui-table-Bg6BeLrf.js → vue-ui-table-CRWoH6dc.js} +6 -6
- package/dist/{vue-ui-table-heatmap-C1b1Pcp8.js → vue-ui-table-heatmap-Bu9RiTU0.js} +6 -6
- package/dist/{vue-ui-table-sparkline-CkVXyequ.js → vue-ui-table-sparkline-CTA_6-gu.js} +5 -5
- package/dist/{vue-ui-thermometer-CqkaMF7Z.js → vue-ui-thermometer-Y5CnROrM.js} +7 -7
- package/dist/{vue-ui-timer-CgJvNwBv.js → vue-ui-timer-BYEpxxDX.js} +6 -6
- package/dist/{vue-ui-tiremarks-B078YJ9M.js → vue-ui-tiremarks-DBndWNiA.js} +7 -7
- package/dist/{vue-ui-treemap-Cfjf8mDl.js → vue-ui-treemap-Cw8a0oFl.js} +10 -10
- package/dist/{vue-ui-waffle-BZIcPa0l.js → vue-ui-waffle-BvfD05mS.js} +11 -11
- package/dist/{vue-ui-wheel-CPTm8AHn.js → vue-ui-wheel-D6NsnLRc.js} +7 -7
- package/dist/{vue-ui-word-cloud-DnGblUwj.js → vue-ui-word-cloud-YrgMp1Fo.js} +8 -8
- package/dist/{vue-ui-world-KkcpeKqp.js → vue-ui-world-BMcqvuJH.js} +8 -8
- package/dist/{vue-ui-xy-ClCV7xA5.js → vue-ui-xy-B6wckF4S.js} +4 -4
- package/dist/vue-ui-xy-Bv7fhRbS.js +5769 -0
- package/dist/{vue-ui-xy-canvas-BlpCbXKR.js → vue-ui-xy-canvas-NzaEYHDR.js} +875 -560
- package/dist/{vue_ui_candlestick-J8jmJvxP.js → vue_ui_candlestick-BXSQY82k.js} +96 -9
- package/dist/{vue_ui_donut_evolution-D1yAAIHr.js → vue_ui_donut_evolution-C6951a2f.js} +35 -7
- package/dist/{vue_ui_quick_chart-mZBdml3Z.js → vue_ui_quick_chart-DByCqSYE.js} +45 -4
- package/dist/{vue_ui_sparkline-auZhap6Y.js → vue_ui_sparkline-b9pEUyGF.js} +33 -1
- package/dist/{vue_ui_stackbar-COOrQQdK.js → vue_ui_stackbar-DdjDL6aq.js} +88 -9
- package/dist/{vue_ui_stackline-DQqKPA9z.js → vue_ui_stackline-Bh0RuInt.js} +88 -9
- package/dist/{vue_ui_xy-BA3-_LCx.js → vue_ui_xy-CcJADijP.js} +78 -9
- package/dist/{vue_ui_xy_canvas-Cb6dg3eK.js → vue_ui_xy_canvas-DrNSzYWq.js} +88 -9
- package/package.json +1 -1
- package/dist/SlicerPreview-BJ4usfYd.js +0 -1708
- package/dist/vue-data-ui-BVzA0tEV.js +0 -280
- package/dist/vue-ui-candlestick-BJtdA4Yu.js +0 -1871
- package/dist/vue-ui-donut-evolution-C0BKntfL.js +0 -1552
- package/dist/vue-ui-sparkline-BSu1uRvP.js +0 -1610
- package/dist/vue-ui-stackbar-BrzzkGFk.js +0 -2369
- package/dist/vue-ui-stackline-zEX3gR3y.js +0 -2483
- package/dist/vue-ui-xy-C6lVqZnx.js +0 -5367
|
@@ -0,0 +1,2144 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { $ as t, Ct as n, D as r, Et as i, Jt as a, Rt as o, X as s, _ as c, at as l, b as u, c as ee, en as te, et as ne, ft as re, gt as ie, ht as ae, nt as oe, qt as se, t as ce, tn as le } from "./lib-CklJ7rIN.js";
|
|
3
|
+
import { n as ue, t as de } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { n as fe, r as pe, t as me } from "./useTimeLabels-d2f-W1L4.js";
|
|
5
|
+
import { t as he } from "./useConfig-DObkR9Aa.js";
|
|
6
|
+
import { t as ge } from "./usePrinter-Dp3X1vqr.js";
|
|
7
|
+
import { n as _e, t as ve } from "./BaseScanner-Dzc8VT3j.js";
|
|
8
|
+
import { t as ye } from "./useNestedProp-Tc9i6ZcN.js";
|
|
9
|
+
import { t as be } from "./useThemeCheck-C43Tcqmk.js";
|
|
10
|
+
import { t as xe } from "./useChartExport-iwOqiIWX.js";
|
|
11
|
+
import { t as Se } from "./useTransitions-g_zBREk2.js";
|
|
12
|
+
import { t as Ce } from "./useTimeLabelCollider-AEcY4Ioe.js";
|
|
13
|
+
import { t as we } from "./img-CaIaBHA0.js";
|
|
14
|
+
import { n as Te } from "./Title-C2JKI5td.js";
|
|
15
|
+
import { t as Ee } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
16
|
+
import { l as De, t as Oe } from "./useResponsive-ZtArZtUf.js";
|
|
17
|
+
import { t as ke } from "./DefGrad-DVBqDjhO.js";
|
|
18
|
+
import { t as Ae } from "./SlicerPreview-BgyIezm0.js";
|
|
19
|
+
import { t as je } from "./A11yDataTable-DdRsVULz.js";
|
|
20
|
+
import { t as Me } from "./useUserOptionState-DK-_1ddE.js";
|
|
21
|
+
import { t as Ne } from "./useChartAccessibility-DYqac8yF.js";
|
|
22
|
+
import { t as Pe } from "./vue_ui_candlestick-BXSQY82k.js";
|
|
23
|
+
import { Fragment as d, computed as f, createBlock as Fe, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createSlots as Ie, createTextVNode as Le, createVNode as Re, defineAsyncComponent as ze, guardReactiveProps as g, mergeProps as Be, nextTick as Ve, normalizeClass as _, normalizeProps as v, normalizeStyle as He, onBeforeUnmount as Ue, onMounted as We, openBlock as y, ref as b, renderList as x, renderSlot as S, resolveDynamicComponent as Ge, shallowRef as Ke, toDisplayString as qe, toRefs as Je, unref as C, watch as Ye, watchEffect as Xe, withCtx as w } from "vue";
|
|
24
|
+
//#region src/components/vue-ui-candlestick.vue
|
|
25
|
+
var Ze = /* @__PURE__ */ e({ default: () => Mt }), Qe = ["id"], $e = ["id"], et = { style: { position: "relative" } }, tt = [
|
|
26
|
+
"xmlns",
|
|
27
|
+
"aria-describedby",
|
|
28
|
+
"viewBox"
|
|
29
|
+
], nt = [
|
|
30
|
+
"x",
|
|
31
|
+
"y",
|
|
32
|
+
"width",
|
|
33
|
+
"height"
|
|
34
|
+
], rt = { key: 1 }, it = { key: 0 }, at = [
|
|
35
|
+
"x1",
|
|
36
|
+
"x2",
|
|
37
|
+
"y1",
|
|
38
|
+
"y2",
|
|
39
|
+
"stroke",
|
|
40
|
+
"stroke-width"
|
|
41
|
+
], ot = [
|
|
42
|
+
"x1",
|
|
43
|
+
"x2",
|
|
44
|
+
"y1",
|
|
45
|
+
"y2",
|
|
46
|
+
"stroke",
|
|
47
|
+
"stroke-width"
|
|
48
|
+
], st = [
|
|
49
|
+
"x1",
|
|
50
|
+
"x2",
|
|
51
|
+
"y1",
|
|
52
|
+
"y2",
|
|
53
|
+
"stroke",
|
|
54
|
+
"stroke-width",
|
|
55
|
+
"stroke-dasharray"
|
|
56
|
+
], ct = [
|
|
57
|
+
"x1",
|
|
58
|
+
"x2",
|
|
59
|
+
"y1",
|
|
60
|
+
"y2",
|
|
61
|
+
"stroke",
|
|
62
|
+
"stroke-width",
|
|
63
|
+
"stroke-dasharray"
|
|
64
|
+
], lt = [
|
|
65
|
+
"x1",
|
|
66
|
+
"x2",
|
|
67
|
+
"y1",
|
|
68
|
+
"y2",
|
|
69
|
+
"stroke",
|
|
70
|
+
"stroke-width"
|
|
71
|
+
], ut = [
|
|
72
|
+
"x1",
|
|
73
|
+
"x2",
|
|
74
|
+
"y1",
|
|
75
|
+
"y2",
|
|
76
|
+
"stroke",
|
|
77
|
+
"stroke-width"
|
|
78
|
+
], dt = [
|
|
79
|
+
"transform",
|
|
80
|
+
"text-anchor",
|
|
81
|
+
"font-size",
|
|
82
|
+
"fill",
|
|
83
|
+
"font-weight"
|
|
84
|
+
], ft = [
|
|
85
|
+
"transform",
|
|
86
|
+
"text-anchor",
|
|
87
|
+
"font-size",
|
|
88
|
+
"fill",
|
|
89
|
+
"font-weight"
|
|
90
|
+
], pt = [
|
|
91
|
+
"transform",
|
|
92
|
+
"text-anchor",
|
|
93
|
+
"font-size",
|
|
94
|
+
"fill",
|
|
95
|
+
"stroke",
|
|
96
|
+
"font-weight"
|
|
97
|
+
], mt = [
|
|
98
|
+
"x",
|
|
99
|
+
"y",
|
|
100
|
+
"width",
|
|
101
|
+
"height",
|
|
102
|
+
"fill",
|
|
103
|
+
"rx"
|
|
104
|
+
], ht = { key: 0 }, gt = [
|
|
105
|
+
"cx",
|
|
106
|
+
"cy",
|
|
107
|
+
"r",
|
|
108
|
+
"fill"
|
|
109
|
+
], _t = [
|
|
110
|
+
"cx",
|
|
111
|
+
"cy",
|
|
112
|
+
"r",
|
|
113
|
+
"fill"
|
|
114
|
+
], vt = { key: 1 }, yt = [
|
|
115
|
+
"x",
|
|
116
|
+
"y",
|
|
117
|
+
"width",
|
|
118
|
+
"height",
|
|
119
|
+
"rx",
|
|
120
|
+
"fill"
|
|
121
|
+
], bt = [
|
|
122
|
+
"x",
|
|
123
|
+
"y",
|
|
124
|
+
"width",
|
|
125
|
+
"height",
|
|
126
|
+
"fill",
|
|
127
|
+
"rx"
|
|
128
|
+
], xt = [
|
|
129
|
+
"x",
|
|
130
|
+
"y",
|
|
131
|
+
"height",
|
|
132
|
+
"width",
|
|
133
|
+
"fill",
|
|
134
|
+
"rx"
|
|
135
|
+
], St = [
|
|
136
|
+
"x",
|
|
137
|
+
"y",
|
|
138
|
+
"height",
|
|
139
|
+
"width",
|
|
140
|
+
"fill",
|
|
141
|
+
"rx",
|
|
142
|
+
"stroke",
|
|
143
|
+
"stroke-width"
|
|
144
|
+
], Ct = ["d", "stroke"], wt = [
|
|
145
|
+
"x",
|
|
146
|
+
"y",
|
|
147
|
+
"height",
|
|
148
|
+
"width",
|
|
149
|
+
"fill",
|
|
150
|
+
"onMouseover",
|
|
151
|
+
"onMouseleave",
|
|
152
|
+
"onClick"
|
|
153
|
+
], Tt = [
|
|
154
|
+
"x",
|
|
155
|
+
"y",
|
|
156
|
+
"width",
|
|
157
|
+
"height",
|
|
158
|
+
"fill",
|
|
159
|
+
"fill-opacity",
|
|
160
|
+
"stroke",
|
|
161
|
+
"stroke-opacity",
|
|
162
|
+
"stroke-width",
|
|
163
|
+
"stroke-dasharray"
|
|
164
|
+
], Et = ["data-start", "data-end"], Dt = {
|
|
165
|
+
key: 0,
|
|
166
|
+
style: {
|
|
167
|
+
position: "absolute",
|
|
168
|
+
top: "100%",
|
|
169
|
+
left: "0",
|
|
170
|
+
width: "100%"
|
|
171
|
+
},
|
|
172
|
+
"data-dom-to-png-ignore": "",
|
|
173
|
+
"aria-hidden": "true"
|
|
174
|
+
}, Ot = {
|
|
175
|
+
key: 5,
|
|
176
|
+
class: "vue-data-ui-watermark"
|
|
177
|
+
}, kt = ["d", "stroke"], At = [
|
|
178
|
+
"d",
|
|
179
|
+
"stroke",
|
|
180
|
+
"stroke-width"
|
|
181
|
+
], jt = ["innerHTML"], Mt = /*#__PURE__*/ Ee({
|
|
182
|
+
__name: "vue-ui-candlestick",
|
|
183
|
+
props: {
|
|
184
|
+
config: {
|
|
185
|
+
type: Object,
|
|
186
|
+
default() {
|
|
187
|
+
return {};
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
dataset: {
|
|
191
|
+
type: Array,
|
|
192
|
+
default() {
|
|
193
|
+
return [];
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
selectedXIndex: {
|
|
197
|
+
type: Number,
|
|
198
|
+
default: void 0
|
|
199
|
+
},
|
|
200
|
+
zoomState: {
|
|
201
|
+
type: Object,
|
|
202
|
+
default: null
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
emits: [
|
|
206
|
+
"selectX",
|
|
207
|
+
"zoomStart",
|
|
208
|
+
"zoomEnd",
|
|
209
|
+
"zoomReset",
|
|
210
|
+
"update:zoomState",
|
|
211
|
+
"copyAlt"
|
|
212
|
+
],
|
|
213
|
+
setup(e, { expose: Ee, emit: Ze }) {
|
|
214
|
+
let Mt = ze(() => import("./BaseIcon-BV75ei8X.js").then((e) => e.n)), Nt = ze(() => import("./Tooltip-2NAb_Rrx.js")), Pt = ze(() => import("./vue-ui-accordion-15kKhkup.js").then((e) => e.n)), Ft = ze(() => import("./DataTable-DX5fToAo.js")), It = ze(() => import("./PenAndPaper-DkQ4sEhs.js").then((e) => e.t)), Lt = ze(() => import("./UserOptions-Dgn3StKw.js").then((e) => e.n)), Rt = ze(() => import("./PackageVersion-DhXk363L.js").then((e) => e.t)), zt = ze(() => import("./BaseDraggableDialog-C1Slb3Yh.js").then((e) => e.n)), { vue_ui_candlestick: Bt } = he(), { isThemeValid: Vt, warnInvalidTheme: Ht } = be(), T = e, E = Ze, Ut = f(() => !!T.dataset && T.dataset.length), D = b(!1), Wt = b(null), O = b(s()), Gt = b(!1), Kt = b(""), k = b(void 0), qt = b(0), A = b(null), Jt = b(null), Yt = b(null), Xt = b(null), Zt = b(null), Qt = b(null), $t = b(0), en = b(0), tn = b(0), nn = b(null), rn = b(null), an = b(null), on = b(null), sn = b(null), j = b(null), cn = b({
|
|
215
|
+
x: 0,
|
|
216
|
+
y: 0
|
|
217
|
+
}), ln = b("pointer"), un = b(!1), M = b(bn()), N = f(() => M.value.style.layout.candle), P = f(() => M.value.style.layout.grid), F = f(() => M.value.style.layout), I = f(() => M.value.style), L = f(() => M.value.userOptions);
|
|
218
|
+
ue({
|
|
219
|
+
config: () => M.value,
|
|
220
|
+
dataset: () => T.dataset,
|
|
221
|
+
component: "VueUiCandlestick",
|
|
222
|
+
rules: [de.emptyArray, {
|
|
223
|
+
test: (e) => e.length > 200,
|
|
224
|
+
message: [
|
|
225
|
+
"👀 Dataset has > 200 points, which can cause performance issues. Consider:",
|
|
226
|
+
"",
|
|
227
|
+
"▶️ Adding date inputs to constraint the dataset into a specific timeframe",
|
|
228
|
+
"",
|
|
229
|
+
"▶️ Aggregate the data to larger time series to reduce the number of datapoints."
|
|
230
|
+
]
|
|
231
|
+
}]
|
|
232
|
+
});
|
|
233
|
+
let { transitionEnabled: dn } = Se({
|
|
234
|
+
config: () => M.value.transitions,
|
|
235
|
+
dataset: () => T.dataset
|
|
236
|
+
}), fn = f(() => M.value.userOptions.useCursorPointer), pn = f(() => le({
|
|
237
|
+
defaultConfig: {
|
|
238
|
+
useCssAnimation: !1,
|
|
239
|
+
userOptions: { show: !1 },
|
|
240
|
+
table: { show: !1 },
|
|
241
|
+
style: {
|
|
242
|
+
backgroundColor: "#99999930",
|
|
243
|
+
layout: {
|
|
244
|
+
candle: { colors: {
|
|
245
|
+
bearish: "#BABABA",
|
|
246
|
+
bullish: "#CACACA"
|
|
247
|
+
} },
|
|
248
|
+
grid: {
|
|
249
|
+
stroke: "#6A6A6A",
|
|
250
|
+
verticalLines: { stroke: "#6A6A6A" },
|
|
251
|
+
horizontalLines: { stroke: "#6A6A6A" },
|
|
252
|
+
yAxis: {
|
|
253
|
+
dataLabels: { show: !1 },
|
|
254
|
+
scale: {
|
|
255
|
+
min: null,
|
|
256
|
+
max: null
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
wick: {
|
|
261
|
+
stroke: "#6A6A6A",
|
|
262
|
+
extremity: { color: "#6A6A6A" }
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
tooltip: { show: !1 },
|
|
266
|
+
zoom: {
|
|
267
|
+
show: !1,
|
|
268
|
+
startIndex: null,
|
|
269
|
+
endIndex: null
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
userConfig: M.value.skeletonConfig ?? {}
|
|
274
|
+
})), { loading: R, FINAL_DATASET: z, manualLoading: mn } = _e({
|
|
275
|
+
...Je(T),
|
|
276
|
+
FINAL_CONFIG: M,
|
|
277
|
+
prepareConfig: bn,
|
|
278
|
+
callback: () => {
|
|
279
|
+
Promise.resolve().then(async () => {
|
|
280
|
+
await Nr();
|
|
281
|
+
});
|
|
282
|
+
},
|
|
283
|
+
skeletonDataset: T.config?.skeletonDataset ?? [
|
|
284
|
+
[
|
|
285
|
+
17040672e5,
|
|
286
|
+
10,
|
|
287
|
+
20,
|
|
288
|
+
2,
|
|
289
|
+
10,
|
|
290
|
+
30
|
|
291
|
+
],
|
|
292
|
+
[
|
|
293
|
+
17067456e5,
|
|
294
|
+
10,
|
|
295
|
+
30,
|
|
296
|
+
5,
|
|
297
|
+
20,
|
|
298
|
+
50
|
|
299
|
+
],
|
|
300
|
+
[
|
|
301
|
+
17092512e5,
|
|
302
|
+
20,
|
|
303
|
+
50,
|
|
304
|
+
10,
|
|
305
|
+
30,
|
|
306
|
+
80
|
|
307
|
+
],
|
|
308
|
+
[
|
|
309
|
+
17119296e5,
|
|
310
|
+
30,
|
|
311
|
+
80,
|
|
312
|
+
20,
|
|
313
|
+
50,
|
|
314
|
+
130
|
|
315
|
+
],
|
|
316
|
+
[
|
|
317
|
+
17145216e5,
|
|
318
|
+
50,
|
|
319
|
+
130,
|
|
320
|
+
30,
|
|
321
|
+
100,
|
|
322
|
+
210
|
|
323
|
+
],
|
|
324
|
+
[
|
|
325
|
+
17172e8,
|
|
326
|
+
80,
|
|
327
|
+
210,
|
|
328
|
+
50,
|
|
329
|
+
150,
|
|
330
|
+
340
|
|
331
|
+
],
|
|
332
|
+
[
|
|
333
|
+
1719792e6,
|
|
334
|
+
130,
|
|
335
|
+
340,
|
|
336
|
+
80,
|
|
337
|
+
280,
|
|
338
|
+
550
|
|
339
|
+
],
|
|
340
|
+
[
|
|
341
|
+
17224704e5,
|
|
342
|
+
210,
|
|
343
|
+
550,
|
|
344
|
+
130,
|
|
345
|
+
450,
|
|
346
|
+
890
|
|
347
|
+
],
|
|
348
|
+
[
|
|
349
|
+
17251488e5,
|
|
350
|
+
340,
|
|
351
|
+
890,
|
|
352
|
+
210,
|
|
353
|
+
750,
|
|
354
|
+
1440
|
|
355
|
+
],
|
|
356
|
+
[
|
|
357
|
+
17277408e5,
|
|
358
|
+
550,
|
|
359
|
+
1440,
|
|
360
|
+
340,
|
|
361
|
+
1230,
|
|
362
|
+
2330
|
|
363
|
+
],
|
|
364
|
+
[
|
|
365
|
+
17304192e5,
|
|
366
|
+
890,
|
|
367
|
+
2330,
|
|
368
|
+
550,
|
|
369
|
+
1950,
|
|
370
|
+
3770
|
|
371
|
+
],
|
|
372
|
+
[
|
|
373
|
+
17330112e5,
|
|
374
|
+
1440,
|
|
375
|
+
3770,
|
|
376
|
+
890,
|
|
377
|
+
3200,
|
|
378
|
+
5100
|
|
379
|
+
]
|
|
380
|
+
],
|
|
381
|
+
skeletonConfig: le({
|
|
382
|
+
defaultConfig: M.value,
|
|
383
|
+
userConfig: pn.value
|
|
384
|
+
})
|
|
385
|
+
}), { userOptionsVisible: hn, setUserOptionsVisibility: gn, keepUserOptionState: _n } = Me({ config: M.value }), { svgRef: B } = Ne({ config: I.value.title });
|
|
386
|
+
function vn() {
|
|
387
|
+
gn(!0);
|
|
388
|
+
}
|
|
389
|
+
function yn() {
|
|
390
|
+
gn(!1), E("selectX", {
|
|
391
|
+
seriesIndex: null,
|
|
392
|
+
datapoint: null
|
|
393
|
+
}), k.value = null;
|
|
394
|
+
}
|
|
395
|
+
function bn() {
|
|
396
|
+
let e = ye({
|
|
397
|
+
userConfig: T.config,
|
|
398
|
+
defaultConfig: Bt
|
|
399
|
+
}), t = {};
|
|
400
|
+
T.config && n(T.config, "style.layout.grid.xAxis.dataLabels.showFirstAndLast") && (e.style.layout.grid.xAxis.dataLabels.showFirstAndLast = !!T.config.style.layout.grid.xAxis.dataLabels.showFirstAndLast);
|
|
401
|
+
let r = e.theme;
|
|
402
|
+
if (r) {
|
|
403
|
+
if (!Vt.value(e)) Ht(e), t = e;
|
|
404
|
+
else {
|
|
405
|
+
let n = ye({
|
|
406
|
+
userConfig: Pe[r] || T.config,
|
|
407
|
+
defaultConfig: e
|
|
408
|
+
});
|
|
409
|
+
t = { ...ye({
|
|
410
|
+
userConfig: T.config,
|
|
411
|
+
defaultConfig: n
|
|
412
|
+
}) };
|
|
413
|
+
}
|
|
414
|
+
} else t = e;
|
|
415
|
+
return t;
|
|
416
|
+
}
|
|
417
|
+
function xn(e) {
|
|
418
|
+
let t = ne(e);
|
|
419
|
+
return t?.style && delete t.style.tooltip, JSON.stringify(t);
|
|
420
|
+
}
|
|
421
|
+
let Sn = xn(T.config);
|
|
422
|
+
Ye(() => T.config, (e, t) => {
|
|
423
|
+
let n = xn(e), r = n !== Sn;
|
|
424
|
+
Sn = n;
|
|
425
|
+
let i = bn();
|
|
426
|
+
if (!r) {
|
|
427
|
+
M.value.style.tooltip = i.style.tooltip, H.value.showTooltip = M.value.style.tooltip.show;
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
R.value || (M.value = bn()), hn.value = !M.value.userOptions.showOnChartHover, En(), $t.value += 1, tn.value += 1, en.value += 1, H.value.showTable = M.value.table.show, H.value.showTooltip = I.value.tooltip.show, er();
|
|
431
|
+
}, { deep: !0 }), Ye(() => T.dataset, (e) => {
|
|
432
|
+
Array.isArray(e) && e.length > 0 && (mn.value = !1), kr();
|
|
433
|
+
}, { deep: !0 });
|
|
434
|
+
let V = b({
|
|
435
|
+
height: I.value.height,
|
|
436
|
+
width: I.value.width,
|
|
437
|
+
xAxisFontSize: P.value.xAxis.dataLabels.fontSize,
|
|
438
|
+
yAxisFontSize: P.value.yAxis.dataLabels.fontSize
|
|
439
|
+
}), Cn = Ke(null), wn = Ke(null);
|
|
440
|
+
We(() => {
|
|
441
|
+
En();
|
|
442
|
+
});
|
|
443
|
+
let Tn = f(() => M.value.debug);
|
|
444
|
+
function En() {
|
|
445
|
+
if (o(T.dataset) && (l({
|
|
446
|
+
componentName: "VueUiCandlestick",
|
|
447
|
+
type: "dataset",
|
|
448
|
+
debug: Tn.value
|
|
449
|
+
}), mn.value = !0), o(T.dataset) || (mn.value = M.value.loading), setTimeout(() => {
|
|
450
|
+
D.value = !0;
|
|
451
|
+
}, 10), M.value.responsive) {
|
|
452
|
+
let e = De(() => {
|
|
453
|
+
D.value = !1;
|
|
454
|
+
let { width: e, height: t } = Oe({
|
|
455
|
+
chart: A.value,
|
|
456
|
+
title: I.value.title.text ? Jt.value : null,
|
|
457
|
+
slicer: I.value.zoom.show && W.value > 6 ? Xt.value.$el : null,
|
|
458
|
+
legend: Yt.value,
|
|
459
|
+
source: Zt.value,
|
|
460
|
+
noTitle: Qt.value
|
|
461
|
+
});
|
|
462
|
+
requestAnimationFrame(() => {
|
|
463
|
+
V.value.width = e, V.value.height = t - 12, M.value.responsiveProportionalSizing ? (V.value.xAxisFontSize = te({
|
|
464
|
+
relator: Math.min(e, t),
|
|
465
|
+
adjuster: I.value.width,
|
|
466
|
+
source: P.value.xAxis.dataLabels.fontSize,
|
|
467
|
+
threshold: 6,
|
|
468
|
+
fallback: 6
|
|
469
|
+
}), V.value.yAxisFontSize = te({
|
|
470
|
+
relator: Math.min(e, t),
|
|
471
|
+
adjuster: I.value.width,
|
|
472
|
+
source: P.value.yAxis.dataLabels.fontSize,
|
|
473
|
+
threshold: 6,
|
|
474
|
+
fallback: 6
|
|
475
|
+
})) : (V.value.xAxisFontSize = P.value.xAxis.dataLabels.fontSize, V.value.yAxisFontSize = P.value.yAxis.dataLabels.fontSize), Wt.value && clearTimeout(Wt.value), Wt.value = setTimeout(() => {
|
|
476
|
+
D.value = !0;
|
|
477
|
+
}, 10);
|
|
478
|
+
});
|
|
479
|
+
});
|
|
480
|
+
Cn.value && (wn.value && Cn.value.unobserve(wn.value), Cn.value.disconnect()), Cn.value = new ResizeObserver(e), wn.value = A.value.parentNode, Cn.value.observe(wn.value);
|
|
481
|
+
}
|
|
482
|
+
Nr();
|
|
483
|
+
}
|
|
484
|
+
Ue(() => {
|
|
485
|
+
Cn.value && (wn.value && Cn.value.unobserve(wn.value), Cn.value.disconnect());
|
|
486
|
+
});
|
|
487
|
+
let { isPrinting: Dn, isImaging: On, generatePdf: kn, generateImage: An } = ge({
|
|
488
|
+
elementId: `vue-ui-candlestick_${O.value}`,
|
|
489
|
+
fileName: I.value.title.text || "vue-ui-candlestick",
|
|
490
|
+
options: M.value.userOptions.print
|
|
491
|
+
}), jn = f(() => M.value.userOptions.show && !I.value.title.text), H = b({
|
|
492
|
+
showTable: M.value.table.show,
|
|
493
|
+
showTooltip: I.value.tooltip.show
|
|
494
|
+
}), Mn = b(0), Nn = De((e) => {
|
|
495
|
+
Mn.value = e;
|
|
496
|
+
}, 100);
|
|
497
|
+
Xe((e) => {
|
|
498
|
+
let t = rn.value;
|
|
499
|
+
if (!t) return;
|
|
500
|
+
let n = new ResizeObserver((e) => {
|
|
501
|
+
Nn(e[0].contentRect.height);
|
|
502
|
+
});
|
|
503
|
+
n.observe(t), e(() => n.disconnect());
|
|
504
|
+
}), Ue(() => {
|
|
505
|
+
Mn.value = 0;
|
|
506
|
+
});
|
|
507
|
+
let Pn = f(() => {
|
|
508
|
+
let e = 0;
|
|
509
|
+
return rn.value && (e = Mn.value + V.value.xAxisFontSize), e;
|
|
510
|
+
}), Fn = f(() => P.value.yAxis.position === "right");
|
|
511
|
+
function In() {
|
|
512
|
+
let e = P.value.yAxis.dataLabels.offsetX;
|
|
513
|
+
nn.value && (e = Array.from(nn.value.querySelectorAll("text")).reduce((e, t) => {
|
|
514
|
+
let n = t.getComputedTextLength();
|
|
515
|
+
return n > e ? n : e;
|
|
516
|
+
}, 0));
|
|
517
|
+
let t = P.value.yAxis.axisName?.show ? P.value.yAxis.axisName.fontSize + P.value.yAxis.axisName.offsetX : 0, n = e + 13 + t;
|
|
518
|
+
return {
|
|
519
|
+
left: Fn.value ? 0 : n,
|
|
520
|
+
right: Fn.value ? n : 0,
|
|
521
|
+
scaleLabelsWidth: e,
|
|
522
|
+
yAxisNameWidth: t,
|
|
523
|
+
crosshair: 13
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
let U = f(() => {
|
|
527
|
+
let { top: e, right: t, bottom: n, left: r } = F.value.padding, i = In();
|
|
528
|
+
return {
|
|
529
|
+
top: e + 12,
|
|
530
|
+
right: V.value.width - t - i.right,
|
|
531
|
+
left: r + i.left,
|
|
532
|
+
bottom: V.value.height - n - Pn.value,
|
|
533
|
+
width: V.value.width - r - t - i.left - i.right,
|
|
534
|
+
height: V.value.height - e - n - Pn.value - 12,
|
|
535
|
+
scaleLabelsWidth: i.scaleLabelsWidth,
|
|
536
|
+
yAxisNameWidth: i.yAxisNameWidth,
|
|
537
|
+
crosshair: i.crosshair
|
|
538
|
+
};
|
|
539
|
+
}), Ln = f(() => {
|
|
540
|
+
let { left: e, top: t, width: n, height: r } = U.value, i = G.value.start, a = G.value.end - i, o = n / a, s = K.value.start - i, c = K.value.end - i, l = Math.max(0, Math.min(a, s)), u = Math.max(0, Math.min(a, c));
|
|
541
|
+
return {
|
|
542
|
+
x: e + l * o,
|
|
543
|
+
y: t,
|
|
544
|
+
width: (u - l) * o,
|
|
545
|
+
height: r,
|
|
546
|
+
fill: I.value.zoom.preview.fill,
|
|
547
|
+
stroke: I.value.zoom.preview.stroke,
|
|
548
|
+
"stroke-width": I.value.zoom.preview.strokeWidth,
|
|
549
|
+
"stroke-dasharray": I.value.zoom.preview.strokeDasharray,
|
|
550
|
+
"stroke-linecap": "round",
|
|
551
|
+
"stroke-linejoin": "round",
|
|
552
|
+
style: {
|
|
553
|
+
pointerEvents: "none",
|
|
554
|
+
transition: "none !important",
|
|
555
|
+
animation: "none !important"
|
|
556
|
+
}
|
|
557
|
+
};
|
|
558
|
+
}), W = f(() => z.value.length), G = b({
|
|
559
|
+
start: 0,
|
|
560
|
+
end: W.value
|
|
561
|
+
}), K = b({
|
|
562
|
+
start: 0,
|
|
563
|
+
end: W.value
|
|
564
|
+
}), Rn = b(!1), zn = b(!1), Bn = b(null), q = b(null), J = b(null), Vn = b(!1), Hn = b({
|
|
565
|
+
time: 0,
|
|
566
|
+
x: 0,
|
|
567
|
+
y: 0,
|
|
568
|
+
pointerType: null
|
|
569
|
+
}), Un = f(() => I.value.zoom?.dragToZoom), Wn = f(() => Un.value.show && Ut.value && jr.value && W.value > 1 && !R.value), Gn = null, Kn = {}, qn = f(() => I.value.zoom.preview.enable && (K.value.start !== G.value.start || K.value.end !== G.value.end));
|
|
570
|
+
function Jn(e, t) {
|
|
571
|
+
K.value[e] = t;
|
|
572
|
+
}
|
|
573
|
+
function Yn(e, t = G.value) {
|
|
574
|
+
if (!e || typeof e != "object") return null;
|
|
575
|
+
let n = e.start !== void 0 && e.start !== null, r = e.end !== void 0 && e.end !== null;
|
|
576
|
+
if (!n && !r) return null;
|
|
577
|
+
let i = Number(n ? e.start : t.start), a = Number(r ? e.end : t.end);
|
|
578
|
+
return !Number.isFinite(i) || !Number.isFinite(a) ? null : {
|
|
579
|
+
start: i,
|
|
580
|
+
end: a
|
|
581
|
+
};
|
|
582
|
+
}
|
|
583
|
+
function Xn(e) {
|
|
584
|
+
let t = Yn(e);
|
|
585
|
+
t && E("update:zoomState", t);
|
|
586
|
+
}
|
|
587
|
+
function Zn() {
|
|
588
|
+
Gn &&= (cancelAnimationFrame(Gn), null), Kn = {};
|
|
589
|
+
}
|
|
590
|
+
function Qn(e) {
|
|
591
|
+
let t = Yn(e);
|
|
592
|
+
if (!t) return null;
|
|
593
|
+
let { start: n, end: r } = t;
|
|
594
|
+
return (n !== Number(G.value.start) || r !== Number(G.value.end)) && (Zn(), G.value = {
|
|
595
|
+
start: n,
|
|
596
|
+
end: r
|
|
597
|
+
}, K.value = {
|
|
598
|
+
start: n,
|
|
599
|
+
end: r
|
|
600
|
+
}, er()), {
|
|
601
|
+
start: Number(G.value.start),
|
|
602
|
+
end: Number(G.value.end)
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
function $n(e) {
|
|
606
|
+
let t = Qn(e);
|
|
607
|
+
return t ? (E("update:zoomState", t), t) : null;
|
|
608
|
+
}
|
|
609
|
+
function er() {
|
|
610
|
+
let e = Math.max(0, Math.min(G.value.start ?? 0, W.value - 1)), t = Math.max(e + 1, Math.min(G.value.end ?? W.value, W.value));
|
|
611
|
+
(!Number.isFinite(e) || !Number.isFinite(t) || t <= e) && (e = 0, t = W.value), G.value.start = e, G.value.end = t, K.value.start = e, K.value.end = t, Xt.value && Xt.value.setRangeValues(e, t);
|
|
612
|
+
}
|
|
613
|
+
let tr = f(() => z.value.map((e, t) => ({
|
|
614
|
+
...e,
|
|
615
|
+
absoluteIndex: t
|
|
616
|
+
}))), nr = f(() => tr.value.slice(G.value.start, G.value.end)), Y = f(() => (Tn.value && z.value.forEach((e, t) => {
|
|
617
|
+
[null, void 0].includes(e[0]) && l({
|
|
618
|
+
componentName: "VueUiCandlestick",
|
|
619
|
+
type: "datasetAttribute",
|
|
620
|
+
property: "period (index 0)",
|
|
621
|
+
index: t
|
|
622
|
+
}), [null, void 0].includes(e[1]) && l({
|
|
623
|
+
componentName: "VueUiCandlestick",
|
|
624
|
+
type: "datasetAttribute",
|
|
625
|
+
property: "open (index 1)",
|
|
626
|
+
index: t
|
|
627
|
+
}), [null, void 0].includes(e[2]) && l({
|
|
628
|
+
componentName: "VueUiCandlestick",
|
|
629
|
+
type: "datasetAttribute",
|
|
630
|
+
property: "high (index 2)",
|
|
631
|
+
index: t
|
|
632
|
+
}), [null, void 0].includes(e[3]) && l({
|
|
633
|
+
componentName: "VueUiCandlestick",
|
|
634
|
+
type: "datasetAttribute",
|
|
635
|
+
property: "low (index 3)",
|
|
636
|
+
index: t
|
|
637
|
+
}), [null, void 0].includes(e[4]) && l({
|
|
638
|
+
componentName: "VueUiCandlestick",
|
|
639
|
+
type: "datasetAttribute",
|
|
640
|
+
property: "close (index 4)",
|
|
641
|
+
index: t
|
|
642
|
+
}), [null, void 0].includes(e[5]) && l({
|
|
643
|
+
componentName: "VueUiCandlestick",
|
|
644
|
+
type: "datasetAttribute",
|
|
645
|
+
property: "volume (index 5)",
|
|
646
|
+
index: t
|
|
647
|
+
});
|
|
648
|
+
}), nr.value.map((e) => ({
|
|
649
|
+
absoluteIndex: e.absoluteIndex,
|
|
650
|
+
period: e[0],
|
|
651
|
+
open: e[1],
|
|
652
|
+
high: e[2],
|
|
653
|
+
low: e[3],
|
|
654
|
+
close: e[4],
|
|
655
|
+
volume: e[5]
|
|
656
|
+
})))), rr = f(() => tr.value.map((e) => ({
|
|
657
|
+
absoluteIndex: e.absoluteIndex,
|
|
658
|
+
period: e[0],
|
|
659
|
+
open: e[1],
|
|
660
|
+
high: e[2],
|
|
661
|
+
low: e[3],
|
|
662
|
+
close: e[4],
|
|
663
|
+
volume: e[5]
|
|
664
|
+
}))), X = f(() => U.value.width / nr.value.length), ir = f(() => ({
|
|
665
|
+
max: P.value.yAxis.scale.max === null ? Math.max(...Y.value.map((e) => e.high)) : P.value.yAxis.scale.max,
|
|
666
|
+
min: P.value.yAxis.scale.min === null ? 0 : P.value.yAxis.scale.min
|
|
667
|
+
})), Z = f(() => c(ir.value.min, ir.value.max, P.value.yAxis.dataLabels.steps));
|
|
668
|
+
function ar(e, t, n = null, r = null) {
|
|
669
|
+
return {
|
|
670
|
+
...e,
|
|
671
|
+
x: u(U.value.left + t * X.value + X.value / 2),
|
|
672
|
+
y: u(U.value.top + (1 - (e - Z.value.min) / (Z.value.max - Z.value.min)) * U.value.height),
|
|
673
|
+
value: u(e),
|
|
674
|
+
isMax: e === n,
|
|
675
|
+
isMin: e === r
|
|
676
|
+
};
|
|
677
|
+
}
|
|
678
|
+
let Q = f(() => {
|
|
679
|
+
let e = {
|
|
680
|
+
o: Math.max(...Y.value.map((e) => e.open)),
|
|
681
|
+
h: Math.max(...Y.value.map((e) => e.high)),
|
|
682
|
+
l: Math.max(...Y.value.map((e) => e.low)),
|
|
683
|
+
c: Math.max(...Y.value.map((e) => e.low))
|
|
684
|
+
}, t = {
|
|
685
|
+
o: Math.min(...Y.value.map((e) => e.open)),
|
|
686
|
+
h: Math.min(...Y.value.map((e) => e.high)),
|
|
687
|
+
l: Math.min(...Y.value.map((e) => e.low)),
|
|
688
|
+
c: Math.min(...Y.value.map((e) => e.low))
|
|
689
|
+
}, n = Math.max(...Y.value.map((e) => e.volume)), r = Math.min(...Y.value.map((e) => e.volume));
|
|
690
|
+
return Y.value.map((i, a) => {
|
|
691
|
+
let o = ar(i.open, a, e.o, t.o), s = ar(i.high, a, e.h, t.h), c = ar(i.low, a, e.l, t.l), l = ar(i.close, a, e.c, t.c), u = i.close > i.open, ee = i.volume === n, te = i.volume === r;
|
|
692
|
+
return {
|
|
693
|
+
period: i.period,
|
|
694
|
+
open: o,
|
|
695
|
+
high: s,
|
|
696
|
+
low: c,
|
|
697
|
+
close: l,
|
|
698
|
+
volume: i.volume,
|
|
699
|
+
isBullish: u,
|
|
700
|
+
absoluteIndex: i.absoluteIndex,
|
|
701
|
+
isMaxVolume: ee,
|
|
702
|
+
isMinVolume: te
|
|
703
|
+
};
|
|
704
|
+
});
|
|
705
|
+
});
|
|
706
|
+
function or({ item: e, index: t, minimapH: n, unitW: r }) {
|
|
707
|
+
let i = P.value.yAxis.scale.min ?? 0, a = P.value.yAxis.scale.max ?? Math.max(...z.value.map((e) => e[2]));
|
|
708
|
+
return {
|
|
709
|
+
...e,
|
|
710
|
+
x: u(t * r),
|
|
711
|
+
y: u((1 - (e - i) / (a - i)) * n),
|
|
712
|
+
value: u(e)
|
|
713
|
+
};
|
|
714
|
+
}
|
|
715
|
+
let sr = f(() => ({ minimapH: e, unitW: t }) => rr.value.map((n, r) => {
|
|
716
|
+
let i = or({
|
|
717
|
+
item: n.open,
|
|
718
|
+
index: r,
|
|
719
|
+
minimapH: e,
|
|
720
|
+
unitW: t
|
|
721
|
+
}), a = or({
|
|
722
|
+
item: n.high,
|
|
723
|
+
index: r,
|
|
724
|
+
minimapH: e,
|
|
725
|
+
unitW: t
|
|
726
|
+
}), o = or({
|
|
727
|
+
item: n.low,
|
|
728
|
+
index: r,
|
|
729
|
+
minimapH: e,
|
|
730
|
+
unitW: t
|
|
731
|
+
}), s = or({
|
|
732
|
+
item: n.close,
|
|
733
|
+
index: r,
|
|
734
|
+
minimapH: e,
|
|
735
|
+
unitW: t
|
|
736
|
+
}), c = n.close > n.open;
|
|
737
|
+
return {
|
|
738
|
+
period: n.period,
|
|
739
|
+
open: i,
|
|
740
|
+
high: a,
|
|
741
|
+
low: o,
|
|
742
|
+
close: s,
|
|
743
|
+
volume: n.volume,
|
|
744
|
+
isBullish: c,
|
|
745
|
+
absoluteIndex: n.absoluteIndex
|
|
746
|
+
};
|
|
747
|
+
})), cr = f(() => I.value.zoom.minimap.show ? [{
|
|
748
|
+
name: "",
|
|
749
|
+
series: z.value.map((e) => e[2]),
|
|
750
|
+
color: "#000000",
|
|
751
|
+
isVisible: !0
|
|
752
|
+
}] : []);
|
|
753
|
+
function lr(e) {
|
|
754
|
+
return u((e - Z.value.min) / (Z.value.max - Z.value.min));
|
|
755
|
+
}
|
|
756
|
+
let ur = f(() => Z.value.ticks.map((e) => ({
|
|
757
|
+
y: U.value.bottom - U.value.height * lr(e),
|
|
758
|
+
value: u(e)
|
|
759
|
+
}))), dr = f(() => Y.value.map((e) => e.period)), $ = b([]), fr = b([]), pr = 0;
|
|
760
|
+
Xe(() => {
|
|
761
|
+
let e = ++pr;
|
|
762
|
+
(async () => {
|
|
763
|
+
let t = await me({
|
|
764
|
+
values: z.value.map((e) => e[0]),
|
|
765
|
+
maxDatapoints: z.value.length,
|
|
766
|
+
formatter: P.value.xAxis.dataLabels.datetimeFormatter,
|
|
767
|
+
start: G.value.start,
|
|
768
|
+
end: G.value.end
|
|
769
|
+
});
|
|
770
|
+
e === pr && ($.value = t);
|
|
771
|
+
})();
|
|
772
|
+
});
|
|
773
|
+
let mr = 0;
|
|
774
|
+
Xe(() => {
|
|
775
|
+
let e = ++mr;
|
|
776
|
+
(async () => {
|
|
777
|
+
let t = await me({
|
|
778
|
+
values: z.value.map((e) => e[0]),
|
|
779
|
+
maxDatapoints: z.value.length,
|
|
780
|
+
formatter: P.value.xAxis.dataLabels.datetimeFormatter,
|
|
781
|
+
start: 0,
|
|
782
|
+
end: W.value
|
|
783
|
+
});
|
|
784
|
+
e === mr && (fr.value = t);
|
|
785
|
+
})();
|
|
786
|
+
});
|
|
787
|
+
let hr = b({
|
|
788
|
+
months: [],
|
|
789
|
+
shortMonths: [],
|
|
790
|
+
days: [],
|
|
791
|
+
shortDays: []
|
|
792
|
+
}), gr = 0;
|
|
793
|
+
Xe(() => {
|
|
794
|
+
let e = ++gr, t = P.value.xAxis.dataLabels.datetimeFormatter;
|
|
795
|
+
(async () => {
|
|
796
|
+
let n = await pe(t.locale).catch(() => pe("en"));
|
|
797
|
+
e === gr && (hr.value = n.data);
|
|
798
|
+
})();
|
|
799
|
+
});
|
|
800
|
+
let _r = f(() => {
|
|
801
|
+
let e = P.value.xAxis.dataLabels.datetimeFormatter, t = fe({
|
|
802
|
+
useUTC: e.useUTC,
|
|
803
|
+
locale: hr.value,
|
|
804
|
+
januaryAsYear: e.januaryAsYear
|
|
805
|
+
});
|
|
806
|
+
return (e, n) => {
|
|
807
|
+
let r = z.value.map((e) => e[0])?.[e];
|
|
808
|
+
return r == null ? "" : t.formatDate(new Date(r), n);
|
|
809
|
+
};
|
|
810
|
+
}), vr = f(() => (z.value.map((e) => e[0]) || []).map((e, t) => ({
|
|
811
|
+
text: _r.value(t, I.value.tooltip.timeFormat),
|
|
812
|
+
absoluteIndex: t
|
|
813
|
+
}))), yr = f(() => (z.value.map((e) => e[0]) || []).map((e, t) => ({
|
|
814
|
+
text: _r.value(t, I.value.zoom.timeFormat),
|
|
815
|
+
absoluteIndex: t
|
|
816
|
+
}))), br = f(() => {
|
|
817
|
+
let e = Math.max(1, Math.floor(Number(P.value.xAxis.dataLabels.modulo) || 1)), t = ($.value || []).map((e) => e?.text ?? ""), n = (fr.value || []).map((e) => e?.text ?? ""), r = G.value.start ?? 0, i = r > 0 || t.length < n.length;
|
|
818
|
+
return ae({
|
|
819
|
+
configuredModulo: e,
|
|
820
|
+
visibleTexts: t,
|
|
821
|
+
allTexts: n,
|
|
822
|
+
startAbs: r,
|
|
823
|
+
isZoomed: i
|
|
824
|
+
});
|
|
825
|
+
}), xr = f(() => {
|
|
826
|
+
let e = P.value.xAxis.dataLabels, t = $.value || [], n = fr.value || [], r = G.value.start ?? 0, i = k.value, a = W.value, o = t.map((e) => e?.text ?? ""), s = n.map((e) => e?.text ?? ""), c = ee(!!e.showOnlyFirstAndLast, !!e.showOnlyAtModulo, br.value, o, s, r, i, a);
|
|
827
|
+
if (!e.showFirstAndLast || e.showOnlyFirstAndLast || !c.length) return c;
|
|
828
|
+
let l = c.length - 1;
|
|
829
|
+
return c.map((e, t) => t !== 0 && t !== l ? e : {
|
|
830
|
+
...e,
|
|
831
|
+
text: o[t] ?? ""
|
|
832
|
+
});
|
|
833
|
+
}), Sr = f(() => P.value.xAxis.dataLabels.datetimeFormatter.enable ? {
|
|
834
|
+
start: $.value.find((e) => e.absoluteIndex === G.value.start)?.text ?? "",
|
|
835
|
+
end: $.value.find((e) => e.absoluteIndex === G.value.end - 1)?.text ?? ""
|
|
836
|
+
} : {
|
|
837
|
+
start: z.value[G.value.start] ? z.value[G.value.start][0] : z.value[0][0],
|
|
838
|
+
end: z.value[G.value.end - 1] ? z.value[G.value.end - 1][0] : z.value.at(-1)[0]
|
|
839
|
+
}), Cr = b(null);
|
|
840
|
+
function wr(e, t) {
|
|
841
|
+
M.value.events.datapointClick && M.value.events.datapointClick({
|
|
842
|
+
datapoint: t,
|
|
843
|
+
seriesIndex: e + G.value.start
|
|
844
|
+
});
|
|
845
|
+
}
|
|
846
|
+
function Tr(e, t) {
|
|
847
|
+
M.value.events.datapointLeave && M.value.events.datapointLeave({
|
|
848
|
+
datapoint: t,
|
|
849
|
+
seriesIndex: e + G.value.start
|
|
850
|
+
}), k.value = void 0, Gt.value = !1, j.value = null, ln.value = "pointer";
|
|
851
|
+
}
|
|
852
|
+
Ye(() => T.selectedXIndex, (e) => {
|
|
853
|
+
if ([null, void 0].includes(T.selectedXIndex)) {
|
|
854
|
+
k.value = null;
|
|
855
|
+
return;
|
|
856
|
+
}
|
|
857
|
+
let t = e - G.value.start;
|
|
858
|
+
t < 0 || e >= G.value.end ? k.value = null : k.value = t ?? null;
|
|
859
|
+
}, { immediate: !0 });
|
|
860
|
+
function Er(e, n, r = "pointer") {
|
|
861
|
+
M.value.events.datapointEnter && M.value.events.datapointEnter({
|
|
862
|
+
datapoint: n,
|
|
863
|
+
seriesIndex: e + G.value.start
|
|
864
|
+
}), k.value = e, j.value = e, ln.value = r, Cr.value = {
|
|
865
|
+
datapoint: n,
|
|
866
|
+
seriesIndex: e,
|
|
867
|
+
series: Q.value,
|
|
868
|
+
config: M.value
|
|
869
|
+
}, yi({
|
|
870
|
+
seriesIndex: e,
|
|
871
|
+
datapoint: n
|
|
872
|
+
});
|
|
873
|
+
let a = I.value.tooltip.customFormat;
|
|
874
|
+
if (i(a) && re(() => a({
|
|
875
|
+
seriesIndex: e,
|
|
876
|
+
datapoint: n,
|
|
877
|
+
series: Q.value,
|
|
878
|
+
config: M.value
|
|
879
|
+
}))) Kt.value = a({
|
|
880
|
+
seriesIndex: e,
|
|
881
|
+
datapoint: n,
|
|
882
|
+
series: Q.value,
|
|
883
|
+
config: M.value
|
|
884
|
+
});
|
|
885
|
+
else if (I.value.tooltip.show) {
|
|
886
|
+
let r = "", { period: i, open: a, high: o, low: s, close: c, volume: l, isBullish: u } = Q.value[e], { period: ee, open: te, high: ne, low: re, close: ie, volume: ae } = M.value.translations, oe = P.value.xAxis.dataLabels.datetimeFormatter.enable ? I.value.tooltip.useDefaultTimeFormat ? $.value[e].text : vr.value[e].text : i;
|
|
887
|
+
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="${N.value.borderRadius * 3}" stroke="${N.value.stroke}" stroke-width="${N.value.strokeWidth}"
|
|
888
|
+
fill="${N.value.gradient.show ? u ? `url(#bullish_gradient_${O.value})` : `url(#bearish_gradient_${O.value})` : u ? N.value.colors.bullish : N.value.colors.bearish}"/></svg>${oe}</div>`, r += `${ae} : <b>${isNaN(l) ? "-" : Number(l.toFixed(I.value.tooltip.roundingValue)).toLocaleString()}</b>`, r += `<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${I.value.tooltip.borderColor}">`;
|
|
889
|
+
let se = t({
|
|
890
|
+
p: I.value.tooltip.prefix,
|
|
891
|
+
v: a.value,
|
|
892
|
+
s: I.value.tooltip.suffix,
|
|
893
|
+
r: I.value.tooltip.roundingValue
|
|
894
|
+
}), ce = t({
|
|
895
|
+
p: I.value.tooltip.prefix,
|
|
896
|
+
v: o.value,
|
|
897
|
+
s: I.value.tooltip.suffix,
|
|
898
|
+
r: I.value.tooltip.roundingValue
|
|
899
|
+
}), le = t({
|
|
900
|
+
p: I.value.tooltip.prefix,
|
|
901
|
+
v: s.value,
|
|
902
|
+
s: I.value.tooltip.suffix,
|
|
903
|
+
r: I.value.tooltip.roundingValue
|
|
904
|
+
}), ue = t({
|
|
905
|
+
p: I.value.tooltip.prefix,
|
|
906
|
+
v: c.value,
|
|
907
|
+
s: I.value.tooltip.suffix,
|
|
908
|
+
r: I.value.tooltip.roundingValue
|
|
909
|
+
});
|
|
910
|
+
I.value.tooltip.showChart ? r += `<div style="width:100%;display:flex;align-items:center;justify-content:center;">
|
|
911
|
+
<svg viewBox="0 0 100 100" width="100px" style="background: transparent; overflow: visible">
|
|
912
|
+
<g>
|
|
913
|
+
<line x1="50" x2="50" y1="20" y2="80" stroke="${n.isBullish ? N.value.colors.bullish : N.value.colors.bearish}" stroke-width="2" stroke-linecap="round" />
|
|
914
|
+
${n.isBullish ? `
|
|
915
|
+
<line x1="45" x2="50" y1="65" y2="65" stroke="${N.value.colors.bullish}" stroke-width="1.5" stroke-linecap="round" />
|
|
916
|
+
<line x1="50" x2="55" y1="35" y2="35" stroke="${N.value.colors.bullish}" stroke-width="1.5" stroke-linecap="round" />
|
|
917
|
+
<text x="38" y="70" text-anchor="end" fill="${I.value.tooltip.color}">${se}</text>
|
|
918
|
+
<text x="62" y="40" text-anchor="start" fill="${I.value.tooltip.color}">${ue}</text>
|
|
919
|
+
` : `
|
|
920
|
+
<line x1="45" x2="50" y1="35" y2="35" stroke="${N.value.colors.bearish}" stroke-width="1.5" stroke-linecap="round" />
|
|
921
|
+
<line x1="50" x2="55" y1="65" y2="65" stroke="${N.value.colors.bearish}" stroke-width="1.5" stroke-linecap="round" />
|
|
922
|
+
<text x="40" y="40" text-anchor="end" fill="${I.value.tooltip.color}">${se}</text>
|
|
923
|
+
<text x="60" y="70" text-anchor="start" fill="${I.value.tooltip.color}">${ue}</text>
|
|
924
|
+
`}
|
|
925
|
+
<text x="50" y="13" text-anchor="middle" fill="${I.value.tooltip.color}">${ce}</text>
|
|
926
|
+
<text x="50" y="97" text-anchor="middle" fill="${I.value.tooltip.color}">${le}</text>
|
|
927
|
+
<g>
|
|
928
|
+
</svg>
|
|
929
|
+
<div>
|
|
930
|
+
` : (r += `<div>${te}: <b>${se}</b></div>`, r += `<div>${ne}: <b>${ce}</b></div>`, r += `<div>${re}: <b>${le}</b></div>`, r += `<div>${ie}: <b>${ue}</b></div>`), r += "</div>", Kt.value = `<div style="text-align:right">${r}</div>`;
|
|
931
|
+
}
|
|
932
|
+
Gt.value = !0;
|
|
933
|
+
}
|
|
934
|
+
let Dr = b(null);
|
|
935
|
+
function Or() {
|
|
936
|
+
return new Promise((e) => requestAnimationFrame(() => requestAnimationFrame(() => e())));
|
|
937
|
+
}
|
|
938
|
+
Ue(() => {
|
|
939
|
+
Dr.value && cancelAnimationFrame(Dr.value), Zn(), li();
|
|
940
|
+
});
|
|
941
|
+
async function kr({ force: e = !1, publish: t = !1 } = {}) {
|
|
942
|
+
let n = !e;
|
|
943
|
+
Nr(n), await Ve(), Dr.value && cancelAnimationFrame(Dr.value), Dr.value = requestAnimationFrame(async () => {
|
|
944
|
+
await Or(), Nr(n), Dr.value = null, t && (Xn({
|
|
945
|
+
start: Number(G.value.start),
|
|
946
|
+
end: Number(G.value.end)
|
|
947
|
+
}), E("zoomReset"));
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
let Ar = b(!1), jr = b(!1), Mr = b(!1);
|
|
951
|
+
Ye([() => T.zoomState, jr], ([e, t]) => {
|
|
952
|
+
t && e && Qn(e);
|
|
953
|
+
}, {
|
|
954
|
+
deep: !0,
|
|
955
|
+
immediate: !0
|
|
956
|
+
});
|
|
957
|
+
function Nr(e = !0) {
|
|
958
|
+
if (!Ar.value) {
|
|
959
|
+
Ar.value = !0;
|
|
960
|
+
try {
|
|
961
|
+
let { startIndex: t, endIndex: n } = I.value.zoom, r = W.value, i = t ?? 0, a = n == null ? r : Math.min(Pr(n + 1, i), r);
|
|
962
|
+
Mr.value = !0, G.value.start = i, G.value.end = a, K.value.start = i, K.value.end = a, er(), jr.value = !0, e && T.zoomState && Qn(T.zoomState);
|
|
963
|
+
} finally {
|
|
964
|
+
queueMicrotask(() => {
|
|
965
|
+
Mr.value = !1;
|
|
966
|
+
}), Ar.value = !1;
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
function Pr(e, t = G.value.start) {
|
|
971
|
+
let n = W.value, r = Number(t);
|
|
972
|
+
return e > n ? n : e < 0 || e <= r ? Math.min(r + 1, n) : e;
|
|
973
|
+
}
|
|
974
|
+
function Fr(e = null) {
|
|
975
|
+
Ve(() => {
|
|
976
|
+
let t = [
|
|
977
|
+
M.value.translations.period,
|
|
978
|
+
M.value.translations.open,
|
|
979
|
+
M.value.translations.high,
|
|
980
|
+
M.value.translations.low,
|
|
981
|
+
M.value.translations.close,
|
|
982
|
+
M.value.translations.volume
|
|
983
|
+
], n = Q.value.map((e, t) => [
|
|
984
|
+
P.value.xAxis.dataLabels.datetimeFormatter.enable ? $.value[t].text : e.period,
|
|
985
|
+
e.open.value,
|
|
986
|
+
e.high.value,
|
|
987
|
+
e.low.value,
|
|
988
|
+
e.close.value,
|
|
989
|
+
e.volume
|
|
990
|
+
]), i = [
|
|
991
|
+
[I.value.title.text],
|
|
992
|
+
[I.value.title.subtitle.text],
|
|
993
|
+
[
|
|
994
|
+
[""],
|
|
995
|
+
[""],
|
|
996
|
+
[""]
|
|
997
|
+
],
|
|
998
|
+
t
|
|
999
|
+
].concat(n), a = r(i);
|
|
1000
|
+
e ? e(a) : oe({
|
|
1001
|
+
csvContent: a,
|
|
1002
|
+
title: I.value.title.text || "vue-ui-candlestick"
|
|
1003
|
+
});
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
let Ir = f(() => {
|
|
1007
|
+
let e = Q.value.map((e, n) => {
|
|
1008
|
+
let r = P.value.xAxis.dataLabels.datetimeFormatter.enable ? $.value?.[n]?.text ?? "" : e.period, i = t({
|
|
1009
|
+
p: M.value.table.td.prefix,
|
|
1010
|
+
v: e.open.value,
|
|
1011
|
+
s: M.value.table.td.suffix,
|
|
1012
|
+
r: M.value.table.td.roundingValue
|
|
1013
|
+
}), a = t({
|
|
1014
|
+
p: M.value.table.td.prefix,
|
|
1015
|
+
v: e.high.value,
|
|
1016
|
+
s: M.value.table.td.suffix,
|
|
1017
|
+
r: M.value.table.td.roundingValue
|
|
1018
|
+
}), o = t({
|
|
1019
|
+
p: M.value.table.td.prefix,
|
|
1020
|
+
v: e.low.value,
|
|
1021
|
+
s: M.value.table.td.suffix,
|
|
1022
|
+
r: M.value.table.td.roundingValue
|
|
1023
|
+
}), s = t({
|
|
1024
|
+
p: M.value.table.td.prefix,
|
|
1025
|
+
v: e.close.value,
|
|
1026
|
+
s: M.value.table.td.suffix,
|
|
1027
|
+
r: M.value.table.td.roundingValue
|
|
1028
|
+
});
|
|
1029
|
+
return [
|
|
1030
|
+
`<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="${N.value.borderRadius * 3}" fill="${N.value.gradient.show ? e.isBullish ? `url(#bullish_gradient_${O.value})` : `url(#bearish_gradient_${O.value})` : e.isBullish ? N.value.colors.bullish : N.value.colors.bearish}"/></svg> ${r}`,
|
|
1031
|
+
i,
|
|
1032
|
+
a,
|
|
1033
|
+
o,
|
|
1034
|
+
s,
|
|
1035
|
+
`${isNaN(e.volume) ? "-" : e.volume.toLocaleString()}`
|
|
1036
|
+
];
|
|
1037
|
+
}), n = Q.value.map((e, n) => [
|
|
1038
|
+
P.value.xAxis.dataLabels.datetimeFormatter.enable ? $.value?.[n]?.text ?? "" : e.period,
|
|
1039
|
+
t({
|
|
1040
|
+
p: M.value.table.td.prefix,
|
|
1041
|
+
v: e.open.value,
|
|
1042
|
+
s: M.value.table.td.suffix,
|
|
1043
|
+
r: M.value.table.td.roundingValue
|
|
1044
|
+
}),
|
|
1045
|
+
t({
|
|
1046
|
+
p: M.value.table.td.prefix,
|
|
1047
|
+
v: e.high.value,
|
|
1048
|
+
s: M.value.table.td.suffix,
|
|
1049
|
+
r: M.value.table.td.roundingValue
|
|
1050
|
+
}),
|
|
1051
|
+
t({
|
|
1052
|
+
p: M.value.table.td.prefix,
|
|
1053
|
+
v: e.low.value,
|
|
1054
|
+
s: M.value.table.td.suffix,
|
|
1055
|
+
r: M.value.table.td.roundingValue
|
|
1056
|
+
}),
|
|
1057
|
+
t({
|
|
1058
|
+
p: M.value.table.td.prefix,
|
|
1059
|
+
v: e.close.value,
|
|
1060
|
+
s: M.value.table.td.suffix,
|
|
1061
|
+
r: M.value.table.td.roundingValue
|
|
1062
|
+
}),
|
|
1063
|
+
`${isNaN(e.volume) ? "-" : e.volume}`
|
|
1064
|
+
]), r = {
|
|
1065
|
+
th: {
|
|
1066
|
+
backgroundColor: M.value.table.th.backgroundColor,
|
|
1067
|
+
color: M.value.table.th.color,
|
|
1068
|
+
outline: M.value.table.th.outline
|
|
1069
|
+
},
|
|
1070
|
+
td: {
|
|
1071
|
+
backgroundColor: M.value.table.td.backgroundColor,
|
|
1072
|
+
color: M.value.table.td.color,
|
|
1073
|
+
outline: M.value.table.td.outline
|
|
1074
|
+
},
|
|
1075
|
+
breakpoint: M.value.table.responsiveBreakpoint
|
|
1076
|
+
}, i = [
|
|
1077
|
+
M.value.translations.period,
|
|
1078
|
+
M.value.translations.open,
|
|
1079
|
+
M.value.translations.high,
|
|
1080
|
+
M.value.translations.low,
|
|
1081
|
+
M.value.translations.last,
|
|
1082
|
+
M.value.translations.volume
|
|
1083
|
+
];
|
|
1084
|
+
return {
|
|
1085
|
+
head: i,
|
|
1086
|
+
body: e,
|
|
1087
|
+
bodyA11y: n,
|
|
1088
|
+
config: r,
|
|
1089
|
+
colNames: i
|
|
1090
|
+
};
|
|
1091
|
+
}), Lr = b(!1);
|
|
1092
|
+
function Rr(e) {
|
|
1093
|
+
Lr.value = e, qt.value += 1;
|
|
1094
|
+
}
|
|
1095
|
+
function zr() {
|
|
1096
|
+
H.value.showTable = !H.value.showTable;
|
|
1097
|
+
}
|
|
1098
|
+
function Br() {
|
|
1099
|
+
H.value.showTooltip = !H.value.showTooltip;
|
|
1100
|
+
}
|
|
1101
|
+
let Vr = b(!1);
|
|
1102
|
+
function Hr() {
|
|
1103
|
+
Vr.value = !Vr.value;
|
|
1104
|
+
}
|
|
1105
|
+
async function Ur({ scale: e = 2 } = {}) {
|
|
1106
|
+
if (!A.value) return;
|
|
1107
|
+
let { imageUri: t, base64: n } = await we({
|
|
1108
|
+
domElement: A.value,
|
|
1109
|
+
base64: !0,
|
|
1110
|
+
img: !0,
|
|
1111
|
+
scale: e
|
|
1112
|
+
}), r = A.value.getBoundingClientRect(), i = {
|
|
1113
|
+
width: r.width,
|
|
1114
|
+
height: r.height,
|
|
1115
|
+
aspectRatio: r.height ? r.width / r.height : 0
|
|
1116
|
+
}, a = await ie(t, e) ?? i;
|
|
1117
|
+
return {
|
|
1118
|
+
imageUri: t,
|
|
1119
|
+
base64: n,
|
|
1120
|
+
title: I.value.title.text,
|
|
1121
|
+
...a
|
|
1122
|
+
};
|
|
1123
|
+
}
|
|
1124
|
+
let Wr = f(() => V.value.width), Gr = f(() => V.value.height);
|
|
1125
|
+
Ce({
|
|
1126
|
+
timeLabelsEls: rn,
|
|
1127
|
+
timeLabels: $,
|
|
1128
|
+
slicer: G,
|
|
1129
|
+
configRef: M,
|
|
1130
|
+
rotationPath: [
|
|
1131
|
+
"style",
|
|
1132
|
+
"layout",
|
|
1133
|
+
"grid",
|
|
1134
|
+
"xAxis",
|
|
1135
|
+
"dataLabels",
|
|
1136
|
+
"rotation"
|
|
1137
|
+
],
|
|
1138
|
+
autoRotatePath: [
|
|
1139
|
+
"style",
|
|
1140
|
+
"layout",
|
|
1141
|
+
"grid",
|
|
1142
|
+
"xAxis",
|
|
1143
|
+
"dataLabels",
|
|
1144
|
+
"autoRotate",
|
|
1145
|
+
"enable"
|
|
1146
|
+
],
|
|
1147
|
+
isAutoSize: !1,
|
|
1148
|
+
rotation: P.value.xAxis.dataLabels.autoRotate.angle,
|
|
1149
|
+
width: Wr,
|
|
1150
|
+
height: Gr
|
|
1151
|
+
}), Ye(M, () => {
|
|
1152
|
+
H.value = {
|
|
1153
|
+
showTable: M.value.table.show,
|
|
1154
|
+
showTooltip: I.value.tooltip.show
|
|
1155
|
+
};
|
|
1156
|
+
}, { immediate: !0 });
|
|
1157
|
+
let Kr = f(() => {
|
|
1158
|
+
let e = M.value.table.useDialog && !M.value.table.show, t = H.value.showTable;
|
|
1159
|
+
return {
|
|
1160
|
+
component: e ? zt : Pt,
|
|
1161
|
+
title: `${I.value.title.text}${I.value.title.subtitle.text ? `: ${I.value.title.subtitle.text}` : ""}`,
|
|
1162
|
+
props: e ? {
|
|
1163
|
+
backgroundColor: M.value.table.th.backgroundColor,
|
|
1164
|
+
color: M.value.table.th.color,
|
|
1165
|
+
headerColor: M.value.table.th.color,
|
|
1166
|
+
headerBg: M.value.table.th.backgroundColor,
|
|
1167
|
+
isFullscreen: Lr.value,
|
|
1168
|
+
fullscreenParent: A.value,
|
|
1169
|
+
forcedWidth: Math.min(800, window.innerWidth * .8),
|
|
1170
|
+
isCursorPointer: fn.value
|
|
1171
|
+
} : {
|
|
1172
|
+
hideDetails: !0,
|
|
1173
|
+
config: {
|
|
1174
|
+
open: t,
|
|
1175
|
+
maxHeight: 1e4,
|
|
1176
|
+
body: {
|
|
1177
|
+
backgroundColor: I.value.backgroundColor,
|
|
1178
|
+
color: I.value.color
|
|
1179
|
+
},
|
|
1180
|
+
head: {
|
|
1181
|
+
backgroundColor: I.value.backgroundColor,
|
|
1182
|
+
color: I.value.color
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
};
|
|
1187
|
+
});
|
|
1188
|
+
Ye(() => H.value.showTable, (e) => {
|
|
1189
|
+
M.value.table.show || (e && M.value.table.useDialog && an.value ? an.value.open() : "close" in an.value && an.value.close());
|
|
1190
|
+
});
|
|
1191
|
+
function qr() {
|
|
1192
|
+
H.value.showTable = !1, on.value && on.value.setTableIconState(!1);
|
|
1193
|
+
}
|
|
1194
|
+
let Jr = f(() => I.value.backgroundColor), Yr = f(() => I.value.title), { isCallbackImaging: Xr, isCallbackSvg: Zr, generateSvg: Qr, onGenerateImage: $r } = xe({
|
|
1195
|
+
svg: B,
|
|
1196
|
+
title: Yr,
|
|
1197
|
+
legend: null,
|
|
1198
|
+
legendItems: null,
|
|
1199
|
+
backgroundColor: Jr,
|
|
1200
|
+
getSvgCallback: () => M.value.userOptions.callbacks.svg,
|
|
1201
|
+
generateImage: An
|
|
1202
|
+
});
|
|
1203
|
+
function ei(e) {
|
|
1204
|
+
sn.value = e;
|
|
1205
|
+
}
|
|
1206
|
+
function ti(e) {
|
|
1207
|
+
Kn = {
|
|
1208
|
+
...Kn,
|
|
1209
|
+
...e
|
|
1210
|
+
}, Gn && cancelAnimationFrame(Gn), Gn = requestAnimationFrame(() => {
|
|
1211
|
+
let e = {
|
|
1212
|
+
...G.value,
|
|
1213
|
+
...Kn
|
|
1214
|
+
};
|
|
1215
|
+
Kn = {}, Gn = null, G.value = e, K.value = { ...e }, er(), Xn({
|
|
1216
|
+
start: Number(G.value.start),
|
|
1217
|
+
end: Number(G.value.end)
|
|
1218
|
+
});
|
|
1219
|
+
});
|
|
1220
|
+
}
|
|
1221
|
+
function ni(e) {
|
|
1222
|
+
if (Ar.value || Mr.value) return;
|
|
1223
|
+
let t = Number(e);
|
|
1224
|
+
Number.isFinite(t) && (E("zoomStart", {
|
|
1225
|
+
index: t,
|
|
1226
|
+
isZoom: t !== 0
|
|
1227
|
+
}), t !== G.value.start && ti({ start: t }));
|
|
1228
|
+
}
|
|
1229
|
+
function ri(e) {
|
|
1230
|
+
if (Ar.value || Mr.value) return;
|
|
1231
|
+
let t = Kn.start === void 0 ? G.value.start : Kn.start, n = Pr(Number(e), t);
|
|
1232
|
+
Number.isFinite(n) && (E("zoomEnd", {
|
|
1233
|
+
index: n,
|
|
1234
|
+
isZoom: n !== W.value
|
|
1235
|
+
}), (n !== G.value.end || Kn.start !== void 0) && ti({ end: n }));
|
|
1236
|
+
}
|
|
1237
|
+
function ii(e) {
|
|
1238
|
+
let t = B.value;
|
|
1239
|
+
if (!t) return null;
|
|
1240
|
+
if (t.createSVGPoint && t.getScreenCTM) {
|
|
1241
|
+
let n = t.createSVGPoint();
|
|
1242
|
+
n.x = e.clientX, n.y = e.clientY;
|
|
1243
|
+
let r = t.getScreenCTM();
|
|
1244
|
+
if (r) {
|
|
1245
|
+
let e = n.matrixTransform(r.inverse());
|
|
1246
|
+
return {
|
|
1247
|
+
x: e.x,
|
|
1248
|
+
y: e.y
|
|
1249
|
+
};
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
let n = t.getBoundingClientRect(), r = t.viewBox?.baseVal || {
|
|
1253
|
+
x: 0,
|
|
1254
|
+
y: 0,
|
|
1255
|
+
width: n.width,
|
|
1256
|
+
height: n.height
|
|
1257
|
+
}, i = Math.min(n.width / r.width, n.height / r.height);
|
|
1258
|
+
if (!Number.isFinite(i) || i <= 0) return null;
|
|
1259
|
+
let a = r.width * i, o = r.height * i, s = (n.width - a) / 2, c = (n.height - o) / 2;
|
|
1260
|
+
return {
|
|
1261
|
+
x: (e.clientX - n.left - s) / i + r.x,
|
|
1262
|
+
y: (e.clientY - n.top - c) / i + r.y
|
|
1263
|
+
};
|
|
1264
|
+
}
|
|
1265
|
+
let ai = f(() => !Rn.value || Bn.value == null || q.value == null ? null : {
|
|
1266
|
+
x: Math.min(Bn.value, q.value),
|
|
1267
|
+
y: U.value.top,
|
|
1268
|
+
width: Math.abs(q.value - Bn.value),
|
|
1269
|
+
height: U.value.height
|
|
1270
|
+
}), oi = f(() => jr.value ? Number(G.value.start) !== 0 || Number(G.value.end) !== Number(W.value) : !1);
|
|
1271
|
+
function si(e) {
|
|
1272
|
+
return Math.min(Math.max(e, U.value.left), U.value.right);
|
|
1273
|
+
}
|
|
1274
|
+
function ci() {
|
|
1275
|
+
k.value = void 0, j.value = null, ln.value = "pointer", Gt.value = !1, sn.value = null;
|
|
1276
|
+
}
|
|
1277
|
+
function li(e) {
|
|
1278
|
+
let t = e?.pointerId == null ? J.value : e.pointerId;
|
|
1279
|
+
t != null && B.value?.hasPointerCapture?.(t) && B.value.releasePointerCapture(t), Rn.value = !1, Bn.value = null, q.value = null, J.value = null;
|
|
1280
|
+
}
|
|
1281
|
+
function ui() {
|
|
1282
|
+
Vn.value = !0, setTimeout(() => {
|
|
1283
|
+
Vn.value = !1;
|
|
1284
|
+
}, 0);
|
|
1285
|
+
}
|
|
1286
|
+
function di(e) {
|
|
1287
|
+
Vn.value && (Vn.value = !1, e.preventDefault(), e.stopPropagation());
|
|
1288
|
+
}
|
|
1289
|
+
function fi(e) {
|
|
1290
|
+
if (!Wn.value || !oi.value || !e) return !1;
|
|
1291
|
+
let t = Date.now(), n = e.pointerType || "mouse", r = Hn.value, i = n === "touch" ? 450 : 350, a = n === "touch" ? 28 : 10, o = Math.hypot(e.clientX - r.x, e.clientY - r.y);
|
|
1292
|
+
return r.time > 0 && r.pointerType === n && t - r.time <= i && o <= a ? (Hn.value = {
|
|
1293
|
+
time: 0,
|
|
1294
|
+
x: 0,
|
|
1295
|
+
y: 0,
|
|
1296
|
+
pointerType: null
|
|
1297
|
+
}, ui(), li(e), kr({
|
|
1298
|
+
force: !0,
|
|
1299
|
+
publish: !0
|
|
1300
|
+
}), !0) : (Hn.value = {
|
|
1301
|
+
time: t,
|
|
1302
|
+
x: e.clientX,
|
|
1303
|
+
y: e.clientY,
|
|
1304
|
+
pointerType: n
|
|
1305
|
+
}, !1);
|
|
1306
|
+
}
|
|
1307
|
+
function pi(e) {
|
|
1308
|
+
let t = Number(G.value.end) - Number(G.value.start);
|
|
1309
|
+
if (t <= 0 || !Number.isFinite(X.value) || X.value <= 0) return null;
|
|
1310
|
+
let n = Math.floor((si(e) - U.value.left) / X.value);
|
|
1311
|
+
return Math.max(0, Math.min(t - 1, n));
|
|
1312
|
+
}
|
|
1313
|
+
function mi(e, t) {
|
|
1314
|
+
let n = pi(e), r = pi(t);
|
|
1315
|
+
if (n == null || r == null) return null;
|
|
1316
|
+
let i = Math.min(n, r), a = Math.max(n, r);
|
|
1317
|
+
return a <= i ? null : {
|
|
1318
|
+
start: Number(G.value.start) + i,
|
|
1319
|
+
end: Number(G.value.start) + a + 1
|
|
1320
|
+
};
|
|
1321
|
+
}
|
|
1322
|
+
function hi(e) {
|
|
1323
|
+
let t = $n(e);
|
|
1324
|
+
return t ? (E("zoomStart", {
|
|
1325
|
+
index: t.start,
|
|
1326
|
+
isZoom: t.start !== 0
|
|
1327
|
+
}), E("zoomEnd", {
|
|
1328
|
+
index: t.end,
|
|
1329
|
+
isZoom: t.end !== W.value
|
|
1330
|
+
}), t) : null;
|
|
1331
|
+
}
|
|
1332
|
+
function gi(e) {
|
|
1333
|
+
if (!Wn.value || Vr.value || e.button !== void 0 && e.button !== 0 || J.value != null && e.pointerId !== J.value) return;
|
|
1334
|
+
let t = ii(e);
|
|
1335
|
+
if (!t) return;
|
|
1336
|
+
let { left: n, right: r, top: i, bottom: a } = U.value;
|
|
1337
|
+
if (t.x < n || t.x > r || t.y < i || t.y > a || Number(G.value.end) - Number(G.value.start) <= 1) return;
|
|
1338
|
+
zn.value = !0, B.value?.focus?.({ preventScroll: !0 }), ci();
|
|
1339
|
+
let o = si(t.x);
|
|
1340
|
+
J.value = e.pointerId, Rn.value = !0, Bn.value = o, q.value = o;
|
|
1341
|
+
}
|
|
1342
|
+
function _i(e) {
|
|
1343
|
+
if (!Wn.value || !Rn.value || J.value != null && e.pointerId !== J.value) return;
|
|
1344
|
+
let t = ii(e);
|
|
1345
|
+
t && (q.value = si(t.x), ci(), Bn.value != null && Math.abs(q.value - Bn.value) >= 2 && !B.value?.hasPointerCapture?.(e.pointerId) && B.value?.setPointerCapture?.(e.pointerId));
|
|
1346
|
+
}
|
|
1347
|
+
function vi(e) {
|
|
1348
|
+
if (!Wn.value || !Rn.value || J.value != null && e.pointerId !== J.value) return;
|
|
1349
|
+
let t = ii(e);
|
|
1350
|
+
t && (q.value = si(t.x));
|
|
1351
|
+
let n = Bn.value, r = q.value;
|
|
1352
|
+
if ((n == null || r == null ? 0 : Math.abs(r - n)) < Math.max(4, U.value.width * .01)) {
|
|
1353
|
+
if (fi(e)) return;
|
|
1354
|
+
li(e);
|
|
1355
|
+
return;
|
|
1356
|
+
}
|
|
1357
|
+
let i = mi(Math.min(n, r), Math.max(n, r));
|
|
1358
|
+
if (!i) {
|
|
1359
|
+
li(e);
|
|
1360
|
+
return;
|
|
1361
|
+
}
|
|
1362
|
+
li(e), hi(i) && (Hn.value = {
|
|
1363
|
+
time: 0,
|
|
1364
|
+
x: 0,
|
|
1365
|
+
y: 0,
|
|
1366
|
+
pointerType: null
|
|
1367
|
+
}, ci(), ui());
|
|
1368
|
+
}
|
|
1369
|
+
function yi({ seriesIndex: e, datapoint: t }) {
|
|
1370
|
+
let n = G.value.start + e;
|
|
1371
|
+
E("selectX", {
|
|
1372
|
+
dataset: t,
|
|
1373
|
+
index: n,
|
|
1374
|
+
indexLabel: ""
|
|
1375
|
+
});
|
|
1376
|
+
}
|
|
1377
|
+
async function bi() {
|
|
1378
|
+
if (E("copyAlt", {
|
|
1379
|
+
config: M.value,
|
|
1380
|
+
dataset: Q.value
|
|
1381
|
+
}), !M.value.userOptions.callbacks.altCopy) {
|
|
1382
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
1383
|
+
return;
|
|
1384
|
+
}
|
|
1385
|
+
await Promise.resolve(M.value.userOptions.callbacks.altCopy({
|
|
1386
|
+
config: M.value,
|
|
1387
|
+
dataset: Q.value
|
|
1388
|
+
}));
|
|
1389
|
+
}
|
|
1390
|
+
function xi() {
|
|
1391
|
+
j.value = null, un.value = !0;
|
|
1392
|
+
}
|
|
1393
|
+
function Si() {
|
|
1394
|
+
zn.value = !1, j.value = null, ln.value = "pointer", Gt.value = !1, k.value = void 0, un.value = !1;
|
|
1395
|
+
}
|
|
1396
|
+
function Ci(e) {
|
|
1397
|
+
if (!B.value || Vr.value || document.activeElement !== B.value || (zn.value = !1, !Q.value.length)) return;
|
|
1398
|
+
let t = e.key === "ArrowLeft", n = e.key === "ArrowRight", r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
|
|
1399
|
+
if (!t && !n && !r && !i) return;
|
|
1400
|
+
if (e.preventDefault(), e.stopPropagation(), i) {
|
|
1401
|
+
if (Wn.value && (oi.value || Rn.value)) {
|
|
1402
|
+
li(), kr({
|
|
1403
|
+
force: !0,
|
|
1404
|
+
publish: !0
|
|
1405
|
+
});
|
|
1406
|
+
return;
|
|
1407
|
+
}
|
|
1408
|
+
j.value = null, ln.value = "pointer", Gt.value = !1, k.value = void 0;
|
|
1409
|
+
return;
|
|
1410
|
+
}
|
|
1411
|
+
if (r) {
|
|
1412
|
+
if (j.value === null) return;
|
|
1413
|
+
let e = Q.value[j.value];
|
|
1414
|
+
if (!e) return;
|
|
1415
|
+
wr(j.value, e);
|
|
1416
|
+
return;
|
|
1417
|
+
}
|
|
1418
|
+
let a = j.value, o = k.value, s = a !== null && a >= 0 && a < Q.value.length, c = o != null && o >= 0 && o < Q.value.length;
|
|
1419
|
+
s ? n ? (a += 1, a >= Q.value.length && (a = 0)) : t && (--a, a < 0 && (a = Q.value.length - 1)) : c ? (a = n ? o + 1 : o - 1, a >= Q.value.length && (a = 0), a < 0 && (a = Q.value.length - 1)) : a = n ? 0 : Q.value.length - 1;
|
|
1420
|
+
let l = Q.value[a];
|
|
1421
|
+
l && (wi(a), Er(a, l, "keyboard"));
|
|
1422
|
+
}
|
|
1423
|
+
function wi(e) {
|
|
1424
|
+
if (!Number.isFinite(e) || !B.value) return;
|
|
1425
|
+
let t = U.value.left + X.value * e + X.value / 2, n = U.value.top + U.value.height / 2, r = B.value.getBoundingClientRect();
|
|
1426
|
+
cn.value = {
|
|
1427
|
+
x: r.left + t / V.value.width * r.width,
|
|
1428
|
+
y: r.top + n / V.value.height * r.height
|
|
1429
|
+
};
|
|
1430
|
+
}
|
|
1431
|
+
let Ti = f(() => ({
|
|
1432
|
+
headers: Ir.value?.colNames ?? [],
|
|
1433
|
+
rows: Ir.value?.bodyA11y ?? []
|
|
1434
|
+
}));
|
|
1435
|
+
return Ee({
|
|
1436
|
+
getImage: Ur,
|
|
1437
|
+
generatePdf: kn,
|
|
1438
|
+
generateCsv: Fr,
|
|
1439
|
+
generateImage: An,
|
|
1440
|
+
generateSvg: Qr,
|
|
1441
|
+
toggleTable: zr,
|
|
1442
|
+
toggleTooltip: Br,
|
|
1443
|
+
toggleAnnotator: Hr,
|
|
1444
|
+
toggleFullscreen: Rr,
|
|
1445
|
+
copyAlt: bi,
|
|
1446
|
+
resetZoom: () => kr({
|
|
1447
|
+
force: !0,
|
|
1448
|
+
publish: !0
|
|
1449
|
+
}),
|
|
1450
|
+
setZoomState: $n
|
|
1451
|
+
}), (e, n) => (y(), m("div", {
|
|
1452
|
+
ref_key: "candlestickChart",
|
|
1453
|
+
ref: A,
|
|
1454
|
+
class: _(`vue-data-ui-component vue-ui-candlestick ${Lr.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${M.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
1455
|
+
style: He(`position:relative;font-family:${I.value.fontFamily}; text-align:center;background:${I.value.backgroundColor}; ${M.value.responsive ? "height: 100%" : ""}`),
|
|
1456
|
+
id: `vue-ui-candlestick_${O.value}`,
|
|
1457
|
+
onMouseenter: vn,
|
|
1458
|
+
onMouseleave: yn
|
|
1459
|
+
}, [
|
|
1460
|
+
h("div", {
|
|
1461
|
+
id: `chart-instructions-${O.value}`,
|
|
1462
|
+
class: "sr-only"
|
|
1463
|
+
}, [h("p", null, qe(M.value.a11y.translations.keyboardNavigation), 1)], 8, $e),
|
|
1464
|
+
Ti.value?.rows?.length ? (y(), Fe(je, {
|
|
1465
|
+
key: 0,
|
|
1466
|
+
uid: O.value,
|
|
1467
|
+
head: Ti.value.headers,
|
|
1468
|
+
body: Ti.value.rows,
|
|
1469
|
+
notice: M.value.a11y.translations.tableAvailable,
|
|
1470
|
+
caption: M.value.a11y.translations.tableCaption
|
|
1471
|
+
}, null, 8, [
|
|
1472
|
+
"uid",
|
|
1473
|
+
"head",
|
|
1474
|
+
"body",
|
|
1475
|
+
"notice",
|
|
1476
|
+
"caption"
|
|
1477
|
+
])) : p("", !0),
|
|
1478
|
+
L.value.buttons.annotator ? (y(), Fe(C(It), {
|
|
1479
|
+
key: 1,
|
|
1480
|
+
svgRef: C(B),
|
|
1481
|
+
backgroundColor: I.value.backgroundColor,
|
|
1482
|
+
color: I.value.color,
|
|
1483
|
+
active: Vr.value,
|
|
1484
|
+
isCursorPointer: fn.value,
|
|
1485
|
+
palette: L.value.annotatorPalette,
|
|
1486
|
+
onClose: Hr
|
|
1487
|
+
}, {
|
|
1488
|
+
"annotator-action-close": w(() => [S(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
1489
|
+
"annotator-action-color": w(({ color: t }) => [S(e.$slots, "annotator-action-color", v(g({ color: t })), void 0, !0)]),
|
|
1490
|
+
"annotator-action-draw": w(({ mode: t }) => [S(e.$slots, "annotator-action-draw", v(g({ mode: t })), void 0, !0)]),
|
|
1491
|
+
"annotator-action-undo": w(({ disabled: t }) => [S(e.$slots, "annotator-action-undo", v(g({ disabled: t })), void 0, !0)]),
|
|
1492
|
+
"annotator-action-redo": w(({ disabled: t }) => [S(e.$slots, "annotator-action-redo", v(g({ disabled: t })), void 0, !0)]),
|
|
1493
|
+
"annotator-action-delete": w(({ disabled: t }) => [S(e.$slots, "annotator-action-delete", v(g({ disabled: t })), void 0, !0)]),
|
|
1494
|
+
_: 3
|
|
1495
|
+
}, 8, [
|
|
1496
|
+
"svgRef",
|
|
1497
|
+
"backgroundColor",
|
|
1498
|
+
"color",
|
|
1499
|
+
"active",
|
|
1500
|
+
"isCursorPointer",
|
|
1501
|
+
"palette"
|
|
1502
|
+
])) : p("", !0),
|
|
1503
|
+
jn.value ? (y(), m("div", {
|
|
1504
|
+
key: 2,
|
|
1505
|
+
ref_key: "noTitle",
|
|
1506
|
+
ref: Qt,
|
|
1507
|
+
class: "vue-data-ui-no-title-space",
|
|
1508
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
1509
|
+
}, null, 512)) : p("", !0),
|
|
1510
|
+
I.value.title.text ? (y(), m("div", {
|
|
1511
|
+
key: 3,
|
|
1512
|
+
ref_key: "chartTitle",
|
|
1513
|
+
ref: Jt,
|
|
1514
|
+
style: "width:100%;background:transparent"
|
|
1515
|
+
}, [(y(), Fe(Te, {
|
|
1516
|
+
key: `title_${tn.value}`,
|
|
1517
|
+
config: {
|
|
1518
|
+
title: {
|
|
1519
|
+
cy: "candlestick-div-title",
|
|
1520
|
+
...I.value.title
|
|
1521
|
+
},
|
|
1522
|
+
subtitle: {
|
|
1523
|
+
cy: "candlestick-div-subtitle",
|
|
1524
|
+
...I.value.title.subtitle
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
}, null, 8, ["config"]))], 512)) : p("", !0),
|
|
1528
|
+
L.value.show && Ut.value && (C(_n) || C(hn)) ? (y(), Fe(C(Lt), {
|
|
1529
|
+
ref_key: "userOptionsRef",
|
|
1530
|
+
ref: on,
|
|
1531
|
+
key: `user_options_${qt.value}`,
|
|
1532
|
+
backgroundColor: I.value.backgroundColor,
|
|
1533
|
+
color: I.value.color,
|
|
1534
|
+
isImaging: C(On),
|
|
1535
|
+
isPrinting: C(Dn),
|
|
1536
|
+
uid: O.value,
|
|
1537
|
+
hasTooltip: L.value.buttons.tooltip && I.value.tooltip.show,
|
|
1538
|
+
hasPdf: L.value.buttons.pdf,
|
|
1539
|
+
hasImg: L.value.buttons.img,
|
|
1540
|
+
hasSvg: L.value.buttons.svg,
|
|
1541
|
+
hasXls: L.value.buttons.csv,
|
|
1542
|
+
hasTable: L.value.buttons.table,
|
|
1543
|
+
hasFullscreen: L.value.buttons.fullscreen,
|
|
1544
|
+
hasAltCopy: L.value.buttons.altCopy,
|
|
1545
|
+
isFullscreen: Lr.value,
|
|
1546
|
+
isTooltip: H.value.showTooltip,
|
|
1547
|
+
titles: { ...L.value.buttonTitles },
|
|
1548
|
+
chartElement: A.value,
|
|
1549
|
+
position: L.value.position,
|
|
1550
|
+
hasAnnotator: L.value.buttons.annotator,
|
|
1551
|
+
isAnnotation: Vr.value,
|
|
1552
|
+
callbacks: L.value.callbacks,
|
|
1553
|
+
printScale: L.value.print.scale,
|
|
1554
|
+
tableDialog: M.value.table.useDialog,
|
|
1555
|
+
isCursorPointer: fn.value,
|
|
1556
|
+
onToggleFullscreen: Rr,
|
|
1557
|
+
onGeneratePdf: C(kn),
|
|
1558
|
+
onGenerateCsv: Fr,
|
|
1559
|
+
onGenerateImage: C($r),
|
|
1560
|
+
onGenerateSvg: C(Qr),
|
|
1561
|
+
onToggleTable: zr,
|
|
1562
|
+
onToggleTooltip: Br,
|
|
1563
|
+
onToggleAnnotator: Hr,
|
|
1564
|
+
onCopyAlt: bi,
|
|
1565
|
+
style: He({ visibility: C(_n) ? C(hn) ? "visible" : "hidden" : "visible" })
|
|
1566
|
+
}, Ie({ _: 2 }, [
|
|
1567
|
+
e.$slots.menuIcon ? {
|
|
1568
|
+
name: "menuIcon",
|
|
1569
|
+
fn: w(({ isOpen: t, color: n }) => [S(e.$slots, "menuIcon", v(g({
|
|
1570
|
+
isOpen: t,
|
|
1571
|
+
color: n
|
|
1572
|
+
})), void 0, !0)]),
|
|
1573
|
+
key: "0"
|
|
1574
|
+
} : void 0,
|
|
1575
|
+
e.$slots.optionTooltip ? {
|
|
1576
|
+
name: "optionTooltip",
|
|
1577
|
+
fn: w(() => [S(e.$slots, "optionTooltip", {}, void 0, !0)]),
|
|
1578
|
+
key: "1"
|
|
1579
|
+
} : void 0,
|
|
1580
|
+
e.$slots.optionPdf ? {
|
|
1581
|
+
name: "optionPdf",
|
|
1582
|
+
fn: w(() => [S(e.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1583
|
+
key: "2"
|
|
1584
|
+
} : void 0,
|
|
1585
|
+
e.$slots.optionCsv ? {
|
|
1586
|
+
name: "optionCsv",
|
|
1587
|
+
fn: w(() => [S(e.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1588
|
+
key: "3"
|
|
1589
|
+
} : void 0,
|
|
1590
|
+
e.$slots.optionImg ? {
|
|
1591
|
+
name: "optionImg",
|
|
1592
|
+
fn: w(() => [S(e.$slots, "optionImg", {}, void 0, !0)]),
|
|
1593
|
+
key: "4"
|
|
1594
|
+
} : void 0,
|
|
1595
|
+
e.$slots.optionSvg ? {
|
|
1596
|
+
name: "optionSvg",
|
|
1597
|
+
fn: w(() => [S(e.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1598
|
+
key: "5"
|
|
1599
|
+
} : void 0,
|
|
1600
|
+
e.$slots.optionTable ? {
|
|
1601
|
+
name: "optionTable",
|
|
1602
|
+
fn: w(() => [S(e.$slots, "optionTable", {}, void 0, !0)]),
|
|
1603
|
+
key: "6"
|
|
1604
|
+
} : void 0,
|
|
1605
|
+
e.$slots.optionFullscreen ? {
|
|
1606
|
+
name: "optionFullscreen",
|
|
1607
|
+
fn: w(({ toggleFullscreen: t, isFullscreen: n }) => [S(e.$slots, "optionFullscreen", v(g({
|
|
1608
|
+
toggleFullscreen: t,
|
|
1609
|
+
isFullscreen: n
|
|
1610
|
+
})), void 0, !0)]),
|
|
1611
|
+
key: "7"
|
|
1612
|
+
} : void 0,
|
|
1613
|
+
e.$slots.optionAnnotator ? {
|
|
1614
|
+
name: "optionAnnotator",
|
|
1615
|
+
fn: w(({ toggleAnnotator: t, isAnnotator: n }) => [S(e.$slots, "optionAnnotator", v(g({
|
|
1616
|
+
toggleAnnotator: t,
|
|
1617
|
+
isAnnotator: n
|
|
1618
|
+
})), void 0, !0)]),
|
|
1619
|
+
key: "8"
|
|
1620
|
+
} : void 0,
|
|
1621
|
+
e.$slots.optionAltCopy ? {
|
|
1622
|
+
name: "optionAltCopy",
|
|
1623
|
+
fn: w(({ altCopy: t }) => [S(e.$slots, "optionAltCopy", v(g({ altCopy: t })), void 0, !0)]),
|
|
1624
|
+
key: "9"
|
|
1625
|
+
} : void 0,
|
|
1626
|
+
e.$slots["custom-menu-before"] ? {
|
|
1627
|
+
name: "custom-menu-before",
|
|
1628
|
+
fn: w(() => [S(e.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
1629
|
+
key: "10"
|
|
1630
|
+
} : void 0,
|
|
1631
|
+
e.$slots["custom-menu-after"] ? {
|
|
1632
|
+
name: "custom-menu-after",
|
|
1633
|
+
fn: w(() => [S(e.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
1634
|
+
key: "11"
|
|
1635
|
+
} : void 0
|
|
1636
|
+
]), 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.onGenerateImage.onGenerateSvg.style".split("."))) : p("", !0),
|
|
1637
|
+
h("div", et, [(y(), m("svg", {
|
|
1638
|
+
ref_key: "svgRef",
|
|
1639
|
+
ref: B,
|
|
1640
|
+
xmlns: C(ce),
|
|
1641
|
+
"aria-describedby": `chart-instructions-${O.value}`,
|
|
1642
|
+
class: _({
|
|
1643
|
+
"vue-data-ui-fullscreen--on": Lr.value,
|
|
1644
|
+
"vue-data-ui-fulscreen--off": !Lr.value,
|
|
1645
|
+
"vue-data-ui-no-transition": !C(dn),
|
|
1646
|
+
"vue-ui-candlestick-chart-zoom-pointer-focus": Wn.value && zn.value
|
|
1647
|
+
}),
|
|
1648
|
+
viewBox: `0 0 ${V.value.width <= 0 ? 10 : V.value.width} ${V.value.height <= 0 ? 10 : V.value.height}`,
|
|
1649
|
+
style: He({
|
|
1650
|
+
maxWidth: "100%",
|
|
1651
|
+
overflow: "visible",
|
|
1652
|
+
background: "transparent",
|
|
1653
|
+
color: I.value.color,
|
|
1654
|
+
cursor: Wn.value ? Rn.value ? "col-resize" : "crosshair" : void 0,
|
|
1655
|
+
touchAction: Wn.value ? "pan-y" : void 0,
|
|
1656
|
+
userSelect: Wn.value ? "none" : void 0
|
|
1657
|
+
}),
|
|
1658
|
+
tabindex: "0",
|
|
1659
|
+
onFocus: xi,
|
|
1660
|
+
onBlur: Si,
|
|
1661
|
+
onKeydown: Ci,
|
|
1662
|
+
onPointerdown: gi,
|
|
1663
|
+
onPointermove: _i,
|
|
1664
|
+
onPointerup: vi,
|
|
1665
|
+
onPointercancel: li,
|
|
1666
|
+
onClickCapture: di
|
|
1667
|
+
}, [
|
|
1668
|
+
Re(C(Rt)),
|
|
1669
|
+
e.$slots["chart-background"] ? (y(), m("foreignObject", {
|
|
1670
|
+
key: 0,
|
|
1671
|
+
x: U.value.left,
|
|
1672
|
+
y: U.value.top,
|
|
1673
|
+
width: Math.max(.1, U.value.width),
|
|
1674
|
+
height: Math.max(.1, U.value.height),
|
|
1675
|
+
style: { pointerEvents: "none" }
|
|
1676
|
+
}, [S(e.$slots, "chart-background", {}, void 0, !0)], 8, nt)) : p("", !0),
|
|
1677
|
+
Q.value.length > 0 ? (y(), m("g", rt, [
|
|
1678
|
+
h("defs", null, [Re(ke, {
|
|
1679
|
+
t: "linear",
|
|
1680
|
+
id: `bearish_gradient_${O.value}`,
|
|
1681
|
+
x2: "0%",
|
|
1682
|
+
y2: "100%",
|
|
1683
|
+
stops: [
|
|
1684
|
+
[
|
|
1685
|
+
"0%",
|
|
1686
|
+
N.value.colors.bearish,
|
|
1687
|
+
1
|
|
1688
|
+
],
|
|
1689
|
+
[
|
|
1690
|
+
"50%",
|
|
1691
|
+
C(a)(N.value.colors.bearish, .02),
|
|
1692
|
+
.87
|
|
1693
|
+
],
|
|
1694
|
+
[
|
|
1695
|
+
"100%",
|
|
1696
|
+
C(a)(N.value.colors.bearish, .05),
|
|
1697
|
+
.4
|
|
1698
|
+
]
|
|
1699
|
+
]
|
|
1700
|
+
}, null, 8, ["id", "stops"]), Re(ke, {
|
|
1701
|
+
t: "linear",
|
|
1702
|
+
id: `bullish_gradient_${O.value}`,
|
|
1703
|
+
x2: "0%",
|
|
1704
|
+
y2: "100%",
|
|
1705
|
+
stops: [
|
|
1706
|
+
[
|
|
1707
|
+
"0%",
|
|
1708
|
+
N.value.colors.bullish,
|
|
1709
|
+
1
|
|
1710
|
+
],
|
|
1711
|
+
[
|
|
1712
|
+
"50%",
|
|
1713
|
+
C(a)(N.value.colors.bullish, .02),
|
|
1714
|
+
.87
|
|
1715
|
+
],
|
|
1716
|
+
[
|
|
1717
|
+
"100%",
|
|
1718
|
+
C(a)(N.value.colors.bullish, .05),
|
|
1719
|
+
.4
|
|
1720
|
+
]
|
|
1721
|
+
]
|
|
1722
|
+
}, null, 8, ["id", "stops"])]),
|
|
1723
|
+
P.value.show ? (y(), m("g", it, [
|
|
1724
|
+
h("line", {
|
|
1725
|
+
x1: Fn.value ? U.value.right : U.value.left,
|
|
1726
|
+
x2: Fn.value ? U.value.right : U.value.left,
|
|
1727
|
+
y1: U.value.top,
|
|
1728
|
+
y2: U.value.bottom,
|
|
1729
|
+
stroke: P.value.stroke,
|
|
1730
|
+
"stroke-width": P.value.strokeWidth,
|
|
1731
|
+
"stroke-linecap": "round"
|
|
1732
|
+
}, null, 8, at),
|
|
1733
|
+
h("line", {
|
|
1734
|
+
x1: U.value.left,
|
|
1735
|
+
x2: U.value.right,
|
|
1736
|
+
y1: U.value.bottom,
|
|
1737
|
+
y2: U.value.bottom,
|
|
1738
|
+
stroke: P.value.stroke,
|
|
1739
|
+
"stroke-width": P.value.strokeWidth,
|
|
1740
|
+
"stroke-linecap": "round"
|
|
1741
|
+
}, null, 8, ot),
|
|
1742
|
+
P.value.horizontalLines.show ? (y(!0), m(d, { key: 0 }, x(ur.value, (e) => (y(), m("line", {
|
|
1743
|
+
x1: U.value.left,
|
|
1744
|
+
x2: U.value.right,
|
|
1745
|
+
y1: e.y,
|
|
1746
|
+
y2: e.y,
|
|
1747
|
+
stroke: P.value.horizontalLines.stroke,
|
|
1748
|
+
"stroke-width": P.value.horizontalLines.strokeWidth,
|
|
1749
|
+
"stroke-dasharray": P.value.horizontalLines.strokeDasharray,
|
|
1750
|
+
"stroke-linecap": "round"
|
|
1751
|
+
}, null, 8, st))), 256)) : p("", !0),
|
|
1752
|
+
P.value.verticalLines.show ? (y(!0), m(d, { key: 1 }, x(xr.value, (e, t) => (y(), m("g", null, [e.text ? (y(), m("line", {
|
|
1753
|
+
key: 0,
|
|
1754
|
+
x1: U.value.left + X.value * t + X.value / 2,
|
|
1755
|
+
x2: U.value.left + X.value * t + X.value / 2,
|
|
1756
|
+
y1: U.value.top,
|
|
1757
|
+
y2: U.value.bottom,
|
|
1758
|
+
stroke: P.value.verticalLines.stroke,
|
|
1759
|
+
"stroke-width": P.value.verticalLines.strokeWidth,
|
|
1760
|
+
"stroke-dasharray": P.value.verticalLines.strokeDasharray,
|
|
1761
|
+
"stroke-linecap": "round"
|
|
1762
|
+
}, null, 8, ct)) : p("", !0)]))), 256)) : p("", !0),
|
|
1763
|
+
P.value.xAxis.ticks.show ? (y(!0), m(d, { key: 2 }, x(xr.value, (e, t) => (y(), m("g", null, [e.text ? (y(), m("line", {
|
|
1764
|
+
key: 0,
|
|
1765
|
+
x1: U.value.left + X.value * t + X.value / 2,
|
|
1766
|
+
x2: U.value.left + X.value * t + X.value / 2,
|
|
1767
|
+
y1: U.value.bottom,
|
|
1768
|
+
y2: U.value.bottom + 3,
|
|
1769
|
+
stroke: P.value.stroke,
|
|
1770
|
+
"stroke-width": P.value.strokeWidth,
|
|
1771
|
+
"stroke-linecap": "round"
|
|
1772
|
+
}, null, 8, lt)) : p("", !0)]))), 256)) : p("", !0)
|
|
1773
|
+
])) : p("", !0),
|
|
1774
|
+
P.value.yAxis.dataLabels.show ? (y(), m("g", {
|
|
1775
|
+
key: 1,
|
|
1776
|
+
ref_key: "scaleLabels",
|
|
1777
|
+
ref: nn
|
|
1778
|
+
}, [(y(!0), m(d, null, x(ur.value, (e, n) => (y(), m("g", { key: `sl_${n}` }, [e.value >= Z.value.min && e.value <= Z.value.max ? (y(), m("line", {
|
|
1779
|
+
key: 0,
|
|
1780
|
+
x1: Fn.value ? U.value.right : U.value.left,
|
|
1781
|
+
x2: Fn.value ? U.value.right + 5 : U.value.left - 5,
|
|
1782
|
+
y1: e.y,
|
|
1783
|
+
y2: e.y,
|
|
1784
|
+
stroke: P.value.stroke,
|
|
1785
|
+
"stroke-width": P.value.strokeWidth,
|
|
1786
|
+
"stroke-linecap": "round"
|
|
1787
|
+
}, null, 8, ut)) : p("", !0), e.value >= Z.value.min && e.value <= Z.value.max ? (y(), m("text", {
|
|
1788
|
+
key: 1,
|
|
1789
|
+
class: _({ "vue-data-ui-transition": C(dn) }),
|
|
1790
|
+
transform: `translate(${Fn.value ? U.value.right + 8 + P.value.yAxis.dataLabels.offsetX : U.value.left - 8 + P.value.yAxis.dataLabels.offsetX}, ${e.y + V.value.yAxisFontSize / 3})`,
|
|
1791
|
+
"text-anchor": Fn.value ? "start" : "end",
|
|
1792
|
+
"font-size": V.value.yAxisFontSize,
|
|
1793
|
+
fill: P.value.yAxis.dataLabels.color,
|
|
1794
|
+
"font-weight": P.value.yAxis.dataLabels.bold ? "bold" : "normal"
|
|
1795
|
+
}, qe(C(t)({
|
|
1796
|
+
p: P.value.yAxis.dataLabels.prefix,
|
|
1797
|
+
v: e.value,
|
|
1798
|
+
s: P.value.yAxis.dataLabels.suffix,
|
|
1799
|
+
r: P.value.yAxis.dataLabels.roundingValue
|
|
1800
|
+
})), 11, dt)) : p("", !0)]))), 128))], 512)) : p("", !0),
|
|
1801
|
+
P.value.xAxis.dataLabels.show && !P.value.xAxis.dataLabels.datetimeFormatter.enable ? (y(), m("g", {
|
|
1802
|
+
key: 2,
|
|
1803
|
+
ref_key: "timeLabelsEls",
|
|
1804
|
+
ref: rn
|
|
1805
|
+
}, [(y(!0), m(d, null, x(dr.value, (e, t) => (y(), m("g", null, [h("text", {
|
|
1806
|
+
class: "vue-data-ui-time-label",
|
|
1807
|
+
transform: `translate(${U.value.left + X.value * t + X.value / 2}, ${U.value.bottom + V.value.xAxisFontSize * 1.5}), rotate(${P.value.xAxis.dataLabels.rotation})`,
|
|
1808
|
+
"text-anchor": P.value.xAxis.dataLabels.rotation > 0 ? "start" : P.value.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
|
|
1809
|
+
"font-size": V.value.xAxisFontSize,
|
|
1810
|
+
fill: P.value.xAxis.dataLabels.color,
|
|
1811
|
+
"font-weight": P.value.xAxis.dataLabels.bold ? "bold" : "normal"
|
|
1812
|
+
}, qe(e), 9, ft)]))), 256))], 512)) : p("", !0),
|
|
1813
|
+
P.value.xAxis.dataLabels.show && P.value.xAxis.dataLabels.datetimeFormatter.enable ? (y(), m("g", {
|
|
1814
|
+
key: 3,
|
|
1815
|
+
ref_key: "timeLabelsEls",
|
|
1816
|
+
ref: rn
|
|
1817
|
+
}, [(y(!0), m(d, null, x(xr.value, (e, t) => (y(), m("g", null, [h("text", {
|
|
1818
|
+
class: "vue-data-ui-time-label",
|
|
1819
|
+
transform: `translate(${U.value.left + X.value * t + X.value / 2}, ${U.value.bottom + V.value.xAxisFontSize * 1.5}), rotate(${P.value.xAxis.dataLabels.rotation})`,
|
|
1820
|
+
"text-anchor": P.value.xAxis.dataLabels.rotation > 0 ? "start" : P.value.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
|
|
1821
|
+
"font-size": V.value.xAxisFontSize,
|
|
1822
|
+
fill: P.value.xAxis.dataLabels.color,
|
|
1823
|
+
stroke: I.value.backgroundColor,
|
|
1824
|
+
"stroke-width": "3",
|
|
1825
|
+
"stroke-linecap": "round",
|
|
1826
|
+
"stroke-linejoin": "round",
|
|
1827
|
+
"paint-order": "stroke fill",
|
|
1828
|
+
"font-weight": P.value.xAxis.dataLabels.bold ? "bold" : "normal"
|
|
1829
|
+
}, qe(e?.text ?? ""), 9, pt)]))), 256))], 512)) : p("", !0),
|
|
1830
|
+
M.value.type === "candlestick" ? (y(), m(d, { key: 4 }, [h("g", null, [(y(!0), m(d, null, x(Q.value, (e, t) => (y(), m("g", null, [
|
|
1831
|
+
h("rect", {
|
|
1832
|
+
x: e.open.x - F.value.wick.strokeWidth / 2,
|
|
1833
|
+
y: e.high.y,
|
|
1834
|
+
width: F.value.wick.strokeWidth,
|
|
1835
|
+
height: Math.abs(e.high.y - e.low.y),
|
|
1836
|
+
fill: F.value.wick.stroke,
|
|
1837
|
+
stroke: "none",
|
|
1838
|
+
rx: F.value.wick.strokeWidth / 2,
|
|
1839
|
+
class: _({ "vue-data-ui-transition": D.value && !C(R) })
|
|
1840
|
+
}, null, 10, mt),
|
|
1841
|
+
F.value.wick.extremity.shape === "circle" ? (y(), m("g", ht, [h("circle", {
|
|
1842
|
+
cx: e.high.x,
|
|
1843
|
+
cy: e.high.y,
|
|
1844
|
+
r: F.value.wick.extremity.size === "auto" ? X.value / 20 : F.value.wick.extremity.size,
|
|
1845
|
+
fill: F.value.wick.extremity.color,
|
|
1846
|
+
class: _({ "vue-data-ui-transition": D.value && !C(R) })
|
|
1847
|
+
}, null, 10, gt), h("circle", {
|
|
1848
|
+
cx: e.low.x,
|
|
1849
|
+
cy: e.low.y,
|
|
1850
|
+
r: F.value.wick.extremity.size === "auto" ? X.value / 20 : F.value.wick.extremity.size,
|
|
1851
|
+
fill: F.value.wick.extremity.color,
|
|
1852
|
+
class: _({ "vue-data-ui-transition": D.value && !C(R) })
|
|
1853
|
+
}, null, 10, _t)])) : p("", !0),
|
|
1854
|
+
F.value.wick.extremity.shape === "line" ? (y(), m("g", vt, [h("rect", {
|
|
1855
|
+
x: e.high.x - (F.value.wick.extremity.size === "auto" ? X.value * F.value.candle.widthRatio : F.value.wick.extremity.size) / 2,
|
|
1856
|
+
y: e.high.y - F.value.wick.strokeWidth / 2,
|
|
1857
|
+
width: Math.abs(e.high.x - (F.value.wick.extremity.size === "auto" ? X.value * I.value.layout.candle.widthRatio : I.value.layout.wick.extremity.size) / 2 - (e.high.x + (I.value.layout.wick.extremity.size === "auto" ? X.value * I.value.layout.candle.widthRatio : I.value.layout.wick.extremity.size) / 2)),
|
|
1858
|
+
height: F.value.wick.strokeWidth,
|
|
1859
|
+
rx: F.value.wick.strokeWidth / 2,
|
|
1860
|
+
fill: F.value.wick.extremity.color,
|
|
1861
|
+
stroke: "none",
|
|
1862
|
+
class: _({ "vue-data-ui-transition": D.value && !C(R) })
|
|
1863
|
+
}, null, 10, yt), h("rect", {
|
|
1864
|
+
x: e.low.x - (F.value.wick.extremity.size === "auto" ? X.value * F.value.candle.widthRatio : F.value.wick.extremity.size) / 2,
|
|
1865
|
+
y: e.low.y - F.value.wick.strokeWidth / 2,
|
|
1866
|
+
width: Math.abs(e.low.x - (F.value.wick.extremity.size === "auto" ? X.value * I.value.layout.candle.widthRatio : I.value.layout.wick.extremity.size) / 2 - (e.low.x + (I.value.layout.wick.extremity.size === "auto" ? X.value * I.value.layout.candle.widthRatio : I.value.layout.wick.extremity.size) / 2)),
|
|
1867
|
+
height: F.value.wick.strokeWidth,
|
|
1868
|
+
fill: F.value.wick.extremity.color,
|
|
1869
|
+
stroke: "none",
|
|
1870
|
+
rx: F.value.wick.strokeWidth / 2,
|
|
1871
|
+
class: _({ "vue-data-ui-transition": D.value && !C(R) })
|
|
1872
|
+
}, null, 10, bt)])) : p("", !0)
|
|
1873
|
+
]))), 256))]), h("g", null, [(y(!0), m(d, null, x(Q.value, (e, t) => (y(), m("rect", {
|
|
1874
|
+
x: e.open.x - X.value / 2 + X.value * (1 - N.value.widthRatio) / 2,
|
|
1875
|
+
y: e.isBullish ? e.close.y : e.open.y,
|
|
1876
|
+
height: Math.abs(e.close.y - e.open.y) <= 0 ? 1e-4 : Math.abs(e.close.y - e.open.y),
|
|
1877
|
+
width: X.value * N.value.widthRatio <= 0 ? 1e-4 : X.value * N.value.widthRatio,
|
|
1878
|
+
fill: N.value.gradient.underlayer,
|
|
1879
|
+
rx: N.value.borderRadius,
|
|
1880
|
+
stroke: "none",
|
|
1881
|
+
class: _({ "vue-data-ui-transition": D.value && !C(R) })
|
|
1882
|
+
}, null, 10, xt))), 256)), (y(!0), m(d, null, x(Q.value, (e, t) => (y(), m("rect", {
|
|
1883
|
+
x: e.open.x - X.value / 2 + X.value * (1 - N.value.widthRatio) / 2,
|
|
1884
|
+
y: e.isBullish ? e.close.y : e.open.y,
|
|
1885
|
+
height: Math.abs(e.close.y - e.open.y) <= 0 ? 1e-4 : Math.abs(e.close.y - e.open.y),
|
|
1886
|
+
width: X.value * N.value.widthRatio <= 0 ? 1e-4 : X.value * N.value.widthRatio,
|
|
1887
|
+
fill: e.isBullish ? N.value.gradient.show ? `url(#bullish_gradient_${O.value})` : N.value.colors.bullish : N.value.gradient.show ? `url(#bearish_gradient_${O.value})` : N.value.colors.bearish,
|
|
1888
|
+
rx: N.value.borderRadius,
|
|
1889
|
+
stroke: N.value.stroke,
|
|
1890
|
+
"stroke-width": N.value.strokeWidth,
|
|
1891
|
+
"stroke-linecap": "round",
|
|
1892
|
+
"stroke-linejoin": "round",
|
|
1893
|
+
class: _({ "vue-data-ui-transition": D.value && !C(R) })
|
|
1894
|
+
}, null, 10, St))), 256))])], 64)) : p("", !0),
|
|
1895
|
+
M.value.type === "ohlc" ? (y(!0), m(d, { key: 5 }, x(Q.value, (e, t) => (y(), m("g", { key: `ohlc_${e.absoluteIndex}` }, [h("path", {
|
|
1896
|
+
d: `M ${e.high.x},${e.high.y} ${e.low.x},${e.low.y} M${e.open.x - Math.min(6, X.value / 3)},${e.open.y} ${e.open.x},${e.open.y} M${e.close.x},${e.close.y} ${e.close.x + Math.min(6, X.value / 3)},${e.close.y}`,
|
|
1897
|
+
stroke: e.isBullish ? N.value.colors.bullish : N.value.colors.bearish,
|
|
1898
|
+
"stroke-width": 1,
|
|
1899
|
+
class: _({ "vue-data-ui-transition": C(dn) }),
|
|
1900
|
+
"stroke-linecap": "round",
|
|
1901
|
+
"stroke-linejoin": "round"
|
|
1902
|
+
}, null, 10, Ct)]))), 128)) : p("", !0),
|
|
1903
|
+
h("g", null, [(y(!0), m(d, null, x(Q.value, (e, t) => (y(), m("rect", {
|
|
1904
|
+
x: U.value.left + t * X.value,
|
|
1905
|
+
y: U.value.top,
|
|
1906
|
+
height: U.value.height <= 0 ? 1e-4 : U.value.height,
|
|
1907
|
+
width: X.value <= 0 ? 1e-4 : X.value,
|
|
1908
|
+
fill: k.value === t || sn.value === t ? C(se)(F.value.selector.color, F.value.selector.opacity) : "transparent",
|
|
1909
|
+
onMouseover: () => Er(t, e, "pointer"),
|
|
1910
|
+
onMouseleave: () => Tr(t, e),
|
|
1911
|
+
onClick: () => wr(t, e)
|
|
1912
|
+
}, null, 40, wt))), 256))])
|
|
1913
|
+
])) : p("", !0),
|
|
1914
|
+
ai.value ? (y(), m("rect", {
|
|
1915
|
+
key: 2,
|
|
1916
|
+
x: ai.value.x,
|
|
1917
|
+
y: ai.value.y,
|
|
1918
|
+
width: ai.value.width,
|
|
1919
|
+
height: ai.value.height,
|
|
1920
|
+
fill: Un.value.selection.fill,
|
|
1921
|
+
"fill-opacity": Un.value.selection.fillOpacity,
|
|
1922
|
+
stroke: Un.value.selection.stroke,
|
|
1923
|
+
"stroke-opacity": Un.value.selection.strokeOpacity,
|
|
1924
|
+
"stroke-width": Un.value.selection.strokeWidth,
|
|
1925
|
+
"stroke-dasharray": Un.value.selection.strokeDasharray,
|
|
1926
|
+
"stroke-linecap": "round",
|
|
1927
|
+
"stroke-linejoin": "round",
|
|
1928
|
+
"pointer-events": "none"
|
|
1929
|
+
}, null, 8, Tt)) : p("", !0),
|
|
1930
|
+
qn.value ? (y(), m("rect", Be({ key: 3 }, Ln.value, {
|
|
1931
|
+
"data-start": G.value.start,
|
|
1932
|
+
"data-end": G.value.end
|
|
1933
|
+
}), null, 16, Et)) : p("", !0),
|
|
1934
|
+
S(e.$slots, "svg", { svg: {
|
|
1935
|
+
...V.value,
|
|
1936
|
+
data: Q.value,
|
|
1937
|
+
drawingArea: U.value,
|
|
1938
|
+
isPrintingImg: C(Dn) || C(On) || C(Xr),
|
|
1939
|
+
isPrintingSvg: C(Zr)
|
|
1940
|
+
} }, void 0, !0)
|
|
1941
|
+
], 46, tt)), e.$slots.hint ? (y(), m("div", Dt, [S(e.$slots, "hint", v(g({
|
|
1942
|
+
hint: M.value.a11y.translations.keyboardNavigation,
|
|
1943
|
+
isVisible: un.value
|
|
1944
|
+
})), void 0, !0)])) : p("", !0)]),
|
|
1945
|
+
e.$slots.watermark ? (y(), m("div", Ot, [S(e.$slots, "watermark", v(g({ isPrinting: C(Dn) || C(On) || C(Xr) || C(Zr) })), void 0, !0)])) : p("", !0),
|
|
1946
|
+
I.value.zoom.show && W.value > 6 && Ut.value && jr.value ? (y(), Fe(Ae, {
|
|
1947
|
+
key: 6,
|
|
1948
|
+
ref_key: "chartSlicer",
|
|
1949
|
+
ref: Xt,
|
|
1950
|
+
"data-dom-to-png-ignore-layout": "",
|
|
1951
|
+
allMinimaps: cr.value,
|
|
1952
|
+
background: I.value.zoom.color,
|
|
1953
|
+
borderColor: I.value.backgroundColor,
|
|
1954
|
+
customFormat: I.value.zoom.customFormat,
|
|
1955
|
+
cutNullValues: !1,
|
|
1956
|
+
enableRangeHandles: I.value.zoom.enableRangeHandles,
|
|
1957
|
+
enableSelectionDrag: I.value.zoom.enableSelectionDrag,
|
|
1958
|
+
end: G.value.end,
|
|
1959
|
+
focusOnDrag: I.value.zoom.focusOnDrag,
|
|
1960
|
+
focusRangeRatio: I.value.zoom.focusRangeRatio,
|
|
1961
|
+
fontSize: I.value.zoom.fontSize,
|
|
1962
|
+
immediate: !I.value.zoom.preview.enable,
|
|
1963
|
+
inputColor: I.value.zoom.color,
|
|
1964
|
+
isPreview: qn.value,
|
|
1965
|
+
labelLeft: Sr.value.start || "",
|
|
1966
|
+
labelRight: Sr.value.end || "",
|
|
1967
|
+
max: W.value,
|
|
1968
|
+
min: 0,
|
|
1969
|
+
minimap: I.value.zoom.minimap.show ? C(z).map((e) => e[2]) : [],
|
|
1970
|
+
minimapCompact: I.value.zoom.minimap.compact,
|
|
1971
|
+
minimapFrameColor: I.value.zoom.minimap.frameColor,
|
|
1972
|
+
minimapIndicatorColor: I.value.zoom.minimap.indicatorColor,
|
|
1973
|
+
minimapMerged: !1,
|
|
1974
|
+
minimapSelectedColor: I.value.zoom.minimap.selectedColor,
|
|
1975
|
+
minimapSelectedColorOpacity: I.value.zoom.minimap.selectedColorOpacity,
|
|
1976
|
+
minimapSelectedIndex: k.value,
|
|
1977
|
+
minimapSelectionRadius: 1,
|
|
1978
|
+
preciseLabels: yr.value,
|
|
1979
|
+
refreshEndPoint: I.value.zoom.endIndex === null ? W.value : I.value.zoom.endIndex + 1,
|
|
1980
|
+
refreshStartPoint: I.value.zoom.startIndex === null ? 0 : I.value.zoom.startIndex,
|
|
1981
|
+
selectColor: I.value.zoom.highlightColor,
|
|
1982
|
+
selectedSeries: C(z),
|
|
1983
|
+
smoothMinimap: !1,
|
|
1984
|
+
start: G.value.start,
|
|
1985
|
+
textColor: I.value.color,
|
|
1986
|
+
timeLabels: fr.value,
|
|
1987
|
+
usePreciseLabels: P.value.xAxis.dataLabels.datetimeFormatter.enable && !I.value.zoom.useDefaultFormat,
|
|
1988
|
+
useResetSlot: I.value.zoom.useResetSlot,
|
|
1989
|
+
valueEnd: G.value.end,
|
|
1990
|
+
valueStart: G.value.start,
|
|
1991
|
+
verticalHandles: I.value.zoom.minimap.verticalHandles,
|
|
1992
|
+
minScale: P.value.yAxis.scale.min,
|
|
1993
|
+
maxScale: P.value.yAxis.scale.max,
|
|
1994
|
+
maxWidth: I.value.zoom.maxWidth,
|
|
1995
|
+
minimapLeftInsetRatio: V.value.width > 0 && I.value.zoom.autoFit ? U.value.left / V.value.width : null,
|
|
1996
|
+
minimapRightInsetRatio: V.value.width > 0 && I.value.zoom.autoFit ? (V.value.width - U.value.right) / V.value.width : null,
|
|
1997
|
+
additionalMinimapHeight: I.value.zoom.minimap.additionalHeight,
|
|
1998
|
+
handleType: I.value.zoom.minimap.handleType,
|
|
1999
|
+
handleIconColor: I.value.zoom.minimap.handleIconColor,
|
|
2000
|
+
handleBorderWidth: I.value.zoom.minimap.handleBorderWidth,
|
|
2001
|
+
handleBorderColor: I.value.zoom.minimap.handleBorderColor,
|
|
2002
|
+
handleFill: I.value.zoom.minimap.handleFill,
|
|
2003
|
+
handleWidth: I.value.zoom.minimap.handleWidth,
|
|
2004
|
+
"onUpdate:end": ri,
|
|
2005
|
+
"onUpdate:start": ni,
|
|
2006
|
+
onTrapMouse: ei,
|
|
2007
|
+
onReset: n[0] ||= () => kr({
|
|
2008
|
+
force: !0,
|
|
2009
|
+
publish: !0
|
|
2010
|
+
}),
|
|
2011
|
+
onFutureEnd: n[1] ||= (e) => Jn("end", e),
|
|
2012
|
+
onFutureStart: n[2] ||= (e) => Jn("start", e)
|
|
2013
|
+
}, {
|
|
2014
|
+
"reset-action": w(({ reset: t }) => [S(e.$slots, "reset-action", v(g({ reset: t })), void 0, !0)]),
|
|
2015
|
+
slotMap: w(({ height: e, unitW: t }) => [(y(!0), m(d, null, x(sr.value({
|
|
2016
|
+
minimapH: e,
|
|
2017
|
+
unitW: t
|
|
2018
|
+
}), (e, n) => (y(), m("g", null, [h("path", {
|
|
2019
|
+
d: `M ${e.high.x},${e.high.y} ${e.low.x},${e.low.y}`,
|
|
2020
|
+
stroke: e.isBullish ? N.value.colors.bullish : N.value.colors.bearish,
|
|
2021
|
+
"stroke-width": 1,
|
|
2022
|
+
style: He({ opacity: n >= K.value.start && n <= K.value.end ? 1 : .6 })
|
|
2023
|
+
}, null, 12, kt), h("path", {
|
|
2024
|
+
d: `M ${e.open.x},${e.open.y} ${e.close.x},${e.close.y}`,
|
|
2025
|
+
stroke: e.isBullish ? N.value.colors.bullish : N.value.colors.bearish,
|
|
2026
|
+
"stroke-width": Math.min(6, t / 1.5),
|
|
2027
|
+
style: He({ opacity: n >= K.value.start && n <= K.value.end ? 1 : .6 })
|
|
2028
|
+
}, null, 12, At)]))), 256))]),
|
|
2029
|
+
_: 3
|
|
2030
|
+
}, 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.minimapLeftInsetRatio.minimapRightInsetRatio.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth".split("."))) : p("", !0),
|
|
2031
|
+
h("div", {
|
|
2032
|
+
ref_key: "chartLegend",
|
|
2033
|
+
ref: Yt
|
|
2034
|
+
}, [S(e.$slots, "legend", { legend: Q.value }, void 0, !0)], 512),
|
|
2035
|
+
e.$slots.source ? (y(), m("div", {
|
|
2036
|
+
key: 7,
|
|
2037
|
+
ref_key: "source",
|
|
2038
|
+
ref: Zt,
|
|
2039
|
+
dir: "auto"
|
|
2040
|
+
}, [S(e.$slots, "source", {}, void 0, !0)], 512)) : p("", !0),
|
|
2041
|
+
Re(C(Nt), {
|
|
2042
|
+
teleportTo: I.value.tooltip.teleportTo,
|
|
2043
|
+
show: H.value.showTooltip && Gt.value,
|
|
2044
|
+
backgroundColor: I.value.tooltip.backgroundColor,
|
|
2045
|
+
color: I.value.tooltip.color,
|
|
2046
|
+
borderRadius: I.value.tooltip.borderRadius,
|
|
2047
|
+
borderColor: I.value.tooltip.borderColor,
|
|
2048
|
+
borderWidth: I.value.tooltip.borderWidth,
|
|
2049
|
+
fontSize: I.value.tooltip.fontSize,
|
|
2050
|
+
backgroundOpacity: I.value.tooltip.backgroundOpacity,
|
|
2051
|
+
position: I.value.tooltip.position,
|
|
2052
|
+
offsetX: I.value.tooltip.offsetX,
|
|
2053
|
+
offsetY: I.value.tooltip.offsetY,
|
|
2054
|
+
parent: A.value,
|
|
2055
|
+
content: Kt.value,
|
|
2056
|
+
isFullscreen: Lr.value,
|
|
2057
|
+
isCustom: I.value.tooltip.customFormat && typeof I.value.tooltip.customFormat == "function",
|
|
2058
|
+
smooth: I.value.tooltip.smooth,
|
|
2059
|
+
backdropFilter: I.value.tooltip.backdropFilter,
|
|
2060
|
+
smoothForce: I.value.tooltip.smoothForce,
|
|
2061
|
+
smoothSnapThreshold: I.value.tooltip.smoothSnapThreshold,
|
|
2062
|
+
isA11yMode: ln.value === "keyboard",
|
|
2063
|
+
a11yPosition: cn.value
|
|
2064
|
+
}, {
|
|
2065
|
+
"tooltip-before": w(() => [S(e.$slots, "tooltip-before", v(g({ ...Cr.value })), void 0, !0)]),
|
|
2066
|
+
tooltip: w(() => [S(e.$slots, "tooltip", v(g({ ...Cr.value })), void 0, !0)]),
|
|
2067
|
+
"tooltip-after": w(() => [S(e.$slots, "tooltip-after", v(g({ ...Cr.value })), void 0, !0)]),
|
|
2068
|
+
_: 3
|
|
2069
|
+
}, 8, [
|
|
2070
|
+
"teleportTo",
|
|
2071
|
+
"show",
|
|
2072
|
+
"backgroundColor",
|
|
2073
|
+
"color",
|
|
2074
|
+
"borderRadius",
|
|
2075
|
+
"borderColor",
|
|
2076
|
+
"borderWidth",
|
|
2077
|
+
"fontSize",
|
|
2078
|
+
"backgroundOpacity",
|
|
2079
|
+
"position",
|
|
2080
|
+
"offsetX",
|
|
2081
|
+
"offsetY",
|
|
2082
|
+
"parent",
|
|
2083
|
+
"content",
|
|
2084
|
+
"isFullscreen",
|
|
2085
|
+
"isCustom",
|
|
2086
|
+
"smooth",
|
|
2087
|
+
"backdropFilter",
|
|
2088
|
+
"smoothForce",
|
|
2089
|
+
"smoothSnapThreshold",
|
|
2090
|
+
"isA11yMode",
|
|
2091
|
+
"a11yPosition"
|
|
2092
|
+
]),
|
|
2093
|
+
Ut.value && L.value.buttons.table ? (y(), Fe(Ge(Kr.value.component), Be({ key: 8 }, Kr.value.props, {
|
|
2094
|
+
ref_key: "tableUnit",
|
|
2095
|
+
ref: an,
|
|
2096
|
+
onClose: qr
|
|
2097
|
+
}), Ie({
|
|
2098
|
+
content: w(() => [(y(), Fe(C(Ft), {
|
|
2099
|
+
key: `table_${en.value}`,
|
|
2100
|
+
colNames: Ir.value.colNames,
|
|
2101
|
+
head: Ir.value.head,
|
|
2102
|
+
body: Ir.value.body,
|
|
2103
|
+
config: Ir.value.config,
|
|
2104
|
+
title: M.value.table.useDialog ? "" : Kr.value.title,
|
|
2105
|
+
withCloseButton: !M.value.table.useDialog,
|
|
2106
|
+
isCursorPointer: fn.value,
|
|
2107
|
+
onClose: qr
|
|
2108
|
+
}, {
|
|
2109
|
+
th: w(({ th: e }) => [Le(qe(e), 1)]),
|
|
2110
|
+
td: w(({ td: e }) => [h("div", { innerHTML: e }, null, 8, jt)]),
|
|
2111
|
+
_: 1
|
|
2112
|
+
}, 8, [
|
|
2113
|
+
"colNames",
|
|
2114
|
+
"head",
|
|
2115
|
+
"body",
|
|
2116
|
+
"config",
|
|
2117
|
+
"title",
|
|
2118
|
+
"withCloseButton",
|
|
2119
|
+
"isCursorPointer"
|
|
2120
|
+
]))]),
|
|
2121
|
+
_: 2
|
|
2122
|
+
}, [M.value.table.useDialog ? {
|
|
2123
|
+
name: "title",
|
|
2124
|
+
fn: w(() => [Le(qe(Kr.value.title), 1)]),
|
|
2125
|
+
key: "0"
|
|
2126
|
+
} : void 0, M.value.table.useDialog ? {
|
|
2127
|
+
name: "actions",
|
|
2128
|
+
fn: w(() => [h("button", {
|
|
2129
|
+
tabindex: "0",
|
|
2130
|
+
class: "vue-ui-user-options-button",
|
|
2131
|
+
onClick: n[3] ||= (e) => Fr(L.value.callbacks.csv),
|
|
2132
|
+
style: He({ cursor: fn.value ? "pointer" : "default" })
|
|
2133
|
+
}, [Re(C(Mt), {
|
|
2134
|
+
name: "fileCsv",
|
|
2135
|
+
stroke: Kr.value.props.color
|
|
2136
|
+
}, null, 8, ["stroke"])], 4)]),
|
|
2137
|
+
key: "1"
|
|
2138
|
+
} : void 0]), 1040)) : p("", !0),
|
|
2139
|
+
S(e.$slots, "skeleton", {}, () => [C(R) ? (y(), Fe(ve, { key: 0 })) : p("", !0)], !0)
|
|
2140
|
+
], 46, Qe));
|
|
2141
|
+
}
|
|
2142
|
+
}, [["__scopeId", "data-v-bc12659d"]]);
|
|
2143
|
+
//#endregion
|
|
2144
|
+
export { Ze as n, Mt as t };
|