vue-data-ui 3.8.3 → 3.8.4
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-pvqmWZAQ.js → Arrow-i6njovHV.js} +1 -1
- package/dist/{BaseDraggableDialog-BYwNgX3M.js → BaseDraggableDialog-C2wzOVzX.js} +2 -2
- package/dist/{BaseIcon-CALhpING.js → BaseIcon-_2VlkSHq.js} +1 -1
- package/dist/{ColorPicker-B_9b0REv.js → ColorPicker-Y-VfX-24.js} +2 -2
- package/dist/{DataTable-Ca1twcf7.js → DataTable-CokMin24.js} +2 -2
- package/dist/{Legend-Djkw4FGq.js → Legend-PhhPyrZ0.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DCQPVA4M.js → NonSvgPenAndPaper-ir3Z1ZAu.js} +3 -3
- package/dist/{PackageVersion-C8V4NAR4.js → PackageVersion-BuD3uLvK.js} +1 -1
- package/dist/PenAndPaper-CFRubEEG.js +402 -0
- package/dist/{Shape-BEGGcaL8.js → Shape-BuBasQnO.js} +1 -1
- package/dist/{Slicer-DaUi0o8i.js → Slicer-CVcdknEx.js} +2 -2
- package/dist/{SlicerPreview-Bk-h_ANq.js → SlicerPreview-C1EQEgYE.js} +2 -2
- package/dist/{SparkTooltip-BWdCP-h3.js → SparkTooltip-yKdo0Bx6.js} +1 -1
- package/dist/{Title-CWX8otQg.js → Title-DnykBvFl.js} +1 -1
- package/dist/{Tooltip-OHx7yHlS.js → Tooltip-l2pmtXwi.js} +1 -1
- package/dist/{UserOptions-ChRXLqps.js → UserOptions-M5A9w5GL.js} +2 -2
- package/dist/components/arrow.js +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{dom-to-png-VQEAYRVr.js → dom-to-png-CNmX1SJg.js} +1 -1
- package/dist/{img-CwrkWkkl.js → img-C5q4A7ke.js} +1 -1
- package/dist/{lib-qMPkcvmh.js → lib-_nVZfi2t.js} +29 -28
- package/dist/{pdf-BMMrFX8S.js → pdf-B7obJjyd.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +3 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-CY90KinM.js → useAutoSizeLabelsInsideViewbox-Cj4ZcFAh.js} +1 -1
- package/dist/{useNestedProp-DH2Pjkde.js → useNestedProp-CNjAKn-Z.js} +5 -1
- package/dist/{usePrinter-CjGh4mFJ.js → usePrinter-DXIMGR61.js} +2 -2
- package/dist/{vue-data-ui-D9A7BQhW.js → vue-data-ui-DXfEvcys.js} +66 -66
- package/dist/vue-data-ui.js +70 -70
- package/dist/{vue-ui-3d-bar-T2poQw5J.js → vue-ui-3d-bar-BR7AtlR0.js} +6 -6
- package/dist/{vue-ui-accordion-DiNnR-ZE.js → vue-ui-accordion-WOPRF2Tv.js} +3 -3
- package/dist/{vue-ui-age-pyramid-Bg81jLU-.js → vue-ui-age-pyramid-DUcx-5pl.js} +6 -6
- package/dist/{vue-ui-annotator-D_z1JO0m.js → vue-ui-annotator-BBgWTQxm.js} +7 -7
- package/dist/{vue-ui-bullet-Dc9_2igK.js → vue-ui-bullet-e-E8vgoK.js} +7 -7
- package/dist/{vue-ui-candlestick-MBTM2NMl.js → vue-ui-candlestick-ofOO-UZd.js} +7 -7
- package/dist/{vue-ui-carousel-table-8vsED4Wq.js → vue-ui-carousel-table-Cw9AZ6K_.js} +4 -4
- package/dist/{vue-ui-chestnut-BZXP9GIq.js → vue-ui-chestnut-BfxiZIas.js} +5 -5
- package/dist/{vue-ui-chord-BNXIEwN9.js → vue-ui-chord-BZplQ2Ah.js} +8 -8
- package/dist/{vue-ui-circle-pack-CoCeCgAp.js → vue-ui-circle-pack-65-cbeZq.js} +6 -6
- package/dist/{vue-ui-cursor-CJ3Dk0cm.js → vue-ui-cursor-CowLXeRB.js} +3 -3
- package/dist/{vue-ui-dag-Dx5iUljS.js → vue-ui-dag-Cnv5koqb.js} +7 -7
- package/dist/{vue-ui-dashboard-4XKLCy93.js → vue-ui-dashboard-CH4lfPnJ.js} +68 -68
- package/dist/{vue-ui-digits-B7rN8UWS.js → vue-ui-digits-DwsMbBDJ.js} +2 -2
- package/dist/{vue-ui-donut-evolution-DMe4W1Q1.js → vue-ui-donut-evolution-DNicvCVK.js} +8 -8
- package/dist/vue-ui-donut-gntDZdB4.js +2001 -0
- package/dist/{vue-ui-dumbbell-w_aw2ieo.js → vue-ui-dumbbell-CQIJgRxY.js} +7 -7
- package/dist/{vue-ui-flow-Cv9rVhMM.js → vue-ui-flow-BUThxO9F.js} +7 -7
- package/dist/{vue-ui-funnel-EB2hktyr.js → vue-ui-funnel-fPcBhjoP.js} +6 -6
- package/dist/{vue-ui-galaxy-3wmzP-tW.js → vue-ui-galaxy-ClBzduIz.js} +7 -7
- package/dist/{vue-ui-gauge-CsXxg1Vv.js → vue-ui-gauge-BnWsuqfT.js} +7 -7
- package/dist/{vue-ui-gizmo-Dslss4KX.js → vue-ui-gizmo-B1RWjhoX.js} +3 -3
- package/dist/{vue-ui-heatmap-BXTwWTJE.js → vue-ui-heatmap-CdGmGjGH.js} +7 -7
- package/dist/{vue-ui-history-plot-ChCZQJ-N.js → vue-ui-history-plot-CyUvc35T.js} +7 -7
- package/dist/{vue-ui-horizontal-bar-cQwDfZmn.js → vue-ui-horizontal-bar-CUwFkoh_.js} +13 -13
- package/dist/{vue-ui-kpi-B6oDMqQL.js → vue-ui-kpi-BXQvKfTh.js} +3 -3
- package/dist/{vue-ui-mini-loader-BXLMnXR4.js → vue-ui-mini-loader-DFBgplMk.js} +2 -2
- package/dist/{vue-ui-molecule-XKapMUGW.js → vue-ui-molecule-BTaGK6l7.js} +54 -54
- package/dist/{vue-ui-mood-radar-D7Aqu1nJ.js → vue-ui-mood-radar-DIxGLyf6.js} +7 -7
- package/dist/{vue-ui-nested-donuts-Cs-eiA--.js → vue-ui-nested-donuts-Buo1qlvt.js} +7 -7
- package/dist/{vue-ui-onion-tu3ZEuXB.js → vue-ui-onion-CTRuEQxm.js} +8 -8
- package/dist/{vue-ui-parallel-coordinate-plot-CmNq-rJX.js → vue-ui-parallel-coordinate-plot-CX_sxW2v.js} +28 -28
- package/dist/{vue-ui-quadrant-Dv-6oPYq.js → vue-ui-quadrant-DmVXReZH.js} +8 -8
- package/dist/{vue-ui-quick-chart-CqBEE-YA.js → vue-ui-quick-chart-B9hUcTr6.js} +6 -6
- package/dist/{vue-ui-radar-BNhzFURc.js → vue-ui-radar-DCIkshOp.js} +8 -8
- package/dist/{vue-ui-rating-CtkV7O_k.js → vue-ui-rating-jjJl1N9l.js} +2 -2
- package/dist/{vue-ui-relation-circle-Z8i-RR0i.js → vue-ui-relation-circle-CM2duT_R.js} +7 -7
- package/dist/{vue-ui-ridgeline-l6Xx3jn0.js → vue-ui-ridgeline-y7Fwkr-1.js} +8 -8
- package/dist/{vue-ui-rings-BRcNv-ei.js → vue-ui-rings-B6HLC79S.js} +8 -8
- package/dist/{vue-ui-scatter-Dk2qhJtm.js → vue-ui-scatter-BDp469sU.js} +8 -8
- package/dist/{vue-ui-skeleton-CqWtSpp9.js → vue-ui-skeleton-CTivICoM.js} +3 -3
- package/dist/{vue-ui-smiley-C-mXyFxi.js → vue-ui-smiley-YLy2xBa-.js} +2 -2
- package/dist/{vue-ui-spark-trend-a2qK1MY1.js → vue-ui-spark-trend-B2wOWiSY.js} +3 -3
- package/dist/{vue-ui-sparkbar-JGI9eOfS.js → vue-ui-sparkbar-CqwjRMPQ.js} +3 -3
- package/dist/{vue-ui-sparkgauge-BeSdViZo.js → vue-ui-sparkgauge-BNv5nBv8.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-CWFeGs-k.js → vue-ui-sparkhistogram-ZrALpNpM.js} +4 -4
- package/dist/{vue-ui-sparkline-n1ZYLiG9.js → vue-ui-sparkline-D7_6htbE.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-ueFrYh65.js → vue-ui-sparkstackbar-BQD6cbOE.js} +3 -3
- package/dist/{vue-ui-stackbar-B8YeQsru.js → vue-ui-stackbar-C9KeiS-Q.js} +9 -9
- package/dist/{vue-ui-stackline-CHEKZZVr.js → vue-ui-stackline-qJW5y3GA.js} +9 -9
- package/dist/{vue-ui-strip-plot-DdiVa06h.js → vue-ui-strip-plot-Bgt_dkJ3.js} +7 -7
- package/dist/{vue-ui-table-cj1I--kU.js → vue-ui-table-BvpnTcTk.js} +5 -5
- package/dist/{vue-ui-table-heatmap-DODhMbZE.js → vue-ui-table-heatmap-UkSDagXf.js} +10 -10
- package/dist/{vue-ui-table-sparkline-BL4kE9rz.js → vue-ui-table-sparkline-D-UoYPFq.js} +4 -4
- package/dist/{vue-ui-thermometer-DwCL1CXe.js → vue-ui-thermometer-CCySf8Ei.js} +7 -7
- package/dist/{vue-ui-timer-C3f6kBOP.js → vue-ui-timer-D2-YQFf3.js} +5 -5
- package/dist/{vue-ui-tiremarks-cJDOMLRT.js → vue-ui-tiremarks-NDuNR9MY.js} +6 -6
- package/dist/{vue-ui-treemap-DwEAnLMk.js → vue-ui-treemap-Dzlc-kC5.js} +8 -8
- package/dist/{vue-ui-waffle-2pywAYQD.js → vue-ui-waffle-CBBfrQqs.js} +8 -8
- package/dist/{vue-ui-wheel-B3Ej8kWP.js → vue-ui-wheel-iFV_KfLw.js} +6 -6
- package/dist/{vue-ui-word-cloud-CzExwlyQ.js → vue-ui-word-cloud-DLBK1KRY.js} +6 -6
- package/dist/{vue-ui-world-Cq36qyqc.js → vue-ui-world-BinQefwp.js} +6 -6
- package/dist/{vue-ui-xy-K_z37RNu.js → vue-ui-xy-BSxvJyZM.js} +9 -9
- package/dist/{vue-ui-xy-canvas-Cq-lVd9y.js → vue-ui-xy-canvas-Bl4ZS4GS.js} +10 -10
- package/package.json +1 -1
- package/dist/PenAndPaper-DscVdZ1u.js +0 -388
- package/dist/vue-ui-donut-CoG8zI-8.js +0 -1713
|
@@ -0,0 +1,2001 @@
|
|
|
1
|
+
import { defineAsyncComponent as be, useSlots as aa, computed as y, shallowRef as de, ref as w, onMounted as Kt, onBeforeUnmount as Zt, toRefs as oa, watch as Le, createElementBlock as i, openBlock as s, normalizeStyle as L, normalizeClass as dt, createBlock as me, createCommentVNode as d, renderSlot as p, createElementVNode as g, createVNode as je, unref as u, withCtx as k, normalizeProps as Z, guardReactiveProps as ee, createSlots as ht, Fragment as _, renderList as H, mergeProps as ft, toDisplayString as oe, withDirectives as qe, vShow as We, Teleport as na, resolveDynamicComponent as sa, createTextVNode as el, nextTick as ua } from "vue";
|
|
2
|
+
import { o as tl, g as yt, k as ra, c as ia, t as ca, j as va, T as da, l as ll, p as _e, a as j, d as G, a2 as al, a6 as ha, a7 as fa, a5 as $, a4 as he, X as ya, s as Qe, h as ga, a3 as pa, a8 as D, a9 as ol, f as ba, i as ma, a0 as gt, u as wa, q as ka, x as Ca, aa as nl } from "./lib-_nVZfi2t.js";
|
|
3
|
+
import { t as xa, u as $a } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as Aa, a as pt } from "./useNestedProp-CNjAKn-Z.js";
|
|
5
|
+
import { u as _a } from "./usePrinter-DXIMGR61.js";
|
|
6
|
+
import { u as Ta, B as Sa } from "./BaseScanner-BgWxam9d.js";
|
|
7
|
+
import { u as Ma } from "./useSvgExport-DrjCWun4.js";
|
|
8
|
+
import { u as Fa } from "./useThemeCheck-DGJ31Vi5.js";
|
|
9
|
+
import { u as La } from "./useUserOptionState-BIvW1Kz7.js";
|
|
10
|
+
import { u as Pa } from "./useChartAccessibility-9icAAmYg.js";
|
|
11
|
+
import Ia from "./img-C5q4A7ke.js";
|
|
12
|
+
import { _ as Da } from "./Shape-BuBasQnO.js";
|
|
13
|
+
import Ya from "./Title-DnykBvFl.js";
|
|
14
|
+
import za from "./Legend-PhhPyrZ0.js";
|
|
15
|
+
import { _ as Ba } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
|
+
const sl = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", layout: { labels: { percentage: { color: "#CCCCCC" }, name: { color: "#CCCCCC" }, hollow: { total: { color: "#CCCCCC", value: { color: "#CCCCCC" } }, average: { color: "#CCCCCC", value: { color: "#CCCCCC" } } } } }, legend: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, title: { color: "#CCCCCC", subtitle: { color: "#757575" } }, tooltip: { backgroundColor: "#1A1A1A", backgroundOpacity: 70, color: "#CCCCCC", borderColor: "#5A5A5A" } } }, table: { th: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, td: { backgroundColor: "#1A1A1A", color: "#CCCCCC" } } }, ul = { style: { chart: { backgroundColor: "#FFF8E1", color: "#424242", layout: { labels: { percentage: { color: "#424242" }, name: { color: "#424242" }, hollow: { total: { color: "#424242", value: { color: "#424242" } }, average: { color: "#424242", value: { color: "#424242" } } } } }, legend: { backgroundColor: "#FFF8E1", color: "#424242" }, title: { color: "#424242", subtitle: { color: "#757575" } }, tooltip: { backgroundColor: "#FFECB3", backgroundOpacity: 30, color: "#424242", borderColor: "#FF8A65" } } }, table: { th: { backgroundColor: "#FFF8E1", color: "#424242" }, td: { backgroundColor: "#FFF8E1", color: "#424242" } } }, rl = { style: { chart: { backgroundColor: "#1E1E1E", color: "#BDBDBD", layout: { labels: { percentage: { color: "#BDBDBD" }, name: { color: "#BDBDBD" }, hollow: { total: { color: "#BDBDBD", value: { color: "#BDBDBD" } }, average: { color: "#BDBDBD", value: { color: "#BDBDBD" } } } } }, legend: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, title: { color: "#FFF8E1", subtitle: { color: "#BDBDBD" } }, tooltip: { backgroundColor: "#1E1E1E", backgroundOpacity: 30, color: "#FFF8E1", borderColor: "#FF8A65" } } }, table: { th: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, td: { backgroundColor: "#1E1E1E", color: "#BDBDBD" } } }, il = { style: { chart: { backgroundColor: "#f6f6fb", color: "#50606C", layout: { labels: { percentage: { color: "#61747E" }, name: { color: "#8A9892" }, hollow: { total: { color: "#8A9892", value: { color: "#61747E" } }, average: { color: "#8A9892", value: { color: "#61747E" } } } } }, legend: { backgroundColor: "#f6f6fb", color: "#61747E" }, title: { color: "#50606C", subtitle: { color: "#718890" } }, tooltip: { backgroundColor: "#f6f6fb", color: "#50606C" } } }, table: { th: { backgroundColor: "#f6f6fb", color: "#50606C" }, td: { backgroundColor: "#f6f6fb", color: "#50606C" } } }, cl = { style: { chart: { backgroundColor: "#1A1A1A", color: "#99AA99", layout: { labels: { percentage: { color: "#AACCAA" }, name: { color: "#99CC99" }, hollow: { total: { color: "#99CC99", value: { color: "#AACCAA" } }, average: { color: "#99CC99", value: { color: "#AACCAA" } } } } }, legend: { backgroundColor: "#1A1A1A", color: "#99AA99" }, title: { color: "#66CC66", subtitle: { color: "#99AA99" } }, tooltip: { backgroundColor: "#2A2F2A", color: "#AACCAA", borderColor: "#66CC66" } } }, table: { th: { backgroundColor: "#1A1A1A", color: "#99AA99" }, td: { backgroundColor: "#1A1A1A", color: "#AACCAA" } } }, vl = { style: { chart: { backgroundColor: "#fbfafa", color: "#8A9892", layout: { labels: { percentage: { color: "#A0AC94" }, name: { color: "#8A9892" }, hollow: { total: { color: "#8A9892", value: { color: "#A0AC94" } }, average: { color: "#8A9892", value: { color: "#A0AC94" } } } } }, legend: { backgroundColor: "#fbfafa", color: "#99AA99" }, title: { color: "#8A9892", subtitle: { color: "#99AA99" } }, tooltip: { backgroundColor: "#fbfafa", color: "#8A9892" } } }, table: { th: { backgroundColor: "#fbfafa", color: "#8F837A" }, td: { backgroundColor: "#fbfafa", color: "#8F837A" } } }, dl = {
|
|
17
|
+
default: {},
|
|
18
|
+
dark: sl,
|
|
19
|
+
celebration: ul,
|
|
20
|
+
celebrationNight: rl,
|
|
21
|
+
concrete: il,
|
|
22
|
+
hack: cl,
|
|
23
|
+
zen: vl
|
|
24
|
+
}, wn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
25
|
+
__proto__: null,
|
|
26
|
+
celebration: ul,
|
|
27
|
+
celebrationNight: rl,
|
|
28
|
+
concrete: il,
|
|
29
|
+
dark: sl,
|
|
30
|
+
default: dl,
|
|
31
|
+
hack: cl,
|
|
32
|
+
zen: vl
|
|
33
|
+
}, Symbol.toStringTag, { value: "Module" })), Xa = ["id"], Oa = ["id"], Ea = ["xmlns", "viewBox"], Na = ["width", "height"], Va = { key: 1 }, Ra = ["id"], Ha = ["stop-color"], Ga = ["offset", "stop-color"], Ua = ["offset", "stop-color"], ja = ["stop-color"], qa = { key: 2 }, Wa = ["id", "cx", "cy"], Qa = ["stop-color", "stop-opacity"], Ja = ["stop-color"], Ka = ["id"], Za = ["id"], eo = ["id"], to = ["flood-color"], lo = ["id"], ao = ["flood-color"], oo = ["d", "stroke", "filter"], no = ["d", "stroke", "filter"], so = ["cx", "cy", "r", "fill", "filter"], uo = { key: 6 }, ro = ["stroke", "d"], io = ["d", "fill", "stroke", "stroke-width", "filter"], co = { key: 0 }, vo = ["d", "fill", "stroke", "stroke-width", "filter"], ho = { key: 0 }, fo = ["stroke", "d"], yo = { key: 0 }, go = ["d", "stroke", "stroke-width", "filter"], po = { key: 1 }, bo = ["d", "fill", "stroke", "stroke-width", "filter"], mo = ["d", "fill", "stroke", "stroke-width", "filter"], wo = { key: 1 }, ko = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Co = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], xo = { key: 0 }, $o = ["d", "fill", "stroke", "stroke-width"], Ao = ["cx", "cy", "r", "stroke"], _o = ["cx", "cy", "r", "fill"], To = ["cx", "cy", "r"], So = { key: 0 }, Mo = ["d", "stroke", "fill", "onMouseenter", "onMouseleave", "onClick"], Fo = { key: 1 }, Lo = ["cx", "cy", "r"], Po = ["x", "y", "fill", "font-size"], Io = ["x", "y", "fill", "font-size"], Do = ["x", "y", "fill", "font-size"], Yo = ["x", "y", "fill", "font-size"], zo = ["filter"], Bo = { key: 0 }, Xo = ["x", "y"], Oo = { key: 1 }, Eo = ["cx", "cy", "fill", "stroke", "filter", "onClick", "onMouseenter", "onMouseleave"], No = ["text-anchor", "x", "y", "onClick", "onMouseenter", "onMouseleave", "innerHTML"], Vo = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave"], Ro = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave", "innerHTML"], Ho = ["cx", "cy", "fill", "stroke", "filter", "onClick", "onMouseenter", "onMouseleave"], Go = ["text-anchor", "x", "y", "onClick", "onMouseenter", "onMouseleave", "innerHTML"], Uo = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave"], jo = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave", "innerHTML"], qo = { key: 2 }, Wo = ["x", "y", "width"], Qo = ["x", "y", "width"], Jo = {
|
|
34
|
+
key: 4,
|
|
35
|
+
class: "vue-data-ui-watermark"
|
|
36
|
+
}, Ko = ["id"], Zo = ["onClick"], en = {
|
|
37
|
+
key: 7,
|
|
38
|
+
class: "vue-ui-donut-hollow"
|
|
39
|
+
}, tn = ["innerHTML"], ln = {
|
|
40
|
+
__name: "vue-ui-donut",
|
|
41
|
+
props: {
|
|
42
|
+
config: {
|
|
43
|
+
type: Object,
|
|
44
|
+
default() {
|
|
45
|
+
return {};
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
dataset: {
|
|
49
|
+
type: Array,
|
|
50
|
+
default() {
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
emits: ["selectLegend", "selectDatapoint"],
|
|
56
|
+
setup(bt, { expose: hl, emit: fl }) {
|
|
57
|
+
const yl = be(() => import("./Tooltip-l2pmtXwi.js")), gl = be(() => import("./BaseIcon-_2VlkSHq.js")), pl = be(() => import("./vue-ui-accordion-WOPRF2Tv.js")), bl = be(() => import("./DataTable-CokMin24.js")), ml = be(() => import("./PenAndPaper-CFRubEEG.js")), wl = be(() => import("./UserOptions-M5A9w5GL.js")), kl = be(() => import("./PackageVersion-BuD3uLvK.js")), Cl = be(() => import("./BaseDraggableDialog-C2wzOVzX.js")), { vue_ui_donut: xl } = Aa(), { isThemeValid: $l, warnInvalidTheme: Al } = Fa(), _l = aa(), T = bt, Be = y({
|
|
58
|
+
get() {
|
|
59
|
+
return !!T.dataset && T.dataset.length;
|
|
60
|
+
},
|
|
61
|
+
set(l) {
|
|
62
|
+
return l;
|
|
63
|
+
}
|
|
64
|
+
}), te = de(null), Xe = w(null), Tl = w(null), Sl = w(null), mt = de(null), wt = de(null), fe = de(null), Te = de(null), kt = de(null), Ct = de(null), xt = w(0), $t = w(0), At = w(0), _t = w(!1), Pe = w(null), Je = w(null), Se = y({
|
|
65
|
+
get: () => e.value.style.chart.layout.labels.percentage.fontSize,
|
|
66
|
+
set: (l) => l
|
|
67
|
+
}), E = y({
|
|
68
|
+
get: () => e.value.style.chart.layout.labels.name.fontSize,
|
|
69
|
+
set: (l) => l
|
|
70
|
+
}), we = y({
|
|
71
|
+
get: () => e.value.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,
|
|
72
|
+
set: (l) => l
|
|
73
|
+
});
|
|
74
|
+
let Ke = !1;
|
|
75
|
+
const ne = () => {
|
|
76
|
+
!e.value.autoSize || Ke || (Ke = !0, requestAnimationFrame(() => {
|
|
77
|
+
Ke = !1;
|
|
78
|
+
const l = e.value, o = Xe.value, t = ke.value;
|
|
79
|
+
if (!l.autoSize || !o || !t) return;
|
|
80
|
+
const [a, r, v, f] = t.getAttribute("viewBox").split(" ").map(Number), C = { x: a, y: r, width: v, height: f }, A = [
|
|
81
|
+
{
|
|
82
|
+
selector: ".vue-data-ui-datalabel-value",
|
|
83
|
+
baseSize: l.style.chart.layout.labels.percentage.fontSize,
|
|
84
|
+
minSize: l.style.chart.layout.labels.percentage.minFontSize,
|
|
85
|
+
sizeRef: Se
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
selector: ".vue-data-ui-datalabel-name",
|
|
89
|
+
baseSize: l.style.chart.layout.labels.name.fontSize,
|
|
90
|
+
minSize: l.style.chart.layout.labels.name.minFontSize,
|
|
91
|
+
sizeRef: E
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
selector: ".vue-data-ui-datalabel-inline",
|
|
95
|
+
baseSize: l.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,
|
|
96
|
+
minSize: l.style.chart.layout.labels.name.minFontSize,
|
|
97
|
+
sizeRef: we
|
|
98
|
+
}
|
|
99
|
+
];
|
|
100
|
+
A.map((M) => o.querySelectorAll(M.selector).length).reduce((M, P) => M + P, 0) !== 0 && A.forEach(({ selector: M, baseSize: P, minSize: ie, sizeRef: pe }) => {
|
|
101
|
+
o.querySelectorAll(M).forEach((ct) => {
|
|
102
|
+
const ze = ba({
|
|
103
|
+
el: ct,
|
|
104
|
+
bounds: C,
|
|
105
|
+
currentFontSize: P,
|
|
106
|
+
minFontSize: ie,
|
|
107
|
+
attempts: 200,
|
|
108
|
+
padding: 1
|
|
109
|
+
});
|
|
110
|
+
pe.value = ze;
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
}));
|
|
114
|
+
};
|
|
115
|
+
Kt(async () => {
|
|
116
|
+
_t.value = !0, Tt(), requestAnimationFrame(ne);
|
|
117
|
+
});
|
|
118
|
+
let Ze;
|
|
119
|
+
Kt(() => {
|
|
120
|
+
te.value && (Ze = new ResizeObserver((l) => {
|
|
121
|
+
for (const o of l) {
|
|
122
|
+
const { width: t, height: a } = o.contentRect;
|
|
123
|
+
if (t > 0 && a > 0) {
|
|
124
|
+
ne();
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}), Ze.observe(te.value.parentElement));
|
|
129
|
+
}), Zt(() => {
|
|
130
|
+
Ze?.disconnect();
|
|
131
|
+
}), Zt(() => {
|
|
132
|
+
fe.value && (Te.value && fe.value.unobserve(Te.value), fe.value.disconnect());
|
|
133
|
+
});
|
|
134
|
+
const et = y(() => !!e.value.debug);
|
|
135
|
+
function Tt() {
|
|
136
|
+
if (tl(T.dataset) ? (yt({
|
|
137
|
+
componentName: "VueUiDonut",
|
|
138
|
+
type: "dataset",
|
|
139
|
+
debug: et.value
|
|
140
|
+
}), Be.value = !1, Ee.value = !0) : (T.dataset.forEach((l, o) => {
|
|
141
|
+
ra({
|
|
142
|
+
datasetObject: l,
|
|
143
|
+
requiredAttributes: ["name", "values"]
|
|
144
|
+
}).forEach((t) => {
|
|
145
|
+
yt({
|
|
146
|
+
componentName: "VueUiDonut",
|
|
147
|
+
type: "datasetSerieAttribute",
|
|
148
|
+
property: t,
|
|
149
|
+
index: o,
|
|
150
|
+
debug: et.value
|
|
151
|
+
}), Be.value = !1, Ee.value = !0;
|
|
152
|
+
});
|
|
153
|
+
}), T.dataset.forEach((l, o) => {
|
|
154
|
+
(!l.name || l.name === "") && yt({
|
|
155
|
+
componentName: "VueUiDonut",
|
|
156
|
+
type: "datasetAttributeEmpty",
|
|
157
|
+
property: "name",
|
|
158
|
+
index: o,
|
|
159
|
+
debug: et.value
|
|
160
|
+
});
|
|
161
|
+
})), tl(T.dataset) || (Ee.value = e.value.loading), e.value.responsive) {
|
|
162
|
+
const l = xa(() => {
|
|
163
|
+
const { width: o, height: t } = $a({
|
|
164
|
+
chart: te.value,
|
|
165
|
+
title: e.value.style.chart.title.text ? mt.value : null,
|
|
166
|
+
legend: e.value.style.chart.legend.show ? wt.value : null,
|
|
167
|
+
source: kt.value,
|
|
168
|
+
noTitle: Ct.value,
|
|
169
|
+
padding: e.value.autoSize ? void 0 : Ne.value
|
|
170
|
+
});
|
|
171
|
+
requestAnimationFrame(() => {
|
|
172
|
+
n.value.width = o, n.value.height = t, ne();
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
fe.value && (Te.value && fe.value.unobserve(Te.value), fe.value.disconnect()), fe.value = new ResizeObserver(l), Te.value = te.value.parentNode, fe.value.observe(Te.value);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
const m = w(ia()), tt = w(!1), lt = w(""), le = w(null), St = w(0);
|
|
179
|
+
function at() {
|
|
180
|
+
const l = pt({
|
|
181
|
+
userConfig: T.config,
|
|
182
|
+
defaultConfig: xl
|
|
183
|
+
});
|
|
184
|
+
let o = {};
|
|
185
|
+
const t = l.theme;
|
|
186
|
+
if (!t)
|
|
187
|
+
o = l;
|
|
188
|
+
else if (!$l.value(l))
|
|
189
|
+
Al(l), o = l;
|
|
190
|
+
else {
|
|
191
|
+
const a = pt({
|
|
192
|
+
userConfig: dl[t] || T.config,
|
|
193
|
+
defaultConfig: l
|
|
194
|
+
});
|
|
195
|
+
o = {
|
|
196
|
+
...pt({
|
|
197
|
+
userConfig: T.config,
|
|
198
|
+
defaultConfig: a
|
|
199
|
+
}),
|
|
200
|
+
customPalette: l.customPalette.length ? l.customPalette : ma[t] || _e
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
return T.config && gt(T.config, "events.datapointEnter") ? o.events.datapointEnter = T.config.events.datapointEnter : o.events.datapointEnter = null, T.config && gt(T.config, "events.datapointLeave") ? o.events.datapointLeave = T.config.events.datapointLeave : o.events.datapointLeave = null, T.config && gt(T.config, "events.datapointClick") ? o.events.datapointClick = T.config.events.datapointClick : o.events.datapointClick = null, o;
|
|
204
|
+
}
|
|
205
|
+
const e = w(at()), { loading: Oe, FINAL_DATASET: Me, manualLoading: Ee, skeletonDataset: Ml } = Ta({
|
|
206
|
+
...oa(T),
|
|
207
|
+
FINAL_CONFIG: e,
|
|
208
|
+
prepareConfig: at,
|
|
209
|
+
skeletonDataset: [
|
|
210
|
+
{
|
|
211
|
+
name: "",
|
|
212
|
+
values: [3],
|
|
213
|
+
color: "#BABABA"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: "",
|
|
217
|
+
values: [2],
|
|
218
|
+
color: "#AAAAAA"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
name: "",
|
|
222
|
+
values: [1],
|
|
223
|
+
color: "#CACACA"
|
|
224
|
+
}
|
|
225
|
+
],
|
|
226
|
+
skeletonConfig: ca({
|
|
227
|
+
defaultConfig: e.value,
|
|
228
|
+
userConfig: {
|
|
229
|
+
useCssAnimation: !1,
|
|
230
|
+
table: { show: !1 },
|
|
231
|
+
startAnimation: {
|
|
232
|
+
show: !1
|
|
233
|
+
},
|
|
234
|
+
userOptions: { show: !1 },
|
|
235
|
+
style: {
|
|
236
|
+
chart: {
|
|
237
|
+
backgroundColor: "#99999930",
|
|
238
|
+
layout: {
|
|
239
|
+
labels: {
|
|
240
|
+
dataLabels: { show: !1 },
|
|
241
|
+
hollow: {
|
|
242
|
+
average: { show: !1 },
|
|
243
|
+
total: { show: !1 }
|
|
244
|
+
},
|
|
245
|
+
value: { show: !1 }
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
legend: {
|
|
249
|
+
backgroundColor: "transparent",
|
|
250
|
+
showValue: !1,
|
|
251
|
+
showPercentage: !1
|
|
252
|
+
},
|
|
253
|
+
title: {
|
|
254
|
+
color: "#1A1A1A",
|
|
255
|
+
subtitle: {
|
|
256
|
+
color: "#5A5A5A"
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
})
|
|
263
|
+
}), X = w(!0), ce = de([]);
|
|
264
|
+
function Fl(l, o = 1e3, t = 50) {
|
|
265
|
+
return new Promise((a) => {
|
|
266
|
+
const r = l.length;
|
|
267
|
+
ce.value = Array(r).fill(0);
|
|
268
|
+
let v = 0;
|
|
269
|
+
l.forEach((f, C) => {
|
|
270
|
+
setTimeout(() => {
|
|
271
|
+
const A = performance.now();
|
|
272
|
+
function F(M) {
|
|
273
|
+
const P = Math.min((M - A) / o, 1), ie = nl(P);
|
|
274
|
+
ce.value[C] = f * ie, ce.value = [...ce.value], P < 1 ? (requestAnimationFrame(F), requestAnimationFrame(ne)) : (ce.value[C] = f, ce.value = [...ce.value], v += 1, v === r && a(), requestAnimationFrame(ne));
|
|
275
|
+
}
|
|
276
|
+
requestAnimationFrame(F);
|
|
277
|
+
}, C * t);
|
|
278
|
+
});
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
const Mt = w(!1);
|
|
282
|
+
Le(
|
|
283
|
+
() => Oe.value,
|
|
284
|
+
async (l) => {
|
|
285
|
+
if (l || Mt.value) return;
|
|
286
|
+
const o = Me.value === Ml, t = e.value.startAnimation?.show;
|
|
287
|
+
if (!o && t) {
|
|
288
|
+
Mt.value = !0;
|
|
289
|
+
const a = Me.value.map(
|
|
290
|
+
(r) => r.values.reduce((v, f) => v + f, 0)
|
|
291
|
+
);
|
|
292
|
+
await Fl(
|
|
293
|
+
a,
|
|
294
|
+
e.value.startAnimation.durationMs,
|
|
295
|
+
e.value.startAnimation.staggerMs
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
X.value = !1;
|
|
299
|
+
},
|
|
300
|
+
{ immediate: !0 }
|
|
301
|
+
);
|
|
302
|
+
const { userOptionsVisible: ot, setUserOptionsVisibility: Ft, keepUserOptionState: Lt } = La({ config: e.value }), { svgRef: ke } = Pa({ config: e.value.style.chart.title });
|
|
303
|
+
function Ll() {
|
|
304
|
+
Ft(!0);
|
|
305
|
+
}
|
|
306
|
+
function Pl() {
|
|
307
|
+
Ft(!1);
|
|
308
|
+
}
|
|
309
|
+
Le(() => T.config, (l) => {
|
|
310
|
+
Oe.value || (e.value = at()), ot.value = !e.value.userOptions.showOnChartHover, Tt(), xt.value += 1, $t.value += 1, At.value += 1, b.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, b.value.showTable = e.value.table.show, b.value.showTooltip = e.value.style.chart.tooltip.show, n.value.height = e.value.style.chart.height, n.value.width = e.value.style.chart.width;
|
|
311
|
+
}, { deep: !0 });
|
|
312
|
+
const Ne = y(() => {
|
|
313
|
+
const { top: l, right: o, bottom: t, left: a } = e.value.style.chart.padding;
|
|
314
|
+
return {
|
|
315
|
+
css: `padding:${l}px ${o}px ${t}px ${a}px`,
|
|
316
|
+
top: l,
|
|
317
|
+
right: o,
|
|
318
|
+
bottom: t,
|
|
319
|
+
left: a
|
|
320
|
+
};
|
|
321
|
+
}), { isPrinting: Pt, isImaging: It, generatePdf: Dt, generateImage: Yt } = _a({
|
|
322
|
+
elementId: `donut__${m.value}`,
|
|
323
|
+
fileName: e.value.style.chart.title.text || "vue-ui-donut",
|
|
324
|
+
options: e.value.userOptions.print
|
|
325
|
+
}), Il = y(() => e.value.userOptions.show && !e.value.style.chart.title.text), zt = y(() => va(e.value.customPalette)), b = w({
|
|
326
|
+
dataLabels: {
|
|
327
|
+
show: e.value.style.chart.layout.labels.dataLabels.show
|
|
328
|
+
},
|
|
329
|
+
showTable: e.value.table.show,
|
|
330
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
331
|
+
});
|
|
332
|
+
Le(e, () => {
|
|
333
|
+
b.value = {
|
|
334
|
+
dataLabels: {
|
|
335
|
+
show: e.value.style.chart.layout.labels.dataLabels.show
|
|
336
|
+
},
|
|
337
|
+
showTable: e.value.table.show,
|
|
338
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
339
|
+
};
|
|
340
|
+
}, { immediate: !0 });
|
|
341
|
+
const n = w({
|
|
342
|
+
height: e.value.style.chart.height,
|
|
343
|
+
width: e.value.style.chart.width
|
|
344
|
+
}), Ce = y(() => {
|
|
345
|
+
if (e.value.pie)
|
|
346
|
+
return S.value;
|
|
347
|
+
const l = e.value.style.chart.layout.donut.strokeWidth / 512, o = Math.min(n.value.width, n.value.height) * l, t = o > S.value ? S.value : o;
|
|
348
|
+
return Math.max(t, 12 * (1 + l));
|
|
349
|
+
}), Bt = fl, q = y(() => Me.value.sort((l, o) => {
|
|
350
|
+
const t = Array.isArray(l.values) ? l.values.reduce((r, v) => r + v, 0) : l.value ?? 0, a = Array.isArray(o.values) ? o.values.reduce((r, v) => r + v, 0) : o.value ?? 0;
|
|
351
|
+
return l.ghost && !o.ghost ? 1 : o.ghost && !l.ghost ? -1 : a - t;
|
|
352
|
+
}).map((l, o) => ({
|
|
353
|
+
name: l.name,
|
|
354
|
+
color: ll(l.color) || zt.value[o] || _e[o] || _e[o % _e.length],
|
|
355
|
+
value: da(l.values.reduce((t, a) => t + a, 0)),
|
|
356
|
+
absoluteValues: l.values,
|
|
357
|
+
comment: l.comment || "",
|
|
358
|
+
patternIndex: o,
|
|
359
|
+
seriesIndex: o,
|
|
360
|
+
ghost: !1,
|
|
361
|
+
pattern: `pattern_${m.value}_${o}`
|
|
362
|
+
})));
|
|
363
|
+
Le(() => T.dataset, (l) => {
|
|
364
|
+
Array.isArray(l) && l.length > 0 && (Ee.value = !1);
|
|
365
|
+
}, { immediate: !0 });
|
|
366
|
+
const W = de(q.value);
|
|
367
|
+
Le(() => q.value, (l) => {
|
|
368
|
+
W.value = l, requestAnimationFrame(ne);
|
|
369
|
+
});
|
|
370
|
+
function Dl() {
|
|
371
|
+
return q.value.map((l) => ({
|
|
372
|
+
name: l.name,
|
|
373
|
+
color: l.color,
|
|
374
|
+
value: l.value
|
|
375
|
+
}));
|
|
376
|
+
}
|
|
377
|
+
const Q = w([]), xe = w(!1);
|
|
378
|
+
function Xt({ from: l, to: o, duration: t, onUpdate: a, onDone: r, easing: v = nl }) {
|
|
379
|
+
const f = performance.now();
|
|
380
|
+
function C(A) {
|
|
381
|
+
const F = Math.min((A - f) / t, 1), M = v(F), P = l + (o - l) * M;
|
|
382
|
+
a(P, F), F < 1 ? requestAnimationFrame(C) : (a(o, 1), r && r());
|
|
383
|
+
}
|
|
384
|
+
requestAnimationFrame(C);
|
|
385
|
+
}
|
|
386
|
+
function Ve(l) {
|
|
387
|
+
const o = q.value.find((r, v) => v === l);
|
|
388
|
+
let a = W.value.find((r, v) => v === l).value;
|
|
389
|
+
if (Q.value.includes(l)) {
|
|
390
|
+
let v = function() {
|
|
391
|
+
W.value = W.value.map(
|
|
392
|
+
(C, A) => l === A ? { ...C, value: r } : C
|
|
393
|
+
);
|
|
394
|
+
}, f = function() {
|
|
395
|
+
xe.value = !0, Xt({
|
|
396
|
+
from: a,
|
|
397
|
+
to: r,
|
|
398
|
+
duration: e.value.serieToggleAnimation.durationMs,
|
|
399
|
+
onUpdate: (C, A) => {
|
|
400
|
+
W.value = W.value.map(
|
|
401
|
+
(F, M) => l === M ? { ...F, value: C } : F
|
|
402
|
+
), requestAnimationFrame(ne);
|
|
403
|
+
},
|
|
404
|
+
onDone: () => {
|
|
405
|
+
v(), xe.value = !1;
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
};
|
|
409
|
+
Q.value = Q.value.filter((C) => C !== l);
|
|
410
|
+
const r = o.value;
|
|
411
|
+
e.value.serieToggleAnimation.show && e.value.type === "classic" ? f() : (v(), requestAnimationFrame(ne));
|
|
412
|
+
} else if (Q.value.length < q.value.length - 1) {
|
|
413
|
+
let r = function() {
|
|
414
|
+
Q.value.push(l), W.value = W.value.map(
|
|
415
|
+
(f, C) => l === C ? { ...f, value: 0 } : f
|
|
416
|
+
);
|
|
417
|
+
}, v = function() {
|
|
418
|
+
xe.value = !0, Xt({
|
|
419
|
+
from: a,
|
|
420
|
+
to: 0,
|
|
421
|
+
duration: e.value.serieToggleAnimation.durationMs,
|
|
422
|
+
onUpdate: (f, C) => {
|
|
423
|
+
W.value = W.value.map(
|
|
424
|
+
(A, F) => l === F ? { ...A, value: f } : A
|
|
425
|
+
), requestAnimationFrame(ne);
|
|
426
|
+
},
|
|
427
|
+
onDone: () => {
|
|
428
|
+
r(), requestAnimationFrame(ne), xe.value = !1;
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
};
|
|
432
|
+
e.value.serieToggleAnimation.show && e.value.type === "classic" ? v() : r();
|
|
433
|
+
}
|
|
434
|
+
Bt("selectLegend", ve.value.map((r) => ({
|
|
435
|
+
name: r.name,
|
|
436
|
+
color: r.color,
|
|
437
|
+
value: r.value
|
|
438
|
+
})));
|
|
439
|
+
}
|
|
440
|
+
function Ot(l) {
|
|
441
|
+
if (!q.value.length)
|
|
442
|
+
return e.value.debug && console.warn("VueUiDonut - There are no series to show."), null;
|
|
443
|
+
const o = q.value.find((t) => t.name === l);
|
|
444
|
+
return o || (e.value.debug && console.warn(`VueUiDonut - Series name not found "${l}"`), null);
|
|
445
|
+
}
|
|
446
|
+
function Yl(l) {
|
|
447
|
+
const o = Ot(l);
|
|
448
|
+
o !== null && Q.value.includes(o.seriesIndex) && Ve(o.seriesIndex);
|
|
449
|
+
}
|
|
450
|
+
function zl(l) {
|
|
451
|
+
const o = Ot(l);
|
|
452
|
+
o !== null && (Q.value.includes(o.seriesIndex) || Ve(o.seriesIndex));
|
|
453
|
+
}
|
|
454
|
+
const Bl = y(() => Me.value.reduce((l, o) => l + o.values.reduce((t, a) => t + a, 0), 0)), ve = y(() => {
|
|
455
|
+
if (X.value && !Oe.value) {
|
|
456
|
+
const l = ce.value.map((t, a) => ({
|
|
457
|
+
...q.value[a],
|
|
458
|
+
value: t,
|
|
459
|
+
color: q.value[a].color,
|
|
460
|
+
ghost: !1
|
|
461
|
+
})), o = Bl.value - ce.value.reduce((t, a) => t + a, 0);
|
|
462
|
+
return o > 0 && l.push({
|
|
463
|
+
name: "__ghost__",
|
|
464
|
+
value: o,
|
|
465
|
+
color: "transparent",
|
|
466
|
+
ghost: !0
|
|
467
|
+
}), l;
|
|
468
|
+
} else
|
|
469
|
+
return W.value.forEach((l, o) => {
|
|
470
|
+
if ([null, void 0].includes(l.values))
|
|
471
|
+
return {
|
|
472
|
+
...l,
|
|
473
|
+
values: []
|
|
474
|
+
};
|
|
475
|
+
}), W.value.map((l, o) => ({
|
|
476
|
+
...l,
|
|
477
|
+
seriesIndex: o
|
|
478
|
+
})).filter((l, o) => !Q.value.includes(o));
|
|
479
|
+
}), nt = y(() => Me.value.map((l, o) => {
|
|
480
|
+
const t = (l.values || []).reduce((r, v) => r + v, 0), a = t / Me.value.map((r) => (r.values || []).reduce((v, f) => v + f, 0)).reduce((r, v) => r + v, 0);
|
|
481
|
+
return {
|
|
482
|
+
name: l.name,
|
|
483
|
+
color: ll(l.color) || zt.value[o] || _e[o] || _e[o % _e.length],
|
|
484
|
+
value: t,
|
|
485
|
+
shape: "circle",
|
|
486
|
+
patternIndex: o,
|
|
487
|
+
proportion: a
|
|
488
|
+
};
|
|
489
|
+
}).map((l, o) => ({
|
|
490
|
+
...l,
|
|
491
|
+
opacity: Q.value.includes(o) ? 0.5 : 1,
|
|
492
|
+
segregate: () => !xe.value && Ve(o),
|
|
493
|
+
isSegregated: Q.value.includes(o),
|
|
494
|
+
display: `${l.name}${e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ": " : ""}${e.value.style.chart.legend.showValue ? j(e.value.style.chart.layout.labels.value.formatter, l.value, G({
|
|
495
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
496
|
+
v: l.value,
|
|
497
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
498
|
+
r: e.value.style.chart.legend.roundingValue
|
|
499
|
+
}), { datapoint: l, index: o }) : ""}${e.value.style.chart.legend.showPercentage ? Q.value.includes(o) ? `${e.value.style.chart.legend.showValue ? "(" : ""}${jl(l.proportion * 100)}%${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? " (" : ""}${isNaN(l.value / V.value) ? "-" : j(e.value.style.chart.layout.labels.percentage.formatter, Et(l), G({
|
|
500
|
+
v: Et(l),
|
|
501
|
+
s: "%",
|
|
502
|
+
r: e.value.style.chart.legend.roundingPercentage
|
|
503
|
+
}))}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""}`
|
|
504
|
+
}))), Xl = y(() => ({
|
|
505
|
+
cy: "donut-div-legend",
|
|
506
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
507
|
+
color: e.value.style.chart.legend.color,
|
|
508
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
509
|
+
paddingBottom: 12,
|
|
510
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
511
|
+
})), S = y(() => {
|
|
512
|
+
const l = e.value.style.chart.layout.donut.radiusRatio, o = Math.max(0.1, Math.min(0.50001, l)), t = Math.min(n.value.width * o, n.value.height * o);
|
|
513
|
+
return Math.max(12, t);
|
|
514
|
+
}), O = y(() => al({ series: ve.value }, n.value.width / 2, n.value.height / 2, S.value, S.value, 1.99999, 2, 1, 360, 105.25, Ce.value)), Ol = y(() => Math.abs(ve.value.map((l) => l.value).reduce((l, o) => l + o, 0)) > 0), El = y(() => al({
|
|
515
|
+
series: [
|
|
516
|
+
{
|
|
517
|
+
value: 1,
|
|
518
|
+
color: e.value.style.chart.layout.donut.emptyFill,
|
|
519
|
+
name: "_",
|
|
520
|
+
seriesIndex: 0,
|
|
521
|
+
patternIndex: -1,
|
|
522
|
+
ghost: !1,
|
|
523
|
+
absoluteValues: [1]
|
|
524
|
+
}
|
|
525
|
+
]
|
|
526
|
+
}, n.value.width / 2, n.value.height / 2, S.value, S.value, 1.99999, 2, 1, 360, 105.25, Ce.value)), N = y(() => O.value.filter((l) => !l.ghost)), c = y(() => {
|
|
527
|
+
const l = Math.max(...ve.value.map((t) => t.value)), o = ve.value.map((t) => t.value / l);
|
|
528
|
+
return ha({
|
|
529
|
+
series: o,
|
|
530
|
+
center: {
|
|
531
|
+
x: n.value.width / 2,
|
|
532
|
+
y: n.value.height / 2
|
|
533
|
+
},
|
|
534
|
+
maxRadius: Math.min(n.value.width, n.value.height) / 3,
|
|
535
|
+
hasGhost: X.value
|
|
536
|
+
});
|
|
537
|
+
});
|
|
538
|
+
function ye(l) {
|
|
539
|
+
return l.x > n.value.width / 2 + 6 ? "start" : l.x < n.value.width / 2 - 6 ? "end" : "middle";
|
|
540
|
+
}
|
|
541
|
+
function Nl(l) {
|
|
542
|
+
return l.middlePoint.y > n.value.height / 2 ? D({ initX: l.middlePoint.x, initY: l.middlePoint.y, offset: 100, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y : D({ initX: l.middlePoint.x, initY: l.middlePoint.y, offset: 0, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y - 100;
|
|
543
|
+
}
|
|
544
|
+
function U(l) {
|
|
545
|
+
return l.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
|
|
546
|
+
}
|
|
547
|
+
function Vl(l) {
|
|
548
|
+
const o = l.proportion * 100, t = e.value.style.chart.layout.labels.dataLabels.hideUnderValue, a = e.value.style.chart.layout.labels.dataLabels.smallArcClusterThreshold;
|
|
549
|
+
return o > t && o <= a;
|
|
550
|
+
}
|
|
551
|
+
const Y = y(() => {
|
|
552
|
+
if (e.value.type !== "classic") return {};
|
|
553
|
+
const l = {}, o = N.value || [];
|
|
554
|
+
if (!o.length) return l;
|
|
555
|
+
const t = e.value, a = n.value.width / 2, r = n.value.height / 2, v = Ne.value.top + 16, f = n.value.height - Ne.value.bottom - 16, C = we.value * 1.5, A = 8, F = 24, M = a - (S.value + F), P = a + (S.value + F), ie = !!t.style.chart.layout.curvedMarkers;
|
|
556
|
+
function pe({ midX: h, midY: x, bandX: I, bandY: R }) {
|
|
557
|
+
if (!ie)
|
|
558
|
+
return `M ${h} ${x} L ${h} ${R} L ${I} ${R}`;
|
|
559
|
+
const ae = I < a ? -1 : 1, z = (h + I) / 2 + ae * 12, B = x + (R - x) * 0.5;
|
|
560
|
+
return `M ${h} ${x} Q ${z} ${B} ${I} ${R}`;
|
|
561
|
+
}
|
|
562
|
+
const ct = o.map((h, x) => {
|
|
563
|
+
const { x: I, y: R } = fa(h.path), ae = $(h).x, J = he(h) - 3.5, z = String(h.name ?? "").split(/\n/g), B = Math.max(0, z.length - 1), K = we.value * 1.2, Fe = B * K, la = C + Fe;
|
|
564
|
+
return {
|
|
565
|
+
arc: h,
|
|
566
|
+
index: x,
|
|
567
|
+
midX: I,
|
|
568
|
+
midY: R,
|
|
569
|
+
inlineMarkerX: ae,
|
|
570
|
+
inlineMarkerY: J,
|
|
571
|
+
labelHeight: la
|
|
572
|
+
};
|
|
573
|
+
}).filter(({ arc: h }) => Vl(h)), ze = [], vt = [], Ge = [], Ue = [];
|
|
574
|
+
ct.forEach((h) => {
|
|
575
|
+
const x = h.inlineMarkerY < r, I = h.inlineMarkerX < a;
|
|
576
|
+
x && I ? ze.push(h) : x && !I ? vt.push(h) : !x && I ? Ge.push(h) : Ue.push(h);
|
|
577
|
+
});
|
|
578
|
+
const qt = (h, x) => h.inlineMarkerY - x.inlineMarkerY || h.index - x.index, Wt = (h, x) => x.inlineMarkerY - h.inlineMarkerY || h.index - x.index;
|
|
579
|
+
ze.sort(qt), vt.sort(qt), Ge.sort(Wt), Ue.sort(Wt);
|
|
580
|
+
let Qt = v;
|
|
581
|
+
ze.forEach((h) => {
|
|
582
|
+
const { index: x, midX: I, midY: R, labelHeight: ae } = h, J = Qt, z = M, B = J, K = pe({
|
|
583
|
+
midX: I,
|
|
584
|
+
midY: R,
|
|
585
|
+
bandX: z,
|
|
586
|
+
bandY: B
|
|
587
|
+
});
|
|
588
|
+
l[x] = {
|
|
589
|
+
side: "left",
|
|
590
|
+
labelX: z - A,
|
|
591
|
+
labelY: J,
|
|
592
|
+
textAnchor: "end",
|
|
593
|
+
markerX: z,
|
|
594
|
+
markerY: B,
|
|
595
|
+
connectorPath: K
|
|
596
|
+
}, Qt += ae;
|
|
597
|
+
});
|
|
598
|
+
let Jt = v;
|
|
599
|
+
if (vt.forEach((h) => {
|
|
600
|
+
const { index: x, midX: I, midY: R, labelHeight: ae } = h, J = Jt, z = P, B = J, K = pe({
|
|
601
|
+
midX: I,
|
|
602
|
+
midY: R,
|
|
603
|
+
bandX: z,
|
|
604
|
+
bandY: B
|
|
605
|
+
});
|
|
606
|
+
l[x] = {
|
|
607
|
+
side: "right",
|
|
608
|
+
labelX: z + A,
|
|
609
|
+
labelY: J,
|
|
610
|
+
textAnchor: "start",
|
|
611
|
+
markerX: z,
|
|
612
|
+
markerY: B,
|
|
613
|
+
connectorPath: K
|
|
614
|
+
}, Jt += ae;
|
|
615
|
+
}), Ge.length > 1) {
|
|
616
|
+
let h = f;
|
|
617
|
+
Ge.forEach((x) => {
|
|
618
|
+
const { index: I, midX: R, midY: ae, labelHeight: J } = x;
|
|
619
|
+
h -= J;
|
|
620
|
+
const z = h, B = M, K = z, Fe = pe({
|
|
621
|
+
midX: R,
|
|
622
|
+
midY: ae,
|
|
623
|
+
bandX: B,
|
|
624
|
+
bandY: K
|
|
625
|
+
});
|
|
626
|
+
l[I] = {
|
|
627
|
+
side: "left",
|
|
628
|
+
labelX: B - A,
|
|
629
|
+
labelY: z,
|
|
630
|
+
textAnchor: "end",
|
|
631
|
+
markerX: B,
|
|
632
|
+
markerY: K,
|
|
633
|
+
connectorPath: Fe
|
|
634
|
+
};
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
if (Ue.length > 1) {
|
|
638
|
+
let h = f;
|
|
639
|
+
Ue.forEach((x) => {
|
|
640
|
+
const { index: I, midX: R, midY: ae, labelHeight: J } = x;
|
|
641
|
+
h -= J;
|
|
642
|
+
const z = h, B = P, K = z, Fe = pe({
|
|
643
|
+
midX: R,
|
|
644
|
+
midY: ae,
|
|
645
|
+
bandX: B,
|
|
646
|
+
bandY: K
|
|
647
|
+
});
|
|
648
|
+
l[I] = {
|
|
649
|
+
side: "right",
|
|
650
|
+
labelX: B + A,
|
|
651
|
+
labelY: z,
|
|
652
|
+
textAnchor: "start",
|
|
653
|
+
markerX: B,
|
|
654
|
+
markerY: K,
|
|
655
|
+
connectorPath: Fe
|
|
656
|
+
};
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
return l;
|
|
660
|
+
});
|
|
661
|
+
function Ie(l, o) {
|
|
662
|
+
const t = l.value / Rl(o);
|
|
663
|
+
return isNaN(t) ? 0 : j(
|
|
664
|
+
e.value.style.chart.layout.labels.percentage.formatter,
|
|
665
|
+
t * 100,
|
|
666
|
+
G({
|
|
667
|
+
v: t * 100,
|
|
668
|
+
s: "%",
|
|
669
|
+
r: e.value.style.chart.layout.labels.percentage.rounding
|
|
670
|
+
}),
|
|
671
|
+
{ datapoint: l }
|
|
672
|
+
);
|
|
673
|
+
}
|
|
674
|
+
function Rl(l) {
|
|
675
|
+
return [...l].map((o) => o.value).reduce((o, t) => o + t, 0);
|
|
676
|
+
}
|
|
677
|
+
const V = y(() => ve.value.map((l) => l.value).reduce((l, o) => l + o, 0)), st = y(() => V.value / ve.value.length);
|
|
678
|
+
function Et(l) {
|
|
679
|
+
return xe.value ? l.proportion * 100 : l.value / V.value * 100;
|
|
680
|
+
}
|
|
681
|
+
const ut = w(null), De = w(!1);
|
|
682
|
+
function se({ datapoint: l, seriesIndex: o }) {
|
|
683
|
+
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: l, seriesIndex: o }), tt.value = !1, le.value = null;
|
|
684
|
+
}
|
|
685
|
+
function ue({ datapoint: l, relativeIndex: o, seriesIndex: t, show: a = !1 }) {
|
|
686
|
+
e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: l, seriesIndex: t }), ut.value = { datapoint: l, seriesIndex: t, config: e.value, series: q.value }, tt.value = a, le.value = o;
|
|
687
|
+
let r = "";
|
|
688
|
+
const v = e.value.style.chart.tooltip.customFormat;
|
|
689
|
+
if (De.value = !1, Ca(v))
|
|
690
|
+
try {
|
|
691
|
+
const f = v({
|
|
692
|
+
seriesIndex: t,
|
|
693
|
+
datapoint: l,
|
|
694
|
+
series: q.value,
|
|
695
|
+
config: e.value
|
|
696
|
+
});
|
|
697
|
+
typeof f == "string" && (lt.value = f, De.value = !0);
|
|
698
|
+
} catch {
|
|
699
|
+
console.warn("Custom format cannot be applied."), De.value = !1;
|
|
700
|
+
}
|
|
701
|
+
if (!De.value) {
|
|
702
|
+
if (r += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`, r += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${l.color}"/>${_l.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${m.value}_${t})"/>` : ""}</svg>`, e.value.style.chart.tooltip.showValue && (r += `<b>${j(
|
|
703
|
+
e.value.style.chart.layout.labels.value.formatter,
|
|
704
|
+
l.value,
|
|
705
|
+
G({
|
|
706
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
707
|
+
v: l.value,
|
|
708
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
709
|
+
r: e.value.style.chart.tooltip.roundingValue
|
|
710
|
+
}),
|
|
711
|
+
{
|
|
712
|
+
datapoint: l,
|
|
713
|
+
relativeIndex: o,
|
|
714
|
+
seriesIndex: t
|
|
715
|
+
}
|
|
716
|
+
)}</b>`), e.value.style.chart.tooltip.showPercentage) {
|
|
717
|
+
const f = j(
|
|
718
|
+
e.value.style.chart.layout.labels.percentage.formatter,
|
|
719
|
+
l.proportion * 100,
|
|
720
|
+
G({
|
|
721
|
+
v: l.proportion * 100,
|
|
722
|
+
s: "%",
|
|
723
|
+
r: e.value.style.chart.tooltip.roundingPercentage
|
|
724
|
+
}),
|
|
725
|
+
{
|
|
726
|
+
datapoint: l,
|
|
727
|
+
relativeIndex: o,
|
|
728
|
+
seriesIndex: t
|
|
729
|
+
}
|
|
730
|
+
);
|
|
731
|
+
e.value.style.chart.tooltip.showValue ? r += `<span>(${f})</span></div>` : r += `<b>${f}</b></div>`;
|
|
732
|
+
}
|
|
733
|
+
e.value.style.chart.comments.showInTooltip && l.comment && (r += `<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${l.color}">${l.comment}</div>`), lt.value = `<div>${r}</div>`;
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
function Hl(l, o) {
|
|
737
|
+
const t = Y.value[o];
|
|
738
|
+
if (t)
|
|
739
|
+
return {
|
|
740
|
+
textAnchor: t.textAnchor,
|
|
741
|
+
x: t.labelX,
|
|
742
|
+
y: t.labelY
|
|
743
|
+
};
|
|
744
|
+
const a = $(l, !0, 12);
|
|
745
|
+
return {
|
|
746
|
+
textAnchor: a.anchor,
|
|
747
|
+
x: a.x,
|
|
748
|
+
y: he(l)
|
|
749
|
+
};
|
|
750
|
+
}
|
|
751
|
+
function Gl(l, o, t) {
|
|
752
|
+
const { textAnchor: a, x: r } = Hl(l, o), v = Ie(l, N.value), f = e.value.style.chart.layout.labels.value.show ? ` (${j(
|
|
753
|
+
e.value.style.chart.layout.labels.value.formatter,
|
|
754
|
+
l.value,
|
|
755
|
+
G({
|
|
756
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
757
|
+
v: l.value,
|
|
758
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
759
|
+
r: e.value.style.chart.layout.labels.value.rounding
|
|
760
|
+
}),
|
|
761
|
+
{ datapoint: l }
|
|
762
|
+
)})` : "", C = `${v}${f}`, A = `
|
|
763
|
+
<tspan
|
|
764
|
+
class="vue-data-ui-datalabel-inline"
|
|
765
|
+
fill="${e.value.style.chart.layout.labels.percentage.color}"
|
|
766
|
+
font-size="${t ? we.value : Se.value}px"
|
|
767
|
+
style="font-weight:${e.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}"
|
|
768
|
+
>${C}</tspan>
|
|
769
|
+
`, F = String(l.name ?? "").split(/\n/g);
|
|
770
|
+
let M = "";
|
|
771
|
+
return F.forEach((P, ie) => {
|
|
772
|
+
ie === 0 ? M += `
|
|
773
|
+
<tspan
|
|
774
|
+
class="vue-data-ui-datalabel-name"
|
|
775
|
+
fill="${e.value.style.chart.layout.labels.name.color}"
|
|
776
|
+
font-size="${t ? we.value : E.value}px"
|
|
777
|
+
style="font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : ""}"
|
|
778
|
+
>${P}</tspan>
|
|
779
|
+
` : M += `
|
|
780
|
+
<tspan
|
|
781
|
+
class="vue-data-ui-datalabel-name"
|
|
782
|
+
x="${r}"
|
|
783
|
+
dy="${(t ? we.value : E.value) * 1.2}"
|
|
784
|
+
fill="${e.value.style.chart.layout.labels.name.color}"
|
|
785
|
+
font-size="${t ? we.value : E.value}px"
|
|
786
|
+
style="font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : ""}"
|
|
787
|
+
>${P}</tspan>
|
|
788
|
+
`;
|
|
789
|
+
}), a === "end" ? `${M}${A}` : `${A}${M}`;
|
|
790
|
+
}
|
|
791
|
+
function Ul(l, o) {
|
|
792
|
+
const t = c.value[o].middlePoint, a = ye(t), r = D({
|
|
793
|
+
initX: t.x,
|
|
794
|
+
initY: t.y,
|
|
795
|
+
offset: 42,
|
|
796
|
+
centerX: n.value.width / 2,
|
|
797
|
+
centerY: n.value.height / 2
|
|
798
|
+
}), v = r.x;
|
|
799
|
+
r.y;
|
|
800
|
+
const f = Ie(l, N.value), C = e.value.style.chart.layout.labels.value.show ? ` (${j(
|
|
801
|
+
e.value.style.chart.layout.labels.value.formatter,
|
|
802
|
+
l.value,
|
|
803
|
+
G({
|
|
804
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
805
|
+
v: l.value,
|
|
806
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
807
|
+
r: e.value.style.chart.layout.labels.value.rounding
|
|
808
|
+
}),
|
|
809
|
+
{ datapoint: l }
|
|
810
|
+
)})` : "", A = `${f}${C}`, F = `
|
|
811
|
+
<tspan
|
|
812
|
+
class="vue-data-ui-datalabel-value"
|
|
813
|
+
fill="${e.value.style.chart.layout.labels.percentage.color}"
|
|
814
|
+
font-size="${Se.value}px"
|
|
815
|
+
style="font-weight:${e.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"}"
|
|
816
|
+
>${A}</tspan>
|
|
817
|
+
`, M = String(l.name ?? "").split(/\n/g);
|
|
818
|
+
let P = "";
|
|
819
|
+
return M.forEach((ie, pe) => {
|
|
820
|
+
pe === 0 ? P += `
|
|
821
|
+
<tspan
|
|
822
|
+
class="vue-data-ui-datalabel-name"
|
|
823
|
+
fill="${e.value.style.chart.layout.labels.name.color}"
|
|
824
|
+
font-size="${E.value}px"
|
|
825
|
+
style="font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : "normal"}"
|
|
826
|
+
>${ie}</tspan>
|
|
827
|
+
` : P += `
|
|
828
|
+
<tspan
|
|
829
|
+
class="vue-data-ui-datalabel-name"
|
|
830
|
+
x="${v}"
|
|
831
|
+
dy="${E.value * 1.2}"
|
|
832
|
+
fill="${e.value.style.chart.layout.labels.name.color}"
|
|
833
|
+
font-size="${E.value}px"
|
|
834
|
+
style="font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : "normal"}"
|
|
835
|
+
>${ie}</tspan>
|
|
836
|
+
`;
|
|
837
|
+
}), a === "end" ? `${P}${F}` : `${F}${P}`;
|
|
838
|
+
}
|
|
839
|
+
function $e(l) {
|
|
840
|
+
return e.value.useBlurOnHover && ![null, void 0].includes(le.value) && le.value !== l ? `url(#blur_${m.value})` : "";
|
|
841
|
+
}
|
|
842
|
+
const ge = y(() => {
|
|
843
|
+
const l = ve.value.map((t) => ({
|
|
844
|
+
name: t.name,
|
|
845
|
+
color: t.color
|
|
846
|
+
})), o = ve.value.map((t) => t.value);
|
|
847
|
+
return { head: l, body: o };
|
|
848
|
+
});
|
|
849
|
+
function rt(l = null) {
|
|
850
|
+
ua(() => {
|
|
851
|
+
const o = ge.value.head.map((r, v) => [[
|
|
852
|
+
r.name
|
|
853
|
+
], [ge.value.body[v]], [isNaN(ge.value.body[v] / V.value) ? "-" : ge.value.body[v] / V.value * 100]]), t = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), a = wa(t);
|
|
854
|
+
l ? l(a) : ka({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-donut" });
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
const Re = y(() => {
|
|
858
|
+
const l = [
|
|
859
|
+
' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',
|
|
860
|
+
G({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: V.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
|
|
861
|
+
"100%"
|
|
862
|
+
], o = ge.value.head.map((r, v) => [
|
|
863
|
+
{
|
|
864
|
+
color: r.color,
|
|
865
|
+
name: r.name || "-"
|
|
866
|
+
},
|
|
867
|
+
ge.value.body[v],
|
|
868
|
+
isNaN(ge.value.body[v] / V.value) ? "-" : (ge.value.body[v] / V.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
|
|
869
|
+
]), t = {
|
|
870
|
+
th: {
|
|
871
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
872
|
+
color: e.value.table.th.color,
|
|
873
|
+
outline: e.value.table.th.outline
|
|
874
|
+
},
|
|
875
|
+
td: {
|
|
876
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
877
|
+
color: e.value.table.td.color,
|
|
878
|
+
outline: e.value.table.td.outline
|
|
879
|
+
},
|
|
880
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
881
|
+
};
|
|
882
|
+
return {
|
|
883
|
+
colNames: [
|
|
884
|
+
e.value.table.columnNames.series,
|
|
885
|
+
e.value.table.columnNames.value,
|
|
886
|
+
e.value.table.columnNames.percentage
|
|
887
|
+
],
|
|
888
|
+
head: l,
|
|
889
|
+
body: o,
|
|
890
|
+
config: t
|
|
891
|
+
};
|
|
892
|
+
}), Ae = w(!1);
|
|
893
|
+
function Nt(l) {
|
|
894
|
+
Ae.value = l, St.value += 1;
|
|
895
|
+
}
|
|
896
|
+
const Vt = y(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent));
|
|
897
|
+
function jl(l) {
|
|
898
|
+
return l.toFixed(e.value.style.chart.legend.roundingPercentage).split("").map((o) => "-").join("");
|
|
899
|
+
}
|
|
900
|
+
function re(l, o) {
|
|
901
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: l.seriesIndex }), Bt("selectDatapoint", { datapoint: l, index: o });
|
|
902
|
+
}
|
|
903
|
+
function Rt() {
|
|
904
|
+
b.value.showTable = !b.value.showTable;
|
|
905
|
+
}
|
|
906
|
+
function Ht() {
|
|
907
|
+
b.value.dataLabels.show = !b.value.dataLabels.show;
|
|
908
|
+
}
|
|
909
|
+
function Gt() {
|
|
910
|
+
b.value.showTooltip = !b.value.showTooltip;
|
|
911
|
+
}
|
|
912
|
+
const He = w(!1);
|
|
913
|
+
function it() {
|
|
914
|
+
He.value = !He.value;
|
|
915
|
+
}
|
|
916
|
+
async function ql({ scale: l = 2 } = {}) {
|
|
917
|
+
if (!te.value) return;
|
|
918
|
+
const { width: o, height: t } = te.value.getBoundingClientRect(), a = o / t, { imageUri: r, base64: v } = await Ia({ domElement: te.value, base64: !0, img: !0, scale: l });
|
|
919
|
+
return {
|
|
920
|
+
imageUri: r,
|
|
921
|
+
base64: v,
|
|
922
|
+
title: e.value.style.chart.title.text,
|
|
923
|
+
width: o,
|
|
924
|
+
height: t,
|
|
925
|
+
aspectRatio: a
|
|
926
|
+
};
|
|
927
|
+
}
|
|
928
|
+
function Wl() {
|
|
929
|
+
if (!Xe.value) return;
|
|
930
|
+
const { x: l, y: o, width: t, height: a } = Xe.value.getBBox();
|
|
931
|
+
ke.value && ke.value.setAttribute("viewBox", `${l} ${o} ${t + Math.min(0, l)} ${a + Math.min(0, o)}`);
|
|
932
|
+
}
|
|
933
|
+
const Ye = y(() => {
|
|
934
|
+
const l = e.value.table.useDialog && !e.value.table.show, o = b.value.showTable;
|
|
935
|
+
return {
|
|
936
|
+
component: l ? Cl : pl,
|
|
937
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
938
|
+
props: l ? {
|
|
939
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
940
|
+
color: e.value.table.th.color,
|
|
941
|
+
headerColor: e.value.table.th.color,
|
|
942
|
+
headerBg: e.value.table.th.backgroundColor,
|
|
943
|
+
isFullscreen: Ae.value,
|
|
944
|
+
fullscreenParent: te.value,
|
|
945
|
+
forcedWidth: Math.min(500, window.innerWidth * 0.8)
|
|
946
|
+
} : {
|
|
947
|
+
hideDetails: !0,
|
|
948
|
+
config: {
|
|
949
|
+
open: o,
|
|
950
|
+
maxHeight: 1e4,
|
|
951
|
+
body: {
|
|
952
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
953
|
+
color: e.value.style.chart.color
|
|
954
|
+
},
|
|
955
|
+
head: {
|
|
956
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
957
|
+
color: e.value.style.chart.color
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
};
|
|
962
|
+
});
|
|
963
|
+
Le(() => b.value.showTable, (l) => {
|
|
964
|
+
e.value.table.show || (l && e.value.table.useDialog && Pe.value ? Pe.value.open() : "close" in Pe.value && Pe.value.close());
|
|
965
|
+
});
|
|
966
|
+
function Ut() {
|
|
967
|
+
b.value.showTable = !1, Je.value && Je.value.setTableIconState(!1);
|
|
968
|
+
}
|
|
969
|
+
const Ql = y(() => nt.value.map((l) => ({
|
|
970
|
+
...l,
|
|
971
|
+
name: l.display
|
|
972
|
+
}))), Jl = y(() => e.value.style.chart.backgroundColor), Kl = y(() => e.value.style.chart.legend), Zl = y(() => e.value.style.chart.title), { exportSvg: ea, getSvg: ta } = Ma({
|
|
973
|
+
svg: ke,
|
|
974
|
+
title: Zl,
|
|
975
|
+
legend: Kl,
|
|
976
|
+
legendItems: Ql,
|
|
977
|
+
backgroundColor: Jl
|
|
978
|
+
});
|
|
979
|
+
async function jt({ isCb: l }) {
|
|
980
|
+
if (l) {
|
|
981
|
+
const { blob: o, url: t, text: a, dataUrl: r } = await ta();
|
|
982
|
+
e.value.userOptions.callbacks.svg({ blob: o, url: t, text: a, dataUrl: r });
|
|
983
|
+
} else
|
|
984
|
+
ea();
|
|
985
|
+
}
|
|
986
|
+
return hl({
|
|
987
|
+
autoSize: Wl,
|
|
988
|
+
getData: Dl,
|
|
989
|
+
getImage: ql,
|
|
990
|
+
generatePdf: Dt,
|
|
991
|
+
generateCsv: rt,
|
|
992
|
+
generateImage: Yt,
|
|
993
|
+
generateSvg: jt,
|
|
994
|
+
hideSeries: zl,
|
|
995
|
+
showSeries: Yl,
|
|
996
|
+
toggleTable: Rt,
|
|
997
|
+
toggleLabels: Ht,
|
|
998
|
+
toggleTooltip: Gt,
|
|
999
|
+
toggleAnnotator: it,
|
|
1000
|
+
toggleFullscreen: Nt
|
|
1001
|
+
}), (l, o) => (s(), i("div", {
|
|
1002
|
+
ref_key: "donutChart",
|
|
1003
|
+
ref: te,
|
|
1004
|
+
class: dt(`vue-data-ui-component vue-ui-donut ${Ae.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
1005
|
+
style: L(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height:100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
1006
|
+
id: `donut__${m.value}`,
|
|
1007
|
+
onMouseenter: Ll,
|
|
1008
|
+
onMouseleave: Pl
|
|
1009
|
+
}, [
|
|
1010
|
+
e.value.userOptions.buttons.annotator && u(ke) ? (s(), me(u(ml), {
|
|
1011
|
+
key: 0,
|
|
1012
|
+
color: e.value.style.chart.color,
|
|
1013
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1014
|
+
active: He.value,
|
|
1015
|
+
svgRef: u(ke),
|
|
1016
|
+
onClose: it
|
|
1017
|
+
}, {
|
|
1018
|
+
"annotator-action-close": k(() => [
|
|
1019
|
+
p(l.$slots, "annotator-action-close", {}, void 0, !0)
|
|
1020
|
+
]),
|
|
1021
|
+
"annotator-action-color": k(({ color: t }) => [
|
|
1022
|
+
p(l.$slots, "annotator-action-color", Z(ee({ color: t })), void 0, !0)
|
|
1023
|
+
]),
|
|
1024
|
+
"annotator-action-draw": k(({ mode: t }) => [
|
|
1025
|
+
p(l.$slots, "annotator-action-draw", Z(ee({ mode: t })), void 0, !0)
|
|
1026
|
+
]),
|
|
1027
|
+
"annotator-action-undo": k(({ disabled: t }) => [
|
|
1028
|
+
p(l.$slots, "annotator-action-undo", Z(ee({ disabled: t })), void 0, !0)
|
|
1029
|
+
]),
|
|
1030
|
+
"annotator-action-redo": k(({ disabled: t }) => [
|
|
1031
|
+
p(l.$slots, "annotator-action-redo", Z(ee({ disabled: t })), void 0, !0)
|
|
1032
|
+
]),
|
|
1033
|
+
"annotator-action-delete": k(({ disabled: t }) => [
|
|
1034
|
+
p(l.$slots, "annotator-action-delete", Z(ee({ disabled: t })), void 0, !0)
|
|
1035
|
+
]),
|
|
1036
|
+
_: 3
|
|
1037
|
+
}, 8, ["color", "backgroundColor", "active", "svgRef"])) : d("", !0),
|
|
1038
|
+
p(l.$slots, "userConfig", {}, void 0, !0),
|
|
1039
|
+
Il.value ? (s(), i("div", {
|
|
1040
|
+
key: 1,
|
|
1041
|
+
ref_key: "noTitle",
|
|
1042
|
+
ref: Ct,
|
|
1043
|
+
class: "vue-data-ui-no-title-space",
|
|
1044
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
1045
|
+
}, null, 512)) : d("", !0),
|
|
1046
|
+
e.value.style.chart.title.text ? (s(), i("div", {
|
|
1047
|
+
key: 2,
|
|
1048
|
+
ref_key: "chartTitle",
|
|
1049
|
+
ref: mt,
|
|
1050
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
1051
|
+
}, [
|
|
1052
|
+
(s(), me(Ya, {
|
|
1053
|
+
key: `title_${xt.value}`,
|
|
1054
|
+
config: {
|
|
1055
|
+
title: {
|
|
1056
|
+
cy: "donut-div-title",
|
|
1057
|
+
...e.value.style.chart.title
|
|
1058
|
+
},
|
|
1059
|
+
subtitle: {
|
|
1060
|
+
cy: "donut-div-subtitle",
|
|
1061
|
+
...e.value.style.chart.title.subtitle
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
}, null, 8, ["config"]))
|
|
1065
|
+
], 512)) : d("", !0),
|
|
1066
|
+
g("div", {
|
|
1067
|
+
id: `legend-top-${m.value}`
|
|
1068
|
+
}, null, 8, Oa),
|
|
1069
|
+
e.value.userOptions.show && Be.value && (u(Lt) || u(ot)) ? (s(), me(u(wl), {
|
|
1070
|
+
ref_key: "userOptionsRef",
|
|
1071
|
+
ref: Je,
|
|
1072
|
+
key: `user_option_${St.value}`,
|
|
1073
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1074
|
+
color: e.value.style.chart.color,
|
|
1075
|
+
isPrinting: u(Pt),
|
|
1076
|
+
isImaging: u(It),
|
|
1077
|
+
uid: m.value,
|
|
1078
|
+
hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
|
|
1079
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
1080
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
1081
|
+
hasSvg: e.value.userOptions.buttons.svg,
|
|
1082
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
1083
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
1084
|
+
hasLabel: e.value.userOptions.buttons.labels,
|
|
1085
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
1086
|
+
isFullscreen: Ae.value,
|
|
1087
|
+
chartElement: te.value,
|
|
1088
|
+
position: e.value.userOptions.position,
|
|
1089
|
+
callbacks: e.value.userOptions.callbacks,
|
|
1090
|
+
isTooltip: b.value.showTooltip,
|
|
1091
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
1092
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
1093
|
+
isAnnotation: He.value,
|
|
1094
|
+
printScale: e.value.userOptions.print.scale,
|
|
1095
|
+
tableDialog: e.value.table.useDialog,
|
|
1096
|
+
onToggleFullscreen: Nt,
|
|
1097
|
+
onGeneratePdf: u(Dt),
|
|
1098
|
+
onGenerateCsv: rt,
|
|
1099
|
+
onGenerateImage: u(Yt),
|
|
1100
|
+
onGenerateSvg: jt,
|
|
1101
|
+
onToggleTable: Rt,
|
|
1102
|
+
onToggleLabels: Ht,
|
|
1103
|
+
onToggleTooltip: Gt,
|
|
1104
|
+
onToggleAnnotator: it,
|
|
1105
|
+
style: L({ visibility: u(Lt) ? u(ot) ? "visible" : "hidden" : "visible" })
|
|
1106
|
+
}, ht({ _: 2 }, [
|
|
1107
|
+
l.$slots.menuIcon ? {
|
|
1108
|
+
name: "menuIcon",
|
|
1109
|
+
fn: k(({ isOpen: t, color: a }) => [
|
|
1110
|
+
p(l.$slots, "menuIcon", Z(ee({ isOpen: t, color: a })), void 0, !0)
|
|
1111
|
+
]),
|
|
1112
|
+
key: "0"
|
|
1113
|
+
} : void 0,
|
|
1114
|
+
l.$slots.optionTooltip ? {
|
|
1115
|
+
name: "optionTooltip",
|
|
1116
|
+
fn: k(() => [
|
|
1117
|
+
p(l.$slots, "optionTooltip", {}, void 0, !0)
|
|
1118
|
+
]),
|
|
1119
|
+
key: "1"
|
|
1120
|
+
} : void 0,
|
|
1121
|
+
l.$slots.optionPdf ? {
|
|
1122
|
+
name: "optionPdf",
|
|
1123
|
+
fn: k(() => [
|
|
1124
|
+
p(l.$slots, "optionPdf", {}, void 0, !0)
|
|
1125
|
+
]),
|
|
1126
|
+
key: "2"
|
|
1127
|
+
} : void 0,
|
|
1128
|
+
l.$slots.optionCsv ? {
|
|
1129
|
+
name: "optionCsv",
|
|
1130
|
+
fn: k(() => [
|
|
1131
|
+
p(l.$slots, "optionCsv", {}, void 0, !0)
|
|
1132
|
+
]),
|
|
1133
|
+
key: "3"
|
|
1134
|
+
} : void 0,
|
|
1135
|
+
l.$slots.optionImg ? {
|
|
1136
|
+
name: "optionImg",
|
|
1137
|
+
fn: k(() => [
|
|
1138
|
+
p(l.$slots, "optionImg", {}, void 0, !0)
|
|
1139
|
+
]),
|
|
1140
|
+
key: "4"
|
|
1141
|
+
} : void 0,
|
|
1142
|
+
l.$slots.optionSvg ? {
|
|
1143
|
+
name: "optionSvg",
|
|
1144
|
+
fn: k(() => [
|
|
1145
|
+
p(l.$slots, "optionSvg", {}, void 0, !0)
|
|
1146
|
+
]),
|
|
1147
|
+
key: "5"
|
|
1148
|
+
} : void 0,
|
|
1149
|
+
l.$slots.optionTable ? {
|
|
1150
|
+
name: "optionTable",
|
|
1151
|
+
fn: k(() => [
|
|
1152
|
+
p(l.$slots, "optionTable", {}, void 0, !0)
|
|
1153
|
+
]),
|
|
1154
|
+
key: "6"
|
|
1155
|
+
} : void 0,
|
|
1156
|
+
l.$slots.optionLabels ? {
|
|
1157
|
+
name: "optionLabels",
|
|
1158
|
+
fn: k(() => [
|
|
1159
|
+
p(l.$slots, "optionLabels", {}, void 0, !0)
|
|
1160
|
+
]),
|
|
1161
|
+
key: "7"
|
|
1162
|
+
} : void 0,
|
|
1163
|
+
l.$slots.optionFullscreen ? {
|
|
1164
|
+
name: "optionFullscreen",
|
|
1165
|
+
fn: k(({ toggleFullscreen: t, isFullscreen: a }) => [
|
|
1166
|
+
p(l.$slots, "optionFullscreen", Z(ee({ toggleFullscreen: t, isFullscreen: a })), void 0, !0)
|
|
1167
|
+
]),
|
|
1168
|
+
key: "8"
|
|
1169
|
+
} : void 0,
|
|
1170
|
+
l.$slots.optionAnnotator ? {
|
|
1171
|
+
name: "optionAnnotator",
|
|
1172
|
+
fn: k(({ toggleAnnotator: t, isAnnotator: a }) => [
|
|
1173
|
+
p(l.$slots, "optionAnnotator", Z(ee({ toggleAnnotator: t, isAnnotator: a })), void 0, !0)
|
|
1174
|
+
]),
|
|
1175
|
+
key: "9"
|
|
1176
|
+
} : void 0
|
|
1177
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "chartElement", "position", "callbacks", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : d("", !0),
|
|
1178
|
+
(s(), i("svg", {
|
|
1179
|
+
ref_key: "svgRef",
|
|
1180
|
+
ref: ke,
|
|
1181
|
+
xmlns: u(ya),
|
|
1182
|
+
class: dt({ "vue-data-ui-fullscreen--on": Ae.value, "vue-data-ui-fulscreen--off": !Ae.value, "vue-data-ui-svg": !0 }),
|
|
1183
|
+
viewBox: `0 0 ${n.value.width <= 0 ? 10 : n.value.width} ${n.value.height <= 0 ? 10 : n.value.height}`,
|
|
1184
|
+
style: L(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};${Ne.value.css}`)
|
|
1185
|
+
}, [
|
|
1186
|
+
g("g", {
|
|
1187
|
+
ref_key: "G",
|
|
1188
|
+
ref: Xe,
|
|
1189
|
+
class: "vue-data-ui-g"
|
|
1190
|
+
}, [
|
|
1191
|
+
je(u(kl)),
|
|
1192
|
+
l.$slots["chart-background"] ? (s(), i("foreignObject", {
|
|
1193
|
+
key: 0,
|
|
1194
|
+
x: 0,
|
|
1195
|
+
y: 0,
|
|
1196
|
+
width: n.value.width <= 0 ? 10 : n.value.width,
|
|
1197
|
+
height: n.value.height <= 0 ? 10 : n.value.height,
|
|
1198
|
+
style: {
|
|
1199
|
+
pointerEvents: "none"
|
|
1200
|
+
}
|
|
1201
|
+
}, [
|
|
1202
|
+
p(l.$slots, "chart-background", {}, void 0, !0)
|
|
1203
|
+
], 8, Na)) : d("", !0),
|
|
1204
|
+
e.value.type === "classic" && !isNaN(Ce.value / S.value) ? (s(), i("defs", Va, [
|
|
1205
|
+
e.value.style.chart.useGradient ? (s(), i("radialGradient", {
|
|
1206
|
+
key: 0,
|
|
1207
|
+
id: `gradient_${m.value}`
|
|
1208
|
+
}, [
|
|
1209
|
+
g("stop", {
|
|
1210
|
+
offset: "0%",
|
|
1211
|
+
"stop-color": u(Qe)(e.value.style.chart.backgroundColor, 0),
|
|
1212
|
+
"stop-opacity": "0"
|
|
1213
|
+
}, null, 8, Ha),
|
|
1214
|
+
g("stop", {
|
|
1215
|
+
offset: `${(1 - Ce.value / S.value) * 100}%`,
|
|
1216
|
+
"stop-color": u(Qe)("#FFFFFF", 0),
|
|
1217
|
+
"stop-opacity": "0"
|
|
1218
|
+
}, null, 8, Ga),
|
|
1219
|
+
g("stop", {
|
|
1220
|
+
offset: `${(1 - Ce.value / S.value / 2) * 100}%`,
|
|
1221
|
+
"stop-color": u(Qe)("#FFFFFF", e.value.style.chart.gradientIntensity)
|
|
1222
|
+
}, null, 8, Ua),
|
|
1223
|
+
g("stop", {
|
|
1224
|
+
offset: "100%",
|
|
1225
|
+
"stop-color": u(Qe)(e.value.style.chart.backgroundColor, 0),
|
|
1226
|
+
"stop-opacity": "0"
|
|
1227
|
+
}, null, 8, ja)
|
|
1228
|
+
], 8, Ra)) : d("", !0)
|
|
1229
|
+
])) : d("", !0),
|
|
1230
|
+
e.value.type === "polar" ? (s(), i("defs", qa, [
|
|
1231
|
+
(s(!0), i(_, null, H(c.value, (t, a) => (s(), i("radialGradient", {
|
|
1232
|
+
id: `polar_gradient_${a}_${m.value}`,
|
|
1233
|
+
cx: (isNaN(t.middlePoint.x / n.value.width * 100) ? 0 : t.middlePoint.x / n.value.width * 100) + "%",
|
|
1234
|
+
cy: (isNaN(t.middlePoint.y / n.value.height * 100) ? 0 : t.middlePoint.y / n.value.height * 100) + "%",
|
|
1235
|
+
r: "62%"
|
|
1236
|
+
}, [
|
|
1237
|
+
g("stop", {
|
|
1238
|
+
offset: "0%",
|
|
1239
|
+
"stop-color": u(ga)(O.value[a].color, 0.05),
|
|
1240
|
+
"stop-opacity": e.value.style.chart.gradientIntensity / 100
|
|
1241
|
+
}, null, 8, Qa),
|
|
1242
|
+
g("stop", {
|
|
1243
|
+
offset: "100%",
|
|
1244
|
+
"stop-color": O.value[a].color
|
|
1245
|
+
}, null, 8, Ja)
|
|
1246
|
+
], 8, Wa))), 256))
|
|
1247
|
+
])) : d("", !0),
|
|
1248
|
+
g("defs", null, [
|
|
1249
|
+
g("filter", {
|
|
1250
|
+
id: `blur_${m.value}`,
|
|
1251
|
+
x: "-50%",
|
|
1252
|
+
y: "-50%",
|
|
1253
|
+
width: "200%",
|
|
1254
|
+
height: "200%"
|
|
1255
|
+
}, [
|
|
1256
|
+
g("feGaussianBlur", {
|
|
1257
|
+
in: "SourceGraphic",
|
|
1258
|
+
stdDeviation: 2,
|
|
1259
|
+
id: `blur_std_${m.value}`
|
|
1260
|
+
}, null, 8, Za),
|
|
1261
|
+
o[5] || (o[5] = g("feColorMatrix", {
|
|
1262
|
+
type: "saturate",
|
|
1263
|
+
values: "0"
|
|
1264
|
+
}, null, -1))
|
|
1265
|
+
], 8, Ka),
|
|
1266
|
+
g("filter", {
|
|
1267
|
+
id: `shadow_${m.value}`,
|
|
1268
|
+
"color-interpolation-filters": "sRGB"
|
|
1269
|
+
}, [
|
|
1270
|
+
g("feDropShadow", {
|
|
1271
|
+
dx: "0",
|
|
1272
|
+
dy: "0",
|
|
1273
|
+
stdDeviation: "10",
|
|
1274
|
+
"flood-opacity": "0.5",
|
|
1275
|
+
"flood-color": e.value.style.chart.layout.donut.shadowColor
|
|
1276
|
+
}, null, 8, to)
|
|
1277
|
+
], 8, eo),
|
|
1278
|
+
g("filter", {
|
|
1279
|
+
id: `drop_shadow_${m.value}`,
|
|
1280
|
+
"color-interpolation-filters": "sRGB",
|
|
1281
|
+
x: "-50%",
|
|
1282
|
+
y: "-50%",
|
|
1283
|
+
width: "200%",
|
|
1284
|
+
height: "200%"
|
|
1285
|
+
}, [
|
|
1286
|
+
g("feDropShadow", {
|
|
1287
|
+
dx: "0",
|
|
1288
|
+
dy: "0",
|
|
1289
|
+
stdDeviation: "3",
|
|
1290
|
+
"flood-opacity": "1",
|
|
1291
|
+
"flood-color": e.value.style.chart.layout.donut.shadowColor
|
|
1292
|
+
}, null, 8, ao)
|
|
1293
|
+
], 8, lo)
|
|
1294
|
+
]),
|
|
1295
|
+
e.value.type === "classic" ? (s(!0), i(_, { key: 3 }, H(O.value.filter((t) => !t.ghost), (t, a) => (s(), i("g", null, [
|
|
1296
|
+
U(t) && b.value.dataLabels.show ? (s(), i("path", {
|
|
1297
|
+
key: 0,
|
|
1298
|
+
d: Y.value[a]?.connectorPath || u(pa)(
|
|
1299
|
+
t,
|
|
1300
|
+
{ x: n.value.width / 2, y: n.value.height / 2 },
|
|
1301
|
+
16,
|
|
1302
|
+
16,
|
|
1303
|
+
!1,
|
|
1304
|
+
!1,
|
|
1305
|
+
Ce.value,
|
|
1306
|
+
12,
|
|
1307
|
+
e.value.style.chart.layout.curvedMarkers
|
|
1308
|
+
),
|
|
1309
|
+
stroke: t.color,
|
|
1310
|
+
"stroke-width": "1",
|
|
1311
|
+
"stroke-linecap": "round",
|
|
1312
|
+
"stroke-linejoin": "round",
|
|
1313
|
+
fill: "none",
|
|
1314
|
+
filter: $e(a)
|
|
1315
|
+
}, null, 8, oo)) : d("", !0)
|
|
1316
|
+
]))), 256)) : d("", !0),
|
|
1317
|
+
e.value.type === "polar" ? (s(!0), i(_, { key: 4 }, H(O.value.filter((t) => !t.ghost), (t, a) => (s(), i("g", null, [
|
|
1318
|
+
U(t) && b.value.dataLabels.show ? (s(), i("path", {
|
|
1319
|
+
key: 0,
|
|
1320
|
+
d: `M ${u(D)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x},${u(D)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y} ${c.value[a].middlePoint.x},${c.value[a].middlePoint.y}`,
|
|
1321
|
+
stroke: t.color,
|
|
1322
|
+
"stroke-width": "1",
|
|
1323
|
+
"stroke-linecap": "round",
|
|
1324
|
+
"stroke-linejoin": "round",
|
|
1325
|
+
fill: "none",
|
|
1326
|
+
filter: $e(a),
|
|
1327
|
+
style: L({
|
|
1328
|
+
transition: X.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
|
|
1329
|
+
})
|
|
1330
|
+
}, null, 12, no)) : d("", !0)
|
|
1331
|
+
]))), 256)) : d("", !0),
|
|
1332
|
+
e.value.type === "classic" && e.value.style.chart.layout.donut.useShadow ? (s(), i("circle", {
|
|
1333
|
+
key: 5,
|
|
1334
|
+
cx: n.value.width / 2,
|
|
1335
|
+
cy: n.value.height / 2,
|
|
1336
|
+
r: S.value <= 0 ? 10 : S.value,
|
|
1337
|
+
fill: e.value.style.chart.backgroundColor,
|
|
1338
|
+
filter: `url(#shadow_${m.value})`
|
|
1339
|
+
}, null, 8, so)) : d("", !0),
|
|
1340
|
+
l.$slots.pattern ? (s(), i("g", uo, [
|
|
1341
|
+
(s(!0), i(_, null, H(bt.dataset, (t, a) => (s(), i("defs", {
|
|
1342
|
+
key: `pattern-${t.patternIndex}`
|
|
1343
|
+
}, [
|
|
1344
|
+
p(l.$slots, "pattern", ft({ ref_for: !0 }, { seriesIndex: a, patternId: `pattern_${m.value}_${a}` }), void 0, !0)
|
|
1345
|
+
]))), 128))
|
|
1346
|
+
])) : d("", !0),
|
|
1347
|
+
V.value && e.value.type === "classic" ? (s(), i(_, { key: 7 }, [
|
|
1348
|
+
(s(!0), i(_, null, H(N.value, (t, a) => (s(), i("path", {
|
|
1349
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1350
|
+
d: t.arcSlice,
|
|
1351
|
+
fill: "#FFFFFF"
|
|
1352
|
+
}, null, 8, ro))), 256)),
|
|
1353
|
+
(s(!0), i(_, null, H(N.value, (t, a) => (s(), i("path", {
|
|
1354
|
+
class: "vue-ui-donut-arc-path",
|
|
1355
|
+
d: t.arcSlice,
|
|
1356
|
+
fill: t.color,
|
|
1357
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
1358
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
1359
|
+
filter: $e(a)
|
|
1360
|
+
}, null, 8, io))), 256)),
|
|
1361
|
+
l.$slots.pattern ? (s(), i("g", co, [
|
|
1362
|
+
(s(!0), i(_, null, H(N.value, (t, a) => (s(), i("path", {
|
|
1363
|
+
class: "vue-ui-donut-arc-path",
|
|
1364
|
+
d: t.arcSlice,
|
|
1365
|
+
fill: `url(#${t.pattern})`,
|
|
1366
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
1367
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
1368
|
+
filter: $e(a)
|
|
1369
|
+
}, null, 8, vo))), 256))
|
|
1370
|
+
])) : d("", !0)
|
|
1371
|
+
], 64)) : d("", !0),
|
|
1372
|
+
V.value && e.value.type === "polar" ? (s(), i(_, { key: 8 }, [
|
|
1373
|
+
O.value.length > 1 ? (s(), i("g", ho, [
|
|
1374
|
+
(s(!0), i(_, null, H(N.value, (t, a) => (s(), i("path", {
|
|
1375
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
1376
|
+
d: c.value[a].path,
|
|
1377
|
+
fill: "#FFFFFF",
|
|
1378
|
+
style: L({
|
|
1379
|
+
transition: X.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
|
|
1380
|
+
})
|
|
1381
|
+
}, null, 12, fo))), 256)),
|
|
1382
|
+
e.value.style.chart.layout.donut.useShadow ? (s(), i("g", yo, [
|
|
1383
|
+
(s(!0), i(_, null, H(N.value, (t, a) => (s(), i("path", {
|
|
1384
|
+
class: "vue-ui-donut-arc-path",
|
|
1385
|
+
d: c.value[a].path,
|
|
1386
|
+
fill: "transparent",
|
|
1387
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
1388
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
1389
|
+
filter: `url(#drop_shadow_${m.value})`,
|
|
1390
|
+
style: L({
|
|
1391
|
+
transition: X.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
|
|
1392
|
+
})
|
|
1393
|
+
}, null, 12, go))), 256))
|
|
1394
|
+
])) : d("", !0),
|
|
1395
|
+
l.$slots.pattern ? (s(), i("g", po, [
|
|
1396
|
+
(s(!0), i(_, null, H(N.value, (t, a) => (s(), i("path", {
|
|
1397
|
+
class: "vue-ui-donut-arc-path",
|
|
1398
|
+
d: c.value[a].path,
|
|
1399
|
+
fill: `url(#${t.pattern})`,
|
|
1400
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
1401
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
1402
|
+
filter: $e(a),
|
|
1403
|
+
style: L({
|
|
1404
|
+
transition: X.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
1405
|
+
transformOrigin: "center"
|
|
1406
|
+
})
|
|
1407
|
+
}, null, 12, bo))), 256))
|
|
1408
|
+
])) : d("", !0),
|
|
1409
|
+
(s(!0), i(_, null, H(N.value, (t, a) => (s(), i("path", {
|
|
1410
|
+
class: "vue-ui-donut-arc-path",
|
|
1411
|
+
d: c.value[a].path,
|
|
1412
|
+
fill: e.value.style.chart.useGradient ? `url(#polar_gradient_${a}_${m.value})` : t.color,
|
|
1413
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
1414
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
1415
|
+
filter: $e(a),
|
|
1416
|
+
style: L({
|
|
1417
|
+
transition: X.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
|
|
1418
|
+
})
|
|
1419
|
+
}, null, 12, mo))), 256))
|
|
1420
|
+
])) : (s(), i("g", wo, [
|
|
1421
|
+
l.$slots.pattern ? (s(), i("circle", {
|
|
1422
|
+
key: 0,
|
|
1423
|
+
cx: n.value.width / 2,
|
|
1424
|
+
cy: n.value.height / 2,
|
|
1425
|
+
r: S.value,
|
|
1426
|
+
fill: `url(#pattern_${m.value}_${O.value[0].patternIndex})`,
|
|
1427
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1428
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth
|
|
1429
|
+
}, null, 8, ko)) : d("", !0),
|
|
1430
|
+
g("circle", {
|
|
1431
|
+
cx: n.value.width / 2,
|
|
1432
|
+
cy: n.value.height / 2,
|
|
1433
|
+
r: S.value,
|
|
1434
|
+
fill: e.value.style.chart.useGradient ? `url(#polar_gradient_0_${m.value})` : O.value[0].color,
|
|
1435
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1436
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth
|
|
1437
|
+
}, null, 8, Co)
|
|
1438
|
+
]))
|
|
1439
|
+
], 64)) : (s(), i(_, { key: 9 }, [
|
|
1440
|
+
e.value.type === "classic" && !Ol.value ? (s(), i("g", xo, [
|
|
1441
|
+
(s(!0), i(_, null, H(El.value, (t, a) => (s(), i("path", {
|
|
1442
|
+
class: "vue-ui-donut-arc-path",
|
|
1443
|
+
d: t.arcSlice,
|
|
1444
|
+
fill: t.color,
|
|
1445
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1446
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth
|
|
1447
|
+
}, null, 8, $o))), 256))
|
|
1448
|
+
])) : d("", !0),
|
|
1449
|
+
g("circle", {
|
|
1450
|
+
cx: n.value.width / 2,
|
|
1451
|
+
cy: n.value.height / 2,
|
|
1452
|
+
r: S.value <= 0 ? 10 : S.value,
|
|
1453
|
+
fill: "transparent",
|
|
1454
|
+
stroke: e.value.style.chart.backgroundColor
|
|
1455
|
+
}, null, 8, Ao)
|
|
1456
|
+
], 64)),
|
|
1457
|
+
e.value.style.chart.useGradient && e.value.type === "classic" ? (s(), i("circle", {
|
|
1458
|
+
key: 10,
|
|
1459
|
+
cx: n.value.width / 2,
|
|
1460
|
+
cy: n.value.height / 2,
|
|
1461
|
+
r: (
|
|
1462
|
+
/* This might require adjustments */
|
|
1463
|
+
S.value <= 0 ? 10 : S.value
|
|
1464
|
+
),
|
|
1465
|
+
fill: `url(#gradient_${m.value})`
|
|
1466
|
+
}, null, 8, _o)) : d("", !0),
|
|
1467
|
+
g("circle", {
|
|
1468
|
+
ref_key: "circle_hollow",
|
|
1469
|
+
ref: Sl,
|
|
1470
|
+
style: { pointerEvents: "none" },
|
|
1471
|
+
fill: "none",
|
|
1472
|
+
cx: n.value.width / 2,
|
|
1473
|
+
cy: n.value.height / 2,
|
|
1474
|
+
r: Math.max(0.1, Ce.value * 1.7)
|
|
1475
|
+
}, null, 8, To),
|
|
1476
|
+
V.value ? (s(), i(_, { key: 11 }, [
|
|
1477
|
+
O.value.length > 1 || e.value.type === "classic" ? (s(), i("g", So, [
|
|
1478
|
+
(s(!0), i(_, null, H(O.value.filter((t) => !t.ghost), (t, a) => (s(), i("path", {
|
|
1479
|
+
d: e.value.type === "classic" ? t.arcSlice : c.value[a].path,
|
|
1480
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
1481
|
+
fill: le.value === a ? e.value.style.chart.layout.donut.selectedColor : "transparent",
|
|
1482
|
+
onMouseenter: (r) => ue({
|
|
1483
|
+
datapoint: t,
|
|
1484
|
+
relativeIndex: a,
|
|
1485
|
+
seriesIndex: t.seriesIndex,
|
|
1486
|
+
show: !0
|
|
1487
|
+
}),
|
|
1488
|
+
onMouseleave: (r) => se({ datapoint: t, seriesIndex: t.seriesIndex }),
|
|
1489
|
+
onClick: (r) => re(t, a)
|
|
1490
|
+
}, null, 40, Mo))), 256))
|
|
1491
|
+
])) : (s(), i("g", Fo, [
|
|
1492
|
+
g("circle", {
|
|
1493
|
+
cx: n.value.width / 2,
|
|
1494
|
+
cy: n.value.height / 2,
|
|
1495
|
+
r: S.value,
|
|
1496
|
+
fill: "transparent",
|
|
1497
|
+
onMouseenter: o[0] || (o[0] = (t) => ue({
|
|
1498
|
+
datapoint: O.value[0],
|
|
1499
|
+
relativeIndex: 0,
|
|
1500
|
+
seriesIndex: O.value[0].seriesIndex,
|
|
1501
|
+
show: !0
|
|
1502
|
+
})),
|
|
1503
|
+
onMouseleave: o[1] || (o[1] = (t) => se({ datapoint: O.value[0], seriesIndex: O.value[0].seriesIndex })),
|
|
1504
|
+
onClick: o[2] || (o[2] = (t) => re(O.value[0], l.i))
|
|
1505
|
+
}, null, 40, Lo)
|
|
1506
|
+
]))
|
|
1507
|
+
], 64)) : d("", !0),
|
|
1508
|
+
e.value.type === "classic" ? (s(), i("g", {
|
|
1509
|
+
key: 12,
|
|
1510
|
+
ref_key: "G_hollow",
|
|
1511
|
+
ref: Tl,
|
|
1512
|
+
class: "vue-data-ui-donut-hollow-labels"
|
|
1513
|
+
}, [
|
|
1514
|
+
e.value.style.chart.layout.labels.hollow.total.show ? (s(), i("text", {
|
|
1515
|
+
key: 0,
|
|
1516
|
+
"text-anchor": "middle",
|
|
1517
|
+
x: n.value.width / 2,
|
|
1518
|
+
y: n.value.height / 2 - (e.value.style.chart.layout.labels.hollow.average.show ? e.value.style.chart.layout.labels.hollow.total.fontSize : 0) + e.value.style.chart.layout.labels.hollow.total.offsetY,
|
|
1519
|
+
fill: e.value.style.chart.layout.labels.hollow.total.color,
|
|
1520
|
+
"font-size": e.value.style.chart.layout.labels.hollow.total.fontSize,
|
|
1521
|
+
style: L(`font-weight:${e.value.style.chart.layout.labels.hollow.total.bold ? "bold" : ""}`)
|
|
1522
|
+
}, oe(e.value.style.chart.layout.labels.hollow.total.text), 13, Po)) : d("", !0),
|
|
1523
|
+
e.value.style.chart.layout.labels.hollow.total.show ? (s(), i("text", {
|
|
1524
|
+
key: 1,
|
|
1525
|
+
"text-anchor": "middle",
|
|
1526
|
+
x: n.value.width / 2,
|
|
1527
|
+
y: n.value.height / 2 + e.value.style.chart.layout.labels.hollow.total.fontSize - (e.value.style.chart.layout.labels.hollow.average.show ? e.value.style.chart.layout.labels.hollow.total.fontSize : 0) + e.value.style.chart.layout.labels.hollow.total.value.offsetY,
|
|
1528
|
+
fill: e.value.style.chart.layout.labels.hollow.total.value.color,
|
|
1529
|
+
"font-size": e.value.style.chart.layout.labels.hollow.total.value.fontSize,
|
|
1530
|
+
style: L(`font-weight:${e.value.style.chart.layout.labels.hollow.total.value.bold ? "bold" : ""}`)
|
|
1531
|
+
}, oe(u(j)(
|
|
1532
|
+
e.value.style.chart.layout.labels.hollow.total.value.formatter,
|
|
1533
|
+
V.value,
|
|
1534
|
+
u(G)({
|
|
1535
|
+
p: e.value.style.chart.layout.labels.hollow.total.value.prefix,
|
|
1536
|
+
v: V.value,
|
|
1537
|
+
s: e.value.style.chart.layout.labels.hollow.total.value.suffix
|
|
1538
|
+
})
|
|
1539
|
+
)), 13, Io)) : d("", !0),
|
|
1540
|
+
e.value.style.chart.layout.labels.hollow.average.show ? (s(), i("text", {
|
|
1541
|
+
key: 2,
|
|
1542
|
+
"text-anchor": "middle",
|
|
1543
|
+
x: n.value.width / 2,
|
|
1544
|
+
y: n.value.height / 2 + (e.value.style.chart.layout.labels.hollow.total.show ? e.value.style.chart.layout.labels.hollow.average.fontSize : 0) + e.value.style.chart.layout.labels.hollow.average.offsetY,
|
|
1545
|
+
fill: e.value.style.chart.layout.labels.hollow.average.color,
|
|
1546
|
+
"font-size": e.value.style.chart.layout.labels.hollow.average.fontSize,
|
|
1547
|
+
style: L(`font-weight:${e.value.style.chart.layout.labels.hollow.average.bold ? "bold" : ""}`)
|
|
1548
|
+
}, oe(e.value.style.chart.layout.labels.hollow.average.text), 13, Do)) : d("", !0),
|
|
1549
|
+
e.value.style.chart.layout.labels.hollow.average.show ? (s(), i("text", {
|
|
1550
|
+
key: 3,
|
|
1551
|
+
"text-anchor": "middle",
|
|
1552
|
+
x: n.value.width / 2,
|
|
1553
|
+
y: n.value.height / 2 + (e.value.style.chart.layout.labels.hollow.total.show ? e.value.style.chart.layout.labels.hollow.average.fontSize : 0) + e.value.style.chart.layout.labels.hollow.average.fontSize + e.value.style.chart.layout.labels.hollow.average.value.offsetY,
|
|
1554
|
+
fill: e.value.style.chart.layout.labels.hollow.average.value.color,
|
|
1555
|
+
"font-size": e.value.style.chart.layout.labels.hollow.average.value.fontSize,
|
|
1556
|
+
style: L(`font-weight:${e.value.style.chart.layout.labels.hollow.average.value.bold ? "bold" : ""}`)
|
|
1557
|
+
}, oe(xe.value || X.value ? "--" : u(j)(
|
|
1558
|
+
e.value.style.chart.layout.labels.hollow.average.value.formatter,
|
|
1559
|
+
st.value,
|
|
1560
|
+
u(G)({
|
|
1561
|
+
p: e.value.style.chart.layout.labels.hollow.average.value.prefix,
|
|
1562
|
+
v: st.value,
|
|
1563
|
+
s: e.value.style.chart.layout.labels.hollow.average.value.suffix,
|
|
1564
|
+
r: e.value.style.chart.layout.labels.hollow.average.value.rounding
|
|
1565
|
+
})
|
|
1566
|
+
)), 13, Yo)) : d("", !0)
|
|
1567
|
+
], 512)) : d("", !0),
|
|
1568
|
+
(s(!0), i(_, null, H(N.value.filter((t) => !t.ghost), (t, a) => (s(), i("g", {
|
|
1569
|
+
filter: $e(a),
|
|
1570
|
+
class: dt({ animated: e.value.useCssAnimation }),
|
|
1571
|
+
key: t.seriesIndex
|
|
1572
|
+
}, [
|
|
1573
|
+
e.value.style.chart.layout.labels.dataLabels.useLabelSlots ? (s(), i("g", Bo, [
|
|
1574
|
+
(s(), i("foreignObject", {
|
|
1575
|
+
x: u($)(t, !0).anchor === "end" ? u($)(t).x - 120 : u($)(t, !0).anchor === "middle" ? u($)(t).x - 60 : u($)(t).x,
|
|
1576
|
+
y: u(he)(t) - (Vt.value ? 20 : 0),
|
|
1577
|
+
width: "120",
|
|
1578
|
+
height: "60",
|
|
1579
|
+
style: { overflow: "visible" }
|
|
1580
|
+
}, [
|
|
1581
|
+
g("div", null, [
|
|
1582
|
+
p(l.$slots, "dataLabel", ft({ ref_for: !0 }, {
|
|
1583
|
+
datapoint: t,
|
|
1584
|
+
isBlur: !e.value.useBlurOnHover || [null, void 0].includes(le.value) || le.value === a,
|
|
1585
|
+
isSafari: Vt.value,
|
|
1586
|
+
isVisible: U(t) && b.value.dataLabels.show,
|
|
1587
|
+
textAlign: u($)(t, !0, 16, !0).anchor,
|
|
1588
|
+
flexAlign: u($)(t, !0, 16).anchor,
|
|
1589
|
+
percentage: Ie(t, N.value)
|
|
1590
|
+
}), void 0, !0)
|
|
1591
|
+
])
|
|
1592
|
+
], 8, Xo))
|
|
1593
|
+
])) : (s(), i("g", Oo, [
|
|
1594
|
+
e.value.type === "classic" ? (s(), i(_, { key: 0 }, [
|
|
1595
|
+
U(t) && b.value.dataLabels.show ? (s(), i("circle", {
|
|
1596
|
+
key: 0,
|
|
1597
|
+
cx: Y.value[a]?.markerX ?? u($)(t).x,
|
|
1598
|
+
cy: Y.value[a]?.markerY ?? u(he)(t) - 3.5,
|
|
1599
|
+
fill: t.color,
|
|
1600
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1601
|
+
"stroke-width": 1,
|
|
1602
|
+
r: 3,
|
|
1603
|
+
filter: !e.value.useBlurOnHover || [null, void 0].includes(le.value) || le.value === a ? "" : `url(#blur_${m.value})`,
|
|
1604
|
+
onClick: (r) => re(t, a),
|
|
1605
|
+
onMouseenter: (r) => ue({
|
|
1606
|
+
datapoint: t,
|
|
1607
|
+
relativeIndex: a,
|
|
1608
|
+
seriesIndex: t.seriesIndex,
|
|
1609
|
+
show: !0
|
|
1610
|
+
}),
|
|
1611
|
+
onMouseleave: (r) => se({ datapoint: t, seriesIndex: t.seriesIndex })
|
|
1612
|
+
}, null, 40, Eo)) : d("", !0),
|
|
1613
|
+
e.value.style.chart.layout.labels.dataLabels.oneLine || Y.value[a] ? qe((s(), i("text", {
|
|
1614
|
+
key: 1,
|
|
1615
|
+
class: "vue-data-ui-datalabel-inline",
|
|
1616
|
+
"text-anchor": Y.value[a]?.textAnchor || u($)(t, !0, 12).anchor,
|
|
1617
|
+
x: Y.value[a]?.labelX ?? u($)(t, !0, 12).x,
|
|
1618
|
+
y: Y.value[a]?.labelY ?? u(he)(t),
|
|
1619
|
+
onClick: (r) => re(t, a),
|
|
1620
|
+
onMouseenter: (r) => ue({
|
|
1621
|
+
datapoint: t,
|
|
1622
|
+
relativeIndex: a,
|
|
1623
|
+
seriesIndex: t.seriesIndex,
|
|
1624
|
+
show: !0
|
|
1625
|
+
}),
|
|
1626
|
+
onMouseleave: (r) => se({ datapoint: t, seriesIndex: t.seriesIndex }),
|
|
1627
|
+
innerHTML: Gl(t, a, !!Y.value[a])
|
|
1628
|
+
}, null, 40, No)), [
|
|
1629
|
+
[We, U(t) && b.value.dataLabels.show]
|
|
1630
|
+
]) : (s(), i(_, { key: 2 }, [
|
|
1631
|
+
qe(g("text", {
|
|
1632
|
+
class: "vue-data-ui-datalabel-value",
|
|
1633
|
+
"text-anchor": Y.value[a]?.textAnchor || u($)(t, !0, 12).anchor,
|
|
1634
|
+
x: Y.value[a]?.labelX ?? u($)(t, !0, 12).x,
|
|
1635
|
+
y: Y.value[a]?.labelY ?? u(he)(t),
|
|
1636
|
+
fill: e.value.style.chart.layout.labels.percentage.color,
|
|
1637
|
+
"font-size": Se.value + "px",
|
|
1638
|
+
style: L(`font-weight:${e.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}`),
|
|
1639
|
+
onClick: (r) => re(t, a),
|
|
1640
|
+
onMouseenter: (r) => ue({
|
|
1641
|
+
datapoint: t,
|
|
1642
|
+
relativeIndex: a,
|
|
1643
|
+
seriesIndex: t.seriesIndex,
|
|
1644
|
+
show: !0
|
|
1645
|
+
}),
|
|
1646
|
+
onMouseleave: (r) => se({ datapoint: t, seriesIndex: t.seriesIndex })
|
|
1647
|
+
}, oe(Ie(t, N.value)) + " " + oe(e.value.style.chart.layout.labels.value.show ? `(${u(j)(
|
|
1648
|
+
e.value.style.chart.layout.labels.value.formatter,
|
|
1649
|
+
t.value,
|
|
1650
|
+
u(G)({
|
|
1651
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
1652
|
+
v: t.value,
|
|
1653
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
1654
|
+
r: e.value.style.chart.layout.labels.value.rounding
|
|
1655
|
+
}),
|
|
1656
|
+
{ datapoint: t }
|
|
1657
|
+
)})` : ""), 45, Vo), [
|
|
1658
|
+
[We, U(t) && b.value.dataLabels.show]
|
|
1659
|
+
]),
|
|
1660
|
+
qe(g("text", {
|
|
1661
|
+
class: "vue-data-ui-datalabel-name",
|
|
1662
|
+
"text-anchor": Y.value[a]?.textAnchor || u($)(t).anchor,
|
|
1663
|
+
x: Y.value[a]?.labelX ?? u($)(t, !0, 12).x,
|
|
1664
|
+
y: (Y.value[a]?.labelY ?? u(he)(t)) + E.value * 1.2,
|
|
1665
|
+
fill: e.value.style.chart.layout.labels.name.color,
|
|
1666
|
+
"font-size": E.value + "px",
|
|
1667
|
+
style: L(`font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : ""}`),
|
|
1668
|
+
onClick: (r) => re(t, a),
|
|
1669
|
+
onMouseenter: (r) => ue({
|
|
1670
|
+
datapoint: t,
|
|
1671
|
+
relativeIndex: a,
|
|
1672
|
+
seriesIndex: t.seriesIndex,
|
|
1673
|
+
show: !0
|
|
1674
|
+
}),
|
|
1675
|
+
onMouseleave: (r) => se({ datapoint: t, seriesIndex: t.seriesIndex }),
|
|
1676
|
+
innerHTML: u(ol)({
|
|
1677
|
+
content: t.name,
|
|
1678
|
+
fontSize: E.value,
|
|
1679
|
+
fill: e.value.style.chart.layout.labels.name.color,
|
|
1680
|
+
x: Y.value[a]?.labelX ?? u($)(t, !0, 12).x,
|
|
1681
|
+
y: (Y.value[a]?.labelY ?? u(he)(t)) + E.value
|
|
1682
|
+
})
|
|
1683
|
+
}, null, 44, Ro), [
|
|
1684
|
+
[We, U(t) && b.value.dataLabels.show]
|
|
1685
|
+
])
|
|
1686
|
+
], 64))
|
|
1687
|
+
], 64)) : d("", !0),
|
|
1688
|
+
e.value.type === "polar" ? (s(), i(_, { key: 1 }, [
|
|
1689
|
+
U(t) && b.value.dataLabels.show ? (s(), i("circle", {
|
|
1690
|
+
key: 0,
|
|
1691
|
+
cx: u(D)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
|
|
1692
|
+
cy: u(D)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y,
|
|
1693
|
+
fill: t.color,
|
|
1694
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1695
|
+
"stroke-width": 1,
|
|
1696
|
+
r: 3,
|
|
1697
|
+
filter: !e.value.useBlurOnHover || [null, void 0].includes(le.value) || le.value === a ? "" : `url(#blur_${m.value})`,
|
|
1698
|
+
onClick: (r) => re(t, a),
|
|
1699
|
+
onMouseenter: (r) => ue({
|
|
1700
|
+
datapoint: t,
|
|
1701
|
+
relativeIndex: a,
|
|
1702
|
+
seriesIndex: t.seriesIndex,
|
|
1703
|
+
show: !0
|
|
1704
|
+
}),
|
|
1705
|
+
onMouseleave: (r) => se({ datapoint: t, seriesIndex: t.seriesIndex }),
|
|
1706
|
+
style: L({
|
|
1707
|
+
transition: X.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
|
|
1708
|
+
})
|
|
1709
|
+
}, null, 44, Ho)) : d("", !0),
|
|
1710
|
+
e.value.style.chart.layout.labels.dataLabels.oneLine ? qe((s(), i("text", {
|
|
1711
|
+
key: 1,
|
|
1712
|
+
class: "vue-data-ui-datalabel-inline",
|
|
1713
|
+
"text-anchor": ye(c.value[a].middlePoint),
|
|
1714
|
+
x: u(D)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
|
|
1715
|
+
y: u(D)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y,
|
|
1716
|
+
style: L({
|
|
1717
|
+
transition: X.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
|
|
1718
|
+
}),
|
|
1719
|
+
onClick: (r) => re(t, a),
|
|
1720
|
+
onMouseenter: (r) => ue({
|
|
1721
|
+
datapoint: t,
|
|
1722
|
+
relativeIndex: a,
|
|
1723
|
+
seriesIndex: t.seriesIndex,
|
|
1724
|
+
show: !0
|
|
1725
|
+
}),
|
|
1726
|
+
onMouseleave: (r) => se({ datapoint: t, seriesIndex: t.seriesIndex }),
|
|
1727
|
+
innerHTML: Ul(t, a)
|
|
1728
|
+
}, null, 44, Go)), [
|
|
1729
|
+
[We, U(t) && b.value.dataLabels.show]
|
|
1730
|
+
]) : (s(), i(_, { key: 2 }, [
|
|
1731
|
+
U(t) && b.value.dataLabels.show ? (s(), i("text", {
|
|
1732
|
+
key: 0,
|
|
1733
|
+
class: "vue-data-ui-datalabel-value",
|
|
1734
|
+
"text-anchor": ye(c.value[a].middlePoint),
|
|
1735
|
+
x: u(D)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
|
|
1736
|
+
y: u(D)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y,
|
|
1737
|
+
fill: e.value.style.chart.layout.labels.percentage.color,
|
|
1738
|
+
"font-size": Se.value,
|
|
1739
|
+
style: L({
|
|
1740
|
+
transition: X.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
1741
|
+
fontWeight: e.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"
|
|
1742
|
+
}),
|
|
1743
|
+
onClick: (r) => re(t, a),
|
|
1744
|
+
onMouseenter: (r) => ue({
|
|
1745
|
+
datapoint: t,
|
|
1746
|
+
relativeIndex: a,
|
|
1747
|
+
seriesIndex: t.seriesIndex,
|
|
1748
|
+
show: !0
|
|
1749
|
+
}),
|
|
1750
|
+
onMouseleave: (r) => se({ datapoint: t, seriesIndex: t.seriesIndex })
|
|
1751
|
+
}, oe(Ie(t, N.value)) + " " + oe(e.value.style.chart.layout.labels.value.show ? `(${u(j)(
|
|
1752
|
+
e.value.style.chart.layout.labels.value.formatter,
|
|
1753
|
+
t.value,
|
|
1754
|
+
u(G)({
|
|
1755
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
1756
|
+
v: t.value,
|
|
1757
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
1758
|
+
r: e.value.style.chart.layout.labels.value.rounding
|
|
1759
|
+
}),
|
|
1760
|
+
{ datapoint: t }
|
|
1761
|
+
)})` : ""), 45, Uo)) : d("", !0),
|
|
1762
|
+
U(t) && b.value.dataLabels.show ? (s(), i("text", {
|
|
1763
|
+
key: 1,
|
|
1764
|
+
class: "vue-data-ui-datalabel-name",
|
|
1765
|
+
"text-anchor": ye(c.value[a].middlePoint),
|
|
1766
|
+
x: u(D)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
|
|
1767
|
+
y: u(D)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y + E.value * 1.2,
|
|
1768
|
+
fill: e.value.style.chart.layout.labels.name.color,
|
|
1769
|
+
"font-size": E.value,
|
|
1770
|
+
style: L({
|
|
1771
|
+
transition: X.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
1772
|
+
fontWeight: e.value.style.chart.layout.labels.name.bold ? "bold" : "normal"
|
|
1773
|
+
}),
|
|
1774
|
+
onClick: (r) => re(t, a),
|
|
1775
|
+
onMouseenter: (r) => ue({
|
|
1776
|
+
datapoint: t,
|
|
1777
|
+
relativeIndex: a,
|
|
1778
|
+
seriesIndex: t.seriesIndex,
|
|
1779
|
+
show: !0
|
|
1780
|
+
}),
|
|
1781
|
+
onMouseleave: (r) => se({ datapoint: t, seriesIndex: t.seriesIndex }),
|
|
1782
|
+
innerHTML: u(ol)({
|
|
1783
|
+
content: t.name,
|
|
1784
|
+
fontSize: Se.value,
|
|
1785
|
+
fill: e.value.style.chart.layout.labels.name.color,
|
|
1786
|
+
x: u(D)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
|
|
1787
|
+
y: u(D)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y + E.value * 1.2
|
|
1788
|
+
})
|
|
1789
|
+
}, null, 44, jo)) : d("", !0)
|
|
1790
|
+
], 64))
|
|
1791
|
+
], 64)) : d("", !0)
|
|
1792
|
+
])),
|
|
1793
|
+
b.value.dataLabels.show && e.value.style.chart.comments.show && t.comment ? (s(), i("g", qo, [
|
|
1794
|
+
U(t) && e.value.type === "classic" ? (s(), i("foreignObject", {
|
|
1795
|
+
key: 0,
|
|
1796
|
+
x: e.value.style.chart.comments.offsetX + (u($)(t, !0).anchor === "end" ? u($)(t).x - e.value.style.chart.comments.width : u($)(t, !0).anchor === "middle" ? u($)(t).x - e.value.style.chart.comments.width / 2 : u($)(t).x),
|
|
1797
|
+
y: u(he)(t) + 24 + e.value.style.chart.comments.offsetY,
|
|
1798
|
+
width: e.value.style.chart.comments.width,
|
|
1799
|
+
height: "200",
|
|
1800
|
+
style: { overflow: "visible", "pointer-events": "none" }
|
|
1801
|
+
}, [
|
|
1802
|
+
g("div", null, [
|
|
1803
|
+
p(l.$slots, "plot-comment", {
|
|
1804
|
+
plot: { ...t, textAlign: u($)(t, !0, 16, !0).anchor, flexAlign: u($)(t, !0, 16).anchor, isFirstLoad: X.value }
|
|
1805
|
+
}, void 0, !0)
|
|
1806
|
+
])
|
|
1807
|
+
], 8, Wo)) : d("", !0),
|
|
1808
|
+
U(t) && e.value.type === "polar" ? (s(), i("foreignObject", {
|
|
1809
|
+
key: 1,
|
|
1810
|
+
x: e.value.style.chart.comments.offsetX + (ye(c.value[a].middlePoint) === "end" ? u(D)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x - e.value.style.chart.comments.width : ye(c.value[a].middlePoint) === "middle" ? u(D)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x - e.value.style.chart.comments.width / 2 : u(D)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x),
|
|
1811
|
+
y: Nl(c.value[a]) + e.value.style.chart.comments.offsetY,
|
|
1812
|
+
width: e.value.style.chart.comments.width,
|
|
1813
|
+
height: "200",
|
|
1814
|
+
style: L({
|
|
1815
|
+
transition: X.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
1816
|
+
overflow: "visible",
|
|
1817
|
+
pointerEvents: "none"
|
|
1818
|
+
})
|
|
1819
|
+
}, [
|
|
1820
|
+
g("div", null, [
|
|
1821
|
+
p(l.$slots, "plot-comment", {
|
|
1822
|
+
plot: { ...t, textAlign: ye(c.value[a].middlePoint), flexAlign: ye(c.value[a].middlePoint), isFirstLoad: X.value }
|
|
1823
|
+
}, void 0, !0)
|
|
1824
|
+
])
|
|
1825
|
+
], 12, Qo)) : d("", !0)
|
|
1826
|
+
])) : d("", !0)
|
|
1827
|
+
], 10, zo))), 128)),
|
|
1828
|
+
p(l.$slots, "svg", { svg: n.value }, void 0, !0)
|
|
1829
|
+
], 512)
|
|
1830
|
+
], 14, Ea)),
|
|
1831
|
+
l.$slots.watermark ? (s(), i("div", Jo, [
|
|
1832
|
+
p(l.$slots, "watermark", Z(ee({ isPrinting: u(Pt) || u(It) })), void 0, !0)
|
|
1833
|
+
])) : d("", !0),
|
|
1834
|
+
g("div", {
|
|
1835
|
+
id: `legend-bottom-${m.value}`
|
|
1836
|
+
}, null, 8, Ko),
|
|
1837
|
+
_t.value ? (s(), me(na, {
|
|
1838
|
+
key: 5,
|
|
1839
|
+
to: e.value.style.chart.legend.position === "top" ? `#legend-top-${m.value}` : `#legend-bottom-${m.value}`
|
|
1840
|
+
}, [
|
|
1841
|
+
g("div", {
|
|
1842
|
+
ref_key: "chartLegend",
|
|
1843
|
+
ref: wt
|
|
1844
|
+
}, [
|
|
1845
|
+
e.value.style.chart.legend.show ? (s(), me(za, {
|
|
1846
|
+
key: `legend_${At.value}`,
|
|
1847
|
+
legendSet: nt.value,
|
|
1848
|
+
config: Xl.value,
|
|
1849
|
+
onClickMarker: o[3] || (o[3] = ({ i: t }) => Ve(t))
|
|
1850
|
+
}, ht({
|
|
1851
|
+
item: k(({ legend: t, index: a }) => [
|
|
1852
|
+
g("div", {
|
|
1853
|
+
style: L(`opacity:${Q.value.includes(a) ? 0.5 : 1}`),
|
|
1854
|
+
onClick: (r) => t.segregate()
|
|
1855
|
+
}, oe(t.display), 13, Zo)
|
|
1856
|
+
]),
|
|
1857
|
+
_: 2
|
|
1858
|
+
}, [
|
|
1859
|
+
l.$slots.pattern ? {
|
|
1860
|
+
name: "legend-pattern",
|
|
1861
|
+
fn: k(({ legend: t, index: a }) => [
|
|
1862
|
+
je(Da, {
|
|
1863
|
+
shape: t.shape,
|
|
1864
|
+
radius: 30,
|
|
1865
|
+
stroke: "none",
|
|
1866
|
+
plot: { x: 30, y: 30 },
|
|
1867
|
+
fill: `url(#pattern_${m.value}_${a})`
|
|
1868
|
+
}, null, 8, ["shape", "fill"])
|
|
1869
|
+
]),
|
|
1870
|
+
key: "0"
|
|
1871
|
+
} : void 0
|
|
1872
|
+
]), 1032, ["legendSet", "config"])) : d("", !0),
|
|
1873
|
+
p(l.$slots, "legend", { legend: nt.value }, void 0, !0)
|
|
1874
|
+
], 512)
|
|
1875
|
+
], 8, ["to"])) : d("", !0),
|
|
1876
|
+
l.$slots.source ? (s(), i("div", {
|
|
1877
|
+
key: 6,
|
|
1878
|
+
ref_key: "source",
|
|
1879
|
+
ref: kt,
|
|
1880
|
+
dir: "auto"
|
|
1881
|
+
}, [
|
|
1882
|
+
p(l.$slots, "source", {}, void 0, !0)
|
|
1883
|
+
], 512)) : d("", !0),
|
|
1884
|
+
l.$slots.hollow ? (s(), i("div", en, [
|
|
1885
|
+
p(l.$slots, "hollow", Z(ee({
|
|
1886
|
+
total: V.value,
|
|
1887
|
+
average: st.value,
|
|
1888
|
+
dataset: q.value
|
|
1889
|
+
})), void 0, !0)
|
|
1890
|
+
])) : d("", !0),
|
|
1891
|
+
je(u(yl), {
|
|
1892
|
+
show: b.value.showTooltip && tt.value,
|
|
1893
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
1894
|
+
color: e.value.style.chart.tooltip.color,
|
|
1895
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
1896
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
1897
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
1898
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
1899
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
1900
|
+
position: e.value.style.chart.tooltip.position,
|
|
1901
|
+
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
1902
|
+
parent: te.value,
|
|
1903
|
+
content: lt.value,
|
|
1904
|
+
isCustom: De.value,
|
|
1905
|
+
isFullscreen: Ae.value,
|
|
1906
|
+
smooth: e.value.style.chart.tooltip.smooth,
|
|
1907
|
+
backdropFilter: e.value.style.chart.tooltip.backdropFilter,
|
|
1908
|
+
smoothForce: e.value.style.chart.tooltip.smoothForce,
|
|
1909
|
+
smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThrehsold
|
|
1910
|
+
}, {
|
|
1911
|
+
"tooltip-before": k(() => [
|
|
1912
|
+
p(l.$slots, "tooltip-before", Z(ee({ ...ut.value })), void 0, !0)
|
|
1913
|
+
]),
|
|
1914
|
+
"tooltip-after": k(() => [
|
|
1915
|
+
p(l.$slots, "tooltip-after", Z(ee({ ...ut.value })), void 0, !0)
|
|
1916
|
+
]),
|
|
1917
|
+
_: 3
|
|
1918
|
+
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
|
|
1919
|
+
Be.value && e.value.userOptions.buttons.table ? (s(), me(sa(Ye.value.component), ft({ key: 8 }, Ye.value.props, {
|
|
1920
|
+
ref_key: "tableUnit",
|
|
1921
|
+
ref: Pe,
|
|
1922
|
+
onClose: Ut
|
|
1923
|
+
}), ht({
|
|
1924
|
+
content: k(() => [
|
|
1925
|
+
(s(), me(u(bl), {
|
|
1926
|
+
key: `table_${$t.value}`,
|
|
1927
|
+
colNames: Re.value.colNames,
|
|
1928
|
+
head: Re.value.head,
|
|
1929
|
+
body: Re.value.body,
|
|
1930
|
+
config: Re.value.config,
|
|
1931
|
+
title: e.value.table.useDialog ? "" : Ye.value.title,
|
|
1932
|
+
withCloseButton: !e.value.table.useDialog,
|
|
1933
|
+
onClose: Ut
|
|
1934
|
+
}, {
|
|
1935
|
+
th: k(({ th: t }) => [
|
|
1936
|
+
g("div", {
|
|
1937
|
+
innerHTML: t,
|
|
1938
|
+
style: { display: "flex", "align-items": "center" }
|
|
1939
|
+
}, null, 8, tn)
|
|
1940
|
+
]),
|
|
1941
|
+
td: k(({ td: t }) => [
|
|
1942
|
+
el(oe(t.name ? t.name : isNaN(Number(t)) ? t.includes("%") ? t : u(j)(
|
|
1943
|
+
e.value.style.chart.layout.labels.percentage.formatter,
|
|
1944
|
+
t,
|
|
1945
|
+
u(G)({
|
|
1946
|
+
v: t,
|
|
1947
|
+
s: "%",
|
|
1948
|
+
r: e.value.style.chart.layout.labels.percentage.rounding
|
|
1949
|
+
})
|
|
1950
|
+
) : u(j)(
|
|
1951
|
+
e.value.style.chart.layout.labels.value.formatter,
|
|
1952
|
+
t,
|
|
1953
|
+
u(G)({
|
|
1954
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
1955
|
+
v: t,
|
|
1956
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
1957
|
+
r: e.value.style.chart.layout.labels.value.rounding
|
|
1958
|
+
})
|
|
1959
|
+
)), 1)
|
|
1960
|
+
]),
|
|
1961
|
+
_: 1
|
|
1962
|
+
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
|
|
1963
|
+
]),
|
|
1964
|
+
_: 2
|
|
1965
|
+
}, [
|
|
1966
|
+
e.value.table.useDialog ? {
|
|
1967
|
+
name: "title",
|
|
1968
|
+
fn: k(() => [
|
|
1969
|
+
el(oe(Ye.value.title), 1)
|
|
1970
|
+
]),
|
|
1971
|
+
key: "0"
|
|
1972
|
+
} : void 0,
|
|
1973
|
+
e.value.table.useDialog ? {
|
|
1974
|
+
name: "actions",
|
|
1975
|
+
fn: k(() => [
|
|
1976
|
+
g("button", {
|
|
1977
|
+
tabindex: "0",
|
|
1978
|
+
class: "vue-ui-user-options-button",
|
|
1979
|
+
onClick: o[4] || (o[4] = (t) => rt(e.value.userOptions.callbacks.csv))
|
|
1980
|
+
}, [
|
|
1981
|
+
je(u(gl), {
|
|
1982
|
+
name: "excel",
|
|
1983
|
+
stroke: Ye.value.props.color
|
|
1984
|
+
}, null, 8, ["stroke"])
|
|
1985
|
+
])
|
|
1986
|
+
]),
|
|
1987
|
+
key: "1"
|
|
1988
|
+
} : void 0
|
|
1989
|
+
]), 1040)) : d("", !0),
|
|
1990
|
+
u(Oe) ? (s(), me(Sa, { key: 9 })) : d("", !0)
|
|
1991
|
+
], 46, Xa));
|
|
1992
|
+
}
|
|
1993
|
+
}, an = /* @__PURE__ */ Ba(ln, [["__scopeId", "data-v-028aa13a"]]), kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1994
|
+
__proto__: null,
|
|
1995
|
+
default: an
|
|
1996
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1997
|
+
export {
|
|
1998
|
+
an as V,
|
|
1999
|
+
kn as a,
|
|
2000
|
+
wn as v
|
|
2001
|
+
};
|