vue-data-ui 3.19.5 → 3.19.7
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/{BaseDraggableDialog-BQcmQAK5.js → BaseDraggableDialog-DUUu2E2Q.js} +1 -1
- package/dist/{BaseIcon-CEmt3Ifx.js → BaseIcon-DM1x8hQF.js} +6 -3
- package/dist/{BaseLegendToggle-DUIqQmwM.js → BaseLegendToggle-CJTwLGXL.js} +1 -1
- package/dist/{BaseZoomControls-Ce1yqas1.js → BaseZoomControls-BkajQ8q9.js} +1 -1
- package/dist/{ColorPicker-DS_QkH3W.js → ColorPicker-DTQeqKUV.js} +1 -1
- package/dist/{DataTable-BvDJEAma.js → DataTable-DmE8Oo4i.js} +1 -1
- package/dist/{NonSvgPenAndPaper-D4Gh7O43.js → NonSvgPenAndPaper-tvWXeCsd.js} +2 -2
- package/dist/{PackageVersion-CGiidfDW.js → PackageVersion-DUU5Aku2.js} +1 -1
- package/dist/{PenAndPaper-DwpL8Z0l.js → PenAndPaper-DNgm6y3l.js} +2 -2
- package/dist/{Slicer-BlfyiHHD.js → Slicer-CPWGgGSp.js} +1 -1
- package/dist/{SlicerPreview-CG1jpZqZ.js → SlicerPreview-BU3ZeHjR.js} +1 -1
- package/dist/{UserOptions-DMw8EZEo.js → UserOptions-D7zR0tnR.js} +8 -4
- 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-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/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +107 -0
- package/dist/types/vue-ui-3d-bar.d.ts +2 -0
- package/dist/types/vue-ui-age-pyramid.d.ts +2 -0
- package/dist/types/vue-ui-bullet.d.ts +2 -0
- package/dist/types/vue-ui-bump.d.ts +2 -0
- package/dist/types/vue-ui-candlestick.d.ts +2 -0
- package/dist/types/vue-ui-carousel-table.d.ts +2 -0
- package/dist/types/vue-ui-chestnut.d.ts +2 -0
- package/dist/types/vue-ui-chord.d.ts +2 -0
- package/dist/types/vue-ui-circle-pack.d.ts +2 -0
- package/dist/types/vue-ui-dag.d.ts +2 -0
- package/dist/types/vue-ui-dashboard.d.ts +2 -0
- package/dist/types/vue-ui-donut-evolution.d.ts +2 -0
- package/dist/types/vue-ui-donut.d.ts +2 -0
- package/dist/types/vue-ui-dumbbell.d.ts +2 -0
- package/dist/types/vue-ui-flow.d.ts +2 -0
- package/dist/types/vue-ui-funnel.d.ts +2 -0
- package/dist/types/vue-ui-galaxy.d.ts +2 -0
- package/dist/types/vue-ui-gauge.d.ts +2 -0
- package/dist/types/vue-ui-geo.d.ts +2 -0
- package/dist/types/vue-ui-heatmap.d.ts +2 -0
- package/dist/types/vue-ui-history-plot.d.ts +2 -0
- package/dist/types/vue-ui-horizontal-bar.d.ts +2 -0
- package/dist/types/vue-ui-molecule.d.ts +2 -0
- package/dist/types/vue-ui-mood-radar.d.ts +2 -0
- package/dist/types/vue-ui-nested-donuts.d.ts +2 -0
- package/dist/types/vue-ui-onion.d.ts +2 -0
- package/dist/types/vue-ui-parallel-coordinate-plot.d.ts +2 -0
- package/dist/types/vue-ui-quadrant.d.ts +2 -0
- package/dist/types/vue-ui-quick-chart.d.ts +2 -0
- package/dist/types/vue-ui-radar.d.ts +2 -0
- package/dist/types/vue-ui-relation-circle.d.ts +2 -0
- package/dist/types/vue-ui-ridgeline.d.ts +2 -0
- package/dist/types/vue-ui-rings.d.ts +2 -0
- package/dist/types/vue-ui-scatter.d.ts +2 -0
- package/dist/types/vue-ui-stackbar.d.ts +2 -0
- package/dist/types/vue-ui-stackline.d.ts +2 -0
- package/dist/types/vue-ui-strip-plot.d.ts +2 -0
- package/dist/types/vue-ui-table-heatmap.d.ts +2 -0
- package/dist/types/vue-ui-table-sparkline.d.ts +2 -0
- package/dist/types/vue-ui-thermometer.d.ts +2 -0
- package/dist/types/vue-ui-tiremarks.d.ts +2 -0
- package/dist/types/vue-ui-treemap.d.ts +2 -0
- package/dist/types/vue-ui-waffle.d.ts +2 -0
- package/dist/types/vue-ui-wheel.d.ts +2 -0
- package/dist/types/vue-ui-word-cloud.d.ts +2 -0
- package/dist/types/vue-ui-world.d.ts +2 -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-lKgU652n.js → useConfig-ByaaSKhz.js} +5 -0
- package/dist/{useObjectBindings-C3q0I8Zm.js → useObjectBindings-BR1sGimd.js} +1 -1
- package/dist/utils.js +1 -1
- package/dist/{vue-data-ui-DcI_rZFY.js → vue-data-ui-DBjj6t8B.js} +68 -68
- package/dist/vue-data-ui.js +69 -69
- package/dist/{vue-ui-3d-bar-DiV2fXyA.js → vue-ui-3d-bar-CmAc1xBL.js} +13 -3
- package/dist/{vue-ui-accordion-CNtzLReQ.js → vue-ui-accordion-BX9WL-QF.js} +2 -2
- package/dist/{vue-ui-age-pyramid-OeogBDSt.js → vue-ui-age-pyramid-CFvux3-S.js} +13 -3
- package/dist/{vue-ui-annotator-KPkeXw8q.js → vue-ui-annotator-Be3VpH8Z.js} +4 -4
- package/dist/{vue-ui-bullet-ChpUs3I8.js → vue-ui-bullet-C4xEb3fq.js} +13 -3
- package/dist/{vue-ui-bump-BkAshi4j.js → vue-ui-bump-BW76g7ep.js} +14 -4
- package/dist/vue-ui-candlestick-ShTn9uzH.js +1826 -0
- package/dist/vue-ui-carousel-table-DMan_IZb.js +455 -0
- package/dist/{vue-ui-chestnut-CSHDoJzC.js → vue-ui-chestnut-BIfaNOqy.js} +14 -4
- package/dist/{vue-ui-chord-DdwmuNQX.js → vue-ui-chord-GDJiAjfD.js} +14 -4
- package/dist/{vue-ui-circle-pack-DJQmSf72.js → vue-ui-circle-pack-Bo4ljiP_.js} +14 -4
- package/dist/{vue-ui-cursor-DFf_3h10.js → vue-ui-cursor-BuLoDOFw.js} +2 -2
- package/dist/{vue-ui-dag-CkO3Ax7d.js → vue-ui-dag-BmbwijZi.js} +14 -4
- package/dist/{vue-ui-dashboard--8Xk6LWT.js → vue-ui-dashboard-CyzIaw6M.js} +80 -70
- package/dist/{vue-ui-digits-Cs5EheDs.js → vue-ui-digits-B33dTRHj.js} +2 -2
- package/dist/{vue-ui-donut-DsNo3LIX.js → vue-ui-donut-BIgvjStd.js} +14 -4
- package/dist/{vue-ui-donut-evolution-_QyGlfxI.js → vue-ui-donut-evolution-DT5F88LK.js} +238 -218
- package/dist/{vue-ui-dumbbell-ChGtAAWt.js → vue-ui-dumbbell-SwLKpHuh.js} +13 -3
- package/dist/{vue-ui-flow-B5AzIgoc.js → vue-ui-flow-BqTUyRBS.js} +13 -3
- package/dist/{vue-ui-funnel-EDQSTDkg.js → vue-ui-funnel-GOx4FfhB.js} +14 -4
- package/dist/{vue-ui-galaxy-BD_RrBJE.js → vue-ui-galaxy-CTMyOfp7.js} +14 -4
- package/dist/{vue-ui-gauge-C9QMAGa9.js → vue-ui-gauge-Clz_TmiX.js} +13 -3
- package/dist/{vue-ui-geo-nR7niELP.js → vue-ui-geo-2kZK_UVF.js} +14 -4
- package/dist/{vue-ui-gizmo-Y1enSmyC.js → vue-ui-gizmo-BpNEwLo7.js} +2 -2
- package/dist/{vue-ui-heatmap-D2dBZY8v.js → vue-ui-heatmap-B6FLZij5.js} +15 -5
- package/dist/{vue-ui-history-plot-DEhOa4RX.js → vue-ui-history-plot-DpGwqYyg.js} +14 -4
- package/dist/{vue-ui-horizontal-bar-EoXn4UVd.js → vue-ui-horizontal-bar-BHFd966c.js} +16 -6
- package/dist/{vue-ui-kpi-DUKaYWpW.js → vue-ui-kpi-DyIqCISK.js} +2 -2
- package/dist/{vue-ui-mini-loader-BpLz9pDO.js → vue-ui-mini-loader-DDJUya9e.js} +1 -1
- package/dist/{vue-ui-molecule-MlVj-IXz.js → vue-ui-molecule-BtQOQ32e.js} +14 -4
- package/dist/{vue-ui-mood-radar-B8ILXAqP.js → vue-ui-mood-radar-CZSLnIMi.js} +13 -3
- package/dist/{vue-ui-nested-donuts-Jw8bQEo4.js → vue-ui-nested-donuts-Lhteboo1.js} +14 -4
- package/dist/{vue-ui-onion-D3ANYQG8.js → vue-ui-onion-uCUgmyF1.js} +14 -4
- package/dist/{vue-ui-parallel-coordinate-plot-DBUBo1uE.js → vue-ui-parallel-coordinate-plot-_u_VTAjF.js} +14 -4
- package/dist/{vue-ui-quadrant-CQ9eomPu.js → vue-ui-quadrant-CgalDMyS.js} +14 -4
- package/dist/{vue-ui-quick-chart-bAX-1W7U.js → vue-ui-quick-chart-BAWcSaDB.js} +15 -5
- package/dist/{vue-ui-radar-BrlQJKQ8.js → vue-ui-radar-64HPFASp.js} +14 -4
- package/dist/{vue-ui-rating-DBxf9Vwv.js → vue-ui-rating-D_QR_A3V.js} +1 -1
- package/dist/{vue-ui-relation-circle-53zRDuMv.js → vue-ui-relation-circle-DT4So4-6.js} +16 -6
- package/dist/{vue-ui-ridgeline-B80Je7Dl.js → vue-ui-ridgeline-5fZANTS9.js} +14 -4
- package/dist/{vue-ui-rings-q2Z9_I_C.js → vue-ui-rings-QFY794j3.js} +14 -4
- package/dist/{vue-ui-scatter-B2j49pZG.js → vue-ui-scatter-BPCY-u36.js} +14 -4
- package/dist/{vue-ui-skeleton-DBQVQjee.js → vue-ui-skeleton-Dj_ZVfSX.js} +2 -2
- package/dist/{vue-ui-smiley-2xc8AwPP.js → vue-ui-smiley-rFdGxZK6.js} +1 -1
- package/dist/{vue-ui-spark-trend-2A59xizI.js → vue-ui-spark-trend-DB0VHzm0.js} +2 -2
- package/dist/{vue-ui-sparkbar-ySB5tY6a.js → vue-ui-sparkbar-DVGRTFO5.js} +2 -2
- package/dist/{vue-ui-sparkgauge-1W1qaesz.js → vue-ui-sparkgauge-3UFZaDF9.js} +2 -2
- package/dist/{vue-ui-sparkhistogram-By0How3p.js → vue-ui-sparkhistogram-DRmBVef7.js} +2 -2
- package/dist/{vue-ui-sparkline-BqJ0MXbc.js → vue-ui-sparkline-vsqKnakQ.js} +2 -2
- package/dist/{vue-ui-sparkstackbar-CMVO2Tu-.js → vue-ui-sparkstackbar-BNUhunuQ.js} +3 -3
- package/dist/vue-ui-stackbar-9jP1s0MN.js +2267 -0
- package/dist/vue-ui-stackline-D1o_afno.js +2395 -0
- package/dist/{vue-ui-strip-plot-BkcKTTC6.js → vue-ui-strip-plot-CogQ8VSl.js} +13 -3
- package/dist/{vue-ui-table-CIgdj4R-.js → vue-ui-table-Bub1v0eM.js} +5 -5
- package/dist/{vue-ui-table-heatmap-CvHoeUmu.js → vue-ui-table-heatmap-BFKyJTr1.js} +15 -5
- package/dist/{vue-ui-table-sparkline-DReGOXrL.js → vue-ui-table-sparkline-BPts9wTR.js} +14 -4
- package/dist/{vue-ui-thermometer-Bmq8u98B.js → vue-ui-thermometer-CJJ4cVt0.js} +16 -6
- package/dist/{vue-ui-timer-cYpIWaiH.js → vue-ui-timer-BEPXWd20.js} +3 -3
- package/dist/{vue-ui-tiremarks-B01ayToa.js → vue-ui-tiremarks-BC7bLLQD.js} +13 -3
- package/dist/{vue-ui-treemap-CbqNfpkg.js → vue-ui-treemap-Cja-vZoa.js} +15 -5
- package/dist/{vue-ui-waffle-zz_nDVZ3.js → vue-ui-waffle-BRj-YBlz.js} +14 -4
- package/dist/{vue-ui-wheel--8hd9-06.js → vue-ui-wheel-AOTFpTWN.js} +16 -6
- package/dist/{vue-ui-word-cloud-BXyP8Qzx.js → vue-ui-word-cloud-dqfAdhW-.js} +14 -4
- package/dist/{vue-ui-world-hy7P8x_O.js → vue-ui-world-DqwsIYze.js} +14 -4
- package/dist/vue-ui-xy-Dhult6gR.js +4181 -0
- package/dist/{vue-ui-xy-canvas-BKUggHiV.js → vue-ui-xy-canvas-B06Rit63.js} +17 -7
- package/package.json +1 -1
- package/dist/vue-ui-candlestick-BwHP3icU.js +0 -1804
- package/dist/vue-ui-carousel-table-Bb5y_p3g.js +0 -445
- package/dist/vue-ui-stackbar-CRbyQwVz.js +0 -2243
- package/dist/vue-ui-stackline-CLlAhA0E.js +0 -2371
- package/dist/vue-ui-xy-3LB_mNPd.js +0 -4141
|
@@ -0,0 +1,2267 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
|
|
2
|
+
import { B as t, Ft as n, G as r, H as a, It as o, J as s, Lt as c, S as l, St as u, Tt as d, V as f, X as p, et as m, g as ee, h as te, i as h, nt as ne, ot as re, pt as ie, r as ae, s as oe, t as se, x as ce, y as le, yt as ue, zt as de } from "./lib-BkiwukKO.js";
|
|
3
|
+
import { n as fe, r as pe, t as me } from "./useTimeLabels-C0x7zUXP.js";
|
|
4
|
+
import { t as he } from "./useConfig-ByaaSKhz.js";
|
|
5
|
+
import { t as ge } from "./usePrinter-X0yWOynH.js";
|
|
6
|
+
import { n as _e, t as ve } from "./BaseScanner-C7dmAref.js";
|
|
7
|
+
import { t as ye } from "./useSvgExport-Dtu973wa.js";
|
|
8
|
+
import { t as be } from "./useNestedProp-Ck4hsrpu.js";
|
|
9
|
+
import { t as xe } from "./useThemeCheck-rFK9Zlb_.js";
|
|
10
|
+
import { t as Se } from "./useStableElementSize-0I1IpHPl.js";
|
|
11
|
+
import { t as Ce } from "./useTimeLabelCollider-Dm55Emzg.js";
|
|
12
|
+
import { t as we } from "./img-BjOr008R.js";
|
|
13
|
+
import { n as Te } from "./Title-__gWq2g6.js";
|
|
14
|
+
import { t as Ee } from "./Shape-DEGOZ6GG.js";
|
|
15
|
+
import { t as De } from "./_plugin-vue_export-helper-Dq1MygBL.js";
|
|
16
|
+
import { c as Oe } from "./canvas-lib-DTaADQOK.js";
|
|
17
|
+
import { t as ke } from "./useResponsive-CrAInupd.js";
|
|
18
|
+
import { t as Ae } from "./SlicerPreview-BU3ZeHjR.js";
|
|
19
|
+
import { t as je } from "./BaseLegendToggle-CJTwLGXL.js";
|
|
20
|
+
import { t as Me } from "./A11yDataTable-q2-8fSlJ.js";
|
|
21
|
+
import { t as Ne } from "./useUserOptionState-CjPJPTg2.js";
|
|
22
|
+
import { t as Pe } from "./useChartAccessibility-Do37qcw2.js";
|
|
23
|
+
import { t as Fe } from "./Legend-Gg5Q4Clb.js";
|
|
24
|
+
import { t as Ie } from "./vue_ui_stackbar-BW_C3MXw.js";
|
|
25
|
+
import { Fragment as g, Teleport as Le, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createSlots as Re, createTextVNode as ze, createVNode as Be, defineAsyncComponent as S, guardReactiveProps as C, mergeProps as Ve, nextTick as He, normalizeClass as Ue, normalizeProps as w, normalizeStyle as T, onBeforeUnmount as We, onMounted as Ge, openBlock as E, ref as D, renderList as O, renderSlot as k, resolveDynamicComponent as Ke, shallowRef as qe, toDisplayString as A, toRefs as Je, unref as j, useSlots as Ye, watch as Xe, watchEffect as Ze, withCtx as M } from "vue";
|
|
26
|
+
//#region src/components/vue-ui-stackbar.vue
|
|
27
|
+
var Qe = /* @__PURE__ */ e({ default: () => Zt }), $e = ["id"], et = ["id"], tt = ["id"], nt = { style: { position: "relative" } }, rt = [
|
|
28
|
+
"xmlns",
|
|
29
|
+
"aria-describedby",
|
|
30
|
+
"viewBox"
|
|
31
|
+
], it = [
|
|
32
|
+
"x",
|
|
33
|
+
"y",
|
|
34
|
+
"width",
|
|
35
|
+
"height"
|
|
36
|
+
], at = { key: 1 }, ot = ["id"], st = ["stop-color"], ct = ["stop-color"], lt = ["stop-color"], ut = [
|
|
37
|
+
"x",
|
|
38
|
+
"y",
|
|
39
|
+
"width",
|
|
40
|
+
"height",
|
|
41
|
+
"stroke",
|
|
42
|
+
"stroke-width",
|
|
43
|
+
"stroke-linecap",
|
|
44
|
+
"stroke-linejoin",
|
|
45
|
+
"stroke-dasharray"
|
|
46
|
+
], dt = [
|
|
47
|
+
"x1",
|
|
48
|
+
"x2",
|
|
49
|
+
"y1",
|
|
50
|
+
"y2",
|
|
51
|
+
"stroke",
|
|
52
|
+
"stroke-width",
|
|
53
|
+
"stroke-dasharray"
|
|
54
|
+
], ft = [
|
|
55
|
+
"x1",
|
|
56
|
+
"x2",
|
|
57
|
+
"y1",
|
|
58
|
+
"y2",
|
|
59
|
+
"stroke",
|
|
60
|
+
"stroke-width",
|
|
61
|
+
"stroke-dasharray"
|
|
62
|
+
], pt = [
|
|
63
|
+
"x1",
|
|
64
|
+
"x2",
|
|
65
|
+
"y1",
|
|
66
|
+
"y2",
|
|
67
|
+
"stroke",
|
|
68
|
+
"stroke-width",
|
|
69
|
+
"stroke-dasharray"
|
|
70
|
+
], mt = [
|
|
71
|
+
"x1",
|
|
72
|
+
"x2",
|
|
73
|
+
"y1",
|
|
74
|
+
"y2",
|
|
75
|
+
"stroke",
|
|
76
|
+
"stroke-width",
|
|
77
|
+
"stroke-dasharray"
|
|
78
|
+
], ht = { key: 0 }, gt = [
|
|
79
|
+
"x",
|
|
80
|
+
"y",
|
|
81
|
+
"height",
|
|
82
|
+
"rx",
|
|
83
|
+
"width",
|
|
84
|
+
"fill",
|
|
85
|
+
"stroke",
|
|
86
|
+
"stroke-width"
|
|
87
|
+
], _t = { key: 0 }, vt = [
|
|
88
|
+
"x",
|
|
89
|
+
"y",
|
|
90
|
+
"height",
|
|
91
|
+
"rx",
|
|
92
|
+
"width",
|
|
93
|
+
"fill",
|
|
94
|
+
"stroke",
|
|
95
|
+
"stroke-width"
|
|
96
|
+
], yt = [
|
|
97
|
+
"x",
|
|
98
|
+
"y",
|
|
99
|
+
"width",
|
|
100
|
+
"rx",
|
|
101
|
+
"height",
|
|
102
|
+
"fill",
|
|
103
|
+
"stroke",
|
|
104
|
+
"stroke-width"
|
|
105
|
+
], bt = { key: 0 }, xt = [
|
|
106
|
+
"x",
|
|
107
|
+
"y",
|
|
108
|
+
"width",
|
|
109
|
+
"rx",
|
|
110
|
+
"height",
|
|
111
|
+
"fill",
|
|
112
|
+
"stroke",
|
|
113
|
+
"stroke-width"
|
|
114
|
+
], St = [
|
|
115
|
+
"x1",
|
|
116
|
+
"x2",
|
|
117
|
+
"y1",
|
|
118
|
+
"y2",
|
|
119
|
+
"stroke",
|
|
120
|
+
"stroke-width"
|
|
121
|
+
], Ct = [
|
|
122
|
+
"x1",
|
|
123
|
+
"x2",
|
|
124
|
+
"y1",
|
|
125
|
+
"y2",
|
|
126
|
+
"stroke",
|
|
127
|
+
"stroke-width"
|
|
128
|
+
], wt = [
|
|
129
|
+
"x",
|
|
130
|
+
"y",
|
|
131
|
+
"font-size",
|
|
132
|
+
"fill",
|
|
133
|
+
"font-weight"
|
|
134
|
+
], Tt = [
|
|
135
|
+
"transform",
|
|
136
|
+
"font-size",
|
|
137
|
+
"fill",
|
|
138
|
+
"font-weight"
|
|
139
|
+
], Et = [
|
|
140
|
+
"x",
|
|
141
|
+
"y",
|
|
142
|
+
"font-size",
|
|
143
|
+
"fill",
|
|
144
|
+
"font-weight"
|
|
145
|
+
], Dt = [
|
|
146
|
+
"x",
|
|
147
|
+
"y",
|
|
148
|
+
"font-size",
|
|
149
|
+
"font-weight",
|
|
150
|
+
"fill"
|
|
151
|
+
], Ot = [
|
|
152
|
+
"x",
|
|
153
|
+
"y",
|
|
154
|
+
"font-size",
|
|
155
|
+
"fill",
|
|
156
|
+
"font-weight"
|
|
157
|
+
], kt = [
|
|
158
|
+
"x",
|
|
159
|
+
"y",
|
|
160
|
+
"font-size",
|
|
161
|
+
"font-weight",
|
|
162
|
+
"fill"
|
|
163
|
+
], At = [
|
|
164
|
+
"x1",
|
|
165
|
+
"x2",
|
|
166
|
+
"y1",
|
|
167
|
+
"y2",
|
|
168
|
+
"stroke"
|
|
169
|
+
], jt = [
|
|
170
|
+
"x",
|
|
171
|
+
"y",
|
|
172
|
+
"font-size",
|
|
173
|
+
"font-weight",
|
|
174
|
+
"fill",
|
|
175
|
+
"text-anchor"
|
|
176
|
+
], Mt = [
|
|
177
|
+
"x1",
|
|
178
|
+
"x2",
|
|
179
|
+
"y1",
|
|
180
|
+
"y2",
|
|
181
|
+
"stroke"
|
|
182
|
+
], Nt = [
|
|
183
|
+
"font-size",
|
|
184
|
+
"font-weight",
|
|
185
|
+
"fill",
|
|
186
|
+
"text-anchor",
|
|
187
|
+
"transform"
|
|
188
|
+
], Pt = { key: 0 }, Ft = { key: 1 }, It = [
|
|
189
|
+
"text-anchor",
|
|
190
|
+
"font-size",
|
|
191
|
+
"font-weight",
|
|
192
|
+
"fill",
|
|
193
|
+
"transform",
|
|
194
|
+
"onClick"
|
|
195
|
+
], Lt = [
|
|
196
|
+
"text-anchor",
|
|
197
|
+
"font-size",
|
|
198
|
+
"fill",
|
|
199
|
+
"transform",
|
|
200
|
+
"innerHTML",
|
|
201
|
+
"onClick"
|
|
202
|
+
], Rt = { key: 0 }, zt = { key: 1 }, Bt = [
|
|
203
|
+
"font-size",
|
|
204
|
+
"font-weight",
|
|
205
|
+
"fill",
|
|
206
|
+
"x",
|
|
207
|
+
"y",
|
|
208
|
+
"onClick"
|
|
209
|
+
], Vt = [
|
|
210
|
+
"font-size",
|
|
211
|
+
"font-weight",
|
|
212
|
+
"fill",
|
|
213
|
+
"x",
|
|
214
|
+
"y",
|
|
215
|
+
"onClick",
|
|
216
|
+
"innerHTML"
|
|
217
|
+
], Ht = [
|
|
218
|
+
"x",
|
|
219
|
+
"y",
|
|
220
|
+
"width",
|
|
221
|
+
"height",
|
|
222
|
+
"onClick",
|
|
223
|
+
"onMouseenter",
|
|
224
|
+
"onMouseleave",
|
|
225
|
+
"fill"
|
|
226
|
+
], Ut = [
|
|
227
|
+
"x",
|
|
228
|
+
"y",
|
|
229
|
+
"width",
|
|
230
|
+
"height",
|
|
231
|
+
"onClick",
|
|
232
|
+
"onMouseenter",
|
|
233
|
+
"onMouseleave",
|
|
234
|
+
"fill"
|
|
235
|
+
], Wt = ["data-start", "data-end"], Gt = {
|
|
236
|
+
key: 0,
|
|
237
|
+
style: {
|
|
238
|
+
position: "absolute",
|
|
239
|
+
top: "100%",
|
|
240
|
+
left: "0",
|
|
241
|
+
width: "100%"
|
|
242
|
+
},
|
|
243
|
+
"data-dom-to-png-ignore": "",
|
|
244
|
+
"aria-hidden": "true"
|
|
245
|
+
}, Kt = {
|
|
246
|
+
key: 4,
|
|
247
|
+
class: "vue-data-ui-watermark"
|
|
248
|
+
}, qt = [
|
|
249
|
+
"x",
|
|
250
|
+
"y",
|
|
251
|
+
"height",
|
|
252
|
+
"width",
|
|
253
|
+
"fill",
|
|
254
|
+
"stroke"
|
|
255
|
+
], Jt = ["id"], Yt = ["onClick"], Xt = ["innerHTML"], Zt = /* @__PURE__ */ De({
|
|
256
|
+
__name: "vue-ui-stackbar",
|
|
257
|
+
props: {
|
|
258
|
+
config: {
|
|
259
|
+
type: Object,
|
|
260
|
+
default() {
|
|
261
|
+
return {};
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
dataset: {
|
|
265
|
+
type: Array,
|
|
266
|
+
default() {
|
|
267
|
+
return [];
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
selectedXIndex: {
|
|
271
|
+
type: Number,
|
|
272
|
+
default: void 0
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
emits: [
|
|
276
|
+
"selectDatapoint",
|
|
277
|
+
"selectLegend",
|
|
278
|
+
"selectTimeLabel",
|
|
279
|
+
"selectX",
|
|
280
|
+
"copyAlt"
|
|
281
|
+
],
|
|
282
|
+
setup(e, { expose: De, emit: Qe }) {
|
|
283
|
+
let Zt = S(() => import("./Tooltip-CuWEYGr3.js")), Qt = S(() => import("./BaseIcon-DM1x8hQF.js").then((e) => e.n)), $t = S(() => import("./vue-ui-accordion-BX9WL-QF.js").then((e) => e.n)), en = S(() => import("./DataTable-DmE8Oo4i.js")), tn = S(() => import("./PenAndPaper-DNgm6y3l.js").then((e) => e.t)), nn = S(() => import("./UserOptions-D7zR0tnR.js").then((e) => e.n)), rn = S(() => import("./PackageVersion-DUU5Aku2.js").then((e) => e.t)), an = S(() => import("./BaseDraggableDialog-DUUu2E2Q.js").then((e) => e.n)), { vue_ui_stackbar: on } = he(), { isThemeValid: sn, warnInvalidTheme: cn } = xe(), ln = Ye(), N = e, un = Qe, dn = _({
|
|
284
|
+
get() {
|
|
285
|
+
return !!N.dataset && N.dataset.length;
|
|
286
|
+
},
|
|
287
|
+
set(e) {
|
|
288
|
+
return e;
|
|
289
|
+
}
|
|
290
|
+
}), P = D(null), F = D(a()), fn = D(!1), pn = D(null), mn = D(""), I = D([]), hn = D(0), gn = D(null), _n = D(null), vn = D(null), yn = D(null), bn = D(!1), L = D(null), xn = D(!1), Sn = D(0), Cn = D(0), wn = D(0), Tn = D(!1), En = D(null), Dn = D(null), On = D(!1), kn = D(!1), An = D(null), jn = D(null), Mn = D(null), Nn = D(null), Pn = D(null), Fn = D(null), In = qe(null), Ln = D(!1), Rn = D(0), zn = D(0), R = D(null), Bn = D({
|
|
291
|
+
x: 0,
|
|
292
|
+
y: 0
|
|
293
|
+
}), Vn = D("pointer"), Hn = Se({
|
|
294
|
+
elementRef: In,
|
|
295
|
+
minimumWidth: 2,
|
|
296
|
+
minimumHeight: 2,
|
|
297
|
+
stableFramesRequired: 2,
|
|
298
|
+
once: !1,
|
|
299
|
+
onSizeAccepted: () => {
|
|
300
|
+
Gn();
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
function Un() {
|
|
304
|
+
In.value = P.value?.parentNode ?? null;
|
|
305
|
+
}
|
|
306
|
+
function Wn() {
|
|
307
|
+
return new Promise((e) => {
|
|
308
|
+
requestAnimationFrame(() => {
|
|
309
|
+
requestAnimationFrame(e);
|
|
310
|
+
});
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
async function Gn() {
|
|
314
|
+
let e = ++zn.value;
|
|
315
|
+
Ln.value = !1, await He(), await Wn(), await Wn(), e === zn.value && (Rn.value += 1, Ln.value = !0);
|
|
316
|
+
}
|
|
317
|
+
let Kn = D(null);
|
|
318
|
+
Ge(() => {
|
|
319
|
+
Tn.value = !0, Un(), Hn.start(), mr();
|
|
320
|
+
});
|
|
321
|
+
let z = D(rr()), B = _(() => z.value.userOptions.useCursorPointer), qn = _(() => de({
|
|
322
|
+
defaultConfig: {
|
|
323
|
+
userOptions: { show: !1 },
|
|
324
|
+
useCssAnimation: !1,
|
|
325
|
+
table: { show: !1 },
|
|
326
|
+
tooltip: { show: !1 },
|
|
327
|
+
style: { chart: {
|
|
328
|
+
backgroundColor: "#99999930",
|
|
329
|
+
bars: {
|
|
330
|
+
totalValues: { show: !1 },
|
|
331
|
+
dataLabels: { show: !1 }
|
|
332
|
+
},
|
|
333
|
+
grid: {
|
|
334
|
+
frame: { stroke: "#6A6A6A" },
|
|
335
|
+
scale: {
|
|
336
|
+
scaleMin: 0,
|
|
337
|
+
scaleMax: 40
|
|
338
|
+
},
|
|
339
|
+
x: {
|
|
340
|
+
axisColor: "#6A6A6A",
|
|
341
|
+
linesColor: "#6A6A6A",
|
|
342
|
+
axisName: { show: !1 },
|
|
343
|
+
timeLabels: { show: !1 }
|
|
344
|
+
},
|
|
345
|
+
y: {
|
|
346
|
+
axisColor: "#6A6A6A",
|
|
347
|
+
linesColor: "#6A6A6A",
|
|
348
|
+
axisName: { show: !1 },
|
|
349
|
+
axisLabels: { show: !1 }
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
legend: { backgroundColor: "transparent" },
|
|
353
|
+
padding: {
|
|
354
|
+
left: 24,
|
|
355
|
+
right: 24,
|
|
356
|
+
bottom: 12
|
|
357
|
+
},
|
|
358
|
+
zoom: {
|
|
359
|
+
show: !1,
|
|
360
|
+
startIndex: null,
|
|
361
|
+
endIndex: null
|
|
362
|
+
}
|
|
363
|
+
} }
|
|
364
|
+
},
|
|
365
|
+
userConfig: z.value.skeletonConfig ?? {}
|
|
366
|
+
})), { loading: Jn, FINAL_DATASET: Yn, manualLoading: Xn } = _e({
|
|
367
|
+
...Je(N),
|
|
368
|
+
FINAL_CONFIG: z,
|
|
369
|
+
prepareConfig: rr,
|
|
370
|
+
callback: () => {
|
|
371
|
+
Promise.resolve().then(async () => {
|
|
372
|
+
(!z.value.style.chart.zoom.keepState || !Li.value || J.value.start === 0 && J.value.end === 0) && await Ri();
|
|
373
|
+
});
|
|
374
|
+
},
|
|
375
|
+
skeletonDataset: N.config?.skeletonDataset ?? [{
|
|
376
|
+
name: "",
|
|
377
|
+
series: [
|
|
378
|
+
2,
|
|
379
|
+
3,
|
|
380
|
+
5,
|
|
381
|
+
8,
|
|
382
|
+
13,
|
|
383
|
+
21
|
|
384
|
+
],
|
|
385
|
+
color: "#BABABA"
|
|
386
|
+
}, {
|
|
387
|
+
name: "",
|
|
388
|
+
series: [
|
|
389
|
+
1,
|
|
390
|
+
2,
|
|
391
|
+
3,
|
|
392
|
+
5,
|
|
393
|
+
8,
|
|
394
|
+
13
|
|
395
|
+
],
|
|
396
|
+
color: "#CACACA"
|
|
397
|
+
}],
|
|
398
|
+
skeletonConfig: de({
|
|
399
|
+
defaultConfig: z.value,
|
|
400
|
+
userConfig: qn.value
|
|
401
|
+
})
|
|
402
|
+
}), { userOptionsVisible: Zn, setUserOptionsVisibility: Qn, keepUserOptionState: $n } = Ne({ config: z.value }), { svgRef: er } = Pe({ config: z.value.style.chart.title });
|
|
403
|
+
function tr() {
|
|
404
|
+
Qn(!0);
|
|
405
|
+
}
|
|
406
|
+
function nr() {
|
|
407
|
+
Qn(!1), un("selectX", {
|
|
408
|
+
seriesIndex: null,
|
|
409
|
+
datapoint: null
|
|
410
|
+
}), L.value = null, R.value = null, fn.value = !1;
|
|
411
|
+
}
|
|
412
|
+
function rr() {
|
|
413
|
+
let e = be({
|
|
414
|
+
userConfig: N.config,
|
|
415
|
+
defaultConfig: on
|
|
416
|
+
}), t = {}, n = e.theme;
|
|
417
|
+
if (n) if (!sn.value(e)) cn(e), t = e;
|
|
418
|
+
else {
|
|
419
|
+
let r = be({
|
|
420
|
+
userConfig: Ie[n] || N.config,
|
|
421
|
+
defaultConfig: e
|
|
422
|
+
});
|
|
423
|
+
t = {
|
|
424
|
+
...be({
|
|
425
|
+
userConfig: N.config,
|
|
426
|
+
defaultConfig: r
|
|
427
|
+
}),
|
|
428
|
+
customPalette: e.customPalette.length ? e.customPalette : c[n] || d
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
else t = e;
|
|
432
|
+
return t;
|
|
433
|
+
}
|
|
434
|
+
let ir = _(() => z.value.style.chart.bars.dataLabels.hideUnderValue != null), ar = _(() => z.value.style.chart.bars.dataLabels.hideUnderPercentage != null);
|
|
435
|
+
Xe(() => N.config, (e) => {
|
|
436
|
+
Jn.value || (z.value = rr()), Zn.value = !z.value.userOptions.showOnChartHover, mr({ resetSlicer: !z.value.style.chart.zoom.keepState }), Sn.value += 1, Cn.value += 1, wn.value += 1, V.value.dataLabels.show = z.value.style.chart.bars.dataLabels.show, V.value.showTable = z.value.table.show, V.value.showTooltip = z.value.style.chart.tooltip.show, Un(), !z.value.style.chart.zoom.keepState || !Li.value || J.value.start === 0 && J.value.end === 0 ? Ri() : kr();
|
|
437
|
+
}, { deep: !0 }), Xe(() => N.dataset, (e) => {
|
|
438
|
+
Array.isArray(e) && e.length > 0 && (Xn.value = !1), Un(), z.value.style.chart.zoom.keepState ? kr() : Mr();
|
|
439
|
+
}, { deep: !0 });
|
|
440
|
+
let V = D({
|
|
441
|
+
dataLabels: { show: z.value.style.chart.bars.dataLabels.show },
|
|
442
|
+
showTable: z.value.table.show,
|
|
443
|
+
showTooltip: z.value.style.chart.tooltip.show
|
|
444
|
+
});
|
|
445
|
+
Xe(z, () => {
|
|
446
|
+
V.value = {
|
|
447
|
+
dataLabels: { show: z.value.style.chart.bars.dataLabels.show },
|
|
448
|
+
showTable: z.value.table.show,
|
|
449
|
+
showTooltip: z.value.style.chart.tooltip.show
|
|
450
|
+
};
|
|
451
|
+
}, { immediate: !0 });
|
|
452
|
+
let { isPrinting: or, isImaging: sr, generatePdf: cr, generateImage: lr } = ge({
|
|
453
|
+
elementId: `stackbar_${F.value}`,
|
|
454
|
+
fileName: z.value.style.chart.title.text || "vue-ui-stackbar",
|
|
455
|
+
options: z.value.userOptions.print
|
|
456
|
+
}), H = D({
|
|
457
|
+
width: z.value.style.chart.width,
|
|
458
|
+
height: z.value.style.chart.height,
|
|
459
|
+
paddingRatio: {
|
|
460
|
+
top: z.value.style.chart.padding.top / z.value.style.chart.height,
|
|
461
|
+
right: z.value.style.chart.padding.right / z.value.style.chart.width,
|
|
462
|
+
bottom: z.value.style.chart.padding.bottom / z.value.style.chart.height,
|
|
463
|
+
left: z.value.style.chart.padding.left / z.value.style.chart.width
|
|
464
|
+
}
|
|
465
|
+
}), ur = _(() => ce(z.value.customPalette)), U = qe(null), dr = qe(null), fr = D(null), pr = _(() => !!z.value.debug);
|
|
466
|
+
function mr({ resetSlicer: e = !0 } = {}) {
|
|
467
|
+
if (u(N.dataset) ? (p({
|
|
468
|
+
componentName: "VueUiStackbar",
|
|
469
|
+
type: "dataset",
|
|
470
|
+
debug: pr.value
|
|
471
|
+
}), Xn.value = !0) : N.dataset.forEach((e, t) => {
|
|
472
|
+
re({
|
|
473
|
+
datasetObject: e,
|
|
474
|
+
requiredAttributes: ["name", "series"]
|
|
475
|
+
}).forEach((e) => {
|
|
476
|
+
dn.value = !1, p({
|
|
477
|
+
componentName: "VueUiStackbar",
|
|
478
|
+
type: "datasetSerieAttribute",
|
|
479
|
+
property: e,
|
|
480
|
+
index: t,
|
|
481
|
+
debug: pr.value
|
|
482
|
+
}), Xn.value = !0;
|
|
483
|
+
});
|
|
484
|
+
}), u(N.dataset) || (Xn.value = z.value.loading), setTimeout(() => {
|
|
485
|
+
xn.value = !0;
|
|
486
|
+
}, 10), z.value.responsive) {
|
|
487
|
+
let e = Oe(() => {
|
|
488
|
+
xn.value = !1;
|
|
489
|
+
let { width: e, height: t } = ke({
|
|
490
|
+
chart: P.value,
|
|
491
|
+
title: z.value.style.chart.title.text ? gn.value : null,
|
|
492
|
+
legend: z.value.style.chart.legend.show ? _n.value : null,
|
|
493
|
+
slicer: z.value.style.chart.zoom.show && q.value > 6 ? vn.value.$el : null,
|
|
494
|
+
source: yn.value
|
|
495
|
+
});
|
|
496
|
+
requestAnimationFrame(() => {
|
|
497
|
+
H.value.width = e, H.value.height = t - 12, clearTimeout(fr.value), fr.value = setTimeout(() => {
|
|
498
|
+
xn.value = !0;
|
|
499
|
+
}, 10);
|
|
500
|
+
});
|
|
501
|
+
});
|
|
502
|
+
U.value && (dr.value && U.value.unobserve(dr.value), U.value.disconnect()), U.value = new ResizeObserver(e), dr.value = P.value.parentNode, U.value.observe(dr.value);
|
|
503
|
+
}
|
|
504
|
+
Gn(), e && Ri();
|
|
505
|
+
}
|
|
506
|
+
We(() => {
|
|
507
|
+
Hn.stop(), U.value && (dr.value && U.value.unobserve(dr.value), U.value.disconnect());
|
|
508
|
+
});
|
|
509
|
+
let W = _(() => z.value.style.chart.grid.y.position === "right");
|
|
510
|
+
function hr() {
|
|
511
|
+
let e = 0;
|
|
512
|
+
z.value.orientation === "vertical" && Mn.value && (e = Array.from(Mn.value.querySelectorAll("text")).reduce((e, t) => {
|
|
513
|
+
let n = t.getComputedTextLength();
|
|
514
|
+
return n > e ? n : e;
|
|
515
|
+
}, 0)), z.value.orientation === "horizontal" && Nn.value && (e = Array.from(Nn.value.querySelectorAll("text")).reduce((e, t) => {
|
|
516
|
+
let n = t.getComputedTextLength();
|
|
517
|
+
return n > e ? n : e;
|
|
518
|
+
}, 0));
|
|
519
|
+
let t = jn.value ? jn.value.getBoundingClientRect().width + z.value.style.chart.grid.y.axisName.fontSize + z.value.style.chart.grid.y.axisName.offsetX : 0;
|
|
520
|
+
return {
|
|
521
|
+
left: W.value ? 0 : e + t,
|
|
522
|
+
right: W.value ? e + t : 0,
|
|
523
|
+
scaleLabelsWidth: e,
|
|
524
|
+
yAxisLabelWidth: t
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
let gr = D(0), _r = D(0), vr = Oe((e) => {
|
|
528
|
+
_r.value = e + z.value.style.chart.bars.totalValues.fontSize;
|
|
529
|
+
}, 100);
|
|
530
|
+
function yr() {
|
|
531
|
+
if (z.value.orientation !== "horizontal") return 0;
|
|
532
|
+
let e = Fn.value;
|
|
533
|
+
if (!e) return 0;
|
|
534
|
+
let t = Array.from(e.querySelectorAll("text"));
|
|
535
|
+
if (!t.length) return 0;
|
|
536
|
+
let n = -Infinity;
|
|
537
|
+
for (let e of t) try {
|
|
538
|
+
let t = e.getBBox(), r = t.x + t.width;
|
|
539
|
+
r > n && (n = r);
|
|
540
|
+
} catch {}
|
|
541
|
+
return Math.max(0, n - (G.value?.right ?? 0));
|
|
542
|
+
}
|
|
543
|
+
Ze((e) => {
|
|
544
|
+
if (z.value.orientation !== "horizontal") return;
|
|
545
|
+
let t = Fn.value;
|
|
546
|
+
if (!t) return;
|
|
547
|
+
let n = () => {
|
|
548
|
+
vr(yr());
|
|
549
|
+
};
|
|
550
|
+
n();
|
|
551
|
+
let r = new ResizeObserver(n);
|
|
552
|
+
r.observe(t);
|
|
553
|
+
let a = new MutationObserver(n);
|
|
554
|
+
a.observe(t, {
|
|
555
|
+
childList: !0,
|
|
556
|
+
subtree: !0,
|
|
557
|
+
characterData: !0
|
|
558
|
+
}), e(() => {
|
|
559
|
+
r.disconnect(), a.disconnect();
|
|
560
|
+
});
|
|
561
|
+
}), We(() => {
|
|
562
|
+
gr.value = 0, _r.value = 0;
|
|
563
|
+
});
|
|
564
|
+
let br = D(0), xr = D(0);
|
|
565
|
+
function Sr() {
|
|
566
|
+
let e = z.value.orientation === "vertical" ? Nn.value : Mn.value;
|
|
567
|
+
if (!e) {
|
|
568
|
+
br.value = 0;
|
|
569
|
+
return;
|
|
570
|
+
}
|
|
571
|
+
try {
|
|
572
|
+
let t = e.getBBox();
|
|
573
|
+
br.value = Number.isFinite(t?.height) ? t.height : 0;
|
|
574
|
+
} catch {
|
|
575
|
+
br.value = 0;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
function Cr() {
|
|
579
|
+
xr.value && cancelAnimationFrame(xr.value), xr.value = requestAnimationFrame(() => {
|
|
580
|
+
requestAnimationFrame(() => {
|
|
581
|
+
Sr();
|
|
582
|
+
});
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
We(() => {
|
|
586
|
+
xr.value && cancelAnimationFrame(xr.value);
|
|
587
|
+
});
|
|
588
|
+
let wr = _(() => {
|
|
589
|
+
let e = 0;
|
|
590
|
+
if (An.value) try {
|
|
591
|
+
e = An.value.getBBox().height;
|
|
592
|
+
} catch {
|
|
593
|
+
e = 0;
|
|
594
|
+
}
|
|
595
|
+
let t = z.value.style.chart.grid.x.timeLabels.show ? br.value : 0;
|
|
596
|
+
return e + t;
|
|
597
|
+
}), G = _(() => {
|
|
598
|
+
Rn.value;
|
|
599
|
+
let { height: e, width: t } = H.value, { right: n } = H.value.paddingRatio, r = z.value.style.chart.bars.totalValues.show && N.dataset && N.dataset.length > 1 ? z.value.style.chart.bars.totalValues.fontSize * 1.3 : 0, a = 0, o = 0, s = 0, c = 0;
|
|
600
|
+
if (z.value.style.chart.grid.y.axisLabels.show) {
|
|
601
|
+
let e = hr();
|
|
602
|
+
a = e.left, o = e.right, s = e.scaleLabelsWidth, c = e.yAxisLabelWidth;
|
|
603
|
+
}
|
|
604
|
+
let l = z.value.style.chart.padding.top + r, u = t - t * n - _r.value - o, d = e - z.value.style.chart.padding.bottom - wr.value - r, f = z.value.style.chart.padding.left + a, p = t - f - t * n - _r.value - o, m = e - l - z.value.style.chart.padding.bottom - wr.value - r;
|
|
605
|
+
return {
|
|
606
|
+
chartHeight: e,
|
|
607
|
+
chartWidth: t,
|
|
608
|
+
top: l,
|
|
609
|
+
right: u,
|
|
610
|
+
bottom: d,
|
|
611
|
+
left: f,
|
|
612
|
+
width: Math.max(0, p),
|
|
613
|
+
height: Math.max(0, m),
|
|
614
|
+
offsetLeft: a,
|
|
615
|
+
offsetRightAxis: o,
|
|
616
|
+
scaleLabelsWidth: s,
|
|
617
|
+
yAxisLabelWidth: c
|
|
618
|
+
};
|
|
619
|
+
}), Tr = _(() => {
|
|
620
|
+
let { left: e, top: t, width: n, height: r } = G.value, a = J.value.start, o = J.value.end, s = Math.max(1, o - a), c = Math.max(0, Math.min(s, (Y.value.start ?? a) - a)), l = Math.max(0, Math.min(s, (Y.value.end ?? o) - a)), u = Math.max(0, l - c), d = {
|
|
621
|
+
fill: z.value.style.chart.zoom.preview.fill,
|
|
622
|
+
stroke: z.value.style.chart.zoom.preview.stroke,
|
|
623
|
+
"stroke-width": z.value.style.chart.zoom.preview.strokeWidth,
|
|
624
|
+
"stroke-dasharray": z.value.style.chart.zoom.preview.strokeDasharray,
|
|
625
|
+
"stroke-linecap": "round",
|
|
626
|
+
"stroke-linejoin": "round",
|
|
627
|
+
style: {
|
|
628
|
+
pointerEvents: "none",
|
|
629
|
+
transition: "none !important",
|
|
630
|
+
animation: "none !important"
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
if (z.value.orientation === "horizontal") {
|
|
634
|
+
let a = r / s;
|
|
635
|
+
return {
|
|
636
|
+
x: e,
|
|
637
|
+
y: t + c * a,
|
|
638
|
+
width: n,
|
|
639
|
+
height: u * a,
|
|
640
|
+
...d
|
|
641
|
+
};
|
|
642
|
+
} else {
|
|
643
|
+
let a = n / s;
|
|
644
|
+
return {
|
|
645
|
+
x: e + c * a,
|
|
646
|
+
y: t,
|
|
647
|
+
width: u * a,
|
|
648
|
+
height: r,
|
|
649
|
+
...d
|
|
650
|
+
};
|
|
651
|
+
}
|
|
652
|
+
}), K = _(() => Yn.value.map((e, t) => {
|
|
653
|
+
let n = `stackbar_serie_${t}`, r = le(e.color) || ur.value[t] || d[t] || d[t % d.length];
|
|
654
|
+
return {
|
|
655
|
+
...e,
|
|
656
|
+
series: JSON.parse(JSON.stringify(e.series)).map((e) => z.value.style.chart.bars.distributed ? Math.abs(e) : e),
|
|
657
|
+
signedSeries: e.series.map((e) => e >= 0 ? 1 : -1),
|
|
658
|
+
absoluteIndex: t,
|
|
659
|
+
id: n,
|
|
660
|
+
color: r
|
|
661
|
+
};
|
|
662
|
+
})), q = _(() => {
|
|
663
|
+
let e = Math.max(...K.value.filter((e) => !I.value.includes(e.id)).map((e) => e.series.length));
|
|
664
|
+
return isFinite(e) ? e : Math.max(...K.value.map((e) => e.series.length));
|
|
665
|
+
});
|
|
666
|
+
function Er(e) {
|
|
667
|
+
Kn.value = e;
|
|
668
|
+
}
|
|
669
|
+
let J = D({
|
|
670
|
+
start: 0,
|
|
671
|
+
end: Math.max(...Yn.value.map((e) => e.series.length))
|
|
672
|
+
}), Y = D({
|
|
673
|
+
start: 0,
|
|
674
|
+
end: Math.max(...Yn.value.map((e) => e.series.length))
|
|
675
|
+
}), Dr = _(() => z.value.style.chart.zoom.preview.enable && (Y.value.start !== J.value.start || Y.value.end !== J.value.end));
|
|
676
|
+
function Or(e, t) {
|
|
677
|
+
Y.value[e] = t;
|
|
678
|
+
}
|
|
679
|
+
function kr() {
|
|
680
|
+
let e = q.value, t = Math.max(0, Math.min(J.value.start ?? 0, e - 1)), n = Math.max(t + 1, Math.min(J.value.end ?? e, e));
|
|
681
|
+
(!Number.isFinite(t) || !Number.isFinite(n) || n <= t) && (t = 0, n = e), J.value.start = t, J.value.end = n, Y.value.start = t, Y.value.end = n, vn.value && (vn.value.setStartValue(t), vn.value.setEndValue(n));
|
|
682
|
+
}
|
|
683
|
+
let Ar = D(null);
|
|
684
|
+
function jr() {
|
|
685
|
+
return new Promise((e) => requestAnimationFrame(() => requestAnimationFrame(() => e())));
|
|
686
|
+
}
|
|
687
|
+
We(() => {
|
|
688
|
+
Ar.value && cancelAnimationFrame(Ar.value);
|
|
689
|
+
});
|
|
690
|
+
async function Mr({ force: e = !1 } = {}) {
|
|
691
|
+
if (z.value.style.chart.zoom.keepState && !e && Li.value && !(J.value.start === 0 && J.value.end === 0)) {
|
|
692
|
+
kr();
|
|
693
|
+
return;
|
|
694
|
+
}
|
|
695
|
+
Ri(), await He(), Ar.value && cancelAnimationFrame(Ar.value), Ar.value = requestAnimationFrame(async () => {
|
|
696
|
+
await jr(), Ri();
|
|
697
|
+
});
|
|
698
|
+
}
|
|
699
|
+
let X = _(() => {
|
|
700
|
+
let e;
|
|
701
|
+
return e = z.value.orientation === "vertical" ? G.value.width / (J.value.end - J.value.start) : G.value.height / (J.value.end - J.value.start), e <= 0 ? 0 : e;
|
|
702
|
+
}), Nr = _(() => n(K.value.filter((e) => !I.value.includes(e.id))).slice(J.value.start, J.value.end)), Pr = _(() => I.value.length === K.value.length), Fr = _(() => z.value.style.chart.zoom.minimap.show ? n(K.value.map((e) => ({
|
|
703
|
+
...e,
|
|
704
|
+
series: e.series.map((e) => e ?? 0)
|
|
705
|
+
})).filter((e) => Pr.value ? !0 : !I.value.includes(e.id))) : []), Ir = _(() => z.value.style.chart.zoom.minimap.show ? [{
|
|
706
|
+
name: "",
|
|
707
|
+
series: Fr.value,
|
|
708
|
+
color: "#000000",
|
|
709
|
+
isVisible: !0
|
|
710
|
+
}] : []), Lr = _(() => n(K.value.filter((e) => !I.value.includes(e.id)).map((e) => ({
|
|
711
|
+
...e,
|
|
712
|
+
series: e.series.map((t, n) => e.signedSeries[n] === -1 && t >= 0 ? -t : t)
|
|
713
|
+
}))).slice(J.value.start, J.value.end)), Rr = _(() => {
|
|
714
|
+
let e = K.value.filter((e) => !I.value.includes(e.id));
|
|
715
|
+
return {
|
|
716
|
+
positive: n(e.map((e) => ({
|
|
717
|
+
...e,
|
|
718
|
+
series: e.series.slice(J.value.start, J.value.end).map((e) => e >= 0 ? e : 0)
|
|
719
|
+
}))),
|
|
720
|
+
negative: n(e.map((e) => ({
|
|
721
|
+
...e,
|
|
722
|
+
series: e.series.slice(J.value.start, J.value.end).map((e) => e < 0 ? e : 0)
|
|
723
|
+
})))
|
|
724
|
+
};
|
|
725
|
+
}), Z = _(() => {
|
|
726
|
+
let e = z.value.style.chart.grid.scale.scaleMax !== null && !z.value.style.chart.bars.distributed ? z.value.style.chart.grid.scale.scaleMax : Math.max(...Rr.value.positive), t = Math.min(...Rr.value.negative), n = z.value.style.chart.grid.scale.scaleMin !== null && !z.value.style.chart.bars.distributed ? z.value.style.chart.grid.scale.scaleMin : [
|
|
727
|
+
-Infinity,
|
|
728
|
+
Infinity,
|
|
729
|
+
NaN,
|
|
730
|
+
void 0,
|
|
731
|
+
null
|
|
732
|
+
].includes(t) ? 0 : t, r = !z.value.style.chart.bars.distributed && (z.value.style.chart.grid.scale.scaleMax !== null || z.value.style.chart.grid.scale.scaleMin !== null) ? ee(n > 0 ? 0 : n, e < 0 ? 0 : e, z.value.style.chart.grid.scale.ticks) : te(n > 0 ? 0 : n, e < 0 ? 0 : e, z.value.style.chart.grid.scale.ticks);
|
|
733
|
+
return r.ticks.map((e) => ({
|
|
734
|
+
zero: G.value.bottom - G.value.height * (Math.abs(r.min) / (r.max + Math.abs(r.min))),
|
|
735
|
+
y: G.value.bottom - G.value.height * ((e + Math.abs(r.min)) / (r.max + Math.abs(r.min))),
|
|
736
|
+
x: W.value ? G.value.right + 8 : G.value.left - 8,
|
|
737
|
+
horizontal_zero: G.value.left + G.value.width * (Math.abs(r.min) / (r.max + Math.abs(r.min))),
|
|
738
|
+
horizontal_x: G.value.left + G.value.width * ((e + Math.abs(r.min)) / (r.max + Math.abs(r.min))),
|
|
739
|
+
horizontal_y: G.value.bottom - 8,
|
|
740
|
+
value: e
|
|
741
|
+
}));
|
|
742
|
+
}), Q = D([]), zr = D([]), Br = 0;
|
|
743
|
+
Ze(() => {
|
|
744
|
+
let e = ++Br;
|
|
745
|
+
(async () => {
|
|
746
|
+
let t = await me({
|
|
747
|
+
values: z.value.style.chart.grid.x.timeLabels.values,
|
|
748
|
+
maxDatapoints: q.value,
|
|
749
|
+
formatter: z.value.style.chart.grid.x.timeLabels.datetimeFormatter,
|
|
750
|
+
start: J.value.start,
|
|
751
|
+
end: J.value.end
|
|
752
|
+
});
|
|
753
|
+
e === Br && (Q.value = t);
|
|
754
|
+
})();
|
|
755
|
+
});
|
|
756
|
+
let Vr = 0;
|
|
757
|
+
Ze(() => {
|
|
758
|
+
let e = ++Vr;
|
|
759
|
+
(async () => {
|
|
760
|
+
let t = await me({
|
|
761
|
+
values: z.value.style.chart.grid.x.timeLabels.values,
|
|
762
|
+
maxDatapoints: q.value,
|
|
763
|
+
formatter: z.value.style.chart.grid.x.timeLabels.datetimeFormatter,
|
|
764
|
+
start: 0,
|
|
765
|
+
end: q.value
|
|
766
|
+
});
|
|
767
|
+
e === Vr && (zr.value = t);
|
|
768
|
+
})();
|
|
769
|
+
});
|
|
770
|
+
let Hr = _(() => {
|
|
771
|
+
let e = z.value.style.chart.grid.x.timeLabels.modulo;
|
|
772
|
+
return Q.value.length ? Math.min(e, [...new Set(Q.value.map((e) => e.text))].length) : e;
|
|
773
|
+
}), Ur = _(() => {
|
|
774
|
+
let e = z.value.style.chart.grid.x.timeLabels, t = Q.value || [], n = zr.value || [], r = J.value.start ?? 0, a = L.value, o = q.value, s = t.map((e) => e?.text ?? ""), c = n.map((e) => e?.text ?? "");
|
|
775
|
+
return oe(!!e.showOnlyFirstAndLast, !!e.showOnlyAtModulo, Math.max(1, Hr.value || 1), s, c, r, a, o);
|
|
776
|
+
});
|
|
777
|
+
Ze(() => {
|
|
778
|
+
z.value.orientation, z.value.style.chart.grid.x.timeLabels.show, z.value.style.chart.grid.x.timeLabels.fontSize, z.value.style.chart.grid.x.timeLabels.rotation, z.value.style.chart.grid.x.timeLabels.offsetY, Ur.value?.map((e) => e?.text ?? "").join("|"), Z.value?.map((e) => e?.value ?? "").join("|"), H.value.width, H.value.height, Nn.value, Mn.value, An.value, Cr();
|
|
779
|
+
}, { flush: "post" });
|
|
780
|
+
let Wr = D({
|
|
781
|
+
months: [],
|
|
782
|
+
shortMonths: [],
|
|
783
|
+
days: [],
|
|
784
|
+
shortDays: []
|
|
785
|
+
}), Gr = 0;
|
|
786
|
+
Ze(() => {
|
|
787
|
+
let e = ++Gr, t = z.value.style.chart.grid.x.timeLabels.datetimeFormatter;
|
|
788
|
+
(async () => {
|
|
789
|
+
let n = await pe(t.locale).catch(() => pe("en"));
|
|
790
|
+
e === Gr && (Wr.value = n.data);
|
|
791
|
+
})();
|
|
792
|
+
});
|
|
793
|
+
let Kr = _(() => {
|
|
794
|
+
let e = z.value.style.chart.grid.x.timeLabels.datetimeFormatter, t = fe({
|
|
795
|
+
useUTC: e.useUTC,
|
|
796
|
+
locale: Wr.value,
|
|
797
|
+
januaryAsYear: e.januaryAsYear
|
|
798
|
+
});
|
|
799
|
+
return (e, n) => {
|
|
800
|
+
let r = z.value.style.chart.grid.x.timeLabels.values?.[e];
|
|
801
|
+
return r == null ? "" : t.formatDate(new Date(r), n);
|
|
802
|
+
};
|
|
803
|
+
}), qr = _(() => (z.value.style.chart.grid.x.timeLabels.values || []).map((e, t) => ({
|
|
804
|
+
text: Kr.value(t, z.value.style.chart.zoom.timeFormat),
|
|
805
|
+
absoluteIndex: t
|
|
806
|
+
}))), Jr = _(() => (z.value.style.chart.grid.x.timeLabels.values || []).map((e, t) => ({
|
|
807
|
+
text: Kr.value(t, z.value.style.chart.tooltip.timeFormat),
|
|
808
|
+
absoluteIndex: t
|
|
809
|
+
}))), $ = _(() => {
|
|
810
|
+
if (!dn.value && !Jn.value) return [];
|
|
811
|
+
let e = Array(q.value).fill(0), t = Array(q.value).fill(0), n = Array(q.value).fill(0), r = Array(q.value).fill(0), a = Math.max(...Rr.value.positive) || 0, o = Math.min(...Rr.value.negative), s = [
|
|
812
|
+
-Infinity,
|
|
813
|
+
Infinity,
|
|
814
|
+
NaN,
|
|
815
|
+
void 0,
|
|
816
|
+
null
|
|
817
|
+
].includes(o) ? 0 : o, { min: c, max: l } = !z.value.style.chart.bars.distributed && (z.value.style.chart.grid.scale.scaleMax !== null || z.value.style.chart.grid.scale.scaleMin !== null) ? ee(z.value.style.chart.grid.scale.scaleMin === null ? s > 0 ? 0 : s : z.value.style.chart.grid.scale.scaleMin, z.value.style.chart.grid.scale.scaleMax === null ? a < 0 ? 0 : a : z.value.style.chart.grid.scale.scaleMax, z.value.style.chart.grid.scale.ticks) : te(z.value.style.chart.grid.scale.scaleMin === null ? s > 0 ? 0 : s : z.value.style.chart.grid.scale.scaleMin, z.value.style.chart.grid.scale.scaleMax === null ? a < 0 ? 0 : a : z.value.style.chart.grid.scale.scaleMax, z.value.style.chart.grid.scale.ticks), u = l + (c >= 0 ? 0 : Math.abs(c)) || 1, d = G.value.height, f = G.value.width, p = Z.value[0] ? Z.value[0].zero : G.value.bottom, m = Z.value[0] ? Z.value[0].horizontal_zero : G.value.left, h = Array(Fr.value.length).fill(0), ne = Array(Fr.value.length).fill(0);
|
|
818
|
+
return K.value.filter((e) => !I.value.includes(e.id)).map((a) => {
|
|
819
|
+
let o = a.series.slice(), s = o.map((e, t) => h[t]), c = o.map((e, t) => ne[t]);
|
|
820
|
+
o.forEach((e, t) => {
|
|
821
|
+
(Number(e) || 0) >= 0 ? h[t] += Number(e) || 0 : ne[t] += Math.abs(Number(e) || 0);
|
|
822
|
+
});
|
|
823
|
+
let l = a.series.slice(J.value.start, J.value.end), ee = a.signedSeries.slice(J.value.start, J.value.end), te = l.map((e, t) => G.value.left + X.value * t + X.value * z.value.style.chart.bars.gapRatio / 4), re = (Fr.value || []).filter(Number.isFinite), ie = re.length ? Math.max(...re) : 0, ae = re.length ? Math.min(...re) : 0;
|
|
824
|
+
function oe({ minimapH: e }) {
|
|
825
|
+
let t = 1e-9, n = ie > 0;
|
|
826
|
+
if (n && ae < 0) {
|
|
827
|
+
let n = Math.max(ie, Math.abs(ae)) || t;
|
|
828
|
+
return {
|
|
829
|
+
pxPerUnit: e / 2 / n,
|
|
830
|
+
zero: e / 2
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
return n ? {
|
|
834
|
+
pxPerUnit: e / Math.max(t, ie),
|
|
835
|
+
zero: e
|
|
836
|
+
} : {
|
|
837
|
+
pxPerUnit: e / Math.max(t, Math.abs(ae)),
|
|
838
|
+
zero: 0
|
|
839
|
+
};
|
|
840
|
+
}
|
|
841
|
+
let se = ({ left: e, unitW: t }) => {
|
|
842
|
+
let n = t * (z.value.style.chart.bars.gapRatio / 4);
|
|
843
|
+
return o.map((r, a) => e + t * a + n);
|
|
844
|
+
}, ce = l.map((e, t) => G.value.top + X.value * t + X.value * z.value.style.chart.bars.gapRatio / 4), le = l.map((t, r) => {
|
|
845
|
+
let a = z.value.style.chart.bars.distributed ? (t || 0) / Nr.value[r] : (t || 0) / u, o, s;
|
|
846
|
+
return t > 0 ? (s = d * a, o = p - s - e[r], e[r] += s) : (s = d * a, o = p + n[r], n[r] += Math.abs(s)), o;
|
|
847
|
+
}), ue = ({ minimapH: e }) => {
|
|
848
|
+
if (z.value.style.chart.bars.distributed) return o.map((t, n) => {
|
|
849
|
+
let r = Math.abs(Number(t) || 0), a = Math.abs(Fr.value?.[n] || 0) || 1e-9;
|
|
850
|
+
return e - (s[n] + r) / a * e;
|
|
851
|
+
});
|
|
852
|
+
let { pxPerUnit: t, zero: n } = oe({ minimapH: e });
|
|
853
|
+
return o.map((e, r) => {
|
|
854
|
+
let a = Number(e) || 0;
|
|
855
|
+
return a >= 0 ? n - (s[r] + a) * t : n + c[r] * t;
|
|
856
|
+
});
|
|
857
|
+
}, de = l.map((e, n) => {
|
|
858
|
+
let a = z.value.style.chart.bars.distributed ? (e || 0) / Nr.value[n] : (e || 0) / u, o, s;
|
|
859
|
+
return e > 0 ? (s = f * a, o = m + t[n], t[n] += s) : (s = f * a, o = m - Math.abs(s) - r[n], r[n] += Math.abs(s)), o;
|
|
860
|
+
}), fe = l.map((e, t) => {
|
|
861
|
+
let n = z.value.style.chart.bars.distributed ? (e || 0) / Nr.value[t] : (e || 0) / u;
|
|
862
|
+
return e > 0 ? d * n : d * Math.abs(n);
|
|
863
|
+
}), pe = ({ minimapH: e }) => {
|
|
864
|
+
if (z.value.style.chart.bars.distributed) return o.map((t, n) => Math.abs(Number(t) || 0) / (Math.abs(Fr.value?.[n] || 0) || 1e-9) * e);
|
|
865
|
+
let { pxPerUnit: t } = oe({ minimapH: e });
|
|
866
|
+
return o.map((e) => Math.abs(Number(e) || 0) * t);
|
|
867
|
+
}, me = l.map((e, t) => {
|
|
868
|
+
let n = z.value.style.chart.bars.distributed ? (e || 0) / Nr.value[t] : (e || 0) / u;
|
|
869
|
+
return e > 0 ? f * n : f * Math.abs(n);
|
|
870
|
+
}), he = l.map((e) => Math.abs(e)).reduce((e, t) => e + t, 0);
|
|
871
|
+
return {
|
|
872
|
+
...a,
|
|
873
|
+
proportions: l.map((e, t) => z.value.style.chart.bars.distributed ? (e || 0) / Nr.value[t] : (e || 0) / he),
|
|
874
|
+
series: l,
|
|
875
|
+
signedSeries: ee,
|
|
876
|
+
x: te,
|
|
877
|
+
y: le,
|
|
878
|
+
height: fe,
|
|
879
|
+
horizontal_width: me,
|
|
880
|
+
horizontal_y: ce,
|
|
881
|
+
horizontal_x: de,
|
|
882
|
+
xMinimap: se,
|
|
883
|
+
yMinimap: ue,
|
|
884
|
+
heightMinimap: pe
|
|
885
|
+
};
|
|
886
|
+
});
|
|
887
|
+
}), Yr = _(() => Lr.value.map((e, t) => ({
|
|
888
|
+
value: e,
|
|
889
|
+
sign: e >= 0 ? 1 : -1
|
|
890
|
+
})));
|
|
891
|
+
function Xr(e, t, n, a, o) {
|
|
892
|
+
let s = o === -1 && e >= 0 ? -e : e;
|
|
893
|
+
return h(z.value.style.chart.bars.dataLabels.formatter, s, r({
|
|
894
|
+
p: z.value.style.chart.bars.dataLabels.prefix,
|
|
895
|
+
v: s,
|
|
896
|
+
s: z.value.style.chart.bars.dataLabels.suffix,
|
|
897
|
+
r: z.value.style.chart.bars.dataLabels.rounding
|
|
898
|
+
}), {
|
|
899
|
+
datapoint: t,
|
|
900
|
+
seriesIndex: n,
|
|
901
|
+
datapointIndex: a
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
function Zr(e, t, n, a) {
|
|
905
|
+
return h(z.value.style.chart.bars.dataLabels.formatter, e, r({
|
|
906
|
+
v: isNaN(e) ? 0 : e,
|
|
907
|
+
s: "%",
|
|
908
|
+
r: z.value.style.chart.bars.dataLabels.rounding
|
|
909
|
+
}), {
|
|
910
|
+
datapoint: t,
|
|
911
|
+
seriesIndex: n,
|
|
912
|
+
datapointIndex: a
|
|
913
|
+
});
|
|
914
|
+
}
|
|
915
|
+
function Qr(e) {
|
|
916
|
+
let t = JSON.parse(JSON.stringify($.value)).map((t) => ({
|
|
917
|
+
name: t.name,
|
|
918
|
+
value: t.series[e] === 0 ? 0 : t.series[e] || null,
|
|
919
|
+
proportion: t.proportions[e] || null,
|
|
920
|
+
color: t.color,
|
|
921
|
+
id: t.id
|
|
922
|
+
}));
|
|
923
|
+
z.value.events.datapointClick && z.value.events.datapointClick({
|
|
924
|
+
datapoint: t,
|
|
925
|
+
seriesIndex: e + J.value.start
|
|
926
|
+
}), un("selectDatapoint", {
|
|
927
|
+
datapoint: t,
|
|
928
|
+
period: Q.value[e]
|
|
929
|
+
});
|
|
930
|
+
}
|
|
931
|
+
function $r(e) {
|
|
932
|
+
return JSON.parse(JSON.stringify($.value)).map((t) => ({
|
|
933
|
+
name: t.name,
|
|
934
|
+
absoluteIndex: t.absoluteIndex,
|
|
935
|
+
value: t.series[e] === 0 ? 0 : (t.signedSeries[e] === -1 && t.series[e] >= 0 ? -t.series[e] : t.series[e]) || null,
|
|
936
|
+
proportion: t.proportions[e] || null,
|
|
937
|
+
color: t.color,
|
|
938
|
+
id: t.id,
|
|
939
|
+
timeLabel: zr.value[e]
|
|
940
|
+
}));
|
|
941
|
+
}
|
|
942
|
+
function ei(e) {
|
|
943
|
+
if (z.value.events.datapointLeave) {
|
|
944
|
+
let t = $r(e);
|
|
945
|
+
z.value.events.datapointLeave({
|
|
946
|
+
datapoint: t,
|
|
947
|
+
seriesIndex: e + J.value.start
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
fn.value = !1, L.value = null, R.value === e && (R.value = null);
|
|
951
|
+
}
|
|
952
|
+
let ti = _(() => Array(q.value).fill(0).map((e, t) => $r(t)));
|
|
953
|
+
Xe(() => N.selectedXIndex, (e) => {
|
|
954
|
+
if ([null, void 0].includes(N.selectedXIndex)) {
|
|
955
|
+
L.value = null;
|
|
956
|
+
return;
|
|
957
|
+
}
|
|
958
|
+
let t = e - J.value.start;
|
|
959
|
+
t < 0 || e >= J.value.end ? L.value = null : L.value = t ?? null;
|
|
960
|
+
}, { immediate: !0 });
|
|
961
|
+
function ni(e) {
|
|
962
|
+
if (!z.value.style.chart.tooltip.showTimeLabel) return null;
|
|
963
|
+
let t = Q.value?.[e]?.text || null, n = Jr.value?.[e]?.text || null, r = zr.value?.[e]?.text || null;
|
|
964
|
+
return z.value.style.chart.tooltip.useDefaultTimeFormat ? t : n || r;
|
|
965
|
+
}
|
|
966
|
+
function ri(e, t = "pointer") {
|
|
967
|
+
if (Pr.value) return;
|
|
968
|
+
Vn.value = t, R.value = e, L.value = e, fn.value = !0;
|
|
969
|
+
let n = z.value.style.chart.tooltip.customFormat, a = $r(e);
|
|
970
|
+
Hi({
|
|
971
|
+
seriesIndex: e,
|
|
972
|
+
datapoint: a
|
|
973
|
+
}), z.value.events.datapointEnter && z.value.events.datapointEnter({
|
|
974
|
+
datapoint: a,
|
|
975
|
+
seriesIndex: e + J.value.start
|
|
976
|
+
}), pn.value = {
|
|
977
|
+
timeLabel: ni(e),
|
|
978
|
+
datapoint: a,
|
|
979
|
+
seriesIndex: e,
|
|
980
|
+
config: z.value,
|
|
981
|
+
series: $.value
|
|
982
|
+
};
|
|
983
|
+
let o = a.map((e) => Math.abs(e.value)).reduce((e, t) => e + t, 0), s = a.map((e) => m(e.value)).reduce((e, t) => e + t, 0);
|
|
984
|
+
if (ie(n) && ne(() => n({
|
|
985
|
+
seriesIndex: e,
|
|
986
|
+
datapoint: a,
|
|
987
|
+
series: $.value,
|
|
988
|
+
config: z.value
|
|
989
|
+
}))) mn.value = n({
|
|
990
|
+
seriesIndex: e,
|
|
991
|
+
datapoint: a,
|
|
992
|
+
series: $.value,
|
|
993
|
+
config: z.value
|
|
994
|
+
});
|
|
995
|
+
else {
|
|
996
|
+
let { showValue: t, showTotal: n, totalTranslation: c, showPercentage: l, borderColor: u, roundingValue: d, roundingPercentage: f } = z.value.style.chart.tooltip, p = "", m = ni(e);
|
|
997
|
+
m && (p += `<div style="width:100%;text-align:center;border-bottom:1px solid ${u};padding-bottom:6px;margin-bottom:3px;">${m}</div>`), n && (p += `<div class="vue-data-ui-tooltip-total" style="display:flex;flex-direction:row;align-items:center;gap:4px">
|
|
998
|
+
<span>${c}:</span>
|
|
999
|
+
<span>
|
|
1000
|
+
${h(z.value.style.chart.bars.dataLabels.formatter, s, r({
|
|
1001
|
+
p: z.value.style.chart.bars.dataLabels.prefix,
|
|
1002
|
+
v: s,
|
|
1003
|
+
s: z.value.style.chart.bars.dataLabels.suffix,
|
|
1004
|
+
r: d
|
|
1005
|
+
}), { datapoint: {
|
|
1006
|
+
name: c,
|
|
1007
|
+
value: s
|
|
1008
|
+
} })}
|
|
1009
|
+
</span>
|
|
1010
|
+
</div>`);
|
|
1011
|
+
let ee = [t && l ? "(" : "", t && l ? ")" : ""];
|
|
1012
|
+
a.reverse().forEach((e) => {
|
|
1013
|
+
p += `
|
|
1014
|
+
<div style="display:flex;flex-direction:row;align-items:center;gap:4px">
|
|
1015
|
+
<svg viewBox="0 0 60 60" height="14" width="14"><rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="${z.value.style.chart.bars.gradient.show ? `url(#gradient_${e.id})` : e.color}"/>${ln.pattern ? `<rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="url(#pattern_${F.value}_${e.absoluteIndex})"/>` : ""}</svg>
|
|
1016
|
+
${e.name}${t || l ? ":" : ""} ${t ? h(z.value.style.chart.bars.dataLabels.formatter, e.value, r({
|
|
1017
|
+
p: z.value.style.chart.bars.dataLabels.prefix,
|
|
1018
|
+
v: e.value,
|
|
1019
|
+
s: z.value.style.chart.bars.dataLabels.suffix,
|
|
1020
|
+
r: d
|
|
1021
|
+
}, { datapoint: e })) : ""} ${ee[0]}${l ? r({
|
|
1022
|
+
v: isNaN(e.value / o) ? 0 : Math.abs(e.value) / o * 100,
|
|
1023
|
+
s: "%",
|
|
1024
|
+
r: f
|
|
1025
|
+
}) : ""}${ee[1]}
|
|
1026
|
+
</div>
|
|
1027
|
+
`;
|
|
1028
|
+
}), mn.value = `<div>${p}</div>`;
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
let ii = _(() => H.value.width), ai = _(() => H.value.height);
|
|
1032
|
+
Ce({
|
|
1033
|
+
timeLabelsEls: z.value.orientation === "vertical" ? Nn : Mn,
|
|
1034
|
+
timeLabels: Q,
|
|
1035
|
+
slicer: J,
|
|
1036
|
+
configRef: z,
|
|
1037
|
+
rotationPath: [
|
|
1038
|
+
"style",
|
|
1039
|
+
"chart",
|
|
1040
|
+
"grid",
|
|
1041
|
+
"x",
|
|
1042
|
+
"timeLabels",
|
|
1043
|
+
"rotation"
|
|
1044
|
+
],
|
|
1045
|
+
autoRotatePath: [
|
|
1046
|
+
"style",
|
|
1047
|
+
"chart",
|
|
1048
|
+
"grid",
|
|
1049
|
+
"x",
|
|
1050
|
+
"timeLabels",
|
|
1051
|
+
"autoRotate",
|
|
1052
|
+
"enable"
|
|
1053
|
+
],
|
|
1054
|
+
isAutoSize: !1,
|
|
1055
|
+
width: ii,
|
|
1056
|
+
height: ai,
|
|
1057
|
+
rotation: z.value.style.chart.grid.x.timeLabels.autoRotate.angle
|
|
1058
|
+
});
|
|
1059
|
+
function oi(e) {
|
|
1060
|
+
bn.value = e, hn.value += 1;
|
|
1061
|
+
}
|
|
1062
|
+
function si() {
|
|
1063
|
+
V.value.showTable = !V.value.showTable;
|
|
1064
|
+
}
|
|
1065
|
+
function ci() {
|
|
1066
|
+
V.value.dataLabels.show = !V.value.dataLabels.show;
|
|
1067
|
+
}
|
|
1068
|
+
function li() {
|
|
1069
|
+
V.value.showTooltip = !V.value.showTooltip;
|
|
1070
|
+
}
|
|
1071
|
+
function ui() {
|
|
1072
|
+
return $.value;
|
|
1073
|
+
}
|
|
1074
|
+
let di = _(() => {
|
|
1075
|
+
if ($.value.length === 0) return {
|
|
1076
|
+
head: [],
|
|
1077
|
+
body: [],
|
|
1078
|
+
config: {},
|
|
1079
|
+
columnNames: []
|
|
1080
|
+
};
|
|
1081
|
+
let e = $.value.map(({ name: e, color: t }) => ({
|
|
1082
|
+
label: e,
|
|
1083
|
+
color: t
|
|
1084
|
+
})), t = [];
|
|
1085
|
+
return Q.value.forEach((e) => {
|
|
1086
|
+
let n = [z.value.style.chart.grid.x.timeLabels.values[e.absoluteIndex] ? e.text : i + 1];
|
|
1087
|
+
K.value.forEach((t) => {
|
|
1088
|
+
n.push(Number((t.series[e.absoluteIndex] || 0).toFixed(z.value.table.td.roundingValue)));
|
|
1089
|
+
}), t.push(n);
|
|
1090
|
+
}), {
|
|
1091
|
+
head: e,
|
|
1092
|
+
body: t
|
|
1093
|
+
};
|
|
1094
|
+
});
|
|
1095
|
+
function fi(e = null) {
|
|
1096
|
+
let t = [
|
|
1097
|
+
[z.value.style.chart.title.text],
|
|
1098
|
+
[z.value.style.chart.title.subtitle.text],
|
|
1099
|
+
[""]
|
|
1100
|
+
], n = ["", ...di.value.head.map((e) => e.label)], r = di.value.body, a = l(t.concat([n]).concat(r));
|
|
1101
|
+
e ? e(a) : s({
|
|
1102
|
+
csvContent: a,
|
|
1103
|
+
title: z.value.style.chart.title.text || "vue-ui-stackbar"
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
let pi = _(() => {
|
|
1107
|
+
let e = [""].concat($.value.map((e) => e.name), " <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>"), t = [], n = J.value.end - J.value.start;
|
|
1108
|
+
for (let e = 0; e < n; e += 1) {
|
|
1109
|
+
let n = J.value.start + e, r = $.value.map((t) => t.series[e] ?? 0).reduce((e, t) => e + t, 0);
|
|
1110
|
+
t.push([z.value.style.chart.grid.x.timeLabels.values[n] && Q.value[e]?.text || n + 1].concat($.value.map((t) => (t.series[e] ?? 0).toFixed(z.value.table.td.roundingValue)), (r ?? 0).toFixed(z.value.table.td.roundingValue)));
|
|
1111
|
+
}
|
|
1112
|
+
let r = {
|
|
1113
|
+
th: {
|
|
1114
|
+
backgroundColor: z.value.table.th.backgroundColor,
|
|
1115
|
+
color: z.value.table.th.color,
|
|
1116
|
+
outline: z.value.table.th.outline
|
|
1117
|
+
},
|
|
1118
|
+
td: {
|
|
1119
|
+
backgroundColor: z.value.table.td.backgroundColor,
|
|
1120
|
+
color: z.value.table.td.color,
|
|
1121
|
+
outline: z.value.table.td.outline
|
|
1122
|
+
},
|
|
1123
|
+
breakpoint: z.value.table.responsiveBreakpoint
|
|
1124
|
+
}, a = [z.value.table.columnNames.period].concat($.value.map((e) => e.name), z.value.table.columnNames.total);
|
|
1125
|
+
return {
|
|
1126
|
+
head: e,
|
|
1127
|
+
body: t.slice(0, J.value.end - J.value.start),
|
|
1128
|
+
config: r,
|
|
1129
|
+
colNames: a
|
|
1130
|
+
};
|
|
1131
|
+
});
|
|
1132
|
+
function mi() {
|
|
1133
|
+
I.value.length ? I.value = [] : yi.value.forEach((e) => {
|
|
1134
|
+
I.value.push(e.id);
|
|
1135
|
+
});
|
|
1136
|
+
}
|
|
1137
|
+
function hi(e) {
|
|
1138
|
+
if (I.value.includes(e.id)) I.value = I.value.filter((t) => t !== e.id);
|
|
1139
|
+
else {
|
|
1140
|
+
if (I.value.length === K.value.length - 1) return;
|
|
1141
|
+
I.value.push(e.id);
|
|
1142
|
+
}
|
|
1143
|
+
un("selectLegend", $.value);
|
|
1144
|
+
}
|
|
1145
|
+
function gi(e) {
|
|
1146
|
+
return K.value.length ? K.value.find((t) => t.name === e) || (z.value.debug && console.warn(`VueUiStackbar - Series name not found "${e}"`), null) : (z.value.debug && console.warn("VueUiStackbar - There are no series to show."), null);
|
|
1147
|
+
}
|
|
1148
|
+
function _i(e) {
|
|
1149
|
+
let t = gi(e);
|
|
1150
|
+
t !== null && I.value.includes(t.id) && hi({ id: t.id });
|
|
1151
|
+
}
|
|
1152
|
+
function vi(e) {
|
|
1153
|
+
let t = gi(e);
|
|
1154
|
+
t !== null && (I.value.includes(t.id) || hi({ id: t.id }));
|
|
1155
|
+
}
|
|
1156
|
+
let yi = _(() => K.value.map((e, t) => ({
|
|
1157
|
+
...e,
|
|
1158
|
+
shape: "square"
|
|
1159
|
+
})).map((e) => ({
|
|
1160
|
+
...e,
|
|
1161
|
+
opacity: I.value.includes(e.id) ? .5 : 1,
|
|
1162
|
+
segregate: () => hi(e),
|
|
1163
|
+
isSegregated: I.value.includes(e.id)
|
|
1164
|
+
}))), bi = _(() => ({
|
|
1165
|
+
cy: "stackbar-legend",
|
|
1166
|
+
backgroundColor: z.value.style.chart.legend.backgroundColor,
|
|
1167
|
+
color: z.value.style.chart.legend.color,
|
|
1168
|
+
fontSize: z.value.style.chart.legend.fontSize,
|
|
1169
|
+
paddingBottom: 12,
|
|
1170
|
+
fontWeight: z.value.style.chart.legend.bold ? "bold" : ""
|
|
1171
|
+
})), xi = D(!1);
|
|
1172
|
+
function Si() {
|
|
1173
|
+
xi.value = !xi.value;
|
|
1174
|
+
}
|
|
1175
|
+
function Ci(e, t) {
|
|
1176
|
+
un("selectTimeLabel", {
|
|
1177
|
+
datapoint: JSON.parse(JSON.stringify($.value)).map((e) => ({
|
|
1178
|
+
name: e.name,
|
|
1179
|
+
value: e.series[t] === 0 ? 0 : (e.signedSeries[t] === -1 && e.series[t] >= 0 ? -e.series[t] : e.series[t]) || null,
|
|
1180
|
+
proportion: e.proportions[t] || null,
|
|
1181
|
+
color: e.color,
|
|
1182
|
+
id: e.id
|
|
1183
|
+
})),
|
|
1184
|
+
absoluteIndex: e.absoluteIndex,
|
|
1185
|
+
label: e.text
|
|
1186
|
+
});
|
|
1187
|
+
}
|
|
1188
|
+
let wi = _(() => Math.max(...$.value.flatMap((e) => e.series)));
|
|
1189
|
+
function Ti(e, t) {
|
|
1190
|
+
return z.value.style.chart.bars.showDistributedPercentage && z.value.style.chart.bars.distributed ? ar.value ? t * 100 >= z.value.style.chart.bars.dataLabels.hideUnderPercentage : z.value.style.chart.bars.dataLabels.hideEmptyPercentages ? t > 0 : !0 : ar.value ? (ir.value && pr.value && console.warn("Vue Data UI - VueUiStackbar - You cannot set both dataLabels.hideUnderPercentage and dataLabels.hideUnderValue. Note that dataLabels.hideUnderPercentage takes precedence in this case."), e > wi.value * z.value.style.chart.bars.dataLabels.hideUnderPercentage / 100) : ir.value ? Math.abs(e) >= z.value.style.chart.bars.dataLabels.hideUnderValue : z.value.style.chart.bars.dataLabels.hideEmptyValues ? e !== 0 : !0;
|
|
1191
|
+
}
|
|
1192
|
+
async function Ei({ scale: e = 2 } = {}) {
|
|
1193
|
+
if (!P.value) return;
|
|
1194
|
+
let { width: t, height: n } = P.value.getBoundingClientRect(), r = t / n, { imageUri: a, base64: o } = await we({
|
|
1195
|
+
domElement: P.value,
|
|
1196
|
+
base64: !0,
|
|
1197
|
+
img: !0,
|
|
1198
|
+
scale: e
|
|
1199
|
+
});
|
|
1200
|
+
return {
|
|
1201
|
+
imageUri: a,
|
|
1202
|
+
base64: o,
|
|
1203
|
+
title: z.value.style.chart.title.text,
|
|
1204
|
+
width: t,
|
|
1205
|
+
height: n,
|
|
1206
|
+
aspectRatio: r
|
|
1207
|
+
};
|
|
1208
|
+
}
|
|
1209
|
+
let Di = _(() => {
|
|
1210
|
+
let e = z.value.table.useDialog && !z.value.table.show, t = V.value.showTable;
|
|
1211
|
+
return {
|
|
1212
|
+
component: e ? an : $t,
|
|
1213
|
+
title: `${z.value.style.chart.title.text}${z.value.style.chart.title.subtitle.text ? `: ${z.value.style.chart.title.subtitle.text}` : ""}`,
|
|
1214
|
+
props: e ? {
|
|
1215
|
+
backgroundColor: z.value.table.th.backgroundColor,
|
|
1216
|
+
color: z.value.table.th.color,
|
|
1217
|
+
headerColor: z.value.table.th.color,
|
|
1218
|
+
headerBg: z.value.table.th.backgroundColor,
|
|
1219
|
+
isFullscreen: bn.value,
|
|
1220
|
+
fullscreenParent: P.value,
|
|
1221
|
+
forcedWidth: Math.min(800, window.innerWidth * .8),
|
|
1222
|
+
isCursorPointer: B.value
|
|
1223
|
+
} : {
|
|
1224
|
+
hideDetails: !0,
|
|
1225
|
+
config: {
|
|
1226
|
+
open: t,
|
|
1227
|
+
maxHeight: 1e4,
|
|
1228
|
+
body: {
|
|
1229
|
+
backgroundColor: z.value.style.chart.backgroundColor,
|
|
1230
|
+
color: z.value.style.chart.color
|
|
1231
|
+
},
|
|
1232
|
+
head: {
|
|
1233
|
+
backgroundColor: z.value.style.chart.backgroundColor,
|
|
1234
|
+
color: z.value.style.chart.color
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
};
|
|
1239
|
+
});
|
|
1240
|
+
Xe(() => V.value.showTable, (e) => {
|
|
1241
|
+
z.value.table.show || (e && z.value.table.useDialog && En.value ? En.value.open() : "close" in En.value && En.value.close());
|
|
1242
|
+
});
|
|
1243
|
+
function Oi() {
|
|
1244
|
+
V.value.showTable = !1, Dn.value && Dn.value.setTableIconState(!1);
|
|
1245
|
+
}
|
|
1246
|
+
let ki = _(() => z.value.style.chart.backgroundColor), Ai = _(() => z.value.style.chart.legend), { exportSvg: ji, getSvg: Mi } = ye({
|
|
1247
|
+
svg: er,
|
|
1248
|
+
title: _(() => z.value.style.chart.title),
|
|
1249
|
+
legend: Ai,
|
|
1250
|
+
legendItems: yi,
|
|
1251
|
+
backgroundColor: ki
|
|
1252
|
+
});
|
|
1253
|
+
async function Ni({ isCb: e }) {
|
|
1254
|
+
kn.value = !0, await He();
|
|
1255
|
+
try {
|
|
1256
|
+
if (e) {
|
|
1257
|
+
let { blob: e, url: t, text: n, dataUrl: r } = await Mi();
|
|
1258
|
+
await Promise.resolve(z.value.userOptions.callbacks.svg({
|
|
1259
|
+
blob: e,
|
|
1260
|
+
url: t,
|
|
1261
|
+
text: n,
|
|
1262
|
+
dataUrl: r
|
|
1263
|
+
}));
|
|
1264
|
+
} else await Promise.resolve(ji());
|
|
1265
|
+
} finally {
|
|
1266
|
+
kn.value = !1;
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
function Pi(e) {
|
|
1270
|
+
if (e?.stage === "start") {
|
|
1271
|
+
On.value = !0;
|
|
1272
|
+
return;
|
|
1273
|
+
}
|
|
1274
|
+
if (e?.stage === "end") {
|
|
1275
|
+
On.value = !1;
|
|
1276
|
+
return;
|
|
1277
|
+
}
|
|
1278
|
+
lr();
|
|
1279
|
+
}
|
|
1280
|
+
function Fi(e) {
|
|
1281
|
+
let t = q.value;
|
|
1282
|
+
return e > t ? t : e < 0 || e < J.value.start ? z.value.style.chart.zoom.startIndex === null ? 1 : J.value.start + 1 : e;
|
|
1283
|
+
}
|
|
1284
|
+
let Ii = D(!1), Li = D(!1);
|
|
1285
|
+
function Ri() {
|
|
1286
|
+
if (!Ii.value) {
|
|
1287
|
+
Ii.value = !0;
|
|
1288
|
+
try {
|
|
1289
|
+
let { startIndex: e, endIndex: t, keepState: n } = z.value.style.chart.zoom, r = n ? Math.max(0, q.value) : q.value;
|
|
1290
|
+
if (n && r <= 0) return;
|
|
1291
|
+
let a = e ?? 0, o = t == null ? r : Math.min(Fi(t + 1), r);
|
|
1292
|
+
zi.value = !0, J.value.start = a, J.value.end = o, Y.value.start = a, Y.value.end = o, kr(), Li.value = !0;
|
|
1293
|
+
} finally {
|
|
1294
|
+
queueMicrotask(() => {
|
|
1295
|
+
zi.value = !1;
|
|
1296
|
+
}), Ii.value = !1;
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
let zi = D(!1);
|
|
1301
|
+
function Bi(e) {
|
|
1302
|
+
Ii.value || zi.value || e !== J.value.start && (J.value.start = e, Y.value.start = e, kr());
|
|
1303
|
+
}
|
|
1304
|
+
function Vi(e) {
|
|
1305
|
+
if (Ii.value || zi.value) return;
|
|
1306
|
+
let t = Fi(e);
|
|
1307
|
+
t !== J.value.end && (J.value.end = t, Y.value.end = t, kr());
|
|
1308
|
+
}
|
|
1309
|
+
function Hi({ seriesIndex: e, datapoint: t }) {
|
|
1310
|
+
let n = J.value.start + e;
|
|
1311
|
+
un("selectX", {
|
|
1312
|
+
dataset: t,
|
|
1313
|
+
index: n,
|
|
1314
|
+
indexLabel: z.value.style.chart.grid.x.timeLabels.values[n]
|
|
1315
|
+
});
|
|
1316
|
+
}
|
|
1317
|
+
function Ui() {
|
|
1318
|
+
return { y0: Z.value?.[0]?.zero ?? G.value.bottom };
|
|
1319
|
+
}
|
|
1320
|
+
function Wi(e) {
|
|
1321
|
+
let { y0: t } = Ui(), n = z.value.style.chart.bars.totalValues, r = Math.max(2, n.fontSize * .3 + n.offsetY), a = Infinity, o = !1;
|
|
1322
|
+
for (let t of $.value || []) {
|
|
1323
|
+
let n = t?.series?.[e] ?? 0, r = t?.height?.[e] ?? 0, s = t?.y?.[e];
|
|
1324
|
+
n > 0 && r > 0 && Number.isFinite(s) && (o = !0, s < a && (a = s));
|
|
1325
|
+
}
|
|
1326
|
+
let s = (o && Number.isFinite(a) ? a : t) - r;
|
|
1327
|
+
return Math.min(Math.max(s, 0), G.value.bottom);
|
|
1328
|
+
}
|
|
1329
|
+
function Gi(e) {
|
|
1330
|
+
let { x0: t } = Ui(), n = Math.max(2, z.value.style.chart.bars.totalValues.fontSize * .3 + z.value.style.chart.bars.totalValues.offsetX), r = -Infinity, a = !1;
|
|
1331
|
+
for (let t of $.value || []) {
|
|
1332
|
+
let n = t?.series?.[e] ?? 0, o = t?.horizontal_x?.[e], s = t?.horizontal_width?.[e], c = Number.isFinite(s) ? Math.max(0, s) : 0;
|
|
1333
|
+
Number.isFinite(o) && n > 0 && c > 0 && (a = !0, r = Math.max(r, o + c));
|
|
1334
|
+
}
|
|
1335
|
+
return (a && Number.isFinite(r) ? r : t) + n;
|
|
1336
|
+
}
|
|
1337
|
+
async function Ki() {
|
|
1338
|
+
if (un("copyAlt", {
|
|
1339
|
+
config: z.value,
|
|
1340
|
+
dataset: $.value
|
|
1341
|
+
}), !z.value.userOptions.callbacks.altCopy) {
|
|
1342
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
1343
|
+
return;
|
|
1344
|
+
}
|
|
1345
|
+
await Promise.resolve(z.value.userOptions.callbacks.altCopy({
|
|
1346
|
+
config: z.value,
|
|
1347
|
+
dataset: $.value
|
|
1348
|
+
}));
|
|
1349
|
+
}
|
|
1350
|
+
let qi = D(!1);
|
|
1351
|
+
function Ji() {
|
|
1352
|
+
R.value = null, qi.value = !0;
|
|
1353
|
+
}
|
|
1354
|
+
function Yi() {
|
|
1355
|
+
R.value = null, fn.value = !1, L.value = null, un("selectX", {
|
|
1356
|
+
seriesIndex: null,
|
|
1357
|
+
datapoint: null
|
|
1358
|
+
}), qi.value = !1;
|
|
1359
|
+
}
|
|
1360
|
+
function Xi(e) {
|
|
1361
|
+
if (!er.value || xi.value || document.activeElement !== er.value || Pr.value || !J.value.end && J.value.end !== 0) return;
|
|
1362
|
+
let t = z.value.orientation === "vertical", n = z.value.orientation === "horizontal", r = t && e.key === "ArrowLeft" || n && e.key === "ArrowUp", a = t && e.key === "ArrowRight" || n && e.key === "ArrowDown", o = e.key === "Enter" || e.key === " ", s = e.key === "Escape";
|
|
1363
|
+
if (!r && !a && !o && !s) return;
|
|
1364
|
+
let c = J.value.end - J.value.start;
|
|
1365
|
+
if (c <= 0) return;
|
|
1366
|
+
if (e.preventDefault(), e.stopPropagation(), s) {
|
|
1367
|
+
R.value = null, fn.value = !1, L.value = null, un("selectX", {
|
|
1368
|
+
seriesIndex: null,
|
|
1369
|
+
datapoint: null
|
|
1370
|
+
});
|
|
1371
|
+
return;
|
|
1372
|
+
}
|
|
1373
|
+
if (o) {
|
|
1374
|
+
if (R.value === null) return;
|
|
1375
|
+
Qr(R.value);
|
|
1376
|
+
return;
|
|
1377
|
+
}
|
|
1378
|
+
let l = R.value, u = L.value;
|
|
1379
|
+
l !== null && l >= 0 && l < c ? a ? (l += 1, l >= c && (l = 0)) : r && (--l, l < 0 && (l = c - 1)) : u !== null && u >= 0 && u < c ? (l = a ? u + 1 : u - 1, l >= c && (l = 0), l < 0 && (l = c - 1)) : l = a ? 0 : c - 1, R.value = l, Zi(l), ri(l, "keyboard");
|
|
1380
|
+
}
|
|
1381
|
+
function Zi(e) {
|
|
1382
|
+
if (!Number.isFinite(e)) return;
|
|
1383
|
+
let t, n;
|
|
1384
|
+
z.value.orientation === "vertical" ? (t = G.value.left + e * X.value + X.value / 2, n = G.value.top + G.value.height / 2) : (t = G.value.left + G.value.width / 2, n = G.value.top + e * X.value + X.value / 2);
|
|
1385
|
+
let r = o(t, n, er.value);
|
|
1386
|
+
r && (Bn.value = r);
|
|
1387
|
+
}
|
|
1388
|
+
let Qi = _(() => ({
|
|
1389
|
+
headers: pi.value?.colNames ?? [],
|
|
1390
|
+
rows: pi.value?.body ?? []
|
|
1391
|
+
}));
|
|
1392
|
+
return De({
|
|
1393
|
+
getData: ui,
|
|
1394
|
+
getImage: Ei,
|
|
1395
|
+
generatePdf: cr,
|
|
1396
|
+
generateCsv: fi,
|
|
1397
|
+
generateImage: lr,
|
|
1398
|
+
generateSvg: Ni,
|
|
1399
|
+
hideSeries: vi,
|
|
1400
|
+
showSeries: _i,
|
|
1401
|
+
toggleTable: si,
|
|
1402
|
+
toggleLabels: ci,
|
|
1403
|
+
toggleTooltip: li,
|
|
1404
|
+
toggleAnnotator: Si,
|
|
1405
|
+
toggleFullscreen: oi,
|
|
1406
|
+
copyAlt: Ki
|
|
1407
|
+
}), (n, a) => (E(), b("div", {
|
|
1408
|
+
id: `stackbar_${F.value}`,
|
|
1409
|
+
ref_key: "stackbarChart",
|
|
1410
|
+
ref: P,
|
|
1411
|
+
class: Ue({
|
|
1412
|
+
"vue-data-ui-component": !0,
|
|
1413
|
+
"vue-ui-stackbar": !0,
|
|
1414
|
+
"vue-data-ui-wrapper-fullscreen": bn.value
|
|
1415
|
+
}),
|
|
1416
|
+
style: T(`background:${z.value.style.chart.backgroundColor};color:${z.value.style.chart.color};font-family:${z.value.style.fontFamily}; position: relative; ${z.value.responsive ? "height: 100%" : ""}`),
|
|
1417
|
+
onMouseenter: tr,
|
|
1418
|
+
onMouseleave: nr
|
|
1419
|
+
}, [
|
|
1420
|
+
x("div", {
|
|
1421
|
+
id: `chart-instructions-${F.value}`,
|
|
1422
|
+
class: "sr-only"
|
|
1423
|
+
}, [x("p", null, A(z.value.a11y.translations.keyboardNavigation), 1)], 8, et),
|
|
1424
|
+
Qi.value?.rows?.length ? (E(), v(Me, {
|
|
1425
|
+
key: 0,
|
|
1426
|
+
uid: F.value,
|
|
1427
|
+
head: Qi.value.headers,
|
|
1428
|
+
body: Qi.value.rows,
|
|
1429
|
+
notice: z.value.a11y.translations.tableAvailable,
|
|
1430
|
+
caption: z.value.a11y.translations.tableCaption
|
|
1431
|
+
}, null, 8, [
|
|
1432
|
+
"uid",
|
|
1433
|
+
"head",
|
|
1434
|
+
"body",
|
|
1435
|
+
"notice",
|
|
1436
|
+
"caption"
|
|
1437
|
+
])) : y("", !0),
|
|
1438
|
+
z.value.userOptions.buttons.annotator ? (E(), v(j(tn), {
|
|
1439
|
+
key: 1,
|
|
1440
|
+
svgRef: j(er),
|
|
1441
|
+
backgroundColor: z.value.style.chart.backgroundColor,
|
|
1442
|
+
color: z.value.style.chart.color,
|
|
1443
|
+
active: xi.value,
|
|
1444
|
+
isCursorPointer: B.value,
|
|
1445
|
+
onClose: Si
|
|
1446
|
+
}, {
|
|
1447
|
+
"annotator-action-close": M(() => [k(n.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
1448
|
+
"annotator-action-color": M(({ color: e }) => [k(n.$slots, "annotator-action-color", w(C({ color: e })), void 0, !0)]),
|
|
1449
|
+
"annotator-action-draw": M(({ mode: e }) => [k(n.$slots, "annotator-action-draw", w(C({ mode: e })), void 0, !0)]),
|
|
1450
|
+
"annotator-action-undo": M(({ disabled: e }) => [k(n.$slots, "annotator-action-undo", w(C({ disabled: e })), void 0, !0)]),
|
|
1451
|
+
"annotator-action-redo": M(({ disabled: e }) => [k(n.$slots, "annotator-action-redo", w(C({ disabled: e })), void 0, !0)]),
|
|
1452
|
+
"annotator-action-delete": M(({ disabled: e }) => [k(n.$slots, "annotator-action-delete", w(C({ disabled: e })), void 0, !0)]),
|
|
1453
|
+
_: 3
|
|
1454
|
+
}, 8, [
|
|
1455
|
+
"svgRef",
|
|
1456
|
+
"backgroundColor",
|
|
1457
|
+
"color",
|
|
1458
|
+
"active",
|
|
1459
|
+
"isCursorPointer"
|
|
1460
|
+
])) : y("", !0),
|
|
1461
|
+
k(n.$slots, "userConfig", {}, void 0, !0),
|
|
1462
|
+
z.value.style.chart.title.text ? (E(), b("div", {
|
|
1463
|
+
key: 2,
|
|
1464
|
+
ref_key: "chartTitle",
|
|
1465
|
+
ref: gn,
|
|
1466
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
1467
|
+
}, [(E(), v(Te, {
|
|
1468
|
+
key: `title_${Sn.value}`,
|
|
1469
|
+
config: {
|
|
1470
|
+
title: {
|
|
1471
|
+
cy: "stackbar-title",
|
|
1472
|
+
...z.value.style.chart.title
|
|
1473
|
+
},
|
|
1474
|
+
subtitle: {
|
|
1475
|
+
cy: "stackbar-subtitle",
|
|
1476
|
+
...z.value.style.chart.title.subtitle
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
}, null, 8, ["config"]))], 512)) : y("", !0),
|
|
1480
|
+
x("div", { id: `legend-top-${F.value}` }, null, 8, tt),
|
|
1481
|
+
z.value.userOptions.show && dn.value && (j($n) || j(Zn)) ? (E(), v(j(nn), {
|
|
1482
|
+
ref_key: "userOptionsRef",
|
|
1483
|
+
ref: Dn,
|
|
1484
|
+
key: `user_option_${hn.value}`,
|
|
1485
|
+
backgroundColor: z.value.style.chart.backgroundColor,
|
|
1486
|
+
color: z.value.style.chart.color,
|
|
1487
|
+
isPrinting: j(or),
|
|
1488
|
+
isImaging: j(sr),
|
|
1489
|
+
uid: F.value,
|
|
1490
|
+
hasTooltip: z.value.style.chart.tooltip.show && z.value.userOptions.buttons.tooltip,
|
|
1491
|
+
hasPdf: z.value.userOptions.buttons.pdf,
|
|
1492
|
+
hasImg: z.value.userOptions.buttons.img,
|
|
1493
|
+
hasSvg: z.value.userOptions.buttons.svg,
|
|
1494
|
+
hasXls: z.value.userOptions.buttons.csv,
|
|
1495
|
+
hasTable: z.value.userOptions.buttons.table,
|
|
1496
|
+
hasLabel: z.value.userOptions.buttons.labels,
|
|
1497
|
+
hasFullscreen: z.value.userOptions.buttons.fullscreen,
|
|
1498
|
+
hasAltCopy: z.value.userOptions.buttons.altCopy,
|
|
1499
|
+
isFullscreen: bn.value,
|
|
1500
|
+
chartElement: P.value,
|
|
1501
|
+
position: z.value.userOptions.position,
|
|
1502
|
+
isTooltip: V.value.showTooltip,
|
|
1503
|
+
titles: { ...z.value.userOptions.buttonTitles },
|
|
1504
|
+
hasAnnotator: z.value.userOptions.buttons.annotator,
|
|
1505
|
+
isAnnotation: xi.value,
|
|
1506
|
+
callbacks: z.value.userOptions.callbacks,
|
|
1507
|
+
printScale: z.value.userOptions.print.scale,
|
|
1508
|
+
tableDialog: z.value.table.useDialog,
|
|
1509
|
+
isCursorPointer: B.value,
|
|
1510
|
+
onToggleFullscreen: oi,
|
|
1511
|
+
onGeneratePdf: j(cr),
|
|
1512
|
+
onGenerateCsv: fi,
|
|
1513
|
+
onGenerateImage: Pi,
|
|
1514
|
+
onGenerateSvg: Ni,
|
|
1515
|
+
onToggleTable: si,
|
|
1516
|
+
onToggleLabels: ci,
|
|
1517
|
+
onToggleTooltip: li,
|
|
1518
|
+
onToggleAnnotator: Si,
|
|
1519
|
+
onCopyAlt: Ki,
|
|
1520
|
+
style: T({ visibility: j($n) ? j(Zn) ? "visible" : "hidden" : "visible" })
|
|
1521
|
+
}, Re({ _: 2 }, [
|
|
1522
|
+
n.$slots.menuIcon ? {
|
|
1523
|
+
name: "menuIcon",
|
|
1524
|
+
fn: M(({ isOpen: e, color: t }) => [k(n.$slots, "menuIcon", w(C({
|
|
1525
|
+
isOpen: e,
|
|
1526
|
+
color: t
|
|
1527
|
+
})), void 0, !0)]),
|
|
1528
|
+
key: "0"
|
|
1529
|
+
} : void 0,
|
|
1530
|
+
n.$slots.optionTooltip ? {
|
|
1531
|
+
name: "optionTooltip",
|
|
1532
|
+
fn: M(() => [k(n.$slots, "optionTooltip", {}, void 0, !0)]),
|
|
1533
|
+
key: "1"
|
|
1534
|
+
} : void 0,
|
|
1535
|
+
n.$slots.optionPdf ? {
|
|
1536
|
+
name: "optionPdf",
|
|
1537
|
+
fn: M(() => [k(n.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1538
|
+
key: "2"
|
|
1539
|
+
} : void 0,
|
|
1540
|
+
n.$slots.optionCsv ? {
|
|
1541
|
+
name: "optionCsv",
|
|
1542
|
+
fn: M(() => [k(n.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1543
|
+
key: "3"
|
|
1544
|
+
} : void 0,
|
|
1545
|
+
n.$slots.optionImg ? {
|
|
1546
|
+
name: "optionImg",
|
|
1547
|
+
fn: M(() => [k(n.$slots, "optionImg", {}, void 0, !0)]),
|
|
1548
|
+
key: "4"
|
|
1549
|
+
} : void 0,
|
|
1550
|
+
n.$slots.optionSvg ? {
|
|
1551
|
+
name: "optionSvg",
|
|
1552
|
+
fn: M(() => [k(n.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1553
|
+
key: "5"
|
|
1554
|
+
} : void 0,
|
|
1555
|
+
n.$slots.optionTable ? {
|
|
1556
|
+
name: "optionTable",
|
|
1557
|
+
fn: M(() => [k(n.$slots, "optionTable", {}, void 0, !0)]),
|
|
1558
|
+
key: "6"
|
|
1559
|
+
} : void 0,
|
|
1560
|
+
n.$slots.optionLabels ? {
|
|
1561
|
+
name: "optionLabels",
|
|
1562
|
+
fn: M(() => [k(n.$slots, "optionLabels", {}, void 0, !0)]),
|
|
1563
|
+
key: "7"
|
|
1564
|
+
} : void 0,
|
|
1565
|
+
n.$slots.optionFullscreen ? {
|
|
1566
|
+
name: "optionFullscreen",
|
|
1567
|
+
fn: M(({ toggleFullscreen: e, isFullscreen: t }) => [k(n.$slots, "optionFullscreen", w(C({
|
|
1568
|
+
toggleFullscreen: e,
|
|
1569
|
+
isFullscreen: t
|
|
1570
|
+
})), void 0, !0)]),
|
|
1571
|
+
key: "8"
|
|
1572
|
+
} : void 0,
|
|
1573
|
+
n.$slots.optionAnnotator ? {
|
|
1574
|
+
name: "optionAnnotator",
|
|
1575
|
+
fn: M(({ toggleAnnotator: e, isAnnotator: t }) => [k(n.$slots, "optionAnnotator", w(C({
|
|
1576
|
+
toggleAnnotator: e,
|
|
1577
|
+
isAnnotator: t
|
|
1578
|
+
})), void 0, !0)]),
|
|
1579
|
+
key: "9"
|
|
1580
|
+
} : void 0,
|
|
1581
|
+
n.$slots.optionAltCopy ? {
|
|
1582
|
+
name: "optionAltCopy",
|
|
1583
|
+
fn: M(({ altCopy: e }) => [k(n.$slots, "optionAltCopy", w(C({ altCopy: e })), void 0, !0)]),
|
|
1584
|
+
key: "10"
|
|
1585
|
+
} : void 0,
|
|
1586
|
+
n.$slots["custom-menu-before"] ? {
|
|
1587
|
+
name: "custom-menu-before",
|
|
1588
|
+
fn: M(() => [k(n.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
1589
|
+
key: "11"
|
|
1590
|
+
} : void 0,
|
|
1591
|
+
n.$slots["custom-menu-after"] ? {
|
|
1592
|
+
name: "custom-menu-after",
|
|
1593
|
+
fn: M(() => [k(n.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
1594
|
+
key: "12"
|
|
1595
|
+
} : void 0
|
|
1596
|
+
]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.isTooltip.titles.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.style".split("."))) : y("", !0),
|
|
1597
|
+
x("div", nt, [(E(), b("svg", {
|
|
1598
|
+
ref_key: "svgRef",
|
|
1599
|
+
ref: er,
|
|
1600
|
+
xmlns: j(se),
|
|
1601
|
+
"aria-describedby": `chart-instructions-${F.value}`,
|
|
1602
|
+
viewBox: `0 0 ${G.value.chartWidth <= 0 ? 10 : G.value.chartWidth} ${G.value.chartHeight <= 0 ? 10 : G.value.chartHeight}`,
|
|
1603
|
+
class: Ue({ "vue-data-ui-loading": j(Jn) }),
|
|
1604
|
+
style: T(`max-width:100%;overflow:visible;background:transparent;color:${z.value.style.chart.color}`),
|
|
1605
|
+
tabindex: "0",
|
|
1606
|
+
onFocus: Ji,
|
|
1607
|
+
onBlur: Yi,
|
|
1608
|
+
onKeydown: Xi
|
|
1609
|
+
}, [
|
|
1610
|
+
Be(j(rn)),
|
|
1611
|
+
n.$slots["chart-background"] ? (E(), b("foreignObject", {
|
|
1612
|
+
key: 0,
|
|
1613
|
+
x: G.value.left,
|
|
1614
|
+
y: G.value.top,
|
|
1615
|
+
width: G.value.width <= 0 ? 10 : G.value.width,
|
|
1616
|
+
height: G.value.height <= 0 ? 10 : G.value.height,
|
|
1617
|
+
style: { pointerEvents: "none" }
|
|
1618
|
+
}, [k(n.$slots, "chart-background", {}, void 0, !0)], 8, it)) : y("", !0),
|
|
1619
|
+
z.value.style.chart.bars.gradient.show ? (E(), b("defs", at, [(E(!0), b(g, null, O($.value, (e, t) => (E(), b("linearGradient", {
|
|
1620
|
+
id: `gradient_${e.id}`,
|
|
1621
|
+
x1: "0%",
|
|
1622
|
+
y1: "0%",
|
|
1623
|
+
x2: "0%",
|
|
1624
|
+
y2: "100%"
|
|
1625
|
+
}, [
|
|
1626
|
+
x("stop", {
|
|
1627
|
+
offset: "0%",
|
|
1628
|
+
"stop-color": e.color
|
|
1629
|
+
}, null, 8, st),
|
|
1630
|
+
x("stop", {
|
|
1631
|
+
offset: "61.8%",
|
|
1632
|
+
"stop-color": j(ue)(e.color, z.value.style.chart.bars.gradient.intensity / 100)
|
|
1633
|
+
}, null, 8, ct),
|
|
1634
|
+
x("stop", {
|
|
1635
|
+
offset: "100%",
|
|
1636
|
+
"stop-color": e.color
|
|
1637
|
+
}, null, 8, lt)
|
|
1638
|
+
], 8, ot))), 256))])) : y("", !0),
|
|
1639
|
+
z.value.style.chart.grid.frame.show ? (E(), b("rect", {
|
|
1640
|
+
key: 2,
|
|
1641
|
+
style: {
|
|
1642
|
+
pointerEvents: "none",
|
|
1643
|
+
transition: "none",
|
|
1644
|
+
animation: "none !important"
|
|
1645
|
+
},
|
|
1646
|
+
x: Math.max(0, G.value.left),
|
|
1647
|
+
y: Math.max(0, G.value.top),
|
|
1648
|
+
width: Math.max(0, G.value.width),
|
|
1649
|
+
height: Math.max(0, G.value.height),
|
|
1650
|
+
fill: "transparent",
|
|
1651
|
+
stroke: z.value.style.chart.grid.frame.stroke,
|
|
1652
|
+
"stroke-width": z.value.style.chart.grid.frame.strokeWidth,
|
|
1653
|
+
"stroke-linecap": z.value.style.chart.grid.frame.strokeLinecap,
|
|
1654
|
+
"stroke-linejoin": z.value.style.chart.grid.frame.strokeLinejoin,
|
|
1655
|
+
"stroke-dasharray": z.value.style.chart.grid.frame.strokeDasharray
|
|
1656
|
+
}, null, 8, ut)) : y("", !0),
|
|
1657
|
+
z.value.style.chart.grid.x.showHorizontalLines && z.value.orientation === "vertical" ? (E(!0), b(g, { key: 3 }, O(Z.value, (e, t) => (E(), b("line", {
|
|
1658
|
+
x1: G.value.left,
|
|
1659
|
+
x2: G.value.right,
|
|
1660
|
+
y1: e.y,
|
|
1661
|
+
y2: e.y,
|
|
1662
|
+
stroke: z.value.style.chart.grid.x.linesColor,
|
|
1663
|
+
"stroke-width": z.value.style.chart.grid.x.linesThickness,
|
|
1664
|
+
"stroke-dasharray": z.value.style.chart.grid.x.linesStrokeDasharray,
|
|
1665
|
+
"stroke-linecap": "round"
|
|
1666
|
+
}, null, 8, dt))), 256)) : y("", !0),
|
|
1667
|
+
z.value.style.chart.grid.x.showHorizontalLines && z.value.orientation === "horizontal" ? (E(!0), b(g, { key: 4 }, O(J.value.end - J.value.start + 1, (e, t) => (E(), b("line", {
|
|
1668
|
+
x1: G.value.left,
|
|
1669
|
+
x2: G.value.right,
|
|
1670
|
+
y1: G.value.top + X.value * t,
|
|
1671
|
+
y2: G.value.top + X.value * t,
|
|
1672
|
+
stroke: z.value.style.chart.grid.x.linesColor,
|
|
1673
|
+
"stroke-width": z.value.style.chart.grid.x.linesThickness,
|
|
1674
|
+
"stroke-dasharray": z.value.style.chart.grid.x.linesStrokeDasharray,
|
|
1675
|
+
"stroke-linecap": "round"
|
|
1676
|
+
}, null, 8, ft))), 256)) : y("", !0),
|
|
1677
|
+
z.value.style.chart.grid.y.showVerticalLines && z.value.orientation === "vertical" ? (E(!0), b(g, { key: 5 }, O(J.value.end - J.value.start + 1, (e, t) => (E(), b("line", {
|
|
1678
|
+
x1: G.value.left + X.value * t,
|
|
1679
|
+
x2: G.value.left + X.value * t,
|
|
1680
|
+
y1: G.value.top,
|
|
1681
|
+
y2: G.value.bottom,
|
|
1682
|
+
stroke: z.value.style.chart.grid.y.linesColor,
|
|
1683
|
+
"stroke-width": z.value.style.chart.grid.y.linesThickness,
|
|
1684
|
+
"stroke-dasharray": z.value.style.chart.grid.y.linesStrokeDasharray,
|
|
1685
|
+
"stroke-linecap": "round"
|
|
1686
|
+
}, null, 8, pt))), 256)) : y("", !0),
|
|
1687
|
+
z.value.style.chart.grid.y.showVerticalLines && z.value.orientation === "horizontal" ? (E(!0), b(g, { key: 6 }, O(Z.value, (e, t) => (E(), b("line", {
|
|
1688
|
+
x1: e.horizontal_x,
|
|
1689
|
+
x2: e.horizontal_x,
|
|
1690
|
+
y1: G.value.top,
|
|
1691
|
+
y2: G.value.bottom,
|
|
1692
|
+
stroke: z.value.style.chart.grid.y.linesColor,
|
|
1693
|
+
"stroke-width": z.value.style.chart.grid.y.linesThickness,
|
|
1694
|
+
"stroke-dasharray": z.value.style.chart.grid.y.linesStrokeDasharray,
|
|
1695
|
+
"stroke-linecap": "round"
|
|
1696
|
+
}, null, 8, mt))), 256)) : y("", !0),
|
|
1697
|
+
(E(!0), b(g, null, O($.value, (e, t) => (E(), b("g", null, [n.$slots.pattern ? (E(), b("defs", ht, [k(n.$slots, "pattern", Ve({ ref_for: !0 }, {
|
|
1698
|
+
seriesIndex: e.absoluteIndex,
|
|
1699
|
+
patternId: `pattern_${F.value}_${e.absoluteIndex}`
|
|
1700
|
+
}), void 0, !0)])) : y("", !0), z.value.orientation === "vertical" ? (E(), b(g, { key: 1 }, [(E(!0), b(g, null, O(e.x, (t, n) => (E(), b("rect", {
|
|
1701
|
+
x: t,
|
|
1702
|
+
y: j(m)(e.y[n]),
|
|
1703
|
+
height: e.height[n] < 0 ? 1e-4 : e.height[n] || 0,
|
|
1704
|
+
rx: z.value.style.chart.bars.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : z.value.style.chart.bars.borderRadius,
|
|
1705
|
+
width: X.value * (1 - z.value.style.chart.bars.gapRatio / 2),
|
|
1706
|
+
fill: z.value.style.chart.bars.gradient.show ? `url(#gradient_${e.id})` : e.color,
|
|
1707
|
+
stroke: z.value.style.chart.backgroundColor,
|
|
1708
|
+
"stroke-width": z.value.style.chart.bars.strokeWidth,
|
|
1709
|
+
"stroke-linecap": "round",
|
|
1710
|
+
"stroke-linejoin": "round",
|
|
1711
|
+
class: Ue({
|
|
1712
|
+
"vue-data-ui-bar-animated": z.value.useCssAnimation,
|
|
1713
|
+
"vue-data-ui-bar-transition": xn.value
|
|
1714
|
+
})
|
|
1715
|
+
}, null, 10, gt))), 256)), n.$slots.pattern ? (E(), b("g", _t, [(E(!0), b(g, null, O(e.x, (t, n) => (E(), b("rect", {
|
|
1716
|
+
x: t,
|
|
1717
|
+
y: j(m)(e.y[n]),
|
|
1718
|
+
height: e.height[n] < 0 ? 1e-4 : e.height[n] || 0,
|
|
1719
|
+
rx: z.value.style.chart.bars.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : z.value.style.chart.bars.borderRadius,
|
|
1720
|
+
width: X.value * (1 - z.value.style.chart.bars.gapRatio / 2),
|
|
1721
|
+
fill: `url(#pattern_${F.value}_${e.absoluteIndex})`,
|
|
1722
|
+
stroke: z.value.style.chart.backgroundColor,
|
|
1723
|
+
"stroke-width": z.value.style.chart.bars.strokeWidth,
|
|
1724
|
+
"stroke-linecap": "round",
|
|
1725
|
+
"stroke-linejoin": "round",
|
|
1726
|
+
class: Ue({
|
|
1727
|
+
"vue-data-ui-bar-animated": z.value.useCssAnimation,
|
|
1728
|
+
"vue-data-ui-bar-transition": xn.value
|
|
1729
|
+
})
|
|
1730
|
+
}, null, 10, vt))), 256))])) : y("", !0)], 64)) : (E(), b(g, { key: 2 }, [(E(!0), b(g, null, O(e.horizontal_x, (t, n) => (E(), b("rect", {
|
|
1731
|
+
x: j(m)(t, G.value.left),
|
|
1732
|
+
y: e.horizontal_y[n] < 0 ? 0 : e.horizontal_y[n],
|
|
1733
|
+
width: j(m)(e.horizontal_width[n] < 0 ? 1e-4 : e.horizontal_width[n]),
|
|
1734
|
+
rx: z.value.style.chart.bars.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : z.value.style.chart.bars.borderRadius,
|
|
1735
|
+
height: X.value * (1 - z.value.style.chart.bars.gapRatio / 2),
|
|
1736
|
+
fill: z.value.style.chart.bars.gradient.show ? `url(#gradient_${e.id})` : e.color,
|
|
1737
|
+
stroke: z.value.style.chart.backgroundColor,
|
|
1738
|
+
"stroke-width": z.value.style.chart.bars.strokeWidth,
|
|
1739
|
+
"stroke-linecap": "round",
|
|
1740
|
+
"stroke-linejoin": "round",
|
|
1741
|
+
class: Ue({
|
|
1742
|
+
"vue-data-ui-bar-animated": z.value.useCssAnimation,
|
|
1743
|
+
"vue-data-ui-bar-transition": xn.value
|
|
1744
|
+
})
|
|
1745
|
+
}, null, 10, yt))), 256)), n.$slots.pattern ? (E(), b("g", bt, [(E(!0), b(g, null, O(e.horizontal_x, (t, n) => (E(), b("rect", {
|
|
1746
|
+
x: j(m)(t, G.value.left),
|
|
1747
|
+
y: e.horizontal_y[n] < 0 ? 0 : e.horizontal_y[n],
|
|
1748
|
+
width: j(m)(e.horizontal_width[n] < 0 ? 1e-4 : e.horizontal_width[n]),
|
|
1749
|
+
rx: z.value.style.chart.bars.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : z.value.style.chart.bars.borderRadius,
|
|
1750
|
+
height: X.value * (1 - z.value.style.chart.bars.gapRatio / 2),
|
|
1751
|
+
fill: `url(#pattern_${F.value}_${e.absoluteIndex})`,
|
|
1752
|
+
stroke: z.value.style.chart.backgroundColor,
|
|
1753
|
+
"stroke-width": z.value.style.chart.bars.strokeWidth,
|
|
1754
|
+
"stroke-linecap": "round",
|
|
1755
|
+
"stroke-linejoin": "round",
|
|
1756
|
+
class: Ue({
|
|
1757
|
+
"vue-data-ui-bar-animated": z.value.useCssAnimation,
|
|
1758
|
+
"vue-data-ui-bar-transition": xn.value
|
|
1759
|
+
})
|
|
1760
|
+
}, null, 10, xt))), 256))])) : y("", !0)], 64))]))), 256)),
|
|
1761
|
+
z.value.style.chart.grid.x.showAxis ? (E(), b("line", {
|
|
1762
|
+
key: 7,
|
|
1763
|
+
x1: G.value.left,
|
|
1764
|
+
x2: G.value.right,
|
|
1765
|
+
y1: G.value.bottom,
|
|
1766
|
+
y2: G.value.bottom,
|
|
1767
|
+
stroke: z.value.style.chart.grid.x.axisColor,
|
|
1768
|
+
"stroke-width": z.value.style.chart.grid.x.axisThickness,
|
|
1769
|
+
"stroke-linecap": "round",
|
|
1770
|
+
"stroke-linejoin": "round"
|
|
1771
|
+
}, null, 8, St)) : y("", !0),
|
|
1772
|
+
z.value.style.chart.grid.y.showAxis && !z.value.style.chart.bars.distributed ? (E(), b("line", {
|
|
1773
|
+
key: 8,
|
|
1774
|
+
x1: W.value ? G.value.right : G.value.left,
|
|
1775
|
+
x2: W.value ? G.value.right : G.value.left,
|
|
1776
|
+
y1: G.value.top,
|
|
1777
|
+
y2: G.value.bottom,
|
|
1778
|
+
stroke: z.value.style.chart.grid.y.axisColor,
|
|
1779
|
+
"stroke-width": z.value.style.chart.grid.y.axisThickness,
|
|
1780
|
+
"stroke-linecap": "round",
|
|
1781
|
+
"stroke-linejoin": "round"
|
|
1782
|
+
}, null, 8, Ct)) : y("", !0),
|
|
1783
|
+
z.value.style.chart.grid.x.axisName.show && z.value.style.chart.grid.x.axisName.text ? (E(), b("text", {
|
|
1784
|
+
key: 9,
|
|
1785
|
+
ref_key: "xAxisLabel",
|
|
1786
|
+
ref: An,
|
|
1787
|
+
x: G.value.left + G.value.width / 2,
|
|
1788
|
+
y: G.value.chartHeight - 3,
|
|
1789
|
+
"font-size": z.value.style.chart.grid.x.axisName.fontSize,
|
|
1790
|
+
fill: z.value.style.chart.grid.x.axisName.color,
|
|
1791
|
+
"font-weight": z.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
|
|
1792
|
+
"text-anchor": "middle"
|
|
1793
|
+
}, A(z.value.style.chart.grid.x.axisName.text), 9, wt)) : y("", !0),
|
|
1794
|
+
z.value.style.chart.grid.y.axisName.show && z.value.style.chart.grid.y.axisName.text ? (E(), b("text", {
|
|
1795
|
+
key: 10,
|
|
1796
|
+
ref_key: "yAxisLabel",
|
|
1797
|
+
ref: jn,
|
|
1798
|
+
transform: `translate(${W.value ? H.value.width - z.value.style.chart.grid.y.axisName.fontSize / 2 - z.value.style.chart.grid.y.axisName.offsetX : z.value.style.chart.grid.y.axisName.fontSize + z.value.style.chart.grid.y.axisName.offsetX}, ${G.value.top + G.value.height / 2}) rotate(-90)`,
|
|
1799
|
+
"font-size": z.value.style.chart.grid.y.axisName.fontSize,
|
|
1800
|
+
fill: z.value.style.chart.grid.y.axisName.color,
|
|
1801
|
+
"font-weight": z.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
|
|
1802
|
+
"text-anchor": "middle"
|
|
1803
|
+
}, A(z.value.style.chart.grid.y.axisName.text), 9, Tt)) : y("", !0),
|
|
1804
|
+
V.value.dataLabels.show && z.value.orientation === "vertical" ? (E(), b(g, { key: 11 }, [(E(!0), b(g, null, O($.value, (e, t) => (E(), b("g", null, [(E(!0), b(g, null, O(e.x, (n, r) => (E(), b(g, null, [Ti(e.series[r], e.proportions[r]) ? (E(), b("text", {
|
|
1805
|
+
key: 0,
|
|
1806
|
+
x: n + X.value * (1 - z.value.style.chart.bars.gapRatio / 2) / 2,
|
|
1807
|
+
y: e.y[r] + e.height[r] / 2 + z.value.style.chart.bars.dataLabels.fontSize / 3,
|
|
1808
|
+
"font-size": z.value.style.chart.bars.dataLabels.fontSize,
|
|
1809
|
+
fill: z.value.style.chart.bars.dataLabels.adaptColorToBackground ? j(ae)(e.color) : z.value.style.chart.bars.dataLabels.color,
|
|
1810
|
+
"font-weight": z.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
|
|
1811
|
+
"text-anchor": "middle"
|
|
1812
|
+
}, A(z.value.style.chart.bars.showDistributedPercentage && z.value.style.chart.bars.distributed ? Zr(e.proportions[r] * 100, e, t, r) : Xr(e.series[r], e, t, r, e.signedSeries[r])), 9, Et)) : y("", !0)], 64))), 256))]))), 256)), z.value.style.chart.bars.totalValues.show && $.value.length > 1 ? (E(), b("g", {
|
|
1813
|
+
key: 0,
|
|
1814
|
+
ref_key: "sumTop",
|
|
1815
|
+
ref: Pn
|
|
1816
|
+
}, [(E(!0), b(g, null, O(Yr.value, (e, t) => (E(), b(g, null, [!z.value.style.chart.bars.dataLabels.hideEmptyValues || e.value !== 0 ? (E(), b("text", {
|
|
1817
|
+
key: 0,
|
|
1818
|
+
x: G.value.left + X.value * t + X.value / 2,
|
|
1819
|
+
y: Wi(t),
|
|
1820
|
+
"text-anchor": "middle",
|
|
1821
|
+
"font-size": z.value.style.chart.bars.totalValues.fontSize,
|
|
1822
|
+
"font-weight": z.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
|
|
1823
|
+
fill: z.value.style.chart.bars.totalValues.color
|
|
1824
|
+
}, A(Xr(e.value, e, t, e.sign)), 9, Dt)) : y("", !0)], 64))), 256))], 512)) : y("", !0)], 64)) : y("", !0),
|
|
1825
|
+
V.value.dataLabels.show && z.value.orientation === "horizontal" ? (E(), b(g, { key: 12 }, [(E(!0), b(g, null, O($.value, (e, t) => (E(), b("g", null, [(E(!0), b(g, null, O(e.horizontal_x, (n, r) => (E(), b(g, null, [Ti(e.series[r], e.proportions[r]) ? (E(), b("text", {
|
|
1826
|
+
key: 0,
|
|
1827
|
+
x: n + (e.horizontal_width[r] < 0 ? 1e-4 : e.horizontal_width[r]) / 2,
|
|
1828
|
+
y: e.horizontal_y[r] + X.value * (1 - z.value.style.chart.bars.gapRatio / 2) / 2 + z.value.style.chart.bars.dataLabels.fontSize / 3,
|
|
1829
|
+
"font-size": z.value.style.chart.bars.dataLabels.fontSize,
|
|
1830
|
+
fill: z.value.style.chart.bars.dataLabels.adaptColorToBackground ? j(ae)(e.color) : z.value.style.chart.bars.dataLabels.color,
|
|
1831
|
+
"font-weight": z.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
|
|
1832
|
+
"text-anchor": "middle"
|
|
1833
|
+
}, A(z.value.style.chart.bars.showDistributedPercentage && z.value.style.chart.bars.distributed ? Zr(e.proportions[r] * 100, e, t, r) : Xr(e.series[r], e, t, r, e.signedSeries[r])), 9, Ot)) : y("", !0)], 64))), 256))]))), 256)), z.value.style.chart.bars.totalValues.show && $.value.length > 1 ? (E(), b("g", {
|
|
1834
|
+
key: 0,
|
|
1835
|
+
ref_key: "sumRight",
|
|
1836
|
+
ref: Fn
|
|
1837
|
+
}, [(E(!0), b(g, null, O(Yr.value, (e, t) => (E(), b(g, null, [!z.value.style.chart.bars.dataLabels.hideEmptyValues || e.value !== 0 ? (E(), b("text", {
|
|
1838
|
+
key: 0,
|
|
1839
|
+
x: Gi(t),
|
|
1840
|
+
y: G.value.top + X.value * t + X.value / 2 + z.value.style.chart.bars.totalValues.fontSize / 3,
|
|
1841
|
+
"text-anchor": "start",
|
|
1842
|
+
"font-size": z.value.style.chart.bars.totalValues.fontSize,
|
|
1843
|
+
"font-weight": z.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
|
|
1844
|
+
fill: z.value.style.chart.bars.totalValues.color
|
|
1845
|
+
}, A(Xr(e.value, e, t, e.sign)), 9, kt)) : y("", !0)], 64))), 256))], 512)) : y("", !0)], 64)) : y("", !0),
|
|
1846
|
+
z.value.style.chart.grid.y.axisLabels.show && !z.value.style.chart.bars.distributed && z.value.orientation === "vertical" ? (E(), b("g", {
|
|
1847
|
+
key: 13,
|
|
1848
|
+
ref_key: "scaleLabels",
|
|
1849
|
+
ref: Mn
|
|
1850
|
+
}, [(E(!0), b(g, null, O(Z.value, (e, t) => (E(), b("line", {
|
|
1851
|
+
x1: W.value ? G.value.right : G.value.left,
|
|
1852
|
+
x2: W.value ? G.value.right + 6 : G.value.left - 6,
|
|
1853
|
+
y1: e.y,
|
|
1854
|
+
y2: e.y,
|
|
1855
|
+
stroke: z.value.style.chart.grid.x.axisColor,
|
|
1856
|
+
"stroke-width": 1
|
|
1857
|
+
}, null, 8, At))), 256)), (E(!0), b(g, null, O(Z.value, (e, t) => (E(), b("text", {
|
|
1858
|
+
x: e.x,
|
|
1859
|
+
y: e.y + z.value.style.chart.grid.y.axisLabels.fontSize / 3,
|
|
1860
|
+
"font-size": z.value.style.chart.grid.y.axisLabels.fontSize,
|
|
1861
|
+
"font-weight": z.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
|
|
1862
|
+
fill: z.value.style.chart.grid.y.axisLabels.color,
|
|
1863
|
+
"text-anchor": W.value ? "start" : "end"
|
|
1864
|
+
}, A(j(h)(z.value.style.chart.grid.y.axisLabels.formatter, e.value, j(r)({
|
|
1865
|
+
p: z.value.style.chart.bars.dataLabels.prefix,
|
|
1866
|
+
v: e.value,
|
|
1867
|
+
s: z.value.style.chart.bars.dataLabels.suffix,
|
|
1868
|
+
r: z.value.style.chart.grid.y.axisLabels.rounding
|
|
1869
|
+
}), { datapoint: e })), 9, jt))), 256))], 512)) : y("", !0),
|
|
1870
|
+
z.value.style.chart.grid.y.axisLabels.show && !z.value.style.chart.bars.distributed && z.value.orientation === "horizontal" ? (E(), b("g", {
|
|
1871
|
+
key: 14,
|
|
1872
|
+
ref_key: "scaleLabels",
|
|
1873
|
+
ref: Mn
|
|
1874
|
+
}, [(E(!0), b(g, null, O(Z.value, (e, t) => (E(), b("line", {
|
|
1875
|
+
x1: e.horizontal_x,
|
|
1876
|
+
x2: e.horizontal_x,
|
|
1877
|
+
y1: G.value.bottom,
|
|
1878
|
+
y2: G.value.bottom + 6,
|
|
1879
|
+
stroke: z.value.style.chart.grid.x.axisColor,
|
|
1880
|
+
"stroke-width": 1,
|
|
1881
|
+
"stroke-linecap": "round"
|
|
1882
|
+
}, null, 8, Mt))), 256)), (E(!0), b(g, null, O(Z.value, (e, t) => (E(), b("text", {
|
|
1883
|
+
class: "vue-data-ui-time-label",
|
|
1884
|
+
"font-size": z.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1885
|
+
"font-weight": z.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
|
|
1886
|
+
fill: z.value.style.chart.grid.y.axisLabels.color,
|
|
1887
|
+
"text-anchor": z.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : z.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
1888
|
+
transform: `translate(${e.horizontal_x}, ${G.value.bottom + z.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + z.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${z.value.style.chart.grid.x.timeLabels.rotation})`
|
|
1889
|
+
}, A(j(h)(z.value.style.chart.grid.y.axisLabels.formatter, e.value, j(r)({
|
|
1890
|
+
p: z.value.style.chart.bars.dataLabels.prefix,
|
|
1891
|
+
v: e.value,
|
|
1892
|
+
s: z.value.style.chart.bars.dataLabels.suffix,
|
|
1893
|
+
r: z.value.style.chart.grid.y.axisLabels.rounding
|
|
1894
|
+
}), { datapoint: e })), 9, Nt))), 256))], 512)) : y("", !0),
|
|
1895
|
+
z.value.style.chart.grid.x.timeLabels.show && z.value.orientation === "vertical" ? (E(), b("g", {
|
|
1896
|
+
key: 15,
|
|
1897
|
+
ref_key: "timeLabelsEls",
|
|
1898
|
+
ref: Nn
|
|
1899
|
+
}, [n.$slots["time-label"] ? (E(), b("g", Pt, [(E(!0), b(g, null, O(Ur.value, (e, t) => (E(), b("g", null, [k(n.$slots, "time-label", Ve({ ref_for: !0 }, {
|
|
1900
|
+
x: G.value.left + X.value * t + X.value / 2,
|
|
1901
|
+
y: G.value.bottom + z.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + z.value.style.chart.grid.x.timeLabels.offsetY,
|
|
1902
|
+
fontSize: z.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1903
|
+
fill: z.value.style.chart.grid.x.timeLabels.color,
|
|
1904
|
+
transform: `translate(${G.value.left + X.value * t + X.value / 2}, ${G.value.bottom + z.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + z.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${z.value.style.chart.grid.x.timeLabels.rotation})`,
|
|
1905
|
+
absoluteIndex: e.absoluteIndex,
|
|
1906
|
+
content: e.text,
|
|
1907
|
+
textAnchor: z.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : z.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
1908
|
+
show: !0
|
|
1909
|
+
}), void 0, !0)]))), 256))])) : (E(), b("g", Ft, [(E(!0), b(g, null, O(Ur.value, (e, n) => (E(), b("g", null, [String(e.text).includes("\n") ? (E(), b("text", {
|
|
1910
|
+
key: n + "-multi",
|
|
1911
|
+
"text-anchor": z.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : z.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
1912
|
+
"font-size": z.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1913
|
+
fill: z.value.style.chart.grid.x.timeLabels.color,
|
|
1914
|
+
transform: `
|
|
1915
|
+
translate(
|
|
1916
|
+
${G.value.left + X.value * n + X.value / 2},
|
|
1917
|
+
${G.value.bottom + z.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + z.value.style.chart.grid.x.timeLabels.offsetY}
|
|
1918
|
+
),
|
|
1919
|
+
rotate(${z.value.style.chart.grid.x.timeLabels.rotation})
|
|
1920
|
+
`,
|
|
1921
|
+
style: T({ cursor: B.value ? "pointer" : "default" }),
|
|
1922
|
+
innerHTML: j(t)({
|
|
1923
|
+
content: String(e.text),
|
|
1924
|
+
fontSize: z.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1925
|
+
fill: z.value.style.chart.grid.x.timeLabels.color,
|
|
1926
|
+
x: 0,
|
|
1927
|
+
y: 0
|
|
1928
|
+
}),
|
|
1929
|
+
onClick: () => Ci(e, n)
|
|
1930
|
+
}, null, 12, Lt)) : (E(), b("text", {
|
|
1931
|
+
class: "vue-data-ui-time-label",
|
|
1932
|
+
key: n,
|
|
1933
|
+
"text-anchor": z.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : z.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
1934
|
+
"font-size": z.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1935
|
+
"font-weight": z.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
|
|
1936
|
+
fill: z.value.style.chart.grid.x.timeLabels.color,
|
|
1937
|
+
transform: `translate(${G.value.left + X.value * n + X.value / 2}, ${G.value.bottom + z.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + z.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${z.value.style.chart.grid.x.timeLabels.rotation})`,
|
|
1938
|
+
style: T({ cursor: B.value ? "pointer" : "default" }),
|
|
1939
|
+
onClick: () => Ci(e, n)
|
|
1940
|
+
}, A(e.text), 13, It))]))), 256))]))], 512)) : y("", !0),
|
|
1941
|
+
z.value.style.chart.grid.x.timeLabels.show && z.value.orientation === "horizontal" ? (E(), b("g", {
|
|
1942
|
+
key: 16,
|
|
1943
|
+
ref_key: "timeLabelsEls",
|
|
1944
|
+
ref: Nn
|
|
1945
|
+
}, [n.$slots["time-label"] ? (E(), b("g", Rt, [(E(!0), b(g, null, O(Q.value, (e, t) => (E(), b("g", null, [k(n.$slots, "time-label", Ve({ ref_for: !0 }, {
|
|
1946
|
+
x: G.value.left - 8,
|
|
1947
|
+
y: G.value.top + X.value * t + X.value / 2 + z.value.style.chart.grid.y.axisLabels.fontSize / 3,
|
|
1948
|
+
fontSize: z.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1949
|
+
fill: z.value.style.chart.grid.x.timeLabels.color,
|
|
1950
|
+
transform: null,
|
|
1951
|
+
absoluteIndex: e.absoluteIndex,
|
|
1952
|
+
content: e.text,
|
|
1953
|
+
textAnchor: "end",
|
|
1954
|
+
show: !0
|
|
1955
|
+
}), void 0, !0)]))), 256))])) : (E(), b("g", zt, [(E(!0), b(g, null, O(Q.value, (e, t) => (E(), b("g", null, [String(e.text).includes("\n") ? (E(), b("text", {
|
|
1956
|
+
key: 1,
|
|
1957
|
+
"text-anchor": "end",
|
|
1958
|
+
"font-size": z.value.style.chart.grid.y.axisLabels.fontSize,
|
|
1959
|
+
"font-weight": z.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
|
|
1960
|
+
fill: z.value.style.chart.grid.y.axisLabels.color,
|
|
1961
|
+
x: G.value.left - 8,
|
|
1962
|
+
y: G.value.top + X.value * t + X.value / 2 + z.value.style.chart.grid.y.axisLabels.fontSize / 3,
|
|
1963
|
+
style: T({ cursor: B.value ? "pointer" : "default" }),
|
|
1964
|
+
onClick: () => Ci(e, t),
|
|
1965
|
+
innerHTML: j(f)({
|
|
1966
|
+
content: String(e.text),
|
|
1967
|
+
fontSize: z.value.style.chart.grid.y.axisLabels.fontSize,
|
|
1968
|
+
fill: z.value.style.chart.grid.y.axisLabels.color,
|
|
1969
|
+
x: G.value.left - 8,
|
|
1970
|
+
y: 0
|
|
1971
|
+
})
|
|
1972
|
+
}, null, 12, Vt)) : (E(), b("text", {
|
|
1973
|
+
key: 0,
|
|
1974
|
+
"text-anchor": "end",
|
|
1975
|
+
"font-size": z.value.style.chart.grid.y.axisLabels.fontSize,
|
|
1976
|
+
"font-weight": z.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
|
|
1977
|
+
fill: z.value.style.chart.grid.y.axisLabels.color,
|
|
1978
|
+
x: G.value.left - 8,
|
|
1979
|
+
y: G.value.top + X.value * t + X.value / 2 + z.value.style.chart.grid.y.axisLabels.fontSize / 3,
|
|
1980
|
+
style: T({ cursor: B.value ? "pointer" : "default" }),
|
|
1981
|
+
onClick: () => Ci(e, t)
|
|
1982
|
+
}, A(e.text), 13, Bt))]))), 256))]))], 512)) : y("", !0),
|
|
1983
|
+
V.value.showTooltip && z.value.orientation === "vertical" ? (E(!0), b(g, { key: 17 }, O(J.value.end - J.value.start, (e, t) => (E(), b("rect", {
|
|
1984
|
+
x: G.value.left + t * X.value,
|
|
1985
|
+
y: G.value.top,
|
|
1986
|
+
width: X.value,
|
|
1987
|
+
height: G.value.height < 0 ? 0 : G.value.height,
|
|
1988
|
+
onClick: () => Qr(t),
|
|
1989
|
+
onMouseenter: () => ri(t, "pointer"),
|
|
1990
|
+
onMouseleave: () => ei(t),
|
|
1991
|
+
fill: t === L.value || t === Kn.value ? z.value.style.chart.highlighter.color : "transparent",
|
|
1992
|
+
style: T({ opacity: z.value.style.chart.highlighter.opacity / 100 })
|
|
1993
|
+
}, null, 44, Ht))), 256)) : y("", !0),
|
|
1994
|
+
V.value.showTooltip && z.value.orientation === "horizontal" ? (E(!0), b(g, { key: 18 }, O(J.value.end - J.value.start, (e, t) => (E(), b("rect", {
|
|
1995
|
+
x: G.value.left,
|
|
1996
|
+
y: G.value.top + t * X.value,
|
|
1997
|
+
width: G.value.width < 0 ? 0 : G.value.width,
|
|
1998
|
+
height: X.value,
|
|
1999
|
+
onClick: () => Qr(t),
|
|
2000
|
+
onMouseenter: () => ri(t, "pointer"),
|
|
2001
|
+
onMouseleave: () => ei(t),
|
|
2002
|
+
fill: t === L.value || t === Kn.value ? z.value.style.chart.highlighter.color : "transparent",
|
|
2003
|
+
style: T({ opacity: z.value.style.chart.highlighter.opacity / 100 })
|
|
2004
|
+
}, null, 44, Ut))), 256)) : y("", !0),
|
|
2005
|
+
Dr.value ? (E(), b("rect", Ve({ key: 19 }, Tr.value, {
|
|
2006
|
+
"data-start": J.value.start,
|
|
2007
|
+
"data-end": J.value.end
|
|
2008
|
+
}), null, 16, Wt)) : y("", !0),
|
|
2009
|
+
k(n.$slots, "svg", { svg: {
|
|
2010
|
+
drawingArea: G.value,
|
|
2011
|
+
data: $.value,
|
|
2012
|
+
isPrintingImg: j(or) || j(sr) || On.value,
|
|
2013
|
+
isPrintingSvg: kn.value
|
|
2014
|
+
} }, void 0, !0)
|
|
2015
|
+
], 46, rt)), n.$slots.hint ? (E(), b("div", Gt, [k(n.$slots, "hint", w(C({
|
|
2016
|
+
hint: z.value.a11y.translations.keyboardNavigation,
|
|
2017
|
+
isVisible: qi.value
|
|
2018
|
+
})), void 0, !0)])) : y("", !0)]),
|
|
2019
|
+
n.$slots.watermark ? (E(), b("div", Kt, [k(n.$slots, "watermark", w(C({ isPrinting: j(or) || j(sr) || On.value || kn.value })), void 0, !0)])) : y("", !0),
|
|
2020
|
+
z.value.style.chart.zoom.show && dn.value && Li.value && q.value > 6 ? (E(), v(Ae, {
|
|
2021
|
+
key: 5,
|
|
2022
|
+
ref_key: "chartSlicer",
|
|
2023
|
+
ref: vn,
|
|
2024
|
+
allMinimaps: Ir.value,
|
|
2025
|
+
background: z.value.style.chart.zoom.color,
|
|
2026
|
+
borderColor: z.value.style.chart.backgroundColor,
|
|
2027
|
+
customFormat: z.value.style.chart.zoom.customFormat,
|
|
2028
|
+
cutNullValues: !1,
|
|
2029
|
+
forceZeroCenter: !0,
|
|
2030
|
+
enableRangeHandles: z.value.style.chart.zoom.enableRangeHandles,
|
|
2031
|
+
enableSelectionDrag: z.value.style.chart.zoom.enableSelectionDrag,
|
|
2032
|
+
end: J.value.end,
|
|
2033
|
+
focusOnDrag: z.value.style.chart.zoom.focusOnDrag,
|
|
2034
|
+
focusRangeRatio: z.value.style.chart.zoom.focusRangeRatio,
|
|
2035
|
+
fontSize: z.value.style.chart.zoom.fontSize,
|
|
2036
|
+
immediate: !z.value.style.chart.zoom.preview.enable,
|
|
2037
|
+
inputColor: z.value.style.chart.zoom.color,
|
|
2038
|
+
isPreview: Dr.value,
|
|
2039
|
+
labelLeft: z.value.style.chart.grid.x.timeLabels.values[J.value.start] ? Q.value?.[0]?.text ?? "" : "",
|
|
2040
|
+
labelRight: z.value.style.chart.grid.x.timeLabels.values[J.value.end - 1] ? Q.value?.at(-1)?.text ?? "" : "",
|
|
2041
|
+
max: Math.max(...e.dataset.map((e) => e.series.length)),
|
|
2042
|
+
min: 0,
|
|
2043
|
+
minimap: Fr.value,
|
|
2044
|
+
minimapCompact: z.value.style.chart.zoom.minimap.compact,
|
|
2045
|
+
minimapFrameColor: z.value.style.chart.zoom.minimap.frameColor,
|
|
2046
|
+
minimapIndicatorColor: z.value.style.chart.zoom.minimap.indicatorColor,
|
|
2047
|
+
minimapMerged: !1,
|
|
2048
|
+
minimapSelectedColor: z.value.style.chart.zoom.minimap.selectedColor,
|
|
2049
|
+
minimapSelectedColorOpacity: z.value.style.chart.zoom.minimap.selectedColorOpacity,
|
|
2050
|
+
minimapSelectedIndex: L.value,
|
|
2051
|
+
minimapSelectionRadius: 1,
|
|
2052
|
+
preciseLabels: qr.value.length ? qr.value : zr.value,
|
|
2053
|
+
refreshEndPoint: z.value.style.chart.zoom.endIndex === null ? Math.max(...e.dataset.map((e) => e.series.length)) : z.value.style.chart.zoom.endIndex + 1,
|
|
2054
|
+
refreshStartPoint: z.value.style.chart.zoom.startIndex === null ? 0 : z.value.style.chart.zoom.startIndex,
|
|
2055
|
+
selectColor: z.value.style.chart.zoom.highlightColor,
|
|
2056
|
+
selectedSeries: ti.value,
|
|
2057
|
+
smoothMinimap: !1,
|
|
2058
|
+
start: J.value.start,
|
|
2059
|
+
textColor: z.value.style.chart.color,
|
|
2060
|
+
timeLabels: zr.value,
|
|
2061
|
+
usePreciseLabels: z.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !z.value.style.chart.zoom.useDefaultFormat,
|
|
2062
|
+
valueEnd: J.value.end,
|
|
2063
|
+
valueStart: J.value.start,
|
|
2064
|
+
verticalHandles: z.value.style.chart.zoom.minimap.verticalHandles,
|
|
2065
|
+
maxWidth: z.value.style.chart.zoom.maxWidth,
|
|
2066
|
+
isCursorPointer: B.value,
|
|
2067
|
+
additionalMinimapHeight: z.value.style.chart.zoom.minimap.additionalHeight,
|
|
2068
|
+
handleType: z.value.style.chart.zoom.minimap.handleType,
|
|
2069
|
+
handleIconColor: z.value.style.chart.zoom.minimap.handleIconColor,
|
|
2070
|
+
handleBorderWidth: z.value.style.chart.zoom.minimap.handleBorderWidth,
|
|
2071
|
+
handleBorderColor: z.value.style.chart.zoom.minimap.handleBorderColor,
|
|
2072
|
+
handleFill: z.value.style.chart.zoom.minimap.handleFill,
|
|
2073
|
+
handleWidth: z.value.style.chart.zoom.minimap.handleWidth,
|
|
2074
|
+
"onUpdate:end": Vi,
|
|
2075
|
+
"onUpdate:start": Bi,
|
|
2076
|
+
onTrapMouse: Er,
|
|
2077
|
+
onReset: a[0] ||= () => Mr({ force: !0 }),
|
|
2078
|
+
onFutureEnd: a[1] ||= (e) => Or("end", e),
|
|
2079
|
+
onFutureStart: a[2] ||= (e) => Or("start", e)
|
|
2080
|
+
}, {
|
|
2081
|
+
"reset-action": M(({ reset: e }) => [k(n.$slots, "reset-action", w(C({ reset: e })), void 0, !0)]),
|
|
2082
|
+
slotMap: M(({ width: e, height: t, unitW: n }) => [(E(!0), b(g, null, O($.value, (e) => (E(), b("g", { key: e.id }, [(E(!0), b(g, null, O(e.xMinimap({
|
|
2083
|
+
left: 0,
|
|
2084
|
+
unitW: n
|
|
2085
|
+
}), (r, a) => (E(), b("rect", {
|
|
2086
|
+
key: a,
|
|
2087
|
+
x: a === 0 ? r - n * (z.value.style.chart.bars.gapRatio / 4) : r - n / 2,
|
|
2088
|
+
y: Math.max(0, Math.min(t, e.yMinimap({ minimapH: t })[a])),
|
|
2089
|
+
height: e.heightMinimap({ minimapH: t })[a],
|
|
2090
|
+
width: [0, q.value - 1].includes(a) ? n * (1 - z.value.style.chart.bars.gapRatio / 2) / 2 : n * (1 - z.value.style.chart.bars.gapRatio / 2),
|
|
2091
|
+
fill: z.value.style.chart.bars.gradient.show ? `url(#gradient_${e.id})` : e.color,
|
|
2092
|
+
stroke: z.value.style.chart.backgroundColor,
|
|
2093
|
+
"stroke-width": .5,
|
|
2094
|
+
rx: "0",
|
|
2095
|
+
"stroke-linecap": "round",
|
|
2096
|
+
"stroke-linejoin": "round",
|
|
2097
|
+
style: T({ opacity: a >= Y.value.start && a <= Y.value.end ? 1 : .62 })
|
|
2098
|
+
}, null, 12, qt))), 128))]))), 128))]),
|
|
2099
|
+
_: 3
|
|
2100
|
+
}, 8, /* @__PURE__ */ "allMinimaps.background.borderColor.customFormat.enableRangeHandles.enableSelectionDrag.end.focusOnDrag.focusRangeRatio.fontSize.immediate.inputColor.isPreview.labelLeft.labelRight.max.minimap.minimapCompact.minimapFrameColor.minimapIndicatorColor.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectedIndex.preciseLabels.refreshEndPoint.refreshStartPoint.selectColor.selectedSeries.start.textColor.timeLabels.usePreciseLabels.valueEnd.valueStart.verticalHandles.maxWidth.isCursorPointer.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth".split("."))) : y("", !0),
|
|
2101
|
+
Be(j(Zt), {
|
|
2102
|
+
teleportTo: z.value.style.chart.tooltip.teleportTo,
|
|
2103
|
+
show: V.value.showTooltip && fn.value,
|
|
2104
|
+
backgroundColor: z.value.style.chart.tooltip.backgroundColor,
|
|
2105
|
+
color: z.value.style.chart.tooltip.color,
|
|
2106
|
+
fontSize: z.value.style.chart.tooltip.fontSize,
|
|
2107
|
+
borderRadius: z.value.style.chart.tooltip.borderRadius,
|
|
2108
|
+
borderColor: z.value.style.chart.tooltip.borderColor,
|
|
2109
|
+
borderWidth: z.value.style.chart.tooltip.borderWidth,
|
|
2110
|
+
backgroundOpacity: z.value.style.chart.tooltip.backgroundOpacity,
|
|
2111
|
+
position: z.value.style.chart.tooltip.position,
|
|
2112
|
+
offsetX: z.value.style.chart.tooltip.offsetX,
|
|
2113
|
+
offsetY: z.value.style.chart.tooltip.offsetY,
|
|
2114
|
+
parent: P.value,
|
|
2115
|
+
content: mn.value,
|
|
2116
|
+
isFullscreen: bn.value,
|
|
2117
|
+
isCustom: j(ie)(z.value.style.chart.tooltip.customFormat),
|
|
2118
|
+
smooth: z.value.style.chart.tooltip.smooth,
|
|
2119
|
+
backdropFilter: z.value.style.chart.tooltip.backdropFilter,
|
|
2120
|
+
smoothForce: z.value.style.chart.tooltip.smoothForce,
|
|
2121
|
+
smoothSnapThreshold: z.value.style.chart.tooltip.smoothSnapThreshold,
|
|
2122
|
+
isA11yMode: Vn.value === "keyboard",
|
|
2123
|
+
a11yPosition: Bn.value
|
|
2124
|
+
}, {
|
|
2125
|
+
"tooltip-before": M(() => [k(n.$slots, "tooltip-before", w(C({ ...pn.value })), void 0, !0)]),
|
|
2126
|
+
tooltip: M(() => [k(n.$slots, "tooltip", w(C({ ...pn.value })), void 0, !0)]),
|
|
2127
|
+
"tooltip-after": M(() => [k(n.$slots, "tooltip-after", w(C({ ...pn.value })), void 0, !0)]),
|
|
2128
|
+
_: 3
|
|
2129
|
+
}, 8, [
|
|
2130
|
+
"teleportTo",
|
|
2131
|
+
"show",
|
|
2132
|
+
"backgroundColor",
|
|
2133
|
+
"color",
|
|
2134
|
+
"fontSize",
|
|
2135
|
+
"borderRadius",
|
|
2136
|
+
"borderColor",
|
|
2137
|
+
"borderWidth",
|
|
2138
|
+
"backgroundOpacity",
|
|
2139
|
+
"position",
|
|
2140
|
+
"offsetX",
|
|
2141
|
+
"offsetY",
|
|
2142
|
+
"parent",
|
|
2143
|
+
"content",
|
|
2144
|
+
"isFullscreen",
|
|
2145
|
+
"isCustom",
|
|
2146
|
+
"smooth",
|
|
2147
|
+
"backdropFilter",
|
|
2148
|
+
"smoothForce",
|
|
2149
|
+
"smoothSnapThreshold",
|
|
2150
|
+
"isA11yMode",
|
|
2151
|
+
"a11yPosition"
|
|
2152
|
+
]),
|
|
2153
|
+
x("div", { id: `legend-bottom-${F.value}` }, null, 8, Jt),
|
|
2154
|
+
Tn.value && (z.value.style.chart.legend.show || n.$slots.legend) ? (E(), v(Le, {
|
|
2155
|
+
key: 6,
|
|
2156
|
+
to: z.value.style.chart.legend.position === "top" ? `#legend-top-${F.value}` : `#legend-bottom-${F.value}`
|
|
2157
|
+
}, [x("div", {
|
|
2158
|
+
ref_key: "chartLegend",
|
|
2159
|
+
ref: _n
|
|
2160
|
+
}, [k(n.$slots, "legend", { legend: yi.value }, () => [z.value.style.chart.legend.show ? (E(), v(Fe, {
|
|
2161
|
+
key: 0,
|
|
2162
|
+
legendSet: yi.value,
|
|
2163
|
+
config: bi.value,
|
|
2164
|
+
isCursorPointer: B.value,
|
|
2165
|
+
onClickMarker: a[3] ||= ({ legend: e }) => e.segregate()
|
|
2166
|
+
}, Re({
|
|
2167
|
+
item: M(({ legend: e }) => [j(Jn) ? y("", !0) : (E(), b("div", {
|
|
2168
|
+
key: 0,
|
|
2169
|
+
onClick: (t) => e.segregate(),
|
|
2170
|
+
style: T(`opacity:${I.value.includes(e.id) ? .5 : 1}`)
|
|
2171
|
+
}, A(e.name), 13, Yt))]),
|
|
2172
|
+
legendToggle: M(() => [yi.value.length > 2 && z.value.style.chart.legend.selectAllToggle.show && !j(Jn) ? (E(), v(je, {
|
|
2173
|
+
key: 0,
|
|
2174
|
+
backgroundColor: z.value.style.chart.legend.selectAllToggle.backgroundColor,
|
|
2175
|
+
color: z.value.style.chart.legend.selectAllToggle.color,
|
|
2176
|
+
fontSize: z.value.style.chart.legend.fontSize,
|
|
2177
|
+
checked: I.value.length > 0,
|
|
2178
|
+
isCursorPointer: B.value,
|
|
2179
|
+
onToggle: mi
|
|
2180
|
+
}, null, 8, [
|
|
2181
|
+
"backgroundColor",
|
|
2182
|
+
"color",
|
|
2183
|
+
"fontSize",
|
|
2184
|
+
"checked",
|
|
2185
|
+
"isCursorPointer"
|
|
2186
|
+
])) : y("", !0)]),
|
|
2187
|
+
_: 2
|
|
2188
|
+
}, [n.$slots.pattern ? {
|
|
2189
|
+
name: "legend-pattern",
|
|
2190
|
+
fn: M(({ legend: e, index: t }) => [Be(Ee, {
|
|
2191
|
+
shape: e.shape,
|
|
2192
|
+
radius: 30,
|
|
2193
|
+
stroke: "none",
|
|
2194
|
+
plot: {
|
|
2195
|
+
x: 30,
|
|
2196
|
+
y: 30
|
|
2197
|
+
},
|
|
2198
|
+
fill: `url(#pattern_${F.value}_${t})`
|
|
2199
|
+
}, null, 8, ["shape", "fill"])]),
|
|
2200
|
+
key: "0"
|
|
2201
|
+
} : void 0]), 1032, [
|
|
2202
|
+
"legendSet",
|
|
2203
|
+
"config",
|
|
2204
|
+
"isCursorPointer"
|
|
2205
|
+
])) : y("", !0)], !0)], 512)], 8, ["to"])) : y("", !0),
|
|
2206
|
+
n.$slots.source ? (E(), b("div", {
|
|
2207
|
+
key: 7,
|
|
2208
|
+
ref_key: "source",
|
|
2209
|
+
ref: yn,
|
|
2210
|
+
dir: "auto"
|
|
2211
|
+
}, [k(n.$slots, "source", {}, void 0, !0)], 512)) : y("", !0),
|
|
2212
|
+
dn.value && z.value.userOptions.buttons.table ? (E(), v(Ke(Di.value.component), Ve({ key: 8 }, Di.value.props, {
|
|
2213
|
+
ref_key: "tableUnit",
|
|
2214
|
+
ref: En,
|
|
2215
|
+
onClose: Oi
|
|
2216
|
+
}), Re({
|
|
2217
|
+
content: M(() => [Be(j(en), {
|
|
2218
|
+
colNames: pi.value.colNames,
|
|
2219
|
+
head: pi.value.head,
|
|
2220
|
+
body: pi.value.body,
|
|
2221
|
+
config: pi.value.config,
|
|
2222
|
+
title: z.value.table.useDialog ? "" : Di.value.title,
|
|
2223
|
+
withCloseButton: !z.value.table.useDialog,
|
|
2224
|
+
isCursorPointer: B.value,
|
|
2225
|
+
onClose: Oi
|
|
2226
|
+
}, {
|
|
2227
|
+
th: M(({ th: e }) => [x("div", { innerHTML: e }, null, 8, Xt)]),
|
|
2228
|
+
td: M(({ td: e }) => [ze(A(isNaN(Number(e)) ? e : j(r)({
|
|
2229
|
+
p: z.value.style.chart.bars.dataLabels.prefix,
|
|
2230
|
+
v: e,
|
|
2231
|
+
s: z.value.style.chart.bars.dataLabels.suffix,
|
|
2232
|
+
r: z.value.table.td.roundingValue
|
|
2233
|
+
})), 1)]),
|
|
2234
|
+
_: 1
|
|
2235
|
+
}, 8, [
|
|
2236
|
+
"colNames",
|
|
2237
|
+
"head",
|
|
2238
|
+
"body",
|
|
2239
|
+
"config",
|
|
2240
|
+
"title",
|
|
2241
|
+
"withCloseButton",
|
|
2242
|
+
"isCursorPointer"
|
|
2243
|
+
])]),
|
|
2244
|
+
_: 2
|
|
2245
|
+
}, [z.value.table.useDialog ? {
|
|
2246
|
+
name: "title",
|
|
2247
|
+
fn: M(() => [ze(A(Di.value.title), 1)]),
|
|
2248
|
+
key: "0"
|
|
2249
|
+
} : void 0, z.value.table.useDialog ? {
|
|
2250
|
+
name: "actions",
|
|
2251
|
+
fn: M(() => [x("button", {
|
|
2252
|
+
tabindex: "0",
|
|
2253
|
+
class: "vue-ui-user-options-button",
|
|
2254
|
+
onClick: a[4] ||= (e) => fi(z.value.userOptions.callbacks.csv),
|
|
2255
|
+
style: T({ cursor: B.value ? "pointer" : "default" })
|
|
2256
|
+
}, [Be(j(Qt), {
|
|
2257
|
+
name: "fileCsv",
|
|
2258
|
+
stroke: Di.value.props.color
|
|
2259
|
+
}, null, 8, ["stroke"])], 4)]),
|
|
2260
|
+
key: "1"
|
|
2261
|
+
} : void 0]), 1040)) : y("", !0),
|
|
2262
|
+
k(n.$slots, "skeleton", {}, () => [j(Jn) ? (E(), v(ve, { key: 0 })) : y("", !0)], !0)
|
|
2263
|
+
], 46, $e));
|
|
2264
|
+
}
|
|
2265
|
+
}, [["__scopeId", "data-v-058f7b78"]]);
|
|
2266
|
+
//#endregion
|
|
2267
|
+
export { Qe as n, Zt as t };
|