vue-data-ui 3.25.13 → 3.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -53
- package/dist/{Arrow-BhZDUeMp.js → Arrow-Bt3aGRMb.js} +1 -1
- package/dist/{BaseDraggableDialog-Ck6R5Q0K.js → BaseDraggableDialog-C1Slb3Yh.js} +2 -2
- package/dist/{BaseIcon-Dlz7gfx0.js → BaseIcon-BV75ei8X.js} +1 -1
- package/dist/{BaseLegendToggle-DGG65LAR.js → BaseLegendToggle-DtS_Oj3B.js} +1 -1
- package/dist/{BaseZoomControls-BK0PxEa8.js → BaseZoomControls-DIhoeyZu.js} +2 -2
- package/dist/{ColorPicker-DMTwxvi_.js → ColorPicker--Y89hTnE.js} +2 -2
- package/dist/{DataTable-BD1eZ0zB.js → DataTable-DX5fToAo.js} +2 -2
- package/dist/{HillActions-CiP2m7Nz.js → HillActions-D6weVdns.js} +1 -1
- package/dist/{Legend-C0Ln0VNe.js → Legend-Dv90gh-6.js} +2 -2
- package/dist/{NonSvgPenAndPaper-BjrMLISf.js → NonSvgPenAndPaper-D2BM5C1-.js} +3 -3
- package/dist/{PackageVersion-D5QkTJQU.js → PackageVersion-DhXk363L.js} +1 -1
- package/dist/{PenAndPaper-XdUD8uB3.js → PenAndPaper-DkQ4sEhs.js} +3 -3
- package/dist/{Shape-VCdxvFV9.js → Shape-B_kDj1gF.js} +1 -1
- package/dist/SlicerPreview-BgyIezm0.js +1730 -0
- package/dist/{SparkTooltip-B1gRxPfb.js → SparkTooltip-BNpyQ021.js} +1 -1
- package/dist/{Title-DeqmC-vN.js → Title-C2JKI5td.js} +1 -1
- package/dist/{Tooltip-DZ4a3XJQ.js → Tooltip-2NAb_Rrx.js} +1 -1
- package/dist/{UserOptions-wFD9vo9g.js → UserOptions-Dgn3StKw.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-bump.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-geo.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-hill.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-label.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-DdqmzDdY.js → dom-to-png-DKdtTkNC.js} +1 -1
- package/dist/{exposedLib-BBtjpydc.js → exposedLib-DN6QRAx2.js} +1 -1
- package/dist/{img-W50sC9SC.js → img-CaIaBHA0.js} +1 -1
- package/dist/{labelUtils-Dvm-7rse.js → labelUtils-CD5XzcAo.js} +1 -1
- package/dist/{lib-DOpaUOQx.js → lib-CklJ7rIN.js} +29 -18
- package/dist/{package-Cmcke8zR.js → package-BVRea5S_.js} +1 -1
- package/dist/{pdf-zGbDDpCi.js → pdf-6hacmnKW.js} +1 -1
- package/dist/{render-common-CG1wuHZY.js → render-common-ChwuwzU3.js} +2 -2
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +110 -5
- package/dist/types/vue-ui-candlestick.d.ts +4 -0
- package/dist/types/vue-ui-donut-evolution.d.ts +4 -0
- package/dist/types/vue-ui-quick-chart.d.ts +4 -0
- package/dist/types/vue-ui-sparkline.d.ts +5 -1
- package/dist/types/vue-ui-stackbar.d.ts +4 -0
- package/dist/types/vue-ui-stackline.d.ts +4 -0
- package/dist/types/vue-ui-xy-canvas.d.ts +2 -0
- package/dist/types/vue-ui-xy.d.ts +2 -0
- package/dist/{useConfig-C2uy4ltq.js → useConfig-DObkR9Aa.js} +49 -4
- package/dist/{useNestedProp-Bux0f4iY.js → useNestedProp-Tc9i6ZcN.js} +1 -1
- package/dist/{useObjectBindings-CEuNiBIT.js → useObjectBindings-CPmyIJxB.js} +9 -9
- package/dist/{usePrinter-BBBooAGP.js → usePrinter-Dp3X1vqr.js} +2 -2
- package/dist/utils.js +3 -3
- package/dist/vue-data-ui-Dr0uoRD_.js +191 -0
- package/dist/vue-data-ui.js +74 -74
- package/dist/{vue-ui-3d-bar-Ckauu3d4.js → vue-ui-3d-bar-BvJwq13N.js} +7 -7
- package/dist/{vue-ui-accordion-yHZMJLaY.js → vue-ui-accordion-15kKhkup.js} +4 -4
- package/dist/{vue-ui-age-pyramid-BczIt1-U.js → vue-ui-age-pyramid-CVzina7X.js} +7 -7
- package/dist/{vue-ui-annotator-BGB6K6u0.js → vue-ui-annotator-J4Wo2_DR.js} +7 -7
- package/dist/{vue-ui-bullet-BoTsLccZ.js → vue-ui-bullet-CuI5_uF1.js} +8 -8
- package/dist/{vue-ui-bump-B5ztSSQO.js → vue-ui-bump-GGNG4vwu.js} +7 -7
- package/dist/vue-ui-candlestick-Ca9dvzvk.js +2144 -0
- package/dist/{vue-ui-carousel-table-D-3KSWok.js → vue-ui-carousel-table-DOxh9sEm.js} +5 -5
- package/dist/{vue-ui-chestnut-W2l-W0_e.js → vue-ui-chestnut-DQhC_gB8.js} +6 -6
- package/dist/{vue-ui-chord-BFPQsMj8.js → vue-ui-chord-Blnvne2p.js} +9 -9
- package/dist/{vue-ui-circle-pack-BtPc1BR3.js → vue-ui-circle-pack-mNHA1U8B.js} +7 -7
- package/dist/{vue-ui-cursor-CpNOiwkt.js → vue-ui-cursor-D2hgivhn.js} +4 -4
- package/dist/{vue-ui-dag-i-zPwLcN.js → vue-ui-dag-DDSyO2ts.js} +8 -8
- package/dist/{vue-ui-dashboard-DtaW9a2P.js → vue-ui-dashboard-C9MnWAnE.js} +70 -70
- package/dist/{vue-ui-digits-BIlec9af.js → vue-ui-digits-h7H-yHd0.js} +4 -4
- package/dist/{vue-ui-donut-CJlBEyxu.js → vue-ui-donut-D-8OekQ5.js} +3 -3
- package/dist/vue-ui-donut-evolution-CJ6tIbgl.js +1869 -0
- package/dist/{vue-ui-donut-Bgf-n95J.js → vue-ui-donut-oY4iu5pY.js} +11 -11
- package/dist/{vue-ui-dumbbell-C112YLkC.js → vue-ui-dumbbell-52gWeLGK.js} +8 -8
- package/dist/{vue-ui-flow-j4bDg9Zd.js → vue-ui-flow-edMUCkcr.js} +8 -8
- package/dist/{vue-ui-funnel-CVHpfBCW.js → vue-ui-funnel-B08mSlHH.js} +7 -7
- package/dist/{vue-ui-galaxy-ChGpUWh8.js → vue-ui-galaxy-CV59UO9t.js} +10 -10
- package/dist/{vue-ui-gauge-Cp00vXfG.js → vue-ui-gauge-BnBzapom.js} +7 -7
- package/dist/{vue-ui-geo-B4hDk5NO.js → vue-ui-geo-BCmDw5me.js} +8 -8
- package/dist/{vue-ui-gizmo-D6nCCsS4.js → vue-ui-gizmo-BZBV8haQ.js} +4 -4
- package/dist/{vue-ui-heatmap-scVJc1cw.js → vue-ui-heatmap-CjiffI23.js} +8 -8
- package/dist/{vue-ui-hill-DnYUHGAK.js → vue-ui-hill-D5WV6zro.js} +7 -7
- package/dist/{vue-ui-history-plot-C5qAMaaW.js → vue-ui-history-plot-Bd06L1Od.js} +9 -9
- package/dist/{vue-ui-horizontal-bar-nEG4uvpv.js → vue-ui-horizontal-bar-B5Yp6Uql.js} +11 -11
- package/dist/{vue-ui-kpi-DOxId6xg.js → vue-ui-kpi-CNreX8BM.js} +4 -4
- package/dist/{vue-ui-label-BDKY7BI7.js → vue-ui-label-BDP67zvQ.js} +4 -4
- package/dist/{vue-ui-mini-loader-BknVs9VJ.js → vue-ui-mini-loader-pzS7SsP4.js} +3 -3
- package/dist/{vue-ui-molecule-_x232mMu.js → vue-ui-molecule-DqeRhja8.js} +6 -6
- package/dist/{vue-ui-mood-radar-D-F4855V.js → vue-ui-mood-radar-Cgl_QD-j.js} +8 -8
- package/dist/{vue-ui-nested-donuts-0E5IllFW.js → vue-ui-nested-donuts-MDPBZLnW.js} +10 -10
- package/dist/{vue-ui-onion-Eip0S1H7.js → vue-ui-onion-kgZ3uV3c.js} +10 -10
- package/dist/{vue-ui-parallel-coordinate-plot-DO0sQdJw.js → vue-ui-parallel-coordinate-plot-CJbZCsPd.js} +10 -10
- package/dist/{vue-ui-quadrant-CA0ClWfL.js → vue-ui-quadrant-B9efnVWT.js} +10 -10
- package/dist/{vue-ui-quick-chart-D-VuAoll.js → vue-ui-quick-chart-hNOMlqTI.js} +1053 -681
- package/dist/{vue-ui-radar-BTD7Y0Ps.js → vue-ui-radar-DJO16PTU.js} +9 -9
- package/dist/{vue-ui-rating-C_Qj6gnP.js → vue-ui-rating-BYLWm5aG.js} +3 -3
- package/dist/{vue-ui-relation-circle-CcxLBVFV.js → vue-ui-relation-circle-DVF3RlHU.js} +7 -7
- package/dist/{vue-ui-ridgeline-BZrzbbhb.js → vue-ui-ridgeline-DvgIu54T.js} +10 -10
- package/dist/{vue-ui-rings-CO48GOP2.js → vue-ui-rings-DVU7F6bL.js} +11 -11
- package/dist/{vue-ui-scatter-DrxUgZbQ.js → vue-ui-scatter-BtlRfhTt.js} +10 -10
- package/dist/{vue-ui-skeleton-CeKjW4MX.js → vue-ui-skeleton-DcMhyC4L.js} +4 -4
- package/dist/{vue-ui-smiley-BvRwx69s.js → vue-ui-smiley-qHvZQJcB.js} +3 -3
- package/dist/{vue-ui-spark-trend-DnujGRyt.js → vue-ui-spark-trend-BuHZP190.js} +4 -4
- package/dist/{vue-ui-sparkbar-Cd_uhYGD.js → vue-ui-sparkbar-MH9VeqdO.js} +4 -4
- package/dist/{vue-ui-sparkgauge-hT31YEtt.js → vue-ui-sparkgauge-Bg_IFD0m.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-PKlTYhKA.js → vue-ui-sparkhistogram-DZu07vIL.js} +5 -5
- package/dist/vue-ui-sparkline-LwEiJPe6.js +2067 -0
- package/dist/{vue-ui-sparkstackbar-R0ij2vi1.js → vue-ui-sparkstackbar-hbIoybeq.js} +5 -5
- package/dist/vue-ui-stackbar-CaxNkWPz.js +2660 -0
- package/dist/vue-ui-stackline-BJqnZXeR.js +2829 -0
- package/dist/{vue-ui-strip-plot-DR3N56rS.js → vue-ui-strip-plot-BWK3JQr6.js} +8 -8
- package/dist/{vue-ui-table-Bg6BeLrf.js → vue-ui-table-CRWoH6dc.js} +6 -6
- package/dist/{vue-ui-table-heatmap-C1b1Pcp8.js → vue-ui-table-heatmap-Bu9RiTU0.js} +6 -6
- package/dist/{vue-ui-table-sparkline-CkVXyequ.js → vue-ui-table-sparkline-CTA_6-gu.js} +5 -5
- package/dist/{vue-ui-thermometer-CqkaMF7Z.js → vue-ui-thermometer-Y5CnROrM.js} +7 -7
- package/dist/{vue-ui-timer-CgJvNwBv.js → vue-ui-timer-BYEpxxDX.js} +6 -6
- package/dist/{vue-ui-tiremarks-B078YJ9M.js → vue-ui-tiremarks-DBndWNiA.js} +7 -7
- package/dist/{vue-ui-treemap-Cfjf8mDl.js → vue-ui-treemap-Cw8a0oFl.js} +10 -10
- package/dist/{vue-ui-waffle-BZIcPa0l.js → vue-ui-waffle-BvfD05mS.js} +11 -11
- package/dist/{vue-ui-wheel-CPTm8AHn.js → vue-ui-wheel-D6NsnLRc.js} +7 -7
- package/dist/{vue-ui-word-cloud-DnGblUwj.js → vue-ui-word-cloud-YrgMp1Fo.js} +8 -8
- package/dist/{vue-ui-world-KkcpeKqp.js → vue-ui-world-BMcqvuJH.js} +8 -8
- package/dist/{vue-ui-xy-ClCV7xA5.js → vue-ui-xy-B6wckF4S.js} +4 -4
- package/dist/vue-ui-xy-Bv7fhRbS.js +5769 -0
- package/dist/{vue-ui-xy-canvas-BlpCbXKR.js → vue-ui-xy-canvas-NzaEYHDR.js} +875 -560
- package/dist/{vue_ui_candlestick-J8jmJvxP.js → vue_ui_candlestick-BXSQY82k.js} +96 -9
- package/dist/{vue_ui_donut_evolution-D1yAAIHr.js → vue_ui_donut_evolution-C6951a2f.js} +35 -7
- package/dist/{vue_ui_quick_chart-mZBdml3Z.js → vue_ui_quick_chart-DByCqSYE.js} +45 -4
- package/dist/{vue_ui_sparkline-auZhap6Y.js → vue_ui_sparkline-b9pEUyGF.js} +33 -1
- package/dist/{vue_ui_stackbar-COOrQQdK.js → vue_ui_stackbar-DdjDL6aq.js} +88 -9
- package/dist/{vue_ui_stackline-DQqKPA9z.js → vue_ui_stackline-Bh0RuInt.js} +88 -9
- package/dist/{vue_ui_xy-BA3-_LCx.js → vue_ui_xy-CcJADijP.js} +78 -9
- package/dist/{vue_ui_xy_canvas-Cb6dg3eK.js → vue_ui_xy_canvas-DrNSzYWq.js} +88 -9
- package/package.json +1 -1
- package/dist/SlicerPreview-BJ4usfYd.js +0 -1708
- package/dist/vue-data-ui-BVzA0tEV.js +0 -280
- package/dist/vue-ui-candlestick-BJtdA4Yu.js +0 -1871
- package/dist/vue-ui-donut-evolution-C0BKntfL.js +0 -1552
- package/dist/vue-ui-sparkline-BSu1uRvP.js +0 -1610
- package/dist/vue-ui-stackbar-BrzzkGFk.js +0 -2369
- package/dist/vue-ui-stackline-zEX3gR3y.js +0 -2483
- package/dist/vue-ui-xy-C6lVqZnx.js +0 -5367
|
@@ -0,0 +1,1869 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { $ as t, $t as n, D as r, Ft as i, Gt as a, J as o, Rt as s, S as c, Vt as l, X as ee, Xt as te, _ as ne, at as re, f as ie, h as ae, i as oe, kt as se, nt as ce, p as le, qt as ue, t as de, tn as fe, tt as pe, vt as me, w as he, y as ge } from "./lib-CklJ7rIN.js";
|
|
3
|
+
import { n as _e, t as ve } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as ye } from "./useTimeLabels-d2f-W1L4.js";
|
|
5
|
+
import { t as be } from "./useConfig-DObkR9Aa.js";
|
|
6
|
+
import { t as xe } from "./usePrinter-Dp3X1vqr.js";
|
|
7
|
+
import { n as Se, t as Ce } from "./BaseScanner-Dzc8VT3j.js";
|
|
8
|
+
import { t as we } from "./useNestedProp-Tc9i6ZcN.js";
|
|
9
|
+
import { t as Te } from "./useThemeCheck-C43Tcqmk.js";
|
|
10
|
+
import { t as Ee } from "./useChartExport-iwOqiIWX.js";
|
|
11
|
+
import { t as De } from "./useTransitions-g_zBREk2.js";
|
|
12
|
+
import { t as Oe } from "./useStableElementSize-C7KADDKj.js";
|
|
13
|
+
import { t as ke } from "./useTimeLabelCollider-AEcY4Ioe.js";
|
|
14
|
+
import { t as Ae } from "./img-CaIaBHA0.js";
|
|
15
|
+
import { n as je } from "./Title-C2JKI5td.js";
|
|
16
|
+
import { t as Me } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
17
|
+
import { l as Ne, t as Pe } from "./useResponsive-ZtArZtUf.js";
|
|
18
|
+
import { t as Fe } from "./DefGrad-DVBqDjhO.js";
|
|
19
|
+
import { t as Ie } from "./SlicerPreview-BgyIezm0.js";
|
|
20
|
+
import { t as Le } from "./BaseLegendToggle-DtS_Oj3B.js";
|
|
21
|
+
import { t as Re } from "./A11yDataTable-DdRsVULz.js";
|
|
22
|
+
import { t as ze } from "./useUserOptionState-DK-_1ddE.js";
|
|
23
|
+
import { t as Be } from "./useChartAccessibility-DYqac8yF.js";
|
|
24
|
+
import { t as Ve } from "./Legend-Dv90gh-6.js";
|
|
25
|
+
import { t as He } from "./vue_ui_donut_evolution-C6951a2f.js";
|
|
26
|
+
import { Fragment as u, Teleport as Ue, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createSlots as We, createTextVNode as Ge, createVNode as Ke, defineAsyncComponent as qe, guardReactiveProps as g, mergeProps as Je, nextTick as Ye, normalizeClass as _, normalizeProps as v, normalizeStyle as Xe, onBeforeUnmount as Ze, onMounted as Qe, openBlock as y, ref as b, renderList as x, renderSlot as S, resolveDynamicComponent as $e, shallowRef as et, toDisplayString as C, toRefs as tt, unref as w, watch as nt, watchEffect as rt, withCtx as T } from "vue";
|
|
27
|
+
//#region src/components/vue-ui-donut-evolution.vue
|
|
28
|
+
var it = /* @__PURE__ */ e({ default: () => qt }), at = ["id"], ot = ["id"], st = ["id"], ct = { style: { position: "relative" } }, lt = [
|
|
29
|
+
"xmlns",
|
|
30
|
+
"aria-describedby",
|
|
31
|
+
"viewBox"
|
|
32
|
+
], ut = [
|
|
33
|
+
"x",
|
|
34
|
+
"y",
|
|
35
|
+
"width",
|
|
36
|
+
"height"
|
|
37
|
+
], dt = { key: 1 }, ft = [
|
|
38
|
+
"x1",
|
|
39
|
+
"x2",
|
|
40
|
+
"y1",
|
|
41
|
+
"y2",
|
|
42
|
+
"stroke",
|
|
43
|
+
"stroke-width"
|
|
44
|
+
], pt = [
|
|
45
|
+
"x1",
|
|
46
|
+
"x2",
|
|
47
|
+
"y1",
|
|
48
|
+
"y2",
|
|
49
|
+
"stroke",
|
|
50
|
+
"stroke-width"
|
|
51
|
+
], mt = { key: 0 }, ht = [
|
|
52
|
+
"x1",
|
|
53
|
+
"x2",
|
|
54
|
+
"y1",
|
|
55
|
+
"y2",
|
|
56
|
+
"stroke",
|
|
57
|
+
"stroke-width"
|
|
58
|
+
], gt = [
|
|
59
|
+
"font-size",
|
|
60
|
+
"fill",
|
|
61
|
+
"transform"
|
|
62
|
+
], _t = [
|
|
63
|
+
"x",
|
|
64
|
+
"y",
|
|
65
|
+
"font-size",
|
|
66
|
+
"fill"
|
|
67
|
+
], vt = [
|
|
68
|
+
"d",
|
|
69
|
+
"stroke",
|
|
70
|
+
"stroke-width"
|
|
71
|
+
], yt = [
|
|
72
|
+
"transform",
|
|
73
|
+
"font-size",
|
|
74
|
+
"text-anchor",
|
|
75
|
+
"fill",
|
|
76
|
+
"font-weight"
|
|
77
|
+
], bt = { key: 0 }, xt = [
|
|
78
|
+
"text-anchor",
|
|
79
|
+
"font-size",
|
|
80
|
+
"fill",
|
|
81
|
+
"transform"
|
|
82
|
+
], St = [
|
|
83
|
+
"text-anchor",
|
|
84
|
+
"font-size",
|
|
85
|
+
"fill",
|
|
86
|
+
"transform",
|
|
87
|
+
"innerHTML"
|
|
88
|
+
], Ct = [
|
|
89
|
+
"x1",
|
|
90
|
+
"y1",
|
|
91
|
+
"x2",
|
|
92
|
+
"y2",
|
|
93
|
+
"stroke",
|
|
94
|
+
"stroke-width"
|
|
95
|
+
], wt = { key: 1 }, Tt = [
|
|
96
|
+
"cx",
|
|
97
|
+
"cy",
|
|
98
|
+
"r",
|
|
99
|
+
"fill"
|
|
100
|
+
], Et = { key: 0 }, Dt = { key: 0 }, Ot = ["d", "stroke"], kt = [
|
|
101
|
+
"text-anchor",
|
|
102
|
+
"x",
|
|
103
|
+
"y",
|
|
104
|
+
"fill"
|
|
105
|
+
], At = [
|
|
106
|
+
"cx",
|
|
107
|
+
"cy",
|
|
108
|
+
"r",
|
|
109
|
+
"fill"
|
|
110
|
+
], jt = { key: 0 }, Mt = [
|
|
111
|
+
"cx",
|
|
112
|
+
"cy",
|
|
113
|
+
"fill"
|
|
114
|
+
], Nt = { key: 1 }, Pt = [
|
|
115
|
+
"d",
|
|
116
|
+
"fill",
|
|
117
|
+
"stroke"
|
|
118
|
+
], Ft = { key: 2 }, It = [
|
|
119
|
+
"d",
|
|
120
|
+
"fill",
|
|
121
|
+
"stroke"
|
|
122
|
+
], Lt = [
|
|
123
|
+
"x",
|
|
124
|
+
"y",
|
|
125
|
+
"font-size",
|
|
126
|
+
"fill"
|
|
127
|
+
], Rt = [
|
|
128
|
+
"x",
|
|
129
|
+
"y",
|
|
130
|
+
"width",
|
|
131
|
+
"height",
|
|
132
|
+
"fill"
|
|
133
|
+
], zt = [
|
|
134
|
+
"x",
|
|
135
|
+
"y",
|
|
136
|
+
"width",
|
|
137
|
+
"height",
|
|
138
|
+
"onMouseenter",
|
|
139
|
+
"onMouseleave",
|
|
140
|
+
"onClick"
|
|
141
|
+
], Bt = [
|
|
142
|
+
"x",
|
|
143
|
+
"y",
|
|
144
|
+
"width",
|
|
145
|
+
"height",
|
|
146
|
+
"fill",
|
|
147
|
+
"fill-opacity",
|
|
148
|
+
"stroke",
|
|
149
|
+
"stroke-opacity",
|
|
150
|
+
"stroke-width",
|
|
151
|
+
"stroke-dasharray"
|
|
152
|
+
], Vt = {
|
|
153
|
+
key: 0,
|
|
154
|
+
style: {
|
|
155
|
+
position: "absolute",
|
|
156
|
+
top: "100%",
|
|
157
|
+
left: "0",
|
|
158
|
+
width: "100%"
|
|
159
|
+
},
|
|
160
|
+
"data-dom-to-png-ignore": "",
|
|
161
|
+
"aria-hidden": "true"
|
|
162
|
+
}, Ht = {
|
|
163
|
+
key: 5,
|
|
164
|
+
class: "vue-data-ui-watermark"
|
|
165
|
+
}, Ut = ["id"], Wt = ["onClick"], Gt = { key: 0 }, Kt = { key: 1 }, qt = /*#__PURE__*/ Me({
|
|
166
|
+
__name: "vue-ui-donut-evolution",
|
|
167
|
+
props: {
|
|
168
|
+
config: {
|
|
169
|
+
type: Object,
|
|
170
|
+
default() {
|
|
171
|
+
return {};
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
dataset: {
|
|
175
|
+
type: Array,
|
|
176
|
+
default() {
|
|
177
|
+
return [];
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
zoomState: {
|
|
181
|
+
type: Object,
|
|
182
|
+
default: null
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
emits: [
|
|
186
|
+
"selectLegend",
|
|
187
|
+
"zoomStart",
|
|
188
|
+
"zoomEnd",
|
|
189
|
+
"zoomReset",
|
|
190
|
+
"update:zoomState",
|
|
191
|
+
"copyAlt"
|
|
192
|
+
],
|
|
193
|
+
setup(e, { expose: Me, emit: it }) {
|
|
194
|
+
let qt = qe(() => import("./vue-ui-accordion-15kKhkup.js").then((e) => e.n)), Jt = qe(() => import("./BaseIcon-BV75ei8X.js").then((e) => e.n)), Yt = qe(() => import("./DataTable-DX5fToAo.js")), Xt = qe(() => import("./PackageVersion-DhXk363L.js").then((e) => e.t)), Zt = qe(() => import("./PenAndPaper-DkQ4sEhs.js").then((e) => e.t)), Qt = qe(() => import("./UserOptions-Dgn3StKw.js").then((e) => e.n)), $t = qe(() => import("./vue-ui-donut-oY4iu5pY.js").then((e) => e.n)), en = qe(() => import("./BaseDraggableDialog-C1Slb3Yh.js").then((e) => e.n)), { vue_ui_donut_evolution: tn } = be(), { isThemeValid: nn, warnInvalidTheme: rn } = Te(), E = e, D = b(ee()), O = b([]), k = b(null), an = b(null), on = b(!1), sn = b(null), A = b(null), cn = b(null), ln = b(0), un = b(0), dn = b(0), fn = b(0), pn = b(0), mn = b(null), hn = b(null), gn = b(null), _n = b(null), vn = b(!1), yn = b(null), bn = b(null), xn = et(null), Sn = b(0), Cn = b(0), wn = b(!1);
|
|
195
|
+
function Tn() {
|
|
196
|
+
xn.value = A.value?.parentNode ?? null;
|
|
197
|
+
}
|
|
198
|
+
function En() {
|
|
199
|
+
return new Promise((e) => {
|
|
200
|
+
requestAnimationFrame(() => {
|
|
201
|
+
requestAnimationFrame(e);
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
async function Dn() {
|
|
206
|
+
let e = ++Cn.value;
|
|
207
|
+
await Ye(), await En(), await En(), e === Cn.value && (Sn.value += 1);
|
|
208
|
+
}
|
|
209
|
+
function On() {
|
|
210
|
+
wn.value || (wn.value = !0, Ye(() => {
|
|
211
|
+
wn.value = !1, Tn(), Dn();
|
|
212
|
+
}));
|
|
213
|
+
}
|
|
214
|
+
let kn = Oe({
|
|
215
|
+
elementRef: xn,
|
|
216
|
+
minimumWidth: 2,
|
|
217
|
+
minimumHeight: 2,
|
|
218
|
+
stableFramesRequired: 2,
|
|
219
|
+
once: !1,
|
|
220
|
+
onSizeAccepted: () => {
|
|
221
|
+
Dn();
|
|
222
|
+
}
|
|
223
|
+
}), An = b(null), jn = b(null), Mn = b(null), Nn = b(null), Pn = b(null), Fn = b(!1), j = et(null), In = et(null), Ln = b(null), M = b(null), Rn = b(!1), N = it, zn = d(() => !!E.dataset && E.dataset.length);
|
|
224
|
+
Qe(() => {
|
|
225
|
+
vn.value = !0, Tn(), kn.start(), Vn(), Dn();
|
|
226
|
+
});
|
|
227
|
+
let Bn = d(() => P.value.debug);
|
|
228
|
+
function Vn() {
|
|
229
|
+
if (s(E.dataset) ? (re({
|
|
230
|
+
componentName: "VueUiDonutEvolution",
|
|
231
|
+
type: "dataset",
|
|
232
|
+
debug: Bn.value
|
|
233
|
+
}), qn.value = !0) : E.dataset.length && E.dataset.forEach((e, t) => {
|
|
234
|
+
me({
|
|
235
|
+
datasetObject: e,
|
|
236
|
+
requiredAttributes: ["name", "values"]
|
|
237
|
+
}).forEach((e) => {
|
|
238
|
+
re({
|
|
239
|
+
componentName: "VueUiDonutEvolution",
|
|
240
|
+
type: "datasetSerieAttribute",
|
|
241
|
+
property: e,
|
|
242
|
+
index: t,
|
|
243
|
+
debug: Bn.value
|
|
244
|
+
}), qn.value = !0;
|
|
245
|
+
});
|
|
246
|
+
}), s(E.dataset) || (qn.value = P.value.loading), setTimeout(() => {
|
|
247
|
+
Fn.value = !0;
|
|
248
|
+
}, 10), fr(), P.value.responsive) {
|
|
249
|
+
let e = Ne(() => {
|
|
250
|
+
Fn.value = !1;
|
|
251
|
+
let { width: e, height: t } = Pe({
|
|
252
|
+
chart: A.value,
|
|
253
|
+
title: P.value.style.chart.title.text ? An.value : null,
|
|
254
|
+
legend: P.value.style.chart.legend.show ? jn.value : null,
|
|
255
|
+
slicer: P.value.style.chart.zoom.show && Yn.value > 1 ? Pn.value : null,
|
|
256
|
+
source: Mn.value
|
|
257
|
+
});
|
|
258
|
+
requestAnimationFrame(() => {
|
|
259
|
+
Jn.value.width = e, Jn.value.height = t - 12, On(), clearTimeout(Ln.value), Ln.value = setTimeout(() => {
|
|
260
|
+
Fn.value = !0;
|
|
261
|
+
}, 10);
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
j.value && (In.value && j.value.unobserve(In.value), j.value.disconnect()), j.value = new ResizeObserver(e), In.value = A.value.parentNode, j.value.observe(In.value);
|
|
265
|
+
}
|
|
266
|
+
On();
|
|
267
|
+
}
|
|
268
|
+
let P = b(br()), F = d(() => I.value.grid), I = d(() => P.value.style.chart.layout), Hn = d(() => P.value.style.chart.dialog), L = d(() => P.value.style.chart);
|
|
269
|
+
_e({
|
|
270
|
+
config: () => P.value,
|
|
271
|
+
dataset: () => E.dataset,
|
|
272
|
+
component: "VueUiDonutEvolution",
|
|
273
|
+
rules: [
|
|
274
|
+
ve.emptyArray,
|
|
275
|
+
{
|
|
276
|
+
test: (e) => e.length === 1,
|
|
277
|
+
message: [
|
|
278
|
+
"👀 There is only a single series in your dataset. Consider:",
|
|
279
|
+
"",
|
|
280
|
+
"▶️ Using VueUiXy instead, for a regular line chart."
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
test: (e) => e.length > 6,
|
|
285
|
+
message: [
|
|
286
|
+
"👀 The number of series is > 6, which makes donuts hard to read. Consider:",
|
|
287
|
+
"",
|
|
288
|
+
"▶️ Grouping small values dynamically into a single \"Other\" series.",
|
|
289
|
+
"",
|
|
290
|
+
"▶️ Using filters to let users choose a maximum number of series to display.",
|
|
291
|
+
"",
|
|
292
|
+
"▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read."
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
test: (e) => e.some((e) => e.values.length > 24),
|
|
297
|
+
message: [
|
|
298
|
+
"👀 Some series have a number of data points > 24, which can make the chart and donuts hard to read. Consider:",
|
|
299
|
+
"",
|
|
300
|
+
"▶️ Using larger time scales, or aggregated values.",
|
|
301
|
+
"",
|
|
302
|
+
"▶️ Filtering the time range by adding date intputs in your UI.",
|
|
303
|
+
"",
|
|
304
|
+
"▶️ Using VueUiXy to show longer series in a more comfortable display."
|
|
305
|
+
]
|
|
306
|
+
}
|
|
307
|
+
]
|
|
308
|
+
});
|
|
309
|
+
let { transitionEnabled: Un } = De({
|
|
310
|
+
config: () => P.value.transitions,
|
|
311
|
+
dataset: () => E.dataset
|
|
312
|
+
}), R = d(() => P.value.userOptions.useCursorPointer), Wn = d(() => fe({
|
|
313
|
+
defaultConfig: {
|
|
314
|
+
useCssAnimation: !1,
|
|
315
|
+
table: { show: !1 },
|
|
316
|
+
userOptions: { show: !1 },
|
|
317
|
+
style: { chart: {
|
|
318
|
+
backgroundColor: "#99999930",
|
|
319
|
+
layout: {
|
|
320
|
+
dataLabels: { show: !1 },
|
|
321
|
+
grid: {
|
|
322
|
+
stroke: "#6A6A6A",
|
|
323
|
+
axis: {
|
|
324
|
+
yLabel: "",
|
|
325
|
+
xLabel: ""
|
|
326
|
+
},
|
|
327
|
+
yAxis: {
|
|
328
|
+
scaleMin: null,
|
|
329
|
+
scaleMax: null,
|
|
330
|
+
autoScale: !1,
|
|
331
|
+
dataLabels: { show: !1 }
|
|
332
|
+
},
|
|
333
|
+
xAxis: { dataLabels: { show: !1 } }
|
|
334
|
+
},
|
|
335
|
+
line: { stroke: "#CACACA60" }
|
|
336
|
+
},
|
|
337
|
+
legend: {
|
|
338
|
+
backgroundColor: "transparent",
|
|
339
|
+
showValue: !1,
|
|
340
|
+
showPercentage: !1
|
|
341
|
+
},
|
|
342
|
+
zoom: {
|
|
343
|
+
show: !1,
|
|
344
|
+
startIndex: null,
|
|
345
|
+
endIndex: null
|
|
346
|
+
}
|
|
347
|
+
} }
|
|
348
|
+
},
|
|
349
|
+
userConfig: P.value.skeletonConfig ?? {}
|
|
350
|
+
})), { loading: Gn, FINAL_DATASET: Kn, manualLoading: qn } = Se({
|
|
351
|
+
...tt(E),
|
|
352
|
+
FINAL_CONFIG: P,
|
|
353
|
+
prepareConfig: br,
|
|
354
|
+
callback: () => {
|
|
355
|
+
Promise.resolve().then(async () => {
|
|
356
|
+
await fr();
|
|
357
|
+
});
|
|
358
|
+
},
|
|
359
|
+
skeletonDataset: E.config?.skeletonDataset ?? [
|
|
360
|
+
{
|
|
361
|
+
name: "",
|
|
362
|
+
values: [
|
|
363
|
+
1,
|
|
364
|
+
2,
|
|
365
|
+
3,
|
|
366
|
+
5,
|
|
367
|
+
8,
|
|
368
|
+
13
|
|
369
|
+
],
|
|
370
|
+
color: "#AAAAAA"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
name: "",
|
|
374
|
+
values: [
|
|
375
|
+
1,
|
|
376
|
+
2,
|
|
377
|
+
3,
|
|
378
|
+
5,
|
|
379
|
+
8,
|
|
380
|
+
13
|
|
381
|
+
],
|
|
382
|
+
color: "#BABABA"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
name: "",
|
|
386
|
+
values: [
|
|
387
|
+
1,
|
|
388
|
+
2,
|
|
389
|
+
3,
|
|
390
|
+
5,
|
|
391
|
+
8,
|
|
392
|
+
13
|
|
393
|
+
],
|
|
394
|
+
color: "#CACACA"
|
|
395
|
+
}
|
|
396
|
+
],
|
|
397
|
+
skeletonConfig: fe({
|
|
398
|
+
defaultConfig: P.value,
|
|
399
|
+
userConfig: Wn.value
|
|
400
|
+
})
|
|
401
|
+
}), Jn = b({
|
|
402
|
+
width: I.value.width,
|
|
403
|
+
height: I.value.height
|
|
404
|
+
}), Yn = d(() => Math.max(...Kn.value.map((e) => e.values.length))), z = b({
|
|
405
|
+
start: 0,
|
|
406
|
+
end: Yn.value
|
|
407
|
+
}), B = b(!1), Xn = b(!1), V = b(null), H = b(null), U = b(null), Zn = b(!1), Qn = b({
|
|
408
|
+
time: 0,
|
|
409
|
+
x: 0,
|
|
410
|
+
y: 0,
|
|
411
|
+
pointerType: null
|
|
412
|
+
}), $n = d(() => P.value.style.chart.zoom?.dragToZoom), W = d(() => $n.value.show && zn.value && tr.value && Y.value > 1 && !Gn.value), er = b(!1), tr = b(!1), nr = b(!1), rr = null, ir = {};
|
|
413
|
+
function ar(e, t = z.value) {
|
|
414
|
+
if (!e || typeof e != "object") return null;
|
|
415
|
+
let n = e.start !== void 0 && e.start !== null, r = e.end !== void 0 && e.end !== null;
|
|
416
|
+
if (!n && !r) return null;
|
|
417
|
+
let i = Number(n ? e.start : t.start), a = Number(r ? e.end : t.end);
|
|
418
|
+
return !Number.isFinite(i) || !Number.isFinite(a) ? null : {
|
|
419
|
+
start: i,
|
|
420
|
+
end: a
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
function or(e) {
|
|
424
|
+
let t = ar(e);
|
|
425
|
+
t && N("update:zoomState", t);
|
|
426
|
+
}
|
|
427
|
+
function sr() {
|
|
428
|
+
rr &&= (cancelAnimationFrame(rr), null), ir = {};
|
|
429
|
+
}
|
|
430
|
+
function cr(e, t = z.value.start) {
|
|
431
|
+
let n = Y.value, r = Number(t);
|
|
432
|
+
return e > n ? n : e < 0 || e <= r ? Math.min(r + 1, n) : e;
|
|
433
|
+
}
|
|
434
|
+
function lr() {
|
|
435
|
+
let e = Y.value;
|
|
436
|
+
if (!Number.isFinite(e) || e <= 0) {
|
|
437
|
+
z.value = {
|
|
438
|
+
start: 0,
|
|
439
|
+
end: 0
|
|
440
|
+
};
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
let t = Math.max(0, Math.min(Number(z.value.start) || 0, e - 1)), n = Math.max(t + 1, Math.min(Number(z.value.end) || e, e));
|
|
444
|
+
(!Number.isFinite(t) || !Number.isFinite(n) || n <= t) && (t = 0, n = e), z.value = {
|
|
445
|
+
start: t,
|
|
446
|
+
end: n
|
|
447
|
+
}, Nn.value && Nn.value.setRangeValues(t, n);
|
|
448
|
+
}
|
|
449
|
+
function ur(e) {
|
|
450
|
+
let t = ar(e);
|
|
451
|
+
if (!t) return null;
|
|
452
|
+
let { start: n, end: r } = t;
|
|
453
|
+
return (n !== Number(z.value.start) || r !== Number(z.value.end)) && (sr(), z.value = {
|
|
454
|
+
start: n,
|
|
455
|
+
end: r
|
|
456
|
+
}, lr(), On()), {
|
|
457
|
+
start: Number(z.value.start),
|
|
458
|
+
end: Number(z.value.end)
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
function dr(e) {
|
|
462
|
+
let t = ur(e);
|
|
463
|
+
return t ? (or(t), t) : null;
|
|
464
|
+
}
|
|
465
|
+
async function fr(e = !0) {
|
|
466
|
+
if (!er.value) {
|
|
467
|
+
er.value = !0;
|
|
468
|
+
try {
|
|
469
|
+
await Ye(), await Ye();
|
|
470
|
+
let { startIndex: t, endIndex: n } = L.value.zoom, r = Y.value;
|
|
471
|
+
if (!Number.isFinite(r) || r <= 0) {
|
|
472
|
+
z.value = {
|
|
473
|
+
start: 0,
|
|
474
|
+
end: 0
|
|
475
|
+
}, tr.value = !0;
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
let i = t == null ? 0 : Number(t), a = n == null ? r : cr(Number(n) + 1, i);
|
|
479
|
+
nr.value = !0, z.value = {
|
|
480
|
+
start: i,
|
|
481
|
+
end: a
|
|
482
|
+
}, lr(), tr.value = !0, e && E.zoomState && ur(E.zoomState);
|
|
483
|
+
} finally {
|
|
484
|
+
queueMicrotask(() => {
|
|
485
|
+
nr.value = !1;
|
|
486
|
+
}), er.value = !1, On();
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
async function pr({ force: e = !1, publish: t = !1 } = {}) {
|
|
491
|
+
await fr(!e), t && (or({
|
|
492
|
+
start: Number(z.value.start),
|
|
493
|
+
end: Number(z.value.end)
|
|
494
|
+
}), N("zoomReset"));
|
|
495
|
+
}
|
|
496
|
+
nt([() => E.zoomState, tr], ([e, t]) => {
|
|
497
|
+
t && e && ur(e);
|
|
498
|
+
}, {
|
|
499
|
+
deep: !0,
|
|
500
|
+
immediate: !0
|
|
501
|
+
});
|
|
502
|
+
function mr(e) {
|
|
503
|
+
ir = {
|
|
504
|
+
...ir,
|
|
505
|
+
...e
|
|
506
|
+
}, rr && cancelAnimationFrame(rr), rr = requestAnimationFrame(() => {
|
|
507
|
+
let e = {
|
|
508
|
+
...z.value,
|
|
509
|
+
...ir
|
|
510
|
+
};
|
|
511
|
+
ir = {}, rr = null, z.value = e, lr(), On(), or({
|
|
512
|
+
start: Number(z.value.start),
|
|
513
|
+
end: Number(z.value.end)
|
|
514
|
+
});
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
function hr(e) {
|
|
518
|
+
if (er.value || nr.value) return;
|
|
519
|
+
let t = Number(e);
|
|
520
|
+
Number.isFinite(t) && (N("zoomStart", {
|
|
521
|
+
index: t,
|
|
522
|
+
isZoom: t !== 0
|
|
523
|
+
}), t !== z.value.start && mr({ start: t }));
|
|
524
|
+
}
|
|
525
|
+
function gr(e) {
|
|
526
|
+
if (er.value || nr.value) return;
|
|
527
|
+
let t = ir.start === void 0 ? z.value.start : ir.start, n = cr(Number(e), t);
|
|
528
|
+
Number.isFinite(n) && (N("zoomEnd", {
|
|
529
|
+
index: n,
|
|
530
|
+
isZoom: n !== Y.value
|
|
531
|
+
}), (n !== z.value.end || ir.start !== void 0) && mr({ end: n }));
|
|
532
|
+
}
|
|
533
|
+
let { userOptionsVisible: _r, setUserOptionsVisibility: vr, keepUserOptionState: yr } = ze({ config: P.value }), { svgRef: G } = Be({ config: L.value.title });
|
|
534
|
+
function br() {
|
|
535
|
+
let e = we({
|
|
536
|
+
userConfig: E.config,
|
|
537
|
+
defaultConfig: tn
|
|
538
|
+
}), t = {}, r = e.theme;
|
|
539
|
+
if (r) {
|
|
540
|
+
if (!nn.value(e)) rn(e), t = e;
|
|
541
|
+
else {
|
|
542
|
+
let i = we({
|
|
543
|
+
userConfig: He[r] || E.config,
|
|
544
|
+
defaultConfig: e
|
|
545
|
+
});
|
|
546
|
+
t = {
|
|
547
|
+
...we({
|
|
548
|
+
userConfig: E.config,
|
|
549
|
+
defaultConfig: i
|
|
550
|
+
}),
|
|
551
|
+
customPalette: e.customPalette ? e.customPalette : n[r] || l
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
} else t = e;
|
|
555
|
+
return t;
|
|
556
|
+
}
|
|
557
|
+
nt(() => E.config, (e) => {
|
|
558
|
+
Gn.value || (P.value = br()), _r.value = !P.value.userOptions.showOnChartHover, Vn(), dn.value += 1, fn.value += 1, pn.value += 1, Dr.value.showTable = P.value.table.show;
|
|
559
|
+
}, { deep: !0 }), nt(() => E.dataset, (e) => {
|
|
560
|
+
Array.isArray(e) && e.length > 0 && (qn.value = !1), pr();
|
|
561
|
+
}, { deep: !0 });
|
|
562
|
+
let { isPrinting: xr, isImaging: Sr, generatePdf: Cr, generateImage: wr } = xe({
|
|
563
|
+
elementId: D.value,
|
|
564
|
+
fileName: L.value.title.text || "vue-ui-donut-evolution",
|
|
565
|
+
options: P.value.userOptions.print
|
|
566
|
+
}), Tr = d(() => P.value.userOptions.show && !L.value.title.text), Er = d(() => he(P.value.customPalette)), Dr = b({ showTable: P.value.table.show });
|
|
567
|
+
nt(P, () => {
|
|
568
|
+
Dr.value = { showTable: P.value.table.show };
|
|
569
|
+
}, { immediate: !0 });
|
|
570
|
+
let Or = d(() => ({
|
|
571
|
+
top: I.value.padding.top,
|
|
572
|
+
right: I.value.padding.right,
|
|
573
|
+
bottom: I.value.padding.bottom,
|
|
574
|
+
left: I.value.padding.left
|
|
575
|
+
})), K = d(() => F.value.yAxis.position === "right");
|
|
576
|
+
function kr() {
|
|
577
|
+
let e = 0;
|
|
578
|
+
mn.value && (e = Array.from(mn.value.querySelectorAll("text")).reduce((e, t) => {
|
|
579
|
+
let n = t.getComputedTextLength();
|
|
580
|
+
return n > e ? n : e;
|
|
581
|
+
}, 0));
|
|
582
|
+
let t = _n.value ? _n.value.getBoundingClientRect().width + F.value.axis.yLabelOffsetX + F.value.axis.fontSize : 0, n = e + t + 5;
|
|
583
|
+
return {
|
|
584
|
+
left: K.value ? 0 : n,
|
|
585
|
+
right: K.value ? n : 0,
|
|
586
|
+
scaleLabelsWidth: e,
|
|
587
|
+
yAxisLabelWidth: t,
|
|
588
|
+
crosshair: 5
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
let Ar = b(0), jr = Ne((e) => {
|
|
592
|
+
Ar.value = e;
|
|
593
|
+
}, 100);
|
|
594
|
+
rt((e) => {
|
|
595
|
+
let t = hn.value;
|
|
596
|
+
if (!t) return;
|
|
597
|
+
let n = new ResizeObserver((e) => {
|
|
598
|
+
jr(e[0].contentRect.height);
|
|
599
|
+
});
|
|
600
|
+
n.observe(t), e(() => n.disconnect());
|
|
601
|
+
}), Ze(() => {
|
|
602
|
+
Ar.value = 0, kn.stop(), clearTimeout(Ln.value), sr(), oi(), Kr(), j.value && (In.value && j.value.unobserve(In.value), j.value.disconnect(), j.value = null, In.value = null);
|
|
603
|
+
});
|
|
604
|
+
let Mr = d(() => {
|
|
605
|
+
let e = 0;
|
|
606
|
+
gn.value && (e = gn.value.getBBox().height);
|
|
607
|
+
let t = 0;
|
|
608
|
+
return hn.value && (t = Ar.value), e + t + F.value.axis.fontSize + F.value.xAxis.dataLabels.offsetY;
|
|
609
|
+
}), q = d(() => {
|
|
610
|
+
Sn.value;
|
|
611
|
+
let e = kr(), t = I.value.dataLabels.fontSize * 3, n = Jn.value.width, r = Jn.value.height, i = Or.value.left + e.left, a = n - Or.value.right - e.right, o = n - i - Or.value.right - e.right, s = r - Or.value.top - Or.value.bottom - t - Mr.value, c = Or.value.top + t;
|
|
612
|
+
return {
|
|
613
|
+
top: c,
|
|
614
|
+
left: i,
|
|
615
|
+
right: a,
|
|
616
|
+
bottom: r - Or.value.bottom - Mr.value,
|
|
617
|
+
absoluteHeight: r,
|
|
618
|
+
absoluteWidth: n,
|
|
619
|
+
centerX: i + Math.max(10, o) / 2,
|
|
620
|
+
centerY: c + Math.max(10, s) / 2,
|
|
621
|
+
width: Math.max(10, o),
|
|
622
|
+
height: Math.max(10, s),
|
|
623
|
+
scaleLabelsWidth: e.scaleLabelsWidth,
|
|
624
|
+
yAxisLabelWidth: e.yAxisLabelWidth,
|
|
625
|
+
crosshair: e.crosshair
|
|
626
|
+
};
|
|
627
|
+
}), J = d(() => (Bn.value && Kn.value.forEach((e, t) => {
|
|
628
|
+
[null, void 0].includes(e.name) && re({
|
|
629
|
+
componentName: "VueUiDonutEvolution",
|
|
630
|
+
type: "datasetSerieAttribute",
|
|
631
|
+
property: "name",
|
|
632
|
+
index: t
|
|
633
|
+
}), [null, void 0].includes(e.values) && re({
|
|
634
|
+
componentName: "VueUiDonutEvolution",
|
|
635
|
+
type: "datasetSerieAttribute",
|
|
636
|
+
property: "values",
|
|
637
|
+
index: t
|
|
638
|
+
});
|
|
639
|
+
}), Kn.value.map((e, t) => ({
|
|
640
|
+
...e,
|
|
641
|
+
values: a(e.values),
|
|
642
|
+
color: c(e.color) || Er.value[t] || l[t] || l[t % l.length],
|
|
643
|
+
length: (e.values || []).length,
|
|
644
|
+
uid: ee()
|
|
645
|
+
})))), Nr = d(() => J.value.filter((e) => !O.value.includes(e.uid)).map((e) => ({
|
|
646
|
+
...e,
|
|
647
|
+
values: e.values.filter((e, t) => t >= z.value.start && t <= z.value.end)
|
|
648
|
+
}))), Y = d(() => Math.max(...J.value.map((e) => e.length))), X = b([]), Pr = 0;
|
|
649
|
+
rt(() => {
|
|
650
|
+
let e = ++Pr;
|
|
651
|
+
(async () => {
|
|
652
|
+
let t = await ye({
|
|
653
|
+
values: F.value.xAxis.dataLabels.values,
|
|
654
|
+
maxDatapoints: Y.value,
|
|
655
|
+
formatter: F.value.xAxis.dataLabels.datetimeFormatter,
|
|
656
|
+
start: z.value.start,
|
|
657
|
+
end: z.value.end
|
|
658
|
+
});
|
|
659
|
+
e === Pr && (X.value = t);
|
|
660
|
+
})();
|
|
661
|
+
});
|
|
662
|
+
let Z = d(() => q.value.width / (z.value.end - z.value.start)), Fr = d(() => {
|
|
663
|
+
let e = [];
|
|
664
|
+
for (let t = 0; t < z.value.end - z.value.start; t += 1) {
|
|
665
|
+
let n = Nr.value.map((e) => e.values[t] ?? null), r = n.filter((e) => [void 0, null].includes(e)).length === n.length, i = n.reduce((e, t) => e + t, 0), a = n.map((e) => e / i), o = q.value.left + Z.value * t + Z.value / 2;
|
|
666
|
+
e.push({
|
|
667
|
+
index: t,
|
|
668
|
+
percentages: a,
|
|
669
|
+
subtotal: r || i < 0 ? null : i,
|
|
670
|
+
values: n,
|
|
671
|
+
x: o
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
return e;
|
|
675
|
+
}), Ir = d(() => {
|
|
676
|
+
let e = Math.max(...Fr.value.map((e) => e.subtotal).filter((e) => se(e))) ?? 1, t = Math.min(...Fr.value.map((e) => e.subtotal).filter((e) => se(e))) ?? 0, n = Math.max(F.value.yAxis.scaleMax ?? 0, e), r;
|
|
677
|
+
return r = F.value.yAxis.scaleMin == null ? 0 : Math.min(t, F.value.yAxis.scaleMin), F.value.yAxis.autoScale && (r = t, n = e), r === n && (r = n / 2, n *= 1.5), {
|
|
678
|
+
max: n,
|
|
679
|
+
min: r
|
|
680
|
+
};
|
|
681
|
+
}), Q = d(() => {
|
|
682
|
+
let e = Fr.value.length === 1 ? Ir.value.max * 2 : Ir.value.max;
|
|
683
|
+
return ne(Ir.value.min, e, F.value.yAxis.dataLabels.steps);
|
|
684
|
+
});
|
|
685
|
+
nt(() => Q.value.ticks.join("|"), () => {
|
|
686
|
+
On();
|
|
687
|
+
}, { flush: "post" });
|
|
688
|
+
function Lr(e) {
|
|
689
|
+
return (e - Q.value.min) / (Q.value.max - Q.value.min);
|
|
690
|
+
}
|
|
691
|
+
let Rr = d(() => Q.value.ticks.map((e) => ({
|
|
692
|
+
y: q.value.bottom - q.value.height * Lr(e),
|
|
693
|
+
value: e
|
|
694
|
+
}))), $ = d(() => {
|
|
695
|
+
let e = Fr.value, t = Math.max(...e.map((e) => e.subtotal));
|
|
696
|
+
return e.length === 1 && t * 2, e.map((t, n) => {
|
|
697
|
+
let r = Math.min(q.value.width / 24, Z.value / 2 * .7), a = r > q.value.width / 16 ? q.value.width / 16 : r, o = k.value === t.index ? q.value.width / 16 : a, s = e.length > 4 ? r * 2 : r * 2 > Z.value / 2 * .7 ? Z.value / 2 * .7 : r * 2, c = q.value.bottom - q.value.height * Lr(t.subtotal), l = Nr.value.map((e) => ({
|
|
698
|
+
color: e.color,
|
|
699
|
+
name: e.name,
|
|
700
|
+
value: e.values[n] ?? 0
|
|
701
|
+
})).toSorted((e, t) => t.value - e.value);
|
|
702
|
+
return {
|
|
703
|
+
...t,
|
|
704
|
+
y: c,
|
|
705
|
+
radius: a,
|
|
706
|
+
activeRadius: o,
|
|
707
|
+
hoverRadius: s,
|
|
708
|
+
donut: i({ series: l }, t.x, c, a, a, 1.99999, 2, 1, 360, 105.25, a / 2),
|
|
709
|
+
donutHover: i({ series: l }, t.x, c, s, s, 1.99999, 2, 1, 360, 105.25, s / 2),
|
|
710
|
+
donutFocus: i({ series: l }, q.value.centerX, q.value.centerY, q.value.height / 3.6, q.value.height / 3.6, 1.99999, 2, 1, 360, 105.25, q.value.height / 6)
|
|
711
|
+
};
|
|
712
|
+
});
|
|
713
|
+
});
|
|
714
|
+
function zr(e, n, r) {
|
|
715
|
+
return oe(I.value.dataLabels.formatter, e, t({
|
|
716
|
+
p: I.value.dataLabels.prefix,
|
|
717
|
+
v: e,
|
|
718
|
+
s: I.value.dataLabels.suffix,
|
|
719
|
+
r: I.value.dataLabels.rounding
|
|
720
|
+
}), {
|
|
721
|
+
datapoint: n,
|
|
722
|
+
index: r
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
function Br(e, t) {
|
|
726
|
+
return isNaN(e.value / te(t, "value")) ? 0 : (e.value / te(t, "value") * 100).toFixed(0) + "%";
|
|
727
|
+
}
|
|
728
|
+
function Vr(e) {
|
|
729
|
+
let t = G.value;
|
|
730
|
+
if (!t) return null;
|
|
731
|
+
if (t.createSVGPoint && t.getScreenCTM) {
|
|
732
|
+
let n = t.createSVGPoint();
|
|
733
|
+
n.x = e.clientX, n.y = e.clientY;
|
|
734
|
+
let r = t.getScreenCTM();
|
|
735
|
+
if (r) {
|
|
736
|
+
let e = n.matrixTransform(r.inverse());
|
|
737
|
+
return {
|
|
738
|
+
x: e.x,
|
|
739
|
+
y: e.y
|
|
740
|
+
};
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
let n = t.getBoundingClientRect(), r = t.viewBox?.baseVal || {
|
|
744
|
+
x: 0,
|
|
745
|
+
y: 0,
|
|
746
|
+
width: n.width,
|
|
747
|
+
height: n.height
|
|
748
|
+
}, i = Math.min(n.width / r.width, n.height / r.height);
|
|
749
|
+
if (!Number.isFinite(i) || i <= 0) return null;
|
|
750
|
+
let a = r.width * i, o = r.height * i, s = (n.width - a) / 2, c = (n.height - o) / 2;
|
|
751
|
+
return {
|
|
752
|
+
x: (e.clientX - n.left - s) / i + r.x,
|
|
753
|
+
y: (e.clientY - n.top - c) / i + r.y
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
let Hr = d(() => !B.value || V.value == null || H.value == null ? null : {
|
|
757
|
+
x: Math.min(V.value, H.value),
|
|
758
|
+
y: q.value.top,
|
|
759
|
+
width: Math.abs(H.value - V.value),
|
|
760
|
+
height: q.value.height
|
|
761
|
+
}), Ur = d(() => tr.value ? Number(z.value.start) !== 0 || Number(z.value.end) !== Number(Y.value) : !1);
|
|
762
|
+
function Wr(e) {
|
|
763
|
+
return Math.min(Math.max(e, q.value.left), q.value.right);
|
|
764
|
+
}
|
|
765
|
+
function Gr() {
|
|
766
|
+
k.value = null, an.value = null, M.value = null;
|
|
767
|
+
}
|
|
768
|
+
function Kr(e) {
|
|
769
|
+
let t = e?.pointerId == null ? U.value : e.pointerId;
|
|
770
|
+
t != null && G.value?.hasPointerCapture?.(t) && G.value.releasePointerCapture(t), B.value = !1, V.value = null, H.value = null, U.value = null;
|
|
771
|
+
}
|
|
772
|
+
function qr() {
|
|
773
|
+
Zn.value = !0, setTimeout(() => {
|
|
774
|
+
Zn.value = !1;
|
|
775
|
+
}, 0);
|
|
776
|
+
}
|
|
777
|
+
function Jr(e) {
|
|
778
|
+
Zn.value && (Zn.value = !1, e.preventDefault(), e.stopPropagation());
|
|
779
|
+
}
|
|
780
|
+
function Yr(e) {
|
|
781
|
+
if (!W.value || !Ur.value || !e) return !1;
|
|
782
|
+
let t = Date.now(), n = e.pointerType || "mouse", r = Qn.value, i = n === "touch" ? 450 : 350, a = n === "touch" ? 28 : 10, o = Math.hypot(e.clientX - r.x, e.clientY - r.y);
|
|
783
|
+
return r.time > 0 && r.pointerType === n && t - r.time <= i && o <= a ? (Qn.value = {
|
|
784
|
+
time: 0,
|
|
785
|
+
x: 0,
|
|
786
|
+
y: 0,
|
|
787
|
+
pointerType: null
|
|
788
|
+
}, qr(), oi(), Kr(e), ki(), pr({
|
|
789
|
+
force: !0,
|
|
790
|
+
publish: !0
|
|
791
|
+
}), !0) : (Qn.value = {
|
|
792
|
+
time: t,
|
|
793
|
+
x: e.clientX,
|
|
794
|
+
y: e.clientY,
|
|
795
|
+
pointerType: n
|
|
796
|
+
}, !1);
|
|
797
|
+
}
|
|
798
|
+
function Xr(e) {
|
|
799
|
+
let t = Number(z.value.end) - Number(z.value.start);
|
|
800
|
+
if (t <= 0 || !Number.isFinite(Z.value) || Z.value <= 0) return null;
|
|
801
|
+
let n = Math.floor((Wr(e) - q.value.left) / Z.value);
|
|
802
|
+
return Math.max(0, Math.min(t - 1, n));
|
|
803
|
+
}
|
|
804
|
+
function Zr(e, t) {
|
|
805
|
+
let n = Xr(e), r = Xr(t);
|
|
806
|
+
if (n == null || r == null) return null;
|
|
807
|
+
let i = Math.min(n, r), a = Math.max(n, r);
|
|
808
|
+
return a <= i ? null : {
|
|
809
|
+
start: Number(z.value.start) + i,
|
|
810
|
+
end: Number(z.value.start) + a + 1
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
function Qr(e) {
|
|
814
|
+
let t = dr(e);
|
|
815
|
+
return t ? (N("zoomStart", {
|
|
816
|
+
index: t.start,
|
|
817
|
+
isZoom: t.start !== 0
|
|
818
|
+
}), N("zoomEnd", {
|
|
819
|
+
index: t.end,
|
|
820
|
+
isZoom: t.end !== Y.value
|
|
821
|
+
}), t) : null;
|
|
822
|
+
}
|
|
823
|
+
function $r(e) {
|
|
824
|
+
if (!W.value || Ci.value || e.button !== void 0 && e.button !== 0 || U.value != null && e.pointerId !== U.value) return;
|
|
825
|
+
let t = Vr(e);
|
|
826
|
+
if (!t || t.x < q.value.left || t.x > q.value.right || t.y < q.value.top || t.y > q.value.bottom || Number(z.value.end) - Number(z.value.start) <= 1) return;
|
|
827
|
+
Xn.value = !0, G.value?.focus?.({ preventScroll: !0 }), oi(), Gr();
|
|
828
|
+
let n = Wr(t.x);
|
|
829
|
+
U.value = e.pointerId, B.value = !0, V.value = n, H.value = n;
|
|
830
|
+
}
|
|
831
|
+
function ei(e) {
|
|
832
|
+
if (!W.value || !B.value || U.value != null && e.pointerId !== U.value) return;
|
|
833
|
+
let t = Vr(e);
|
|
834
|
+
t && (H.value = Wr(t.x), Gr(), V.value != null && Math.abs(H.value - V.value) >= 2 && !G.value?.hasPointerCapture?.(e.pointerId) && G.value?.setPointerCapture?.(e.pointerId));
|
|
835
|
+
}
|
|
836
|
+
function ti(e) {
|
|
837
|
+
if (!W.value || !B.value || U.value != null && e.pointerId !== U.value) return;
|
|
838
|
+
let t = Vr(e);
|
|
839
|
+
t && (H.value = Wr(t.x));
|
|
840
|
+
let n = V.value, r = H.value;
|
|
841
|
+
if ((n == null || r == null ? 0 : Math.abs(r - n)) < Math.max(4, q.value.width * .01)) {
|
|
842
|
+
if (Yr(e)) return;
|
|
843
|
+
Kr(e);
|
|
844
|
+
return;
|
|
845
|
+
}
|
|
846
|
+
let i = Zr(Math.min(n, r), Math.max(n, r));
|
|
847
|
+
if (!i) {
|
|
848
|
+
Kr(e);
|
|
849
|
+
return;
|
|
850
|
+
}
|
|
851
|
+
Kr(e), Qr(i) && (Qn.value = {
|
|
852
|
+
time: 0,
|
|
853
|
+
x: 0,
|
|
854
|
+
y: 0,
|
|
855
|
+
pointerType: null
|
|
856
|
+
}, Gr(), qr());
|
|
857
|
+
}
|
|
858
|
+
function ni(e) {
|
|
859
|
+
B.value || (k.value = null, an.value = null, M.value = null, P.value.events.datapointLeave && P.value.events.datapointLeave({
|
|
860
|
+
datapoint: e,
|
|
861
|
+
seriesIndex: e.seriesIndex + z.value.start
|
|
862
|
+
}));
|
|
863
|
+
}
|
|
864
|
+
function ri(e) {
|
|
865
|
+
B.value || (P.value.events.datapointEnter && P.value.events.datapointEnter({
|
|
866
|
+
datapoint: e,
|
|
867
|
+
seriesIndex: e.index + z.value.start
|
|
868
|
+
}), k.value = e.index, an.value = e, M.value = e.index);
|
|
869
|
+
}
|
|
870
|
+
let ii = b(null), ai = null;
|
|
871
|
+
function oi() {
|
|
872
|
+
ai &&= (clearTimeout(ai), null);
|
|
873
|
+
}
|
|
874
|
+
function si(e, t) {
|
|
875
|
+
P.value.events.datapointClick && P.value.events.datapointClick({
|
|
876
|
+
datapoint: e,
|
|
877
|
+
seriesIndex: e.index + z.value.start
|
|
878
|
+
}), e.subtotal && Hn.value.show && (an.value = null, k.value = null, on.value = !0, sn.value = e, Ai(e), [null, void 0].includes(t) || (ii.value = t));
|
|
879
|
+
}
|
|
880
|
+
function ci(e, t) {
|
|
881
|
+
if (oi(), !W.value || !Ur.value) {
|
|
882
|
+
si(e, t);
|
|
883
|
+
return;
|
|
884
|
+
}
|
|
885
|
+
let n = Qn.value.pointerType === "touch" ? 480 : 380;
|
|
886
|
+
ai = setTimeout(() => {
|
|
887
|
+
ai = null, si(e, t);
|
|
888
|
+
}, n);
|
|
889
|
+
}
|
|
890
|
+
let li = d(() => J.value.map((e, t) => ({
|
|
891
|
+
name: e.name,
|
|
892
|
+
value: e.values.slice(z.value.start, z.value.end).reduce((e, t) => e + t, 0),
|
|
893
|
+
shape: "circle",
|
|
894
|
+
uid: e.uid,
|
|
895
|
+
color: e.color
|
|
896
|
+
})).sort((e, t) => t.value - e.value).map((e, n) => ({
|
|
897
|
+
...e,
|
|
898
|
+
opacity: O.value.includes(e.uid) ? .5 : 1,
|
|
899
|
+
segregate: () => pi(e.uid),
|
|
900
|
+
isSegregated: O.value.includes(e.uid),
|
|
901
|
+
display: `${e.name}${L.value.legend.showPercentage || L.value.legend.showValue ? ": " : ""}${L.value.legend.showValue ? oe(I.value.dataLabels.formatter, e.value, t({
|
|
902
|
+
p: I.value.dataLabels.prefix,
|
|
903
|
+
v: e.value,
|
|
904
|
+
s: I.value.dataLabels.suffix,
|
|
905
|
+
r: L.value.legend.roundingValue
|
|
906
|
+
}), {
|
|
907
|
+
datapoint: e,
|
|
908
|
+
seriesIndex: n
|
|
909
|
+
}) : ""}${L.value.legend.showPercentage ? O.value.includes(e.uid) ? `${L.value.legend.showValue ? " (" : ""}- %${L.value.legend.showValue ? ")" : ""}` : `${L.value.legend.showValue ? " (" : ""}${isNaN(e.value / ui.value) ? "-" : t({
|
|
910
|
+
v: e.value / ui.value * 100,
|
|
911
|
+
s: "%",
|
|
912
|
+
r: L.value.legend.roundingPercentage
|
|
913
|
+
})}${L.value.legend.showValue ? ")" : ""}` : ""}`
|
|
914
|
+
}))), ui = d(() => $.value.map((e) => e.subtotal).reduce((e, t) => e + t, 0)), di = d(() => ({
|
|
915
|
+
cy: "donut-div-legend",
|
|
916
|
+
backgroundColor: L.value.legend.backgroundColor,
|
|
917
|
+
color: L.value.legend.color,
|
|
918
|
+
fontSize: L.value.legend.fontSize,
|
|
919
|
+
paddingBottom: 12,
|
|
920
|
+
fontWeight: L.value.legend.bold ? "bold" : ""
|
|
921
|
+
}));
|
|
922
|
+
function fi() {
|
|
923
|
+
O.value.length ? O.value = [] : li.value.forEach((e) => {
|
|
924
|
+
O.value.push(e.uid);
|
|
925
|
+
}), N("selectLegend", Nr.value);
|
|
926
|
+
}
|
|
927
|
+
function pi(e) {
|
|
928
|
+
if (O.value.includes(e)) O.value = O.value.filter((t) => t !== e), N("selectLegend", Nr.value);
|
|
929
|
+
else {
|
|
930
|
+
if (O.value.length === J.value.length - 1) return;
|
|
931
|
+
O.value.push(e), N("selectLegend", Nr.value);
|
|
932
|
+
}
|
|
933
|
+
sn.value && si($.value.find((e, t) => t === ii.value));
|
|
934
|
+
}
|
|
935
|
+
function mi(e) {
|
|
936
|
+
return J.value.length ? J.value.find((t) => t.name === e) || (Bn.value && console.warn(`VueUiDonutEvolution - Series name not found "${e}"`), null) : (Bn.value && console.warn("VueUiDonutEvolution - There are no series to show."), null);
|
|
937
|
+
}
|
|
938
|
+
function hi(e) {
|
|
939
|
+
let t = mi(e);
|
|
940
|
+
t !== null && O.value.includes(t.uid) && pi(t.uid);
|
|
941
|
+
}
|
|
942
|
+
function gi(e) {
|
|
943
|
+
let t = mi(e);
|
|
944
|
+
t !== null && (O.value.includes(t.uid) || pi(t.uid));
|
|
945
|
+
}
|
|
946
|
+
let _i = d(() => {
|
|
947
|
+
let e = [""].concat(J.value.filter((e) => !O.value.includes(e.uid)).map((e) => ({
|
|
948
|
+
name: e.name,
|
|
949
|
+
color: e.color
|
|
950
|
+
})), ["Σ"]), t = [];
|
|
951
|
+
for (let e = 0; e < Y.value; e += 1) {
|
|
952
|
+
let n = J.value.filter((e) => !O.value.includes(e.uid)).map((t) => t.values[e] ?? 0).reduce((e, t) => e + t, 0);
|
|
953
|
+
t.push([X.value[e] ? X.value[e].text : "-"].concat(J.value.filter((e) => !O.value.includes(e.uid)).map((t) => ({
|
|
954
|
+
value: t.values[e] ?? 0,
|
|
955
|
+
percentage: t.values[e] ? t.values[e] / n * 100 : 0
|
|
956
|
+
})), [`${I.value.dataLabels.prefix}${Number(n.toFixed(P.value.table.td.roundingValue))}${I.value.dataLabels.suffix}`]));
|
|
957
|
+
}
|
|
958
|
+
return {
|
|
959
|
+
head: e,
|
|
960
|
+
body: t,
|
|
961
|
+
bodyA11y: t.map((e) => e.map((t, n) => n === 0 || n === e.length - 1 ? t : `${zr(t.value ?? 0, null, n)} (${t.percentage.toFixed(1)}%)`)),
|
|
962
|
+
config: {
|
|
963
|
+
th: {
|
|
964
|
+
backgroundColor: P.value.table.th.backgroundColor,
|
|
965
|
+
color: P.value.table.th.color,
|
|
966
|
+
outline: P.value.table.th.outline
|
|
967
|
+
},
|
|
968
|
+
td: {
|
|
969
|
+
backgroundColor: P.value.table.td.backgroundColor,
|
|
970
|
+
color: P.value.table.td.color,
|
|
971
|
+
outline: P.value.table.td.outline
|
|
972
|
+
},
|
|
973
|
+
breakpoint: P.value.table.responsiveBreakpoint
|
|
974
|
+
},
|
|
975
|
+
colNames: [P.value.table.columnNames.period].concat(J.value.filter((e) => !O.value.includes(e.uid)).map((e) => e.name), P.value.table.columnNames.total)
|
|
976
|
+
};
|
|
977
|
+
});
|
|
978
|
+
function vi() {
|
|
979
|
+
return J.value;
|
|
980
|
+
}
|
|
981
|
+
function yi(e = null) {
|
|
982
|
+
Ye(() => {
|
|
983
|
+
let t = [
|
|
984
|
+
[L.value.title.text],
|
|
985
|
+
[L.value.title.subtitle.text],
|
|
986
|
+
[""]
|
|
987
|
+
], n = [..._i.value.head.map((e) => e.name ?? e)], i = [..._i.value.body.map((e) => e.map((e) => e.value ?? e))], a = t.concat([n]).concat(i), o = r(a);
|
|
988
|
+
e ? e(o) : ce({
|
|
989
|
+
csvContent: o,
|
|
990
|
+
title: L.value.title.text || "vue-ui-donut-evolution"
|
|
991
|
+
});
|
|
992
|
+
});
|
|
993
|
+
}
|
|
994
|
+
let bi = b(!1);
|
|
995
|
+
function xi(e) {
|
|
996
|
+
bi.value = e, ln.value += 1;
|
|
997
|
+
}
|
|
998
|
+
function Si() {
|
|
999
|
+
Dr.value.showTable = !Dr.value.showTable;
|
|
1000
|
+
}
|
|
1001
|
+
let Ci = b(!1);
|
|
1002
|
+
function wi() {
|
|
1003
|
+
Ci.value = !Ci.value;
|
|
1004
|
+
}
|
|
1005
|
+
function Ti(e) {
|
|
1006
|
+
return e.proportion * 100 > L.value.donuts.hover.hideLabelsUnderValue;
|
|
1007
|
+
}
|
|
1008
|
+
let Ei = b([]), Di = b({}), Oi = b(null);
|
|
1009
|
+
function ki() {
|
|
1010
|
+
Oi.value?.close?.(), sn.value = null, ii.value = null, on.value = !1, an.value = null, k.value = null, M.value = null;
|
|
1011
|
+
}
|
|
1012
|
+
function Ai(e) {
|
|
1013
|
+
Ei.value = e.donut.map((e) => ({
|
|
1014
|
+
name: e.name,
|
|
1015
|
+
values: [e.value],
|
|
1016
|
+
color: e.color
|
|
1017
|
+
})), Di.value = pe({
|
|
1018
|
+
...Hn.value.donutChart,
|
|
1019
|
+
responsive: !0,
|
|
1020
|
+
theme: P.value.theme
|
|
1021
|
+
}), Oi.value && Oi.value.open();
|
|
1022
|
+
}
|
|
1023
|
+
async function ji({ scale: e = 2 } = {}) {
|
|
1024
|
+
if (!A.value) return;
|
|
1025
|
+
let { width: t, height: n } = A.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await Ae({
|
|
1026
|
+
domElement: A.value,
|
|
1027
|
+
base64: !0,
|
|
1028
|
+
img: !0,
|
|
1029
|
+
scale: e
|
|
1030
|
+
});
|
|
1031
|
+
return {
|
|
1032
|
+
imageUri: i,
|
|
1033
|
+
base64: a,
|
|
1034
|
+
title: L.value.title.text,
|
|
1035
|
+
width: t,
|
|
1036
|
+
height: n,
|
|
1037
|
+
aspectRatio: r
|
|
1038
|
+
};
|
|
1039
|
+
}
|
|
1040
|
+
let Mi = d(() => Jn.value.width), Ni = d(() => Jn.value.height);
|
|
1041
|
+
ke({
|
|
1042
|
+
timeLabelsEls: hn,
|
|
1043
|
+
timeLabels: X,
|
|
1044
|
+
slicer: z,
|
|
1045
|
+
configRef: P,
|
|
1046
|
+
rotationPath: [
|
|
1047
|
+
"style",
|
|
1048
|
+
"chart",
|
|
1049
|
+
"layout",
|
|
1050
|
+
"grid",
|
|
1051
|
+
"xAxis",
|
|
1052
|
+
"dataLabels",
|
|
1053
|
+
"rotation"
|
|
1054
|
+
],
|
|
1055
|
+
autoRotatePath: [
|
|
1056
|
+
"style",
|
|
1057
|
+
"chart",
|
|
1058
|
+
"layout",
|
|
1059
|
+
"grid",
|
|
1060
|
+
"xAxis",
|
|
1061
|
+
"dataLabels",
|
|
1062
|
+
"autoRotate",
|
|
1063
|
+
"enable"
|
|
1064
|
+
],
|
|
1065
|
+
isAutoSize: !1,
|
|
1066
|
+
width: Mi,
|
|
1067
|
+
height: Ni,
|
|
1068
|
+
rotation: F.value.xAxis.dataLabels.autoRotate.angle
|
|
1069
|
+
});
|
|
1070
|
+
let Pi = d(() => {
|
|
1071
|
+
let e = P.value.table.useDialog && !P.value.table.show, t = Dr.value.showTable;
|
|
1072
|
+
return {
|
|
1073
|
+
component: e ? en : qt,
|
|
1074
|
+
title: `${L.value.title.text}${L.value.title.subtitle.text ? `: ${L.value.title.subtitle.text}` : ""}`,
|
|
1075
|
+
props: e ? {
|
|
1076
|
+
backgroundColor: P.value.table.th.backgroundColor,
|
|
1077
|
+
color: P.value.table.th.color,
|
|
1078
|
+
headerColor: P.value.table.th.color,
|
|
1079
|
+
headerBg: P.value.table.th.backgroundColor,
|
|
1080
|
+
isFullscreen: bi.value,
|
|
1081
|
+
fullscreenParent: A.value,
|
|
1082
|
+
forcedWidth: Math.min(800, window.innerWidth * .8),
|
|
1083
|
+
isCursorPointer: R.value
|
|
1084
|
+
} : {
|
|
1085
|
+
hideDetails: !0,
|
|
1086
|
+
config: {
|
|
1087
|
+
open: t,
|
|
1088
|
+
maxHeight: 1e4,
|
|
1089
|
+
body: {
|
|
1090
|
+
backgroundColor: L.value.backgroundColor,
|
|
1091
|
+
color: L.value.color
|
|
1092
|
+
},
|
|
1093
|
+
head: {
|
|
1094
|
+
backgroundColor: L.value.backgroundColor,
|
|
1095
|
+
color: L.value.color
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
};
|
|
1100
|
+
});
|
|
1101
|
+
nt(() => Dr.value.showTable, (e) => {
|
|
1102
|
+
P.value.table.show || (e && P.value.table.useDialog && yn.value ? yn.value.open() : "close" in yn.value && yn.value.close());
|
|
1103
|
+
});
|
|
1104
|
+
function Fi() {
|
|
1105
|
+
Dr.value.showTable = !1, bn.value && bn.value.setTableIconState(!1);
|
|
1106
|
+
}
|
|
1107
|
+
let Ii = d(() => li.value.map((e) => ({
|
|
1108
|
+
...e,
|
|
1109
|
+
name: e.display
|
|
1110
|
+
}))), Li = d(() => L.value.backgroundColor), Ri = d(() => L.value.legend), zi = d(() => L.value.title), { isCallbackImaging: Bi, isCallbackSvg: Vi, generateSvg: Hi, onGenerateImage: Ui } = Ee({
|
|
1111
|
+
svg: G,
|
|
1112
|
+
title: zi,
|
|
1113
|
+
legend: Ri,
|
|
1114
|
+
legendItems: Ii,
|
|
1115
|
+
backgroundColor: Li,
|
|
1116
|
+
getSvgCallback: () => P.value.userOptions.callbacks.svg,
|
|
1117
|
+
generateImage: wr
|
|
1118
|
+
});
|
|
1119
|
+
async function Wi() {
|
|
1120
|
+
if (N("copyAlt", {
|
|
1121
|
+
config: P.value,
|
|
1122
|
+
dataset: $.value
|
|
1123
|
+
}), !P.value.userOptions.callbacks.altCopy) {
|
|
1124
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
1125
|
+
return;
|
|
1126
|
+
}
|
|
1127
|
+
await Promise.resolve(P.value.userOptions.callbacks.altCopy({
|
|
1128
|
+
config: P.value,
|
|
1129
|
+
dataset: $.value
|
|
1130
|
+
}));
|
|
1131
|
+
}
|
|
1132
|
+
function Gi() {
|
|
1133
|
+
M.value = null, Rn.value = !0;
|
|
1134
|
+
}
|
|
1135
|
+
function Ki() {
|
|
1136
|
+
Xn.value = !1, M.value = null, k.value = null, an.value = null, Rn.value = !1;
|
|
1137
|
+
}
|
|
1138
|
+
function qi(e) {
|
|
1139
|
+
if (!G.value || Ci.value || document.activeElement !== G.value || (Xn.value = !1, !$.value.length)) return;
|
|
1140
|
+
let t = e.key === "ArrowLeft", n = e.key === "ArrowRight", r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
|
|
1141
|
+
if (!t && !n && !r && !i) return;
|
|
1142
|
+
if (e.preventDefault(), e.stopPropagation(), i) {
|
|
1143
|
+
if (W.value && (Ur.value || B.value)) {
|
|
1144
|
+
oi(), Kr(), ki(), pr({
|
|
1145
|
+
force: !0,
|
|
1146
|
+
publish: !0
|
|
1147
|
+
});
|
|
1148
|
+
return;
|
|
1149
|
+
}
|
|
1150
|
+
M.value = null, k.value = null, an.value = null;
|
|
1151
|
+
return;
|
|
1152
|
+
}
|
|
1153
|
+
if (r) {
|
|
1154
|
+
if (M.value === null) return;
|
|
1155
|
+
let e = $.value[M.value];
|
|
1156
|
+
if (!e) return;
|
|
1157
|
+
si(e, M.value);
|
|
1158
|
+
return;
|
|
1159
|
+
}
|
|
1160
|
+
let a = M.value, o = k.value, s = a !== null && a >= 0 && a < $.value.length, c = o !== null && o >= 0 && o < $.value.length;
|
|
1161
|
+
s ? n ? (a += 1, a >= $.value.length && (a = 0)) : t && (--a, a < 0 && (a = $.value.length - 1)) : c ? (a = n ? o + 1 : o - 1, a >= $.value.length && (a = 0), a < 0 && (a = $.value.length - 1)) : a = n ? 0 : $.value.length - 1;
|
|
1162
|
+
let l = $.value[a];
|
|
1163
|
+
l && ri(l);
|
|
1164
|
+
}
|
|
1165
|
+
let Ji = d(() => ({
|
|
1166
|
+
headers: _i.value?.colNames ?? [],
|
|
1167
|
+
rows: _i.value?.bodyA11y ?? []
|
|
1168
|
+
}));
|
|
1169
|
+
return Me({
|
|
1170
|
+
getData: vi,
|
|
1171
|
+
getImage: ji,
|
|
1172
|
+
generatePdf: Cr,
|
|
1173
|
+
generateCsv: yi,
|
|
1174
|
+
generateImage: wr,
|
|
1175
|
+
generateSvg: Hi,
|
|
1176
|
+
hideSeries: gi,
|
|
1177
|
+
showSeries: hi,
|
|
1178
|
+
toggleTable: Si,
|
|
1179
|
+
toggleAnnotator: wi,
|
|
1180
|
+
toggleFullscreen: xi,
|
|
1181
|
+
copyAlt: Wi,
|
|
1182
|
+
resetZoom: () => pr({
|
|
1183
|
+
force: !0,
|
|
1184
|
+
publish: !0
|
|
1185
|
+
}),
|
|
1186
|
+
setZoomState: dr
|
|
1187
|
+
}), (e, n) => (y(), m("div", {
|
|
1188
|
+
ref_key: "donutEvolutionChart",
|
|
1189
|
+
ref: A,
|
|
1190
|
+
class: _(`vue-data-ui-component vue-ui-donut-evolution ${bi.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${P.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
1191
|
+
style: Xe(`font-family:${P.value.style.fontFamily};width:100%; text-align:center;background:${L.value.backgroundColor}`),
|
|
1192
|
+
id: D.value,
|
|
1193
|
+
onMouseenter: n[4] ||= () => w(vr)(!0),
|
|
1194
|
+
onMouseleave: n[5] ||= () => w(vr)(!1)
|
|
1195
|
+
}, [
|
|
1196
|
+
h("div", {
|
|
1197
|
+
id: `chart-instructions-${D.value}`,
|
|
1198
|
+
class: "sr-only"
|
|
1199
|
+
}, [h("p", null, C(P.value.a11y.translations.keyboardNavigation), 1)], 8, ot),
|
|
1200
|
+
Ji.value?.rows?.length ? (y(), f(Re, {
|
|
1201
|
+
key: 0,
|
|
1202
|
+
uid: D.value,
|
|
1203
|
+
head: Ji.value.headers,
|
|
1204
|
+
body: Ji.value.rows,
|
|
1205
|
+
notice: P.value.a11y.translations.tableAvailable,
|
|
1206
|
+
caption: P.value.a11y.translations.tableCaption
|
|
1207
|
+
}, null, 8, [
|
|
1208
|
+
"uid",
|
|
1209
|
+
"head",
|
|
1210
|
+
"body",
|
|
1211
|
+
"notice",
|
|
1212
|
+
"caption"
|
|
1213
|
+
])) : p("", !0),
|
|
1214
|
+
P.value.userOptions.buttons.annotator ? (y(), f(w(Zt), {
|
|
1215
|
+
key: 1,
|
|
1216
|
+
svgRef: w(G),
|
|
1217
|
+
backgroundColor: L.value.backgroundColor,
|
|
1218
|
+
color: L.value.color,
|
|
1219
|
+
active: Ci.value,
|
|
1220
|
+
isCursorPointer: R.value,
|
|
1221
|
+
palette: P.value.userOptions.annotatorPalette,
|
|
1222
|
+
onClose: wi
|
|
1223
|
+
}, {
|
|
1224
|
+
"annotator-action-close": T(() => [S(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
1225
|
+
"annotator-action-color": T(({ color: t }) => [S(e.$slots, "annotator-action-color", v(g({ color: t })), void 0, !0)]),
|
|
1226
|
+
"annotator-action-draw": T(({ mode: t }) => [S(e.$slots, "annotator-action-draw", v(g({ mode: t })), void 0, !0)]),
|
|
1227
|
+
"annotator-action-undo": T(({ disabled: t }) => [S(e.$slots, "annotator-action-undo", v(g({ disabled: t })), void 0, !0)]),
|
|
1228
|
+
"annotator-action-redo": T(({ disabled: t }) => [S(e.$slots, "annotator-action-redo", v(g({ disabled: t })), void 0, !0)]),
|
|
1229
|
+
"annotator-action-delete": T(({ disabled: t }) => [S(e.$slots, "annotator-action-delete", v(g({ disabled: t })), void 0, !0)]),
|
|
1230
|
+
_: 3
|
|
1231
|
+
}, 8, [
|
|
1232
|
+
"svgRef",
|
|
1233
|
+
"backgroundColor",
|
|
1234
|
+
"color",
|
|
1235
|
+
"active",
|
|
1236
|
+
"isCursorPointer",
|
|
1237
|
+
"palette"
|
|
1238
|
+
])) : p("", !0),
|
|
1239
|
+
Tr.value ? (y(), m("div", {
|
|
1240
|
+
key: 2,
|
|
1241
|
+
ref_key: "noTitle",
|
|
1242
|
+
ref: cn,
|
|
1243
|
+
class: "vue-data-ui-no-title-space",
|
|
1244
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
1245
|
+
}, null, 512)) : p("", !0),
|
|
1246
|
+
L.value.title.text ? (y(), m("div", {
|
|
1247
|
+
key: 3,
|
|
1248
|
+
ref_key: "chartTitle",
|
|
1249
|
+
ref: An,
|
|
1250
|
+
style: "width:100%;background:transparent;padding-bottom:24px",
|
|
1251
|
+
onMouseleave: ni
|
|
1252
|
+
}, [(y(), f(je, {
|
|
1253
|
+
key: `title_${dn.value}`,
|
|
1254
|
+
config: {
|
|
1255
|
+
title: {
|
|
1256
|
+
cy: "donut-evolution-div-title",
|
|
1257
|
+
...L.value.title
|
|
1258
|
+
},
|
|
1259
|
+
subtitle: {
|
|
1260
|
+
cy: "donut-evolution-div-subtitle",
|
|
1261
|
+
...L.value.title.subtitle
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
}, null, 8, ["config"]))], 544)) : p("", !0),
|
|
1265
|
+
h("div", { id: `legend-top-${D.value}` }, null, 8, st),
|
|
1266
|
+
P.value.userOptions.show && zn.value && (w(yr) || w(_r)) ? (y(), f(w(Qt), {
|
|
1267
|
+
ref_key: "userOptionsRef",
|
|
1268
|
+
ref: bn,
|
|
1269
|
+
key: `user_options_${ln.value}`,
|
|
1270
|
+
backgroundColor: L.value.backgroundColor,
|
|
1271
|
+
color: L.value.color,
|
|
1272
|
+
isPrinting: w(xr),
|
|
1273
|
+
isImaging: w(Sr),
|
|
1274
|
+
uid: D.value,
|
|
1275
|
+
hasPdf: P.value.userOptions.buttons.pdf,
|
|
1276
|
+
hasImg: P.value.userOptions.buttons.img,
|
|
1277
|
+
hasSvg: P.value.userOptions.buttons.svg,
|
|
1278
|
+
hasXls: P.value.userOptions.buttons.csv,
|
|
1279
|
+
hasTable: P.value.userOptions.buttons.table,
|
|
1280
|
+
hasFullscreen: P.value.userOptions.buttons.fullscreen,
|
|
1281
|
+
hasAltCopy: P.value.userOptions.buttons.altCopy,
|
|
1282
|
+
isFullscreen: bi.value,
|
|
1283
|
+
titles: { ...P.value.userOptions.buttonTitles },
|
|
1284
|
+
chartElement: A.value,
|
|
1285
|
+
position: P.value.userOptions.position,
|
|
1286
|
+
hasAnnotator: P.value.userOptions.buttons.annotator,
|
|
1287
|
+
isAnnotation: Ci.value,
|
|
1288
|
+
callbacks: P.value.userOptions.callbacks,
|
|
1289
|
+
printScale: P.value.userOptions.print.scale,
|
|
1290
|
+
tableDialog: P.value.table.useDialog,
|
|
1291
|
+
isCursorPointer: R.value,
|
|
1292
|
+
onToggleFullscreen: xi,
|
|
1293
|
+
onGeneratePdf: w(Cr),
|
|
1294
|
+
onGenerateCsv: yi,
|
|
1295
|
+
onGenerateImage: w(Ui),
|
|
1296
|
+
onGenerateSvg: w(Hi),
|
|
1297
|
+
onToggleTable: Si,
|
|
1298
|
+
onToggleAnnotator: wi,
|
|
1299
|
+
onCopyAlt: Wi,
|
|
1300
|
+
style: Xe({ visibility: w(yr) ? w(_r) ? "visible" : "hidden" : "visible" })
|
|
1301
|
+
}, We({ _: 2 }, [
|
|
1302
|
+
e.$slots.menuIcon ? {
|
|
1303
|
+
name: "menuIcon",
|
|
1304
|
+
fn: T(({ isOpen: t, color: n }) => [S(e.$slots, "menuIcon", v(g({
|
|
1305
|
+
isOpen: t,
|
|
1306
|
+
color: n
|
|
1307
|
+
})), void 0, !0)]),
|
|
1308
|
+
key: "0"
|
|
1309
|
+
} : void 0,
|
|
1310
|
+
e.$slots.optionPdf ? {
|
|
1311
|
+
name: "optionPdf",
|
|
1312
|
+
fn: T(() => [S(e.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1313
|
+
key: "1"
|
|
1314
|
+
} : void 0,
|
|
1315
|
+
e.$slots.optionCsv ? {
|
|
1316
|
+
name: "optionCsv",
|
|
1317
|
+
fn: T(() => [S(e.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1318
|
+
key: "2"
|
|
1319
|
+
} : void 0,
|
|
1320
|
+
e.$slots.optionImg ? {
|
|
1321
|
+
name: "optionImg",
|
|
1322
|
+
fn: T(() => [S(e.$slots, "optionImg", {}, void 0, !0)]),
|
|
1323
|
+
key: "3"
|
|
1324
|
+
} : void 0,
|
|
1325
|
+
e.$slots.optionSvg ? {
|
|
1326
|
+
name: "optionSvg",
|
|
1327
|
+
fn: T(() => [S(e.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1328
|
+
key: "4"
|
|
1329
|
+
} : void 0,
|
|
1330
|
+
e.$slots.optionTable ? {
|
|
1331
|
+
name: "optionTable",
|
|
1332
|
+
fn: T(() => [S(e.$slots, "optionTable", {}, void 0, !0)]),
|
|
1333
|
+
key: "5"
|
|
1334
|
+
} : void 0,
|
|
1335
|
+
e.$slots.optionFullscreen ? {
|
|
1336
|
+
name: "optionFullscreen",
|
|
1337
|
+
fn: T(({ toggleFullscreen: t, isFullscreen: n }) => [S(e.$slots, "optionFullscreen", v(g({
|
|
1338
|
+
toggleFullscreen: t,
|
|
1339
|
+
isFullscreen: n
|
|
1340
|
+
})), void 0, !0)]),
|
|
1341
|
+
key: "6"
|
|
1342
|
+
} : void 0,
|
|
1343
|
+
e.$slots.optionAnnotator ? {
|
|
1344
|
+
name: "optionAnnotator",
|
|
1345
|
+
fn: T(({ toggleAnnotator: t, isAnnotator: n }) => [S(e.$slots, "optionAnnotator", v(g({
|
|
1346
|
+
toggleAnnotator: t,
|
|
1347
|
+
isAnnotator: n
|
|
1348
|
+
})), void 0, !0)]),
|
|
1349
|
+
key: "7"
|
|
1350
|
+
} : void 0,
|
|
1351
|
+
e.$slots.optionAltCopy ? {
|
|
1352
|
+
name: "optionAltCopy",
|
|
1353
|
+
fn: T(({ altCopy: t }) => [S(e.$slots, "optionAltCopy", v(g({ altCopy: t })), void 0, !0)]),
|
|
1354
|
+
key: "8"
|
|
1355
|
+
} : void 0,
|
|
1356
|
+
e.$slots["custom-menu-before"] ? {
|
|
1357
|
+
name: "custom-menu-before",
|
|
1358
|
+
fn: T(() => [S(e.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
1359
|
+
key: "9"
|
|
1360
|
+
} : void 0,
|
|
1361
|
+
e.$slots["custom-menu-after"] ? {
|
|
1362
|
+
name: "custom-menu-after",
|
|
1363
|
+
fn: T(() => [S(e.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
1364
|
+
key: "10"
|
|
1365
|
+
} : void 0
|
|
1366
|
+
]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style".split("."))) : p("", !0),
|
|
1367
|
+
h("div", ct, [(y(), m("svg", {
|
|
1368
|
+
ref_key: "svgRef",
|
|
1369
|
+
ref: G,
|
|
1370
|
+
xmlns: w(de),
|
|
1371
|
+
"aria-describedby": `chart-instructions-${D.value}`,
|
|
1372
|
+
class: _({
|
|
1373
|
+
"vue-data-ui-fullscreen--on": bi.value,
|
|
1374
|
+
"vue-data-ui-fulscreen--off": !bi.value,
|
|
1375
|
+
"vue-data-ui-no-transition": !w(Un),
|
|
1376
|
+
"vue-ui-donut-evolution-chart-zoom-pointer-focus": W.value && Xn.value
|
|
1377
|
+
}),
|
|
1378
|
+
viewBox: `0 0 ${q.value.absoluteWidth} ${q.value.absoluteHeight}`,
|
|
1379
|
+
style: Xe({
|
|
1380
|
+
maxWidth: "100%",
|
|
1381
|
+
overflow: "visible",
|
|
1382
|
+
background: "transparent",
|
|
1383
|
+
color: L.value.color,
|
|
1384
|
+
cursor: W.value ? B.value ? "col-resize" : "crosshair" : void 0,
|
|
1385
|
+
touchAction: W.value ? "pan-y" : void 0,
|
|
1386
|
+
userSelect: W.value ? "none" : void 0
|
|
1387
|
+
}),
|
|
1388
|
+
tabindex: "0",
|
|
1389
|
+
onFocus: Gi,
|
|
1390
|
+
onBlur: Ki,
|
|
1391
|
+
onKeydown: qi,
|
|
1392
|
+
onPointerdown: $r,
|
|
1393
|
+
onPointermove: ei,
|
|
1394
|
+
onPointerup: ti,
|
|
1395
|
+
onPointercancel: Kr,
|
|
1396
|
+
onClickCapture: Jr
|
|
1397
|
+
}, [
|
|
1398
|
+
Ke(w(Xt)),
|
|
1399
|
+
e.$slots["chart-background"] ? (y(), m("foreignObject", {
|
|
1400
|
+
key: 0,
|
|
1401
|
+
x: q.value.left,
|
|
1402
|
+
y: q.value.top,
|
|
1403
|
+
width: q.value.width,
|
|
1404
|
+
height: q.value.height,
|
|
1405
|
+
style: { pointerEvents: "none" }
|
|
1406
|
+
}, [S(e.$slots, "chart-background", {}, void 0, !0)], 8, ut)) : p("", !0),
|
|
1407
|
+
h("defs", null, [Ke(Fe, {
|
|
1408
|
+
t: "linear",
|
|
1409
|
+
id: `hover_${D.value}`,
|
|
1410
|
+
x1: "0%",
|
|
1411
|
+
y1: "0%",
|
|
1412
|
+
x2: "0%",
|
|
1413
|
+
y2: "100%",
|
|
1414
|
+
stops: [[
|
|
1415
|
+
"0%",
|
|
1416
|
+
w(ue)(L.value.backgroundColor, I.value.highlighter.opacity),
|
|
1417
|
+
1
|
|
1418
|
+
], [
|
|
1419
|
+
"100%",
|
|
1420
|
+
w(ue)(I.value.highlighter.color, I.value.highlighter.opacity),
|
|
1421
|
+
1
|
|
1422
|
+
]]
|
|
1423
|
+
}, null, 8, ["id", "stops"]), Ke(Fe, {
|
|
1424
|
+
t: "radial",
|
|
1425
|
+
id: `focus_${D.value}`,
|
|
1426
|
+
stops: [
|
|
1427
|
+
[
|
|
1428
|
+
"0%",
|
|
1429
|
+
w(ue)(w(c)(L.value.backgroundColor), 0),
|
|
1430
|
+
1
|
|
1431
|
+
],
|
|
1432
|
+
[
|
|
1433
|
+
"77%",
|
|
1434
|
+
w(ue)("#FFFFFF", 30),
|
|
1435
|
+
1
|
|
1436
|
+
],
|
|
1437
|
+
[
|
|
1438
|
+
"100%",
|
|
1439
|
+
w(ue)(w(c)(L.value.backgroundColor), 0),
|
|
1440
|
+
1
|
|
1441
|
+
]
|
|
1442
|
+
]
|
|
1443
|
+
}, null, 8, ["id", "stops"])]),
|
|
1444
|
+
F.value.show ? (y(), m("g", dt, [
|
|
1445
|
+
h("line", {
|
|
1446
|
+
x1: K.value ? q.value.right : q.value.left,
|
|
1447
|
+
x2: K.value ? q.value.right : q.value.left,
|
|
1448
|
+
y1: q.value.top,
|
|
1449
|
+
y2: q.value.top + q.value.height,
|
|
1450
|
+
stroke: F.value.stroke,
|
|
1451
|
+
"stroke-width": F.value.strokeWidth,
|
|
1452
|
+
"stroke-linecap": "round"
|
|
1453
|
+
}, null, 8, ft),
|
|
1454
|
+
h("line", {
|
|
1455
|
+
x1: q.value.left,
|
|
1456
|
+
x2: q.value.right,
|
|
1457
|
+
y1: q.value.bottom,
|
|
1458
|
+
y2: q.value.bottom,
|
|
1459
|
+
stroke: F.value.stroke,
|
|
1460
|
+
"stroke-width": F.value.strokeWidth,
|
|
1461
|
+
"stroke-linecap": "round"
|
|
1462
|
+
}, null, 8, pt),
|
|
1463
|
+
F.value.showVerticalLines ? (y(), m("g", mt, [(y(!0), m(u, null, x(z.value.end - z.value.start, (e, t) => (y(), m("line", {
|
|
1464
|
+
x1: q.value.left + (t + 1) * Z.value,
|
|
1465
|
+
x2: q.value.left + (t + 1) * Z.value,
|
|
1466
|
+
y1: q.value.top,
|
|
1467
|
+
y2: q.value.bottom,
|
|
1468
|
+
stroke: F.value.stroke,
|
|
1469
|
+
"stroke-width": F.value.strokeWidth,
|
|
1470
|
+
"stroke-linecap": "round"
|
|
1471
|
+
}, null, 8, ht))), 256))])) : p("", !0)
|
|
1472
|
+
])) : p("", !0),
|
|
1473
|
+
h("g", null, [F.value.axis.yLabel ? (y(), m("text", {
|
|
1474
|
+
key: 0,
|
|
1475
|
+
ref_key: "yAxisLabel",
|
|
1476
|
+
ref: _n,
|
|
1477
|
+
"font-size": F.value.axis.fontSize,
|
|
1478
|
+
fill: F.value.axis.color,
|
|
1479
|
+
transform: `translate(${K.value ? q.value.absoluteWidth - F.value.axis.fontSize / 2 - F.value.axis.yLabelOffsetX : F.value.axis.fontSize}, ${q.value.top + q.value.height / 2}) rotate(-90)`,
|
|
1480
|
+
"text-anchor": "middle",
|
|
1481
|
+
style: { transition: "none" }
|
|
1482
|
+
}, C(F.value.axis.yLabel), 9, gt)) : p("", !0), F.value.axis.xLabel ? (y(), m("text", {
|
|
1483
|
+
key: 1,
|
|
1484
|
+
ref_key: "xAxisLabel",
|
|
1485
|
+
ref: gn,
|
|
1486
|
+
"text-anchor": "middle",
|
|
1487
|
+
x: q.value.absoluteWidth / 2,
|
|
1488
|
+
y: q.value.absoluteHeight - 3,
|
|
1489
|
+
"font-size": F.value.axis.fontSize,
|
|
1490
|
+
fill: F.value.axis.color
|
|
1491
|
+
}, C(F.value.axis.xLabel), 9, _t)) : p("", !0)]),
|
|
1492
|
+
F.value.yAxis.dataLabels.show ? (y(), m("g", {
|
|
1493
|
+
key: 2,
|
|
1494
|
+
ref_key: "scaleLabels",
|
|
1495
|
+
ref: mn,
|
|
1496
|
+
class: _({
|
|
1497
|
+
"donut-opacity": !0,
|
|
1498
|
+
"donut-behind": k.value !== null
|
|
1499
|
+
})
|
|
1500
|
+
}, [(y(!0), m(u, null, x(Rr.value, (e, n) => (y(), m("g", { key: `sl_${n}` }, [e.value >= Q.value.min && e.value <= Q.value.max ? (y(), m("path", {
|
|
1501
|
+
key: 0,
|
|
1502
|
+
class: _({ "vue-data-ui-transition": w(Un) }),
|
|
1503
|
+
d: `M${K.value ? q.value.right : q.value.left},${e.y} ${K.value ? q.value.right + 5 : q.value.left - 5},${e.y}`,
|
|
1504
|
+
stroke: F.value.stroke,
|
|
1505
|
+
"stroke-width": F.value.strokeWidth,
|
|
1506
|
+
"stroke-linecap": "round"
|
|
1507
|
+
}, null, 10, vt)) : p("", !0), e.value >= Q.value.min && e.value <= Q.value.max ? (y(), m("text", {
|
|
1508
|
+
key: 1,
|
|
1509
|
+
class: _({ "vue-data-ui-transition": w(Un) }),
|
|
1510
|
+
transform: `translate(${K.value ? q.value.right - F.value.yAxis.dataLabels.offsetX + 7 : q.value.left + F.value.yAxis.dataLabels.offsetX - 7}, ${e.y + F.value.yAxis.dataLabels.fontSize / 3})`,
|
|
1511
|
+
"font-size": F.value.yAxis.dataLabels.fontSize,
|
|
1512
|
+
"text-anchor": K.value ? "start" : "end",
|
|
1513
|
+
fill: F.value.yAxis.dataLabels.color,
|
|
1514
|
+
"font-weight": F.value.yAxis.dataLabels.bold ? "bold" : "normal"
|
|
1515
|
+
}, C(w(ge)(e.value) ? w(oe)(I.value.dataLabels.formatter, e.value, w(t)({
|
|
1516
|
+
p: I.value.dataLabels.prefix,
|
|
1517
|
+
v: e.value,
|
|
1518
|
+
s: I.value.dataLabels.suffix,
|
|
1519
|
+
r: I.value.grid.yAxis.dataLabels.roundingValue
|
|
1520
|
+
}), {
|
|
1521
|
+
datapoint: e,
|
|
1522
|
+
seriesIndex: n
|
|
1523
|
+
}) : ""), 11, yt)) : p("", !0)]))), 128))], 2)) : p("", !0),
|
|
1524
|
+
F.value.xAxis.dataLabels.show ? (y(), m("g", {
|
|
1525
|
+
key: 3,
|
|
1526
|
+
ref_key: "timeLabelsEls",
|
|
1527
|
+
ref: hn,
|
|
1528
|
+
class: _({ "donut-opacity": !0 })
|
|
1529
|
+
}, [(y(!0), m(u, null, x(z.value.end - z.value.start, (e, t) => (y(), m("g", null, [(F.value.xAxis.dataLabels.showOnlyFirstAndLast && (t === 0 || t === Y.value - 1) || !F.value.xAxis.dataLabels.showOnlyFirstAndLast) && X.value[t] && X.value[t].text ? (y(), m("g", bt, [String(X.value[t].text).includes("\n") ? (y(), m("text", {
|
|
1530
|
+
key: 1,
|
|
1531
|
+
class: "vue-data-ui-time-label",
|
|
1532
|
+
"text-anchor": F.value.xAxis.dataLabels.rotation > 0 ? "start" : F.value.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
|
|
1533
|
+
"font-size": F.value.xAxis.dataLabels.fontSize,
|
|
1534
|
+
fill: F.value.xAxis.dataLabels.color,
|
|
1535
|
+
transform: `translate(${q.value.left + Z.value * t + Z.value / 2}, ${q.value.bottom + F.value.xAxis.dataLabels.fontSize + F.value.xAxis.dataLabels.offsetY}), rotate(${F.value.xAxis.dataLabels.rotation})`,
|
|
1536
|
+
innerHTML: w(o)({
|
|
1537
|
+
content: String(X.value[t].text),
|
|
1538
|
+
fontSize: F.value.xAxis.dataLabels.fontSize,
|
|
1539
|
+
fill: I.value.grid.xAxis.dataLabels.color,
|
|
1540
|
+
x: 0,
|
|
1541
|
+
y: 0
|
|
1542
|
+
})
|
|
1543
|
+
}, null, 8, St)) : (y(), m("text", {
|
|
1544
|
+
key: 0,
|
|
1545
|
+
class: "vue-data-ui-time-label",
|
|
1546
|
+
"text-anchor": F.value.xAxis.dataLabels.rotation > 0 ? "start" : F.value.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
|
|
1547
|
+
"font-size": F.value.xAxis.dataLabels.fontSize,
|
|
1548
|
+
fill: F.value.xAxis.dataLabels.color,
|
|
1549
|
+
transform: `translate(${q.value.left + Z.value * t + Z.value / 2}, ${q.value.bottom + F.value.xAxis.dataLabels.fontSize + F.value.xAxis.dataLabels.offsetY}), rotate(${F.value.xAxis.dataLabels.rotation})`
|
|
1550
|
+
}, C(X.value[t].text || ""), 9, xt))])) : p("", !0)]))), 256))], 512)) : p("", !0),
|
|
1551
|
+
(y(!0), m(u, null, x($.value, (e, t) => (y(), m("g", null, [I.value.line.show && t < $.value.length - 1 && ![e.subtotal, $.value[t + 1].subtotal].includes(null) ? (y(), m("line", {
|
|
1552
|
+
key: 0,
|
|
1553
|
+
class: _({
|
|
1554
|
+
"donut-opacity": !0,
|
|
1555
|
+
"donut-behind": k.value !== null
|
|
1556
|
+
}),
|
|
1557
|
+
x1: e.x,
|
|
1558
|
+
y1: e.y,
|
|
1559
|
+
x2: $.value[t + 1].x,
|
|
1560
|
+
y2: $.value[t + 1].y,
|
|
1561
|
+
stroke: I.value.line.stroke,
|
|
1562
|
+
"stroke-width": I.value.line.strokeWidth,
|
|
1563
|
+
"stroke-linecap": "round",
|
|
1564
|
+
"stroke-linejoin": "round"
|
|
1565
|
+
}, null, 10, Ct)) : p("", !0), e.subtotal === null ? p("", !0) : (y(), m("g", wt, [e.subtotal ? (y(), m("circle", {
|
|
1566
|
+
key: 0,
|
|
1567
|
+
cx: e.x,
|
|
1568
|
+
cy: e.y,
|
|
1569
|
+
r: e.activeRadius,
|
|
1570
|
+
fill: L.value.backgroundColor
|
|
1571
|
+
}, null, 8, Tt)) : p("", !0)]))]))), 256)),
|
|
1572
|
+
(y(!0), m(u, null, x($.value, (e, t) => (y(), m("g", { class: _({
|
|
1573
|
+
"donut-opacity": !0,
|
|
1574
|
+
"donut-behind": t !== k.value && k.value !== null
|
|
1575
|
+
}) }, [e.subtotal ? (y(), m("g", Et, [k.value !== null && k.value === t ? (y(), m("g", Dt, [
|
|
1576
|
+
(y(!0), m(u, null, x(e.donutHover, (t) => (y(), m("g", null, [Ti(t) ? (y(), m("path", {
|
|
1577
|
+
key: 0,
|
|
1578
|
+
d: w(ae)(t, {
|
|
1579
|
+
x: t.center.endX,
|
|
1580
|
+
y: t.center.endY
|
|
1581
|
+
}, 12, 12, {
|
|
1582
|
+
x: e.x,
|
|
1583
|
+
y: e.y
|
|
1584
|
+
}, !1, 20),
|
|
1585
|
+
stroke: t.color,
|
|
1586
|
+
"stroke-width": "1",
|
|
1587
|
+
"stroke-linecap": "round",
|
|
1588
|
+
"stroke-linejoin": "round",
|
|
1589
|
+
fill: "none"
|
|
1590
|
+
}, null, 8, Ot)) : p("", !0)]))), 256)),
|
|
1591
|
+
(y(!0), m(u, null, x(e.donutHover, (t, n) => (y(), m("g", null, [Ti(t) ? (y(), m("text", {
|
|
1592
|
+
key: 0,
|
|
1593
|
+
"data-cy-hover-label": "",
|
|
1594
|
+
"text-anchor": w(ie)(t, !0, 0).anchor,
|
|
1595
|
+
x: w(ie)(t, !0, 9).x,
|
|
1596
|
+
y: w(le)(t, 14, 10),
|
|
1597
|
+
fill: F.value.yAxis.dataLabels.color,
|
|
1598
|
+
"font-size": 8,
|
|
1599
|
+
"font-weight": "bold"
|
|
1600
|
+
}, C(t.name) + ": " + C(Br(t, e.donut)) + " (" + C(t.value === null ? "-" : zr(t.value, t, n)) + ") ", 9, kt)) : p("", !0)]))), 256)),
|
|
1601
|
+
h("g", null, [h("circle", {
|
|
1602
|
+
cx: e.x,
|
|
1603
|
+
cy: e.y,
|
|
1604
|
+
r: e.hoverRadius,
|
|
1605
|
+
fill: L.value.backgroundColor
|
|
1606
|
+
}, null, 8, At)])
|
|
1607
|
+
])) : p("", !0)])) : p("", !0)], 2))), 256)),
|
|
1608
|
+
(y(!0), m(u, null, x($.value, (e, t) => (y(), m("g", { class: _({
|
|
1609
|
+
"donut-opacity": !0,
|
|
1610
|
+
"donut-behind": t !== k.value && k.value !== null
|
|
1611
|
+
}) }, [e.subtotal === null ? p("", !0) : (y(), m("g", jt, [e.subtotal === 0 ? (y(), m("circle", {
|
|
1612
|
+
key: 0,
|
|
1613
|
+
cx: e.x,
|
|
1614
|
+
cy: e.y,
|
|
1615
|
+
r: 3,
|
|
1616
|
+
fill: L.value.color
|
|
1617
|
+
}, null, 8, Mt)) : k.value !== null && k.value === t ? (y(), m("g", Nt, [(y(!0), m(u, null, x(e.donutHover, (e, t) => (y(), m("path", {
|
|
1618
|
+
d: e.arcSlice,
|
|
1619
|
+
fill: `${e.color}`,
|
|
1620
|
+
"stroke-width": 1,
|
|
1621
|
+
stroke: L.value.backgroundColor
|
|
1622
|
+
}, null, 8, Pt))), 256))])) : (y(), m("g", Ft, [(y(!0), m(u, null, x(e.donut, (e, t) => (y(), m("path", {
|
|
1623
|
+
d: e.arcSlice,
|
|
1624
|
+
fill: `${e.color}`,
|
|
1625
|
+
"stroke-width": .5,
|
|
1626
|
+
stroke: L.value.backgroundColor
|
|
1627
|
+
}, null, 8, It))), 256))]))]))], 2))), 256)),
|
|
1628
|
+
(y(!0), m(u, null, x($.value, (e, t) => (y(), m("g", { class: _({
|
|
1629
|
+
"donut-opacity": !0,
|
|
1630
|
+
"donut-behind": t !== k.value && k.value !== null || on.value && t !== sn.value.index
|
|
1631
|
+
}) }, [e.subtotal !== null && I.value.dataLabels.show ? (y(), m("text", {
|
|
1632
|
+
key: 0,
|
|
1633
|
+
"text-anchor": "middle",
|
|
1634
|
+
x: e.x,
|
|
1635
|
+
y: k.value === e.index && e.subtotal ? e.y + I.value.dataLabels.fontSize / 3 : e.y - e.radius - I.value.dataLabels.fontSize + I.value.dataLabels.offsetY,
|
|
1636
|
+
"font-size": I.value.dataLabels.fontSize,
|
|
1637
|
+
"font-weight": "bold",
|
|
1638
|
+
fill: I.value.dataLabels.color
|
|
1639
|
+
}, C(zr(e.subtotal, e, t)), 9, Lt)) : p("", !0)], 2))), 256)),
|
|
1640
|
+
(y(!0), m(u, null, x($.value, (e, t) => (y(), m("rect", {
|
|
1641
|
+
x: q.value.left + t * Z.value,
|
|
1642
|
+
y: q.value.top,
|
|
1643
|
+
width: Z.value,
|
|
1644
|
+
height: q.value.height,
|
|
1645
|
+
fill: [k.value, ii.value].includes(e.index) ? `url(#hover_${D.value})` : "transparent",
|
|
1646
|
+
class: _({ "donut-hover": R.value && e.subtotal && [k.value, ii.value].includes(e.index) }),
|
|
1647
|
+
style: { pointerEvents: "none" }
|
|
1648
|
+
}, null, 10, Rt))), 256)),
|
|
1649
|
+
(y(!0), m(u, null, x($.value, (e, t) => (y(), m("rect", {
|
|
1650
|
+
"data-cy-trap": "",
|
|
1651
|
+
x: q.value.left + t * Z.value,
|
|
1652
|
+
y: q.value.top,
|
|
1653
|
+
width: Z.value,
|
|
1654
|
+
height: q.value.height,
|
|
1655
|
+
fill: "transparent",
|
|
1656
|
+
onMouseenter: (t) => ri(e),
|
|
1657
|
+
onMouseleave: (t) => ni(e),
|
|
1658
|
+
onClick: (n) => ci(e, t),
|
|
1659
|
+
style: Xe({ cursor: W.value ? B.value ? "col-resize" : "crosshair" : void 0 }),
|
|
1660
|
+
class: _({ "donut-hover": R.value && k.value === e.index && e.subtotal })
|
|
1661
|
+
}, null, 46, zt))), 256)),
|
|
1662
|
+
Hr.value ? (y(), m("rect", {
|
|
1663
|
+
key: 4,
|
|
1664
|
+
x: Hr.value.x,
|
|
1665
|
+
y: Hr.value.y,
|
|
1666
|
+
width: Hr.value.width,
|
|
1667
|
+
height: Hr.value.height,
|
|
1668
|
+
fill: $n.value.selection.fill,
|
|
1669
|
+
"fill-opacity": $n.value.selection.fillOpacity,
|
|
1670
|
+
stroke: $n.value.selection.stroke,
|
|
1671
|
+
"stroke-opacity": $n.value.selection.strokeOpacity,
|
|
1672
|
+
"stroke-width": $n.value.selection.strokeWidth,
|
|
1673
|
+
"stroke-dasharray": $n.value.selection.strokeDasharray,
|
|
1674
|
+
"stroke-linecap": "round",
|
|
1675
|
+
"stroke-linejoin": "round",
|
|
1676
|
+
"pointer-events": "none"
|
|
1677
|
+
}, null, 8, Bt)) : p("", !0),
|
|
1678
|
+
S(e.$slots, "svg", { svg: {
|
|
1679
|
+
...q.value,
|
|
1680
|
+
isPrintingImg: w(xr) || w(Sr) || w(Bi),
|
|
1681
|
+
isPrintingSvg: w(Vi)
|
|
1682
|
+
} }, void 0, !0)
|
|
1683
|
+
], 46, lt)), e.$slots.hint ? (y(), m("div", Vt, [S(e.$slots, "hint", v(g({
|
|
1684
|
+
hint: P.value.a11y.translations.keyboardNavigation,
|
|
1685
|
+
isVisible: Rn.value
|
|
1686
|
+
})), void 0, !0)])) : p("", !0)]),
|
|
1687
|
+
e.$slots.watermark ? (y(), m("div", Ht, [S(e.$slots, "watermark", v(g({ isPrinting: w(xr) || w(Sr) || w(Bi) || w(Vi) })), void 0, !0)])) : p("", !0),
|
|
1688
|
+
h("div", {
|
|
1689
|
+
ref_key: "chartSlicer",
|
|
1690
|
+
ref: Pn,
|
|
1691
|
+
style: Xe(`width:100%;background:${L.value.backgroundColor}`),
|
|
1692
|
+
"data-dom-to-png-ignore": ""
|
|
1693
|
+
}, [Y.value > 1 && L.value.zoom.show ? (y(), f(Ie, {
|
|
1694
|
+
ref_key: "slicerComponent",
|
|
1695
|
+
ref: Nn,
|
|
1696
|
+
key: `slicer_${un.value}`,
|
|
1697
|
+
background: L.value.zoom.color,
|
|
1698
|
+
borderColor: L.value.backgroundColor,
|
|
1699
|
+
fontSize: L.value.zoom.fontSize,
|
|
1700
|
+
useResetSlot: L.value.zoom.useResetSlot,
|
|
1701
|
+
timeLabels: X.value,
|
|
1702
|
+
textColor: L.value.color,
|
|
1703
|
+
inputColor: L.value.zoom.color,
|
|
1704
|
+
selectColor: L.value.zoom.highlightColor,
|
|
1705
|
+
max: Y.value,
|
|
1706
|
+
min: 0,
|
|
1707
|
+
valueStart: z.value.start,
|
|
1708
|
+
valueEnd: z.value.end,
|
|
1709
|
+
refreshStartPoint: L.value.zoom.startIndex === null ? 0 : L.value.zoom.startIndex,
|
|
1710
|
+
refreshEndPoint: L.value.zoom.endIndex === null ? Y.value : L.value.zoom.endIndex + 1,
|
|
1711
|
+
enableRangeHandles: L.value.zoom.enableRangeHandles,
|
|
1712
|
+
enableSelectionDrag: L.value.zoom.enableSelectionDrag,
|
|
1713
|
+
focusOnDrag: L.value.zoom.focusOnDrag,
|
|
1714
|
+
focusRangeRatio: L.value.zoom.focusRangeRatio,
|
|
1715
|
+
isCursorPointer: R.value,
|
|
1716
|
+
maxWidth: L.value.zoom.maxWidth,
|
|
1717
|
+
minimapLeftInsetRatio: q.value.absoluteWidth > 0 && L.value.zoom.autoFit ? q.value.left / q.value.absoluteWidth : null,
|
|
1718
|
+
minimapRightInsetRatio: q.value.absoluteWidth > 0 && L.value.zoom.autoFit ? (q.value.absoluteWidth - q.value.right) / q.value.absoluteWidth : null,
|
|
1719
|
+
"onUpdate:start": hr,
|
|
1720
|
+
"onUpdate:end": gr,
|
|
1721
|
+
onReset: n[0] ||= () => pr({
|
|
1722
|
+
force: !0,
|
|
1723
|
+
publish: !0
|
|
1724
|
+
})
|
|
1725
|
+
}, {
|
|
1726
|
+
"reset-action": T(({ reset: t }) => [S(e.$slots, "reset-action", v(g({ reset: t })), void 0, !0)]),
|
|
1727
|
+
_: 3
|
|
1728
|
+
}, 8, [
|
|
1729
|
+
"background",
|
|
1730
|
+
"borderColor",
|
|
1731
|
+
"fontSize",
|
|
1732
|
+
"useResetSlot",
|
|
1733
|
+
"timeLabels",
|
|
1734
|
+
"textColor",
|
|
1735
|
+
"inputColor",
|
|
1736
|
+
"selectColor",
|
|
1737
|
+
"max",
|
|
1738
|
+
"valueStart",
|
|
1739
|
+
"valueEnd",
|
|
1740
|
+
"refreshStartPoint",
|
|
1741
|
+
"refreshEndPoint",
|
|
1742
|
+
"enableRangeHandles",
|
|
1743
|
+
"enableSelectionDrag",
|
|
1744
|
+
"focusOnDrag",
|
|
1745
|
+
"focusRangeRatio",
|
|
1746
|
+
"isCursorPointer",
|
|
1747
|
+
"maxWidth",
|
|
1748
|
+
"minimapLeftInsetRatio",
|
|
1749
|
+
"minimapRightInsetRatio"
|
|
1750
|
+
])) : p("", !0)], 4),
|
|
1751
|
+
h("div", { id: `legend-bottom-${D.value}` }, null, 8, Ut),
|
|
1752
|
+
vn.value && (L.value.legend.show || e.$slots.legend) ? (y(), f(Ue, {
|
|
1753
|
+
key: 6,
|
|
1754
|
+
to: L.value.legend.position === "top" ? `#legend-top-${D.value}` : `#legend-bottom-${D.value}`
|
|
1755
|
+
}, [h("div", {
|
|
1756
|
+
ref_key: "chartLegend",
|
|
1757
|
+
ref: jn
|
|
1758
|
+
}, [S(e.$slots, "legend", { legend: li.value }, () => [L.value.legend.show ? (y(), f(Ve, {
|
|
1759
|
+
key: `legend_${pn.value}`,
|
|
1760
|
+
legendSet: li.value,
|
|
1761
|
+
config: di.value,
|
|
1762
|
+
onClickMarker: n[1] ||= ({ legend: e }) => pi(e.uid)
|
|
1763
|
+
}, {
|
|
1764
|
+
item: T(({ legend: e, index: t }) => [h("div", {
|
|
1765
|
+
onClick: (t) => pi(e.uid),
|
|
1766
|
+
style: Xe(`opacity:${O.value.includes(e.uid) ? .5 : 1}`)
|
|
1767
|
+
}, C(e.display), 13, Wt)]),
|
|
1768
|
+
legendToggle: T(() => [li.value.length > 2 && L.value.legend.selectAllToggle.show && !w(Gn) ? (y(), f(Le, {
|
|
1769
|
+
key: 0,
|
|
1770
|
+
backgroundColor: L.value.legend.selectAllToggle.backgroundColor,
|
|
1771
|
+
color: L.value.legend.selectAllToggle.color,
|
|
1772
|
+
fontSize: L.value.legend.fontSize,
|
|
1773
|
+
checked: O.value.length > 0,
|
|
1774
|
+
onToggle: fi
|
|
1775
|
+
}, null, 8, [
|
|
1776
|
+
"backgroundColor",
|
|
1777
|
+
"color",
|
|
1778
|
+
"fontSize",
|
|
1779
|
+
"checked"
|
|
1780
|
+
])) : p("", !0)]),
|
|
1781
|
+
_: 1
|
|
1782
|
+
}, 8, ["legendSet", "config"])) : p("", !0)], !0)], 512)], 8, ["to"])) : p("", !0),
|
|
1783
|
+
e.$slots.source ? (y(), m("div", {
|
|
1784
|
+
key: 7,
|
|
1785
|
+
ref_key: "source",
|
|
1786
|
+
ref: Mn,
|
|
1787
|
+
dir: "auto"
|
|
1788
|
+
}, [S(e.$slots, "source", {}, void 0, !0)], 512)) : p("", !0),
|
|
1789
|
+
zn.value && P.value.userOptions.buttons.table ? (y(), f($e(Pi.value.component), Je({ key: 8 }, Pi.value.props, {
|
|
1790
|
+
ref_key: "tableUnit",
|
|
1791
|
+
ref: yn,
|
|
1792
|
+
onClose: Fi
|
|
1793
|
+
}), We({
|
|
1794
|
+
content: T(() => [(y(), f(w(Yt), {
|
|
1795
|
+
key: `table_${fn.value}`,
|
|
1796
|
+
colNames: _i.value.colNames,
|
|
1797
|
+
head: _i.value.head,
|
|
1798
|
+
body: _i.value.body,
|
|
1799
|
+
config: _i.value.config,
|
|
1800
|
+
title: P.value.table.useDialog ? "" : Pi.value.title,
|
|
1801
|
+
withCloseButton: !P.value.table.useDialog,
|
|
1802
|
+
isCursorPointer: R.value,
|
|
1803
|
+
onClose: Fi
|
|
1804
|
+
}, {
|
|
1805
|
+
th: T(({ th: e }) => [Ge(C(e.name ?? e), 1)]),
|
|
1806
|
+
td: T(({ td: e }) => [e.value === null ? (y(), m("span", Gt, "-")) : (y(), m("b", Kt, C(isNaN(e.value) ? "" : I.value.dataLabels.prefix) + C(!isNaN(e.value) && e.value !== null ? Number(e.value.toFixed(P.value.table.td.roundingValue)).toLocaleString() : e) + C(isNaN(e.value) ? "" : I.value.dataLabels.suffix), 1)), h("span", null, C(e.percentage && !isNaN(e.percentage) ? `(${Number(e.percentage.toFixed(P.value.table.td.roundingPercentage)).toLocaleString()}%)` : ""), 1)]),
|
|
1807
|
+
_: 1
|
|
1808
|
+
}, 8, [
|
|
1809
|
+
"colNames",
|
|
1810
|
+
"head",
|
|
1811
|
+
"body",
|
|
1812
|
+
"config",
|
|
1813
|
+
"title",
|
|
1814
|
+
"withCloseButton",
|
|
1815
|
+
"isCursorPointer"
|
|
1816
|
+
]))]),
|
|
1817
|
+
_: 2
|
|
1818
|
+
}, [P.value.table.useDialog ? {
|
|
1819
|
+
name: "title",
|
|
1820
|
+
fn: T(() => [Ge(C(Pi.value.title), 1)]),
|
|
1821
|
+
key: "0"
|
|
1822
|
+
} : void 0, P.value.table.useDialog ? {
|
|
1823
|
+
name: "actions",
|
|
1824
|
+
fn: T(() => [h("button", {
|
|
1825
|
+
tabindex: "0",
|
|
1826
|
+
class: "vue-ui-user-options-button",
|
|
1827
|
+
onClick: n[2] ||= (e) => yi(P.value.userOptions.callbacks.csv),
|
|
1828
|
+
style: Xe({ cursor: R.value ? "cursor" : "default" })
|
|
1829
|
+
}, [Ke(w(Jt), {
|
|
1830
|
+
name: "fileCsv",
|
|
1831
|
+
stroke: Pi.value.props.color
|
|
1832
|
+
}, null, 8, ["stroke"])], 4)]),
|
|
1833
|
+
key: "1"
|
|
1834
|
+
} : void 0]), 1040)) : p("", !0),
|
|
1835
|
+
Hn.value.show ? (y(), f(w(en), {
|
|
1836
|
+
key: 9,
|
|
1837
|
+
ref_key: "dialog",
|
|
1838
|
+
ref: Oi,
|
|
1839
|
+
onClose: n[3] ||= (e) => {
|
|
1840
|
+
sn.value = null, on.value = !1, an.value = null, k.value = null, ii.value = null;
|
|
1841
|
+
},
|
|
1842
|
+
backgroundColor: Hn.value.backgroundColor,
|
|
1843
|
+
color: Hn.value.color,
|
|
1844
|
+
headerBg: Hn.value.header.backgroundColor,
|
|
1845
|
+
headerColor: Hn.value.header.color,
|
|
1846
|
+
isFullscreen: bi.value,
|
|
1847
|
+
fullscreenParent: A.value
|
|
1848
|
+
}, {
|
|
1849
|
+
title: T(() => [Ge(C(X.value[Number(sn.value.index)] ? X.value[Number(sn.value.index)].text : ""), 1)]),
|
|
1850
|
+
content: T(() => [sn.value ? (y(), f(w($t), {
|
|
1851
|
+
key: 0,
|
|
1852
|
+
config: Di.value,
|
|
1853
|
+
dataset: Ei.value
|
|
1854
|
+
}, null, 8, ["config", "dataset"])) : p("", !0)]),
|
|
1855
|
+
_: 1
|
|
1856
|
+
}, 8, [
|
|
1857
|
+
"backgroundColor",
|
|
1858
|
+
"color",
|
|
1859
|
+
"headerBg",
|
|
1860
|
+
"headerColor",
|
|
1861
|
+
"isFullscreen",
|
|
1862
|
+
"fullscreenParent"
|
|
1863
|
+
])) : p("", !0),
|
|
1864
|
+
w(Gn) ? (y(), f(Ce, { key: 10 })) : p("", !0)
|
|
1865
|
+
], 46, at));
|
|
1866
|
+
}
|
|
1867
|
+
}, [["__scopeId", "data-v-ddb74623"]]);
|
|
1868
|
+
//#endregion
|
|
1869
|
+
export { it as n, qt as t };
|