vue-data-ui 2.4.51 → 2.4.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-BUz63pb2.js → Arrow-BuBoE64l.js} +1 -1
- package/dist/{Arrow-2a_SwBgz.cjs → Arrow-CFlFdPC5.cjs} +1 -1
- package/dist/{BaseIcon-BASl_NFX.cjs → BaseIcon-CfhoS_qC.cjs} +1 -1
- package/dist/{BaseIcon-CmiukQBl.js → BaseIcon-zmxwsaLW.js} +1 -1
- package/dist/{DataTable-DGf6RrOJ.js → DataTable-COkA4Nyz.js} +2 -2
- package/dist/{DataTable-G3ICK-5h.cjs → DataTable-CwAdpLng.cjs} +1 -1
- package/dist/{Legend-BiuPlEMg.cjs → Legend-CR9ydX8N.cjs} +1 -1
- package/dist/{Legend-BLaZxMge.js → Legend-bYlSC7I7.js} +1 -1
- package/dist/{PackageVersion-Bj34UNnQ.cjs → PackageVersion-C1F3QLoY.cjs} +1 -1
- package/dist/{PackageVersion-CxJghxYD.js → PackageVersion-Dz3KcTL4.js} +1 -1
- package/dist/{PenAndPaper-ZdZEumki.js → PenAndPaper-BycdTwSP.js} +3 -3
- package/dist/{PenAndPaper-D9yQnc0e.cjs → PenAndPaper-DDheVRNG.cjs} +1 -1
- package/dist/{Shape-yducHWd0.cjs → Shape-BBp5EwJH.cjs} +1 -1
- package/dist/{Shape-DIKzzpFm.js → Shape-BDJJ38uM.js} +1 -1
- package/dist/{Slicer-BHS9W4MJ.cjs → Slicer-7oTpm-cZ.cjs} +1 -1
- package/dist/{Slicer-Cxdl3cDt.js → Slicer-D_DaIThC.js} +2 -2
- package/dist/{Title-Bk_55doC.cjs → Title-B7ruS8yl.cjs} +1 -1
- package/dist/{Title-aSAft5dl.js → Title-aMb2ETf7.js} +1 -1
- package/dist/{Tooltip-smutPF--.js → Tooltip-BRZ3DT4p.js} +1 -1
- package/dist/{Tooltip-G7ENx87_.cjs → Tooltip-BqSN71SL.cjs} +1 -1
- package/dist/{index-DhDYBLBe.cjs → index-BkXYJDpD.cjs} +1 -1
- package/dist/{index-BbPeL8Gp.js → index-K5uyh1gA.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-BphUExEh.cjs → useNestedProp-C6IvqE-r.cjs} +1 -1
- package/dist/{useNestedProp-BN8claGG.js → useNestedProp-DifqJZAs.js} +1 -1
- package/dist/{usePrinter-2_QjJFdH.cjs → usePrinter-DHv-BwME.cjs} +1 -1
- package/dist/{usePrinter-DaybDVqP.js → usePrinter-p_ZZlGc9.js} +1 -1
- package/dist/{vue-data-ui-Ckbp-yIf.js → vue-data-ui-3PlAeIlX.js} +60 -60
- package/dist/{vue-data-ui-C5vsHRHD.cjs → vue-data-ui-M0E2b8Dw.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-wDYs3sVe.js → vue-ui-3d-bar-PrijRaoI.js} +30 -30
- package/dist/{vue-ui-3d-bar-DUgumRsg.cjs → vue-ui-3d-bar-VQyMytda.cjs} +2 -2
- package/dist/{vue-ui-accordion-5d5iVpr7.js → vue-ui-accordion-CsJT7Az3.js} +3 -3
- package/dist/{vue-ui-accordion-B7tNzRWB.cjs → vue-ui-accordion-kr18wKfc.cjs} +1 -1
- package/dist/vue-ui-age-pyramid-BV1MgH8J.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-BH1khaaq.js → vue-ui-age-pyramid-DFYykOow.js} +42 -42
- package/dist/{vue-ui-annotator-B9VKE_qz.js → vue-ui-annotator-Blg3LdqF.js} +1 -1
- package/dist/{vue-ui-annotator-jXkB5XnD.cjs → vue-ui-annotator-DffUZR4a.cjs} +1 -1
- package/dist/vue-ui-bullet-DSampkai.cjs +34 -0
- package/dist/{vue-ui-bullet-BLi9CSZw.js → vue-ui-bullet-Ybz4qPWl.js} +41 -41
- package/dist/{vue-ui-candlestick-Da4ygGXR.cjs → vue-ui-candlestick-BxcwK8UI.cjs} +2 -2
- package/dist/{vue-ui-candlestick-Bjz1uFbv.js → vue-ui-candlestick-DsVBdCz_.js} +61 -61
- package/dist/{vue-ui-carousel-table-B6zgTL-W.js → vue-ui-carousel-table-C2ThrWYt.js} +50 -50
- package/dist/vue-ui-carousel-table-DkWNe0mJ.cjs +1 -0
- package/dist/{vue-ui-chestnut-D5HpkuIa.js → vue-ui-chestnut-BacH0ZYK.js} +66 -66
- package/dist/{vue-ui-chestnut-C_N7EbjQ.cjs → vue-ui-chestnut-Cw8LKuZG.cjs} +3 -3
- package/dist/{vue-ui-cursor-DZNIbvR2.js → vue-ui-cursor-CMKSCQ-v.js} +2 -2
- package/dist/{vue-ui-cursor-A_siHYBc.cjs → vue-ui-cursor-D2kQNFWy.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DCqe4BZg.js → vue-ui-dashboard-9PYl4mWC.js} +2 -2
- package/dist/{vue-ui-dashboard-BfPJyiY9.cjs → vue-ui-dashboard-BHwlhK33.cjs} +1 -1
- package/dist/{vue-ui-digits-BEhLa3jI.cjs → vue-ui-digits-2yacgzrJ.cjs} +1 -1
- package/dist/{vue-ui-digits-BEWCnojc.js → vue-ui-digits-CyTjq_oN.js} +2 -2
- package/dist/vue-ui-donut-BNv1eGiu.cjs +1 -0
- package/dist/{vue-ui-donut-g5ZLhYPx.js → vue-ui-donut-BxLlCBhU.js} +57 -57
- package/dist/{vue-ui-donut-evolution-Cu6dmlT2.js → vue-ui-donut-evolution-Bw9hfwuO.js} +66 -66
- package/dist/vue-ui-donut-evolution-DGjHfyq8.cjs +1 -0
- package/dist/vue-ui-dumbbell-CjHcgzti.cjs +9 -0
- package/dist/{vue-ui-dumbbell-bb4-Ep6o.js → vue-ui-dumbbell-D0PjpD19.js} +46 -46
- package/dist/{vue-ui-flow-hD0F6mTK.js → vue-ui-flow-BuTJcn6b.js} +43 -43
- package/dist/vue-ui-flow-Dc-KV4a3.cjs +1 -0
- package/dist/{vue-ui-funnel-hcbE4yky.js → vue-ui-funnel-CxO1aav3.js} +59 -59
- package/dist/vue-ui-funnel-QQGqK4OD.cjs +1 -0
- package/dist/{vue-ui-galaxy-ByKjxVWV.js → vue-ui-galaxy-B2uwYVgz.js} +54 -54
- package/dist/vue-ui-galaxy-CABgAX76.cjs +1 -0
- package/dist/vue-ui-gauge-CTEPbzWe.cjs +1 -0
- package/dist/{vue-ui-gauge-PGirbe6O.js → vue-ui-gauge-CqhJx__t.js} +70 -70
- package/dist/{vue-ui-gizmo-ChSfBYZ_.js → vue-ui-gizmo-D7G-8Al-.js} +3 -3
- package/dist/{vue-ui-gizmo-CHMApil6.cjs → vue-ui-gizmo-DlQOItIS.cjs} +1 -1
- package/dist/vue-ui-heatmap-BOwY6qNR.cjs +1 -0
- package/dist/{vue-ui-heatmap-CK3FIWpo.js → vue-ui-heatmap-DLNzJh--.js} +87 -87
- package/dist/{vue-ui-history-plot-EmQ-Byiz.js → vue-ui-history-plot-CH2mN74k.js} +75 -75
- package/dist/vue-ui-history-plot-EiYWpITj.cjs +1 -0
- package/dist/{vue-ui-kpi-DjC68pSz.js → vue-ui-kpi-Cb3fLQlS.js} +3 -3
- package/dist/{vue-ui-kpi-BdungaO2.cjs → vue-ui-kpi-DB00TrXv.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-CzrblCCD.js → vue-ui-mini-loader-Czn2u6m3.js} +2 -2
- package/dist/{vue-ui-mini-loader-jwL_pZjb.cjs → vue-ui-mini-loader-DAaZwOTE.cjs} +1 -1
- package/dist/{vue-ui-molecule-DBQJQs4Y.js → vue-ui-molecule-BAwzIU19.js} +52 -52
- package/dist/vue-ui-molecule-DZ6Z4eru.cjs +1 -0
- package/dist/vue-ui-mood-radar-BL3vQzMq.cjs +1 -0
- package/dist/{vue-ui-mood-radar-Ca9wPZpJ.js → vue-ui-mood-radar-BXOWHB57.js} +35 -35
- package/dist/{vue-ui-nested-donuts-DEdS6dpj.cjs → vue-ui-nested-donuts-D1EF5IEw.cjs} +2 -2
- package/dist/{vue-ui-nested-donuts-C8at93dN.js → vue-ui-nested-donuts-F1pwFa1Y.js} +90 -90
- package/dist/{vue-ui-onion-B-PXxNu6.js → vue-ui-onion-C9dEaRbc.js} +52 -52
- package/dist/{vue-ui-onion-B2ioudP5.cjs → vue-ui-onion-nA8sXxh-.cjs} +2 -2
- package/dist/{vue-ui-parallel-coordinate-plot-ByM3So9k.js → vue-ui-parallel-coordinate-plot-Cgc8JHMy.js} +62 -62
- package/dist/{vue-ui-parallel-coordinate-plot-DtJi9cT0.cjs → vue-ui-parallel-coordinate-plot-DL4DOhyh.cjs} +2 -2
- package/dist/{vue-ui-quadrant-BqOJBcsI.js → vue-ui-quadrant-C_hJHr9T.js} +50 -50
- package/dist/vue-ui-quadrant-DJGxKeBq.cjs +1 -0
- package/dist/{vue-ui-quick-chart-Bt9KA82P.cjs → vue-ui-quick-chart-C5v_8Kpw.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BfXxT3KM.js → vue-ui-quick-chart-D4k-zSan.js} +9 -9
- package/dist/vue-ui-radar-BeGVGueh.cjs +1 -0
- package/dist/{vue-ui-radar-BKpD9xDr.js → vue-ui-radar-WKQ-TavD.js} +59 -59
- package/dist/{vue-ui-rating-DQRuqev5.js → vue-ui-rating-BrSnMkzF.js} +2 -2
- package/dist/{vue-ui-rating-BE545aI4.cjs → vue-ui-rating-DI3L8UYN.cjs} +1 -1
- package/dist/vue-ui-relation-circle-BJ_TOhIp.cjs +1 -0
- package/dist/{vue-ui-relation-circle-nZ2nBpWX.js → vue-ui-relation-circle-DzZ5H4og.js} +56 -56
- package/dist/{vue-ui-rings-B7JzZ3ub.cjs → vue-ui-rings-1qwg2E0O.cjs} +2 -2
- package/dist/{vue-ui-rings-C1PV0873.js → vue-ui-rings-43dY-4_7.js} +65 -65
- package/dist/vue-ui-scatter-cTK10i0K.cjs +1 -0
- package/dist/{vue-ui-scatter-dgs1m3-2.js → vue-ui-scatter-q6Sfqa4W.js} +102 -102
- package/dist/{vue-ui-screenshot-Dxj0l8Jg.js → vue-ui-screenshot-CEy169Mc.js} +1 -1
- package/dist/{vue-ui-screenshot--cHV0jG3.cjs → vue-ui-screenshot-gOGGT_ti.cjs} +1 -1
- package/dist/{vue-ui-skeleton-lkPDknHn.cjs → vue-ui-skeleton-BTN1PKkz.cjs} +1 -1
- package/dist/{vue-ui-skeleton-Bniq21d9.js → vue-ui-skeleton-BhA2lIT6.js} +3 -3
- package/dist/{vue-ui-smiley-D4DAZIpA.js → vue-ui-smiley-BAFdctGJ.js} +2 -2
- package/dist/{vue-ui-smiley-CozXoiti.cjs → vue-ui-smiley-BIEXWWWa.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-ZqrwhwqS.js → vue-ui-spark-trend-Deg6oJxD.js} +5 -5
- package/dist/{vue-ui-spark-trend-CSqyvI_K.cjs → vue-ui-spark-trend-LqnAP3mZ.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-Bph8KIjk.cjs → vue-ui-sparkbar-CJR8pSqp.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-q0G4GvFm.js → vue-ui-sparkbar-Dm393iij.js} +4 -4
- package/dist/{vue-ui-sparkgauge-nSAW83dN.cjs → vue-ui-sparkgauge-DpP1XF6C.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-DA_h9jcN.js → vue-ui-sparkgauge-WTo7H8eC.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-BLYhRNpt.cjs → vue-ui-sparkhistogram-CEvdVaLZ.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-B1WyBiq_.js → vue-ui-sparkhistogram-DNVBeCU9.js} +5 -5
- package/dist/{vue-ui-sparkline-PNix1-R9.cjs → vue-ui-sparkline-B87AKRMY.cjs} +1 -1
- package/dist/{vue-ui-sparkline-ccfl0s3m.js → vue-ui-sparkline-Bcn_JAfC.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-DpuvEumy.cjs → vue-ui-sparkstackbar-Cmafq74u.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-PNKwVRu8.js → vue-ui-sparkstackbar-DPPTp1Tm.js} +5 -5
- package/dist/{vue-ui-stackbar-BBYnF8qm.js → vue-ui-stackbar-BeXW23yH.js} +43 -43
- package/dist/vue-ui-stackbar-DeFiDh8a.cjs +6 -0
- package/dist/vue-ui-strip-plot-5n6Om5PH.cjs +1 -0
- package/dist/{vue-ui-strip-plot-TVlnzXFq.js → vue-ui-strip-plot-CG-wp65N.js} +78 -78
- package/dist/{vue-ui-table-CHdv3KuM.cjs → vue-ui-table-Bbfdq7B8.cjs} +1 -1
- package/dist/{vue-ui-table-CsEajH9S.js → vue-ui-table-BzuWkWse.js} +1 -1
- package/dist/vue-ui-table-heatmap--Uj5nFcF.cjs +1 -0
- package/dist/{vue-ui-table-heatmap-CubRipoB.js → vue-ui-table-heatmap-obAYC2HB.js} +38 -38
- package/dist/vue-ui-table-sparkline-Buh41Ovt.cjs +1 -0
- package/dist/{vue-ui-table-sparkline-YV8DUOqh.js → vue-ui-table-sparkline-CW0-ubzl.js} +293 -247
- package/dist/{vue-ui-thermometer-DmMjSLc1.js → vue-ui-thermometer-BmgPuIr6.js} +74 -74
- package/dist/vue-ui-thermometer-DW10BlzG.cjs +1 -0
- package/dist/{vue-ui-timer-DvE_nqd9.js → vue-ui-timer-6eWSNYld.js} +5 -5
- package/dist/{vue-ui-timer-DteYgv9y.cjs → vue-ui-timer-CKp_yNVJ.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CCrkDgjX.js → vue-ui-tiremarks-DeEI5TAa.js} +46 -46
- package/dist/vue-ui-tiremarks-nb8r7akm.cjs +1 -0
- package/dist/vue-ui-treemap-B54QUZ46.cjs +1 -0
- package/dist/{vue-ui-treemap-C4A4spvg.js → vue-ui-treemap-tlPZye6M.js} +91 -91
- package/dist/{vue-ui-vertical-bar-8iL1xiaz.js → vue-ui-vertical-bar-BIst1a32.js} +67 -67
- package/dist/{vue-ui-vertical-bar-B60lSXNq.cjs → vue-ui-vertical-bar-CCXF79YU.cjs} +2 -2
- package/dist/vue-ui-waffle-Dctw-uNI.cjs +1 -0
- package/dist/{vue-ui-waffle-CaYNz-Kd.js → vue-ui-waffle-iJT4g4Ht.js} +48 -48
- package/dist/vue-ui-wheel-DnCpgZZo.cjs +1 -0
- package/dist/{vue-ui-wheel-BRR2rGou.js → vue-ui-wheel-v1_jsNWp.js} +36 -36
- package/dist/vue-ui-word-cloud-BXa6XzUJ.cjs +1 -0
- package/dist/{vue-ui-word-cloud-y2GGxwoq.js → vue-ui-word-cloud-DR8E1ArH.js} +66 -66
- package/dist/{vue-ui-xy-CXoWP8bh.js → vue-ui-xy-BZ3lbw6i.js} +14 -14
- package/dist/{vue-ui-xy-CbM75yXK.cjs → vue-ui-xy-CvFWhRR-.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-DWvIvSry.cjs → vue-ui-xy-canvas-BVw3zOIC.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-D7MrUJj7.js → vue-ui-xy-canvas-hPcU2SBK.js} +53 -53
- package/package.json +1 -1
- package/dist/vue-ui-age-pyramid-Dxx1mVwR.cjs +0 -1
- package/dist/vue-ui-bullet-QrXtipbT.cjs +0 -34
- package/dist/vue-ui-carousel-table-Cfif8Oiz.cjs +0 -1
- package/dist/vue-ui-donut-By3QRfkV.cjs +0 -1
- package/dist/vue-ui-donut-evolution-DEABWsj0.cjs +0 -1
- package/dist/vue-ui-dumbbell-Dfb1l5qP.cjs +0 -9
- package/dist/vue-ui-flow-CCvTnu7z.cjs +0 -1
- package/dist/vue-ui-funnel-DKxAPRi_.cjs +0 -1
- package/dist/vue-ui-galaxy-D2kmqwpI.cjs +0 -1
- package/dist/vue-ui-gauge-BFA_unjg.cjs +0 -1
- package/dist/vue-ui-heatmap-C0VxwPhr.cjs +0 -1
- package/dist/vue-ui-history-plot-BmGodgUx.cjs +0 -1
- package/dist/vue-ui-molecule-Dzh-0SWI.cjs +0 -1
- package/dist/vue-ui-mood-radar-DV6ZZIXF.cjs +0 -1
- package/dist/vue-ui-quadrant-CIr4i6cC.cjs +0 -1
- package/dist/vue-ui-radar-Czmsd_uv.cjs +0 -1
- package/dist/vue-ui-relation-circle-B1uMTqFP.cjs +0 -1
- package/dist/vue-ui-scatter-CTI943ks.cjs +0 -1
- package/dist/vue-ui-stackbar-D4AIFoQT.cjs +0 -6
- package/dist/vue-ui-strip-plot-ClNxSw9M.cjs +0 -1
- package/dist/vue-ui-table-heatmap-BE3UT8U9.cjs +0 -1
- package/dist/vue-ui-table-sparkline-BeYviUrb.cjs +0 -1
- package/dist/vue-ui-thermometer-C6lMWRiF.cjs +0 -1
- package/dist/vue-ui-tiremarks-PGGgsNgS.cjs +0 -1
- package/dist/vue-ui-treemap-BzRVKqXL.cjs +0 -1
- package/dist/vue-ui-waffle-O8pAEf4X.cjs +0 -1
- package/dist/vue-ui-wheel-CnFdB_B1.cjs +0 -1
- package/dist/vue-ui-word-cloud-X4mp280j.cjs +0 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BkXYJDpD.cjs"),A=require("./useNestedProp-C6IvqE-r.cjs"),Y=require("./Title-B7ruS8yl.cjs"),J=require("./Legend-CR9ydX8N.cjs"),F=require("./usePrinter-DHv-BwME.cjs"),K=require("./PackageVersion-C1F3QLoY.cjs"),Q=require("./PenAndPaper-DDheVRNG.cjs"),Z=require("./vue-ui-skeleton-BTN1PKkz.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},re=["xmlns","viewBox"],oe={key:0},se=["x","y","height","width","fill","stroke"],ne=["x","y","height","width","rx","fill","stroke","stroke-width"],ue=["x","y","height","width","fill","stroke","stroke-width"],ie=["x","y","font-size","font-weight","fill"],ce=["x","y","height","width","rx","fill","stroke","stroke-width"],de={key:3},he=["x","y","fill","font-size","font-weight"],ve={key:4},me=["x1","x2","y1","y2","stroke"],ge={key:5,class:"vue-data-ui-watermark"},fe={class:"vue-ui-bullet-legend-item",dir:"auto"},ye={style:{"margin-right":"2px"}},pe={key:7,ref:"source",dir:"auto"},ke={__name:"vue-ui-bullet",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(z,{expose:I}){const n=z,{vue_ui_bullet:H}=s.useConfig(),y=e.ref(null),T=e.ref(null),B=e.ref(0),M=e.ref(null),U=e.ref(0),d=e.computed({get:()=>n.dataset.hasOwnProperty("value"),set:a=>a}),v=e.computed(()=>n.dataset.segments?Array.isArray(n.dataset.segments)?n.dataset.segments.length?!0:(console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
|
|
2
|
+
|
|
3
|
+
segments: [
|
|
4
|
+
{
|
|
5
|
+
name: string;
|
|
6
|
+
from: number;
|
|
7
|
+
to: number;
|
|
8
|
+
color?: string;
|
|
9
|
+
},
|
|
10
|
+
{...}
|
|
11
|
+
]
|
|
12
|
+
`),d.value=!1,!1):(console.warn(`VueUiBullet: dataset segments must be an array of objects with this datastructure:
|
|
13
|
+
|
|
14
|
+
segments: [
|
|
15
|
+
{
|
|
16
|
+
name: string;
|
|
17
|
+
from: number;
|
|
18
|
+
to: number;
|
|
19
|
+
color?: string;
|
|
20
|
+
},
|
|
21
|
+
{...}
|
|
22
|
+
]
|
|
23
|
+
`),d.value=!1,!1):(console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
|
|
24
|
+
|
|
25
|
+
segments: [
|
|
26
|
+
{
|
|
27
|
+
name: string;
|
|
28
|
+
from: number;
|
|
29
|
+
to: number;
|
|
30
|
+
color?: string;
|
|
31
|
+
},
|
|
32
|
+
{...}
|
|
33
|
+
]
|
|
34
|
+
`),d.value=!1,!1));e.onMounted(x);function x(){s.objectIsEmpty(n.dataset)?s.error({componentName:"VueUiBullet",type:"dataset"}):v.value?n.dataset.segments.forEach((a,o)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","from","to"]}).forEach(l=>{d.value=!1,s.error({componentName:"VueUiBullet segment",type:"datasetSerieAttribute",property:l,index:o})})}):d.value=!1,t.value.style.chart.animation.show&&N(n.dataset.value||0)}const p=e.ref(s.createUid());function C(){const a=A.useNestedProp({userConfig:n.config,defaultConfig:H});return a.theme?{...A.useNestedProp({userConfig:s.themes.vue_ui_bullet[a.theme]||n.config,defaultConfig:a})}:a}const t=e.computed({get:()=>C(),set:a=>a}),{userOptionsVisible:k,setUserOptionsVisibility:_,keepUserOptionState:L}=ee.useUserOptionState({config:t.value});e.watch(()=>n.config,a=>{t.value=C(),k.value=!t.value.showOnChartHover,x(),B.value+=1},{deep:!0});const r=e.computed(()=>{const a=t.value.style.chart.height,o=t.value.style.chart.width,l=t.value.style.chart.padding.left,h=o-t.value.style.chart.padding.right,f=t.value.style.chart.padding.top,c=a-t.value.style.chart.padding.bottom;return{height:a,width:o,left:l,right:h,top:f,bottom:c,chartWidth:h-l,chartHeight:c-f}}),q=e.computed(()=>{if(!v.value)return[];const a=[];for(let o=0;o<n.dataset.segments.length;o+=1)a.push(s.lightenHexColor(t.value.style.chart.segments.baseColor,o/n.dataset.segments.length));return a}),b=e.computed(()=>v.value?{min:Math.min(...n.dataset.segments.map(a=>a.from)),max:Math.max(...n.dataset.segments.map(a=>a.to))}:{min:0,max:1}),u=e.ref(D());e.watch(()=>n.dataset,a=>{t.value.style.chart.animation.show?N(a.value||0):u.value=a.value||0},{deep:!0});function D(){return t.value.style.chart.animation.show?b.value.min:n.dataset.value||0}const S=e.ref(null);function N(a){const o=Math.abs(a-u.value)/t.value.style.chart.animation.animationFrames;function l(){u.value<a?u.value=Math.min(u.value+o,a):u.value>a&&(u.value=Math.max(u.value-o,a)),u.value!==a&&(S.value=requestAnimationFrame(l))}l()}e.onBeforeUnmount(()=>{cancelAnimationFrame(S.value)});const i=e.computed(()=>{if(!v.value)return[];const a=s.calculateNiceScale(b.value.min,b.value.max,t.value.style.chart.segments.ticks.divisions),o=a.min>=0?0:Math.abs(a.min),l={x:r.value.left+(n.dataset.target+o)/(a.max+o)*r.value.chartWidth-t.value.style.chart.target.width/2},h={width:(u.value+o)/(a.max+o)*r.value.chartWidth},f=a.ticks.map(c=>({value:c,y:r.value.bottom+t.value.style.chart.segments.dataLabels.fontSize+3+t.value.style.chart.segments.dataLabels.offsetY,x:r.value.left+(c+o)/(a.max+o)*r.value.chartWidth}));return{scale:a,target:l,value:h,ticks:f,chunks:n.dataset.segments.map((c,X)=>({...c,color:c.color?s.convertColorToHex(c.color):q.value[X],x:r.value.left+r.value.chartWidth*((c.from+o)/(a.max+o)),y:r.value.top,height:r.value.chartHeight,width:r.value.chartWidth*(Math.abs(c.to-c.from)/(a.max+o))}))}}),P=e.computed(()=>!i.value||!i.value.chunks||!i.value.chunks.length?[]:i.value.chunks.map(a=>{const o=s.applyDataLabel(t.value.style.chart.segments.dataLabels.formatter,a.from,s.dataLabel({p:t.value.style.chart.segments.dataLabels.prefix,v:a.from,s:t.value.style.chart.segments.dataLabels.suffix,r:t.value.style.chart.segments.dataLabels.rounding})),l=s.applyDataLabel(t.value.style.chart.segments.dataLabels.formatter,a.to,s.dataLabel({p:t.value.style.chart.segments.dataLabels.prefix,v:a.to,s:t.value.style.chart.segments.dataLabels.suffix,r:t.value.style.chart.segments.dataLabels.rounding}));return{...a,shape:"square",value:`${o} - ${l}`}})),W=e.computed(()=>({cy:"bullet-div-legend",backgroundColor:"transparent",color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:6,fontWeight:t.value.style.chart.legend.bold?"bold":""})),{isPrinting:E,isImaging:V,generatePdf:$,generateImage:O}=F.usePrinter({elementId:`bullet_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-bullet"}),R=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),m=e.ref(!1);function j(a){m.value=a,U.value+=1}function G(){return i.value}const g=e.ref(!1);function w(){g.value=!g.value}return I({getData:G,generatePdf:$,generateImage:O,toggleAnnotator:w}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"bulletChart",ref:y,class:e.normalizeClass(`vue-ui-bullet ${m.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%;background:${t.value.style.chart.backgroundColor}`),id:`bullet_${p.value}`,onMouseenter:o[0]||(o[0]=()=>e.unref(_)(!0)),onMouseleave:o[1]||(o[1]=()=>e.unref(_)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Q.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:g.value,onClose:w},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),R.value?(e.openBlock(),e.createElementBlock("div",le,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:T,style:"width:100%;background:transparent;"},[(e.openBlock(),e.createBlock(Y._sfc_main,{lineHeight:"1.3rem",key:`title_${B.value}`,config:{title:{cy:"bullet-div-title",...t.value.style.chart.title},subtitle:{cy:"bullet-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&d.value&&(e.unref(L)||e.unref(k))?(e.openBlock(),e.createBlock(F.UserOptions,{key:3,ref:"details",backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(E),isImaging:e.unref(V),uid:p.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:!1,hasTable:!1,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:m.value,chartElement:y.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:g.value,onToggleFullscreen:j,onGeneratePdf:e.unref($),onGenerateImage:e.unref(O),onToggleAnnotator:w,style:e.normalizeStyle({visibility:e.unref(L)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:h})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:h})),void 0,!0)]),key:"2"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:h})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:h})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value,"vue-ui-bullet-svg":!0}),viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:e.normalizeStyle(`width: 100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(K._sfc_main),v.value?(e.openBlock(),e.createElementBlock("g",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.chunks,l=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,height:l.height,width:l.width,fill:l.color,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,se))),256)),t.value.style.chart.target.onTop?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,x:i.value.target.x,y:r.value.top+(r.value.chartHeight-r.value.chartHeight*t.value.style.chart.target.heightRatio)/2,height:r.value.chartHeight*t.value.style.chart.target.heightRatio,width:t.value.style.chart.target.width,rx:t.value.style.chart.target.rounded?t.value.style.chart.target.width/2:0,fill:t.value.style.chart.target.color,stroke:t.value.style.chart.target.stroke,"stroke-width":t.value.style.chart.target.strokeWidth},null,8,ne)),e.createElementVNode("rect",{x:r.value.left,y:r.value.top+(r.value.chartHeight-r.value.chartHeight*t.value.style.chart.valueBar.heightRatio)/2,height:r.value.chartHeight*t.value.style.chart.valueBar.heightRatio,width:i.value.value.width,fill:t.value.style.chart.valueBar.color,stroke:t.value.style.chart.valueBar.stroke,"stroke-width":t.value.style.chart.valueBar.strokeWidth},null,8,ue),t.value.style.chart.valueBar.label.show?(e.openBlock(),e.createElementBlock("text",{key:1,x:r.value.left+i.value.value.width,y:r.value.top-6+t.value.style.chart.valueBar.label.offsetY,"font-size":t.value.style.chart.valueBar.label.fontSize,"font-weight":t.value.style.chart.valueBar.label.bold?"bold":"normal",fill:t.value.style.chart.valueBar.label.color,"text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.segments.dataLabels.formatter,u.value,e.unref(s.dataLabel)({p:t.value.style.chart.segments.dataLabels.prefix,v:u.value,s:t.value.style.chart.segments.dataLabels.suffix,r:t.value.style.chart.segments.dataLabels.rounding}))),9,ie)):e.createCommentVNode("",!0),t.value.style.chart.target.onTop?(e.openBlock(),e.createElementBlock("rect",{key:2,x:i.value.target.x,y:r.value.top+(r.value.chartHeight-r.value.chartHeight*t.value.style.chart.target.heightRatio)/2,height:r.value.chartHeight*t.value.style.chart.target.heightRatio,width:t.value.style.chart.target.width,rx:t.value.style.chart.target.rounded?t.value.style.chart.target.width/2:0,fill:t.value.style.chart.target.color,stroke:t.value.style.chart.target.stroke,"stroke-width":t.value.style.chart.target.strokeWidth},null,8,ce)):e.createCommentVNode("",!0),t.value.style.chart.segments.dataLabels.show?(e.openBlock(),e.createElementBlock("g",de,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.ticks,l=>(e.openBlock(),e.createElementBlock("text",{x:l.x,y:l.y,"text-anchor":"middle",fill:t.value.style.chart.segments.dataLabels.color,"font-size":t.value.style.chart.segments.dataLabels.fontSize+"px","font-weight":t.value.style.chart.segments.dataLabels.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.segments.dataLabels.formatter,l.value,e.unref(s.dataLabel)({p:t.value.style.chart.segments.dataLabels.prefix,v:l.value,s:t.value.style.chart.segments.dataLabels.suffix,r:t.value.style.chart.segments.dataLabels.rounding}))),9,he))),256))])):e.createCommentVNode("",!0),t.value.style.chart.segments.dataLabels.show&&t.value.style.chart.segments.ticks.show?(e.openBlock(),e.createElementBlock("g",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.ticks,l=>(e.openBlock(),e.createElementBlock("line",{x1:l.x,x2:l.x,y1:r.value.bottom,y2:r.value.bottom+3,stroke:t.value.style.chart.segments.ticks.stroke,"stroke-width":1,"stroke-linecap":"round"},null,8,me))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:r.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ge,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(E)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),d.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z.default,{key:6,config:{type:"bullet",style:{backgroundColor:t.value.style.chart.backgroundColor,bullet:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:M},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(J.Legend,{key:0,clickable:!1,legendSet:P.value,config:W.value},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",fe,[e.createElementVNode("span",ye,e.toDisplayString(l.name)+":",1),e.createElementVNode("span",null,e.toDisplayString(l.value),1)])]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:P.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",pe,[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],46,ae))}},be=te._export_sfc(ke,[["__scopeId","data-v-afb8783e"]]);exports.default=be;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ref as d, computed as g, onMounted as de, watch as J, onBeforeUnmount as ge, openBlock as r, createElementBlock as n, normalizeClass as K, normalizeStyle as
|
|
2
|
-
import { u as ye, o as pe, e as Q, g as be, c as ke, l as we, D as xe, d as _e, i as $, f as B, X as Ce, t as Le } from "./index-
|
|
3
|
-
import { u as Z } from "./useNestedProp-
|
|
4
|
-
import { _ as $e } from "./Title-
|
|
5
|
-
import { L as Be } from "./Legend-
|
|
6
|
-
import { u as Ae, U as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { P as Fe } from "./PenAndPaper-
|
|
9
|
-
import Se from "./vue-ui-skeleton-
|
|
1
|
+
import { ref as d, computed as g, onMounted as de, watch as J, onBeforeUnmount as ge, openBlock as r, createElementBlock as n, normalizeClass as K, normalizeStyle as I, unref as u, createBlock as k, createCommentVNode as i, createSlots as fe, withCtx as w, renderSlot as y, normalizeProps as H, guardReactiveProps as M, createVNode as me, Fragment as T, renderList as U, createElementVNode as x, toDisplayString as L } from "vue";
|
|
2
|
+
import { u as ye, o as pe, e as Q, g as be, c as ke, l as we, D as xe, d as _e, i as $, f as B, X as Ce, t as Le } from "./index-K5uyh1gA.js";
|
|
3
|
+
import { u as Z } from "./useNestedProp-DifqJZAs.js";
|
|
4
|
+
import { _ as $e } from "./Title-aMb2ETf7.js";
|
|
5
|
+
import { L as Be } from "./Legend-bYlSC7I7.js";
|
|
6
|
+
import { u as Ae, U as Oe } from "./usePrinter-p_ZZlGc9.js";
|
|
7
|
+
import { _ as Pe } from "./PackageVersion-Dz3KcTL4.js";
|
|
8
|
+
import { P as Fe } from "./PenAndPaper-BycdTwSP.js";
|
|
9
|
+
import Se from "./vue-ui-skeleton-BhA2lIT6.js";
|
|
10
10
|
import { u as Ie } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
11
|
import { _ as He } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const Me = ["id"], Te = {
|
|
@@ -41,7 +41,7 @@ const Me = ["id"], Te = {
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
setup(ee, { expose: te }) {
|
|
44
|
-
const o = ee, { vue_ui_bullet: ae } = ye(), A = d(null), le = d(null),
|
|
44
|
+
const o = ee, { vue_ui_bullet: ae } = ye(), A = d(null), le = d(null), N = d(0), se = d(null), re = d(0), f = g({
|
|
45
45
|
get: () => o.dataset.hasOwnProperty("value"),
|
|
46
46
|
set: (t) => t
|
|
47
47
|
}), p = g(() => o.dataset.segments ? Array.isArray(o.dataset.segments) ? o.dataset.segments.length ? !0 : (console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
|
|
@@ -78,8 +78,8 @@ segments: [
|
|
|
78
78
|
{...}
|
|
79
79
|
]
|
|
80
80
|
`), f.value = !1, !1));
|
|
81
|
-
de(
|
|
82
|
-
function
|
|
81
|
+
de(z);
|
|
82
|
+
function z() {
|
|
83
83
|
pe(o.dataset) ? Q({
|
|
84
84
|
componentName: "VueUiBullet",
|
|
85
85
|
type: "dataset"
|
|
@@ -97,8 +97,8 @@ segments: [
|
|
|
97
97
|
});
|
|
98
98
|
}) : f.value = !1, e.value.style.chart.animation.show && V(o.dataset.value || 0);
|
|
99
99
|
}
|
|
100
|
-
const
|
|
101
|
-
function
|
|
100
|
+
const O = d(ke());
|
|
101
|
+
function W() {
|
|
102
102
|
const t = Z({
|
|
103
103
|
userConfig: o.config,
|
|
104
104
|
defaultConfig: ae
|
|
@@ -111,11 +111,11 @@ segments: [
|
|
|
111
111
|
} : t;
|
|
112
112
|
}
|
|
113
113
|
const e = g({
|
|
114
|
-
get: () =>
|
|
114
|
+
get: () => W(),
|
|
115
115
|
set: (t) => t
|
|
116
|
-
}), { userOptionsVisible:
|
|
116
|
+
}), { userOptionsVisible: P, setUserOptionsVisibility: E, keepUserOptionState: D } = Ie({ config: e.value });
|
|
117
117
|
J(() => o.config, (t) => {
|
|
118
|
-
e.value =
|
|
118
|
+
e.value = W(), P.value = !e.value.showOnChartHover, z(), N.value += 1;
|
|
119
119
|
}, { deep: !0 });
|
|
120
120
|
const l = g(() => {
|
|
121
121
|
const t = e.value.style.chart.height, s = e.value.style.chart.width, a = e.value.style.chart.padding.left, m = s - e.value.style.chart.padding.right, C = e.value.style.chart.padding.top, v = t - e.value.style.chart.padding.bottom;
|
|
@@ -135,7 +135,7 @@ segments: [
|
|
|
135
135
|
for (let s = 0; s < o.dataset.segments.length; s += 1)
|
|
136
136
|
t.push(we(e.value.style.chart.segments.baseColor, s / o.dataset.segments.length));
|
|
137
137
|
return t;
|
|
138
|
-
}),
|
|
138
|
+
}), F = g(() => p.value ? {
|
|
139
139
|
min: Math.min(...o.dataset.segments.map((t) => t.from)),
|
|
140
140
|
max: Math.max(...o.dataset.segments.map((t) => t.to))
|
|
141
141
|
} : { min: 0, max: 1 }), c = d(ne());
|
|
@@ -143,7 +143,7 @@ segments: [
|
|
|
143
143
|
e.value.style.chart.animation.show ? V(t.value || 0) : c.value = t.value || 0;
|
|
144
144
|
}, { deep: !0 });
|
|
145
145
|
function ne() {
|
|
146
|
-
return e.value.style.chart.animation.show ?
|
|
146
|
+
return e.value.style.chart.animation.show ? F.value.min : o.dataset.value || 0;
|
|
147
147
|
}
|
|
148
148
|
const R = d(null);
|
|
149
149
|
function V(t) {
|
|
@@ -159,7 +159,7 @@ segments: [
|
|
|
159
159
|
const h = g(() => {
|
|
160
160
|
if (!p.value)
|
|
161
161
|
return [];
|
|
162
|
-
const t = xe(
|
|
162
|
+
const t = xe(F.value.min, F.value.max, e.value.style.chart.segments.ticks.divisions), s = t.min >= 0 ? 0 : Math.abs(t.min), a = {
|
|
163
163
|
x: l.value.left + (o.dataset.target + s) / (t.max + s) * l.value.chartWidth - e.value.style.chart.target.width / 2
|
|
164
164
|
}, m = {
|
|
165
165
|
width: (c.value + s) / (t.max + s) * l.value.chartWidth
|
|
@@ -215,7 +215,7 @@ segments: [
|
|
|
215
215
|
paddingBottom: 6,
|
|
216
216
|
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
217
217
|
})), { isPrinting: j, isImaging: q, generatePdf: X, generateImage: Y } = Ae({
|
|
218
|
-
elementId: `bullet_${
|
|
218
|
+
elementId: `bullet_${O.value}`,
|
|
219
219
|
fileName: e.value.style.chart.title.text || "vue-ui-bullet"
|
|
220
220
|
}), ie = g(() => e.value.userOptions.show && !e.value.style.chart.title.text), b = d(!1);
|
|
221
221
|
function ce(t) {
|
|
@@ -225,20 +225,20 @@ segments: [
|
|
|
225
225
|
return h.value;
|
|
226
226
|
}
|
|
227
227
|
const _ = d(!1);
|
|
228
|
-
function
|
|
228
|
+
function S() {
|
|
229
229
|
_.value = !_.value;
|
|
230
230
|
}
|
|
231
231
|
return te({
|
|
232
232
|
getData: he,
|
|
233
233
|
generatePdf: X,
|
|
234
234
|
generateImage: Y,
|
|
235
|
-
toggleAnnotator:
|
|
235
|
+
toggleAnnotator: S
|
|
236
236
|
}), (t, s) => (r(), n("div", {
|
|
237
237
|
ref_key: "bulletChart",
|
|
238
238
|
ref: A,
|
|
239
239
|
class: K(`vue-ui-bullet ${b.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
240
|
-
style:
|
|
241
|
-
id: `bullet_${
|
|
240
|
+
style: I(`font-family:${e.value.style.fontFamily};width:100%;background:${e.value.style.chart.backgroundColor}`),
|
|
241
|
+
id: `bullet_${O.value}`,
|
|
242
242
|
onMouseenter: s[0] || (s[0] = () => u(E)(!0)),
|
|
243
243
|
onMouseleave: s[1] || (s[1] = () => u(E)(!1))
|
|
244
244
|
}, [
|
|
@@ -248,7 +248,7 @@ segments: [
|
|
|
248
248
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
249
249
|
color: e.value.style.chart.color,
|
|
250
250
|
active: _.value,
|
|
251
|
-
onClose:
|
|
251
|
+
onClose: S
|
|
252
252
|
}, null, 8, ["parent", "backgroundColor", "color", "active"])) : i("", !0),
|
|
253
253
|
ie.value ? (r(), n("div", Te, null, 512)) : i("", !0),
|
|
254
254
|
e.value.style.chart.title.text ? (r(), n("div", {
|
|
@@ -259,7 +259,7 @@ segments: [
|
|
|
259
259
|
}, [
|
|
260
260
|
(r(), k($e, {
|
|
261
261
|
lineHeight: "1.3rem",
|
|
262
|
-
key: `title_${
|
|
262
|
+
key: `title_${N.value}`,
|
|
263
263
|
config: {
|
|
264
264
|
title: {
|
|
265
265
|
cy: "bullet-div-title",
|
|
@@ -272,14 +272,14 @@ segments: [
|
|
|
272
272
|
}
|
|
273
273
|
}, null, 8, ["config"]))
|
|
274
274
|
], 512)) : i("", !0),
|
|
275
|
-
e.value.userOptions.show && f.value && (u(D) || u(
|
|
275
|
+
e.value.userOptions.show && f.value && (u(D) || u(P)) ? (r(), k(Oe, {
|
|
276
276
|
key: 3,
|
|
277
277
|
ref: "details",
|
|
278
278
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
279
279
|
color: e.value.style.chart.color,
|
|
280
280
|
isPrinting: u(j),
|
|
281
281
|
isImaging: u(q),
|
|
282
|
-
uid:
|
|
282
|
+
uid: O.value,
|
|
283
283
|
hasTooltip: !1,
|
|
284
284
|
hasPdf: e.value.userOptions.buttons.pdf,
|
|
285
285
|
hasImg: e.value.userOptions.buttons.img,
|
|
@@ -296,9 +296,9 @@ segments: [
|
|
|
296
296
|
onToggleFullscreen: ce,
|
|
297
297
|
onGeneratePdf: u(X),
|
|
298
298
|
onGenerateImage: u(Y),
|
|
299
|
-
onToggleAnnotator:
|
|
300
|
-
style:
|
|
301
|
-
visibility: u(D) ? u(
|
|
299
|
+
onToggleAnnotator: S,
|
|
300
|
+
style: I({
|
|
301
|
+
visibility: u(D) ? u(P) ? "visible" : "hidden" : "visible"
|
|
302
302
|
})
|
|
303
303
|
}, fe({ _: 2 }, [
|
|
304
304
|
t.$slots.optionPdf ? {
|
|
@@ -318,14 +318,14 @@ segments: [
|
|
|
318
318
|
t.$slots.optionFullscreen ? {
|
|
319
319
|
name: "optionFullscreen",
|
|
320
320
|
fn: w(({ toggleFullscreen: a, isFullscreen: m }) => [
|
|
321
|
-
y(t.$slots, "optionFullscreen",
|
|
321
|
+
y(t.$slots, "optionFullscreen", H(M({ toggleFullscreen: a, isFullscreen: m })), void 0, !0)
|
|
322
322
|
]),
|
|
323
323
|
key: "2"
|
|
324
324
|
} : void 0,
|
|
325
325
|
t.$slots.optionAnnotator ? {
|
|
326
326
|
name: "optionAnnotator",
|
|
327
327
|
fn: w(({ toggleAnnotator: a, isAnnotator: m }) => [
|
|
328
|
-
y(t.$slots, "optionAnnotator",
|
|
328
|
+
y(t.$slots, "optionAnnotator", H(M({ toggleAnnotator: a, isAnnotator: m })), void 0, !0)
|
|
329
329
|
]),
|
|
330
330
|
key: "3"
|
|
331
331
|
} : void 0
|
|
@@ -335,11 +335,11 @@ segments: [
|
|
|
335
335
|
xmlns: u(Ce),
|
|
336
336
|
class: K({ "vue-data-ui-fullscreen--on": b.value, "vue-data-ui-fulscreen--off": !b.value, "vue-ui-bullet-svg": !0 }),
|
|
337
337
|
viewBox: `0 0 ${l.value.width} ${l.value.height}`,
|
|
338
|
-
style:
|
|
338
|
+
style: I(`width: 100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
|
|
339
339
|
}, [
|
|
340
|
-
me(
|
|
340
|
+
me(Pe),
|
|
341
341
|
p.value ? (r(), n("g", Ne, [
|
|
342
|
-
(r(!0), n(
|
|
342
|
+
(r(!0), n(T, null, U(h.value.chunks, (a) => (r(), n("rect", {
|
|
343
343
|
x: a.x,
|
|
344
344
|
y: a.y,
|
|
345
345
|
height: a.height,
|
|
@@ -398,7 +398,7 @@ segments: [
|
|
|
398
398
|
"stroke-width": e.value.style.chart.target.strokeWidth
|
|
399
399
|
}, null, 8, Re)) : i("", !0),
|
|
400
400
|
e.value.style.chart.segments.dataLabels.show ? (r(), n("g", Ve, [
|
|
401
|
-
(r(!0), n(
|
|
401
|
+
(r(!0), n(T, null, U(h.value.ticks, (a) => (r(), n("text", {
|
|
402
402
|
x: a.x,
|
|
403
403
|
y: a.y,
|
|
404
404
|
"text-anchor": "middle",
|
|
@@ -417,7 +417,7 @@ segments: [
|
|
|
417
417
|
)), 9, Ge))), 256))
|
|
418
418
|
])) : i("", !0),
|
|
419
419
|
e.value.style.chart.segments.dataLabels.show && e.value.style.chart.segments.ticks.show ? (r(), n("g", je, [
|
|
420
|
-
(r(!0), n(
|
|
420
|
+
(r(!0), n(T, null, U(h.value.ticks, (a) => (r(), n("line", {
|
|
421
421
|
x1: a.x,
|
|
422
422
|
x2: a.x,
|
|
423
423
|
y1: l.value.bottom,
|
|
@@ -431,7 +431,7 @@ segments: [
|
|
|
431
431
|
y(t.$slots, "svg", { svg: l.value }, void 0, !0)
|
|
432
432
|
], 14, Ue)) : i("", !0),
|
|
433
433
|
t.$slots.watermark ? (r(), n("div", Xe, [
|
|
434
|
-
y(t.$slots, "watermark",
|
|
434
|
+
y(t.$slots, "watermark", H(M({ isPrinting: u(j) || u(q) })), void 0, !0)
|
|
435
435
|
])) : i("", !0),
|
|
436
436
|
f.value ? i("", !0) : (r(), k(Se, {
|
|
437
437
|
key: 6,
|
|
@@ -470,7 +470,7 @@ segments: [
|
|
|
470
470
|
], 512)) : i("", !0)
|
|
471
471
|
], 46, Me));
|
|
472
472
|
}
|
|
473
|
-
}, ct = /* @__PURE__ */ He(Qe, [["__scopeId", "data-v-
|
|
473
|
+
}, ct = /* @__PURE__ */ He(Qe, [["__scopeId", "data-v-afb8783e"]]);
|
|
474
474
|
export {
|
|
475
475
|
ct as default
|
|
476
476
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-
|
|
2
|
-
fill="${t.value.style.layout.candle.gradient.show?re?`url(#bullish_gradient_${p.value})`:`url(#bearish_gradient_${p.value})`:re?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg>${y}</div>`,n+=`${Be} : <b>${isNaN(se)?"-":Number(se.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()}</b>`,n+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,n+=`<div>${Ce}: <b>${t.value.style.tooltip.prefix} ${isNaN(_.value)?"-":Number(_.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${Ne}: <b>${t.value.style.tooltip.prefix} ${isNaN(z.value)?"-":Number(z.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${$e}: <b>${t.value.style.tooltip.prefix} ${isNaN(ne.value)?"-":Number(ne.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${Se}: <b>${t.value.style.tooltip.prefix} ${isNaN(ue.value)?"-":Number(ue.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+="</div>",E.value=`<div style="text-align:right">${n}</div>`}V.value=!0}function xe(){te()}const k=e.ref(null);async function te(){(t.value.style.zoom.startIndex!==null||t.value.style.zoom.endIndex!==null)&&k.value?(t.value.style.zoom.startIndex!==null&&(await e.nextTick(),await e.nextTick(),k.value&&k.value.setStartValue(t.value.style.zoom.startIndex)),t.value.style.zoom.endIndex!==null&&(await e.nextTick(),await e.nextTick(),k.value&&k.value.setEndValue(be(t.value.style.zoom.endIndex+1)))):(c.value={start:0,end:w.value},C.value+=1)}function be(l){const a=w.value;return l>a?a:l<0||t.value.style.zoom.startIndex!==null&&l<t.value.style.zoom.startIndex?t.value.style.zoom.startIndex!==null?t.value.style.zoom.startIndex+1:1:l}function le(){e.nextTick(()=>{const l=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume],a=v.value.map(y=>[y.period,y.open.value,y.high.value,y.low.value,y.last.value,y.volume]),o=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),n=u.createCsvContent(o);u.downloadCsv({csvContent:n,title:t.value.style.title.text||"vue-ui-candlestick"})})}const S=e.computed(()=>{const l=v.value.map(n=>[`<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="${t.value.style.layout.candle.borderRadius*3}" fill="${t.value.style.layout.candle.gradient.show?n.isBullish?`url(#bullish_gradient_${p.value}`:`url(#bearish_gradient_${p.value})`:n.isBullish?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg> ${n.period}`,`${t.value.table.td.prefix} ${isNaN(n.open.value)?"-":Number(n.open.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.high.value)?"-":Number(n.high.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.low.value)?"-":Number(n.low.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.last.value)?"-":Number(n.last.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${isNaN(n.volume)?"-":n.volume.toLocaleString()}`]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},o=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume];return{head:o,body:l,config:a,colNames:o}}),x=e.ref(!1);function we(l){x.value=l,P.value+=1}function oe(){h.value.showTable=!h.value.showTable}function ae(){h.value.showTooltip=!h.value.showTooltip}const B=e.ref(!1);function I(){B.value=!B.value}return ve({generatePdf:K,generateCsv:le,generateImage:Q,toggleTable:oe,toggleTooltip:ae,toggleAnnotator:I}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"candlestickChart",ref:g,class:e.normalizeClass(`vue-ui-candlestick ${x.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`position:relative;font-family:${t.value.style.fontFamily}; text-align:center;background:${t.value.style.backgroundColor}; ${t.value.responsive?"height: 100%":""}`),id:`vue-ui-candlestick_${p.value}`,onMouseenter:a[4]||(a[4]=()=>e.unref(G)(!0)),onMouseleave:a[5]||(a[5]=()=>e.unref(G)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ie.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:B.value,onClose:I},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),he.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:M,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:L,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(_e._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"candlestick-div-title",...t.value.style.title},subtitle:{cy:"candlestick-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(H)||e.unref(W))?(e.openBlock(),e.createBlock(de.UserOptions,{ref_key:"details",ref:pe,key:`user_options_${P.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(J),isPrinting:e.unref(Y),uid:p.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:x.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:we,onGeneratePdf:e.unref(K),onGenerateCsv:le,onGenerateImage:e.unref(Q),onToggleTable:oe,onToggleTooltip:ae,onToggleAnnotator:I,style:e.normalizeStyle({visibility:e.unref(H)?e.unref(W)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${i.value.height<=0?10:i.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(Fe._sfc_main),v.value.length>0?(e.openBlock(),e.createElementBlock("g",Ue,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`bearish_gradient_${p.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bearish},null,8,De),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bearish,.02)}DE`},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bearish,.05)}66`},null,8,We)],8,Me),e.createElementVNode("linearGradient",{id:`bullish_gradient_${p.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bullish},null,8,He),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bullish,.02)}DE`},null,8,je),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bullish,.05)}66`},null,8,Xe)],8,Ge)]),t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ye,[e.createElementVNode("line",{x1:s.value.left,x2:s.value.left,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Je),e.createElementVNode("line",{x1:s.value.left,x2:s.value.right,y1:s.value.bottom,y2:s.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ke)])):e.createCommentVNode("",!0),t.value.style.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value>=m.value.min&&o.value<=m.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:s.value.left,x2:s.value.left-5,y1:o.y,y2:o.y,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ze)):e.createCommentVNode("",!0),o.value>=m.value.min&&o.value<=m.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:s.value.left-8+t.value.style.layout.grid.yAxis.dataLabels.offsetX,y:o.y+i.value.yAxisFontSize/3,"font-size":i.value.yAxisFontSize,"text-anchor":"end",fill:t.value.style.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.prefix)+" "+e.toDisplayString(e.unref(u.canShowValue)(o.value)?o.value.toFixed(t.value.style.layout.grid.yAxis.dataLabels.roundingValue):"")+" "+e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.suffix),9,et)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),t.value.style.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{transform:`translate(${s.value.left+r.value*n+r.value/2}, ${s.value.bottom+i.value.xAxisFontSize*2+t.value.style.layout.grid.xAxis.dataLabels.offsetY}), rotate(${t.value.style.layout.grid.xAxis.dataLabels.rotation})`,"text-anchor":t.value.style.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":i.value.xAxisFontSize,fill:t.value.style.layout.grid.xAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.xAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(o),9,lt)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("line",{x1:o.open.x,x2:o.open.x,y1:o.high.y,y2:o.low.y,stroke:t.value.style.layout.wick.stroke,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,ot),t.value.style.layout.wick.extremity.shape==="circle"?(e.openBlock(),e.createElementBlock("g",at,[e.createElementVNode("circle",{cx:o.high.x,cy:o.high.y,r:t.value.style.layout.wick.extremity.size==="auto"?r.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,nt),e.createElementVNode("circle",{cx:o.low.x,cy:o.low.y,r:t.value.style.layout.wick.extremity.size==="auto"?r.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,ut)])):e.createCommentVNode("",!0),t.value.style.layout.wick.extremity.shape==="line"?(e.openBlock(),e.createElementBlock("g",st,[e.createElementVNode("line",{x1:o.high.x-(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:o.high.x+(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:o.high.y,y2:o.high.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,rt),e.createElementVNode("line",{x1:o.low.x-(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:o.low.x+(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:o.low.y,y2:o.low.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,it)])):e.createCommentVNode("",!0)]))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-r.value/2+r.value*(1-t.value.style.layout.candle.widthRatio)/2,y:o.isBullish?o.last.y:o.open.y,height:Math.abs(o.last.y-o.open.y)<=0?1e-4:Math.abs(o.last.y-o.open.y),width:r.value*t.value.style.layout.candle.widthRatio<=0?1e-4:r.value*t.value.style.layout.candle.widthRatio,fill:t.value.style.layout.candle.gradient.underlayer,rx:t.value.style.layout.candle.borderRadius,stroke:"none"},null,8,dt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-r.value/2+r.value*(1-t.value.style.layout.candle.widthRatio)/2,y:o.isBullish?o.last.y:o.open.y,height:Math.abs(o.last.y-o.open.y)<=0?1e-4:Math.abs(o.last.y-o.open.y),width:r.value*t.value.style.layout.candle.widthRatio<=0?1e-4:r.value*t.value.style.layout.candle.widthRatio,fill:o.isBullish?t.value.style.layout.candle.gradient.show?`url(#bullish_gradient_${p.value})`:t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.gradient.show?`url(#bearish_gradient_${p.value})`:t.value.style.layout.candle.colors.bearish,rx:t.value.style.layout.candle.borderRadius,stroke:t.value.style.layout.candle.stroke,"stroke-width":t.value.style.layout.candle.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,ct))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value.left+n*r.value,y:s.value.top,height:s.value.height<=0?1e-4:s.value.height,width:r.value<=0?1e-4:r.value,fill:T.value===n?e.unref(u.setOpacity)(t.value.style.layout.selector.color,t.value.style.layout.selector.opacity):"transparent",onMouseover:y=>ke(n,o),onMouseleave:a[0]||(a[0]=y=>{T.value=void 0,V.value=!1})},null,40,vt))),256))])])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",yt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ee.default,{key:6,config:{type:"candlesticks",style:{backgroundColor:t.value.style.backgroundColor,candlesticks:{axis:{color:"#CCCCCC"},candle:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.zoom.show&&b.value?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartSlicer",ref:O},[(e.openBlock(),e.createBlock(Te.Slicer,{ref_key:"slicerComponent",ref:k,key:`slicer_${C.value}`,background:t.value.style.zoom.color,borderColor:t.value.style.backgroundColor,fontSize:t.value.style.zoom.fontSize,useResetSlot:t.value.style.zoom.useResetSlot,labelLeft:f.dataset[c.value.start]?f.dataset[c.value.start][0]:f.dataset[0][0],labelRight:f.dataset[c.value.end-1]?f.dataset[c.value.end-1][0]:f.dataset.at(-1)[0],textColor:t.value.style.color,inputColor:t.value.style.zoom.color,selectColor:t.value.style.zoom.highlightColor,max:w.value,min:0,valueStart:c.value.start,valueEnd:c.value.end,start:c.value.start,"onUpdate:start":a[1]||(a[1]=o=>c.value.start=o),end:c.value.end,"onUpdate:end":a[2]||(a[2]=o=>c.value.end=o),refreshStartPoint:t.value.style.zoom.startIndex!==null?t.value.style.zoom.startIndex:0,refreshEndPoint:t.value.style.zoom.endIndex!==null?t.value.style.zoom.endIndex+1:w.value,onReset:xe},{"reset-action":e.withCtx(({reset:o})=>[e.renderSlot(l.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:o})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint"]))],512)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartLegend",ref:R},[e.renderSlot(l.$slots,"legend",{legend:v.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:U,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:h.value.showTooltip&&V.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:g.value,content:E.value,isFullscreen:x.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),b.value?(e.openBlock(),e.createBlock(Ae.default,{key:9,hideDetails:"",config:{open:h.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ve.DataTable,{key:`table_${D.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:a[3]||(a[3]=o=>h.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createElementVNode("div",{innerHTML:o},null,8,pt)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Re))}},ft=Le._export_sfc(ht,[["__scopeId","data-v-bf1a2d49"]]);exports.default=ft;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BkXYJDpD.cjs"),ie=require("./useResponsive-BJ7DTGpm.cjs"),_e=require("./Title-B7ruS8yl.cjs"),de=require("./usePrinter-DHv-BwME.cjs"),ze=require("./Tooltip-BqSN71SL.cjs"),Ve=require("./DataTable-CwAdpLng.cjs"),Ee=require("./vue-ui-skeleton-BTN1PKkz.cjs"),Te=require("./Slicer-7oTpm-cZ.cjs"),Ae=require("./vue-ui-accordion-kr18wKfc.cjs"),ce=require("./useNestedProp-C6IvqE-r.cjs"),Fe=require("./PackageVersion-C1F3QLoY.cjs"),Ie=require("./PenAndPaper-DDheVRNG.cjs"),Pe=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Re=["id"],Oe=["xmlns","viewBox"],Ue={key:0},Me=["id"],De=["stop-color"],qe=["stop-color"],We=["stop-color"],Ge=["id"],He=["stop-color"],je=["stop-color"],Xe=["stop-color"],Ye={key:0},Je=["x1","x2","y1","y2","stroke","stroke-width"],Ke=["x1","x2","y1","y2","stroke","stroke-width"],Qe={key:1},Ze=["x1","x2","y1","y2","stroke","stroke-width"],et=["x","y","font-size","fill","font-weight"],tt={key:2},lt=["transform","text-anchor","font-size","fill","font-weight"],ot=["x1","x2","y1","y2","stroke","stroke-width"],at={key:0},nt=["cx","cy","r","fill"],ut=["cx","cy","r","fill"],st={key:1},rt=["x1","x2","y1","y2","stroke","stroke-width"],it=["x1","x2","y1","y2","stroke","stroke-width"],dt=["x","y","height","width","fill","rx"],ct=["x","y","height","width","fill","rx","stroke","stroke-width"],vt=["x","y","height","width","fill","onMouseover"],yt={key:5,class:"vue-data-ui-watermark"},pt=["innerHTML"],ht={__name:"vue-ui-candlestick",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(f,{expose:ve}){const d=f,{vue_ui_candlestick:ye}=u.useConfig(),b=e.computed(()=>!!d.dataset&&d.dataset.length),p=e.ref(u.createUid()),pe=e.ref(null),V=e.ref(!1),E=e.ref(""),T=e.ref(void 0),L=e.ref(0),g=e.ref(null),R=e.ref(null),O=e.ref(null),U=e.ref(null),M=e.ref(null),D=e.ref(null),C=e.ref(0),q=e.ref(0),W=e.ref(0),t=e.computed({get:()=>j(),set:l=>l}),{userOptionsVisible:A,setUserOptionsVisibility:G,keepUserOptionState:H}=Pe.useUserOptionState({config:t.value});function j(){const l=ce.useNestedProp({userConfig:d.config,defaultConfig:ye});let a={};return l.theme?a={...ce.useNestedProp({userConfig:u.themes.vue_ui_candlestick[l.theme]||d.config,defaultConfig:l})}:a=l,d.config&&u.hasDeepProperty(d.config,"style.zoom.startIndex")?a.style.zoom.startIndex=d.config.style.zoom.startIndex:a.style.zoom.startIndex=null,d.config&&u.hasDeepProperty(d.config,"style.zoom.endIndex")?a.style.zoom.endIndex=d.config.style.zoom.endIndex:a.style.zoom.endIndex=null,a}e.watch(()=>d.config,l=>{t.value=j(),A.value=!t.value.showOnChartHover,X(),C.value+=1,W.value+=1,q.value+=1},{deep:!0}),e.watch(()=>d.dataset,l=>{c.value.start=0,c.value.end=l.length,C.value+=1},{deep:!0});const i=e.ref({height:t.value.style.height,width:t.value.style.width,xAxisFontSize:t.value.style.layout.grid.xAxis.dataLabels.fontSize,yAxisFontSize:t.value.style.layout.grid.yAxis.dataLabels.fontSize}),N=e.ref(null);e.onMounted(()=>{X()});function X(){if(u.objectIsEmpty(d.dataset)&&u.error({componentName:"VueUiCandlestick",type:"dataset"}),t.value.responsive){const l=ie.throttle(()=>{const{width:a,height:o}=ie.useResponsive({chart:g.value,title:t.value.style.title.text?R.value:null,slicer:U.value,legend:O.value,source:M.value,noTitle:D.value});i.value.width=a,i.value.height=o,i.value.xAxisFontSize=u.translateSize({relator:Math.min(a,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.xAxis.dataLabels.fontSize,threshold:6,fallback:6}),i.value.yAxisFontSize=u.translateSize({relator:Math.min(a,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.yAxis.dataLabels.fontSize,threshold:6,fallback:6})});N.value=new ResizeObserver(l),N.value.observe(g.value.parentNode)}te()}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:Y,isImaging:J,generatePdf:K,generateImage:Q}=de.usePrinter({elementId:`vue-ui-candlestick_${p.value}`,fileName:t.value.style.title.text||"vue-ui-candlestick"}),he=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),h=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),s=e.computed(()=>{const{top:l,right:a,bottom:o,left:n}=t.value.style.layout.padding;return{top:l,right:i.value.width-a,left:n,bottom:i.value.height-o,width:i.value.width-n-a,height:i.value.height-l-o}}),w=e.computed(()=>d.dataset.length),c=e.ref({start:0,end:w.value}),Z=e.computed(()=>d.dataset.slice(c.value.start,c.value.end)),F=e.computed(()=>(d.dataset.forEach((l,a)=>{[null,void 0].includes(l[0])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"period (index 0)",index:a}),[null,void 0].includes(l[1])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"open (index 1)",index:a}),[null,void 0].includes(l[2])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"high (index 2)",index:a}),[null,void 0].includes(l[3])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"low (index 3)",index:a}),[null,void 0].includes(l[4])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"last (index 4)",index:a}),[null,void 0].includes(l[5])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"volume (index 5)",index:a})}),Z.value.map(l=>({period:l[0],open:l[1],high:l[2],low:l[3],last:l[4],volume:l[5]})))),r=e.computed(()=>s.value.width/Z.value.length),ee=e.computed(()=>({max:Math.max(...F.value.map(l=>l.high)),min:0})),m=e.computed(()=>u.calculateNiceScale(ee.value.min,ee.value.max,t.value.style.layout.grid.yAxis.dataLabels.steps));function $(l,a){return{...l,x:u.checkNaN(s.value.left+a*r.value+r.value/2),y:u.checkNaN(s.value.top+(1-l/m.value.max)*s.value.height),value:u.checkNaN(l)}}const v=e.computed(()=>F.value.map((l,a)=>{const o=$(l.open,a),n=$(l.high,a),y=$(l.low,a),_=$(l.last,a),z=l.last>l.open;return{period:l.period,open:o,high:n,low:y,last:_,volume:l.volume,isBullish:z}}));function fe(l){return u.checkNaN(l/m.value.max)}const me=e.computed(()=>m.value.ticks.map(l=>({y:s.value.bottom-s.value.height*fe(l),value:u.checkNaN(l)}))),ge=e.computed(()=>F.value.map(l=>l.period)),I=e.ref(null);function ke(l,a){T.value=l,I.value={datapoint:a,seriesIndex:l,series:v.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(u.isFunction(o)&&u.functionReturnsString(()=>o({seriesIndex:l,datapoint:a,series:v.value,config:t.value})))E.value=o({seriesIndex:l,datapoint:a,series:v.value,config:t.value});else if(t.value.style.tooltip.show){let n="";const{period:y,open:_,high:z,low:ne,last:ue,volume:se,isBullish:re}=v.value[l],{period:mt,open:Ce,high:Ne,low:$e,last:Se,volume:Be}=t.value.translations;n+=`<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="${t.value.style.layout.candle.borderRadius*3}" stroke="${t.value.style.layout.candle.stroke}" stroke-width="${t.value.style.layout.candle.strokeWidth}"
|
|
2
|
+
fill="${t.value.style.layout.candle.gradient.show?re?`url(#bullish_gradient_${p.value})`:`url(#bearish_gradient_${p.value})`:re?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg>${y}</div>`,n+=`${Be} : <b>${isNaN(se)?"-":Number(se.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()}</b>`,n+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,n+=`<div>${Ce}: <b>${t.value.style.tooltip.prefix} ${isNaN(_.value)?"-":Number(_.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${Ne}: <b>${t.value.style.tooltip.prefix} ${isNaN(z.value)?"-":Number(z.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${$e}: <b>${t.value.style.tooltip.prefix} ${isNaN(ne.value)?"-":Number(ne.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${Se}: <b>${t.value.style.tooltip.prefix} ${isNaN(ue.value)?"-":Number(ue.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+="</div>",E.value=`<div style="text-align:right">${n}</div>`}V.value=!0}function xe(){te()}const k=e.ref(null);async function te(){(t.value.style.zoom.startIndex!==null||t.value.style.zoom.endIndex!==null)&&k.value?(t.value.style.zoom.startIndex!==null&&(await e.nextTick(),await e.nextTick(),k.value&&k.value.setStartValue(t.value.style.zoom.startIndex)),t.value.style.zoom.endIndex!==null&&(await e.nextTick(),await e.nextTick(),k.value&&k.value.setEndValue(be(t.value.style.zoom.endIndex+1)))):(c.value={start:0,end:w.value},C.value+=1)}function be(l){const a=w.value;return l>a?a:l<0||t.value.style.zoom.startIndex!==null&&l<t.value.style.zoom.startIndex?t.value.style.zoom.startIndex!==null?t.value.style.zoom.startIndex+1:1:l}function le(){e.nextTick(()=>{const l=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume],a=v.value.map(y=>[y.period,y.open.value,y.high.value,y.low.value,y.last.value,y.volume]),o=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),n=u.createCsvContent(o);u.downloadCsv({csvContent:n,title:t.value.style.title.text||"vue-ui-candlestick"})})}const S=e.computed(()=>{const l=v.value.map(n=>[`<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="${t.value.style.layout.candle.borderRadius*3}" fill="${t.value.style.layout.candle.gradient.show?n.isBullish?`url(#bullish_gradient_${p.value}`:`url(#bearish_gradient_${p.value})`:n.isBullish?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg> ${n.period}`,`${t.value.table.td.prefix} ${isNaN(n.open.value)?"-":Number(n.open.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.high.value)?"-":Number(n.high.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.low.value)?"-":Number(n.low.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.last.value)?"-":Number(n.last.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${isNaN(n.volume)?"-":n.volume.toLocaleString()}`]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},o=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume];return{head:o,body:l,config:a,colNames:o}}),x=e.ref(!1);function we(l){x.value=l,L.value+=1}function oe(){h.value.showTable=!h.value.showTable}function ae(){h.value.showTooltip=!h.value.showTooltip}const B=e.ref(!1);function P(){B.value=!B.value}return ve({generatePdf:K,generateCsv:le,generateImage:Q,toggleTable:oe,toggleTooltip:ae,toggleAnnotator:P}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"candlestickChart",ref:g,class:e.normalizeClass(`vue-ui-candlestick ${x.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`position:relative;font-family:${t.value.style.fontFamily}; text-align:center;background:${t.value.style.backgroundColor}; ${t.value.responsive?"height: 100%":""}`),id:`vue-ui-candlestick_${p.value}`,onMouseenter:a[4]||(a[4]=()=>e.unref(G)(!0)),onMouseleave:a[5]||(a[5]=()=>e.unref(G)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ie.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:B.value,onClose:P},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),he.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:D,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:R,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(_e._sfc_main,{key:`title_${W.value}`,config:{title:{cy:"candlestick-div-title",...t.value.style.title},subtitle:{cy:"candlestick-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(H)||e.unref(A))?(e.openBlock(),e.createBlock(de.UserOptions,{ref_key:"details",ref:pe,key:`user_options_${L.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(J),isPrinting:e.unref(Y),uid:p.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:x.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:we,onGeneratePdf:e.unref(K),onGenerateCsv:le,onGenerateImage:e.unref(Q),onToggleTable:oe,onToggleTooltip:ae,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(H)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${i.value.height<=0?10:i.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(Fe._sfc_main),v.value.length>0?(e.openBlock(),e.createElementBlock("g",Ue,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`bearish_gradient_${p.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bearish},null,8,De),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bearish,.02)}DE`},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bearish,.05)}66`},null,8,We)],8,Me),e.createElementVNode("linearGradient",{id:`bullish_gradient_${p.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bullish},null,8,He),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bullish,.02)}DE`},null,8,je),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bullish,.05)}66`},null,8,Xe)],8,Ge)]),t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ye,[e.createElementVNode("line",{x1:s.value.left,x2:s.value.left,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Je),e.createElementVNode("line",{x1:s.value.left,x2:s.value.right,y1:s.value.bottom,y2:s.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ke)])):e.createCommentVNode("",!0),t.value.style.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value>=m.value.min&&o.value<=m.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:s.value.left,x2:s.value.left-5,y1:o.y,y2:o.y,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ze)):e.createCommentVNode("",!0),o.value>=m.value.min&&o.value<=m.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:s.value.left-8+t.value.style.layout.grid.yAxis.dataLabels.offsetX,y:o.y+i.value.yAxisFontSize/3,"font-size":i.value.yAxisFontSize,"text-anchor":"end",fill:t.value.style.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.prefix)+" "+e.toDisplayString(e.unref(u.canShowValue)(o.value)?o.value.toFixed(t.value.style.layout.grid.yAxis.dataLabels.roundingValue):"")+" "+e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.suffix),9,et)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),t.value.style.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{transform:`translate(${s.value.left+r.value*n+r.value/2}, ${s.value.bottom+i.value.xAxisFontSize*2+t.value.style.layout.grid.xAxis.dataLabels.offsetY}), rotate(${t.value.style.layout.grid.xAxis.dataLabels.rotation})`,"text-anchor":t.value.style.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":i.value.xAxisFontSize,fill:t.value.style.layout.grid.xAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.xAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(o),9,lt)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("line",{x1:o.open.x,x2:o.open.x,y1:o.high.y,y2:o.low.y,stroke:t.value.style.layout.wick.stroke,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,ot),t.value.style.layout.wick.extremity.shape==="circle"?(e.openBlock(),e.createElementBlock("g",at,[e.createElementVNode("circle",{cx:o.high.x,cy:o.high.y,r:t.value.style.layout.wick.extremity.size==="auto"?r.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,nt),e.createElementVNode("circle",{cx:o.low.x,cy:o.low.y,r:t.value.style.layout.wick.extremity.size==="auto"?r.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,ut)])):e.createCommentVNode("",!0),t.value.style.layout.wick.extremity.shape==="line"?(e.openBlock(),e.createElementBlock("g",st,[e.createElementVNode("line",{x1:o.high.x-(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:o.high.x+(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:o.high.y,y2:o.high.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,rt),e.createElementVNode("line",{x1:o.low.x-(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:o.low.x+(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:o.low.y,y2:o.low.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,it)])):e.createCommentVNode("",!0)]))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-r.value/2+r.value*(1-t.value.style.layout.candle.widthRatio)/2,y:o.isBullish?o.last.y:o.open.y,height:Math.abs(o.last.y-o.open.y)<=0?1e-4:Math.abs(o.last.y-o.open.y),width:r.value*t.value.style.layout.candle.widthRatio<=0?1e-4:r.value*t.value.style.layout.candle.widthRatio,fill:t.value.style.layout.candle.gradient.underlayer,rx:t.value.style.layout.candle.borderRadius,stroke:"none"},null,8,dt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-r.value/2+r.value*(1-t.value.style.layout.candle.widthRatio)/2,y:o.isBullish?o.last.y:o.open.y,height:Math.abs(o.last.y-o.open.y)<=0?1e-4:Math.abs(o.last.y-o.open.y),width:r.value*t.value.style.layout.candle.widthRatio<=0?1e-4:r.value*t.value.style.layout.candle.widthRatio,fill:o.isBullish?t.value.style.layout.candle.gradient.show?`url(#bullish_gradient_${p.value})`:t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.gradient.show?`url(#bearish_gradient_${p.value})`:t.value.style.layout.candle.colors.bearish,rx:t.value.style.layout.candle.borderRadius,stroke:t.value.style.layout.candle.stroke,"stroke-width":t.value.style.layout.candle.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,ct))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value.left+n*r.value,y:s.value.top,height:s.value.height<=0?1e-4:s.value.height,width:r.value<=0?1e-4:r.value,fill:T.value===n?e.unref(u.setOpacity)(t.value.style.layout.selector.color,t.value.style.layout.selector.opacity):"transparent",onMouseover:y=>ke(n,o),onMouseleave:a[0]||(a[0]=y=>{T.value=void 0,V.value=!1})},null,40,vt))),256))])])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",yt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ee.default,{key:6,config:{type:"candlesticks",style:{backgroundColor:t.value.style.backgroundColor,candlesticks:{axis:{color:"#CCCCCC"},candle:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.zoom.show&&b.value?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartSlicer",ref:U},[(e.openBlock(),e.createBlock(Te.Slicer,{ref_key:"slicerComponent",ref:k,key:`slicer_${C.value}`,background:t.value.style.zoom.color,borderColor:t.value.style.backgroundColor,fontSize:t.value.style.zoom.fontSize,useResetSlot:t.value.style.zoom.useResetSlot,labelLeft:f.dataset[c.value.start]?f.dataset[c.value.start][0]:f.dataset[0][0],labelRight:f.dataset[c.value.end-1]?f.dataset[c.value.end-1][0]:f.dataset.at(-1)[0],textColor:t.value.style.color,inputColor:t.value.style.zoom.color,selectColor:t.value.style.zoom.highlightColor,max:w.value,min:0,valueStart:c.value.start,valueEnd:c.value.end,start:c.value.start,"onUpdate:start":a[1]||(a[1]=o=>c.value.start=o),end:c.value.end,"onUpdate:end":a[2]||(a[2]=o=>c.value.end=o),refreshStartPoint:t.value.style.zoom.startIndex!==null?t.value.style.zoom.startIndex:0,refreshEndPoint:t.value.style.zoom.endIndex!==null?t.value.style.zoom.endIndex+1:w.value,onReset:xe},{"reset-action":e.withCtx(({reset:o})=>[e.renderSlot(l.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:o})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint"]))],512)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[e.renderSlot(l.$slots,"legend",{legend:v.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:M,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:h.value.showTooltip&&V.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:g.value,content:E.value,isFullscreen:x.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...I.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...I.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),b.value?(e.openBlock(),e.createBlock(Ae.default,{key:9,hideDetails:"",config:{open:h.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ve.DataTable,{key:`table_${q.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:a[3]||(a[3]=o=>h.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createElementVNode("div",{innerHTML:o},null,8,pt)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Re))}},ft=Le._export_sfc(ht,[["__scopeId","data-v-bcb8c8b2"]]);exports.default=ft;
|