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