vue-data-ui 2.4.50 → 2.4.51
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 +12 -0
- package/dist/{Arrow-DuuEh1Nr.cjs → Arrow-2a_SwBgz.cjs} +1 -1
- package/dist/{Arrow-D1z9KkQN.js → Arrow-BUz63pb2.js} +1 -1
- package/dist/{BaseIcon-DemqZ_13.cjs → BaseIcon-BASl_NFX.cjs} +1 -1
- package/dist/{BaseIcon-BHwqOTt4.js → BaseIcon-CmiukQBl.js} +1 -1
- package/dist/{DataTable-CQ8fQnex.js → DataTable-DGf6RrOJ.js} +2 -2
- package/dist/{DataTable-CovKV5Yy.cjs → DataTable-G3ICK-5h.cjs} +1 -1
- package/dist/{Legend-Br7MWNDo.js → Legend-BLaZxMge.js} +1 -1
- package/dist/{Legend-Bbz-hKDf.cjs → Legend-BiuPlEMg.cjs} +1 -1
- package/dist/{PackageVersion-BEtuCME5.cjs → PackageVersion-Bj34UNnQ.cjs} +1 -1
- package/dist/{PackageVersion-BV3fHO46.js → PackageVersion-CxJghxYD.js} +1 -1
- package/dist/{PenAndPaper-BIcmfBvD.cjs → PenAndPaper-D9yQnc0e.cjs} +1 -1
- package/dist/{PenAndPaper-CCOywdmm.js → PenAndPaper-ZdZEumki.js} +3 -3
- package/dist/{Shape-B7Mekpyf.js → Shape-DIKzzpFm.js} +1 -1
- package/dist/{Shape-BD37ZaX9.cjs → Shape-yducHWd0.cjs} +1 -1
- package/dist/{Slicer-CWvkt-8k.cjs → Slicer-BHS9W4MJ.cjs} +1 -1
- package/dist/{Slicer-ahFReg7h.js → Slicer-Cxdl3cDt.js} +2 -2
- package/dist/{Title-C2siG5N2.cjs → Title-Bk_55doC.cjs} +1 -1
- package/dist/{Title-CIsKiWgN.js → Title-aSAft5dl.js} +1 -1
- package/dist/{Tooltip-CS4C58T7.cjs → Tooltip-G7ENx87_.cjs} +1 -1
- package/dist/{Tooltip-B1LgrF9R.js → Tooltip-smutPF--.js} +1 -1
- package/dist/{index-BtL_cLa8.js → index-BbPeL8Gp.js} +5 -1
- package/dist/index-DhDYBLBe.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +5 -1
- package/dist/types/vue-data-ui.d.ts +5 -1
- package/dist/{useNestedProp-CEAfm1tu.js → useNestedProp-BN8claGG.js} +1 -1
- package/dist/{useNestedProp-D_feh7A_.cjs → useNestedProp-BphUExEh.cjs} +1 -1
- package/dist/{usePrinter-B4xDG31F.cjs → usePrinter-2_QjJFdH.cjs} +1 -1
- package/dist/{usePrinter-sRt2SKr2.js → usePrinter-DaybDVqP.js} +1 -1
- package/dist/useUserOptionState-BIvW1Kz7.js +17 -0
- package/dist/useUserOptionState-BgepsfED.cjs +1 -0
- package/dist/{vue-data-ui-CuEYAddV.cjs → vue-data-ui-C5vsHRHD.cjs} +1 -1
- package/dist/{vue-data-ui-NkhaiK6y.js → vue-data-ui-Ckbp-yIf.js} +60 -60
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-DUgumRsg.cjs +19 -0
- package/dist/{vue-ui-3d-bar-BeXYzdzu.js → vue-ui-3d-bar-wDYs3sVe.js} +345 -339
- package/dist/{vue-ui-accordion-Cjc683tN.js → vue-ui-accordion-5d5iVpr7.js} +3 -3
- package/dist/{vue-ui-accordion-CBxsUoGb.cjs → vue-ui-accordion-B7tNzRWB.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-rnt8M-Qz.js → vue-ui-age-pyramid-BH1khaaq.js} +260 -254
- package/dist/vue-ui-age-pyramid-Dxx1mVwR.cjs +1 -0
- package/dist/{vue-ui-annotator-CFU5Zyfk.js → vue-ui-annotator-B9VKE_qz.js} +1 -1
- package/dist/{vue-ui-annotator-Yu-mHS2N.cjs → vue-ui-annotator-jXkB5XnD.cjs} +1 -1
- package/dist/{vue-ui-bullet-CRbW1ON6.js → vue-ui-bullet-BLi9CSZw.js} +152 -146
- package/dist/vue-ui-bullet-QrXtipbT.cjs +34 -0
- package/dist/{vue-ui-candlestick-D-ERLtI1.js → vue-ui-candlestick-Bjz1uFbv.js} +223 -217
- package/dist/vue-ui-candlestick-Da4ygGXR.cjs +2 -0
- package/dist/{vue-ui-carousel-table-I1m4HMWf.js → vue-ui-carousel-table-B6zgTL-W.js} +160 -154
- package/dist/vue-ui-carousel-table-Cfif8Oiz.cjs +1 -0
- package/dist/vue-ui-chestnut-C_N7EbjQ.cjs +6 -0
- package/dist/{vue-ui-chestnut-CqJRKECX.js → vue-ui-chestnut-D5HpkuIa.js} +237 -231
- package/dist/{vue-ui-cursor-S83QIsxQ.cjs → vue-ui-cursor-A_siHYBc.cjs} +1 -1
- package/dist/{vue-ui-cursor-jrrdh8Lf.js → vue-ui-cursor-DZNIbvR2.js} +2 -2
- package/dist/{vue-ui-dashboard-DW1mIInG.cjs → vue-ui-dashboard-BfPJyiY9.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DR_Bhwa3.js → vue-ui-dashboard-DCqe4BZg.js} +2 -2
- package/dist/{vue-ui-digits-1jZdiwHJ.js → vue-ui-digits-BEWCnojc.js} +2 -2
- package/dist/{vue-ui-digits-s5f9eFtW.cjs → vue-ui-digits-BEhLa3jI.cjs} +1 -1
- package/dist/vue-ui-donut-By3QRfkV.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-DsHTZ9T2.js → vue-ui-donut-evolution-Cu6dmlT2.js} +300 -294
- package/dist/vue-ui-donut-evolution-DEABWsj0.cjs +1 -0
- package/dist/{vue-ui-donut-BAYiPsxp.js → vue-ui-donut-g5ZLhYPx.js} +376 -370
- package/dist/vue-ui-dumbbell-Dfb1l5qP.cjs +9 -0
- package/dist/{vue-ui-dumbbell-DcMmBxLy.js → vue-ui-dumbbell-bb4-Ep6o.js} +256 -250
- package/dist/vue-ui-flow-CCvTnu7z.cjs +1 -0
- package/dist/{vue-ui-flow-BTXEmIQG.js → vue-ui-flow-hD0F6mTK.js} +164 -158
- package/dist/vue-ui-funnel-DKxAPRi_.cjs +1 -0
- package/dist/{vue-ui-funnel-BB_h0FKg.js → vue-ui-funnel-hcbE4yky.js} +178 -172
- package/dist/{vue-ui-galaxy-DlBk1FUz.js → vue-ui-galaxy-ByKjxVWV.js} +187 -181
- package/dist/vue-ui-galaxy-D2kmqwpI.cjs +1 -0
- package/dist/vue-ui-gauge-BFA_unjg.cjs +1 -0
- package/dist/{vue-ui-gauge-1SFhSMfU.js → vue-ui-gauge-PGirbe6O.js} +220 -214
- package/dist/{vue-ui-gizmo-C8rLR4n5.cjs → vue-ui-gizmo-CHMApil6.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CtX6KFN2.js → vue-ui-gizmo-ChSfBYZ_.js} +3 -3
- package/dist/vue-ui-heatmap-C0VxwPhr.cjs +1 -0
- package/dist/{vue-ui-heatmap-BzyvTePn.js → vue-ui-heatmap-CK3FIWpo.js} +270 -264
- package/dist/vue-ui-history-plot-BmGodgUx.cjs +1 -0
- package/dist/{vue-ui-history-plot-BEoHuZ3N.js → vue-ui-history-plot-EmQ-Byiz.js} +236 -230
- package/dist/{vue-ui-kpi-LO4KKRR9.cjs → vue-ui-kpi-BdungaO2.cjs} +1 -1
- package/dist/{vue-ui-kpi-BYOyJjYg.js → vue-ui-kpi-DjC68pSz.js} +3 -3
- package/dist/{vue-ui-mini-loader-ChHdx5me.js → vue-ui-mini-loader-CzrblCCD.js} +2 -2
- package/dist/{vue-ui-mini-loader-wlUD77O6.cjs → vue-ui-mini-loader-jwL_pZjb.cjs} +1 -1
- package/dist/{vue-ui-molecule-Bo7XYpf-.js → vue-ui-molecule-DBQJQs4Y.js} +294 -289
- package/dist/vue-ui-molecule-Dzh-0SWI.cjs +1 -0
- package/dist/{vue-ui-mood-radar-DXj4Ce6l.js → vue-ui-mood-radar-Ca9wPZpJ.js} +205 -199
- package/dist/vue-ui-mood-radar-DV6ZZIXF.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-BBLpNVwF.js → vue-ui-nested-donuts-C8at93dN.js} +286 -280
- package/dist/vue-ui-nested-donuts-DEdS6dpj.cjs +17 -0
- package/dist/{vue-ui-onion-DC8VIInA.js → vue-ui-onion-B-PXxNu6.js} +198 -192
- package/dist/vue-ui-onion-B2ioudP5.cjs +5 -0
- package/dist/{vue-ui-parallel-coordinate-plot-Cl1wiHsK.js → vue-ui-parallel-coordinate-plot-ByM3So9k.js} +236 -230
- package/dist/vue-ui-parallel-coordinate-plot-DtJi9cT0.cjs +8 -0
- package/dist/{vue-ui-quadrant-b5cuEH9z.js → vue-ui-quadrant-BqOJBcsI.js} +255 -249
- package/dist/vue-ui-quadrant-CIr4i6cC.cjs +1 -0
- package/dist/{vue-ui-quick-chart-CFBPYw2J.js → vue-ui-quick-chart-BfXxT3KM.js} +474 -466
- package/dist/vue-ui-quick-chart-Bt9KA82P.cjs +15 -0
- package/dist/{vue-ui-radar-DP8360kx.js → vue-ui-radar-BKpD9xDr.js} +256 -250
- package/dist/vue-ui-radar-Czmsd_uv.cjs +1 -0
- package/dist/{vue-ui-rating-D7b-kfyp.cjs → vue-ui-rating-BE545aI4.cjs} +1 -1
- package/dist/{vue-ui-rating-DIthBSp_.js → vue-ui-rating-DQRuqev5.js} +2 -2
- package/dist/vue-ui-relation-circle-B1uMTqFP.cjs +1 -0
- package/dist/vue-ui-relation-circle-nZ2nBpWX.js +498 -0
- package/dist/vue-ui-rings-B7JzZ3ub.cjs +2 -0
- package/dist/{vue-ui-rings-y9Zx-DaI.js → vue-ui-rings-C1PV0873.js} +177 -172
- package/dist/vue-ui-scatter-CTI943ks.cjs +1 -0
- package/dist/{vue-ui-scatter-Cbu5GDc1.js → vue-ui-scatter-dgs1m3-2.js} +310 -304
- package/dist/{vue-ui-screenshot-oH-YnZBE.cjs → vue-ui-screenshot--cHV0jG3.cjs} +1 -1
- package/dist/{vue-ui-screenshot-BZh_sgjP.js → vue-ui-screenshot-Dxj0l8Jg.js} +1 -1
- package/dist/{vue-ui-skeleton-DjFU2X3P.js → vue-ui-skeleton-Bniq21d9.js} +3 -3
- package/dist/{vue-ui-skeleton-Nuju6X7l.cjs → vue-ui-skeleton-lkPDknHn.cjs} +1 -1
- package/dist/{vue-ui-smiley-DtQVEc4B.cjs → vue-ui-smiley-CozXoiti.cjs} +1 -1
- package/dist/{vue-ui-smiley-DdnzzEYS.js → vue-ui-smiley-D4DAZIpA.js} +2 -2
- package/dist/{vue-ui-spark-trend-B36zW41F.cjs → vue-ui-spark-trend-CSqyvI_K.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CaIGk_53.js → vue-ui-spark-trend-ZqrwhwqS.js} +5 -5
- package/dist/{vue-ui-sparkbar-iQKGtxo8.cjs → vue-ui-sparkbar-Bph8KIjk.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-DixeozKp.js → vue-ui-sparkbar-q0G4GvFm.js} +4 -4
- package/dist/{vue-ui-sparkgauge-C01VB6KP.js → vue-ui-sparkgauge-DA_h9jcN.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DEvgucF7.cjs → vue-ui-sparkgauge-nSAW83dN.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-C_6lHF3O.js → vue-ui-sparkhistogram-B1WyBiq_.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-CTUuxOma.cjs → vue-ui-sparkhistogram-BLYhRNpt.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DrZWPGOG.cjs → vue-ui-sparkline-PNix1-R9.cjs} +1 -1
- package/dist/{vue-ui-sparkline-Btm4HVgi.js → vue-ui-sparkline-ccfl0s3m.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-7pcfCNMr.cjs → vue-ui-sparkstackbar-DpuvEumy.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-D0UGUm-1.js → vue-ui-sparkstackbar-PNKwVRu8.js} +5 -5
- package/dist/{vue-ui-stackbar-BPMDmY04.js → vue-ui-stackbar-BBYnF8qm.js} +367 -361
- package/dist/vue-ui-stackbar-D4AIFoQT.cjs +6 -0
- package/dist/vue-ui-strip-plot-ClNxSw9M.cjs +1 -0
- package/dist/{vue-ui-strip-plot-BfWQMGXy.js → vue-ui-strip-plot-TVlnzXFq.js} +269 -263
- package/dist/{vue-ui-table-Cdo265Yt.cjs → vue-ui-table-CHdv3KuM.cjs} +1 -1
- package/dist/{vue-ui-table-D8GaLhM9.js → vue-ui-table-CsEajH9S.js} +1 -1
- package/dist/vue-ui-table-heatmap-BE3UT8U9.cjs +1 -0
- package/dist/vue-ui-table-heatmap-CubRipoB.js +262 -0
- package/dist/vue-ui-table-sparkline-BeYviUrb.cjs +1 -0
- package/dist/{vue-ui-table-sparkline-DMHf03C9.js → vue-ui-table-sparkline-YV8DUOqh.js} +173 -167
- package/dist/vue-ui-thermometer-C6lMWRiF.cjs +1 -0
- package/dist/{vue-ui-thermometer-BCVqil7E.js → vue-ui-thermometer-DmMjSLc1.js} +170 -164
- package/dist/{vue-ui-timer-gxiLCP1n.cjs → vue-ui-timer-DteYgv9y.cjs} +1 -1
- package/dist/{vue-ui-timer-DF5HkeeS.js → vue-ui-timer-DvE_nqd9.js} +5 -5
- package/dist/vue-ui-tiremarks-CCrkDgjX.js +323 -0
- package/dist/vue-ui-tiremarks-PGGgsNgS.cjs +1 -0
- package/dist/vue-ui-treemap-BzRVKqXL.cjs +1 -0
- package/dist/{vue-ui-treemap-CIZaPmbi.js → vue-ui-treemap-C4A4spvg.js} +243 -237
- package/dist/{vue-ui-vertical-bar-dQoTddqU.js → vue-ui-vertical-bar-8iL1xiaz.js} +238 -232
- package/dist/vue-ui-vertical-bar-B60lSXNq.cjs +4 -0
- package/dist/{vue-ui-waffle-CnvWOEVU.js → vue-ui-waffle-CaYNz-Kd.js} +316 -310
- package/dist/vue-ui-waffle-O8pAEf4X.cjs +1 -0
- package/dist/vue-ui-wheel-BRR2rGou.js +305 -0
- package/dist/vue-ui-wheel-CnFdB_B1.cjs +1 -0
- package/dist/vue-ui-word-cloud-X4mp280j.cjs +1 -0
- package/dist/{vue-ui-word-cloud-o3zU6r0-.js → vue-ui-word-cloud-y2GGxwoq.js} +246 -240
- package/dist/{vue-ui-xy-GR4PGBDy.js → vue-ui-xy-CXoWP8bh.js} +708 -697
- package/dist/vue-ui-xy-CbM75yXK.cjs +3 -0
- package/dist/{vue-ui-xy-canvas-BKGOnjut.js → vue-ui-xy-canvas-D7MrUJj7.js} +334 -328
- package/dist/vue-ui-xy-canvas-DWvIvSry.cjs +9 -0
- package/package.json +1 -1
- package/dist/index-DoD-GxZR.cjs +0 -9
- package/dist/vue-ui-3d-bar-RduHvzwG.cjs +0 -19
- package/dist/vue-ui-age-pyramid-DVtbyRJw.cjs +0 -1
- package/dist/vue-ui-bullet-Be5aYhtp.cjs +0 -34
- package/dist/vue-ui-candlestick-B6wSs-JC.cjs +0 -2
- package/dist/vue-ui-carousel-table-7reErH8M.cjs +0 -1
- package/dist/vue-ui-chestnut-D-WzX16q.cjs +0 -6
- package/dist/vue-ui-donut-Ce1SaXNu.cjs +0 -1
- package/dist/vue-ui-donut-evolution-DI8yeIa4.cjs +0 -1
- package/dist/vue-ui-dumbbell-CFJkwtM8.cjs +0 -9
- package/dist/vue-ui-flow-B4MtorhO.cjs +0 -1
- package/dist/vue-ui-funnel-DNL12vLQ.cjs +0 -1
- package/dist/vue-ui-galaxy-CmCZGOKz.cjs +0 -1
- package/dist/vue-ui-gauge-B7ieQMud.cjs +0 -1
- package/dist/vue-ui-heatmap-Bfi3KJwS.cjs +0 -1
- package/dist/vue-ui-history-plot-5kZ54hgy.cjs +0 -1
- package/dist/vue-ui-molecule-D-4cRS5w.cjs +0 -1
- package/dist/vue-ui-mood-radar-C3x_LH7Q.cjs +0 -1
- package/dist/vue-ui-nested-donuts-DrL7-SUd.cjs +0 -17
- package/dist/vue-ui-onion-8Vz3lPbn.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-D6q4WQ0B.cjs +0 -8
- package/dist/vue-ui-quadrant-DBZS5jFQ.cjs +0 -1
- package/dist/vue-ui-quick-chart-Cno_1mzu.cjs +0 -15
- package/dist/vue-ui-radar-ChcBO21S.cjs +0 -1
- package/dist/vue-ui-relation-circle-C5pO0iHY.cjs +0 -1
- package/dist/vue-ui-relation-circle-D2iwmChn.js +0 -492
- package/dist/vue-ui-rings-C_NLJYs8.cjs +0 -2
- package/dist/vue-ui-scatter-BNeMGDNk.cjs +0 -1
- package/dist/vue-ui-stackbar-BwRdmPvB.cjs +0 -6
- package/dist/vue-ui-strip-plot-CLN9LikJ.cjs +0 -1
- package/dist/vue-ui-table-heatmap-C4DRSfsE.js +0 -256
- package/dist/vue-ui-table-heatmap-CDAf1IIk.cjs +0 -1
- package/dist/vue-ui-table-sparkline-Cw7NOiYx.cjs +0 -1
- package/dist/vue-ui-thermometer-7BORZJjd.cjs +0 -1
- package/dist/vue-ui-tiremarks-CwGnFx4f.cjs +0 -1
- package/dist/vue-ui-tiremarks-lidhcJsi.js +0 -317
- package/dist/vue-ui-treemap-BZ_LmiBK.cjs +0 -1
- package/dist/vue-ui-vertical-bar-venrkqjM.cjs +0 -4
- package/dist/vue-ui-waffle-oR54BbIg.cjs +0 -1
- package/dist/vue-ui-wheel-BUHZEzPr.cjs +0 -1
- package/dist/vue-ui-wheel-D3itrMku.js +0 -299
- package/dist/vue-ui-word-cloud-87gwksmM.cjs +0 -1
- package/dist/vue-ui-xy-D56pm4L0.cjs +0 -3
- package/dist/vue-ui-xy-canvas-uikeVe72.cjs +0 -9
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),u=require("./index-DoD-GxZR.cjs"),c=require("./useResponsive-BJ7DTGpm.cjs"),et=require("./Tooltip-CS4C58T7.cjs"),tt=require("./Legend-Bbz-hKDf.cjs"),lt=require("./Title-C2siG5N2.cjs"),at=require("./Slicer-CWvkt-8k.cjs"),Me=require("./usePrinter-B4xDG31F.cjs"),ot=require("./vue-ui-accordion-CBxsUoGb.cjs"),rt=require("./DataTable-CovKV5Yy.cjs"),nt=require("./vue-ui-skeleton-Nuju6X7l.cjs"),Re=require("./useNestedProp-D_feh7A_.cjs"),ut=require("./PenAndPaper-BIcmfBvD.cjs"),st=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),it=["id"],ct=["onClick"],vt={key:2,class:"vue-data-ui-watermark"},dt=["innerHTML"],ht={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(oe,{expose:Oe,emit:Ee}){const p=oe,{vue_ui_xy_canvas:Ne}=u.useConfig(),Z=l.ref(u.createUid()),N=l.ref(null),S=l.ref(null),B=l.ref(null),i=l.ref(null),g=l.ref(1),T=l.ref(1),_=l.ref(!1),f=l.ref(null),H=l.ref(""),re=l.ref(null),C=l.ref([]),R=l.ref(1),M=l.ref(!0),z=l.ref(!0),G=l.ref(null),ne=l.ref(0),ue=l.ref(0),V=l.ref(!1),se=l.ref(null),ie=l.ref(null),ce=l.ref(null),ve=l.ref(null),j=l.ref(0),J=l.ref(0),K=l.ref(0),Q=l.computed(()=>!!p.dataset&&p.dataset.length),t=l.computed({get:()=>de(),set:e=>e});function de(){const e=Re.useNestedProp({userConfig:p.config,defaultConfig:Ne});let o={};return e.theme?o={...Re.useNestedProp({userConfig:u.themes.vue_ui_xy_canvas[e.theme]||p.config,defaultConfig:e}),customPalette:u.themePalettes[e.theme]||u.palette}:o=e,p.config&&u.hasDeepProperty(p.config,"style.chart.scale.min")?o.style.chart.scale.min=p.config.style.chart.scale.min:o.style.chart.scale.min=null,p.config&&u.hasDeepProperty(p.config,"style.chart.scale.max")?o.style.chart.scale.max=p.config.style.chart.scale.max:o.style.chart.scale.max=null,p.config&&u.hasDeepProperty(p.config,"style.chart.zoom.startIndex")?o.style.chart.zoom.startIndex=p.config.style.chart.zoom.startIndex:o.style.chart.zoom.startIndex=null,p.config&&u.hasDeepProperty(p.config,"style.chart.zoom.endIndex")?o.style.chart.zoom.endIndex=p.config.style.chart.zoom.endIndex:o.style.chart.zoom.endIndex=null,o}l.watch(()=>p.config,e=>{t.value=de(),te(),j.value+=1,J.value+=1,K.value+=1},{deep:!0}),l.watch(()=>p.dataset,()=>{te(),j.value+=1,J.value+=1,K.value+=1},{deep:!0});const he=l.ref(t.value.style.chart.aspectRatio),{isPrinting:fe,isImaging:ye,generatePdf:ge,generateImage:pe}=Me.usePrinter({elementId:`xy_canvas_${Z.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas"}),s=l.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function Be(e){V.value=e,ue.value+=1}const me=l.computed(()=>u.convertCustomPalette(t.value.customPalette)),w=l.computed(()=>O.value?Math.max(...O.value.filter((e,o)=>!C.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),a=l.computed(()=>{const e=g.value-g.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:g.value,canvasHeight:T.value,left:g.value*t.value.style.chart.paddingProportions.left,top:T.value*t.value.style.chart.paddingProportions.top,right:g.value-g.value*t.value.style.chart.paddingProportions.right,bottom:T.value-T.value*t.value.style.chart.paddingProportions.bottom,width:e,height:T.value-T.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(n.value.end-n.value.start)}});function be(e,o){return e/o}function Fe({hasAutoScale:e,series:o,min:r,max:d,scale:h,yOffset:m,individualHeight:v,stackIndex:b=null}){return o.map((L,ae)=>{const $=h.min<0?Math.abs(h.min):0,I=be(L+$,$+h.max);let P,F;e&&(P=Math.abs(h.min),F=be(L+P,h.max+P));let D=0;return b===null?D=a.value.bottom-a.value.height*(e?F:I):D=a.value.bottom-m-v*(e?F:I),{x:a.value.left+a.value.slot*ae+a.value.slot/2,y:D,value:L}})}const x=l.computed(()=>{const e=t.value.style.chart.scale.min!==null?t.value.style.chart.scale.min:Math.min(...O.value.filter((v,b)=>!C.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(n.value.start,n.value.end))),o=t.value.style.chart.scale.max!==null?t.value.style.chart.scale.max:Math.max(...O.value.filter((v,b)=>!C.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(n.value.start,n.value.end))),r=u.calculateNiceScale(e<0?e:0,o===e?e+1<0?0:e+1:o<0?0:o,t.value.style.chart.scale.ticks),d=r.min<0?Math.abs(r.min):0,h=a.value.bottom-a.value.height*(d/(r.max+d)),m=r.ticks.map(v=>({y:a.value.bottom-a.value.height*((v+d)/(r.max+d)),x:a.value.left-8,value:v}));return{absoluteMin:d,max:o,min:e,scale:r,yLabels:m,zero:h}}),De=l.computed(()=>y.value.map(e=>`
|
|
2
|
-
<div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
|
|
3
|
-
<svg viewBox="0 0 10 10" height="12" width="12">
|
|
4
|
-
<circle cx="5" cy="5" r="5" fill="${e.color}"/>
|
|
5
|
-
</svg>
|
|
6
|
-
<span>${e.name?e.name+": ":""}</span>
|
|
7
|
-
<span>${u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.series[f.value],u.dataLabel({p:e.prefix||"",v:e.series[f.value],s:e.suffix||"",r:e.rounding||0}),{datapoint:e,seriesIndex:f.value})}</span>
|
|
8
|
-
</div>
|
|
9
|
-
`)),O=l.computed(()=>p.dataset.map((e,o)=>({...e,series:u.largestTriangleThreeBucketsArray({data:u.sanitizeArray(e.series),threshold:t.value.downsample.threshold}),absoluteIndex:o,color:u.convertColorToHex(e.color||me.value[o]||u.palette[o]||u.palette[o%u.palette.length])})));l.watch(w,e=>{e&&xe()});const y=l.computed(()=>u.assignStackRatios(O.value.filter((e,o)=>!C.value.includes(e.absoluteIndex))).map((e,o)=>({...e,series:e.series.slice(n.value.start,n.value.end)})).map((e,o)=>{let r=[null,void 0].includes(e.scaleMin)?Math.min(...e.series)||0:e.scaleMin,d=[null,void 0].includes(e.scaleMax)?Math.max(...e.series)||1:e.scaleMax;r===d&&(r=r>=0?d-1:r,d=d>=0?d:r+1);const m={ratios:e.series.filter(A=>![null,void 0].includes(A)).map(A=>(A-r)/(d-r)),valueMin:r,valueMax:d},v=e.scaleSteps||t.value.style.chart.scale.ticks;let b;e.autoScaling?b=u.calculateNiceScale(m.valueMin,m.valueMax,v):b=u.calculateNiceScale(m.valueMin<0?m.valueMin:0,m.valueMax<=0?0:m.valueMax,v);const L=s.value.stacked?a.value.height*(1-e.cumulatedStackRatio):0,ae=s.value.stacked?a.value.height/t.value.style.chart.stackGap:0,$=s.value.stacked?a.value.height*e.stackRatio-ae:a.value.height,I=b.min<0?Math.abs(b.min):0;let P;e.autoScaling&&s.value.stacked&&d<=0?P=a.value.bottom-L-$:P=a.value.bottom-L-$*(I/(b.max+I));const F=b.ticks.map((A,Qe)=>({y:a.value.bottom-L-$*(Qe/(b.ticks.length-1)),x:a.value.left-8,value:A})),D=Fe({hasAutoScale:s.value.stacked&&e.autoScaling,series:e.series,min:s.value.stacked?r:x.value.min,max:s.value.stacked?d:x.value.max,scale:s.value.stacked?b:x.value.scale,yOffset:L,individualHeight:$,stackIndex:s.value.stacked?o:null});return{...e,coordinatesLine:D,min:r,max:d,localScale:b,localZero:P,localMin:I,localYLabels:F,yOffset:L,individualHeight:$}})),n=l.ref({start:0,end:w.value});function xe(){ke()}const E=l.ref(null);async function ke(){(t.value.style.chart.zoom.startIndex!==null||t.value.style.chart.zoom.endIndex!==null)&&E.value?(t.value.style.chart.zoom.startIndex!==null&&(await l.nextTick(),await l.nextTick(),E.value&&E.value.setStartValue(t.value.style.chart.zoom.startIndex)),t.value.style.chart.zoom.endIndex!==null&&(await l.nextTick(),await l.nextTick(),E.value&&E.value.setEndValue(Ae(t.value.style.chart.zoom.endIndex+1)))):(n.value={start:0,end:w.value},ne.value+=1)}function Ae(e){const o=w.value;return e>o?o:e<0||t.value.style.chart.zoom.startIndex!==null&&e<t.value.style.chart.zoom.startIndex?t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex+1:1:e}const _e=l.computed(()=>y.value.filter(e=>["line","plot",void 0].includes(e.type))),k=l.computed(()=>y.value.filter(e=>e.type==="bar"));function He(){if(!S.value)return;const e=B.value.offsetWidth,o=B.value.offsetHeight;S.value.width=e*R.value*2,S.value.height=o*R.value*2,g.value=e*R.value*2,T.value=o*R.value*2,i.value.scale(R.value,R.value),ee()}function Ve(){if(i.value.clearRect(0,0,1e4,1e4),i.value.fillStyle=t.value.style.chart.backgroundColor,i.value.fillRect(0,0,a.value.canvasWidth,a.value.canvasHeight),s.value.stacked)t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength?y.value.forEach(e=>{for(let o=0;o<n.value.end-n.value.start+1;o+=1)c.line(i.value,[{x:a.value.left+a.value.slot*o,y:a.value.bottom-e.yOffset-e.individualHeight},{x:a.value.left+a.value.slot*o,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}):t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength&&y.value.forEach(e=>{for(let o=n.value.start;o<n.value.end;o+=1)o%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&c.line(i.value,[{x:a.value.left+a.value.slot*(o-n.value.start)+a.value.slot/2,y:a.value.bottom-e.yOffset-e.individualHeight},{x:a.value.left+a.value.slot*(o-n.value.start)+a.value.slot/2,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}),t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?y.value.forEach(e=>{e.localYLabels.forEach((o,r)=>{r<e.localYLabels.length-1&&c.rect(i.value,[{x:a.value.left,y:o.y},{x:a.value.right,y:o.y},{x:a.value.right,y:e.localYLabels[r+1].y},{x:a.value.left,y:e.localYLabels[r+1].y}],{fillColor:r%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})})}):y.value.forEach(e=>{e.localYLabels.slice(n.value.start,n.value.end).forEach(o=>{c.line(i.value,[{x:a.value.left,y:o.y},{x:a.value.right,y:o.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})})),t.value.style.chart.grid.zeroLine.show&&y.value.forEach(e=>{c.line(i.value,[{x:a.value.left,y:e.localZero},{x:a.value.right,y:e.localZero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]})}),t.value.style.chart.grid.y.axisLabels.show&&y.value.forEach(e=>{c.line(i.value,[{x:a.value.left,y:a.value.bottom-e.yOffset},{x:a.value.left,y:a.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),c.line(i.value,[{x:a.value.right,y:a.value.bottom-e.yOffset},{x:a.value.right,y:a.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),e.localYLabels.forEach((o,r)=>{c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,o.value,u.dataLabel({p:e.prefix||t.value.style.chart.grid.y.axisLabels.prefix||"",v:o.value,s:e.suffix||t.value.style.chart.grid.y.axisLabels.suffix||"",r:e.rounding||t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:o,seriesIndex:r}),o.x+t.value.style.chart.grid.y.axisLabels.offsetX,o.y,{align:"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:e.color})})}),y.value.forEach(e=>{c.text(i.value,e.name,g.value/35,a.value.bottom-e.yOffset-e.individualHeight/2,{align:"center",rotation:-90,color:e.color,font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`})});else{if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=0;e<n.value.end-n.value.start+1;e+=1)c.line(i.value,[{x:a.value.left+a.value.slot*e,y:a.value.top},{x:a.value.left+a.value.slot*e,y:a.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});else if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=n.value.start;e<n.value.end;e+=1)e%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&c.line(i.value,[{x:a.value.left+a.value.slot*(e-n.value.start)+a.value.slot/2,y:a.value.top},{x:a.value.left+a.value.slot*(e-n.value.start)+a.value.slot/2,y:a.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?x.value.yLabels.forEach((e,o)=>{o<x.value.yLabels.length-1&&c.rect(i.value,[{x:a.value.left,y:e.y},{x:a.value.right,y:e.y},{x:a.value.right,y:x.value.yLabels[o+1].y},{x:a.value.left,y:x.value.yLabels[o+1].y}],{fillColor:o%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})}):x.value.yLabels.forEach(e=>{c.line(i.value,[{x:a.value.left,y:e.y},{x:a.value.right,y:e.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})),t.value.style.chart.grid.y.showAxis&&c.line(i.value,[{x:a.value.left,y:a.value.top},{x:a.value.left,y:a.value.bottom}],{color:t.value.style.chart.grid.y.axisColor,lineWidth:t.value.style.chart.grid.y.axisThickness}),t.value.style.chart.grid.x.showAxis&&c.line(i.value,[{x:a.value.left,y:a.value.bottom},{x:a.value.right,y:a.value.bottom}],{color:t.value.style.chart.grid.x.axisColor,lineWidth:t.value.style.chart.grid.x.axisThickness}),t.value.style.chart.grid.zeroLine.show&&c.line(i.value,[{x:a.value.left,y:x.value.zero},{x:a.value.right,y:x.value.zero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]}),t.value.style.chart.grid.y.axisLabels.show&&x.value.yLabels.forEach((e,o)=>{c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.value,u.dataLabel({p:t.value.style.chart.grid.y.axisLabels.prefix||"",v:e.value,s:t.value.style.chart.grid.y.axisLabels.suffix||"",r:t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:e,seriesIndex:o}),e.x+t.value.style.chart.grid.y.axisLabels.offsetX,e.y,{align:"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.grid.y.axisLabels.color})})}t.value.style.chart.grid.y.axisName&&c.text(i.value,t.value.style.chart.grid.y.axisName,g.value-g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio*1.2,a.value.bottom-a.value.height/2,{font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center",rotation:90}),t.value.style.chart.grid.x.axisName&&c.text(i.value,t.value.style.chart.grid.x.axisName,g.value/2,T.value,{font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center"})}function We(e){for(let o=0;o<e.coordinatesLine.length;o+=1){const r=(f.value===o?g.value/150:t.value.style.chart.line.plots.show?g.value/200:0)*t.value.style.chart.line.plots.radiusRatio;c.circle(i.value,{x:e.coordinatesLine[o].x,y:e.coordinatesLine[o].y},r,{color:t.value.style.chart.backgroundColor,fillStyle:e.color,strokeColor:"transparent"})}}function qe(e){for(let o=0;o<e.coordinatesLine.length;o+=1)c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[o].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[o].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[o],seriesIndex:o}),e.coordinatesLine[o].x,e.coordinatesLine[o].y+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(g.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color,strokeColor:t.value.style.chart.backgroundColor,lineWidth:.8})}function Ue(){for(let e=n.value.start;e<n.value.end;e+=1)(n.value.end-n.value.start<t.value.style.chart.grid.y.timeLabels.modulo||n.value.end-n.value.start>=t.value.style.chart.grid.y.timeLabels.modulo&&(e%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0||e===f.value+n.value.start))&&c.text(i.value,t.value.style.chart.grid.y.timeLabels.values[e]||e+1,a.value.left+a.value.slot*(e-n.value.start)+a.value.slot/2,a.value.bottom+g.value/t.value.style.chart.grid.y.timeLabels.offsetY,{align:t.value.style.chart.grid.y.timeLabels.rotation===0?"center":t.value.style.chart.grid.y.timeLabels.rotation>0?"left":"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.timeLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:u.setOpacity(t.value.style.chart.grid.y.timeLabels.color,f.value!==null?f.value+n.value.start===e?100:20:100),rotation:t.value.style.chart.grid.y.timeLabels.rotation})}function Le(){c.line(i.value,[{x:a.value.left+a.value.slot*f.value+a.value.slot/2,y:a.value.top},{x:a.value.left+a.value.slot*f.value+a.value.slot/2,y:a.value.bottom}],{color:t.value.style.chart.selector.color,lineDash:t.value.style.chart.selector.dashed?[8,8]:[0,0],lineWidth:2,linceCap:"round"})}function Xe(){k.value.forEach((e,o)=>{for(let r=0;r<e.coordinatesLine.length;r+=1)c.rect(i.value,[{x:a.value.left+a.value.slot*r+a.value.slot/10+(s.value.stacked?0:a.value.slot/k.value.length*o-(o===0?0:a.value.slot/(5*k.value.length)*o)),y:s.value.stacked?e.localZero:x.value.zero},{x:a.value.left+a.value.slot*r+a.value.slot/10+(s.value.stacked?0:a.value.slot/k.value.length*o-(o===0?0:a.value.slot/(5*k.value.length)*o))+a.value.slot*.8/(s.value.stacked?1:k.value.length),y:s.value.stacked?e.localZero:x.value.zero},{x:a.value.left+a.value.slot*r+a.value.slot/10+(s.value.stacked?0:a.value.slot/k.value.length*o-(o===0?0:a.value.slot/(5*k.value.length)*o))+a.value.slot*.8/(s.value.stacked?1:k.value.length),y:e.coordinatesLine[r].y},{x:a.value.left+a.value.slot*r+a.value.slot/10+(s.value.stacked?0:a.value.slot/k.value.length*o-(o===0?0:a.value.slot/(5*k.value.length)*o)),y:e.coordinatesLine[r].y}],{strokeColor:t.value.style.chart.backgroundColor,gradient:{type:"linear",start:{x:e.coordinatesLine[r].x,y:e.coordinatesLine[r].y},end:{x:e.coordinatesLine[r].x,y:s.value.stacked?e.localZero:x.value.zero},stops:[{offset:0,color:e.color},{offset:1,color:u.lightenHexColor(e.color,.5)}]}}),s.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[r].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[r].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[r],seriesIndex:r}),a.value.left+a.value.slot*r+a.value.slot/10+(s.value.stacked?0:a.value.slot/k.value.length*o-(o===0?0:a.value.slot/(5*k.value.length)*o))+a.value.slot*.4/(s.value.stacked?1:k.value.length),(e.coordinatesLine[r].value<0?s.value.stacked?e.localZero:x.value.zero:e.coordinatesLine[r].y)+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(g.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color,strokeColor:t.value.style.chart.backgroundColor,lineWidth:.8})})}function Ye(e){e.useArea?s.value.stacked?c.polygon(i.value,[{x:e.coordinatesLine[0].x,y:e.localZero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:e.localZero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):c.polygon(i.value,[{x:e.coordinatesLine[0].x,y:x.value.zero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:x.value.zero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):c.line(i.value,e.coordinatesLine,{color:e.color,lineWidth:3})}function Ze(){y.value.forEach((e,o)=>{c.line(i.value,[{x:a.value.left,y:a.value.bottom-e.yOffset},{x:a.value.right,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.x.horizontalLines.color,lineWidth:1})})}function ee(){Ve(),M.value?(z.value&&f.value!==null&&t.value.style.chart.selector.show&&Le(),Xe(),s.value.stacked&&t.value.style.chart.grid.x.showAxis&&Ze(),_e.value.forEach(e=>{(e.type==="line"||!e.type)&&Ye(e),z.value&&(We(e),s.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&qe(e))}),G.value=c.cloneCanvas(S.value)):(G.value&&(i.value.clearRect(0,0,1e4,1e4),i.value.drawImage(G.value,0,0)),z.value&&f.value!==null&&t.value.style.chart.selector.show&&Le(),z.value&&f.value!==null&&y.value.forEach(e=>{if(e.type==="line"||!e.type||e.type==="plot"){if(!e.coordinatesLine[f.value])return;e.coordinatesLine[f.value].x!==void 0&&e.coordinatesLine[f.value].y!==void 0&&c.circle(i.value,{x:e.coordinatesLine[f.value].x,y:e.coordinatesLine[f.value].y},g.value/150*t.value.style.chart.line.plots.radiusRatio,{color:t.value.style.chart.backgroundColor,fillStyle:e.color,strokeColor:"transparent"})}})),t.value.style.chart.grid.y.timeLabels.show&&Ue(),M.value=!1}const W=c.debounce(()=>{z.value=!0,He()},w.value>200?10:1,!z.value);function Ge(e){const{left:o}=S.value.getBoundingClientRect(),r=e.clientX-o;if(r*2<a.value.left||r*2>a.value.right){_.value=!1,f.value=null;return}const d=r*2-a.value.left;if(f.value=Math.floor(d/a.value.slot),_.value=!0,!z.value)return;let h="";const m=t.value.style.chart.tooltip.customFormat;u.isFunction(m)&&u.functionReturnsString(()=>m({seriesIndex:f.value,datapoint:y.value.map(v=>({shape:v.shape||null,name:v.name,color:v.color,type:v.type||"line",value:v.series.find((b,L)=>L===f.value)})),series:y.value,config:t.value}))?H.value=m({seriesIndex:f.value,datapoint:y.value.map(v=>({shape:v.shape||null,name:v.name,color:v.color,type:v.type||"line",value:v.series.find((b,L)=>L===f.value)})),series:y.value,config:t.value}):(t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[f.value]&&(h+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; width:100%">${t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[f.value]}</div>`),h+=De.value.join(""),H.value=h),z.value=!1}l.watch(()=>f.value,e=>{W()}),l.watch(()=>n.value,e=>{M.value=!0,ee()},{deep:!0}),l.watch(()=>s.value.showDataLabels,e=>{M.value=!0,ee()}),l.watch(()=>s.value.stacked,e=>{M.value=!0,z.value=!0,W()});function je(){_.value=!1,f.value=null,H.value=""}const q=l.ref(null),U=l.ref(null);l.onMounted(()=>{te()});function te(){if(u.objectIsEmpty(p.dataset)?u.error({componentName:"VueUiXyCanvas",type:"dataset"}):S.value&&(i.value=S.value.getContext("2d",{willReadFrequently:!0})),t.value.responsive){const e=c.throttle(()=>{const{width:o,height:r}=c.useResponsive({chart:N.value,title:t.value.style.chart.title.text?se.value:null,legend:t.value.style.chart.legend.show?ie.value:null,slicer:t.value.style.chart.zoom.show&&w.value>1?ce.value:null,source:ve.value});he.value=`${o} / ${r}`});q.value=new ResizeObserver(e),q.value.observe(N.value.parentNode)}U.value=new ResizeObserver(e=>{for(const o of e)o.contentBoxSize&&B.value&&(M.value=!0,W())}),U.value.observe(B.value),ke()}l.onBeforeUnmount(()=>{U.value&&U.value.disconnect(),q.value&&q.value.disconnect()});function Ce(e){Ee("selectLegend",y.value.find(o=>o.absoluteIndex===e)),C.value.includes(e)?C.value=C.value.filter(o=>o!==e):C.value.push(e),M.value=!0,W()}const we=l.computed(()=>O.value.map((e,o)=>({...e,name:e.name,color:u.convertColorToHex(e.color)||me.value[o]||u.palette[o]||u.palette[o%u.palette.length],shape:e.shape||"circle",prefix:e.prefix||"",suffix:e.suffix||"",rounding:e.rounding||0})).map(e=>({...e,opacity:C.value.includes(e.absoluteIndex)?.5:1,segregate:()=>Ce(e.absoluteIndex),isSegregated:C.value.includes(e.absoluteIndex)}))),Je=l.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),X=l.computed(()=>{const e=[""].concat(y.value.map(h=>h.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');let o=[];for(let h=0;h<w.value;h+=1){const m=y.value.map(v=>v.series[h]??0).reduce((v,b)=>v+b,0);o.push([t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[h]??h+1].concat(y.value.map(v=>(v.series[h]??0).toFixed(t.value.table.rounding))).concat((m??0).toFixed(t.value.table.rounding)))}const r={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},d=[t.value.table.columnNames.period].concat(y.value.map(h=>h.name)).concat(t.value.table.columnNames.total);return{head:e,body:o.slice(0,n.value.end-n.value.start),config:r,colNames:d}}),Se=l.computed(()=>{if(y.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const e=y.value.map(r=>({label:r.name,color:r.color,type:r.type})),o=[];for(let r=n.value.start;r<n.value.end;r+=1){const d=[t.value.style.chart.grid.y.timeLabels.values[r]||r+1];y.value.forEach(h=>{d.push(Number((h.series[r]||0).toFixed(t.value.table.rounding)))}),o.push(d)}return{head:e,body:o}});function ze(){const e=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=["",...Se.value.head.map(m=>m.label)],r=Se.value.body,d=e.concat([o]).concat(r),h=u.createCsvContent(d);u.downloadCsv({csvContent:h,title:t.value.style.chart.title.text||"vue-ui-xy-canvas"})}function Ke(){return y.value}function $e(){s.value.showTable=!s.value.showTable}function Te(){s.value.showDataLabels=!s.value.showDataLabels}function Ie(){s.value.stacked=!s.value.stacked}function Pe(){s.value.showTooltip=!s.value.showTooltip}const Y=l.ref(!1);function le(){Y.value=!Y.value}return Oe({getData:Ke,generateCsv:ze,generatePdf:ge,generateImage:pe,toggleTable:$e,toggleLabels:Te,toggleStack:Ie,toggleTooltip:Pe,toggleAnnotator:le}),(e,o)=>(l.openBlock(),l.createElementBlock("div",{style:l.normalizeStyle(`width:100%; position:relative; ${t.value.responsive?"height: 100%":""}`),ref_key:"xy",ref:N,id:`xy_canvas_${Z.value}`,class:l.normalizeClass(`vue-ui-donut ${V.value?"vue-data-ui-wrapper-fullscreen":""}`)},[t.value.style.chart.title.text?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:se,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};`)},[(l.openBlock(),l.createBlock(lt._sfc_main,{key:`title_${j.value}`,config:{title:{cy:"xy-canvas-title",...t.value.style.chart.title},subtitle:{cy:"xy-canvas-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):l.createCommentVNode("",!0),t.value.userOptions.show&&Q.value?(l.openBlock(),l.createBlock(Me.UserOptions,{ref:"details",key:`user_option_${ue.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:l.unref(fe),isImaging:l.unref(ye),uid:Z.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasLabel:t.value.userOptions.buttons.labels,hasStack:oe.dataset.length>1&&t.value.userOptions.buttons.stack,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasTable:n.value.end-n.value.start<200&&t.value.userOptions.buttons.table,isFullscreen:V.value,isTooltip:s.value.showTooltip,isStacked:s.value.stacked,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:Y.value,onToggleFullscreen:Be,onGeneratePdf:l.unref(ge),onGenerateCsv:ze,onGenerateImage:l.unref(pe),onToggleTable:$e,onToggleLabels:Te,onToggleStack:Ie,onToggleTooltip:Pe,onToggleAnnotator:le},l.createSlots({_:2},[e.$slots.optionTooltip?{name:"optionTooltip",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,e.$slots.optionPdf?{name:"optionPdf",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,e.$slots.optionCsv?{name:"optionCsv",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,e.$slots.optionImg?{name:"optionImg",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,e.$slots.optionTable?{name:"optionTable",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,e.$slots.optionLabels?{name:"optionLabels",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,e.$slots.optionStack?{name:"optionStack",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionStack",{},void 0,!0)]),key:"6"}:void 0,e.$slots.optionFullscreen?{name:"optionFullscreen",fn:l.withCtx(({toggleFullscreen:r,isFullscreen:d})=>[l.renderSlot(e.$slots,"optionFullscreen",l.normalizeProps(l.guardReactiveProps({toggleFullscreen:r,isFullscreen:d})),void 0,!0)]),key:"7"}:void 0,e.$slots.optionAnnotator?{name:"optionAnnotator",fn:l.withCtx(({toggleAnnotator:r,isAnnotator:d})=>[l.renderSlot(e.$slots,"optionAnnotator",l.normalizeProps(l.guardReactiveProps({toggleAnnotator:r,isAnnotator:d})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasLabel","hasStack","hasFullscreen","hasTable","isFullscreen","isTooltip","isStacked","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):l.createCommentVNode("",!0),l.createElementVNode("div",{class:"vue-ui-xy-canvas",style:l.normalizeStyle(`position: relative; aspect-ratio: ${he.value}`),ref_key:"container",ref:B},[Q.value?(l.openBlock(),l.createElementBlock("canvas",{key:0,ref_key:"canvas",ref:S,style:{width:"100%",height:"100%"},onMousemove:o[0]||(o[0]=r=>Ge(r)),onMouseleave:je},null,544)):(l.openBlock(),l.createBlock(nt.default,{key:1,config:{type:"line",style:{backgroundColor:t.value.style.chart.backgroundColor,line:{axis:{color:"#CCCCCC"},path:{color:"#CCCCCC",strokeWidth:.5}}}}},null,8,["config"])),l.createVNode(et._sfc_main,{show:s.value.showTooltip&&_.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:S.value,content:H.value,isFullscreen:V.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,isCustom:l.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-before",l.normalizeProps(l.guardReactiveProps({...re.value})),void 0,!0)]),"tooltip-after":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-after",l.normalizeProps(l.guardReactiveProps({...re.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","position","offsetY","parent","content","isFullscreen","backgroundOpacity","isCustom"])],4),l.createElementVNode("div",{ref_key:"chartSlicer",ref:ce,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&w.value>1?(l.openBlock(),l.createBlock(at.Slicer,{ref_key:"slicerComponent",ref:E,key:`slicer_${ne.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.grid.y.timeLabels.values[n.value.start]?t.value.style.chart.grid.y.timeLabels.values[n.value.start]:"",labelRight:t.value.style.chart.grid.y.timeLabels.values[n.value.end-1]?t.value.style.chart.grid.y.timeLabels.values[n.value.end-1]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:w.value,min:0,valueStart:n.value.start,valueEnd:n.value.end,start:n.value.start,"onUpdate:start":o[1]||(o[1]=r=>n.value.start=r),end:n.value.end,"onUpdate:end":o[2]||(o[2]=r=>n.value.end=r),refreshStartPoint:t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex:0,refreshEndPoint:t.value.style.chart.zoom.endIndex!==null?t.value.style.chart.zoom.endIndex+1:w.value,onReset:xe},{"reset-action":l.withCtx(({reset:r})=>[l.renderSlot(e.$slots,"reset-action",l.normalizeProps(l.guardReactiveProps({reset:r})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint"])):l.createCommentVNode("",!0)],4),l.createElementVNode("div",{ref_key:"chartLegend",ref:ie},[t.value.style.chart.legend.show&&Q.value?(l.openBlock(),l.createBlock(tt.Legend,{legendSet:we.value,config:Je.value,key:`legend_${K.value}`,onClickMarker:o[3]||(o[3]=({i:r})=>Ce(r))},{item:l.withCtx(({legend:r,index:d})=>[l.createElementVNode("div",{onClick:h=>r.segregate(),style:l.normalizeStyle(`opacity:${C.value.includes(d)?.5:1}`)},l.toDisplayString(r.name),13,ct)]),_:1},8,["legendSet","config"])):l.renderSlot(e.$slots,"legend",{key:1,legend:we.value},void 0,!0)],512),e.$slots.watermark?(l.openBlock(),l.createElementBlock("div",vt,[l.renderSlot(e.$slots,"watermark",l.normalizeProps(l.guardReactiveProps({isPrinting:l.unref(fe)||l.unref(ye)})),void 0,!0)])):l.createCommentVNode("",!0),e.$slots.source?(l.openBlock(),l.createElementBlock("div",{key:3,ref_key:"source",ref:ve,dir:"auto"},[l.renderSlot(e.$slots,"source",{},void 0,!0)],512)):l.createCommentVNode("",!0),n.value.end-n.value.start<200?(l.openBlock(),l.createBlock(ot.default,{key:4,hideDetails:"",config:{open:s.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:l.withCtx(()=>[(l.openBlock(),l.createBlock(rt.DataTable,{key:`table_${J.value}`,colNames:X.value.colNames,head:X.value.head,body:X.value.body,config:X.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[4]||(o[4]=r=>s.value.showTable=!1)},{th:l.withCtx(({th:r})=>[l.createElementVNode("div",{innerHTML:r},null,8,dt)]),td:l.withCtx(({td:r})=>[l.createTextVNode(l.toDisplayString(r),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):l.createCommentVNode("",!0),t.value.userOptions.buttons.annotator&&y.value.length?(l.openBlock(),l.createBlock(ut.PenAndPaper,{key:5,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:Y.value,onClose:le},null,8,["parent","backgroundColor","color","active"])):l.createCommentVNode("",!0)],14,it))}},ft=st._export_sfc(ht,[["__scopeId","data-v-a8e374ca"]]);exports.default=ft;
|