vue-data-ui 2.4.9 → 2.4.11
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 +25 -0
- package/dist/{Arrow-BGrY1ydc.cjs → Arrow-B2lMAc1C.cjs} +1 -1
- package/dist/{Arrow-Fke-ybVE.js → Arrow-DTcpIx4P.js} +1 -1
- package/dist/{BaseIcon-BFZiytmY.js → BaseIcon-CNl_wwAN.js} +1 -1
- package/dist/{BaseIcon-P668oVRL.cjs → BaseIcon-Cci48l_M.cjs} +1 -1
- package/dist/{DataTable-8vTlt4e4.cjs → DataTable-BoMFIudG.cjs} +1 -1
- package/dist/{DataTable-Bqouzjik.js → DataTable-DD2NjgWr.js} +2 -2
- package/dist/{Legend-DiLvq4vW.cjs → Legend-BEBhnrMH.cjs} +1 -1
- package/dist/{Legend-BN2BcDVi.js → Legend-rLopjauc.js} +1 -1
- package/dist/PackageVersion-BPbxd_rU.cjs +1 -0
- package/dist/{PackageVersion-CTpPwNFg.js → PackageVersion-DjRRmHKg.js} +1 -1
- package/dist/{PenAndPaper-DLwiH2Np.js → PenAndPaper-BkFQN_fq.js} +2 -2
- package/dist/{PenAndPaper-bKJD5B9n.cjs → PenAndPaper-CLAyC1BP.cjs} +1 -1
- package/dist/{Shape-IDJlHO6G.js → Shape-Bc8lWk7D.js} +1 -1
- package/dist/{Shape-CLIJMoFo.cjs → Shape-DFrKEycb.cjs} +1 -1
- package/dist/{Slicer-CQsrB1vr.js → Slicer-CfPeFpUJ.js} +2 -2
- package/dist/{Slicer-BkionZj4.cjs → Slicer-DnddhuPD.cjs} +1 -1
- package/dist/{Title-RGaMCxMM.cjs → Title-BWAmAhTl.cjs} +1 -1
- package/dist/{Title-eBZtf9JC.js → Title-NE47pLld.js} +1 -1
- package/dist/{Tooltip-wUAIAM2C.js → Tooltip-1RIjj9Cf.js} +1 -1
- package/dist/{Tooltip-DfxV57uu.cjs → Tooltip-CopGUpZs.cjs} +1 -1
- package/dist/{index-CRiXU5u4.js → index-9EusFpSb.js} +1265 -1195
- package/dist/index-D3H-ye-i.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +18 -0
- package/dist/types/vue-data-ui.d.ts +18 -0
- package/dist/{useNestedProp-DxRaQ3VM.cjs → useNestedProp-BkL_BRGP.cjs} +1 -1
- package/dist/{useNestedProp-CJpdmtwu.js → useNestedProp-DLOArwu0.js} +1 -1
- package/dist/{usePrinter-1WhDjgbn.cjs → usePrinter-Bp96LusR.cjs} +1 -1
- package/dist/{usePrinter-uc7d9V3q.js → usePrinter-Q5_oK30J.js} +1 -1
- package/dist/{vue-data-ui-MkOQ0Nle.cjs → vue-data-ui-HoFeCyRO.cjs} +1 -1
- package/dist/{vue-data-ui-CIm7VqEX.js → vue-data-ui-mDZeKnLu.js} +58 -58
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +11 -11
- package/dist/{vue-ui-3d-bar-C1Me6SaI.cjs → vue-ui-3d-bar-CUChTQDT.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-BJ3zWmrS.js → vue-ui-3d-bar-e8ooZusZ.js} +9 -9
- package/dist/{vue-ui-accordion-Bwp3om8n.cjs → vue-ui-accordion-BmZSXtWn.cjs} +1 -1
- package/dist/{vue-ui-accordion-UcagglMR.js → vue-ui-accordion-DE04OBLu.js} +3 -3
- package/dist/{vue-ui-age-pyramid-DFBnbj8i.cjs → vue-ui-age-pyramid-R8-ov8YO.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-CVziTeLg.js → vue-ui-age-pyramid-rBF6FLI0.js} +10 -10
- package/dist/{vue-ui-annotator-X2GVxnvT.js → vue-ui-annotator-C6w7-GB3.js} +1 -1
- package/dist/{vue-ui-annotator-DtntPrcs.cjs → vue-ui-annotator-C_ePw9hm.cjs} +1 -1
- package/dist/{vue-ui-bullet-Dgbg2x2i.cjs → vue-ui-bullet-CBMK8LjV.cjs} +1 -1
- package/dist/{vue-ui-bullet-gkQMIEIY.js → vue-ui-bullet-CrrpYnF-.js} +8 -8
- package/dist/{vue-ui-candlestick-a8DCa9QA.cjs → vue-ui-candlestick-DxzQ2_Xw.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DlrvnR9W.js → vue-ui-candlestick-pRGkapAM.js} +11 -11
- package/dist/{vue-ui-carousel-table-Dv7Y4mPd.cjs → vue-ui-carousel-table-DEyQbJoc.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DqDoR5Ke.js → vue-ui-carousel-table-XQAJxsSd.js} +4 -4
- package/dist/{vue-ui-chestnut-B8O8csWz.cjs → vue-ui-chestnut-B0SB93Um.cjs} +1 -1
- package/dist/{vue-ui-chestnut-B01FJ4C4.js → vue-ui-chestnut-CqkJL5mj.js} +8 -8
- package/dist/{vue-ui-cursor-BViP1aeI.cjs → vue-ui-cursor-8F-TYD5m.cjs} +1 -1
- package/dist/{vue-ui-cursor-Ba_H8Ncs.js → vue-ui-cursor-i9FdNF85.js} +2 -2
- package/dist/{vue-ui-dashboard-gP-6lXnW.cjs → vue-ui-dashboard-B-uIDy9E.cjs} +1 -1
- package/dist/{vue-ui-dashboard-14KBNioW.js → vue-ui-dashboard-BVNC1LLY.js} +2 -2
- package/dist/{vue-ui-digits-BsR96Ev2.js → vue-ui-digits-2kFZOssj.js} +2 -2
- package/dist/{vue-ui-digits-D2YQwzS9.cjs → vue-ui-digits-DE2wuVjS.cjs} +1 -1
- package/dist/{vue-ui-donut-CRfeBum_.js → vue-ui-donut-BBPED91N.js} +11 -11
- package/dist/{vue-ui-donut-BBgDxAnA.cjs → vue-ui-donut-Dj37tKw3.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-B8HXkrQY.js → vue-ui-donut-evolution-BUfkTz0e.js} +11 -11
- package/dist/{vue-ui-donut-evolution-BJv9WfCY.cjs → vue-ui-donut-evolution-i1mnDbEF.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-W6qsJcrI.cjs → vue-ui-dumbbell-BRUIB_6C.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-B8JLe4Rx.js → vue-ui-dumbbell-DhJADY6g.js} +10 -10
- package/dist/{vue-ui-flow-BaGjUUsp.cjs → vue-ui-flow-Blm_8Qvt.cjs} +1 -1
- package/dist/{vue-ui-flow-XQRrGPwP.js → vue-ui-flow-kshJA6fg.js} +9 -9
- package/dist/{vue-ui-galaxy-Dll7-xmx.cjs → vue-ui-galaxy-BD4b4UPK.cjs} +1 -1
- package/dist/{vue-ui-galaxy-C860KoXR.js → vue-ui-galaxy-CRympGmo.js} +11 -11
- package/dist/{vue-ui-gauge-Cw6HxC9W.cjs → vue-ui-gauge-CctxHIyM.cjs} +1 -1
- package/dist/{vue-ui-gauge-CaM7KOxs.js → vue-ui-gauge-GhVHQWB5.js} +7 -7
- package/dist/{vue-ui-gizmo-CUsTgs2Y.js → vue-ui-gizmo-BmxuTH7g.js} +3 -3
- package/dist/{vue-ui-gizmo-9S26lSOK.cjs → vue-ui-gizmo-DtizFyAK.cjs} +1 -1
- package/dist/{vue-ui-heatmap-BDBRTOtW.cjs → vue-ui-heatmap-C-sjrmzc.cjs} +1 -1
- package/dist/{vue-ui-heatmap-C_2gDpgT.js → vue-ui-heatmap-DxRULRVw.js} +10 -10
- package/dist/{vue-ui-kpi-8TItSsJI.js → vue-ui-kpi-9gsCJSlL.js} +3 -3
- package/dist/{vue-ui-kpi-x5RLnUtN.cjs → vue-ui-kpi-ByeLCYYp.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-AZUp82dL.cjs → vue-ui-mini-loader--9CTs5gd.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BeWlFItj.js → vue-ui-mini-loader-BoUDfasO.js} +2 -2
- package/dist/{vue-ui-molecule-tkmH5BKP.cjs → vue-ui-molecule-GiHkJdKW.cjs} +1 -1
- package/dist/{vue-ui-molecule-CJ_9xqd9.js → vue-ui-molecule-kL3t5Yhh.js} +11 -11
- package/dist/{vue-ui-mood-radar-Ck53yZA6.js → vue-ui-mood-radar-Btlxem3-.js} +11 -11
- package/dist/{vue-ui-mood-radar-C75OoHKh.cjs → vue-ui-mood-radar-hasGnJHW.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-Bpyw1aFZ.cjs → vue-ui-nested-donuts-A8iBv-cs.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-B_S0s6fo.js → vue-ui-nested-donuts-BNHhURZB.js} +11 -11
- package/dist/{vue-ui-onion-DnLZsLDV.js → vue-ui-onion-BjT6FXBW.js} +11 -11
- package/dist/{vue-ui-onion-lMCndwqx.cjs → vue-ui-onion-CfvgXR20.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-Cjr4ER1g.js → vue-ui-parallel-coordinate-plot-1gJHwi-G.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-CiuKqlpx.cjs → vue-ui-parallel-coordinate-plot-72ULVOQs.cjs} +1 -1
- package/dist/vue-ui-quadrant-BIReuPm7.cjs +1 -0
- package/dist/{vue-ui-quadrant-7ayR33KM.js → vue-ui-quadrant-sfyO2CyO.js} +130 -123
- package/dist/{vue-ui-quick-chart-CF5lJluJ.cjs → vue-ui-quick-chart-C-Z1DYoT.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-C0jzFqV_.js → vue-ui-quick-chart-C-srQH9J.js} +9 -9
- package/dist/{vue-ui-radar-_wv53dRp.js → vue-ui-radar-BzC0VQbN.js} +12 -12
- package/dist/{vue-ui-radar-Dpfn4aPE.cjs → vue-ui-radar-MiFm7SRw.cjs} +1 -1
- package/dist/{vue-ui-rating-DW2tgPIX.cjs → vue-ui-rating-BuD7W04t.cjs} +1 -1
- package/dist/{vue-ui-rating-DQHUlrFb.js → vue-ui-rating-ki_gfG3m.js} +11 -11
- package/dist/{vue-ui-relation-circle-BMq4fJ88.cjs → vue-ui-relation-circle-B67IFMK8.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-79WZpSrS.js → vue-ui-relation-circle-BZMISq3F.js} +7 -7
- package/dist/{vue-ui-rings-BoTgy6Fr.cjs → vue-ui-rings-BUyJgRUc.cjs} +1 -1
- package/dist/{vue-ui-rings-BrCjSI5Z.js → vue-ui-rings-CfpBmZkF.js} +11 -11
- package/dist/{vue-ui-scatter-CBmiFQT9.js → vue-ui-scatter-BFs-7dvK.js} +131 -127
- package/dist/vue-ui-scatter-DMNVRT91.cjs +1 -0
- package/dist/{vue-ui-screenshot-Bq3qvacn.cjs → vue-ui-screenshot-BMSEKDz2.cjs} +1 -1
- package/dist/{vue-ui-screenshot-BKOcxDB2.js → vue-ui-screenshot-Cauo4x1P.js} +1 -1
- package/dist/{vue-ui-skeleton-xn62L2MO.cjs → vue-ui-skeleton-BWO9iit6.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CjpLaxv-.js → vue-ui-skeleton-DptJx8-6.js} +20 -20
- package/dist/{vue-ui-smiley-D6aLE71R.js → vue-ui-smiley-Cg1vDE5p.js} +2 -2
- package/dist/{vue-ui-smiley-9H9LUASi.cjs → vue-ui-smiley-DEV_dsFD.cjs} +1 -1
- package/dist/vue-ui-spark-trend-DFwmZlab.cjs +1 -0
- package/dist/vue-ui-spark-trend-DmponpJr.js +282 -0
- package/dist/{vue-ui-sparkbar-BzN6k1x-.js → vue-ui-sparkbar-D4dlelWC.js} +4 -4
- package/dist/{vue-ui-sparkbar-CyNsfVim.cjs → vue-ui-sparkbar-DvVvbi80.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Cze6RBhD.js → vue-ui-sparkgauge-C2VZgwK6.js} +4 -4
- package/dist/{vue-ui-sparkgauge-m2_6j81L.cjs → vue-ui-sparkgauge-CRydFcHZ.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CLsOngeA.cjs → vue-ui-sparkhistogram-C8R8LNDx.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-B-v4hU6_.js → vue-ui-sparkhistogram-DsMLAwhW.js} +5 -5
- package/dist/vue-ui-sparkline-CjRhD9aT.cjs +1 -0
- package/dist/{vue-ui-sparkline-DLnP9odc.js → vue-ui-sparkline-D0tbUqaT.js} +134 -124
- package/dist/{vue-ui-sparkstackbar-BXP6IEtT.cjs → vue-ui-sparkstackbar-Mcu-MB5q.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-cDy_FCNx.js → vue-ui-sparkstackbar-oXLKSeVe.js} +5 -5
- package/dist/{vue-ui-stackbar-DrpNm-6r.cjs → vue-ui-stackbar-CLejMfqE.cjs} +1 -1
- package/dist/{vue-ui-stackbar-CiqiPCPX.js → vue-ui-stackbar-JD5iEkUX.js} +12 -12
- package/dist/{vue-ui-strip-plot-DNo9nipS.cjs → vue-ui-strip-plot-DT_HJhrK.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-C-zS7o1M.js → vue-ui-strip-plot-ZLb1XbOJ.js} +11 -11
- package/dist/{vue-ui-table-D9aY6eJT.cjs → vue-ui-table-CATIqeAZ.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-KxsHw3d3.cjs → vue-ui-table-heatmap-2xNfY1n-.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-zs6Z470G.js → vue-ui-table-heatmap-Bx0wx_p5.js} +21 -21
- package/dist/{vue-ui-table-EATZiVw7.js → vue-ui-table-i2KKmKxr.js} +10 -10
- package/dist/{vue-ui-table-sparkline-BNI0g8vI.js → vue-ui-table-sparkline-BJ1p4Emo.js} +16 -16
- package/dist/{vue-ui-table-sparkline-CKXBmV2x.cjs → vue-ui-table-sparkline-lIhP_jpT.cjs} +1 -1
- package/dist/{vue-ui-thermometer-B70IlU6G.cjs → vue-ui-thermometer-C5HlafWP.cjs} +1 -1
- package/dist/{vue-ui-thermometer-DWYtuYTq.js → vue-ui-thermometer-Cpw1HsJj.js} +7 -7
- package/dist/{vue-ui-timer-DLobjqLZ.js → vue-ui-timer-BqlatBRs.js} +5 -5
- package/dist/{vue-ui-timer-Dimpnhrr.cjs → vue-ui-timer-DJ6Z60f7.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CehKPt9l.cjs → vue-ui-tiremarks-COUOuw47.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-DHosMEnc.js → vue-ui-tiremarks-D-X3Nci7.js} +7 -7
- package/dist/{vue-ui-treemap-3zwGXPWM.js → vue-ui-treemap-Bt24Hk6i.js} +11 -11
- package/dist/{vue-ui-treemap-uxUzrgJw.cjs → vue-ui-treemap-x7BAU-Mj.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-UXCZ5jyu.js → vue-ui-vertical-bar-BwLl08U5.js} +11 -11
- package/dist/{vue-ui-vertical-bar-tljvI8ZD.cjs → vue-ui-vertical-bar-DLarr8xJ.cjs} +1 -1
- package/dist/{vue-ui-waffle-B5YJ2-qg.js → vue-ui-waffle-CL53rtX8.js} +11 -11
- package/dist/{vue-ui-waffle-BB0nwq8k.cjs → vue-ui-waffle-CUgTo43L.cjs} +1 -1
- package/dist/{vue-ui-wheel-Doj339q6.cjs → vue-ui-wheel-BNcFNmnp.cjs} +1 -1
- package/dist/{vue-ui-wheel-BNV-kvRK.js → vue-ui-wheel-Cnktsvs_.js} +7 -7
- package/dist/{vue-ui-word-cloud-DzlAcim2.js → vue-ui-word-cloud-CNq7Fs2o.js} +10 -10
- package/dist/{vue-ui-word-cloud-vEgW75C-.cjs → vue-ui-word-cloud-DMQf_Jlw.cjs} +1 -1
- package/dist/{vue-ui-xy-DcinX3ix.js → vue-ui-xy-D0CYaEFW.js} +269 -255
- package/dist/{vue-ui-xy-canvas-C5oFgOEO.js → vue-ui-xy-canvas-CBkXw173.js} +63 -60
- package/dist/vue-ui-xy-canvas-CzEUFhi7.cjs +9 -0
- package/dist/vue-ui-xy-dwJ4ji_y.cjs +3 -0
- package/package.json +1 -1
- package/dist/PackageVersion-DPna32U7.cjs +0 -1
- package/dist/index-CxfVE-zl.cjs +0 -9
- package/dist/vue-ui-quadrant-DDbKIPVl.cjs +0 -1
- package/dist/vue-ui-scatter-AgWOR5nX.cjs +0 -1
- package/dist/vue-ui-spark-trend-DhUNW1YZ.js +0 -272
- package/dist/vue-ui-spark-trend-KO9LcvA9.cjs +0 -1
- package/dist/vue-ui-sparkline--mWL3SLf.cjs +0 -1
- package/dist/vue-ui-xy-CpuHnuJR.cjs +0 -3
- package/dist/vue-ui-xy-canvas-D665Zxts.cjs +0 -9
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { ref as v, computed as m, watch as Y, onMounted as xa, onBeforeUnmount as La, openBlock as C, createElementBlock as q, normalizeStyle as J, normalizeClass as ka, createBlock as P, createCommentVNode as
|
|
2
|
-
import { u as $a, c as za, t as Ta, a as Ma, p as D, b as Ra, C as ge, i as Q, f as ee,
|
|
3
|
-
import { d as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { L as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { S as
|
|
8
|
-
import { u as
|
|
9
|
-
import
|
|
10
|
-
import { D as
|
|
11
|
-
import
|
|
12
|
-
import { u as Qe } from "./useNestedProp-
|
|
13
|
-
import { P as
|
|
14
|
-
import { _ as
|
|
15
|
-
const
|
|
1
|
+
import { ref as v, computed as m, watch as Y, onMounted as xa, onBeforeUnmount as La, openBlock as C, createElementBlock as q, normalizeStyle as J, normalizeClass as ka, createBlock as P, createCommentVNode as A, unref as _, createSlots as Ca, withCtx as b, renderSlot as x, normalizeProps as B, guardReactiveProps as X, createElementVNode as K, createVNode as wa, toDisplayString as Ve, createTextVNode as Sa } from "vue";
|
|
2
|
+
import { u as $a, c as za, t as Ta, a as Ma, p as D, b as Ra, C as ge, i as Q, f as ee, Y as Ia, I as Oa, d as je, a2 as Pa, o as Fa, e as Ea, x as qe, y as Na, q as Aa, r as _a, s as ae, l as Da } from "./index-9EusFpSb.js";
|
|
3
|
+
import { d as Ha, c as Wa, a as Je, t as Ya, l as w, r as pe, b as F, p as Ke, u as Ba } from "./useResponsive-CoxXLe23.js";
|
|
4
|
+
import { _ as Xa } from "./Tooltip-1RIjj9Cf.js";
|
|
5
|
+
import { L as Ua } from "./Legend-rLopjauc.js";
|
|
6
|
+
import { _ as Za } from "./Title-NE47pLld.js";
|
|
7
|
+
import { S as Ga } from "./Slicer-CfPeFpUJ.js";
|
|
8
|
+
import { u as Va, U as ja } from "./usePrinter-Q5_oK30J.js";
|
|
9
|
+
import qa from "./vue-ui-accordion-DE04OBLu.js";
|
|
10
|
+
import { D as Ja } from "./DataTable-DD2NjgWr.js";
|
|
11
|
+
import Ka from "./vue-ui-skeleton-DptJx8-6.js";
|
|
12
|
+
import { u as Qe } from "./useNestedProp-DLOArwu0.js";
|
|
13
|
+
import { P as Qa } from "./PenAndPaper-BkFQN_fq.js";
|
|
14
|
+
import { _ as et } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
|
+
const at = ["id"], tt = ["onClick"], lt = {
|
|
16
16
|
key: 2,
|
|
17
17
|
class: "vue-data-ui-watermark"
|
|
18
|
-
},
|
|
18
|
+
}, ot = ["innerHTML"], rt = {
|
|
19
19
|
__name: "vue-ui-xy-canvas",
|
|
20
20
|
props: {
|
|
21
21
|
dataset: {
|
|
@@ -53,7 +53,7 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
53
53
|
Y(() => E.config, (e) => {
|
|
54
54
|
a.value = Me(), De(), $e.value += 1, ze.value += 1, Te.value += 1;
|
|
55
55
|
}, { deep: !0 });
|
|
56
|
-
const Re = v(a.value.style.chart.aspectRatio), { isPrinting: Ie, isImaging: Oe, generatePdf: Pe, generateImage: Fe } =
|
|
56
|
+
const Re = v(a.value.style.chart.aspectRatio), { isPrinting: Ie, isImaging: Oe, generatePdf: Pe, generateImage: Fe } = Va({
|
|
57
57
|
elementId: `xy_canvas_${ie.value}`,
|
|
58
58
|
fileName: a.value.style.chart.title.text || "vue-ui-xy-canvas"
|
|
59
59
|
}), u = v({
|
|
@@ -129,14 +129,17 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
129
129
|
</div>
|
|
130
130
|
`)), W = m(() => E.dataset.map((e, l) => ({
|
|
131
131
|
...e,
|
|
132
|
-
series: Ia(
|
|
132
|
+
series: Ia({
|
|
133
|
+
data: Oa(e.series),
|
|
134
|
+
threshold: a.value.downsample.threshold
|
|
135
|
+
}),
|
|
133
136
|
absoluteIndex: l,
|
|
134
137
|
color: je(e.color || Ee.value[l] || D[l] || D[l % D.length])
|
|
135
138
|
})));
|
|
136
139
|
Y(R, (e) => {
|
|
137
|
-
e &&
|
|
140
|
+
e && Ae();
|
|
138
141
|
});
|
|
139
|
-
const h = m(() =>
|
|
142
|
+
const h = m(() => Pa(W.value.filter((e, l) => !S.value.includes(e.absoluteIndex))).map((e, l) => ({
|
|
140
143
|
...e,
|
|
141
144
|
series: e.series.slice(r.value.start, r.value.end)
|
|
142
145
|
})).map((e, l) => {
|
|
@@ -182,7 +185,7 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
182
185
|
start: 0,
|
|
183
186
|
end: R.value
|
|
184
187
|
});
|
|
185
|
-
function
|
|
188
|
+
function Ae() {
|
|
186
189
|
r.value = {
|
|
187
190
|
start: 0,
|
|
188
191
|
end: R.value
|
|
@@ -483,7 +486,7 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
483
486
|
}
|
|
484
487
|
);
|
|
485
488
|
}
|
|
486
|
-
function
|
|
489
|
+
function _e() {
|
|
487
490
|
w(
|
|
488
491
|
s.value,
|
|
489
492
|
[
|
|
@@ -535,7 +538,7 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
535
538
|
},
|
|
536
539
|
stops: [
|
|
537
540
|
{ offset: 0, color: e.color },
|
|
538
|
-
{ offset: 1, color:
|
|
541
|
+
{ offset: 1, color: Da(e.color, 0.5) }
|
|
539
542
|
]
|
|
540
543
|
}
|
|
541
544
|
}
|
|
@@ -600,9 +603,9 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
600
603
|
});
|
|
601
604
|
}
|
|
602
605
|
function he() {
|
|
603
|
-
na(), N.value ? (z.value && d.value !== null && a.value.style.chart.selector.show &&
|
|
606
|
+
na(), N.value ? (z.value && d.value !== null && a.value.style.chart.selector.show && _e(), da(), u.value.stacked && a.value.style.chart.grid.x.showAxis && fa(), ua.value.forEach((e) => {
|
|
604
607
|
(e.type === "line" || !e.type) && ha(e), z.value && (ia(e), u.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && va(e));
|
|
605
|
-
}), ve.value =
|
|
608
|
+
}), ve.value = Wa($.value)) : (ve.value && (s.value.clearRect(0, 0, 1e4, 1e4), s.value.drawImage(ve.value, 0, 0)), z.value && d.value !== null && a.value.style.chart.selector.show && _e(), z.value && d.value !== null && h.value.forEach((e) => {
|
|
606
609
|
if (e.type === "line" || !e.type || e.type === "plot") {
|
|
607
610
|
if (!e.coordinatesLine[d.value]) return;
|
|
608
611
|
e.coordinatesLine[d.value].x !== void 0 && e.coordinatesLine[d.value].y !== void 0 && Je(
|
|
@@ -621,7 +624,7 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
621
624
|
}
|
|
622
625
|
})), a.value.style.chart.grid.y.timeLabels.show && ca(), N.value = !1;
|
|
623
626
|
}
|
|
624
|
-
const oe =
|
|
627
|
+
const oe = Ha(() => {
|
|
625
628
|
z.value = !0, sa();
|
|
626
629
|
}, R.value > 200 ? 10 : 1, !z.value);
|
|
627
630
|
function ya(e) {
|
|
@@ -634,7 +637,7 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
634
637
|
if (d.value = Math.floor(i / t.value.slot), te.value = !0, !z.value) return;
|
|
635
638
|
let c = "";
|
|
636
639
|
const y = a.value.style.chart.tooltip.customFormat;
|
|
637
|
-
qe(y) &&
|
|
640
|
+
qe(y) && Na(() => y({
|
|
638
641
|
seriesIndex: d.value,
|
|
639
642
|
datapoint: h.value.map((n) => ({
|
|
640
643
|
shape: n.shape || null,
|
|
@@ -677,12 +680,12 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
677
680
|
De();
|
|
678
681
|
});
|
|
679
682
|
function De() {
|
|
680
|
-
if (
|
|
683
|
+
if (Fa(E.dataset) ? Ea({
|
|
681
684
|
componentName: "VueUiXyCanvas",
|
|
682
685
|
type: "dataset"
|
|
683
686
|
}) : $.value && (s.value = $.value.getContext("2d", { willReadFrequently: !0 })), a.value.responsive) {
|
|
684
|
-
const e =
|
|
685
|
-
const { width: l, height: o } =
|
|
687
|
+
const e = Ya(() => {
|
|
688
|
+
const { width: l, height: o } = Ba({
|
|
686
689
|
chart: U.value,
|
|
687
690
|
title: a.value.style.chart.title.text ? ke.value : null,
|
|
688
691
|
legend: a.value.style.chart.legend.show ? Ce.value : null,
|
|
@@ -761,7 +764,7 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
761
764
|
return { head: e, body: l };
|
|
762
765
|
});
|
|
763
766
|
function Be() {
|
|
764
|
-
const e = [[a.value.style.chart.title.text], [a.value.style.chart.title.subtitle.text], [""]], l = ["", ...Ye.value.head.map((y) => y.label)], o = Ye.value.body, i = e.concat([l]).concat(o), c =
|
|
767
|
+
const e = [[a.value.style.chart.title.text], [a.value.style.chart.title.subtitle.text], [""]], l = ["", ...Ye.value.head.map((y) => y.label)], o = Ye.value.body, i = e.concat([l]).concat(o), c = Aa(i);
|
|
765
768
|
_a({ csvContent: c, title: a.value.style.chart.title.text || "vue-ui-xy-canvas" });
|
|
766
769
|
}
|
|
767
770
|
function ba() {
|
|
@@ -806,7 +809,7 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
806
809
|
ref: ke,
|
|
807
810
|
style: J(`width:100%;background:${a.value.style.chart.backgroundColor};`)
|
|
808
811
|
}, [
|
|
809
|
-
(C(), P(
|
|
812
|
+
(C(), P(Za, {
|
|
810
813
|
key: `title_${$e.value}`,
|
|
811
814
|
config: {
|
|
812
815
|
title: {
|
|
@@ -819,14 +822,14 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
819
822
|
}
|
|
820
823
|
}
|
|
821
824
|
}, null, 8, ["config"]))
|
|
822
|
-
], 4)) :
|
|
823
|
-
a.value.userOptions.show && de.value ? (C(), P(
|
|
825
|
+
], 4)) : A("", !0),
|
|
826
|
+
a.value.userOptions.show && de.value ? (C(), P(ja, {
|
|
824
827
|
ref: "details",
|
|
825
828
|
key: `user_option_${Le.value}`,
|
|
826
829
|
backgroundColor: a.value.style.chart.backgroundColor,
|
|
827
830
|
color: a.value.style.chart.color,
|
|
828
|
-
isPrinting:
|
|
829
|
-
isImaging:
|
|
831
|
+
isPrinting: _(Ie),
|
|
832
|
+
isImaging: _(Oe),
|
|
830
833
|
uid: ie.value,
|
|
831
834
|
hasTooltip: a.value.userOptions.buttons.tooltip && a.value.style.chart.tooltip.show,
|
|
832
835
|
hasPdf: a.value.userOptions.buttons.pdf,
|
|
@@ -845,9 +848,9 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
845
848
|
hasAnnotator: a.value.userOptions.buttons.annotator,
|
|
846
849
|
isAnnotation: ne.value,
|
|
847
850
|
onToggleFullscreen: la,
|
|
848
|
-
onGeneratePdf:
|
|
851
|
+
onGeneratePdf: _(Pe),
|
|
849
852
|
onGenerateCsv: Be,
|
|
850
|
-
onGenerateImage:
|
|
853
|
+
onGenerateImage: _(Fe),
|
|
851
854
|
onToggleTable: Xe,
|
|
852
855
|
onToggleLabels: Ue,
|
|
853
856
|
onToggleStack: Ze,
|
|
@@ -917,7 +920,7 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
917
920
|
]),
|
|
918
921
|
key: "8"
|
|
919
922
|
} : void 0
|
|
920
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasLabel", "hasStack", "hasFullscreen", "hasTable", "isFullscreen", "isTooltip", "isStacked", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) :
|
|
923
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasLabel", "hasStack", "hasFullscreen", "hasTable", "isFullscreen", "isTooltip", "isStacked", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) : A("", !0),
|
|
921
924
|
K("div", {
|
|
922
925
|
class: "vue-ui-xy-canvas",
|
|
923
926
|
style: J(`position: relative; aspect-ratio: ${Re.value}`),
|
|
@@ -931,7 +934,7 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
931
934
|
style: { width: "100%", height: "100%" },
|
|
932
935
|
onMousemove: l[0] || (l[0] = (o) => ya(o)),
|
|
933
936
|
onMouseleave: ga
|
|
934
|
-
}, null, 544)) : (C(), P(
|
|
937
|
+
}, null, 544)) : (C(), P(Ka, {
|
|
935
938
|
key: 1,
|
|
936
939
|
config: {
|
|
937
940
|
type: "line",
|
|
@@ -949,7 +952,7 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
949
952
|
}
|
|
950
953
|
}
|
|
951
954
|
}, null, 8, ["config"])),
|
|
952
|
-
wa(
|
|
955
|
+
wa(Xa, {
|
|
953
956
|
show: u.value.showTooltip && te.value,
|
|
954
957
|
backgroundColor: a.value.style.chart.tooltip.backgroundColor,
|
|
955
958
|
color: a.value.style.chart.tooltip.color,
|
|
@@ -962,7 +965,7 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
962
965
|
parent: $.value,
|
|
963
966
|
content: le.value,
|
|
964
967
|
backgroundOpacity: a.value.style.chart.tooltip.backgroundOpacity,
|
|
965
|
-
isCustom:
|
|
968
|
+
isCustom: _(qe)(a.value.style.chart.tooltip.customFormat)
|
|
966
969
|
}, {
|
|
967
970
|
"tooltip-before": b(() => [
|
|
968
971
|
x(e.$slots, "tooltip-before", B(X({ ...me.value })), void 0, !0)
|
|
@@ -979,7 +982,7 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
979
982
|
style: J(`width:100%;background:${a.value.style.chart.backgroundColor}`),
|
|
980
983
|
"data-html2canvas-ignore": ""
|
|
981
984
|
}, [
|
|
982
|
-
a.value.style.chart.zoom.show && R.value > 1 ? (C(), P(
|
|
985
|
+
a.value.style.chart.zoom.show && R.value > 1 ? (C(), P(Ga, {
|
|
983
986
|
key: `slicer_${xe.value}`,
|
|
984
987
|
background: a.value.style.chart.zoom.color,
|
|
985
988
|
borderColor: a.value.style.chart.backgroundColor,
|
|
@@ -998,19 +1001,19 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
998
1001
|
"onUpdate:start": l[1] || (l[1] = (o) => r.value.start = o),
|
|
999
1002
|
end: r.value.end,
|
|
1000
1003
|
"onUpdate:end": l[2] || (l[2] = (o) => r.value.end = o),
|
|
1001
|
-
onReset:
|
|
1004
|
+
onReset: Ae
|
|
1002
1005
|
}, {
|
|
1003
1006
|
"reset-action": b(({ reset: o }) => [
|
|
1004
1007
|
x(e.$slots, "reset-action", B(X({ reset: o })), void 0, !0)
|
|
1005
1008
|
]),
|
|
1006
1009
|
_: 3
|
|
1007
|
-
}, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end"])) :
|
|
1010
|
+
}, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end"])) : A("", !0)
|
|
1008
1011
|
], 4),
|
|
1009
1012
|
K("div", {
|
|
1010
1013
|
ref_key: "chartLegend",
|
|
1011
1014
|
ref: Ce
|
|
1012
1015
|
}, [
|
|
1013
|
-
a.value.style.chart.legend.show && de.value ? (C(), P(
|
|
1016
|
+
a.value.style.chart.legend.show && de.value ? (C(), P(Ua, {
|
|
1014
1017
|
legendSet: We.value,
|
|
1015
1018
|
config: pa.value,
|
|
1016
1019
|
key: `legend_${Te.value}`,
|
|
@@ -1020,7 +1023,7 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
1020
1023
|
K("div", {
|
|
1021
1024
|
onClick: (c) => o.segregate(),
|
|
1022
1025
|
style: J(`opacity:${S.value.includes(i) ? 0.5 : 1}`)
|
|
1023
|
-
}, Ve(o.name), 13,
|
|
1026
|
+
}, Ve(o.name), 13, tt)
|
|
1024
1027
|
]),
|
|
1025
1028
|
_: 1
|
|
1026
1029
|
}, 8, ["legendSet", "config"])) : x(e.$slots, "legend", {
|
|
@@ -1028,9 +1031,9 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
1028
1031
|
legend: We.value
|
|
1029
1032
|
}, void 0, !0)
|
|
1030
1033
|
], 512),
|
|
1031
|
-
e.$slots.watermark ? (C(), q("div",
|
|
1032
|
-
x(e.$slots, "watermark", B(X({ isPrinting:
|
|
1033
|
-
])) :
|
|
1034
|
+
e.$slots.watermark ? (C(), q("div", lt, [
|
|
1035
|
+
x(e.$slots, "watermark", B(X({ isPrinting: _(Ie) || _(Oe) })), void 0, !0)
|
|
1036
|
+
])) : A("", !0),
|
|
1034
1037
|
e.$slots.source ? (C(), q("div", {
|
|
1035
1038
|
key: 3,
|
|
1036
1039
|
ref_key: "source",
|
|
@@ -1038,8 +1041,8 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
1038
1041
|
dir: "auto"
|
|
1039
1042
|
}, [
|
|
1040
1043
|
x(e.$slots, "source", {}, void 0, !0)
|
|
1041
|
-
], 512)) :
|
|
1042
|
-
r.value.end - r.value.start < 200 ? (C(), P(
|
|
1044
|
+
], 512)) : A("", !0),
|
|
1045
|
+
r.value.end - r.value.start < 200 ? (C(), P(qa, {
|
|
1043
1046
|
key: 4,
|
|
1044
1047
|
hideDetails: "",
|
|
1045
1048
|
config: {
|
|
@@ -1056,7 +1059,7 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
1056
1059
|
}
|
|
1057
1060
|
}, {
|
|
1058
1061
|
content: b(() => [
|
|
1059
|
-
(C(), P(
|
|
1062
|
+
(C(), P(Ja, {
|
|
1060
1063
|
key: `table_${ze.value}`,
|
|
1061
1064
|
colNames: se.value.colNames,
|
|
1062
1065
|
head: se.value.head,
|
|
@@ -1066,7 +1069,7 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
1066
1069
|
onClose: l[4] || (l[4] = (o) => u.value.showTable = !1)
|
|
1067
1070
|
}, {
|
|
1068
1071
|
th: b(({ th: o }) => [
|
|
1069
|
-
K("div", { innerHTML: o }, null, 8,
|
|
1072
|
+
K("div", { innerHTML: o }, null, 8, ot)
|
|
1070
1073
|
]),
|
|
1071
1074
|
td: b(({ td: o }) => [
|
|
1072
1075
|
Sa(Ve(o), 1)
|
|
@@ -1075,18 +1078,18 @@ const et = ["id"], at = ["onClick"], tt = {
|
|
|
1075
1078
|
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
1076
1079
|
]),
|
|
1077
1080
|
_: 1
|
|
1078
|
-
}, 8, ["config"])) :
|
|
1079
|
-
a.value.userOptions.buttons.annotator && h.value.length ? (C(), P(
|
|
1081
|
+
}, 8, ["config"])) : A("", !0),
|
|
1082
|
+
a.value.userOptions.buttons.annotator && h.value.length ? (C(), P(Qa, {
|
|
1080
1083
|
key: 5,
|
|
1081
1084
|
parent: U.value,
|
|
1082
1085
|
backgroundColor: a.value.style.chart.backgroundColor,
|
|
1083
1086
|
color: a.value.style.chart.color,
|
|
1084
1087
|
active: ne.value,
|
|
1085
1088
|
onClose: fe
|
|
1086
|
-
}, null, 8, ["parent", "backgroundColor", "color", "active"])) :
|
|
1087
|
-
], 14,
|
|
1089
|
+
}, null, 8, ["parent", "backgroundColor", "color", "active"])) : A("", !0)
|
|
1090
|
+
], 14, at));
|
|
1088
1091
|
}
|
|
1089
|
-
},
|
|
1092
|
+
}, xt = /* @__PURE__ */ et(rt, [["__scopeId", "data-v-433caf88"]]);
|
|
1090
1093
|
export {
|
|
1091
|
-
|
|
1094
|
+
xt as default
|
|
1092
1095
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),n=require("./index-D3H-ye-i.cjs"),d=require("./useResponsive-BJ7DTGpm.cjs"),Je=require("./Tooltip-CopGUpZs.cjs"),Ke=require("./Legend-BEBhnrMH.cjs"),Qe=require("./Title-BWAmAhTl.cjs"),et=require("./Slicer-DnddhuPD.cjs"),Pe=require("./usePrinter-Bp96LusR.cjs"),tt=require("./vue-ui-accordion-BmZSXtWn.cjs"),at=require("./DataTable-BoMFIudG.cjs"),lt=require("./vue-ui-skeleton-BWO9iit6.cjs"),Me=require("./useNestedProp-BkL_BRGP.cjs"),ot=require("./PenAndPaper-CLAyC1BP.cjs"),rt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ut=["id"],nt=["onClick"],st={key:2,class:"vue-data-ui-watermark"},it=["innerHTML"],ct={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(Q,{expose:Re,emit:Oe}){const M=Q,{vue_ui_xy_canvas:Ne}=n.useConfig(),U=a.ref(n.createUid()),B=a.ref(null),C=a.ref(null),I=a.ref(null),i=a.ref(null),p=a.ref(1),z=a.ref(1),A=a.ref(!1),f=a.ref(null),_=a.ref(""),ee=a.ref(null),L=a.ref([]),O=a.ref(1),R=a.ref(!0),w=a.ref(!0),X=a.ref(null),te=a.ref(0),ae=a.ref(0),Z=a.ref(!1),le=a.ref(null),oe=a.ref(null),re=a.ref(null),ue=a.ref(null),ne=a.ref(0),se=a.ref(0),ie=a.ref(0),G=a.computed(()=>!!M.dataset&&M.dataset.length),t=a.computed({get:()=>ce(),set:e=>e});function ce(){const e=Me.useNestedProp({userConfig:M.config,defaultConfig:Ne});return e.theme?{...Me.useNestedProp({userConfig:n.themes.vue_ui_xy_canvas[e.theme]||M.config,defaultConfig:e}),customPalette:n.themePalettes[e.theme]||n.palette}:e}a.watch(()=>M.config,e=>{t.value=ce(),xe(),ne.value+=1,se.value+=1,ie.value+=1},{deep:!0});const ve=a.ref(t.value.style.chart.aspectRatio),{isPrinting:de,isImaging:he,generatePdf:fe,generateImage:ye}=Pe.usePrinter({elementId:`xy_canvas_${U.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas"}),s=a.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){Z.value=e,ae.value+=1}const pe=a.computed(()=>n.convertCustomPalette(t.value.customPalette)),$=a.computed(()=>N.value?Math.max(...N.value.filter((e,o)=>!L.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),l=a.computed(()=>{const e=p.value-p.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:p.value,canvasHeight:z.value,left:p.value*t.value.style.chart.paddingProportions.left,top:z.value*t.value.style.chart.paddingProportions.top,right:p.value-p.value*t.value.style.chart.paddingProportions.right,bottom:z.value-z.value*t.value.style.chart.paddingProportions.bottom,width:e,height:z.value-z.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(u.value.end-u.value.start)}});function ge(e,o){return e/o}function Ie({hasAutoScale:e,series:o,min:r,max:v,scale:h,yOffset:g,individualHeight:c,stackIndex:m=null}){return o.map((k,K)=>{const S=h.min<0?Math.abs(h.min):0,T=ge(k+S,S+h.max);let P,E;e&&(P=Math.abs(h.min),E=ge(k+P,h.max+P));let F=0;return m===null?F=l.value.bottom-l.value.height*(e?E:T):F=l.value.bottom-g-c*(e?E:T),{x:l.value.left+l.value.slot*K+l.value.slot/2,y:F,value:k}})}const b=a.computed(()=>{const e=Math.min(...N.value.filter((c,m)=>!L.value.includes(c.absoluteIndex)).flatMap(c=>c.series.slice(u.value.start,u.value.end))),o=Math.max(...N.value.filter((c,m)=>!L.value.includes(c.absoluteIndex)).flatMap(c=>c.series.slice(u.value.start,u.value.end))),r=n.calculateNiceScale(e<0?e:0,o===e?e+1<0?0:e+1:o<0?0:o,t.value.style.chart.scale.ticks),v=r.min<0?Math.abs(r.min):0,h=l.value.bottom-l.value.height*(v/(r.max+v)),g=r.ticks.map(c=>({y:l.value.bottom-l.value.height*((c+v)/(r.max+v)),x:l.value.left-8,value:c}));return{absoluteMin:v,max:o,min:e,scale:r,yLabels:g,zero:h}}),Ee=a.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>${n.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.series[f.value],n.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
|
+
`)),N=a.computed(()=>M.dataset.map((e,o)=>({...e,series:n.largestTriangleThreeBucketsArray({data:n.sanitizeArray(e.series),threshold:t.value.downsample.threshold}),absoluteIndex:o,color:n.convertColorToHex(e.color||pe.value[o]||n.palette[o]||n.palette[o%n.palette.length])})));a.watch($,e=>{e&&me()});const y=a.computed(()=>n.assignStackRatios(N.value.filter((e,o)=>!L.value.includes(e.absoluteIndex))).map((e,o)=>({...e,series:e.series.slice(u.value.start,u.value.end)})).map((e,o)=>{let r=Math.min(...e.series)||0,v=Math.max(...e.series)||1;r===v&&(r=r>=0?v-1:r,v=v>=0?v:r+1);const g={ratios:e.series.filter(D=>![null,void 0].includes(D)).map(D=>(D-r)/(v-r)),valueMin:r,valueMax:v},c=e.scaleSteps||t.value.style.chart.scale.ticks;let m;e.autoScaling?m=n.calculateNiceScale(g.valueMin,g.valueMax,c):m=n.calculateNiceScale(g.valueMin<0?g.valueMin:0,g.valueMax<=0?0:g.valueMax,c);const k=s.value.stacked?l.value.height*(1-e.cumulatedStackRatio):0,K=s.value.stacked?l.value.height/t.value.style.chart.stackGap:0,S=s.value.stacked?l.value.height*e.stackRatio-K:l.value.height,T=m.min<0?Math.abs(m.min):0;let P;e.autoScaling&&s.value.stacked&&v<=0?P=l.value.bottom-k-S:P=l.value.bottom-k-S*(T/(m.max+T));const E=m.ticks.map((D,je)=>({y:l.value.bottom-k-S*(je/(m.ticks.length-1)),x:l.value.left-8,value:D})),F=Ie({hasAutoScale:s.value.stacked&&e.autoScaling,series:e.series,min:s.value.stacked?r:b.value.min,max:s.value.stacked?v:b.value.max,scale:s.value.stacked?m:b.value.scale,yOffset:k,individualHeight:S,stackIndex:s.value.stacked?o:null});return{...e,coordinatesLine:F,min:r,max:v,localScale:m,localZero:P,localMin:T,localYLabels:E,yOffset:k,individualHeight:S}})),u=a.ref({start:0,end:$.value});function me(){u.value={start:0,end:$.value},te.value+=1}const Fe=a.computed(()=>y.value.filter(e=>["line","plot",void 0].includes(e.type))),x=a.computed(()=>y.value.filter(e=>e.type==="bar"));function De(){if(!C.value)return;const e=I.value.offsetWidth,o=I.value.offsetHeight;C.value.width=e*O.value*2,C.value.height=o*O.value*2,p.value=e*O.value*2,z.value=o*O.value*2,i.value.scale(O.value,O.value),j()}function Ae(){if(i.value.clearRect(0,0,1e4,1e4),i.value.fillStyle=t.value.style.chart.backgroundColor,i.value.fillRect(0,0,l.value.canvasWidth,l.value.canvasHeight),s.value.stacked)t.value.style.chart.grid.y.verticalLines.show&&u.value.end-u.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength&&y.value.forEach(e=>{for(let o=0;o<u.value.end-u.value.start+1;o+=1)d.line(i.value,[{x:l.value.left+l.value.slot*o,y:l.value.bottom-e.yOffset-e.individualHeight},{x:l.value.left+l.value.slot*o,y:l.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&&d.rect(i.value,[{x:l.value.left,y:o.y},{x:l.value.right,y:o.y},{x:l.value.right,y:e.localYLabels[r+1].y},{x:l.value.left,y:e.localYLabels[r+1].y}],{fillColor:r%2===0?"transparent":n.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(u.value.start,u.value.end).forEach(o=>{d.line(i.value,[{x:l.value.left,y:o.y},{x:l.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=>{d.line(i.value,[{x:l.value.left,y:e.localZero},{x:l.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=>{d.line(i.value,[{x:l.value.left,y:l.value.bottom-e.yOffset},{x:l.value.left,y:l.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),d.line(i.value,[{x:l.value.right,y:l.value.bottom-e.yOffset},{x:l.value.right,y:l.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),e.localYLabels.forEach((o,r)=>{d.text(i.value,n.applyDataLabel(t.value.style.chart.dataLabels.formatter,o.value,n.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(p.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:e.color})})}),y.value.forEach(e=>{d.text(i.value,e.name,p.value/35,l.value.bottom-e.yOffset-e.individualHeight/2,{align:"center",rotation:-90,color:e.color,font:`${Math.round(p.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&&u.value.end-u.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=0;e<u.value.end-u.value.start+1;e+=1)d.line(i.value,[{x:l.value.left+l.value.slot*e,y:l.value.top},{x:l.value.left+l.value.slot*e,y:l.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?b.value.yLabels.forEach((e,o)=>{o<b.value.yLabels.length-1&&d.rect(i.value,[{x:l.value.left,y:e.y},{x:l.value.right,y:e.y},{x:l.value.right,y:b.value.yLabels[o+1].y},{x:l.value.left,y:b.value.yLabels[o+1].y}],{fillColor:o%2===0?"transparent":n.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})}):b.value.yLabels.forEach(e=>{d.line(i.value,[{x:l.value.left,y:e.y},{x:l.value.right,y:e.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})),t.value.style.chart.grid.y.showAxis&&d.line(i.value,[{x:l.value.left,y:l.value.top},{x:l.value.left,y:l.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&&d.line(i.value,[{x:l.value.left,y:l.value.bottom},{x:l.value.right,y:l.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&&d.line(i.value,[{x:l.value.left,y:b.value.zero},{x:l.value.right,y:b.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&&b.value.yLabels.forEach((e,o)=>{d.text(i.value,n.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.value,n.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(p.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&&d.text(i.value,t.value.style.chart.grid.y.axisName,p.value-p.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio*1.2,l.value.bottom-l.value.height/2,{font:`${Math.round(p.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&&d.text(i.value,t.value.style.chart.grid.x.axisName,p.value/2,z.value,{font:`${Math.round(p.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center"})}function _e(e){for(let o=0;o<e.coordinatesLine.length;o+=1){const r=(f.value===o?p.value/150:t.value.style.chart.line.plots.show?p.value/200:0)*t.value.style.chart.line.plots.radiusRatio;d.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 He(e){for(let o=0;o<e.coordinatesLine.length;o+=1)d.text(i.value,n.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[o].value,n.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(p.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 Ve(){for(let e=u.value.start;e<u.value.end;e+=1)(u.value.end-u.value.start<t.value.style.chart.grid.y.timeLabels.modulo||u.value.end-u.value.start>=t.value.style.chart.grid.y.timeLabels.modulo&&(e%Math.floor((u.value.end-u.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0||e===f.value+u.value.start))&&d.text(i.value,t.value.style.chart.grid.y.timeLabels.values[e]||e+1,l.value.left+l.value.slot*(e-u.value.start)+l.value.slot/2,l.value.bottom+p.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(p.value/40*t.value.style.chart.grid.y.timeLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:n.setOpacity(t.value.style.chart.grid.y.timeLabels.color,f.value!==null?f.value+u.value.start===e?100:20:100),rotation:t.value.style.chart.grid.y.timeLabels.rotation})}function be(){d.line(i.value,[{x:l.value.left+l.value.slot*f.value+l.value.slot/2,y:l.value.top},{x:l.value.left+l.value.slot*f.value+l.value.slot/2,y:l.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 We(){x.value.forEach((e,o)=>{for(let r=0;r<e.coordinatesLine.length;r+=1)d.rect(i.value,[{x:l.value.left+l.value.slot*r+l.value.slot/10+(s.value.stacked?0:l.value.slot/x.value.length*o-(o===0?0:l.value.slot/(5*x.value.length)*o)),y:s.value.stacked?e.localZero:b.value.zero},{x:l.value.left+l.value.slot*r+l.value.slot/10+(s.value.stacked?0:l.value.slot/x.value.length*o-(o===0?0:l.value.slot/(5*x.value.length)*o))+l.value.slot*.8/(s.value.stacked?1:x.value.length),y:s.value.stacked?e.localZero:b.value.zero},{x:l.value.left+l.value.slot*r+l.value.slot/10+(s.value.stacked?0:l.value.slot/x.value.length*o-(o===0?0:l.value.slot/(5*x.value.length)*o))+l.value.slot*.8/(s.value.stacked?1:x.value.length),y:e.coordinatesLine[r].y},{x:l.value.left+l.value.slot*r+l.value.slot/10+(s.value.stacked?0:l.value.slot/x.value.length*o-(o===0?0:l.value.slot/(5*x.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:b.value.zero},stops:[{offset:0,color:e.color},{offset:1,color:n.lightenHexColor(e.color,.5)}]}}),s.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&d.text(i.value,n.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[r].value,n.dataLabel({p:e.prefix||"",v:e.coordinatesLine[r].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[r],seriesIndex:r}),l.value.left+l.value.slot*r+l.value.slot/10+(s.value.stacked?0:l.value.slot/x.value.length*o-(o===0?0:l.value.slot/(5*x.value.length)*o))+l.value.slot*.4/(s.value.stacked?1:x.value.length),(e.coordinatesLine[r].value<0?s.value.stacked?e.localZero:b.value.zero:e.coordinatesLine[r].y)+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(p.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 qe(e){e.useArea?s.value.stacked?d.polygon(i.value,[{x:e.coordinatesLine[0].x,y:e.localZero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:e.localZero}],{fillColor:n.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):d.polygon(i.value,[{x:e.coordinatesLine[0].x,y:b.value.zero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:b.value.zero}],{fillColor:n.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):d.line(i.value,e.coordinatesLine,{color:e.color,lineWidth:3})}function Ye(){y.value.forEach((e,o)=>{d.line(i.value,[{x:l.value.left,y:l.value.bottom-e.yOffset},{x:l.value.right,y:l.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.x.horizontalLines.color,lineWidth:1})})}function j(){Ae(),R.value?(w.value&&f.value!==null&&t.value.style.chart.selector.show&&be(),We(),s.value.stacked&&t.value.style.chart.grid.x.showAxis&&Ye(),Fe.value.forEach(e=>{(e.type==="line"||!e.type)&&qe(e),w.value&&(_e(e),s.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&He(e))}),X.value=d.cloneCanvas(C.value)):(X.value&&(i.value.clearRect(0,0,1e4,1e4),i.value.drawImage(X.value,0,0)),w.value&&f.value!==null&&t.value.style.chart.selector.show&&be(),w.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&&d.circle(i.value,{x:e.coordinatesLine[f.value].x,y:e.coordinatesLine[f.value].y},p.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&&Ve(),R.value=!1}const H=d.debounce(()=>{w.value=!0,De()},$.value>200?10:1,!w.value);function Ue(e){const{left:o}=C.value.getBoundingClientRect(),r=e.clientX-o;if(r*2<l.value.left||r*2>l.value.right){A.value=!1,f.value=null;return}const v=r*2-l.value.left;if(f.value=Math.floor(v/l.value.slot),A.value=!0,!w.value)return;let h="";const g=t.value.style.chart.tooltip.customFormat;n.isFunction(g)&&n.functionReturnsString(()=>g({seriesIndex:f.value,datapoint:y.value.map(c=>({shape:c.shape||null,name:c.name,color:c.color,type:c.type||"line",value:c.series.find((m,k)=>k===f.value)})),series:y.value,config:t.value}))?_.value=g({seriesIndex:f.value,datapoint:y.value.map(c=>({shape:c.shape||null,name:c.name,color:c.color,type:c.type||"line",value:c.series.find((m,k)=>k===f.value)})),series:y.value,config:t.value}):(t.value.style.chart.grid.y.timeLabels.values.slice(u.value.start,u.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(u.value.start,u.value.end)[f.value]}</div>`),h+=Ee.value.join(""),_.value=h),w.value=!1}a.watch(()=>f.value,e=>{H()}),a.watch(()=>u.value,e=>{R.value=!0,j()},{deep:!0}),a.watch(()=>s.value.showDataLabels,e=>{R.value=!0,j()}),a.watch(()=>s.value.stacked,e=>{R.value=!0,w.value=!0,H()});function Xe(){A.value=!1,f.value=null,_.value=""}const V=a.ref(null),W=a.ref(null);a.onMounted(()=>{xe()});function xe(){if(n.objectIsEmpty(M.dataset)?n.error({componentName:"VueUiXyCanvas",type:"dataset"}):C.value&&(i.value=C.value.getContext("2d",{willReadFrequently:!0})),t.value.responsive){const e=d.throttle(()=>{const{width:o,height:r}=d.useResponsive({chart:B.value,title:t.value.style.chart.title.text?le.value:null,legend:t.value.style.chart.legend.show?oe.value:null,slicer:t.value.style.chart.zoom.show&&$.value>1?re.value:null,source:ue.value});ve.value=`${o} / ${r}`});V.value=new ResizeObserver(e),V.value.observe(B.value.parentNode)}W.value=new ResizeObserver(e=>{for(const o of e)o.contentBoxSize&&I.value&&(R.value=!0,H())}),W.value.observe(I.value)}a.onBeforeUnmount(()=>{W.value&&W.value.disconnect(),V.value&&V.value.disconnect()});function ke(e){Oe("selectLegend",y.value.find(o=>o.absoluteIndex===e)),L.value.includes(e)?L.value=L.value.filter(o=>o!==e):L.value.push(e),R.value=!0,H()}const Le=a.computed(()=>N.value.map((e,o)=>({...e,name:e.name,color:n.convertColorToHex(e.color)||pe.value[o]||n.palette[o]||n.palette[o%n.palette.length],shape:e.shape||"circle",prefix:e.prefix||"",suffix:e.suffix||"",rounding:e.rounding||0})).map(e=>({...e,opacity:L.value.includes(e.absoluteIndex)?.5:1,segregate:()=>ke(e.absoluteIndex),isSegregated:L.value.includes(e.absoluteIndex)}))),Ze=a.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":""})),q=a.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<$.value;h+=1){const g=y.value.map(c=>c.series[h]??0).reduce((c,m)=>c+m,0);o.push([t.value.style.chart.grid.y.timeLabels.values.slice(u.value.start,u.value.end)[h]??h+1].concat(y.value.map(c=>(c.series[h]??0).toFixed(t.value.table.rounding))).concat((g??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},v=[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,u.value.end-u.value.start),config:r,colNames:v}}),Ce=a.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=u.value.start;r<u.value.end;r+=1){const v=[t.value.style.chart.grid.y.timeLabels.values[r]||r+1];y.value.forEach(h=>{v.push(Number((h.series[r]||0).toFixed(t.value.table.rounding)))}),o.push(v)}return{head:e,body:o}});function we(){const e=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=["",...Ce.value.head.map(g=>g.label)],r=Ce.value.body,v=e.concat([o]).concat(r),h=n.createCsvContent(v);n.downloadCsv({csvContent:h,title:t.value.style.chart.title.text||"vue-ui-xy-canvas"})}function Ge(){return y.value}function Se(){s.value.showTable=!s.value.showTable}function ze(){s.value.showDataLabels=!s.value.showDataLabels}function $e(){s.value.stacked=!s.value.stacked}function Te(){s.value.showTooltip=!s.value.showTooltip}const Y=a.ref(!1);function J(){Y.value=!Y.value}return Re({getData:Ge,generateCsv:we,generatePdf:fe,generateImage:ye,toggleTable:Se,toggleLabels:ze,toggleStack:$e,toggleTooltip:Te,toggleAnnotator:J}),(e,o)=>(a.openBlock(),a.createElementBlock("div",{style:a.normalizeStyle(`width:100%; position:relative; ${t.value.responsive?"height: 100%":""}`),ref_key:"xy",ref:B,id:`xy_canvas_${U.value}`,class:a.normalizeClass(`vue-ui-donut ${Z.value?"vue-data-ui-wrapper-fullscreen":""}`)},[t.value.style.chart.title.text?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:le,style:a.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};`)},[(a.openBlock(),a.createBlock(Qe._sfc_main,{key:`title_${ne.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)):a.createCommentVNode("",!0),t.value.userOptions.show&&G.value?(a.openBlock(),a.createBlock(Pe.UserOptions,{ref:"details",key:`user_option_${ae.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:a.unref(de),isImaging:a.unref(he),uid:U.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:Q.dataset.length>1&&t.value.userOptions.buttons.stack,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasTable:u.value.end-u.value.start<200&&t.value.userOptions.buttons.table,isFullscreen:Z.value,isTooltip:s.value.showTooltip,isStacked:s.value.stacked,titles:{...t.value.userOptions.buttonTitles},chartElement:B.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:Y.value,onToggleFullscreen:Be,onGeneratePdf:a.unref(fe),onGenerateCsv:we,onGenerateImage:a.unref(ye),onToggleTable:Se,onToggleLabels:ze,onToggleStack:$e,onToggleTooltip:Te,onToggleAnnotator:J},a.createSlots({_:2},[e.$slots.optionTooltip?{name:"optionTooltip",fn:a.withCtx(()=>[a.renderSlot(e.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,e.$slots.optionPdf?{name:"optionPdf",fn:a.withCtx(()=>[a.renderSlot(e.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,e.$slots.optionCsv?{name:"optionCsv",fn:a.withCtx(()=>[a.renderSlot(e.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,e.$slots.optionImg?{name:"optionImg",fn:a.withCtx(()=>[a.renderSlot(e.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,e.$slots.optionTable?{name:"optionTable",fn:a.withCtx(()=>[a.renderSlot(e.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,e.$slots.optionLabels?{name:"optionLabels",fn:a.withCtx(()=>[a.renderSlot(e.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,e.$slots.optionStack?{name:"optionStack",fn:a.withCtx(()=>[a.renderSlot(e.$slots,"optionStack",{},void 0,!0)]),key:"6"}:void 0,e.$slots.optionFullscreen?{name:"optionFullscreen",fn:a.withCtx(({toggleFullscreen:r,isFullscreen:v})=>[a.renderSlot(e.$slots,"optionFullscreen",a.normalizeProps(a.guardReactiveProps({toggleFullscreen:r,isFullscreen:v})),void 0,!0)]),key:"7"}:void 0,e.$slots.optionAnnotator?{name:"optionAnnotator",fn:a.withCtx(({toggleAnnotator:r,isAnnotator:v})=>[a.renderSlot(e.$slots,"optionAnnotator",a.normalizeProps(a.guardReactiveProps({toggleAnnotator:r,isAnnotator:v})),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"])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"vue-ui-xy-canvas",style:a.normalizeStyle(`position: relative; aspect-ratio: ${ve.value}`),ref_key:"container",ref:I},[G.value?(a.openBlock(),a.createElementBlock("canvas",{key:0,ref_key:"canvas",ref:C,style:{width:"100%",height:"100%"},onMousemove:o[0]||(o[0]=r=>Ue(r)),onMouseleave:Xe},null,544)):(a.openBlock(),a.createBlock(lt.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"])),a.createVNode(Je._sfc_main,{show:s.value.showTooltip&&A.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:C.value,content:_.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,isCustom:a.unref(n.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":a.withCtx(()=>[a.renderSlot(e.$slots,"tooltip-before",a.normalizeProps(a.guardReactiveProps({...ee.value})),void 0,!0)]),"tooltip-after":a.withCtx(()=>[a.renderSlot(e.$slots,"tooltip-after",a.normalizeProps(a.guardReactiveProps({...ee.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","position","offsetY","parent","content","backgroundOpacity","isCustom"])],4),a.createElementVNode("div",{ref_key:"chartSlicer",ref:re,style:a.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&$.value>1?(a.openBlock(),a.createBlock(et.Slicer,{key:`slicer_${te.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[u.value.start]?t.value.style.chart.grid.y.timeLabels.values[u.value.start]:"",labelRight:t.value.style.chart.grid.y.timeLabels.values[u.value.end-1]?t.value.style.chart.grid.y.timeLabels.values[u.value.end-1]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:$.value,min:0,valueStart:u.value.start,valueEnd:u.value.end,start:u.value.start,"onUpdate:start":o[1]||(o[1]=r=>u.value.start=r),end:u.value.end,"onUpdate:end":o[2]||(o[2]=r=>u.value.end=r),onReset:me},{"reset-action":a.withCtx(({reset:r})=>[a.renderSlot(e.$slots,"reset-action",a.normalizeProps(a.guardReactiveProps({reset:r})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):a.createCommentVNode("",!0)],4),a.createElementVNode("div",{ref_key:"chartLegend",ref:oe},[t.value.style.chart.legend.show&&G.value?(a.openBlock(),a.createBlock(Ke.Legend,{legendSet:Le.value,config:Ze.value,key:`legend_${ie.value}`,onClickMarker:o[3]||(o[3]=({i:r})=>ke(r))},{item:a.withCtx(({legend:r,index:v})=>[a.createElementVNode("div",{onClick:h=>r.segregate(),style:a.normalizeStyle(`opacity:${L.value.includes(v)?.5:1}`)},a.toDisplayString(r.name),13,nt)]),_:1},8,["legendSet","config"])):a.renderSlot(e.$slots,"legend",{key:1,legend:Le.value},void 0,!0)],512),e.$slots.watermark?(a.openBlock(),a.createElementBlock("div",st,[a.renderSlot(e.$slots,"watermark",a.normalizeProps(a.guardReactiveProps({isPrinting:a.unref(de)||a.unref(he)})),void 0,!0)])):a.createCommentVNode("",!0),e.$slots.source?(a.openBlock(),a.createElementBlock("div",{key:3,ref_key:"source",ref:ue,dir:"auto"},[a.renderSlot(e.$slots,"source",{},void 0,!0)],512)):a.createCommentVNode("",!0),u.value.end-u.value.start<200?(a.openBlock(),a.createBlock(tt.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:a.withCtx(()=>[(a.openBlock(),a.createBlock(at.DataTable,{key:`table_${se.value}`,colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.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:a.withCtx(({th:r})=>[a.createElementVNode("div",{innerHTML:r},null,8,it)]),td:a.withCtx(({td:r})=>[a.createTextVNode(a.toDisplayString(r),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):a.createCommentVNode("",!0),t.value.userOptions.buttons.annotator&&y.value.length?(a.openBlock(),a.createBlock(ot.PenAndPaper,{key:5,parent:B.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:Y.value,onClose:J},null,8,["parent","backgroundColor","color","active"])):a.createCommentVNode("",!0)],14,ut))}},vt=rt._export_sfc(ct,[["__scopeId","data-v-433caf88"]]);exports.default=vt;
|