vue-data-ui 2.4.48 → 2.4.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-CDz_A4X6.cjs → Arrow-CTukks_V.cjs} +1 -1
- package/dist/{Arrow-CMGb5jtB.js → Arrow-Q0cOmO5p.js} +1 -1
- package/dist/{BaseIcon-CqZOJaZ7.cjs → BaseIcon-2ZD3jgGz.cjs} +1 -1
- package/dist/{BaseIcon-WyM8ZLeS.js → BaseIcon-CaYP30Aq.js} +1 -1
- package/dist/{DataTable-8Bk6Zg9H.js → DataTable-CO5C8Cmb.js} +2 -2
- package/dist/{DataTable-UQDVIoTq.cjs → DataTable-kMUhutQ4.cjs} +1 -1
- package/dist/{Legend-DyQhpUa7.cjs → Legend-DPHcmrzd.cjs} +1 -1
- package/dist/{Legend-BqySI7-3.js → Legend-FZN9UHoI.js} +1 -1
- package/dist/{PackageVersion-C26iHVPd.js → PackageVersion-DYk2hOG1.js} +1 -1
- package/dist/{PackageVersion-JL2H1ZNU.cjs → PackageVersion-rnWHRWGI.cjs} +1 -1
- package/dist/{PenAndPaper-Bmfl9PVt.cjs → PenAndPaper-BQl9-uX0.cjs} +1 -1
- package/dist/{PenAndPaper-XF8fq-Km.js → PenAndPaper-BfgS_5ux.js} +3 -3
- package/dist/{Shape-CbUYortz.cjs → Shape-BblkpCyL.cjs} +1 -1
- package/dist/{Shape-Cmue6aoD.js → Shape-BqkMzXqo.js} +1 -1
- package/dist/{Slicer-DnI684H6.js → Slicer-DlgqsI5C.js} +2 -2
- package/dist/{Slicer-DJsIXuV_.cjs → Slicer-yEeqKUDF.cjs} +1 -1
- package/dist/{Title-CbiI2XAK.cjs → Title-5Vedk01J.cjs} +1 -1
- package/dist/{Title-D5Wtk97z.js → Title-DED-PQ7X.js} +1 -1
- package/dist/{Tooltip-z6v35GbJ.js → Tooltip-CHseiJu8.js} +1 -1
- package/dist/{Tooltip-CXWymtVK.cjs → Tooltip-DjCKBAC4.cjs} +1 -1
- package/dist/index-BHQZE19X.cjs +9 -0
- package/dist/{index-BepNt4hC.js → index-igxqCP2w.js} +2 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +1 -0
- package/dist/types/vue-data-ui.d.ts +1 -0
- package/dist/{useNestedProp-DUC6XBU3.js → useNestedProp-CSVnZVwZ.js} +1 -1
- package/dist/{useNestedProp-BEjpLG7g.cjs → useNestedProp-CwpqC_aE.cjs} +1 -1
- package/dist/{usePrinter-DPvuzbZK.js → usePrinter-CnZYDQXB.js} +1 -1
- package/dist/{usePrinter-Hc-LICQf.cjs → usePrinter-DVgxBO4o.cjs} +1 -1
- package/dist/{vue-data-ui-CFmnqYD2.js → vue-data-ui-B--WWkUM.js} +60 -60
- package/dist/{vue-data-ui-TUbEwYZ5.cjs → vue-data-ui-BrRTkOqu.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CYl_O7ug.cjs → vue-ui-3d-bar-BGVLnjCh.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-L6JZrkbq.js → vue-ui-3d-bar-OzzLYbUl.js} +9 -9
- package/dist/{vue-ui-accordion-C8xohumC.cjs → vue-ui-accordion-CRVWlHxs.cjs} +1 -1
- package/dist/{vue-ui-accordion-C2pYIHIH.js → vue-ui-accordion-lF7yVkiT.js} +3 -3
- package/dist/{vue-ui-age-pyramid-CSCtiUKQ.js → vue-ui-age-pyramid-5Vj8AtW1.js} +10 -10
- package/dist/{vue-ui-age-pyramid-CRXWyh5c.cjs → vue-ui-age-pyramid-Cv0Rddsx.cjs} +1 -1
- package/dist/{vue-ui-annotator-5Mjqr97s.js → vue-ui-annotator-BmO78L3H.js} +1 -1
- package/dist/{vue-ui-annotator-DIETLcfO.cjs → vue-ui-annotator-D8Hx1BFF.cjs} +1 -1
- package/dist/{vue-ui-bullet-B5MHoDHB.cjs → vue-ui-bullet-C0Q2Vs5p.cjs} +1 -1
- package/dist/{vue-ui-bullet-C6EHD4J1.js → vue-ui-bullet-DwFD41hN.js} +8 -8
- package/dist/{vue-ui-candlestick-BrJoYH2t.js → vue-ui-candlestick-By609gwn.js} +11 -11
- package/dist/{vue-ui-candlestick-CYMynB3E.cjs → vue-ui-candlestick-C7kRHFF3.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-ZPuYe12-.cjs → vue-ui-carousel-table-1_Hy8sGL.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BtNgnJg3.js → vue-ui-carousel-table-wwMoteEN.js} +4 -4
- package/dist/{vue-ui-chestnut-C1en00jI.cjs → vue-ui-chestnut-D3LGylRp.cjs} +1 -1
- package/dist/{vue-ui-chestnut-BGyD7s_L.js → vue-ui-chestnut-hqorA5EW.js} +8 -8
- package/dist/{vue-ui-cursor-BP38xePQ.cjs → vue-ui-cursor-BCg5VZUb.cjs} +1 -1
- package/dist/{vue-ui-cursor-DR2RWF24.js → vue-ui-cursor-GSkn7N7Z.js} +2 -2
- package/dist/{vue-ui-dashboard-BYygSPuJ.cjs → vue-ui-dashboard-Bkm9bcAc.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BpOAi1fs.js → vue-ui-dashboard-DIoYWyXB.js} +2 -2
- package/dist/{vue-ui-digits-C7sdWmoo.cjs → vue-ui-digits-CpBBTAI9.cjs} +1 -1
- package/dist/{vue-ui-digits-DNrXa7E_.js → vue-ui-digits-niqTltAv.js} +2 -2
- package/dist/{vue-ui-donut-BbBw5pWR.cjs → vue-ui-donut-CQEOtlxM.cjs} +1 -1
- package/dist/{vue-ui-donut-95iv1pkT.js → vue-ui-donut-DfufBrkk.js} +11 -11
- package/dist/{vue-ui-donut-evolution-DpECkYLY.cjs → vue-ui-donut-evolution-Dg_XJyX8.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-BneXLHZF.js → vue-ui-donut-evolution-XQp6R0e_.js} +11 -11
- package/dist/{vue-ui-dumbbell-B_T3Hlzb.js → vue-ui-dumbbell-DSS8sHHU.js} +10 -10
- package/dist/{vue-ui-dumbbell-lnqC1mak.cjs → vue-ui-dumbbell-RAkNYRoJ.cjs} +1 -1
- package/dist/{vue-ui-flow-PsQyq54b.js → vue-ui-flow-BBNuPVgI.js} +9 -9
- package/dist/{vue-ui-flow-DgsufNuK.cjs → vue-ui-flow-BUmSGSmR.cjs} +1 -1
- package/dist/{vue-ui-funnel-Cz5qLXEC.cjs → vue-ui-funnel-B9HR0owO.cjs} +1 -1
- package/dist/{vue-ui-funnel-CxZYQkNb.js → vue-ui-funnel-BDGggRXE.js} +8 -8
- package/dist/{vue-ui-galaxy-4EZM6VGD.js → vue-ui-galaxy-6Odi2CwM.js} +11 -11
- package/dist/{vue-ui-galaxy-C97nWRvH.cjs → vue-ui-galaxy-DmsMWB1a.cjs} +1 -1
- package/dist/{vue-ui-gauge-CFy3oMIA.js → vue-ui-gauge-DeYvNVnR.js} +7 -7
- package/dist/{vue-ui-gauge-BC0zGvqM.cjs → vue-ui-gauge-Dvv0v56Z.cjs} +1 -1
- package/dist/{vue-ui-gizmo-BQlJhilX.js → vue-ui-gizmo-BcAr2dTN.js} +3 -3
- package/dist/{vue-ui-gizmo-BUfBljdr.cjs → vue-ui-gizmo-DXQt_8D0.cjs} +1 -1
- package/dist/{vue-ui-heatmap-Dyz8arCQ.js → vue-ui-heatmap-Btm1mK6D.js} +10 -10
- package/dist/{vue-ui-heatmap-zi279cjp.cjs → vue-ui-heatmap-DZ02dS5q.cjs} +1 -1
- package/dist/{vue-ui-history-plot-BXZTRkzT.cjs → vue-ui-history-plot-DPQWcN0P.cjs} +1 -1
- package/dist/{vue-ui-history-plot-1KwhLYwx.js → vue-ui-history-plot-OY6N31Ka.js} +11 -11
- package/dist/{vue-ui-kpi-BsjkNZZH.cjs → vue-ui-kpi-CQIbWQMk.cjs} +1 -1
- package/dist/{vue-ui-kpi-DjLKxPTS.js → vue-ui-kpi-D5oNUDVm.js} +3 -3
- package/dist/{vue-ui-mini-loader-Be51Zm_Q.js → vue-ui-mini-loader-BjqV22Co.js} +2 -2
- package/dist/{vue-ui-mini-loader-UKOzmxaD.cjs → vue-ui-mini-loader-ByDKGMAp.cjs} +1 -1
- package/dist/{vue-ui-molecule-wgNYpLlg.cjs → vue-ui-molecule-C8O_ViVy.cjs} +1 -1
- package/dist/{vue-ui-molecule-DUQo9_oj.js → vue-ui-molecule-FsLf3YTj.js} +11 -11
- package/dist/{vue-ui-mood-radar-D260gFQ-.js → vue-ui-mood-radar-31BX-GNG.js} +11 -11
- package/dist/{vue-ui-mood-radar-D-sMgA1m.cjs → vue-ui-mood-radar-4u98wGWl.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-Ccz2llkz.js → vue-ui-nested-donuts-BMJW2oHk.js} +11 -11
- package/dist/{vue-ui-nested-donuts-DCATiNcn.cjs → vue-ui-nested-donuts-BPc_OBoe.cjs} +1 -1
- package/dist/{vue-ui-onion-4nwZ2Xcq.js → vue-ui-onion-BUpGgnWA.js} +11 -11
- package/dist/{vue-ui-onion-jbgqZma_.cjs → vue-ui-onion-IhkIHn1A.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-b9zBOm3l.js → vue-ui-parallel-coordinate-plot-9I00rQEM.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-D8tDqhAC.cjs → vue-ui-parallel-coordinate-plot-DzjggyLA.cjs} +1 -1
- package/dist/{vue-ui-quadrant-DyhFsYAn.js → vue-ui-quadrant-CEmoMAL7.js} +12 -12
- package/dist/{vue-ui-quadrant-BPbKAs_R.cjs → vue-ui-quadrant-EZqQ-7Ev.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BjjeoplC.cjs → vue-ui-quick-chart-BKUUR-A1.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-kBVlNtAe.js → vue-ui-quick-chart-T_oeRTqY.js} +9 -9
- package/dist/{vue-ui-radar-WzkdQND3.js → vue-ui-radar-DG_Zir8w.js} +12 -12
- package/dist/{vue-ui-radar-Cax_LlVW.cjs → vue-ui-radar-QBwo6ybW.cjs} +1 -1
- package/dist/{vue-ui-rating-W2x5oPbH.cjs → vue-ui-rating-Juprijdi.cjs} +1 -1
- package/dist/{vue-ui-rating-BLj-bxOZ.js → vue-ui-rating-gswAA28b.js} +2 -2
- package/dist/{vue-ui-relation-circle-BC09Wo74.cjs → vue-ui-relation-circle-BWX8zrfH.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-Cy7KZjJK.js → vue-ui-relation-circle-DtnXrnOP.js} +7 -7
- package/dist/{vue-ui-rings-B2r_HrM3.js → vue-ui-rings-D3g-ORch.js} +11 -11
- package/dist/{vue-ui-rings-BEBxWNzs.cjs → vue-ui-rings-Damuv7g9.cjs} +1 -1
- package/dist/{vue-ui-scatter-BzsoN90E.js → vue-ui-scatter-DBO-XViT.js} +12 -12
- package/dist/{vue-ui-scatter-EbhOyS1b.cjs → vue-ui-scatter-RUeAe7Sx.cjs} +1 -1
- package/dist/{vue-ui-screenshot-BNvphTTn.cjs → vue-ui-screenshot-3MDyr6v3.cjs} +1 -1
- package/dist/{vue-ui-screenshot-D-CteYvP.js → vue-ui-screenshot-K0a-DVD6.js} +1 -1
- package/dist/{vue-ui-skeleton-Dm5B1MER.js → vue-ui-skeleton-CWjNNx-k.js} +3 -3
- package/dist/{vue-ui-skeleton-G8jk4hcj.cjs → vue-ui-skeleton-DUNkS05l.cjs} +1 -1
- package/dist/{vue-ui-smiley-DQYXvPr4.cjs → vue-ui-smiley-Cbqg-N-L.cjs} +1 -1
- package/dist/{vue-ui-smiley-H4VJmgZj.js → vue-ui-smiley-MwX1c6qK.js} +2 -2
- package/dist/{vue-ui-spark-trend-DA096qRZ.cjs → vue-ui-spark-trend-CN5JUPhn.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-t_PBPjL2.js → vue-ui-spark-trend-D9eWTtbE.js} +5 -5
- package/dist/{vue-ui-sparkbar-xh4kHNcW.js → vue-ui-sparkbar-CPF7YNDd.js} +4 -4
- package/dist/{vue-ui-sparkbar-Bx-gf5Hz.cjs → vue-ui-sparkbar-IphZ8jXh.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-BfVnT-Cl.js → vue-ui-sparkgauge-B29V7ZTv.js} +4 -4
- package/dist/{vue-ui-sparkgauge--atMedaJ.cjs → vue-ui-sparkgauge-BRMGqR9Z.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-BHE8M9AE.js → vue-ui-sparkhistogram-BJTgOWF5.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-zunUFhA0.cjs → vue-ui-sparkhistogram-rvYaVHmw.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CvxWwt_w.cjs → vue-ui-sparkline-BI9jqI0h.cjs} +1 -1
- package/dist/{vue-ui-sparkline-B6SKeGhK.js → vue-ui-sparkline-DX79otAB.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-Bhd7EKGG.cjs → vue-ui-sparkstackbar-DuollcwK.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-B_KMgwOl.js → vue-ui-sparkstackbar-vP28A6AT.js} +5 -5
- package/dist/{vue-ui-stackbar-suSeRgaG.cjs → vue-ui-stackbar-BumFmZZF.cjs} +1 -1
- package/dist/{vue-ui-stackbar-C_P0JG4w.js → vue-ui-stackbar-DnJEgIaA.js} +12 -12
- package/dist/{vue-ui-strip-plot-BUA3moHw.js → vue-ui-strip-plot-DqcHBwd_.js} +11 -11
- package/dist/{vue-ui-strip-plot-CWMQUeOe.cjs → vue-ui-strip-plot-DupREfRd.cjs} +1 -1
- package/dist/{vue-ui-table-BYmYQISh.cjs → vue-ui-table-BMJ0I5nr.cjs} +1 -1
- package/dist/{vue-ui-table-BcFkS1Cj.js → vue-ui-table-D8cgqIJl.js} +1 -1
- package/dist/{vue-ui-table-heatmap-JK93Wb5V.cjs → vue-ui-table-heatmap-D43pTFli.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-Bvt_J2PP.js → vue-ui-table-heatmap-D4qeClXn.js} +4 -4
- package/dist/vue-ui-table-sparkline-B7OPOium.cjs +1 -0
- package/dist/{vue-ui-table-sparkline-CFqGNvWi.js → vue-ui-table-sparkline-B_Po0RuC.js} +204 -194
- package/dist/{vue-ui-thermometer-Dm0ttenA.js → vue-ui-thermometer-C6nfW6uY.js} +7 -7
- package/dist/{vue-ui-thermometer-Dh844EJO.cjs → vue-ui-thermometer-CaV3JF3h.cjs} +1 -1
- package/dist/{vue-ui-timer-CaFTEmwe.js → vue-ui-timer-CfwmMRdZ.js} +5 -5
- package/dist/{vue-ui-timer-LypwXXDJ.cjs → vue-ui-timer-ldINTqND.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CFgv3kS8.cjs → vue-ui-tiremarks-BlyxL_IU.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-Bgm_MUY2.js → vue-ui-tiremarks-iNKMnu3P.js} +7 -7
- package/dist/{vue-ui-treemap-CERIO7kA.js → vue-ui-treemap-CwMnkcOi.js} +11 -11
- package/dist/{vue-ui-treemap--2oLnl5Z.cjs → vue-ui-treemap-YdRDlSHA.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BErNHsoK.js → vue-ui-vertical-bar-BZR4YOLh.js} +11 -11
- package/dist/{vue-ui-vertical-bar-B6P0pW6h.cjs → vue-ui-vertical-bar-Bji3-X8i.cjs} +1 -1
- package/dist/{vue-ui-waffle-DwXtzgfk.js → vue-ui-waffle-D2BccJmB.js} +11 -11
- package/dist/{vue-ui-waffle-BlsD3mo7.cjs → vue-ui-waffle-rO_LJaHR.cjs} +1 -1
- package/dist/{vue-ui-wheel-Bnlv4BkN.cjs → vue-ui-wheel-BTrpdV-C.cjs} +1 -1
- package/dist/{vue-ui-wheel-C57mnBKi.js → vue-ui-wheel-GqWFopE1.js} +7 -7
- package/dist/{vue-ui-word-cloud-MQ4ipLvb.cjs → vue-ui-word-cloud-DD-pKUen.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-C9dIGLRl.js → vue-ui-word-cloud-DiG8DHOr.js} +10 -10
- package/dist/{vue-ui-xy-BLxO3c8J.cjs → vue-ui-xy-C32KNdyx.cjs} +1 -1
- package/dist/{vue-ui-xy-t9BzKivu.js → vue-ui-xy-DicLnkBA.js} +14 -14
- package/dist/{vue-ui-xy-canvas-xlIskwwx.cjs → vue-ui-xy-canvas-9e630nJX.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-RNuxMqDq.js → vue-ui-xy-canvas-D6CYL9A8.js} +11 -11
- package/package.json +1 -1
- package/dist/index-DOkp6I9s.cjs +0 -9
- package/dist/vue-ui-table-sparkline-B7_CaLRt.cjs +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { computed as g, ref as h, watch as Oe, onMounted as Ke, onBeforeUnmount as et, openBlock as o, createElementBlock as n, normalizeClass as T, normalizeStyle as q, createBlock as N, createCommentVNode as c, unref as y, createSlots as tt, withCtx as x, renderSlot as L, normalizeProps as G, guardReactiveProps as Q, createVNode as ie, createElementVNode as v, Fragment as C, renderList as Y, toDisplayString as $, createTextVNode as lt, nextTick as at } from "vue";
|
|
2
|
-
import { u as ut, c as Be, t as ot, a as st, p as ve, o as rt, e as H, b as nt, T as it, d as vt, i as P, f as O, X as dt, s as ae, w as ct, U as ht, G as yt, x as bt, y as ft, q as pt, r as gt } from "./index-
|
|
2
|
+
import { u as ut, c as Be, t as ot, a as st, p as ve, o as rt, e as H, b as nt, T as it, d as vt, i as P, f as O, X as dt, s as ae, w as ct, U as ht, G as yt, x as bt, y as ft, q as pt, r as gt } from "./index-igxqCP2w.js";
|
|
3
3
|
import { t as mt, u as xt } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as $t } from "./Title-
|
|
5
|
-
import { u as kt, U as Lt } from "./usePrinter-
|
|
6
|
-
import { _ as wt } from "./Tooltip-
|
|
7
|
-
import { _ as Ve } from "./Shape-
|
|
8
|
-
import { L as _t } from "./Legend-
|
|
9
|
-
import { D as qt } from "./DataTable-
|
|
10
|
-
import Ct from "./vue-ui-skeleton-
|
|
11
|
-
import St from "./vue-ui-accordion-
|
|
12
|
-
import { u as Fe } from "./useNestedProp-
|
|
13
|
-
import { _ as zt } from "./PackageVersion-
|
|
14
|
-
import { P as Tt } from "./PenAndPaper-
|
|
4
|
+
import { _ as $t } from "./Title-DED-PQ7X.js";
|
|
5
|
+
import { u as kt, U as Lt } from "./usePrinter-CnZYDQXB.js";
|
|
6
|
+
import { _ as wt } from "./Tooltip-CHseiJu8.js";
|
|
7
|
+
import { _ as Ve } from "./Shape-BqkMzXqo.js";
|
|
8
|
+
import { L as _t } from "./Legend-FZN9UHoI.js";
|
|
9
|
+
import { D as qt } from "./DataTable-CO5C8Cmb.js";
|
|
10
|
+
import Ct from "./vue-ui-skeleton-CWjNNx-k.js";
|
|
11
|
+
import St from "./vue-ui-accordion-lF7yVkiT.js";
|
|
12
|
+
import { u as Fe } from "./useNestedProp-CSVnZVwZ.js";
|
|
13
|
+
import { _ as zt } from "./PackageVersion-DYk2hOG1.js";
|
|
14
|
+
import { P as Tt } from "./PenAndPaper-BfgS_5ux.js";
|
|
15
15
|
import { _ as Wt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
const Xt = ["id"], Yt = ["xmlns", "viewBox", "id"], At = ["id"], Mt = ["stop-color"], Nt = ["stop-color"], Pt = { key: 0 }, Ot = ["fill", "x", "y", "height", "width", "stroke-width", "stroke", "rx"], Bt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Vt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ft = { key: 1 }, Rt = ["points", "fill"], Ht = ["points", "fill"], It = ["points", "fill"], Dt = ["points", "fill"], Ut = { key: 2 }, Et = ["y", "fill", "font-size"], Gt = ["x", "y", "fill", "font-size"], Qt = ["x", "y", "fill", "font-size"], Jt = ["y", "fill", "font-size"], jt = { key: 3 }, Zt = ["x", "y", "font-size", "fill"], Kt = ["x", "y", "font-size", "fill"], el = ["x", "y", "font-size", "fill"], tl = ["id", "font-size", "transform", "fill"], ll = ["id", "font-size", "transform", "fill"], al = ["id", "font-size", "transform", "fill"], ul = { key: 4 }, ol = ["fill", "points"], sl = ["x", "y", "width", "height"], rl = ["x", "y", "width", "height"], nl = ["x", "y", "width", "height"], il = ["x", "y", "width", "height"], vl = {
|
|
17
17
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DOkp6I9s.cjs"),fe=require("./useResponsive-BJ7DTGpm.cjs"),Ve=require("./Title-CbiI2XAK.cjs"),me=require("./usePrinter-Hc-LICQf.cjs"),Ee=require("./Tooltip-CXWymtVK.cjs"),ge=require("./Shape-CbUYortz.cjs"),Te=require("./Legend-DyQhpUa7.cjs"),We=require("./DataTable-UQDVIoTq.cjs"),Xe=require("./vue-ui-skeleton-G8jk4hcj.cjs"),Ye=require("./vue-ui-accordion-C8xohumC.cjs"),ke=require("./useNestedProp-BEjpLG7g.cjs"),Ae=require("./PackageVersion-JL2H1ZNU.cjs"),Pe=require("./PenAndPaper-Bmfl9PVt.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Fe=["id"],De=["xmlns","viewBox","id"],Oe=["id"],Re=["stop-color"],He=["stop-color"],Ie={key:0},Ue=["fill","x","y","height","width","stroke-width","stroke","rx"],Ge=["x1","y1","x2","y2","stroke","stroke-width"],Qe=["x1","y1","x2","y2","stroke","stroke-width"],Je={key:1},je=["points","fill"],Ze=["points","fill"],Ke=["points","fill"],et=["points","fill"],tt={key:2},lt=["y","fill","font-size"],at=["x","y","fill","font-size"],ot=["x","y","fill","font-size"],ut=["y","fill","font-size"],rt={key:3},nt=["x","y","font-size","fill"],st=["x","y","font-size","fill"],it=["x","y","font-size","fill"],ct=["id","font-size","transform","fill"],vt=["id","font-size","transform","fill"],dt=["id","font-size","transform","fill"],ht={key:4},yt=["fill","points"],bt=["x","y","width","height"],pt=["x","y","width","height"],ft=["x","y","width","height"],mt=["x","y","width","height"],gt={key:0,style:{"pointer-events":"none"}},kt=["x","y","font-size","fill"],xt={key:0},$t=["x","y","onMouseover","onClick"],Lt={key:7,class:"vue-ui-dna"},Ct=["points","fill"],wt=["points","fill"],Bt=["points","fill"],St=["points","fill"],qt={key:8},_t=["x","y","font-size","fill","font-weight"],zt={key:9},Nt=["x","y","fill"],Vt=["x","y","fill"],Et=["x","y","fill"],Tt=["x","y","fill"],Wt=["stroke","d"],Xt=["stroke","d"],Yt={key:5,class:"vue-data-ui-watermark"},At=["onClick"],Pt={key:0,height:"14",width:"14",viewBox:"0 0 20 20"},Mt=["innerHTML"],Ft={__name:"vue-ui-quadrant",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectPlot","selectSide","selectLegend"],setup(xe,{expose:$e,emit:P}){const k=xe,{vue_ui_quadrant:Le}=s.useConfig(),V=e.computed(()=>!!k.dataset&&k.dataset.length),g=e.ref(s.createUid()),Ce=e.ref(null),E=e.ref(!1),M=e.ref(""),R=e.ref(0),h=e.ref(!1),w=e.ref(null),H=e.ref(null),I=e.ref(null),U=e.ref(null),G=e.ref(null),Q=e.ref(0),J=e.ref(0),j=e.ref(0),l=e.computed({get:()=>Z(),set:a=>a});function Z(){const a=ke.useNestedProp({userConfig:k.config,defaultConfig:Le});return a.theme?{...ke.useNestedProp({userConfig:s.themes.vue_ui_quadrant[a.theme]||k.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}e.watch(()=>k.config,a=>{l.value=Z(),K(),Q.value+=1,J.value+=1,j.value+=1},{deep:!0});const T=e.ref(null);function K(){if(s.objectIsEmpty(k.dataset)?s.error({componentName:"VueUiQuadrant",type:"dataset"}):k.dataset.forEach((a,u)=>{[null,void 0].includes(a.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",index:u}),[null,void 0].includes(a.series)?s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"series",index:u}):a.series.forEach((o,r)=>{[null,void 0].includes(o.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",key:"series",index:r})})}),l.value.responsive){const a=fe.throttle(()=>{const{width:u,height:o}=fe.useResponsive({chart:w.value,title:l.value.style.chart.title.text?H.value:null,legend:l.value.style.chart.legend.show?I.value:null,source:U.value,noTitle:G.value});y.value=48,t.value.height=o,t.value.usableHeight=o-y.value*2,t.value.width=u,t.value.usableWidth=u-y.value*2,t.value.top=y.value,t.value.left=y.value,t.value.right=u-y.value,t.value.bottom=o-y.value,t.value.centerX=u/2,t.value.centerY=o-o/2,t.value.padding=y.value});T.value=new ResizeObserver(a),T.value.observe(w.value.parentNode)}}e.onMounted(()=>{K()}),e.onBeforeUnmount(()=>{T.value&&T.value.disconnect()});const{isPrinting:ee,isImaging:te,generatePdf:le,generateImage:ae}=me.usePrinter({elementId:`vue-ui-quadrant_${g.value}`,fileName:l.value.style.chart.title.text||"vue-ui-quadrant"}),we=e.computed(()=>l.value.userOptions.show&&!l.value.style.chart.title.text),oe=e.computed(()=>s.convertCustomPalette(l.value.customPalette)),p=e.ref({plotLabels:{show:l.value.style.chart.layout.labels.plotLabels.show},showTable:l.value.table.show,showTooltip:l.value.style.chart.tooltip.show}),y=e.ref(48),t=e.ref({height:l.value.style.chart.height,usableHeight:l.value.style.chart.height-y.value*2,width:l.value.style.chart.width,usableWidth:l.value.style.chart.width-y.value*2,top:y.value,left:y.value,right:l.value.style.chart.width-y.value,bottom:l.value.style.chart.height-y.value,centerX:l.value.style.chart.width/2,centerY:l.value.style.chart.height-l.value.style.chart.height/2,padding:y.value}),c=e.ref({...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0});e.watch(()=>t.value,a=>{a&&(c.value={...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0})},{deep:!0});const i=e.ref(null),C=e.computed(()=>{switch(i.value){case"TL":return{x:c.value.startX+c.value.width/2,y:c.value.height,text:l.value.style.chart.layout.labels.quadrantLabels.tl.text||"Top Left",fontSize:l.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color,bold:l.value.style.chart.layout.labels.quadrantLabels.tl.bold};case"TR":return{x:c.value.startX+c.value.width/2,y:c.value.height,text:l.value.style.chart.layout.labels.quadrantLabels.tr.text||"Top Right",fontSize:l.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color,bold:l.value.style.chart.layout.labels.quadrantLabels.tr.bold};case"BR":return{x:c.value.startX+c.value.width/2,y:c.value.height*1.678,text:l.value.style.chart.layout.labels.quadrantLabels.br.text||"Bottom Right",fontSize:l.value.style.chart.layout.labels.quadrantLabels.br.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color,bold:l.value.style.chart.layout.labels.quadrantLabels.br.bold};case"BL":return{x:c.value.startX+c.value.width/2,y:c.value.height*1.678,text:l.value.style.chart.layout.labels.quadrantLabels.bl.text||"Bottom Left",fontSize:l.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color,bold:l.value.style.chart.layout.labels.quadrantLabels.bl.bold};default:return{x:0,y:0,text:"",fontSize:0,fill:"none",bold:!1}}}),Be=e.ref(null),W=e.ref(!1);function q({targetX:a,targetY:u,targetW:o,targetH:r,side:n}){i.value&&N(n);const v={x:a-c.value.startX,y:u-c.value.startY,w:o-c.value.width,h:r-c.value.height},d=l.value.zoomAnimationFrames;let x=0;function pe(){W.value=!0,c.value.startX+=v.x/d,c.value.startY+=v.y/d,c.value.width+=v.w/d,c.value.height+=v.h/d,x+=1,x<d?Be.value=requestAnimationFrame(pe):W.value=!1}pe()}function $(a){if(!W.value)if(h.value&&i.value===a)q({targetX:0,targetY:0,targetW:t.value.width,targetH:t.value.height}),i.value=null,h.value=!1;else{switch(i.value=a,a){case"TL":q({targetX:0,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tl"});break;case"TR":q({targetX:t.value.width/2-t.value.left,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tr"});break;case"BR":q({targetX:t.value.width/2-t.value.left,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"br"});break;case"BL":q({targetX:0,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"bl"});break;default:c.value.startX=0,c.value.startY=0,c.value.width=t.value.width,c.value.height=t.value.height;break}h.value=!0}}const Se=e.computed(()=>{const a=l.value.style.chart.layout.grid.graduations.steps,u=t.value.usableWidth/(a*2),o=t.value.top,r=[];for(let n=0;n<a;n+=1)r.push({x:t.value.padding+u*n,y:o+t.value.usableHeight*(n/a/2),height:t.value.usableHeight*(1-n/a),width:t.value.usableWidth*(1-n/a),opacity:Math.round((n+1)/a*20)});return r}),f=e.computed(()=>{let a=l.value.style.chart.layout.grid.xAxis.max,u=l.value.style.chart.layout.grid.xAxis.min,o=l.value.style.chart.layout.grid.yAxis.max,r=l.value.style.chart.layout.grid.yAxis.min;return l.value.style.chart.layout.grid.xAxis.auto&&(a=Math.max(...B.value.flatMap(n=>n.series.map(v=>v.x))),u=Math.min(...B.value.flatMap(n=>n.series.map(v=>v.x)))),l.value.style.chart.layout.grid.yAxis.auto&&(o=Math.max(...B.value.flatMap(n=>n.series.map(v=>v.y))),r=Math.min(...B.value.flatMap(n=>n.series.map(v=>v.y)))),{x:{max:a,min:u},y:{max:o,min:r}}}),L=e.ref([]),B=e.computed(()=>k.dataset.map((a,u)=>({...a,series:s.largestTriangleThreeBuckets({data:a.series,threshold:l.value.downsample.threshold}),id:`cat_${u}_${g.value}`,color:s.convertColorToHex(a.color)||oe.value[u]||s.palette[u]}))),qe=e.computed(()=>B.value.filter(a=>!L.value.includes(a.id))),_e=e.computed(()=>B.value.map((a,u)=>({...a,shape:a.shape||"circle",series:a.series.map(o=>({...o,x:ue(o.x),y:re(o.y),xValue:o.x,yValue:o.y,quadrantSide:se({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color}))}))),m=e.computed(()=>(k.dataset.forEach((a,u)=>{a.series.forEach((o,r)=>{[null,void 0].includes(o.x)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"x",key:"series",index:r}),[null,void 0].includes(o.y)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"y",key:"series",index:r})})}),qe.value.map((a,u)=>({...a,shape:a.shape||"circle",color:a.color||oe.value[u]||s.palette[u],series:a.series.map(o=>({...o,x:ue(o.x),y:re(o.y),xValue:o.x,yValue:o.y,quadrantSide:se({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color,uid:s.createUid()}))}))));function ue(a){if(a>=0){const u=a/f.value.x.max;return t.value.centerX+t.value.usableWidth/2*u}else{const u=Math.abs(a)/Math.abs(f.value.x.min);return t.value.centerX-t.value.usableWidth/2*u}}function re(a){if(a>=0){const u=a/f.value.y.max;return t.value.centerY+(1-t.value.usableHeight/2*u)}else{const u=Math.abs(a)/Math.abs(f.value.y.min);return t.value.centerY-(1-t.value.usableHeight/2*u)}}const X=e.computed(()=>{const a=m.value.flatMap(d=>d.series.map(x=>({x:x.xValue,y:x.yValue,name:x.name,category:x.categoryName,quadrantSide:x.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[x.quadrantSide].text,color:d.color,shape:d.shape}))),u=l.value.style.chart.layout.grid.xAxis.name||"x",o=l.value.style.chart.layout.grid.yAxis.name||"y",r=[l.value.translations.category,l.value.translations.item,u,o,l.value.translations.side],n=a.map(d=>[d.category,d.name,d.x,d.y,d.sideName||d.quadrantSide]),v=a.map(d=>({shape:d.shape,color:d.color}));return{head:r,body:n,itsShapes:v,tableData:a}}),Y=e.computed(()=>{const a=X.value.head,u=X.value.tableData.map(r=>[{shape:r.shape,color:r.color,name:r.category},r.name,s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,r.x,s.dataLabel({v:r.x,r:l.value.style.chart.layout.labels.plotLabels.rounding})),s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,r.y,s.dataLabel({v:r.y,r:l.value.style.chart.layout.labels.plotLabels.rounding})),r.sideName||r.quadrantSide]),o={th:{backgroundColor:l.value.table.th.backgroundColor,color:l.value.table.th.color,outline:l.value.table.th.outline},td:{backgroundColor:l.value.table.td.backgroundColor,color:l.value.table.td.color,outline:l.value.table.td.outline},breakpoint:l.value.table.responsiveBreakpoint};return{head:a,body:u,config:o,colNames:a}});function F(a){L.value.includes(a)?L.value=L.value.filter(o=>o!==a):L.value.push(a);const u=ve();P("selectLegend",u)}const ne=e.computed(()=>_e.value.map(a=>({name:a.name,shape:a.shape,color:a.color,id:a.id,opacity:L.value.includes(a.id)?.5:1,segregate:()=>F(a.id),isSegregated:L.value.includes(a.id)}))),ze=e.computed(()=>({cy:"quadrant-div-legend",backgroundColor:l.value.style.chart.legend.backgroundColor,color:l.value.style.chart.legend.color,fontSize:l.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:l.value.style.chart.legend.bold?"bold":""}));function se(a){switch(!0){case(a.x>=0&&a.y>=0):return"tr";case(a.x>=0&&a.y<0):return"br";case(a.x<0&&a.y<0):return"bl";case(a.x<0&&a.y>=0):return"tl";default:return""}}const _=e.ref(null),z=e.ref(null),D=e.ref(null);function ie(a,u,o){_.value=u.uid,z.value={color:a.color,shape:a.shape},D.value={datapoint:u,seriesIndex:o,series:m.value,config:l.value},E.value=!0;const r=l.value.style.chart.tooltip.customFormat;if(s.isFunction(r)&&s.functionReturnsString(()=>r({seriesIndex:o,datapoint:u,series:m.value,config:l.value})))M.value=r({seriesIndex:o,datapoint:u,series:m.value,config:l.value});else{let n="";u.quadrantSide&&(n+=`<div style="color:${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].color};font-weight:${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].bold?"bold":"400"}">${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}</div>`),n+=`<div>${a.name}</div>`,n+=`<div style="padding-bottom:6px;border-bottom:1px solid ${l.value.style.chart.tooltip.borderColor};margin-bottom:3px">${u.name}</div>`,n+=`<div>${l.value.style.chart.layout.grid.xAxis.name?l.value.style.chart.layout.grid.xAxis.name:"x"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,u.xValue,s.dataLabel({v:u.xValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,n+=`<div>${l.value.style.chart.layout.grid.yAxis.name?l.value.style.chart.layout.grid.yAxis.name:"y"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,u.yValue,s.dataLabel({v:u.yValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,M.value=`<div style="text-align:left;font-size:${l.value.style.chart.tooltip.fontSize}px">${n}</div>`}}function ce(a,u){const o={category:a.name,shape:a.shape,itemName:u.name,x:u.xValue,y:u.yValue,quadrantSide:u.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text};P("selectPlot",o)}function N(a){if(!a)return;const u=m.value.flatMap(r=>r.series.filter(n=>n.quadrantSide===a).map(n=>({category:n.categoryName,itemName:n.name,x:n.xValue,y:n.yValue}))),o={quadrantSide:a,sideName:l.value.style.chart.layout.labels.quadrantLabels[a].text,items:[...u]};P("selectSide",o)}const b=e.computed(()=>({TL:{tl:{x:t.value.left+t.value.usableWidth/4-20,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.left+t.value.usableWidth/4,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.left+t.value.usableWidth/4,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.left+t.value.usableWidth/4-20,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.left+t.value.usableWidth/4-20},20 ${t.value.left+t.value.usableWidth/4+20},20`,vertical:`M ${t.value.left+t.value.usableWidth/4},0 ${t.value.left+t.value.usableWidth/4},40`}},TR:{tl:{x:t.value.centerX+t.value.usableWidth/4-20,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.centerX+t.value.usableWidth/4,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.centerX+t.value.usableWidth/4,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.centerX+t.value.usableWidth/4-20,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.centerX+t.value.usableWidth/4-20},20 ${t.value.centerX+t.value.usableWidth/4+20},20`,vertical:`M ${t.value.centerX+t.value.usableWidth/4},0 ${t.value.centerX+t.value.usableWidth/4},40`}},BR:{tl:{x:t.value.centerX+t.value.usableWidth/4-20,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.centerX+t.value.usableWidth/4,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.centerX+t.value.usableWidth/4,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.centerX+t.value.usableWidth/4-20,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.centerX+t.value.usableWidth/4-20},${t.value.centerY-28} ${t.value.centerX+t.value.usableWidth/4+20},${t.value.centerY-28}`,vertical:`M ${t.value.centerX+t.value.usableWidth/4},${t.value.centerY-48} ${t.value.centerX+t.value.usableWidth/4},${t.value.centerY-8}`}},BL:{tl:{x:t.value.left+t.value.usableWidth/4-20,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.left+t.value.usableWidth/4,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.left+t.value.usableWidth/4,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.left+t.value.usableWidth/4-20,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.left+t.value.usableWidth/4-20},${t.value.centerY-28} ${t.value.left+t.value.usableWidth/4+20},${t.value.centerY-28}`,vertical:`M ${t.value.left+t.value.usableWidth/4},${t.value.centerY-48} ${t.value.left+t.value.usableWidth/4},${t.value.centerY-8}`}}}));function ve(){return m.value.map(a=>({color:a.color,name:a.name,shape:a.shape,series:a.series.map(u=>({name:u.name,x:u.xValue,y:u.yValue,quadrantSide:u.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}))}))}function de(){e.nextTick(()=>{const a=[[l.value.style.chart.title.text],[l.value.style.chart.title.subtitle.text],[""]],u=X.value.head,o=X.value.body,r=a.concat([u]).concat(o),n=s.createCsvContent(r);s.downloadCsv({csvContent:n,title:l.value.style.chart.title.text||"vue-ui-quadrant"})})}const S=e.ref(!1);function Ne(a){S.value=a,R.value+=1}function he(){p.value.showTable=!p.value.showTable}function ye(){p.value.plotLabels.show=!p.value.plotLabels.show}function be(){p.value.showTooltip=!p.value.showTooltip}const A=e.ref(!1);function O(){A.value=!A.value}return $e({getData:ve,generatePdf:le,generateCsv:de,generateImage:ae,toggleTable:he,toggleLabels:ye,toggleTooltip:be,toggleAnnotator:O}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-quadrant ${S.value?"vue-data-ui-wrapper-fullscreen":""} ${l.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"quadrantChart",ref:w,id:`vue-ui-quadrant_${g.value}`,style:e.normalizeStyle(`font-family:${l.value.style.fontFamily};width:100%; text-align:center;background:${l.value.style.chart.backgroundColor};${l.value.responsive?"height: 100%":""}`)},[l.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe.PenAndPaper,{key:0,parent:w.value,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,active:A.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),we.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:G,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),l.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:H,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Ve._sfc_main,{key:`table_${Q.value}`,config:{title:{cy:"quadrant-title",...l.value.style.chart.title},subtitle:{cy:"quadrant-subtitle",...l.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),l.value.userOptions.show&&V.value?(e.openBlock(),e.createBlock(me.UserOptions,{ref_key:"details",ref:Ce,key:`user_options_${R.value}`,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,isImaging:e.unref(te),isPrinting:e.unref(ee),uid:g.value,hasTooltip:l.value.userOptions.buttons.tooltip&&l.value.style.chart.tooltip.show,hasPdf:l.value.userOptions.buttons.pdf,hasImg:l.value.userOptions.buttons.img,hasXls:l.value.userOptions.buttons.csv,hasTable:l.value.userOptions.buttons.table,hasLabel:l.value.userOptions.buttons.labels,hasFullscreen:l.value.userOptions.buttons.fullscreen,isFullscreen:S.value,isTooltip:p.value.showTooltip,titles:{...l.value.userOptions.buttonTitles},chartElement:w.value,position:l.value.userOptions.position,hasAnnotator:l.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:Ne,onGeneratePdf:e.unref(le),onGenerateCsv:de,onGenerateImage:e.unref(ae),onToggleTable:he,onToggleLabels:ye,onToggleTooltip:be,onToggleAnnotator:O},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),viewBox:`${c.value.startX} ${c.value.startY} ${c.value.width} ${c.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:${h.value?"hidden":"visible"};background:transparent;color:${l.value.style.chart.color}`),id:`svg_${g.value}`},[e.createVNode(Ae._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`quadrant_gradient_${g.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(s.setOpacity)(e.unref(s.shiftHue)(o.color,.05),l.value.style.chart.layout.areas.opacity)},null,8,Re),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity)},null,8,He)],8,Oe))),256))]),l.value.style.chart.layout.grid.graduations.show?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Se.value,o=>(e.openBlock(),e.createElementBlock("rect",{fill:l.value.style.chart.layout.grid.graduations.fill?e.unref(s.setOpacity)(l.value.style.chart.layout.grid.graduations.color,o.opacity):"none",x:o.x,y:o.y,height:o.height<=0?.001:o.height,width:o.width<=0?.001:o.width,"stroke-width":l.value.style.chart.layout.grid.graduations.strokeWidth,stroke:l.value.style.chart.layout.grid.graduations.stroke,rx:l.value.style.chart.layout.grid.graduations.roundingForce},null,8,Ue))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:t.value.left,y1:t.value.centerY,x2:t.value.right,y2:t.value.centerY,stroke:l.value.style.chart.layout.grid.stroke,"stroke-width":l.value.style.chart.layout.grid.strokeWidth},null,8,Ge),e.createElementVNode("line",{x1:t.value.centerX,y1:t.value.top,x2:t.value.centerX,y2:t.value.bottom,stroke:l.value.style.chart.layout.grid.stroke,"stroke-width":l.value.style.chart.layout.grid.strokeWidth},null,8,Qe),l.value.style.chart.layout.grid.showArrows?(e.openBlock(),e.createElementBlock("g",Je,[e.createElementVNode("polygon",{points:`${t.value.right-8},${t.value.centerY-6} ${t.value.right},${t.value.centerY} ${t.value.right-8},${t.value.centerY+6}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,je),e.createElementVNode("polygon",{points:`${t.value.left+8},${t.value.centerY-6} ${t.value.left},${t.value.centerY} ${t.value.left+8},${t.value.centerY+6}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,Ze),e.createElementVNode("polygon",{points:`${t.value.centerX-6},${t.value.top+8} ${t.value.centerX},${t.value.top} ${t.value.centerX+6},${t.value.top+8}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,Ke),e.createElementVNode("polygon",{points:`${t.value.centerX-6},${t.value.bottom-8} ${t.value.centerX},${t.value.bottom} ${t.value.centerX+6},${t.value.bottom-8}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,et)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.show&&!h.value?(e.openBlock(),e.createElementBlock("g",tt,[l.value.style.chart.layout.labels.quadrantLabels.tl.text?(e.openBlock(),e.createElementBlock("text",{key:0,x:0,y:t.value.top-t.value.padding/2,"text-anchor":"start",fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.tl.bold?"bold":""}`),onClick:u[0]||(u[0]=o=>N("tl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tl.text),13,lt)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.tr.text?(e.openBlock(),e.createElementBlock("text",{key:1,x:t.value.width,y:t.value.top-t.value.padding/2,"text-anchor":"end",fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.tr.bold?"bold":""}`),onClick:u[1]||(u[1]=o=>N("tr"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tr.text),13,at)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.br.text?(e.openBlock(),e.createElementBlock("text",{key:2,x:t.value.width,y:t.value.bottom+t.value.padding*.7,"text-anchor":"end",fill:l.value.style.chart.layout.labels.quadrantLabels.br.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.br.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.br.bold?"bold":""}`),onClick:u[2]||(u[2]=o=>N("br"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.br.text),13,ot)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.bl.text?(e.openBlock(),e.createElementBlock("text",{key:3,x:0,y:t.value.bottom+t.value.padding*.7,"text-anchor":"start",fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.bl.bold?"bold":""}`),onClick:u[3]||(u[3]=o=>N("bl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.bl.text),13,ut)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.axisLabels.show?(e.openBlock(),e.createElementBlock("g",rt,[e.createElementVNode("text",{x:t.value.centerX,y:t.value.top-t.value.padding/6,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.max,e.unref(s.dataLabel)({v:f.value.y.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,nt),e.createElementVNode("text",{x:t.value.centerX,y:t.value.top-t.value.padding/2,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(l.value.style.chart.layout.grid.yAxis.name),9,st),e.createElementVNode("text",{x:t.value.centerX,y:t.value.bottom+t.value.padding*.35,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.negative},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.min,e.unref(s.dataLabel)({v:f.value.y.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,it),e.createElementVNode("text",{id:`xLabelMin_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.padding-l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(-90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.negative},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.min,e.unref(s.dataLabel)({v:f.value.x.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,ct),e.createElementVNode("text",{id:`xLabelMax_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.width-t.value.padding+l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.max,e.unref(s.dataLabel)({v:f.value.x.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,vt),e.createElementVNode("text",{id:`xLabelMaxName_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.width-l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(l.value.style.chart.layout.grid.xAxis.name),9,dt)])):e.createCommentVNode("",!0),l.value.style.chart.layout.areas.show?(e.openBlock(),e.createElementBlock("g",ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[o.series.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-quadrant-area":"",fill:l.value.style.chart.layout.areas.useGradient?`url(#quadrant_gradient_${g.value}_${r})`:e.unref(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity),points:e.unref(s.giftWrap)(o)},null,8,yt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[e.createElementVNode("rect",{onClick:u[4]||(u[4]=o=>$("TL")),x:t.value.left,y:t.value.top,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,bt),e.createElementVNode("rect",{onClick:u[5]||(u[5]=o=>$("TR")),x:t.value.centerX,y:t.value.top,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,pt),e.createElementVNode("rect",{onClick:u[6]||(u[6]=o=>$("BR")),x:t.value.centerX,y:t.value.centerY,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,ft),e.createElementVNode("rect",{onClick:u[7]||(u[7]=o=>$("BL")),x:t.value.left,y:t.value.centerY,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,mt)]),l.value.style.chart.layout.labels.plotLabels.showAsTag?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",xt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,n=>(e.openBlock(),e.createElementBlock("foreignObject",{style:{overflow:"visible"},height:"10",width:"100",x:n.x-50,y:n.y-l.value.style.chart.layout.labels.plotLabels.fontSize,onMouseover:v=>ie(o,n,r),onMouseleave:u[9]||(u[9]=v=>{E.value=!1,_.value=null,z.value=null}),onClick:v=>ce(o,n)},[e.createElementVNode("div",{style:e.normalizeStyle(`color:${e.unref(s.adaptColorToBackground)(o.color)};margin: 0 auto; font-size:${l.value.style.chart.layout.labels.plotLabels.fontSize}px; text-align:center;background:${o.color}; padding: 2px 4px; border-radius: 12px; height: ${l.value.style.chart.layout.labels.plotLabels.fontSize*1.5}px`)},e.toDisplayString(n.name),5)],40,$t))),256))],64))),256))])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,n=>(e.openBlock(),e.createBlock(ge._sfc_main,{color:o.color,isSelected:_.value&&n.uid===_.value,plot:n,radius:l.value.style.chart.layout.plots.radius/(h.value?1.5:1),shape:o.shape,stroke:l.value.style.chart.layout.plots.outline?l.value.style.chart.layout.plots.outlineColor:"none",strokeWidth:l.value.style.chart.layout.plots.outlineWidth,onMouseover:v=>ie(o,n,r),onMouseleave:u[8]||(u[8]=v=>{E.value=!1,_.value=null,z.value=null}),onClick:v=>ce(o,n)},null,8,["color","isSelected","plot","radius","shape","stroke","strokeWidth","onMouseover","onClick"]))),256))]))),256)),p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,o=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,r=>(e.openBlock(),e.createElementBlock("text",{x:r.x,y:r.y+l.value.style.chart.layout.labels.plotLabels.offsetY+l.value.style.chart.layout.plots.radius,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.plotLabels.fontSize/(h.value?1.5:1),fill:l.value.style.chart.layout.labels.plotLabels.color},e.toDisplayString(r.name),9,kt))),256))]))),256))])):e.createCommentVNode("",!0)],64)),h.value?(e.openBlock(),e.createElementBlock("g",Lt,[i.value==="TL"?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:`${t.value.left-1},${t.value.centerY} ${t.value.centerX},${t.value.centerY} ${t.value.centerX},${t.value.top-1} ${t.value.right},${t.value.top-1} ${t.value.right},${t.value.bottom} ${t.value.left-1},${t.value.bottom} ${t.value.left-1},${t.value.centerY}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,Ct)):e.createCommentVNode("",!0),i.value==="TR"?(e.openBlock(),e.createElementBlock("polygon",{key:1,points:`${t.value.left},${t.value.top-1} ${t.value.centerX},${t.value.top-1} ${t.value.centerX},${t.value.centerY} ${t.value.right+1},${t.value.centerY} ${t.value.right+1},${t.value.bottom} ${t.value.left},${t.value.bottom} ${t.value.left},${t.value.top-1}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,wt)):e.createCommentVNode("",!0),i.value==="BR"?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:`${t.value.left},${t.value.top} ${t.value.right+1},${t.value.top} ${t.value.right+1},${t.value.centerY} ${t.value.centerX},${t.value.centerY} ${t.value.centerX},${t.value.bottom+1} ${t.value.left},${t.value.bottom+1} ${t.value.left},${t.value.top}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,Bt)):e.createCommentVNode("",!0),i.value==="BL"?(e.openBlock(),e.createElementBlock("polygon",{key:3,points:`${t.value.left-1},${t.value.top} ${t.value.right},${t.value.top} ${t.value.right},${t.value.bottom+1} ${t.value.centerX},${t.value.bottom+1} ${t.value.centerX},${t.value.centerY} ${t.value.left-1},${t.value.centerY} ${t.value.left-1},${t.value.top}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,St)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),i.value&&!W.value?(e.openBlock(),e.createElementBlock("g",qt,[e.createElementVNode("text",{x:C.value.x,y:C.value.y-C.value.fontSize/1.5,"font-size":C.value.fontSize/1.5,fill:C.value.fill,"text-anchor":"middle","font-weight":C.value.bold?"bold":"normal"},e.toDisplayString(C.value.text),9,_t)])):e.createCommentVNode("",!0),h.value&&i.value?(e.openBlock(),e.createElementBlock("g",zt,[e.createElementVNode("rect",{x:b.value[i.value].tl.x,y:b.value[i.value].tl.y,height:"20",width:"20",fill:b.value[i.value].tl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="TL"?1:.2}`),onClick:u[10]||(u[10]=o=>$("TL")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="TL"})},null,14,Nt),e.createElementVNode("rect",{x:b.value[i.value].tr.x,y:b.value[i.value].tr.y,height:"20",width:"20",fill:b.value[i.value].tr.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="TR"?1:.2}`),onClick:u[11]||(u[11]=o=>$("TR")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="TR"})},null,14,Vt),e.createElementVNode("rect",{x:b.value[i.value].br.x,y:b.value[i.value].br.y,height:"20",width:"20",fill:b.value[i.value].br.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="BR"?1:.2}`),onClick:u[12]||(u[12]=o=>$("BR")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="BR"})},null,14,Et),e.createElementVNode("rect",{x:b.value[i.value].bl.x,y:b.value[i.value].bl.y,height:"20",width:"20",fill:b.value[i.value].bl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="BL"?1:.2}`),onClick:u[13]||(u[13]=o=>$("BL")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="BL"})},null,14,Tt),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:b.value[i.value].crosshairs.horizontal},null,8,Wt),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:b.value[i.value].crosshairs.vertical},null,8,Xt)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:t.value},void 0,!0)],14,De)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Yt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ee)||e.unref(te)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Xe.default,{key:6,config:{type:"quadrant",style:{backgroundColor:l.value.style.chart.backgroundColor,quadrant:{grid:{color:l.value.style.chart.layout.grid.stroke},plots:{color:l.value.style.chart.layout.grid.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[l.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Te.Legend,{key:`legend_${j.value}`,legendSet:ne.value,config:ze.value,onClickMarker:u[14]||(u[14]=({legend:o})=>F(o.id))},{item:e.withCtx(({legend:o})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:r=>F(o.id),style:e.normalizeStyle(`opacity:${L.value.includes(o.id)?.5:1}`)},e.toDisplayString(o.name),13,At)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:ne.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:U,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ee._sfc_main,{show:p.value.showTooltip&&E.value,backgroundColor:l.value.style.chart.tooltip.backgroundColor,color:l.value.style.chart.tooltip.color,borderRadius:l.value.style.chart.tooltip.borderRadius,borderColor:l.value.style.chart.tooltip.borderColor,borderWidth:l.value.style.chart.tooltip.borderWidth,fontSize:l.value.style.chart.tooltip.fontSize,backgroundOpacity:l.value.style.chart.tooltip.backgroundOpacity,position:l.value.style.chart.tooltip.position,offsetY:l.value.style.chart.tooltip.offsetY,parent:w.value,content:M.value,isFullscreen:S.value,isCustom:l.value.style.chart.tooltip.customFormat&&typeof l.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),default:e.withCtx(()=>[l.value.style.chart.tooltip.showShape?(e.openBlock(),e.createElementBlock("svg",Pt,[e.createVNode(ge._sfc_main,{plot:{x:10,y:10},shape:z.value.shape,color:z.value.color,radius:8,stroke:l.value.style.chart.layout.plots.outline?l.value.style.chart.layout.plots.outlineColor:"none","stroke-width":l.value.style.chart.layout.plots.outlineWidth},null,8,["shape","color","stroke","stroke-width"])])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),V.value?(e.openBlock(),e.createBlock(Ye.default,{key:8,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color},head:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(We.DataTable,{key:`table_${J.value}`,colNames:Y.value.colNames,head:Y.value.head,body:Y.value.body,config:Y.value.config,title:`${l.value.style.chart.title.text}${l.value.style.chart.title.subtitle.text?` : ${l.value.style.chart.title.subtitle.text}`:""}`,onClose:u[15]||(u[15]=o=>p.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createElementVNode("div",{innerHTML:o.name||o},null,8,Mt)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Fe))}},Dt=Me._export_sfc(Ft,[["__scopeId","data-v-a690d55c"]]);exports.default=Dt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BHQZE19X.cjs"),fe=require("./useResponsive-BJ7DTGpm.cjs"),Ve=require("./Title-5Vedk01J.cjs"),me=require("./usePrinter-DVgxBO4o.cjs"),Ee=require("./Tooltip-DjCKBAC4.cjs"),ge=require("./Shape-BblkpCyL.cjs"),Te=require("./Legend-DPHcmrzd.cjs"),We=require("./DataTable-kMUhutQ4.cjs"),Xe=require("./vue-ui-skeleton-DUNkS05l.cjs"),Ye=require("./vue-ui-accordion-CRVWlHxs.cjs"),ke=require("./useNestedProp-CwpqC_aE.cjs"),Ae=require("./PackageVersion-rnWHRWGI.cjs"),Pe=require("./PenAndPaper-BQl9-uX0.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Fe=["id"],De=["xmlns","viewBox","id"],Oe=["id"],Re=["stop-color"],He=["stop-color"],Ie={key:0},Ue=["fill","x","y","height","width","stroke-width","stroke","rx"],Ge=["x1","y1","x2","y2","stroke","stroke-width"],Qe=["x1","y1","x2","y2","stroke","stroke-width"],Je={key:1},je=["points","fill"],Ze=["points","fill"],Ke=["points","fill"],et=["points","fill"],tt={key:2},lt=["y","fill","font-size"],at=["x","y","fill","font-size"],ot=["x","y","fill","font-size"],ut=["y","fill","font-size"],rt={key:3},nt=["x","y","font-size","fill"],st=["x","y","font-size","fill"],it=["x","y","font-size","fill"],ct=["id","font-size","transform","fill"],vt=["id","font-size","transform","fill"],dt=["id","font-size","transform","fill"],ht={key:4},yt=["fill","points"],bt=["x","y","width","height"],pt=["x","y","width","height"],ft=["x","y","width","height"],mt=["x","y","width","height"],gt={key:0,style:{"pointer-events":"none"}},kt=["x","y","font-size","fill"],xt={key:0},$t=["x","y","onMouseover","onClick"],Lt={key:7,class:"vue-ui-dna"},Ct=["points","fill"],wt=["points","fill"],Bt=["points","fill"],St=["points","fill"],qt={key:8},_t=["x","y","font-size","fill","font-weight"],zt={key:9},Nt=["x","y","fill"],Vt=["x","y","fill"],Et=["x","y","fill"],Tt=["x","y","fill"],Wt=["stroke","d"],Xt=["stroke","d"],Yt={key:5,class:"vue-data-ui-watermark"},At=["onClick"],Pt={key:0,height:"14",width:"14",viewBox:"0 0 20 20"},Mt=["innerHTML"],Ft={__name:"vue-ui-quadrant",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectPlot","selectSide","selectLegend"],setup(xe,{expose:$e,emit:P}){const k=xe,{vue_ui_quadrant:Le}=s.useConfig(),V=e.computed(()=>!!k.dataset&&k.dataset.length),g=e.ref(s.createUid()),Ce=e.ref(null),E=e.ref(!1),M=e.ref(""),R=e.ref(0),h=e.ref(!1),w=e.ref(null),H=e.ref(null),I=e.ref(null),U=e.ref(null),G=e.ref(null),Q=e.ref(0),J=e.ref(0),j=e.ref(0),l=e.computed({get:()=>Z(),set:a=>a});function Z(){const a=ke.useNestedProp({userConfig:k.config,defaultConfig:Le});return a.theme?{...ke.useNestedProp({userConfig:s.themes.vue_ui_quadrant[a.theme]||k.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}e.watch(()=>k.config,a=>{l.value=Z(),K(),Q.value+=1,J.value+=1,j.value+=1},{deep:!0});const T=e.ref(null);function K(){if(s.objectIsEmpty(k.dataset)?s.error({componentName:"VueUiQuadrant",type:"dataset"}):k.dataset.forEach((a,u)=>{[null,void 0].includes(a.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",index:u}),[null,void 0].includes(a.series)?s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"series",index:u}):a.series.forEach((o,r)=>{[null,void 0].includes(o.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",key:"series",index:r})})}),l.value.responsive){const a=fe.throttle(()=>{const{width:u,height:o}=fe.useResponsive({chart:w.value,title:l.value.style.chart.title.text?H.value:null,legend:l.value.style.chart.legend.show?I.value:null,source:U.value,noTitle:G.value});y.value=48,t.value.height=o,t.value.usableHeight=o-y.value*2,t.value.width=u,t.value.usableWidth=u-y.value*2,t.value.top=y.value,t.value.left=y.value,t.value.right=u-y.value,t.value.bottom=o-y.value,t.value.centerX=u/2,t.value.centerY=o-o/2,t.value.padding=y.value});T.value=new ResizeObserver(a),T.value.observe(w.value.parentNode)}}e.onMounted(()=>{K()}),e.onBeforeUnmount(()=>{T.value&&T.value.disconnect()});const{isPrinting:ee,isImaging:te,generatePdf:le,generateImage:ae}=me.usePrinter({elementId:`vue-ui-quadrant_${g.value}`,fileName:l.value.style.chart.title.text||"vue-ui-quadrant"}),we=e.computed(()=>l.value.userOptions.show&&!l.value.style.chart.title.text),oe=e.computed(()=>s.convertCustomPalette(l.value.customPalette)),p=e.ref({plotLabels:{show:l.value.style.chart.layout.labels.plotLabels.show},showTable:l.value.table.show,showTooltip:l.value.style.chart.tooltip.show}),y=e.ref(48),t=e.ref({height:l.value.style.chart.height,usableHeight:l.value.style.chart.height-y.value*2,width:l.value.style.chart.width,usableWidth:l.value.style.chart.width-y.value*2,top:y.value,left:y.value,right:l.value.style.chart.width-y.value,bottom:l.value.style.chart.height-y.value,centerX:l.value.style.chart.width/2,centerY:l.value.style.chart.height-l.value.style.chart.height/2,padding:y.value}),c=e.ref({...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0});e.watch(()=>t.value,a=>{a&&(c.value={...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0})},{deep:!0});const i=e.ref(null),C=e.computed(()=>{switch(i.value){case"TL":return{x:c.value.startX+c.value.width/2,y:c.value.height,text:l.value.style.chart.layout.labels.quadrantLabels.tl.text||"Top Left",fontSize:l.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color,bold:l.value.style.chart.layout.labels.quadrantLabels.tl.bold};case"TR":return{x:c.value.startX+c.value.width/2,y:c.value.height,text:l.value.style.chart.layout.labels.quadrantLabels.tr.text||"Top Right",fontSize:l.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color,bold:l.value.style.chart.layout.labels.quadrantLabels.tr.bold};case"BR":return{x:c.value.startX+c.value.width/2,y:c.value.height*1.678,text:l.value.style.chart.layout.labels.quadrantLabels.br.text||"Bottom Right",fontSize:l.value.style.chart.layout.labels.quadrantLabels.br.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color,bold:l.value.style.chart.layout.labels.quadrantLabels.br.bold};case"BL":return{x:c.value.startX+c.value.width/2,y:c.value.height*1.678,text:l.value.style.chart.layout.labels.quadrantLabels.bl.text||"Bottom Left",fontSize:l.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color,bold:l.value.style.chart.layout.labels.quadrantLabels.bl.bold};default:return{x:0,y:0,text:"",fontSize:0,fill:"none",bold:!1}}}),Be=e.ref(null),W=e.ref(!1);function q({targetX:a,targetY:u,targetW:o,targetH:r,side:n}){i.value&&N(n);const v={x:a-c.value.startX,y:u-c.value.startY,w:o-c.value.width,h:r-c.value.height},d=l.value.zoomAnimationFrames;let x=0;function pe(){W.value=!0,c.value.startX+=v.x/d,c.value.startY+=v.y/d,c.value.width+=v.w/d,c.value.height+=v.h/d,x+=1,x<d?Be.value=requestAnimationFrame(pe):W.value=!1}pe()}function $(a){if(!W.value)if(h.value&&i.value===a)q({targetX:0,targetY:0,targetW:t.value.width,targetH:t.value.height}),i.value=null,h.value=!1;else{switch(i.value=a,a){case"TL":q({targetX:0,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tl"});break;case"TR":q({targetX:t.value.width/2-t.value.left,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tr"});break;case"BR":q({targetX:t.value.width/2-t.value.left,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"br"});break;case"BL":q({targetX:0,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"bl"});break;default:c.value.startX=0,c.value.startY=0,c.value.width=t.value.width,c.value.height=t.value.height;break}h.value=!0}}const Se=e.computed(()=>{const a=l.value.style.chart.layout.grid.graduations.steps,u=t.value.usableWidth/(a*2),o=t.value.top,r=[];for(let n=0;n<a;n+=1)r.push({x:t.value.padding+u*n,y:o+t.value.usableHeight*(n/a/2),height:t.value.usableHeight*(1-n/a),width:t.value.usableWidth*(1-n/a),opacity:Math.round((n+1)/a*20)});return r}),f=e.computed(()=>{let a=l.value.style.chart.layout.grid.xAxis.max,u=l.value.style.chart.layout.grid.xAxis.min,o=l.value.style.chart.layout.grid.yAxis.max,r=l.value.style.chart.layout.grid.yAxis.min;return l.value.style.chart.layout.grid.xAxis.auto&&(a=Math.max(...B.value.flatMap(n=>n.series.map(v=>v.x))),u=Math.min(...B.value.flatMap(n=>n.series.map(v=>v.x)))),l.value.style.chart.layout.grid.yAxis.auto&&(o=Math.max(...B.value.flatMap(n=>n.series.map(v=>v.y))),r=Math.min(...B.value.flatMap(n=>n.series.map(v=>v.y)))),{x:{max:a,min:u},y:{max:o,min:r}}}),L=e.ref([]),B=e.computed(()=>k.dataset.map((a,u)=>({...a,series:s.largestTriangleThreeBuckets({data:a.series,threshold:l.value.downsample.threshold}),id:`cat_${u}_${g.value}`,color:s.convertColorToHex(a.color)||oe.value[u]||s.palette[u]}))),qe=e.computed(()=>B.value.filter(a=>!L.value.includes(a.id))),_e=e.computed(()=>B.value.map((a,u)=>({...a,shape:a.shape||"circle",series:a.series.map(o=>({...o,x:ue(o.x),y:re(o.y),xValue:o.x,yValue:o.y,quadrantSide:se({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color}))}))),m=e.computed(()=>(k.dataset.forEach((a,u)=>{a.series.forEach((o,r)=>{[null,void 0].includes(o.x)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"x",key:"series",index:r}),[null,void 0].includes(o.y)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"y",key:"series",index:r})})}),qe.value.map((a,u)=>({...a,shape:a.shape||"circle",color:a.color||oe.value[u]||s.palette[u],series:a.series.map(o=>({...o,x:ue(o.x),y:re(o.y),xValue:o.x,yValue:o.y,quadrantSide:se({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color,uid:s.createUid()}))}))));function ue(a){if(a>=0){const u=a/f.value.x.max;return t.value.centerX+t.value.usableWidth/2*u}else{const u=Math.abs(a)/Math.abs(f.value.x.min);return t.value.centerX-t.value.usableWidth/2*u}}function re(a){if(a>=0){const u=a/f.value.y.max;return t.value.centerY+(1-t.value.usableHeight/2*u)}else{const u=Math.abs(a)/Math.abs(f.value.y.min);return t.value.centerY-(1-t.value.usableHeight/2*u)}}const X=e.computed(()=>{const a=m.value.flatMap(d=>d.series.map(x=>({x:x.xValue,y:x.yValue,name:x.name,category:x.categoryName,quadrantSide:x.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[x.quadrantSide].text,color:d.color,shape:d.shape}))),u=l.value.style.chart.layout.grid.xAxis.name||"x",o=l.value.style.chart.layout.grid.yAxis.name||"y",r=[l.value.translations.category,l.value.translations.item,u,o,l.value.translations.side],n=a.map(d=>[d.category,d.name,d.x,d.y,d.sideName||d.quadrantSide]),v=a.map(d=>({shape:d.shape,color:d.color}));return{head:r,body:n,itsShapes:v,tableData:a}}),Y=e.computed(()=>{const a=X.value.head,u=X.value.tableData.map(r=>[{shape:r.shape,color:r.color,name:r.category},r.name,s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,r.x,s.dataLabel({v:r.x,r:l.value.style.chart.layout.labels.plotLabels.rounding})),s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,r.y,s.dataLabel({v:r.y,r:l.value.style.chart.layout.labels.plotLabels.rounding})),r.sideName||r.quadrantSide]),o={th:{backgroundColor:l.value.table.th.backgroundColor,color:l.value.table.th.color,outline:l.value.table.th.outline},td:{backgroundColor:l.value.table.td.backgroundColor,color:l.value.table.td.color,outline:l.value.table.td.outline},breakpoint:l.value.table.responsiveBreakpoint};return{head:a,body:u,config:o,colNames:a}});function F(a){L.value.includes(a)?L.value=L.value.filter(o=>o!==a):L.value.push(a);const u=ve();P("selectLegend",u)}const ne=e.computed(()=>_e.value.map(a=>({name:a.name,shape:a.shape,color:a.color,id:a.id,opacity:L.value.includes(a.id)?.5:1,segregate:()=>F(a.id),isSegregated:L.value.includes(a.id)}))),ze=e.computed(()=>({cy:"quadrant-div-legend",backgroundColor:l.value.style.chart.legend.backgroundColor,color:l.value.style.chart.legend.color,fontSize:l.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:l.value.style.chart.legend.bold?"bold":""}));function se(a){switch(!0){case(a.x>=0&&a.y>=0):return"tr";case(a.x>=0&&a.y<0):return"br";case(a.x<0&&a.y<0):return"bl";case(a.x<0&&a.y>=0):return"tl";default:return""}}const _=e.ref(null),z=e.ref(null),D=e.ref(null);function ie(a,u,o){_.value=u.uid,z.value={color:a.color,shape:a.shape},D.value={datapoint:u,seriesIndex:o,series:m.value,config:l.value},E.value=!0;const r=l.value.style.chart.tooltip.customFormat;if(s.isFunction(r)&&s.functionReturnsString(()=>r({seriesIndex:o,datapoint:u,series:m.value,config:l.value})))M.value=r({seriesIndex:o,datapoint:u,series:m.value,config:l.value});else{let n="";u.quadrantSide&&(n+=`<div style="color:${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].color};font-weight:${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].bold?"bold":"400"}">${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}</div>`),n+=`<div>${a.name}</div>`,n+=`<div style="padding-bottom:6px;border-bottom:1px solid ${l.value.style.chart.tooltip.borderColor};margin-bottom:3px">${u.name}</div>`,n+=`<div>${l.value.style.chart.layout.grid.xAxis.name?l.value.style.chart.layout.grid.xAxis.name:"x"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,u.xValue,s.dataLabel({v:u.xValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,n+=`<div>${l.value.style.chart.layout.grid.yAxis.name?l.value.style.chart.layout.grid.yAxis.name:"y"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,u.yValue,s.dataLabel({v:u.yValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,M.value=`<div style="text-align:left;font-size:${l.value.style.chart.tooltip.fontSize}px">${n}</div>`}}function ce(a,u){const o={category:a.name,shape:a.shape,itemName:u.name,x:u.xValue,y:u.yValue,quadrantSide:u.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text};P("selectPlot",o)}function N(a){if(!a)return;const u=m.value.flatMap(r=>r.series.filter(n=>n.quadrantSide===a).map(n=>({category:n.categoryName,itemName:n.name,x:n.xValue,y:n.yValue}))),o={quadrantSide:a,sideName:l.value.style.chart.layout.labels.quadrantLabels[a].text,items:[...u]};P("selectSide",o)}const b=e.computed(()=>({TL:{tl:{x:t.value.left+t.value.usableWidth/4-20,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.left+t.value.usableWidth/4,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.left+t.value.usableWidth/4,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.left+t.value.usableWidth/4-20,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.left+t.value.usableWidth/4-20},20 ${t.value.left+t.value.usableWidth/4+20},20`,vertical:`M ${t.value.left+t.value.usableWidth/4},0 ${t.value.left+t.value.usableWidth/4},40`}},TR:{tl:{x:t.value.centerX+t.value.usableWidth/4-20,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.centerX+t.value.usableWidth/4,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.centerX+t.value.usableWidth/4,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.centerX+t.value.usableWidth/4-20,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.centerX+t.value.usableWidth/4-20},20 ${t.value.centerX+t.value.usableWidth/4+20},20`,vertical:`M ${t.value.centerX+t.value.usableWidth/4},0 ${t.value.centerX+t.value.usableWidth/4},40`}},BR:{tl:{x:t.value.centerX+t.value.usableWidth/4-20,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.centerX+t.value.usableWidth/4,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.centerX+t.value.usableWidth/4,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.centerX+t.value.usableWidth/4-20,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.centerX+t.value.usableWidth/4-20},${t.value.centerY-28} ${t.value.centerX+t.value.usableWidth/4+20},${t.value.centerY-28}`,vertical:`M ${t.value.centerX+t.value.usableWidth/4},${t.value.centerY-48} ${t.value.centerX+t.value.usableWidth/4},${t.value.centerY-8}`}},BL:{tl:{x:t.value.left+t.value.usableWidth/4-20,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.left+t.value.usableWidth/4,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.left+t.value.usableWidth/4,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.left+t.value.usableWidth/4-20,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.left+t.value.usableWidth/4-20},${t.value.centerY-28} ${t.value.left+t.value.usableWidth/4+20},${t.value.centerY-28}`,vertical:`M ${t.value.left+t.value.usableWidth/4},${t.value.centerY-48} ${t.value.left+t.value.usableWidth/4},${t.value.centerY-8}`}}}));function ve(){return m.value.map(a=>({color:a.color,name:a.name,shape:a.shape,series:a.series.map(u=>({name:u.name,x:u.xValue,y:u.yValue,quadrantSide:u.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}))}))}function de(){e.nextTick(()=>{const a=[[l.value.style.chart.title.text],[l.value.style.chart.title.subtitle.text],[""]],u=X.value.head,o=X.value.body,r=a.concat([u]).concat(o),n=s.createCsvContent(r);s.downloadCsv({csvContent:n,title:l.value.style.chart.title.text||"vue-ui-quadrant"})})}const S=e.ref(!1);function Ne(a){S.value=a,R.value+=1}function he(){p.value.showTable=!p.value.showTable}function ye(){p.value.plotLabels.show=!p.value.plotLabels.show}function be(){p.value.showTooltip=!p.value.showTooltip}const A=e.ref(!1);function O(){A.value=!A.value}return $e({getData:ve,generatePdf:le,generateCsv:de,generateImage:ae,toggleTable:he,toggleLabels:ye,toggleTooltip:be,toggleAnnotator:O}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-quadrant ${S.value?"vue-data-ui-wrapper-fullscreen":""} ${l.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"quadrantChart",ref:w,id:`vue-ui-quadrant_${g.value}`,style:e.normalizeStyle(`font-family:${l.value.style.fontFamily};width:100%; text-align:center;background:${l.value.style.chart.backgroundColor};${l.value.responsive?"height: 100%":""}`)},[l.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe.PenAndPaper,{key:0,parent:w.value,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,active:A.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),we.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:G,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),l.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:H,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Ve._sfc_main,{key:`table_${Q.value}`,config:{title:{cy:"quadrant-title",...l.value.style.chart.title},subtitle:{cy:"quadrant-subtitle",...l.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),l.value.userOptions.show&&V.value?(e.openBlock(),e.createBlock(me.UserOptions,{ref_key:"details",ref:Ce,key:`user_options_${R.value}`,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,isImaging:e.unref(te),isPrinting:e.unref(ee),uid:g.value,hasTooltip:l.value.userOptions.buttons.tooltip&&l.value.style.chart.tooltip.show,hasPdf:l.value.userOptions.buttons.pdf,hasImg:l.value.userOptions.buttons.img,hasXls:l.value.userOptions.buttons.csv,hasTable:l.value.userOptions.buttons.table,hasLabel:l.value.userOptions.buttons.labels,hasFullscreen:l.value.userOptions.buttons.fullscreen,isFullscreen:S.value,isTooltip:p.value.showTooltip,titles:{...l.value.userOptions.buttonTitles},chartElement:w.value,position:l.value.userOptions.position,hasAnnotator:l.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:Ne,onGeneratePdf:e.unref(le),onGenerateCsv:de,onGenerateImage:e.unref(ae),onToggleTable:he,onToggleLabels:ye,onToggleTooltip:be,onToggleAnnotator:O},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),viewBox:`${c.value.startX} ${c.value.startY} ${c.value.width} ${c.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:${h.value?"hidden":"visible"};background:transparent;color:${l.value.style.chart.color}`),id:`svg_${g.value}`},[e.createVNode(Ae._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`quadrant_gradient_${g.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(s.setOpacity)(e.unref(s.shiftHue)(o.color,.05),l.value.style.chart.layout.areas.opacity)},null,8,Re),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity)},null,8,He)],8,Oe))),256))]),l.value.style.chart.layout.grid.graduations.show?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Se.value,o=>(e.openBlock(),e.createElementBlock("rect",{fill:l.value.style.chart.layout.grid.graduations.fill?e.unref(s.setOpacity)(l.value.style.chart.layout.grid.graduations.color,o.opacity):"none",x:o.x,y:o.y,height:o.height<=0?.001:o.height,width:o.width<=0?.001:o.width,"stroke-width":l.value.style.chart.layout.grid.graduations.strokeWidth,stroke:l.value.style.chart.layout.grid.graduations.stroke,rx:l.value.style.chart.layout.grid.graduations.roundingForce},null,8,Ue))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:t.value.left,y1:t.value.centerY,x2:t.value.right,y2:t.value.centerY,stroke:l.value.style.chart.layout.grid.stroke,"stroke-width":l.value.style.chart.layout.grid.strokeWidth},null,8,Ge),e.createElementVNode("line",{x1:t.value.centerX,y1:t.value.top,x2:t.value.centerX,y2:t.value.bottom,stroke:l.value.style.chart.layout.grid.stroke,"stroke-width":l.value.style.chart.layout.grid.strokeWidth},null,8,Qe),l.value.style.chart.layout.grid.showArrows?(e.openBlock(),e.createElementBlock("g",Je,[e.createElementVNode("polygon",{points:`${t.value.right-8},${t.value.centerY-6} ${t.value.right},${t.value.centerY} ${t.value.right-8},${t.value.centerY+6}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,je),e.createElementVNode("polygon",{points:`${t.value.left+8},${t.value.centerY-6} ${t.value.left},${t.value.centerY} ${t.value.left+8},${t.value.centerY+6}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,Ze),e.createElementVNode("polygon",{points:`${t.value.centerX-6},${t.value.top+8} ${t.value.centerX},${t.value.top} ${t.value.centerX+6},${t.value.top+8}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,Ke),e.createElementVNode("polygon",{points:`${t.value.centerX-6},${t.value.bottom-8} ${t.value.centerX},${t.value.bottom} ${t.value.centerX+6},${t.value.bottom-8}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,et)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.show&&!h.value?(e.openBlock(),e.createElementBlock("g",tt,[l.value.style.chart.layout.labels.quadrantLabels.tl.text?(e.openBlock(),e.createElementBlock("text",{key:0,x:0,y:t.value.top-t.value.padding/2,"text-anchor":"start",fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.tl.bold?"bold":""}`),onClick:u[0]||(u[0]=o=>N("tl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tl.text),13,lt)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.tr.text?(e.openBlock(),e.createElementBlock("text",{key:1,x:t.value.width,y:t.value.top-t.value.padding/2,"text-anchor":"end",fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.tr.bold?"bold":""}`),onClick:u[1]||(u[1]=o=>N("tr"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tr.text),13,at)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.br.text?(e.openBlock(),e.createElementBlock("text",{key:2,x:t.value.width,y:t.value.bottom+t.value.padding*.7,"text-anchor":"end",fill:l.value.style.chart.layout.labels.quadrantLabels.br.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.br.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.br.bold?"bold":""}`),onClick:u[2]||(u[2]=o=>N("br"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.br.text),13,ot)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.bl.text?(e.openBlock(),e.createElementBlock("text",{key:3,x:0,y:t.value.bottom+t.value.padding*.7,"text-anchor":"start",fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.bl.bold?"bold":""}`),onClick:u[3]||(u[3]=o=>N("bl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.bl.text),13,ut)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.axisLabels.show?(e.openBlock(),e.createElementBlock("g",rt,[e.createElementVNode("text",{x:t.value.centerX,y:t.value.top-t.value.padding/6,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.max,e.unref(s.dataLabel)({v:f.value.y.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,nt),e.createElementVNode("text",{x:t.value.centerX,y:t.value.top-t.value.padding/2,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(l.value.style.chart.layout.grid.yAxis.name),9,st),e.createElementVNode("text",{x:t.value.centerX,y:t.value.bottom+t.value.padding*.35,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.negative},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.min,e.unref(s.dataLabel)({v:f.value.y.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,it),e.createElementVNode("text",{id:`xLabelMin_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.padding-l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(-90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.negative},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.min,e.unref(s.dataLabel)({v:f.value.x.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,ct),e.createElementVNode("text",{id:`xLabelMax_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.width-t.value.padding+l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.max,e.unref(s.dataLabel)({v:f.value.x.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,vt),e.createElementVNode("text",{id:`xLabelMaxName_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.width-l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(l.value.style.chart.layout.grid.xAxis.name),9,dt)])):e.createCommentVNode("",!0),l.value.style.chart.layout.areas.show?(e.openBlock(),e.createElementBlock("g",ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[o.series.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-quadrant-area":"",fill:l.value.style.chart.layout.areas.useGradient?`url(#quadrant_gradient_${g.value}_${r})`:e.unref(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity),points:e.unref(s.giftWrap)(o)},null,8,yt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[e.createElementVNode("rect",{onClick:u[4]||(u[4]=o=>$("TL")),x:t.value.left,y:t.value.top,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,bt),e.createElementVNode("rect",{onClick:u[5]||(u[5]=o=>$("TR")),x:t.value.centerX,y:t.value.top,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,pt),e.createElementVNode("rect",{onClick:u[6]||(u[6]=o=>$("BR")),x:t.value.centerX,y:t.value.centerY,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,ft),e.createElementVNode("rect",{onClick:u[7]||(u[7]=o=>$("BL")),x:t.value.left,y:t.value.centerY,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,mt)]),l.value.style.chart.layout.labels.plotLabels.showAsTag?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",xt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,n=>(e.openBlock(),e.createElementBlock("foreignObject",{style:{overflow:"visible"},height:"10",width:"100",x:n.x-50,y:n.y-l.value.style.chart.layout.labels.plotLabels.fontSize,onMouseover:v=>ie(o,n,r),onMouseleave:u[9]||(u[9]=v=>{E.value=!1,_.value=null,z.value=null}),onClick:v=>ce(o,n)},[e.createElementVNode("div",{style:e.normalizeStyle(`color:${e.unref(s.adaptColorToBackground)(o.color)};margin: 0 auto; font-size:${l.value.style.chart.layout.labels.plotLabels.fontSize}px; text-align:center;background:${o.color}; padding: 2px 4px; border-radius: 12px; height: ${l.value.style.chart.layout.labels.plotLabels.fontSize*1.5}px`)},e.toDisplayString(n.name),5)],40,$t))),256))],64))),256))])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,n=>(e.openBlock(),e.createBlock(ge._sfc_main,{color:o.color,isSelected:_.value&&n.uid===_.value,plot:n,radius:l.value.style.chart.layout.plots.radius/(h.value?1.5:1),shape:o.shape,stroke:l.value.style.chart.layout.plots.outline?l.value.style.chart.layout.plots.outlineColor:"none",strokeWidth:l.value.style.chart.layout.plots.outlineWidth,onMouseover:v=>ie(o,n,r),onMouseleave:u[8]||(u[8]=v=>{E.value=!1,_.value=null,z.value=null}),onClick:v=>ce(o,n)},null,8,["color","isSelected","plot","radius","shape","stroke","strokeWidth","onMouseover","onClick"]))),256))]))),256)),p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,o=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,r=>(e.openBlock(),e.createElementBlock("text",{x:r.x,y:r.y+l.value.style.chart.layout.labels.plotLabels.offsetY+l.value.style.chart.layout.plots.radius,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.plotLabels.fontSize/(h.value?1.5:1),fill:l.value.style.chart.layout.labels.plotLabels.color},e.toDisplayString(r.name),9,kt))),256))]))),256))])):e.createCommentVNode("",!0)],64)),h.value?(e.openBlock(),e.createElementBlock("g",Lt,[i.value==="TL"?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:`${t.value.left-1},${t.value.centerY} ${t.value.centerX},${t.value.centerY} ${t.value.centerX},${t.value.top-1} ${t.value.right},${t.value.top-1} ${t.value.right},${t.value.bottom} ${t.value.left-1},${t.value.bottom} ${t.value.left-1},${t.value.centerY}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,Ct)):e.createCommentVNode("",!0),i.value==="TR"?(e.openBlock(),e.createElementBlock("polygon",{key:1,points:`${t.value.left},${t.value.top-1} ${t.value.centerX},${t.value.top-1} ${t.value.centerX},${t.value.centerY} ${t.value.right+1},${t.value.centerY} ${t.value.right+1},${t.value.bottom} ${t.value.left},${t.value.bottom} ${t.value.left},${t.value.top-1}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,wt)):e.createCommentVNode("",!0),i.value==="BR"?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:`${t.value.left},${t.value.top} ${t.value.right+1},${t.value.top} ${t.value.right+1},${t.value.centerY} ${t.value.centerX},${t.value.centerY} ${t.value.centerX},${t.value.bottom+1} ${t.value.left},${t.value.bottom+1} ${t.value.left},${t.value.top}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,Bt)):e.createCommentVNode("",!0),i.value==="BL"?(e.openBlock(),e.createElementBlock("polygon",{key:3,points:`${t.value.left-1},${t.value.top} ${t.value.right},${t.value.top} ${t.value.right},${t.value.bottom+1} ${t.value.centerX},${t.value.bottom+1} ${t.value.centerX},${t.value.centerY} ${t.value.left-1},${t.value.centerY} ${t.value.left-1},${t.value.top}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,St)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),i.value&&!W.value?(e.openBlock(),e.createElementBlock("g",qt,[e.createElementVNode("text",{x:C.value.x,y:C.value.y-C.value.fontSize/1.5,"font-size":C.value.fontSize/1.5,fill:C.value.fill,"text-anchor":"middle","font-weight":C.value.bold?"bold":"normal"},e.toDisplayString(C.value.text),9,_t)])):e.createCommentVNode("",!0),h.value&&i.value?(e.openBlock(),e.createElementBlock("g",zt,[e.createElementVNode("rect",{x:b.value[i.value].tl.x,y:b.value[i.value].tl.y,height:"20",width:"20",fill:b.value[i.value].tl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="TL"?1:.2}`),onClick:u[10]||(u[10]=o=>$("TL")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="TL"})},null,14,Nt),e.createElementVNode("rect",{x:b.value[i.value].tr.x,y:b.value[i.value].tr.y,height:"20",width:"20",fill:b.value[i.value].tr.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="TR"?1:.2}`),onClick:u[11]||(u[11]=o=>$("TR")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="TR"})},null,14,Vt),e.createElementVNode("rect",{x:b.value[i.value].br.x,y:b.value[i.value].br.y,height:"20",width:"20",fill:b.value[i.value].br.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="BR"?1:.2}`),onClick:u[12]||(u[12]=o=>$("BR")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="BR"})},null,14,Et),e.createElementVNode("rect",{x:b.value[i.value].bl.x,y:b.value[i.value].bl.y,height:"20",width:"20",fill:b.value[i.value].bl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.value==="BL"?1:.2}`),onClick:u[13]||(u[13]=o=>$("BL")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":i.value!=="BL"})},null,14,Tt),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:b.value[i.value].crosshairs.horizontal},null,8,Wt),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:b.value[i.value].crosshairs.vertical},null,8,Xt)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:t.value},void 0,!0)],14,De)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Yt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ee)||e.unref(te)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Xe.default,{key:6,config:{type:"quadrant",style:{backgroundColor:l.value.style.chart.backgroundColor,quadrant:{grid:{color:l.value.style.chart.layout.grid.stroke},plots:{color:l.value.style.chart.layout.grid.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[l.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Te.Legend,{key:`legend_${j.value}`,legendSet:ne.value,config:ze.value,onClickMarker:u[14]||(u[14]=({legend:o})=>F(o.id))},{item:e.withCtx(({legend:o})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:r=>F(o.id),style:e.normalizeStyle(`opacity:${L.value.includes(o.id)?.5:1}`)},e.toDisplayString(o.name),13,At)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:ne.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:U,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ee._sfc_main,{show:p.value.showTooltip&&E.value,backgroundColor:l.value.style.chart.tooltip.backgroundColor,color:l.value.style.chart.tooltip.color,borderRadius:l.value.style.chart.tooltip.borderRadius,borderColor:l.value.style.chart.tooltip.borderColor,borderWidth:l.value.style.chart.tooltip.borderWidth,fontSize:l.value.style.chart.tooltip.fontSize,backgroundOpacity:l.value.style.chart.tooltip.backgroundOpacity,position:l.value.style.chart.tooltip.position,offsetY:l.value.style.chart.tooltip.offsetY,parent:w.value,content:M.value,isFullscreen:S.value,isCustom:l.value.style.chart.tooltip.customFormat&&typeof l.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),default:e.withCtx(()=>[l.value.style.chart.tooltip.showShape?(e.openBlock(),e.createElementBlock("svg",Pt,[e.createVNode(ge._sfc_main,{plot:{x:10,y:10},shape:z.value.shape,color:z.value.color,radius:8,stroke:l.value.style.chart.layout.plots.outline?l.value.style.chart.layout.plots.outlineColor:"none","stroke-width":l.value.style.chart.layout.plots.outlineWidth},null,8,["shape","color","stroke","stroke-width"])])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),V.value?(e.openBlock(),e.createBlock(Ye.default,{key:8,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color},head:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(We.DataTable,{key:`table_${J.value}`,colNames:Y.value.colNames,head:Y.value.head,body:Y.value.body,config:Y.value.config,title:`${l.value.style.chart.title.text}${l.value.style.chart.title.subtitle.text?` : ${l.value.style.chart.title.subtitle.text}`:""}`,onClose:u[15]||(u[15]=o=>p.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createElementVNode("div",{innerHTML:o.name||o},null,8,Mt)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Fe))}},Dt=Me._export_sfc(Ft,[["__scopeId","data-v-a690d55c"]]);exports.default=Dt;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DOkp6I9s.cjs"),Ae=require("./useResponsive-BJ7DTGpm.cjs"),ue=require("./BaseIcon-CqZOJaZ7.cjs"),qe=require("./Tooltip-CXWymtVK.cjs"),Le=require("./usePrinter-Hc-LICQf.cjs"),We=require("./Slicer-DJsIXuV_.cjs"),je=require("./vue-ui-skeleton-G8jk4hcj.cjs"),_e=require("./useNestedProp-BEjpLG7g.cjs"),Ge=require("./PackageVersion-JL2H1ZNU.cjs"),He=require("./PenAndPaper-Bmfl9PVt.cjs"),Xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},Ye=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function Ze({dataset:c,barLineSwitch:w=6}){let f=null,b=null,N=0;if((typeof c=="number"||typeof c=="string")&&console.warn(`The provided dataset (${c}) is not sufficient to build a chart`),K(c)&&($(c)&&(c.length<w?f=S.BAR:f=S.LINE,b=c,N=c.length),se(c))){if(!Qe(c))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const U=Object.keys(c[0]),G=Object.values(c[0]);if(!U.some(A=>Ke(A)))return console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."),!1;ze(G,A=>typeof A=="number")&&(f=S.DONUT,b=c),ze(G,A=>Array.isArray(A)&&$(A))&&(Ce(c)>w?f=S.LINE:f=S.BAR,N=Ce(c),b=c.map(A=>({...A,data:et(A,P=>$(P))}))),c=c.map(A=>Ne(A)),b=b.map(A=>Ne(A))}return K(c)&&[...new Set(c.flatMap(U=>Array.isArray(U)))][0],{dataset:c,type:f,usableDataset:b,maxSeriesLength:N}}function Ve(c){return!c||K(c)&&!c.length}function K(c){return Array.isArray(c)}function $(c){if(!K(c)||Ve(c))return!1;const w=c.map(f=>Number(f));return![...new Set(w.flatMap(f=>typeof f=="number"&&!isNaN(f)))].includes(!1)}function se(c){return!K(c)||Ve(c)||!![...new Set(c.flatMap(f=>typeof f=="object"&&!Array.isArray(f)))].includes(!1)?!1:!c.map(f=>Object.keys(f).length>0).includes(!1)}function Je(c,w){const f=Object.keys(c).sort(),b=Object.keys(w).sort();if(f.length!==b.length)return!1;for(let N=0;N<f.length;N+=1){const V=f[N],M=b[N];if(V!==M||typeof c[V]!=typeof w[M])return!1}return!0}function Qe(c){if(c.length<=1)return!0;for(let w=0;w<c.length;w+=1)for(let f=w+1;f<c.length;f+=1)if(!Je(c[w],c[f]))return!1;return!0}function Ke(c){return Ye.includes(c.toUpperCase())}function ze(c,w){let f=[];for(let b=0;b<c.length;b+=1)f.push(w(c[b]));return f.includes(!0)}function Ce(c){return Math.max(...[...c].flatMap(w=>Object.values(w).filter(f=>$(f)).map(f=>f.length)))}function et(c,w){return Object.values(c).filter(f=>w(f))[0]}function Ne(c){const w={};for(let f in c)c.hasOwnProperty(f)&&(w[f.toUpperCase()]=c[f]);return w}const Fe=c=>(e.pushScopeId("data-v-7c8df607"),c=c(),e.popScopeId(),c),tt=["id"],lt=["xmlns","viewBox"],at=["id"],ot=["id"],nt=Fe(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),rt=["id"],it=["flood-color"],ut={key:0,class:"donut-label-connectors"},st=["d","stroke","stroke-width","filter"],ct=["cx","cy","r","fill","filter"],dt={class:"donut"},vt=["d","fill","stroke","stroke-width","filter"],mt=["d","onMouseenter","onClick"],ft={key:1,class:"donut-labels quick-animation"},ht=["cx","cy","fill","stroke","filter"],pt=["text-anchor","x","y","fill","font-size","filter"],kt=["text-anchor","x","y","fill","font-size","filter"],gt={key:2,class:"donut-hollow quick-animation"},yt=["x","y","font-size","fill"],xt=["x","y","font-size","fill"],St={key:0,class:"line-grid"},bt=["x1","x2","y1","y2","stroke","stroke-width"],Bt=["x1","x2","y1","y2","stroke","stroke-width"],wt={key:1,class:"line-axis"},Et=["x1","x2","y1","y2","stroke","stroke-width"],At=["x1","x2","y1","y2","stroke","stroke-width"],Lt={key:2,class:"yLabels"},_t=["x1","x2","y1","y2","stroke","stroke-width"],zt=["x","y","font-size","fill"],Ct={key:3,class:"periodLabels"},Nt=["x1","x2","y1","y2","stroke","stroke-width"],Vt=["font-size","text-anchor","fill","transform"],Ft={class:"plots"},Pt={class:"line-plot-series"},$t=["d","stroke","stroke-width"],It=["d","stroke","stroke-width"],Tt=["d","stroke","stroke-width"],Rt=["d","stroke","stroke-width"],Ot=["cx","cy","fill","stroke"],Dt={key:4,class:"dataLabels"},Mt=["font-size","fill","x","y"],Ut={class:"tooltip-traps"},qt=["x","y","height","width","fill","onMouseenter","onClick"],Wt={key:0,class:"line-grid"},jt=["x1","x2","y1","y2","stroke","stroke-width"],Gt=["x1","x2","y1","y2","stroke","stroke-width"],Ht={key:1,class:"line-axis"},Xt=["x1","x2","y1","y2","stroke","stroke-width"],Yt=["x1","x2","y1","y2","stroke","stroke-width"],Zt={key:2,class:"yLabels"},Jt=["x1","x2","y1","y2","stroke","stroke-width"],Qt=["x","y","font-size","fill"],Kt={key:3,class:"periodLabels"},el=["x1","x2","y1","y2","stroke","stroke-width"],tl=["font-size","text-anchor","transform","fill"],ll={class:"plots"},al=["x","width","height","y","fill","stroke","stroke-width"],ol=["to"],nl=["from","to"],rl={key:4,class:"dataLabels"},il=["x","y","font-size","fill"],ul={class:"tooltip-traps"},sl=["x","y","height","width","fill","onMouseenter","onClick"],cl={key:3,class:"axis-labels"},dl={key:0},vl=["font-size","fill","x","y"],ml={key:1},fl=["font-size","fill","x","y"],hl={key:2},pl=["font-size","fill","transform"],kl={key:3},gl=["font-size","fill","transform"],yl={key:6,class:"vue-data-ui-watermark"},xl=["onClick"],Sl=["onClick"],bl=["onClick"],Bl={key:1,class:"vue-ui-quick-chart-not-processable"},wl=Fe(()=>e.createElementVNode("span",null,"Dataset is not processable",-1)),El={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(c,{expose:w,emit:f}){const b=c,{vue_ui_quick_chart:N}=u.useConfig(),V=e.ref(null),M=e.ref(null),U=e.ref(null),G=e.ref(null),A=e.ref(u.createUid()),P=e.ref(!1),H=e.ref(null),T=e.ref(""),F=e.ref(null),ve=e.ref(null),me=e.ref(null),x=e.ref([]),fe=e.ref(0),ee=e.ref(0),t=e.computed({get:()=>he(),set:n=>n});function he(){const n=_e.useNestedProp({userConfig:b.config,defaultConfig:N});let s={};return n.theme?s={..._e.useNestedProp({userConfig:u.themes.vue_ui_quick_chart[n.theme]||b.config,defaultConfig:n}),customPalette:u.themePalettes[n.theme]||u.palette}:s=n,b.config&&u.hasDeepProperty(b.config,"zoomStartIndex")?s.zoomStartIndex=b.config.zoomStartIndex:s.zoomStartIndex=null,b.config&&u.hasDeepProperty(b.config,"zoomEndIndex")?s.zoomEndIndex=b.config.zoomEndIndex:s.zoomEndIndex=null,s}e.watch(()=>b.config,n=>{t.value=he(),y.value.width=t.value.width,y.value.height=t.value.height,ge()},{deep:!0}),e.watch(()=>b.dataset,n=>{h.value=Y.value,k.value.start=0,k.value.end=h.value.maxSeriesLength,ee.value+=1},{deep:!0});const X=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),Y=e.computed(()=>{const n=Ze({dataset:u.sanitizeArray(b.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return n||console.error("VueUiQuickChart : Dataset is not processable"),n}),h=e.ref(Y.value),Pe=e.computed(()=>!!h.value),B=e.computed(()=>h.value?h.value.type:null);e.watch(()=>B.value,n=>{n||u.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:te,isImaging:le,generatePdf:pe,generateImage:ke}=Le.usePrinter({elementId:`${B.value}_${A.value}`,fileName:t.value.title||B.value}),$e=e.computed(()=>t.value.showUserOptions&&!t.value.title),y=e.ref({width:t.value.width,height:t.value.height}),ae=e.ref({showTooltip:t.value.showTooltip}),oe=e.ref(null);e.onMounted(()=>{ge()});function ge(){if(t.value.responsive){const n=Ae.throttle(()=>{const{width:s,height:l}=Ae.useResponsive({chart:V.value,title:t.value.title?M.value:null,legend:t.value.showLegend?U.value:null,slicer:[S.BAR,S.LINE].includes(B.value)&&t.value.zoomXy&&h.value.maxSeriesLength>1?G.value:null,source:ve.value,noTitle:me.value});y.value.width=s,y.value.height=l});oe.value=new ResizeObserver(n),oe.value.observe(V.value.parentNode)}we()}e.onBeforeUnmount(()=>{oe.value&&oe.value.disconnect()});const Ie=e.computed(()=>{switch(B.value){case S.LINE:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;case S.BAR:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;case S.DONUT:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;default:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`}});function ye(n){return[...n].map(s=>s.value).reduce((s,l)=>s+l,0)}function Z(n){return t.value.blurOnHover&&![null,void 0].includes(F.value)&&F.value!==n?`url(#blur_${A.value})`:""}function xe(n,s){x.value.includes(n)?x.value=x.value.filter(l=>l!==n):x.value.length<s&&x.value.push(n)}const Se=e.ref(null),be=e.ref(null),ne=e.ref(!1);function Te(n,s){ne.value=!0;let l=n.value;if(x.value.includes(n.id)){let i=function(){l>r?(ne.value=!1,cancelAnimationFrame(be.value),h.value={...h.value,dataset:h.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:r,VALUE:r}:m)}):(l+=r*.025,h.value={...h.value,dataset:h.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:l,VALUE:l}:m)},be.value=requestAnimationFrame(i))};x.value=x.value.filter(m=>m!==n.id);const r=Y.value.dataset.find((m,_)=>n.id===`donut_${_}`).VALUE;i()}else if(s.length>1){let r=function(){l<.1?(ne.value=!1,cancelAnimationFrame(Se.value),x.value.push(n.id),h.value={...h.value,dataset:h.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:0,VALUE:0}:i)}):(l/=1.1,h.value={...h.value,dataset:h.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:l,VALUE:l}:i)},Se.value=requestAnimationFrame(r))};r()}}const I=e.ref(null);function Re(n){I.value=n}const Be=e.computed(()=>t.value.donutThicknessRatio<.15?.15:t.value.donutThicknessRatio>.4?.4:t.value.donutThicknessRatio),E=e.computed(()=>{if(B.value!==S.DONUT)return null;const n=h.value.dataset.map((a,o)=>({...a,value:a.VALUE||a.DATA||a.SERIE||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`donut_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):X.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],immutableValue:a.value}));function s(a,o){return u.dataLabel({v:isNaN(a.value/ye(o))?0:a.value/ye(o)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(a){return a.proportion*100>t.value.donutHideLabelUnderPercentage}function r(a,o){const g=Y.value.dataset.find((L,z)=>`donut_${z}`===a).VALUE;return Math.abs(String(Number(g.toFixed(0))).length-String(Number(o.toFixed(0))).length)}function i({datapoint:a,seriesIndex:o}){H.value={datapoint:a,seriesIndex:o,config:t.value,dataset:n},F.value=a.id;const g=t.value.tooltipCustomFormat;if(u.isFunction(g)&&u.functionReturnsString(()=>g({datapoint:a,seriesIndex:o,series:n,config:t.value})))T.value=g({datapoint:a,seriesIndex:o,series:n,config:t.value});else{let p="";p+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`,p+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${a.color}"/></svg>`,p+=`<b>${u.applyDataLabel(t.value.formatter,a.value,u.dataLabel({p:t.value.valuePrefix,v:a.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:a,seriesIndex:o})}</b>`,p+=`<span>(${u.dataLabel({v:a.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,T.value=`<div>${p}</div>`}P.value=!0}function m(){P.value=!1,F.value=null,I.value=null}const _={centerX:y.value.width/2,centerY:y.value.height/2},C=n.filter(a=>!x.value.includes(a.id)).map(a=>a.value||0).reduce((a,o)=>a+o,0),W=n.map((a,o)=>({...a,proportion:(a.value||0)/C,value:a.value||0,absoluteValue:Y.value.dataset.find((g,p)=>`donut_${p}`===a.id).VALUE})),R=y.value.width/2,j=y.value.height/2,O=y.value.height*t.value.donutRadiusRatio;return{dataset:W.filter(a=>!x.value.includes(a.id)),legend:W,drawingArea:_,displayArcPercentage:s,isArcBigEnough:l,useTooltip:i,killTooltip:m,getSpaces:r,total:C,cx:R,cy:j,radius:O,chart:u.makeDonut({series:n.filter(a=>!x.value.includes(a.id))},R,j,O,O,1.99999,2,1,360,105.25,y.value.height*Be.value)}}),k=e.ref({start:0,end:h.value.maxSeriesLength});function Oe(){we()}const q=e.ref(null);async function we(){(t.value.zoomStartIndex!==null||t.value.zoomEndIndex!==null)&&q.value?(t.value.zoomStartIndex!==null&&(await e.nextTick(),await e.nextTick(),q.value&&q.value.setStartValue(t.value.zoomStartIndex)),t.value.zoomEndIndex!==null&&(await e.nextTick(),await e.nextTick(),q.value&&q.value.setEndValue(De(t.value.zoomEndIndex+1)))):(k.value={start:0,end:h.value.maxSeriesLength},ee.value+=1)}function De(n){const s=h.value.maxSeriesLength;return n>s?s:n<0||t.value.zoomStartIndex!==null&&n<t.value.zoomStartIndex?t.value.zoomStartIndex!==null?t.value.zoomStartIndex+1:1:n}const Me=e.computed(()=>{if(!t.value.zoomMinimap.show||B.value===S.DONUT)return[];let n=[];$(h.value.dataset)&&(n=h.value.dataset),se(h.value.dataset)&&(n=h.value.dataset.map((i,m)=>({values:i.VALUE||i.DATA||i.SERIE||i.SERIES||i.VALUES||i.NUM||0,id:B.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(i=>!x.value.includes(i.id)));const s=$(n)?n.length:Math.max(...n.map(i=>i.values.length));let l=[];if($(n))l=n;else for(let i=0;i<s;i+=1)l.push(n.map(m=>m.values[i]||0).reduce((m,_)=>(m||0)+(_||0),0));const r=Math.min(...l);return l.map(i=>i+(r<0?Math.abs(r):0))}),v=e.computed(()=>{if(B.value!==S.LINE)return null;const n={height:y.value.height,width:y.value.width},s={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:n.width-t.value.xyPaddingRight,bottom:n.height-t.value.xyPaddingBottom,width:n.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:n.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];$(h.value.dataset)&&(l=[{values:h.value.dataset.slice(k.value.start,k.value.end),absoluteIndices:h.value.dataset.map((a,o)=>o).slice(k.value.start,k.value.end),name:t.value.title,color:X.value[t.value.paletteStartIndex]||u.palette[t.value.paletteStartIndex],id:"line_0"}]),se(h.value.dataset)&&(l=h.value.dataset.map((a,o)=>({...a,values:a.VALUE||a.DATA||a.SERIE||a.SERIES||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`line_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):X.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],values:a.values.slice(k.value.start,k.value.end),absoluteIndices:a.values.map((g,p)=>p).slice(k.value.start,k.value.end)})));const r={max:Math.max(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),min:Math.min(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),maxSeries:Math.max(...l.map(a=>a.values.length))},i=u.calculateNiceScale(r.min<0?r.min:0,r.max<0?0:r.max,t.value.xyScaleSegments),m=r.min<0?Math.abs(r.min):0,_=r.max<0?s.top:s.bottom-m/(i.max+m)*s.height,C=s.width/r.maxSeries,W=i.ticks.map(a=>({y:s.bottom-s.height*((a+m)/(i.max+m)),x:s.left-8,value:a})),R=l.map((a,o)=>({...a,coordinates:a.values.map((g,p)=>({x:s.left+C*(p+1)-C/2,y:s.bottom-(g+m)/(i.max+m)*s.height,value:g}))})).map(a=>{let o=[];return a.coordinates.forEach(g=>{o.push(`${g.x},${g.y} `)}),{...a,linePath:o.join(" ")}});function j(a){F.value=a,I.value=a;const o=l.map(p=>({...p,value:p.values[a],absoluteIndex:p.absoluteIndices[a]})).filter(p=>!x.value.includes(p.id));H.value={datapoint:o,seriesIndex:a,config:t.value,dataset:l};const g=t.value.tooltipCustomFormat;if(u.isFunction(g)&&u.functionReturnsString(()=>g({datapoint:o,seriesIndex:a,series:l,config:t.value})))T.value=g({datapoint:o,seriesIndex:a,series:l,config:t.value});else{let p="";t.value.xyPeriods[o[0].absoluteIndex]&&(p+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[o[0].absoluteIndex]}</div>`),o.forEach((L,z)=>{p+=`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BHQZE19X.cjs"),Ae=require("./useResponsive-BJ7DTGpm.cjs"),ue=require("./BaseIcon-2ZD3jgGz.cjs"),qe=require("./Tooltip-DjCKBAC4.cjs"),Le=require("./usePrinter-DVgxBO4o.cjs"),We=require("./Slicer-yEeqKUDF.cjs"),je=require("./vue-ui-skeleton-DUNkS05l.cjs"),_e=require("./useNestedProp-CwpqC_aE.cjs"),Ge=require("./PackageVersion-rnWHRWGI.cjs"),He=require("./PenAndPaper-BQl9-uX0.cjs"),Xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},Ye=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function Ze({dataset:c,barLineSwitch:w=6}){let f=null,b=null,N=0;if((typeof c=="number"||typeof c=="string")&&console.warn(`The provided dataset (${c}) is not sufficient to build a chart`),K(c)&&($(c)&&(c.length<w?f=S.BAR:f=S.LINE,b=c,N=c.length),se(c))){if(!Qe(c))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const U=Object.keys(c[0]),G=Object.values(c[0]);if(!U.some(A=>Ke(A)))return console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."),!1;ze(G,A=>typeof A=="number")&&(f=S.DONUT,b=c),ze(G,A=>Array.isArray(A)&&$(A))&&(Ce(c)>w?f=S.LINE:f=S.BAR,N=Ce(c),b=c.map(A=>({...A,data:et(A,P=>$(P))}))),c=c.map(A=>Ne(A)),b=b.map(A=>Ne(A))}return K(c)&&[...new Set(c.flatMap(U=>Array.isArray(U)))][0],{dataset:c,type:f,usableDataset:b,maxSeriesLength:N}}function Ve(c){return!c||K(c)&&!c.length}function K(c){return Array.isArray(c)}function $(c){if(!K(c)||Ve(c))return!1;const w=c.map(f=>Number(f));return![...new Set(w.flatMap(f=>typeof f=="number"&&!isNaN(f)))].includes(!1)}function se(c){return!K(c)||Ve(c)||!![...new Set(c.flatMap(f=>typeof f=="object"&&!Array.isArray(f)))].includes(!1)?!1:!c.map(f=>Object.keys(f).length>0).includes(!1)}function Je(c,w){const f=Object.keys(c).sort(),b=Object.keys(w).sort();if(f.length!==b.length)return!1;for(let N=0;N<f.length;N+=1){const V=f[N],M=b[N];if(V!==M||typeof c[V]!=typeof w[M])return!1}return!0}function Qe(c){if(c.length<=1)return!0;for(let w=0;w<c.length;w+=1)for(let f=w+1;f<c.length;f+=1)if(!Je(c[w],c[f]))return!1;return!0}function Ke(c){return Ye.includes(c.toUpperCase())}function ze(c,w){let f=[];for(let b=0;b<c.length;b+=1)f.push(w(c[b]));return f.includes(!0)}function Ce(c){return Math.max(...[...c].flatMap(w=>Object.values(w).filter(f=>$(f)).map(f=>f.length)))}function et(c,w){return Object.values(c).filter(f=>w(f))[0]}function Ne(c){const w={};for(let f in c)c.hasOwnProperty(f)&&(w[f.toUpperCase()]=c[f]);return w}const Fe=c=>(e.pushScopeId("data-v-7c8df607"),c=c(),e.popScopeId(),c),tt=["id"],lt=["xmlns","viewBox"],at=["id"],ot=["id"],nt=Fe(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),rt=["id"],it=["flood-color"],ut={key:0,class:"donut-label-connectors"},st=["d","stroke","stroke-width","filter"],ct=["cx","cy","r","fill","filter"],dt={class:"donut"},vt=["d","fill","stroke","stroke-width","filter"],mt=["d","onMouseenter","onClick"],ft={key:1,class:"donut-labels quick-animation"},ht=["cx","cy","fill","stroke","filter"],pt=["text-anchor","x","y","fill","font-size","filter"],kt=["text-anchor","x","y","fill","font-size","filter"],gt={key:2,class:"donut-hollow quick-animation"},yt=["x","y","font-size","fill"],xt=["x","y","font-size","fill"],St={key:0,class:"line-grid"},bt=["x1","x2","y1","y2","stroke","stroke-width"],Bt=["x1","x2","y1","y2","stroke","stroke-width"],wt={key:1,class:"line-axis"},Et=["x1","x2","y1","y2","stroke","stroke-width"],At=["x1","x2","y1","y2","stroke","stroke-width"],Lt={key:2,class:"yLabels"},_t=["x1","x2","y1","y2","stroke","stroke-width"],zt=["x","y","font-size","fill"],Ct={key:3,class:"periodLabels"},Nt=["x1","x2","y1","y2","stroke","stroke-width"],Vt=["font-size","text-anchor","fill","transform"],Ft={class:"plots"},Pt={class:"line-plot-series"},$t=["d","stroke","stroke-width"],It=["d","stroke","stroke-width"],Tt=["d","stroke","stroke-width"],Rt=["d","stroke","stroke-width"],Ot=["cx","cy","fill","stroke"],Dt={key:4,class:"dataLabels"},Mt=["font-size","fill","x","y"],Ut={class:"tooltip-traps"},qt=["x","y","height","width","fill","onMouseenter","onClick"],Wt={key:0,class:"line-grid"},jt=["x1","x2","y1","y2","stroke","stroke-width"],Gt=["x1","x2","y1","y2","stroke","stroke-width"],Ht={key:1,class:"line-axis"},Xt=["x1","x2","y1","y2","stroke","stroke-width"],Yt=["x1","x2","y1","y2","stroke","stroke-width"],Zt={key:2,class:"yLabels"},Jt=["x1","x2","y1","y2","stroke","stroke-width"],Qt=["x","y","font-size","fill"],Kt={key:3,class:"periodLabels"},el=["x1","x2","y1","y2","stroke","stroke-width"],tl=["font-size","text-anchor","transform","fill"],ll={class:"plots"},al=["x","width","height","y","fill","stroke","stroke-width"],ol=["to"],nl=["from","to"],rl={key:4,class:"dataLabels"},il=["x","y","font-size","fill"],ul={class:"tooltip-traps"},sl=["x","y","height","width","fill","onMouseenter","onClick"],cl={key:3,class:"axis-labels"},dl={key:0},vl=["font-size","fill","x","y"],ml={key:1},fl=["font-size","fill","x","y"],hl={key:2},pl=["font-size","fill","transform"],kl={key:3},gl=["font-size","fill","transform"],yl={key:6,class:"vue-data-ui-watermark"},xl=["onClick"],Sl=["onClick"],bl=["onClick"],Bl={key:1,class:"vue-ui-quick-chart-not-processable"},wl=Fe(()=>e.createElementVNode("span",null,"Dataset is not processable",-1)),El={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(c,{expose:w,emit:f}){const b=c,{vue_ui_quick_chart:N}=u.useConfig(),V=e.ref(null),M=e.ref(null),U=e.ref(null),G=e.ref(null),A=e.ref(u.createUid()),P=e.ref(!1),H=e.ref(null),T=e.ref(""),F=e.ref(null),ve=e.ref(null),me=e.ref(null),x=e.ref([]),fe=e.ref(0),ee=e.ref(0),t=e.computed({get:()=>he(),set:n=>n});function he(){const n=_e.useNestedProp({userConfig:b.config,defaultConfig:N});let s={};return n.theme?s={..._e.useNestedProp({userConfig:u.themes.vue_ui_quick_chart[n.theme]||b.config,defaultConfig:n}),customPalette:u.themePalettes[n.theme]||u.palette}:s=n,b.config&&u.hasDeepProperty(b.config,"zoomStartIndex")?s.zoomStartIndex=b.config.zoomStartIndex:s.zoomStartIndex=null,b.config&&u.hasDeepProperty(b.config,"zoomEndIndex")?s.zoomEndIndex=b.config.zoomEndIndex:s.zoomEndIndex=null,s}e.watch(()=>b.config,n=>{t.value=he(),y.value.width=t.value.width,y.value.height=t.value.height,ge()},{deep:!0}),e.watch(()=>b.dataset,n=>{h.value=Y.value,k.value.start=0,k.value.end=h.value.maxSeriesLength,ee.value+=1},{deep:!0});const X=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),Y=e.computed(()=>{const n=Ze({dataset:u.sanitizeArray(b.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return n||console.error("VueUiQuickChart : Dataset is not processable"),n}),h=e.ref(Y.value),Pe=e.computed(()=>!!h.value),B=e.computed(()=>h.value?h.value.type:null);e.watch(()=>B.value,n=>{n||u.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:te,isImaging:le,generatePdf:pe,generateImage:ke}=Le.usePrinter({elementId:`${B.value}_${A.value}`,fileName:t.value.title||B.value}),$e=e.computed(()=>t.value.showUserOptions&&!t.value.title),y=e.ref({width:t.value.width,height:t.value.height}),ae=e.ref({showTooltip:t.value.showTooltip}),oe=e.ref(null);e.onMounted(()=>{ge()});function ge(){if(t.value.responsive){const n=Ae.throttle(()=>{const{width:s,height:l}=Ae.useResponsive({chart:V.value,title:t.value.title?M.value:null,legend:t.value.showLegend?U.value:null,slicer:[S.BAR,S.LINE].includes(B.value)&&t.value.zoomXy&&h.value.maxSeriesLength>1?G.value:null,source:ve.value,noTitle:me.value});y.value.width=s,y.value.height=l});oe.value=new ResizeObserver(n),oe.value.observe(V.value.parentNode)}we()}e.onBeforeUnmount(()=>{oe.value&&oe.value.disconnect()});const Ie=e.computed(()=>{switch(B.value){case S.LINE:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;case S.BAR:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;case S.DONUT:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;default:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`}});function ye(n){return[...n].map(s=>s.value).reduce((s,l)=>s+l,0)}function Z(n){return t.value.blurOnHover&&![null,void 0].includes(F.value)&&F.value!==n?`url(#blur_${A.value})`:""}function xe(n,s){x.value.includes(n)?x.value=x.value.filter(l=>l!==n):x.value.length<s&&x.value.push(n)}const Se=e.ref(null),be=e.ref(null),ne=e.ref(!1);function Te(n,s){ne.value=!0;let l=n.value;if(x.value.includes(n.id)){let i=function(){l>r?(ne.value=!1,cancelAnimationFrame(be.value),h.value={...h.value,dataset:h.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:r,VALUE:r}:m)}):(l+=r*.025,h.value={...h.value,dataset:h.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:l,VALUE:l}:m)},be.value=requestAnimationFrame(i))};x.value=x.value.filter(m=>m!==n.id);const r=Y.value.dataset.find((m,_)=>n.id===`donut_${_}`).VALUE;i()}else if(s.length>1){let r=function(){l<.1?(ne.value=!1,cancelAnimationFrame(Se.value),x.value.push(n.id),h.value={...h.value,dataset:h.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:0,VALUE:0}:i)}):(l/=1.1,h.value={...h.value,dataset:h.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:l,VALUE:l}:i)},Se.value=requestAnimationFrame(r))};r()}}const I=e.ref(null);function Re(n){I.value=n}const Be=e.computed(()=>t.value.donutThicknessRatio<.15?.15:t.value.donutThicknessRatio>.4?.4:t.value.donutThicknessRatio),E=e.computed(()=>{if(B.value!==S.DONUT)return null;const n=h.value.dataset.map((a,o)=>({...a,value:a.VALUE||a.DATA||a.SERIE||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`donut_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):X.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],immutableValue:a.value}));function s(a,o){return u.dataLabel({v:isNaN(a.value/ye(o))?0:a.value/ye(o)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(a){return a.proportion*100>t.value.donutHideLabelUnderPercentage}function r(a,o){const g=Y.value.dataset.find((L,z)=>`donut_${z}`===a).VALUE;return Math.abs(String(Number(g.toFixed(0))).length-String(Number(o.toFixed(0))).length)}function i({datapoint:a,seriesIndex:o}){H.value={datapoint:a,seriesIndex:o,config:t.value,dataset:n},F.value=a.id;const g=t.value.tooltipCustomFormat;if(u.isFunction(g)&&u.functionReturnsString(()=>g({datapoint:a,seriesIndex:o,series:n,config:t.value})))T.value=g({datapoint:a,seriesIndex:o,series:n,config:t.value});else{let p="";p+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`,p+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${a.color}"/></svg>`,p+=`<b>${u.applyDataLabel(t.value.formatter,a.value,u.dataLabel({p:t.value.valuePrefix,v:a.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:a,seriesIndex:o})}</b>`,p+=`<span>(${u.dataLabel({v:a.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,T.value=`<div>${p}</div>`}P.value=!0}function m(){P.value=!1,F.value=null,I.value=null}const _={centerX:y.value.width/2,centerY:y.value.height/2},C=n.filter(a=>!x.value.includes(a.id)).map(a=>a.value||0).reduce((a,o)=>a+o,0),W=n.map((a,o)=>({...a,proportion:(a.value||0)/C,value:a.value||0,absoluteValue:Y.value.dataset.find((g,p)=>`donut_${p}`===a.id).VALUE})),R=y.value.width/2,j=y.value.height/2,O=y.value.height*t.value.donutRadiusRatio;return{dataset:W.filter(a=>!x.value.includes(a.id)),legend:W,drawingArea:_,displayArcPercentage:s,isArcBigEnough:l,useTooltip:i,killTooltip:m,getSpaces:r,total:C,cx:R,cy:j,radius:O,chart:u.makeDonut({series:n.filter(a=>!x.value.includes(a.id))},R,j,O,O,1.99999,2,1,360,105.25,y.value.height*Be.value)}}),k=e.ref({start:0,end:h.value.maxSeriesLength});function Oe(){we()}const q=e.ref(null);async function we(){(t.value.zoomStartIndex!==null||t.value.zoomEndIndex!==null)&&q.value?(t.value.zoomStartIndex!==null&&(await e.nextTick(),await e.nextTick(),q.value&&q.value.setStartValue(t.value.zoomStartIndex)),t.value.zoomEndIndex!==null&&(await e.nextTick(),await e.nextTick(),q.value&&q.value.setEndValue(De(t.value.zoomEndIndex+1)))):(k.value={start:0,end:h.value.maxSeriesLength},ee.value+=1)}function De(n){const s=h.value.maxSeriesLength;return n>s?s:n<0||t.value.zoomStartIndex!==null&&n<t.value.zoomStartIndex?t.value.zoomStartIndex!==null?t.value.zoomStartIndex+1:1:n}const Me=e.computed(()=>{if(!t.value.zoomMinimap.show||B.value===S.DONUT)return[];let n=[];$(h.value.dataset)&&(n=h.value.dataset),se(h.value.dataset)&&(n=h.value.dataset.map((i,m)=>({values:i.VALUE||i.DATA||i.SERIE||i.SERIES||i.VALUES||i.NUM||0,id:B.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(i=>!x.value.includes(i.id)));const s=$(n)?n.length:Math.max(...n.map(i=>i.values.length));let l=[];if($(n))l=n;else for(let i=0;i<s;i+=1)l.push(n.map(m=>m.values[i]||0).reduce((m,_)=>(m||0)+(_||0),0));const r=Math.min(...l);return l.map(i=>i+(r<0?Math.abs(r):0))}),v=e.computed(()=>{if(B.value!==S.LINE)return null;const n={height:y.value.height,width:y.value.width},s={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:n.width-t.value.xyPaddingRight,bottom:n.height-t.value.xyPaddingBottom,width:n.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:n.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];$(h.value.dataset)&&(l=[{values:h.value.dataset.slice(k.value.start,k.value.end),absoluteIndices:h.value.dataset.map((a,o)=>o).slice(k.value.start,k.value.end),name:t.value.title,color:X.value[t.value.paletteStartIndex]||u.palette[t.value.paletteStartIndex],id:"line_0"}]),se(h.value.dataset)&&(l=h.value.dataset.map((a,o)=>({...a,values:a.VALUE||a.DATA||a.SERIE||a.SERIES||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`line_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):X.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],values:a.values.slice(k.value.start,k.value.end),absoluteIndices:a.values.map((g,p)=>p).slice(k.value.start,k.value.end)})));const r={max:Math.max(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),min:Math.min(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),maxSeries:Math.max(...l.map(a=>a.values.length))},i=u.calculateNiceScale(r.min<0?r.min:0,r.max<0?0:r.max,t.value.xyScaleSegments),m=r.min<0?Math.abs(r.min):0,_=r.max<0?s.top:s.bottom-m/(i.max+m)*s.height,C=s.width/r.maxSeries,W=i.ticks.map(a=>({y:s.bottom-s.height*((a+m)/(i.max+m)),x:s.left-8,value:a})),R=l.map((a,o)=>({...a,coordinates:a.values.map((g,p)=>({x:s.left+C*(p+1)-C/2,y:s.bottom-(g+m)/(i.max+m)*s.height,value:g}))})).map(a=>{let o=[];return a.coordinates.forEach(g=>{o.push(`${g.x},${g.y} `)}),{...a,linePath:o.join(" ")}});function j(a){F.value=a,I.value=a;const o=l.map(p=>({...p,value:p.values[a],absoluteIndex:p.absoluteIndices[a]})).filter(p=>!x.value.includes(p.id));H.value={datapoint:o,seriesIndex:a,config:t.value,dataset:l};const g=t.value.tooltipCustomFormat;if(u.isFunction(g)&&u.functionReturnsString(()=>g({datapoint:o,seriesIndex:a,series:l,config:t.value})))T.value=g({datapoint:o,seriesIndex:a,series:l,config:t.value});else{let p="";t.value.xyPeriods[o[0].absoluteIndex]&&(p+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[o[0].absoluteIndex]}</div>`),o.forEach((L,z)=>{p+=`
|
|
2
2
|
<div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
|
|
3
3
|
<svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${L.color}"/></svg>
|
|
4
4
|
<span>${L.name}:</span>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ref as L, computed as D, watch as Oe, onMounted as xt, onBeforeUnmount as yt, nextTick as $e, openBlock as a, createElementBlock as l, normalizeClass as re, normalizeStyle as N, createBlock as Ce, createCommentVNode as f, unref as g, createSlots as kt, withCtx as Q, renderSlot as M, normalizeProps as H, guardReactiveProps as se, toDisplayString as R, createVNode as ve, createElementVNode as A, Fragment as p, renderList as z, mergeProps as Ne, pushScopeId as St, popScopeId as bt } from "vue";
|
|
2
|
-
import { u as wt, c as At, t as _t, a as zt, p as V, C as et, b as Lt, J as $t, e as Ct, d as Fe, m as It, D as tt, X as Et, j as Pt, k as xe, n as Me, i as X, f as B, R as at, v as Z, x as Ie, y as Be } from "./index-
|
|
2
|
+
import { u as wt, c as At, t as _t, a as zt, p as V, C as et, b as Lt, J as $t, e as Ct, d as Fe, m as It, D as tt, X as Et, j as Pt, k as xe, n as Me, i as X, f as B, R as at, v as Z, x as Ie, y as Be } from "./index-igxqCP2w.js";
|
|
3
3
|
import { t as Tt, u as Rt } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import Ee from "./BaseIcon-
|
|
5
|
-
import { _ as Ot } from "./Tooltip-
|
|
6
|
-
import { u as Nt, U as Ft } from "./usePrinter-
|
|
7
|
-
import { S as Mt } from "./Slicer-
|
|
8
|
-
import Bt from "./vue-ui-skeleton-
|
|
9
|
-
import { u as lt } from "./useNestedProp-
|
|
10
|
-
import { _ as Ut } from "./PackageVersion-
|
|
11
|
-
import { P as Dt } from "./PenAndPaper-
|
|
4
|
+
import Ee from "./BaseIcon-CaYP30Aq.js";
|
|
5
|
+
import { _ as Ot } from "./Tooltip-CHseiJu8.js";
|
|
6
|
+
import { u as Nt, U as Ft } from "./usePrinter-CnZYDQXB.js";
|
|
7
|
+
import { S as Mt } from "./Slicer-DlgqsI5C.js";
|
|
8
|
+
import Bt from "./vue-ui-skeleton-CWjNNx-k.js";
|
|
9
|
+
import { u as lt } from "./useNestedProp-CSVnZVwZ.js";
|
|
10
|
+
import { _ as Ut } from "./PackageVersion-DYk2hOG1.js";
|
|
11
|
+
import { P as Dt } from "./PenAndPaper-BfgS_5ux.js";
|
|
12
12
|
import { _ as Vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const _ = {
|
|
14
14
|
LINE: "LINE",
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { computed as v, ref as u, watch as Ge, onMounted as We, onBeforeUnmount as Xe, openBlock as r, createElementBlock as s, normalizeClass as z, normalizeStyle as Q, createBlock as w, createCommentVNode as p, unref as g, createSlots as Ye, withCtx as y, renderSlot as m, normalizeProps as R, guardReactiveProps as M, createVNode as Z, createElementVNode as $, Fragment as P, renderList as T, toDisplayString as V, createTextVNode as we, nextTick as je } from "vue";
|
|
2
|
-
import { u as qe, c as He, t as Je, a as Ke, p as x, o as Qe, e as S, b as Ze, g as $e, d as Pe, O as Te, v as et, i as xe, f as U, X as tt, s as ee, w as at, P as Ae, x as ot, y as lt, q as rt, r as nt } from "./index-
|
|
2
|
+
import { u as qe, c as He, t as Je, a as Ke, p as x, o as Qe, e as S, b as Ze, g as $e, d as Pe, O as Te, v as et, i as xe, f as U, X as tt, s as ee, w as at, P as Ae, x as ot, y as lt, q as rt, r as nt } from "./index-igxqCP2w.js";
|
|
3
3
|
import { t as st, u as ut } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as it } from "./Title-
|
|
5
|
-
import { u as ct, U as dt } from "./usePrinter-
|
|
6
|
-
import { _ as vt } from "./Tooltip-
|
|
7
|
-
import pt from "./vue-ui-sparkbar-
|
|
8
|
-
import { L as ht } from "./Legend-
|
|
9
|
-
import { D as gt } from "./DataTable-
|
|
10
|
-
import ft from "./vue-ui-skeleton-
|
|
11
|
-
import yt from "./vue-ui-accordion-
|
|
12
|
-
import { u as Oe } from "./useNestedProp-
|
|
13
|
-
import { _ as mt } from "./PackageVersion-
|
|
14
|
-
import { P as bt } from "./PenAndPaper-
|
|
4
|
+
import { _ as it } from "./Title-DED-PQ7X.js";
|
|
5
|
+
import { u as ct, U as dt } from "./usePrinter-CnZYDQXB.js";
|
|
6
|
+
import { _ as vt } from "./Tooltip-CHseiJu8.js";
|
|
7
|
+
import pt from "./vue-ui-sparkbar-CPF7YNDd.js";
|
|
8
|
+
import { L as ht } from "./Legend-FZN9UHoI.js";
|
|
9
|
+
import { D as gt } from "./DataTable-CO5C8Cmb.js";
|
|
10
|
+
import ft from "./vue-ui-skeleton-CWjNNx-k.js";
|
|
11
|
+
import yt from "./vue-ui-accordion-lF7yVkiT.js";
|
|
12
|
+
import { u as Oe } from "./useNestedProp-CSVnZVwZ.js";
|
|
13
|
+
import { _ as mt } from "./PackageVersion-DYk2hOG1.js";
|
|
14
|
+
import { P as bt } from "./PenAndPaper-BfgS_5ux.js";
|
|
15
15
|
import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
const Ct = ["id"], _t = ["xmlns", "viewBox"], wt = ["id"], $t = ["stop-color"], Pt = ["stop-color"], Tt = { key: 0 }, xt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], At = { key: 0 }, Ot = ["d", "stroke", "stroke-width"], Nt = ["d", "stroke", "stroke-width"], Ft = { key: 1 }, St = ["x", "y", "text-anchor", "font-size", "fill", "onMouseenter"], It = ["points", "stroke", "stroke-width"], Lt = ["points", "stroke", "stroke-width", "fill"], zt = { key: 2 }, Rt = ["cx", "cy", "fill", "r", "stroke"], Mt = {
|
|
17
17
|
key: 5,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DOkp6I9s.cjs"),ae=require("./useResponsive-BJ7DTGpm.cjs"),ke=require("./Title-CbiI2XAK.cjs"),le=require("./usePrinter-Hc-LICQf.cjs"),be=require("./Tooltip-CXWymtVK.cjs"),Ce=require("./vue-ui-sparkbar-Bx-gf5Hz.cjs"),we=require("./Legend-DyQhpUa7.cjs"),Be=require("./DataTable-UQDVIoTq.cjs"),_e=require("./vue-ui-skeleton-G8jk4hcj.cjs"),Pe=require("./vue-ui-accordion-C8xohumC.cjs"),re=require("./useNestedProp-BEjpLG7g.cjs"),$e=require("./PackageVersion-JL2H1ZNU.cjs"),xe=require("./PenAndPaper-Bmfl9PVt.cjs"),Ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["id"],Se=["xmlns","viewBox"],Ee=["id"],Ve=["stop-color"],Ae=["stop-color"],Oe={key:0},Fe=["x1","y1","x2","y2","stroke","stroke-width"],Le={key:0},ze=["d","stroke","stroke-width"],Ie=["d","stroke","stroke-width"],Re={key:1},qe=["x","y","text-anchor","font-size","fill","onMouseenter"],De=["points","stroke","stroke-width"],Me=["points","stroke","stroke-width","fill"],Ue={key:2},Ge=["cx","cy","fill","r","stroke"],We={key:5,class:"vue-data-ui-watermark"},He=["onClick"],Xe={key:0,style:{"max-width":"200px",margin:"0 auto"}},je={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ne,{expose:ue,emit:se}){const d=ne,{vue_ui_radar:ie}=n.useConfig(),C=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),ce=e.ref(null),x=e.ref(!1),N=e.ref(""),F=e.ref(0),f=e.ref(null),L=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(0),D=e.ref(0),M=e.ref(0),t=e.computed({get:()=>U(),set:o=>o});function U(){const o=re.useNestedProp({userConfig:d.config,defaultConfig:ie});return o.theme?{...re.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=U(),G(),q.value+=1,D.value+=1,M.value+=1},{deep:!0});const B=e.ref(null);function G(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=ae.throttle(()=>{const{width:a,height:l}=ae.useResponsive({chart:f.value,title:t.value.style.chart.title.text?L.value:null,legend:t.value.style.chart.legend.show?z.value:null,source:I.value,noTitle:R.value});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(f.value.parentNode)}}e.onMounted(()=>{G()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:W,isImaging:H,generatePdf:X,generateImage:j}=le.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),de=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Y=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),g=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),ve=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),s=e.ref({height:312,width:512}),i=e.ref([]),w=e.ref(null),y=e.ref(!1);function J(o){y.value=!0,i.value.includes(o)?(w.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{y.value=!1,w.value=null},500)):(i.value.push(o),setTimeout(()=>{y.value=!1},500)),se("selectLegend",k.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function pe(){return k.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${m.value}_${a}`,color:n.convertColorToHex(o.color)||Y.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>C.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Y.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`,formatter:o.formatter||null})):[]),K=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),Q=e.computed(()=>p.value.length),T=e.computed(()=>Math.min(s.value.width,s.value.height)/3),Z=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:T.value,sides:Q.value,rotation:0})),ge=e.computed(()=>{const o=[];for(let a=0;a<T.value;a+=T.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),h=e.computed(()=>Z.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>he({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||K.value)}));return{...o,...p.value[a],plots:l}}));function S({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>s.value.width/2&&(o+=12,l="start"),o<s.value.width/2&&(o-=12,l="end"),a>s.value.height/2&&(a+=20),a<s.value.height/2&&(a-=12),a===s.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function he({centerX:o,centerY:a,apexX:l,apexY:r,proportion:u}){return{x:o+(l-o)*u,y:a+(r-a)*u}}const k=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||K.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>J(l),isSegregated:i.value.includes(l)}))}),me=e.computed(()=>({cy:"radar-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":""})),_=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...k.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((u,c)=>`${n.applyDataLabel(r.formatter,u,n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(u/r.target)?"":n.dataLabel({v:u/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={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};return{head:o,body:a,config:l,colNames:o}}),P=e.ref(null),E=e.ref([]),V=e.ref(null);function fe(o,a){E.value=[],P.value=a,x.value=!0;let l="";V.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let u=0;u<o.values.length;u+=1)i.value.includes(u)||E.value.push({name:v.value[u].name,value:o.values[u]/o.target*100,color:v.value[u].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[u].prefix??"",v:o.values[u],s:v.value[u].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function ee(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...k.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,Je)=>[c.name,c.target,...c.values.flatMap(O=>[O,isNaN(O/c.target)?"":O/c.target*100])]),r=o.concat([a]).concat(l),u=n.createCsvContent(r);n.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const b=e.ref(!1);function ye(o){b.value=o,F.value+=1}function te(){g.value.showTable=!g.value.showTable}function oe(){g.value.showTooltip=!g.value.showTooltip}const $=e.ref(!1);function A(){$.value=!$.value}return ue({getData:pe,generatePdf:X,generateCsv:ee,generateImage:j,toggleTable:te,toggleTooltip:oe,toggleAnnotator:A}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:f,id:`vue-ui-radar_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(xe.PenAndPaper,{key:0,parent:f.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:A},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:R,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:L,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(ke._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&C.value?(e.openBlock(),e.createBlock(le.UserOptions,{ref_key:"details",ref:ce,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(H),isPrinting:e.unref(W),uid:m.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,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:f.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(X),onGenerateCsv:ee,onGenerateImage:e.unref(j),onToggleTable:te,onToggleTooltip:oe,onToggleAnnotator:A},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode($e._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ae)],8,Ee))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.width/2,y1:s.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Fe))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:s.value.width/2,y:s.value.height/2},radius:l,sides:Q.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ze))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:Z.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Ie),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:S(l).x,y:S(l).y,"text-anchor":S(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:u=>fe(l,r),onMouseleave:a[0]||(a[0]=u=>{x.value=!1,P.value=null})},e.toDisplayString(l.name),41,qe))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===r&&t.value.useCssAnimation})},null,10,De)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${m.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===r&&t.value.useCssAnimation})},null,10,Me)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(u,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:P.value!==null&&P.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===c&&t.value.useCssAnimation})},null,10,Ge))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",We,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(W)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_e.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:`legend_${M.value}`,legendSet:k.value,config:me.value,onClickMarker:a[1]||(a[1]=({i:l})=>J(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,He)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:I,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(be._sfc_main,{show:g.value.showTooltip&&x.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:f.value,content:N.value,isFullscreen:b.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...V.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(Ce.default,{dataset:E.value,config:ve.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...V.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isFullscreen","isCustom"]),C.value?(e.openBlock(),e.createBlock(Pe.default,{key:8,hideDetails:"",config:{open:g.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:e.withCtx(()=>[(e.openBlock(),e.createBlock(Be.DataTable,{key:`table_${D.value}`,colNames:_.value.colNames,head:_.value.head,body:_.value.body,config:_.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>g.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Te))}},Ye=Ne._export_sfc(je,[["__scopeId","data-v-55dc5b4a"]]);exports.default=Ye;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BHQZE19X.cjs"),ae=require("./useResponsive-BJ7DTGpm.cjs"),ke=require("./Title-5Vedk01J.cjs"),le=require("./usePrinter-DVgxBO4o.cjs"),be=require("./Tooltip-DjCKBAC4.cjs"),Ce=require("./vue-ui-sparkbar-IphZ8jXh.cjs"),we=require("./Legend-DPHcmrzd.cjs"),Be=require("./DataTable-kMUhutQ4.cjs"),_e=require("./vue-ui-skeleton-DUNkS05l.cjs"),Pe=require("./vue-ui-accordion-CRVWlHxs.cjs"),re=require("./useNestedProp-CwpqC_aE.cjs"),$e=require("./PackageVersion-rnWHRWGI.cjs"),xe=require("./PenAndPaper-BQl9-uX0.cjs"),Ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["id"],Se=["xmlns","viewBox"],Ee=["id"],Ve=["stop-color"],Ae=["stop-color"],Oe={key:0},Fe=["x1","y1","x2","y2","stroke","stroke-width"],Le={key:0},ze=["d","stroke","stroke-width"],Ie=["d","stroke","stroke-width"],Re={key:1},qe=["x","y","text-anchor","font-size","fill","onMouseenter"],De=["points","stroke","stroke-width"],Me=["points","stroke","stroke-width","fill"],Ue={key:2},Ge=["cx","cy","fill","r","stroke"],We={key:5,class:"vue-data-ui-watermark"},He=["onClick"],Xe={key:0,style:{"max-width":"200px",margin:"0 auto"}},je={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ne,{expose:ue,emit:se}){const d=ne,{vue_ui_radar:ie}=n.useConfig(),C=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),ce=e.ref(null),x=e.ref(!1),N=e.ref(""),F=e.ref(0),f=e.ref(null),L=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(0),D=e.ref(0),M=e.ref(0),t=e.computed({get:()=>U(),set:o=>o});function U(){const o=re.useNestedProp({userConfig:d.config,defaultConfig:ie});return o.theme?{...re.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=U(),G(),q.value+=1,D.value+=1,M.value+=1},{deep:!0});const B=e.ref(null);function G(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=ae.throttle(()=>{const{width:a,height:l}=ae.useResponsive({chart:f.value,title:t.value.style.chart.title.text?L.value:null,legend:t.value.style.chart.legend.show?z.value:null,source:I.value,noTitle:R.value});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(f.value.parentNode)}}e.onMounted(()=>{G()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:W,isImaging:H,generatePdf:X,generateImage:j}=le.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),de=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Y=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),g=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),ve=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),s=e.ref({height:312,width:512}),i=e.ref([]),w=e.ref(null),y=e.ref(!1);function J(o){y.value=!0,i.value.includes(o)?(w.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{y.value=!1,w.value=null},500)):(i.value.push(o),setTimeout(()=>{y.value=!1},500)),se("selectLegend",k.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function pe(){return k.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${m.value}_${a}`,color:n.convertColorToHex(o.color)||Y.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>C.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Y.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`,formatter:o.formatter||null})):[]),K=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),Q=e.computed(()=>p.value.length),T=e.computed(()=>Math.min(s.value.width,s.value.height)/3),Z=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:T.value,sides:Q.value,rotation:0})),ge=e.computed(()=>{const o=[];for(let a=0;a<T.value;a+=T.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),h=e.computed(()=>Z.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>he({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||K.value)}));return{...o,...p.value[a],plots:l}}));function S({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>s.value.width/2&&(o+=12,l="start"),o<s.value.width/2&&(o-=12,l="end"),a>s.value.height/2&&(a+=20),a<s.value.height/2&&(a-=12),a===s.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function he({centerX:o,centerY:a,apexX:l,apexY:r,proportion:u}){return{x:o+(l-o)*u,y:a+(r-a)*u}}const k=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||K.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>J(l),isSegregated:i.value.includes(l)}))}),me=e.computed(()=>({cy:"radar-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":""})),_=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...k.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((u,c)=>`${n.applyDataLabel(r.formatter,u,n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(u/r.target)?"":n.dataLabel({v:u/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={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};return{head:o,body:a,config:l,colNames:o}}),P=e.ref(null),E=e.ref([]),V=e.ref(null);function fe(o,a){E.value=[],P.value=a,x.value=!0;let l="";V.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let u=0;u<o.values.length;u+=1)i.value.includes(u)||E.value.push({name:v.value[u].name,value:o.values[u]/o.target*100,color:v.value[u].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[u].prefix??"",v:o.values[u],s:v.value[u].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function ee(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...k.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,Je)=>[c.name,c.target,...c.values.flatMap(O=>[O,isNaN(O/c.target)?"":O/c.target*100])]),r=o.concat([a]).concat(l),u=n.createCsvContent(r);n.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const b=e.ref(!1);function ye(o){b.value=o,F.value+=1}function te(){g.value.showTable=!g.value.showTable}function oe(){g.value.showTooltip=!g.value.showTooltip}const $=e.ref(!1);function A(){$.value=!$.value}return ue({getData:pe,generatePdf:X,generateCsv:ee,generateImage:j,toggleTable:te,toggleTooltip:oe,toggleAnnotator:A}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:f,id:`vue-ui-radar_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(xe.PenAndPaper,{key:0,parent:f.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:A},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:R,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:L,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(ke._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&C.value?(e.openBlock(),e.createBlock(le.UserOptions,{ref_key:"details",ref:ce,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(H),isPrinting:e.unref(W),uid:m.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,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:f.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(X),onGenerateCsv:ee,onGenerateImage:e.unref(j),onToggleTable:te,onToggleTooltip:oe,onToggleAnnotator:A},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode($e._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ae)],8,Ee))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.width/2,y1:s.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Fe))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:s.value.width/2,y:s.value.height/2},radius:l,sides:Q.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ze))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:Z.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Ie),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:S(l).x,y:S(l).y,"text-anchor":S(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:u=>fe(l,r),onMouseleave:a[0]||(a[0]=u=>{x.value=!1,P.value=null})},e.toDisplayString(l.name),41,qe))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===r&&t.value.useCssAnimation})},null,10,De)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${m.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===r&&t.value.useCssAnimation})},null,10,Me)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(u,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:P.value!==null&&P.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===c&&t.value.useCssAnimation})},null,10,Ge))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",We,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(W)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_e.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:`legend_${M.value}`,legendSet:k.value,config:me.value,onClickMarker:a[1]||(a[1]=({i:l})=>J(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,He)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:I,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(be._sfc_main,{show:g.value.showTooltip&&x.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:f.value,content:N.value,isFullscreen:b.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...V.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(Ce.default,{dataset:E.value,config:ve.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...V.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isFullscreen","isCustom"]),C.value?(e.openBlock(),e.createBlock(Pe.default,{key:8,hideDetails:"",config:{open:g.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:e.withCtx(()=>[(e.openBlock(),e.createBlock(Be.DataTable,{key:`table_${D.value}`,colNames:_.value.colNames,head:_.value.head,body:_.value.body,config:_.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>g.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Te))}},Ye=Ne._export_sfc(je,[["__scopeId","data-v-55dc5b4a"]]);exports.default=Ye;
|