vue-data-ui 3.15.12 → 3.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +132 -59
- package/dist/A11yDataTable-KcVAX2cP.js +54 -0
- package/dist/{Arrow-DlPyR6HQ.js → Arrow-Bn-9n3bm.js} +1 -1
- package/dist/{BaseDraggableDialog-DSpKTn3R.js → BaseDraggableDialog-CIb-iD9g.js} +2 -2
- package/dist/{BaseIcon-CNx8Tzl5.js → BaseIcon-Cb3zzG6s.js} +1 -1
- package/dist/{BaseLegendToggle-Y61xahI4.js → BaseLegendToggle-BQVIawmA.js} +1 -1
- package/dist/{BaseZoomControls-CoFievy9.js → BaseZoomControls-DievbOeJ.js} +2 -2
- package/dist/ColorPicker-B0mV4xzu.js +255 -0
- package/dist/{DataTable-Bo1pmAqG.js → DataTable-DT2kIdQ6.js} +2 -2
- package/dist/Legend-CS7Xo5LK.js +101 -0
- package/dist/{NonSvgPenAndPaper-CGk_xThe.js → NonSvgPenAndPaper-VyJFyJ6X.js} +3 -3
- package/dist/{PackageVersion-DN9d0ME5.js → PackageVersion-DPO-OOVI.js} +1 -1
- package/dist/{PenAndPaper-DWV1FMIi.js → PenAndPaper-Ct3qJ4lA.js} +109 -101
- package/dist/{Shape-CSyWYgXc.js → Shape-BKRUOeKk.js} +1 -1
- package/dist/{Slicer-DZJA9IG-.js → Slicer-DUycDH_N.js} +2 -2
- package/dist/{SlicerPreview-I2J0UUF_.js → SlicerPreview-DTjwV0iY.js} +2 -2
- package/dist/{SparkTooltip-BiseJed3.js → SparkTooltip-BorBpltj.js} +1 -1
- package/dist/{Title-BfyrP-jp.js → Title-BeMKE1cj.js} +1 -1
- package/dist/{Tooltip-DL3QgjZf.js → Tooltip-Bf-kM3_A.js} +86 -68
- package/dist/{UserOptions-CrLqEimB.js → UserOptions-rW2fRf3V.js} +228 -222
- package/dist/components/arrow.js +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{dom-to-png-BAqzNjb1.js → dom-to-png-CtxhhdWb.js} +1 -1
- package/dist/{exposedLib-H4lmBl1t.js → exposedLib-DlqmhBx3.js} +1 -1
- package/dist/{img-BYYzY_QU.js → img-LXxMLmCg.js} +1 -1
- package/dist/{labelUtils-CTXUc3V9.js → labelUtils-CqTHa20R.js} +1 -1
- package/dist/{lib-GwPnJSrY.js → lib-DBptbyyI.js} +106 -84
- package/dist/{pdf-z-YiJeJQ.js → pdf-B4tTdfvl.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +59 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-80fzdfxt.js → useAutoSizeLabelsInsideViewbox-DX7LdvFX.js} +1 -1
- package/dist/{useConfig-CIgyKZ6R.js → useConfig-DO94Aj5s.js} +953 -700
- package/dist/{useNestedProp-BBT0mbHh.js → useNestedProp-Bf5XFbs8.js} +1 -1
- package/dist/{useObjectBindings-BlXBVtRa.js → useObjectBindings-DQ8g8Jwi.js} +1 -1
- package/dist/usePrefersMotion-CUKm8_t8.js +15 -0
- package/dist/{usePrinter-DiK5R6k-.js → usePrinter-CEpYU3r5.js} +2 -2
- package/dist/utils.js +3 -3
- package/dist/{vue-data-ui-C2kPofmi.js → vue-data-ui-DXGkXRnC.js} +68 -68
- package/dist/vue-data-ui.js +72 -72
- package/dist/vue-ui-3d-bar-BaFpQnd5.js +1597 -0
- package/dist/{vue-ui-accordion-BGHTqIBt.js → vue-ui-accordion-nvggWcGN.js} +4 -4
- package/dist/vue-ui-age-pyramid-CRM498Pc.js +1069 -0
- package/dist/{vue-ui-annotator-B1GWVtPp.js → vue-ui-annotator-CkPi9moo.js} +7 -7
- package/dist/{vue-ui-bullet-DPoGGtaG.js → vue-ui-bullet-BBiwof3c.js} +158 -150
- package/dist/vue-ui-bump-Brxpu4xV.js +1147 -0
- package/dist/vue-ui-candlestick-DAnZv77-.js +1587 -0
- package/dist/{vue-ui-carousel-table-CmiHTJ8E.js → vue-ui-carousel-table-BHRZBYY0.js} +168 -160
- package/dist/vue-ui-chestnut-CbrYnRgm.js +1812 -0
- package/dist/vue-ui-chord-CaX_IUVs.js +1326 -0
- package/dist/vue-ui-circle-pack-CR3h53sc.js +988 -0
- package/dist/{vue-ui-cursor-B4mHR7QC.js → vue-ui-cursor-Cjfazw7Z.js} +4 -4
- package/dist/vue-ui-dag-B9vH3c66.js +3047 -0
- package/dist/{vue-ui-dashboard-Bo5FX73U.js → vue-ui-dashboard-DWll05qs.js} +70 -70
- package/dist/{vue-ui-digits-mpo2IcM5.js → vue-ui-digits-DcM67rMx.js} +76 -66
- package/dist/vue-ui-donut-Be5G38P5.js +2229 -0
- package/dist/vue-ui-donut-evolution-BLSesj3c.js +1358 -0
- package/dist/vue-ui-dumbbell-DIMiCY4r.js +1380 -0
- package/dist/vue-ui-flow-zvZylhgr.js +1202 -0
- package/dist/{vue-ui-funnel-BRkaEkBb.js → vue-ui-funnel-CSri-oWm.js} +7 -7
- package/dist/vue-ui-galaxy-CGykxsAI.js +1012 -0
- package/dist/{vue-ui-gauge-J2VYHsQe.js → vue-ui-gauge-D1MNB9Jq.js} +8 -8
- package/dist/vue-ui-geo-DdJDGhG2.js +1437 -0
- package/dist/{vue-ui-gizmo-DEec3-v9.js → vue-ui-gizmo-BZYRHGFm.js} +77 -68
- package/dist/vue-ui-heatmap-CryOx6XK.js +1500 -0
- package/dist/vue-ui-history-plot-C85iw9Kl.js +1449 -0
- package/dist/vue-ui-horizontal-bar-BoBZOybC.js +1637 -0
- package/dist/vue-ui-kpi-DHrolXw6.js +109 -0
- package/dist/{vue-ui-mini-loader-CoOHvZUk.js → vue-ui-mini-loader-Bc3fEQ9j.js} +3 -3
- package/dist/{vue-ui-molecule-Chq1qWDK.js → vue-ui-molecule-DJ_BQ4DK.js} +6 -6
- package/dist/vue-ui-mood-radar-CBE02TpQ.js +1086 -0
- package/dist/vue-ui-nested-donuts-YTFtb4CL.js +1595 -0
- package/dist/vue-ui-onion-B9l81-PS.js +1124 -0
- package/dist/vue-ui-parallel-coordinate-plot-C1e_rs8J.js +1252 -0
- package/dist/vue-ui-quadrant-C1qsLCRn.js +1759 -0
- package/dist/vue-ui-quick-chart-DFoz3WiA.js +2216 -0
- package/dist/vue-ui-radar-Cmo3p-UA.js +1139 -0
- package/dist/{vue-ui-rating-zV58MDQh.js → vue-ui-rating-BAHhYt_A.js} +3 -3
- package/dist/vue-ui-relation-circle-BqwznVwf.js +782 -0
- package/dist/vue-ui-ridgeline-CDk9eXJq.js +1473 -0
- package/dist/vue-ui-rings-BRkGoQdL.js +1156 -0
- package/dist/vue-ui-scatter-BxDtWASQ.js +1831 -0
- package/dist/{vue-ui-skeleton-CbqNz9IE.js → vue-ui-skeleton-D6kTb9aO.js} +4 -4
- package/dist/{vue-ui-smiley-BK5EKp9u.js → vue-ui-smiley-CzVaLlpB.js} +3 -3
- package/dist/vue-ui-spark-trend-D8Mf2A1w.js +378 -0
- package/dist/{vue-ui-sparkbar-DUDWvTo-.js → vue-ui-sparkbar-BbYj56c3.js} +86 -84
- package/dist/vue-ui-sparkgauge-DXzOSLRb.js +256 -0
- package/dist/vue-ui-sparkhistogram-DMfSx1iH.js +474 -0
- package/dist/vue-ui-sparkline-D-rQ9PsC.js +1327 -0
- package/dist/vue-ui-sparkstackbar-DK5n8IKP.js +621 -0
- package/dist/vue-ui-stackbar-BHthy6jf.js +2070 -0
- package/dist/vue-ui-stackline-C6-WNpKD.js +2164 -0
- package/dist/vue-ui-strip-plot-CHu-1ilI.js +1183 -0
- package/dist/{vue-ui-table-BHuXI4Eq.js → vue-ui-table-DW9JGsLq.js} +6 -6
- package/dist/{vue-ui-table-heatmap-y88sBfu3.js → vue-ui-table-heatmap-LYqoBit9.js} +6 -6
- package/dist/{vue-ui-table-sparkline-ClpLLKi2.js → vue-ui-table-sparkline-CXK1dFr-.js} +5 -5
- package/dist/{vue-ui-thermometer-sjruUGQx.js → vue-ui-thermometer-BN8tflOz.js} +272 -256
- package/dist/{vue-ui-timer-CgdgMKIc.js → vue-ui-timer-DGT0UBOF.js} +6 -6
- package/dist/{vue-ui-tiremarks-UBDpAIVr.js → vue-ui-tiremarks-BZ-osQqY.js} +204 -191
- package/dist/vue-ui-treemap-98KaVRyd.js +1723 -0
- package/dist/vue-ui-waffle-Cb7oJnIc.js +1321 -0
- package/dist/vue-ui-wheel-sfew1fjw.js +738 -0
- package/dist/vue-ui-word-cloud-vq1t9JHr.js +1548 -0
- package/dist/{vue-ui-world-D-3wgoTn.js → vue-ui-world-CN0f6elD.js} +8 -8
- package/dist/vue-ui-xy-BdzEiImZ.js +3877 -0
- package/dist/vue-ui-xy-canvas-CWQzUQzY.js +1810 -0
- package/package.json +2 -2
- package/dist/ColorPicker-j0ySewhI.js +0 -244
- package/dist/Legend-1LMMsPxL.js +0 -90
- package/dist/vue-ui-3d-bar-BhNgFaJA.js +0 -1484
- package/dist/vue-ui-age-pyramid-CuYRf5v-.js +0 -997
- package/dist/vue-ui-bump-C_fKharc.js +0 -1059
- package/dist/vue-ui-candlestick-BY-_E7eZ.js +0 -1487
- package/dist/vue-ui-chestnut-C-bQYaNI.js +0 -1557
- package/dist/vue-ui-chord-uQYQgyGM.js +0 -1220
- package/dist/vue-ui-circle-pack-CdbDcuDw.js +0 -907
- package/dist/vue-ui-dag-DsHUvjvm.js +0 -2885
- package/dist/vue-ui-donut-CzCgCVsx.js +0 -2139
- package/dist/vue-ui-donut-evolution-C_ck_TOR.js +0 -1297
- package/dist/vue-ui-dumbbell-CVSA90b2.js +0 -1293
- package/dist/vue-ui-flow-CsbSaFnu.js +0 -1075
- package/dist/vue-ui-galaxy-DWKHDciu.js +0 -914
- package/dist/vue-ui-geo-DykhEWVq.js +0 -1331
- package/dist/vue-ui-heatmap-BEDirv8T.js +0 -1334
- package/dist/vue-ui-history-plot-Bs96PebH.js +0 -1292
- package/dist/vue-ui-horizontal-bar-ClQcB9nL.js +0 -1522
- package/dist/vue-ui-kpi-DlUEHKuw.js +0 -101
- package/dist/vue-ui-mood-radar-A2LBLgUi.js +0 -967
- package/dist/vue-ui-nested-donuts-DFX251aT.js +0 -1513
- package/dist/vue-ui-onion-CW0YO9Ro.js +0 -1045
- package/dist/vue-ui-parallel-coordinate-plot-UFg10bHP.js +0 -1134
- package/dist/vue-ui-quadrant-C1pLW2zA.js +0 -1647
- package/dist/vue-ui-quick-chart-FaxttnJY.js +0 -2030
- package/dist/vue-ui-radar-DE70LPBZ.js +0 -1067
- package/dist/vue-ui-relation-circle-iuRXIyRU.js +0 -704
- package/dist/vue-ui-ridgeline-CwvDh5pG.js +0 -1385
- package/dist/vue-ui-rings-80ZUki42.js +0 -1083
- package/dist/vue-ui-scatter-FdAAYJOK.js +0 -1670
- package/dist/vue-ui-spark-trend-C68p8-Xp.js +0 -349
- package/dist/vue-ui-sparkgauge-DdRtHQDe.js +0 -245
- package/dist/vue-ui-sparkhistogram-C9DvzQae.js +0 -396
- package/dist/vue-ui-sparkline-B2RDrdiR.js +0 -1273
- package/dist/vue-ui-sparkstackbar-BsIOHUE5.js +0 -475
- package/dist/vue-ui-stackbar-BZl0kEkb.js +0 -2001
- package/dist/vue-ui-stackline-2VKxwFei.js +0 -2099
- package/dist/vue-ui-strip-plot-B9nBSRyY.js +0 -1080
- package/dist/vue-ui-treemap-BS5EilZf.js +0 -1645
- package/dist/vue-ui-waffle-CbX5K9Q2.js +0 -1211
- package/dist/vue-ui-wheel-BIJ09H5D.js +0 -723
- package/dist/vue-ui-word-cloud-DJmJ-oYT.js +0 -1466
- package/dist/vue-ui-xy-canvas-4auyhlTr.js +0 -1717
- package/dist/vue-ui-xy-f67V1xjd.js +0 -3713
|
@@ -1,1211 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent as V, useSlots as al, computed as c, ref as r, toRefs as ol, watch as le, shallowRef as vt, onMounted as nl, onBeforeUnmount as ul, openBlock as s, createElementBlock as v, unref as d, normalizeStyle as ae, normalizeClass as dt, createBlock as B, withCtx as h, renderSlot as p, normalizeProps as $, guardReactiveProps as x, createCommentVNode as b, createElementVNode as k, createSlots as Fe, createVNode as de, Fragment as S, renderList as N, mergeProps as De, toDisplayString as he, Teleport as sl, resolveDynamicComponent as rl, createTextVNode as ht, nextTick as pt } from "vue";
|
|
2
|
-
import { j as il, t as ft, m as cl, p as E, o as gt, q as ze, r as vl, n as dl, k as oe, l as F, X as hl, u as pl, v as fl, W as gl, s as yl, a0 as ml, a1 as bl, a as wl, T as kl, U as Cl } from "./lib-GwPnJSrY.js";
|
|
3
|
-
import { b as $l } from "./labelUtils-CTXUc3V9.js";
|
|
4
|
-
import { t as xl, u as Tl } from "./useResponsive-DfdjqQps.js";
|
|
5
|
-
import { u as Sl } from "./useConfig-CIgyKZ6R.js";
|
|
6
|
-
import { u as Al, B as Pl } from "./BaseScanner-BhhkKVoj.js";
|
|
7
|
-
import { u as Il } from "./usePrinter-DiK5R6k-.js";
|
|
8
|
-
import { u as Ol } from "./useSvgExport-ByUukOZt.js";
|
|
9
|
-
import { u as Ve } from "./useNestedProp-BBT0mbHh.js";
|
|
10
|
-
import { u as _l } from "./useThemeCheck-D1ZYXUwG.js";
|
|
11
|
-
import { u as Ll } from "./useUserOptionState-BIvW1Kz7.js";
|
|
12
|
-
import { u as Bl } from "./useChartAccessibility-9icAAmYg.js";
|
|
13
|
-
import Fl from "./img-BYYzY_QU.js";
|
|
14
|
-
import { _ as Dl } from "./Shape-CSyWYgXc.js";
|
|
15
|
-
import zl from "./Title-BfyrP-jp.js";
|
|
16
|
-
import Vl from "./vue_ui_waffle-M2h-uJQ_.js";
|
|
17
|
-
import Nl from "./Legend-1LMMsPxL.js";
|
|
18
|
-
import { B as Ml } from "./BaseLegendToggle-Y61xahI4.js";
|
|
19
|
-
import { _ as Rl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
20
|
-
const Ul = ["id"], El = ["id"], Wl = ["xmlns", "viewBox"], Gl = ["id"], jl = ["stop-color"], Hl = ["stop-color"], ql = ["id"], Xl = ["x", "y", "height", "width"], Yl = ["height", "width"], Jl = { key: 0 }, Kl = ["rx", "x", "y", "height", "width", "stroke", "stroke-width", "filter"], Ql = ["rx", "x", "y", "height", "width", "fill", "stroke", "stroke-width", "filter"], Zl = { key: 1 }, ea = ["rx", "x", "y", "height", "width", "fill", "filter"], ta = ["textContent", "x", "y", "font-size", "fill", "filter"], la = ["x", "y", "height", "width", "onMouseover", "onMouseleave", "onClick"], aa = {
|
|
21
|
-
key: 4,
|
|
22
|
-
class: "vue-data-ui-watermark"
|
|
23
|
-
}, oa = ["id"], na = ["onClick"], ua = ["innerHTML"], sa = {
|
|
24
|
-
__name: "vue-ui-waffle",
|
|
25
|
-
props: {
|
|
26
|
-
config: {
|
|
27
|
-
type: Object,
|
|
28
|
-
default() {
|
|
29
|
-
return {};
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
dataset: {
|
|
33
|
-
type: Array,
|
|
34
|
-
default() {
|
|
35
|
-
return [];
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
emits: ["selectLegend", "copyAlt"],
|
|
40
|
-
setup(yt, { expose: mt, emit: bt }) {
|
|
41
|
-
const wt = V(() => import("./Tooltip-DL3QgjZf.js")), kt = V(() => import("./BaseIcon-CNx8Tzl5.js")), Ct = V(() => import("./DataTable-Bo1pmAqG.js")), $t = V(() => import("./vue-ui-accordion-BGHTqIBt.js")), xt = V(() => import("./UserOptions-CrLqEimB.js")), Tt = V(() => import("./PenAndPaper-DWV1FMIi.js")), St = V(() => import("./PackageVersion-DN9d0ME5.js")), At = V(() => import("./BaseDraggableDialog-DSpKTn3R.js")), { vue_ui_waffle: Pt } = Sl(), { isThemeValid: It, warnInvalidTheme: Ot } = _l(), y = yt, _t = al(), pe = c({
|
|
42
|
-
get() {
|
|
43
|
-
return !!y.dataset && y.dataset.length;
|
|
44
|
-
},
|
|
45
|
-
set(t) {
|
|
46
|
-
return t;
|
|
47
|
-
}
|
|
48
|
-
}), m = r(il()), fe = r(!1), ge = r(""), W = r(null), Ne = r(0), A = r(null), Me = r(null), Re = r(null), Ue = r(null), Ee = r(null), We = r(0), Ge = r(0), je = r(0), He = r(!1), Y = r(null), ye = r(null), ne = r(!1), ue = r(!1), e = r(Ce()), M = c(() => e.value.userOptions.useCursorPointer), Lt = c(() => ft({
|
|
49
|
-
defaultConfig: {
|
|
50
|
-
useCustomCells: !1,
|
|
51
|
-
userOptions: { show: !1 },
|
|
52
|
-
table: { show: !1 },
|
|
53
|
-
style: {
|
|
54
|
-
chart: {
|
|
55
|
-
backgroundColor: "#99999930",
|
|
56
|
-
layout: {
|
|
57
|
-
labels: {
|
|
58
|
-
captions: { show: !1 }
|
|
59
|
-
},
|
|
60
|
-
rect: {
|
|
61
|
-
stroke: "#999999"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
legend: {
|
|
65
|
-
backgroundColor: "transparent",
|
|
66
|
-
showValue: !1,
|
|
67
|
-
showPercentage: !1
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
userConfig: e.value.skeletonConfig ?? {}
|
|
73
|
-
})), { loading: me, FINAL_DATASET: G, manualLoading: be } = Al({
|
|
74
|
-
...ol(y),
|
|
75
|
-
FINAL_CONFIG: e,
|
|
76
|
-
prepareConfig: Ce,
|
|
77
|
-
callback: () => {
|
|
78
|
-
Promise.resolve().then(async () => {
|
|
79
|
-
g.value = Te();
|
|
80
|
-
});
|
|
81
|
-
},
|
|
82
|
-
skeletonDataset: y.config?.skeletonDataset ?? [
|
|
83
|
-
{
|
|
84
|
-
name: "",
|
|
85
|
-
values: [1],
|
|
86
|
-
color: "#AAAAAA"
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
name: "",
|
|
90
|
-
values: [1],
|
|
91
|
-
color: "#BABABA"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
name: "",
|
|
95
|
-
values: [1],
|
|
96
|
-
color: "#CACACA"
|
|
97
|
-
}
|
|
98
|
-
],
|
|
99
|
-
skeletonConfig: ft({
|
|
100
|
-
defaultConfig: e.value,
|
|
101
|
-
userConfig: Lt.value
|
|
102
|
-
})
|
|
103
|
-
}), { userOptionsVisible: we, setUserOptionsVisibility: qe, keepUserOptionState: Xe } = Ll({ config: e.value }), { svgRef: ke } = Bl({ config: e.value.style.chart.title });
|
|
104
|
-
function Ce() {
|
|
105
|
-
const t = Ve({
|
|
106
|
-
userConfig: y.config,
|
|
107
|
-
defaultConfig: Pt
|
|
108
|
-
}), a = t.theme;
|
|
109
|
-
if (!a) return t;
|
|
110
|
-
if (!It.value(t))
|
|
111
|
-
return Ot(t), t;
|
|
112
|
-
const l = Ve({
|
|
113
|
-
userConfig: Vl[a] || y.config,
|
|
114
|
-
defaultConfig: t
|
|
115
|
-
}), o = Ve({
|
|
116
|
-
userConfig: y.config,
|
|
117
|
-
defaultConfig: l
|
|
118
|
-
});
|
|
119
|
-
return {
|
|
120
|
-
...o,
|
|
121
|
-
customPalette: o.customPalette.length ? o.customPalette : cl[a] || E
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
le(() => y.config, (t) => {
|
|
125
|
-
me.value || (e.value = Ce()), we.value = !e.value.userOptions.showOnChartHover, Je(), We.value += 1, Ge.value += 1, je.value += 1, C.value.showTable = e.value.table.show, C.value.showTooltip = e.value.style.chart.tooltip.show;
|
|
126
|
-
}, { deep: !0 });
|
|
127
|
-
const D = vt(null), j = vt(null), Ye = c(() => !!e.value.debug);
|
|
128
|
-
function Je() {
|
|
129
|
-
if (gt(y.dataset) ? (ze({
|
|
130
|
-
componentName: "VueUiWaffle",
|
|
131
|
-
type: "dataset",
|
|
132
|
-
debug: Ye.value
|
|
133
|
-
}), pe.value = !1, be.value = !0) : y.dataset.forEach((t, a) => {
|
|
134
|
-
vl({
|
|
135
|
-
datasetObject: t,
|
|
136
|
-
requiredAttributes: ["name", "values"]
|
|
137
|
-
}).forEach((l) => {
|
|
138
|
-
ze({
|
|
139
|
-
componentName: "VueUiWaffle",
|
|
140
|
-
type: "datasetSerieAttribute",
|
|
141
|
-
property: l,
|
|
142
|
-
index: a,
|
|
143
|
-
debug: Ye.value
|
|
144
|
-
});
|
|
145
|
-
});
|
|
146
|
-
}), gt(y.dataset) || (be.value = e.value.loading), e.value.responsive) {
|
|
147
|
-
const t = xl(() => {
|
|
148
|
-
const { width: a, height: l } = Tl({
|
|
149
|
-
chart: A.value,
|
|
150
|
-
title: e.value.style.chart.title.text ? Me.value : null,
|
|
151
|
-
legend: e.value.style.chart.legend.show ? Re.value : null,
|
|
152
|
-
source: Ue.value,
|
|
153
|
-
noTitle: Ee.value
|
|
154
|
-
});
|
|
155
|
-
requestAnimationFrame(() => {
|
|
156
|
-
R.value.width = a, R.value.height = l, P.value.width = a, P.value.height = l;
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
D.value && (j.value && D.value.unobserve(j.value), D.value.disconnect()), D.value = new ResizeObserver(t), j.value = A.value.parentNode, D.value.observe(j.value);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
nl(() => {
|
|
163
|
-
He.value = !0, Je();
|
|
164
|
-
}), ul(() => {
|
|
165
|
-
D.value && (j.value && D.value.unobserve(j.value), D.value.disconnect());
|
|
166
|
-
});
|
|
167
|
-
const { isPrinting: $e, isImaging: xe, generatePdf: Ke, generateImage: Qe } = Il({
|
|
168
|
-
elementId: `vue-ui-waffle_${m.value}`,
|
|
169
|
-
fileName: e.value.style.chart.title.text || "vue-ui-waffle",
|
|
170
|
-
options: e.value.userOptions.print
|
|
171
|
-
}), Bt = c(() => e.value.userOptions.show && !e.value.style.chart.title.text), Ze = c(() => dl(e.value.customPalette)), C = r({
|
|
172
|
-
showTable: e.value.table.show,
|
|
173
|
-
showTooltip: e.value.style.chart.tooltip.show
|
|
174
|
-
});
|
|
175
|
-
le(e, () => {
|
|
176
|
-
C.value = {
|
|
177
|
-
showTable: e.value.table.show,
|
|
178
|
-
showTooltip: e.value.style.chart.tooltip.show
|
|
179
|
-
};
|
|
180
|
-
}, { immediate: !0 });
|
|
181
|
-
const R = r({
|
|
182
|
-
height: 512,
|
|
183
|
-
width: 512
|
|
184
|
-
}), P = r({
|
|
185
|
-
top: 0,
|
|
186
|
-
left: 0,
|
|
187
|
-
height: 512,
|
|
188
|
-
width: 512
|
|
189
|
-
}), I = c(() => (P.value.width - e.value.style.chart.layout.grid.size * e.value.style.chart.layout.grid.spaceBetween) / e.value.style.chart.layout.grid.size), O = c(() => (P.value.height - e.value.style.chart.layout.grid.size * e.value.style.chart.layout.grid.spaceBetween) / e.value.style.chart.layout.grid.size), Ft = c(() => Math.max(1e-4, P.value.width / e.value.style.chart.layout.grid.size)), et = c(() => Math.max(1e-4, P.value.height / e.value.style.chart.layout.grid.size));
|
|
190
|
-
function tt(t) {
|
|
191
|
-
const a = e.value.style.chart.layout.grid.size * e.value.style.chart.layout.grid.size, l = t.reduce((T, Be) => T + Be, 0), o = t.map((T) => T / l * a), n = o.map(Math.floor), u = o.map((T) => T % 1);
|
|
192
|
-
let w = a - n.reduce((T, Be) => T + Be, 0);
|
|
193
|
-
for (; w > 0; ) {
|
|
194
|
-
let T = u.indexOf(Math.max(...u));
|
|
195
|
-
n[T] += 1, u[T] = 0, w -= 1;
|
|
196
|
-
}
|
|
197
|
-
return n;
|
|
198
|
-
}
|
|
199
|
-
const J = r(!1);
|
|
200
|
-
function Te() {
|
|
201
|
-
return J.value = G.value.flatMap((t) => t.values.reduce((a, l) => a + l, 0)).reduce((t, a) => t + a, 0) === 0, G.value.map((t, a) => ({
|
|
202
|
-
...t,
|
|
203
|
-
color: yl(t.color) || Ze.value[a] || E[a] || E[a % E.length],
|
|
204
|
-
uid: `serie_${a}`,
|
|
205
|
-
absoluteIndex: a
|
|
206
|
-
}));
|
|
207
|
-
}
|
|
208
|
-
const se = c(() => Te()), g = r(se.value);
|
|
209
|
-
le(() => y.dataset, (t) => {
|
|
210
|
-
Array.isArray(t) && t.length > 0 && (be.value = !1);
|
|
211
|
-
}, { immediate: !0 }), le(() => y.dataset, (t) => {
|
|
212
|
-
g.value = Te();
|
|
213
|
-
}, { deep: !0 });
|
|
214
|
-
const Dt = c(() => {
|
|
215
|
-
const t = g.value.filter((a, l) => !f.value.includes(a.uid)).map((a, l) => J.value ? 1 : (a.values || []).reduce((o, n) => o + n, 0));
|
|
216
|
-
return tt(t);
|
|
217
|
-
}), zt = c(() => {
|
|
218
|
-
const t = g.value.map((a, l) => J.value ? 1 : (a.values || []).reduce((o, n) => o + n));
|
|
219
|
-
return tt(t);
|
|
220
|
-
}), H = c(() => (G.value.forEach((t, a) => {
|
|
221
|
-
[null, void 0].includes(t.values) && ze({
|
|
222
|
-
componentName: "VueUiWaffle",
|
|
223
|
-
type: "datasetSerieAttribute",
|
|
224
|
-
property: "values (number[])",
|
|
225
|
-
index: a
|
|
226
|
-
});
|
|
227
|
-
}), g.value.filter((t, a) => !f.value.includes(t.uid)).map((t, a) => ({
|
|
228
|
-
absoluteIndex: t.absoluteIndex,
|
|
229
|
-
uid: t.uid,
|
|
230
|
-
name: t.name,
|
|
231
|
-
color: t.color,
|
|
232
|
-
value: (t.values || []).reduce((l, o) => l + o, 0),
|
|
233
|
-
absoluteValues: t.values || [],
|
|
234
|
-
proportion: Dt.value[a]
|
|
235
|
-
})))), Se = c(() => g.value.map((t, a) => ({
|
|
236
|
-
absoluteIndex: t.absoluteIndex,
|
|
237
|
-
uid: t.uid,
|
|
238
|
-
name: t.name,
|
|
239
|
-
color: t.color,
|
|
240
|
-
value: (t.values || []).reduce((l, o) => l + o, 0),
|
|
241
|
-
absoluteValues: t.values || [],
|
|
242
|
-
proportion: zt.value[a]
|
|
243
|
-
})));
|
|
244
|
-
function Vt() {
|
|
245
|
-
return Se.value.map((t) => ({
|
|
246
|
-
name: t.name,
|
|
247
|
-
color: t.color,
|
|
248
|
-
value: t.value,
|
|
249
|
-
proportion: t.proportion
|
|
250
|
-
}));
|
|
251
|
-
}
|
|
252
|
-
const Nt = c(() => {
|
|
253
|
-
let t = 0;
|
|
254
|
-
return H.value.map((a, l) => {
|
|
255
|
-
const o = t, n = o + a.proportion, u = [];
|
|
256
|
-
for (let w = Math.floor(o); w < Math.floor(n); w += 1)
|
|
257
|
-
u.push(w);
|
|
258
|
-
return t = n, {
|
|
259
|
-
...a,
|
|
260
|
-
start: o,
|
|
261
|
-
rects: u
|
|
262
|
-
};
|
|
263
|
-
});
|
|
264
|
-
}), i = c(() => Nt.value.flatMap((t, a) => t.rects.map((l, o) => ({
|
|
265
|
-
isFirst: o === 0,
|
|
266
|
-
isLongEnough: l.length > 2,
|
|
267
|
-
name: t.name,
|
|
268
|
-
color: t.color,
|
|
269
|
-
value: t.value,
|
|
270
|
-
serieIndex: a,
|
|
271
|
-
absoluteStartIndex: o < 3,
|
|
272
|
-
serieId: t.uid,
|
|
273
|
-
...t
|
|
274
|
-
}))).map((t, a) => ({
|
|
275
|
-
...t,
|
|
276
|
-
isAbsoluteFirst: a % e.value.style.chart.layout.grid.size === 0
|
|
277
|
-
}))), q = c(() => {
|
|
278
|
-
const t = [];
|
|
279
|
-
for (let a = 0; a < e.value.style.chart.layout.grid.size; a += 1)
|
|
280
|
-
for (let l = 0; l < e.value.style.chart.layout.grid.size; l += 1)
|
|
281
|
-
t.push({
|
|
282
|
-
isStartOfLine: l === 0,
|
|
283
|
-
position: e.value.style.chart.layout.grid.vertical ? a : l,
|
|
284
|
-
x: (e.value.style.chart.layout.grid.vertical ? a : l) * (I.value + e.value.style.chart.layout.grid.spaceBetween),
|
|
285
|
-
y: (e.value.style.chart.layout.grid.vertical ? l : a) * (O.value + e.value.style.chart.layout.grid.spaceBetween) + P.value.top
|
|
286
|
-
});
|
|
287
|
-
return t;
|
|
288
|
-
}), f = r([]), re = r(!1), K = r(/* @__PURE__ */ Object.create(null)), Q = r(/* @__PURE__ */ Object.create(null)), Z = r(0);
|
|
289
|
-
function ee(t, a) {
|
|
290
|
-
g.value = g.value.map((l) => l.uid === t ? {
|
|
291
|
-
...l,
|
|
292
|
-
values: [a]
|
|
293
|
-
} : l);
|
|
294
|
-
}
|
|
295
|
-
function lt(t, a) {
|
|
296
|
-
const l = a.find((o) => o.uid === t);
|
|
297
|
-
return l ? (l.values || []).reduce((o, n) => o + n, 0) : 0;
|
|
298
|
-
}
|
|
299
|
-
function Mt(t) {
|
|
300
|
-
K.value[t] && (cancelAnimationFrame(K.value[t]), delete K.value[t]), Q.value[t] && (cancelAnimationFrame(Q.value[t]), delete Q.value[t]);
|
|
301
|
-
}
|
|
302
|
-
function at({
|
|
303
|
-
seriesId: t,
|
|
304
|
-
fromValue: a,
|
|
305
|
-
toValue: l,
|
|
306
|
-
mode: o
|
|
307
|
-
}) {
|
|
308
|
-
Mt(t), Z.value += 1, re.value = !0;
|
|
309
|
-
let n = a;
|
|
310
|
-
return new Promise((u) => {
|
|
311
|
-
function w() {
|
|
312
|
-
if (o === "increase") {
|
|
313
|
-
if (n >= l) {
|
|
314
|
-
ee(t, l), Z.value -= 1, Z.value <= 0 && (re.value = !1), delete K.value[t], u();
|
|
315
|
-
return;
|
|
316
|
-
}
|
|
317
|
-
n += l * 0.025, n > l && (n = l), ee(t, n), K.value[t] = requestAnimationFrame(w);
|
|
318
|
-
} else {
|
|
319
|
-
if (n <= a / 100) {
|
|
320
|
-
ee(t, 0), Z.value -= 1, Z.value <= 0 && (re.value = !1), delete Q.value[t], u();
|
|
321
|
-
return;
|
|
322
|
-
}
|
|
323
|
-
n /= 1.15, ee(t, n), Q.value[t] = requestAnimationFrame(w);
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
w();
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
function Rt() {
|
|
330
|
-
g.value = se.value;
|
|
331
|
-
const t = f.value.length > 0;
|
|
332
|
-
if (!e.value.useAnimation) {
|
|
333
|
-
t ? f.value = [] : f.value = z.value.map((a) => a.uid);
|
|
334
|
-
return;
|
|
335
|
-
}
|
|
336
|
-
t ? [...f.value].forEach((l) => {
|
|
337
|
-
X(l, !0);
|
|
338
|
-
}) : z.value.map((l) => l.uid).forEach((l) => {
|
|
339
|
-
X(l, !0);
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
function X(t, a = !1) {
|
|
343
|
-
if (J.value && !a) return;
|
|
344
|
-
const l = a || f.value.length < z.value.length - 1 && z.value.length > 1;
|
|
345
|
-
if (!e.value.useAnimation) {
|
|
346
|
-
f.value.includes(t) ? f.value = f.value.filter((u) => u !== t) : l && f.value.push(t);
|
|
347
|
-
return;
|
|
348
|
-
}
|
|
349
|
-
const o = lt(t, se.value), n = lt(t, g.value);
|
|
350
|
-
if (!(n === 0 && o === 0)) {
|
|
351
|
-
if (f.value.includes(t)) {
|
|
352
|
-
f.value = f.value.filter((u) => u !== t), at({
|
|
353
|
-
seriesId: t,
|
|
354
|
-
fromValue: n,
|
|
355
|
-
toValue: o,
|
|
356
|
-
mode: "increase"
|
|
357
|
-
}).then(() => {
|
|
358
|
-
Oe(
|
|
359
|
-
"selectLegend",
|
|
360
|
-
H.value.map((u) => ({
|
|
361
|
-
name: u.name,
|
|
362
|
-
color: u.color,
|
|
363
|
-
value: u.value,
|
|
364
|
-
proportion: u.proportion / Math.pow(e.value.style.chart.layout.grid.size, 2)
|
|
365
|
-
}))
|
|
366
|
-
);
|
|
367
|
-
});
|
|
368
|
-
return;
|
|
369
|
-
}
|
|
370
|
-
l && at({
|
|
371
|
-
seriesId: t,
|
|
372
|
-
fromValue: n,
|
|
373
|
-
toValue: 0,
|
|
374
|
-
mode: "decrease"
|
|
375
|
-
}).then(() => {
|
|
376
|
-
f.value.includes(t) || f.value.push(t), ee(t, 0), Oe(
|
|
377
|
-
"selectLegend",
|
|
378
|
-
H.value.map((u) => ({
|
|
379
|
-
name: u.name,
|
|
380
|
-
color: u.color,
|
|
381
|
-
value: u.value,
|
|
382
|
-
proportion: u.proportion / Math.pow(e.value.style.chart.layout.grid.size, 2)
|
|
383
|
-
}))
|
|
384
|
-
);
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
function ot(t) {
|
|
389
|
-
if (!Se.value.length)
|
|
390
|
-
return e.value.debug && console.warn("VueUiWaffle - There are no series to show."), null;
|
|
391
|
-
const a = Se.value.find((l) => l.name === t);
|
|
392
|
-
return a || (e.value.debug && console.warn(`VueUiWaffle - Series name not found "${t}"`), null);
|
|
393
|
-
}
|
|
394
|
-
function Ut(t) {
|
|
395
|
-
const a = ot(t);
|
|
396
|
-
a !== null && f.value.includes(a.uid) && X(a.uid);
|
|
397
|
-
}
|
|
398
|
-
function Et(t) {
|
|
399
|
-
const a = ot(t);
|
|
400
|
-
a !== null && (f.value.includes(a.uid) || X(a.uid));
|
|
401
|
-
}
|
|
402
|
-
function Ae({
|
|
403
|
-
val: t,
|
|
404
|
-
percentage: a,
|
|
405
|
-
showVal: l,
|
|
406
|
-
showPercentage: o,
|
|
407
|
-
config: n
|
|
408
|
-
}) {
|
|
409
|
-
return $l({
|
|
410
|
-
config: n,
|
|
411
|
-
val: t,
|
|
412
|
-
percentage: a,
|
|
413
|
-
showVal: l,
|
|
414
|
-
showPercentage: o
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
const z = c(() => g.value.map((t, a) => {
|
|
418
|
-
const l = (t.values || []).reduce((n, u) => n + u, 0), o = l / g.value.map((n) => (n.values || []).reduce((u, w) => u + w, 0)).reduce((n, u) => n + u, 0);
|
|
419
|
-
return {
|
|
420
|
-
name: t.name,
|
|
421
|
-
color: t.color || Ze[a] || E[a] || E[a % E.length],
|
|
422
|
-
value: l,
|
|
423
|
-
proportion: o,
|
|
424
|
-
uid: t.uid,
|
|
425
|
-
shape: "square"
|
|
426
|
-
};
|
|
427
|
-
}).map((t, a) => {
|
|
428
|
-
const l = oe(e.value.style.chart.layout.labels.dataLabels.formatter, t.value, F({
|
|
429
|
-
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
430
|
-
v: t.value,
|
|
431
|
-
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
432
|
-
r: e.value.style.chart.legend.roundingValue
|
|
433
|
-
}), { datapoint: t, index: a }), o = isNaN(t.value / _.value) ? "-" : F({ v: t.value / _.value * 100, s: "%", r: e.value.style.chart.legend.roundingPercentage }), n = Ae({
|
|
434
|
-
val: l,
|
|
435
|
-
percentage: o,
|
|
436
|
-
showVal: e.value.style.chart.legend.showValue,
|
|
437
|
-
showPercentage: e.value.style.chart.legend.showPercentage,
|
|
438
|
-
config: e.value.style.chart.legend
|
|
439
|
-
});
|
|
440
|
-
return {
|
|
441
|
-
...t,
|
|
442
|
-
opacity: f.value.includes(t.uid) ? 0.5 : 1,
|
|
443
|
-
segregate: () => X(t.uid),
|
|
444
|
-
isSegregated: f.value.includes(t.uid),
|
|
445
|
-
display: `${t.name}${e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ": " : ""}${n}`
|
|
446
|
-
};
|
|
447
|
-
})), Wt = c(() => ({
|
|
448
|
-
cy: "waffle-div-legend",
|
|
449
|
-
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
450
|
-
color: e.value.style.chart.legend.color,
|
|
451
|
-
fontSize: e.value.style.chart.legend.fontSize,
|
|
452
|
-
paddingBottom: 12,
|
|
453
|
-
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
454
|
-
})), _ = c(() => H.value.map((t) => t.value).reduce((t, a) => t + a, 0)), Pe = r(null), Ie = r(null);
|
|
455
|
-
function Gt(t) {
|
|
456
|
-
const a = i.value[t];
|
|
457
|
-
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: a, seriesIndex: a.serieIndex });
|
|
458
|
-
}
|
|
459
|
-
function jt(t) {
|
|
460
|
-
const a = i.value[t];
|
|
461
|
-
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: a, seriesIndex: a.serieIndex }), Ie.value = null, fe.value = !1, W.value = null;
|
|
462
|
-
}
|
|
463
|
-
function Ht(t) {
|
|
464
|
-
if (f.value.length === y.dataset.length) return;
|
|
465
|
-
const a = i.value[t];
|
|
466
|
-
Pe.value = {
|
|
467
|
-
datapoint: a,
|
|
468
|
-
seriesIndex: a.absoluteIndex,
|
|
469
|
-
series: g.value,
|
|
470
|
-
config: e.value
|
|
471
|
-
}, e.value.events.datapointEnter && Ie.value !== a.serieIndex && e.value.events.datapointEnter({ datapoint: a, seriesIndex: a.serieIndex }), Ie.value = a.serieIndex, fe.value = !0, W.value = i.value[t].serieIndex;
|
|
472
|
-
const l = e.value.style.chart.tooltip.customFormat;
|
|
473
|
-
if (kl(l) && Cl(() => l({
|
|
474
|
-
seriesIndex: i.value[t].absoluteIndex,
|
|
475
|
-
datapoint: a,
|
|
476
|
-
series: g.value,
|
|
477
|
-
config: e.value
|
|
478
|
-
})))
|
|
479
|
-
ge.value = l({
|
|
480
|
-
seriesIndex: i.value[t].absoluteIndex,
|
|
481
|
-
datapoint: a,
|
|
482
|
-
series: g.value,
|
|
483
|
-
config: e.value
|
|
484
|
-
});
|
|
485
|
-
else {
|
|
486
|
-
let o = "";
|
|
487
|
-
o += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`, o += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" stroke="none" rx="1" fill="${a.color}" />${_t.pattern ? `<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${m.value}_${a.absoluteIndex})"/>` : ""}</svg>`, o += `<b>${Ae({
|
|
488
|
-
config: e.value.style.chart.tooltip,
|
|
489
|
-
showVal: e.value.style.chart.tooltip.showValue,
|
|
490
|
-
showPercentage: e.value.style.chart.tooltip.showPercentage,
|
|
491
|
-
val: `<span>${oe(
|
|
492
|
-
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
493
|
-
a.value,
|
|
494
|
-
F({
|
|
495
|
-
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
496
|
-
v: a.value,
|
|
497
|
-
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
498
|
-
r: e.value.style.chart.tooltip.roundingValue
|
|
499
|
-
}),
|
|
500
|
-
{
|
|
501
|
-
datapoint: a,
|
|
502
|
-
seriesIndex: i.value[t].absoluteIndex,
|
|
503
|
-
series: g.value
|
|
504
|
-
}
|
|
505
|
-
)}</span>`,
|
|
506
|
-
percentage: `<span>${F({
|
|
507
|
-
v: J.value ? 1 / G.value.length * 100 : a.value / _.value * 100,
|
|
508
|
-
s: "%",
|
|
509
|
-
r: e.value.style.chart.tooltip.roundingPercentage
|
|
510
|
-
})}</span>`
|
|
511
|
-
})}</b></div>`, ge.value = o;
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
const Oe = bt, L = c(() => {
|
|
515
|
-
const t = H.value.map((l) => ({
|
|
516
|
-
name: l.name,
|
|
517
|
-
color: l.color
|
|
518
|
-
})), a = H.value.map((l) => l.value);
|
|
519
|
-
return { head: t, body: a };
|
|
520
|
-
});
|
|
521
|
-
function ie(t) {
|
|
522
|
-
return e.value.useBlurOnHover && ![null, void 0].includes(W.value) && W.value !== t ? `url(#blur_${m.value})` : "";
|
|
523
|
-
}
|
|
524
|
-
function qt(t, a) {
|
|
525
|
-
return e.value.style.chart.layout.labels.captions.show ? i.value.length && !re.value && !e.value.style.chart.layout.grid.vertical && (i.value[t].isFirst && a.position < e.value.style.chart.layout.grid.size - 2 || i.value[t].isAbsoluteFirst && t % e.value.style.chart.layout.grid.size === 0 && i.value[t].absoluteStartIndex) : !1;
|
|
526
|
-
}
|
|
527
|
-
function Xt(t, a = null) {
|
|
528
|
-
const l = oe(
|
|
529
|
-
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
530
|
-
i.value[t].value,
|
|
531
|
-
F({
|
|
532
|
-
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
533
|
-
v: i.value[t].value,
|
|
534
|
-
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
535
|
-
r: e.value.style.chart.layout.labels.captions.roundingValue
|
|
536
|
-
}),
|
|
537
|
-
{ datapoint: i.value[t], position: a }
|
|
538
|
-
), o = F({ v: i.value[t].proportion, s: "%", r: e.value.style.chart.layout.labels.captions.roundingPercentage }), n = (e.value.style.chart.layout.labels.captions.serieNameAbbreviation ? wl({ source: i.value[t].name, length: e.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize }) : i.value[t].name) + (e.value.style.chart.layout.labels.captions.showPercentage || e.value.style.chart.layout.labels.captions.showValue ? ":" : ""), u = e.value.style.chart.layout.labels.captions.showSerieName ? n : "", w = Ae({
|
|
539
|
-
val: l,
|
|
540
|
-
percentage: o,
|
|
541
|
-
showVal: e.value.style.chart.layout.labels.captions.showValue,
|
|
542
|
-
showPercentage: e.value.style.chart.layout.labels.captions.showPercentage,
|
|
543
|
-
config: e.value.style.chart.layout.labels.dataLabels
|
|
544
|
-
});
|
|
545
|
-
return `${u} ${w}`;
|
|
546
|
-
}
|
|
547
|
-
function _e(t = null) {
|
|
548
|
-
pt(() => {
|
|
549
|
-
const a = L.value.head.map((n, u) => [[
|
|
550
|
-
n.name
|
|
551
|
-
], [L.value.body[u]], [isNaN(L.value.body[u] / _.value) ? "-" : L.value.body[u] / _.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(a), o = ml(l);
|
|
552
|
-
t ? t(o) : bl({ csvContent: o, title: e.value.style.chart.title.text || "vue-ui-waffle" });
|
|
553
|
-
});
|
|
554
|
-
}
|
|
555
|
-
const ce = c(() => {
|
|
556
|
-
const t = [
|
|
557
|
-
' <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>',
|
|
558
|
-
oe(
|
|
559
|
-
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
560
|
-
_.value,
|
|
561
|
-
F({
|
|
562
|
-
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
563
|
-
v: _.value,
|
|
564
|
-
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
565
|
-
r: e.value.table.td.roundingValue
|
|
566
|
-
})
|
|
567
|
-
),
|
|
568
|
-
"100%"
|
|
569
|
-
], a = L.value.head.map((n, u) => [
|
|
570
|
-
{
|
|
571
|
-
color: n.color,
|
|
572
|
-
name: n.name
|
|
573
|
-
},
|
|
574
|
-
oe(
|
|
575
|
-
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
576
|
-
L.value.body[u],
|
|
577
|
-
F({
|
|
578
|
-
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
579
|
-
v: L.value.body[u],
|
|
580
|
-
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
581
|
-
r: e.value.table.td.roundingValue
|
|
582
|
-
})
|
|
583
|
-
),
|
|
584
|
-
isNaN(L.value.body[u] / _.value) ? "-" : F({
|
|
585
|
-
v: L.value.body[u] / _.value * 100,
|
|
586
|
-
s: "%",
|
|
587
|
-
r: e.value.table.td.roundingPercentage
|
|
588
|
-
})
|
|
589
|
-
]), l = {
|
|
590
|
-
th: {
|
|
591
|
-
backgroundColor: e.value.table.th.backgroundColor,
|
|
592
|
-
color: e.value.table.th.color,
|
|
593
|
-
outline: e.value.table.th.outline
|
|
594
|
-
},
|
|
595
|
-
td: {
|
|
596
|
-
backgroundColor: e.value.table.td.backgroundColor,
|
|
597
|
-
color: e.value.table.td.color,
|
|
598
|
-
outline: e.value.table.td.outline
|
|
599
|
-
},
|
|
600
|
-
shape: "square",
|
|
601
|
-
breakpoint: e.value.table.responsiveBreakpoint
|
|
602
|
-
}, o = [
|
|
603
|
-
e.value.table.columnNames.series,
|
|
604
|
-
e.value.table.columnNames.value,
|
|
605
|
-
e.value.table.columnNames.percentage
|
|
606
|
-
];
|
|
607
|
-
return {
|
|
608
|
-
head: t,
|
|
609
|
-
body: a,
|
|
610
|
-
config: l,
|
|
611
|
-
colNames: o
|
|
612
|
-
};
|
|
613
|
-
}), U = r(!1);
|
|
614
|
-
function nt(t) {
|
|
615
|
-
U.value = t, Ne.value += 1;
|
|
616
|
-
}
|
|
617
|
-
function ut() {
|
|
618
|
-
C.value.showTable = !C.value.showTable;
|
|
619
|
-
}
|
|
620
|
-
function st() {
|
|
621
|
-
C.value.showTooltip = !C.value.showTooltip;
|
|
622
|
-
}
|
|
623
|
-
const ve = r(!1);
|
|
624
|
-
function Le() {
|
|
625
|
-
ve.value = !ve.value;
|
|
626
|
-
}
|
|
627
|
-
async function Yt({ scale: t = 2 } = {}) {
|
|
628
|
-
if (!A.value) return;
|
|
629
|
-
const { width: a, height: l } = A.value.getBoundingClientRect(), o = a / l, { imageUri: n, base64: u } = await Fl({ domElement: A.value, base64: !0, img: !0, scale: t });
|
|
630
|
-
return {
|
|
631
|
-
imageUri: n,
|
|
632
|
-
base64: u,
|
|
633
|
-
title: e.value.style.chart.title.text,
|
|
634
|
-
width: a,
|
|
635
|
-
height: l,
|
|
636
|
-
aspectRatio: o
|
|
637
|
-
};
|
|
638
|
-
}
|
|
639
|
-
const te = c(() => {
|
|
640
|
-
const t = e.value.table.useDialog && !e.value.table.show, a = C.value.showTable;
|
|
641
|
-
return {
|
|
642
|
-
component: t ? At : $t,
|
|
643
|
-
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
644
|
-
props: t ? {
|
|
645
|
-
backgroundColor: e.value.table.th.backgroundColor,
|
|
646
|
-
color: e.value.table.th.color,
|
|
647
|
-
headerColor: e.value.table.th.color,
|
|
648
|
-
headerBg: e.value.table.th.backgroundColor,
|
|
649
|
-
isFullscreen: U.value,
|
|
650
|
-
fullscreenParent: A.value,
|
|
651
|
-
forcedWidth: Math.min(500, window.innerWidth * 0.8),
|
|
652
|
-
isCursorPointer: M.value
|
|
653
|
-
} : {
|
|
654
|
-
hideDetails: !0,
|
|
655
|
-
config: {
|
|
656
|
-
open: a,
|
|
657
|
-
maxHeight: 1e4,
|
|
658
|
-
body: {
|
|
659
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
660
|
-
color: e.value.style.chart.color
|
|
661
|
-
},
|
|
662
|
-
head: {
|
|
663
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
664
|
-
color: e.value.style.chart.color
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
};
|
|
669
|
-
});
|
|
670
|
-
le(() => C.value.showTable, (t) => {
|
|
671
|
-
e.value.table.show || (t && e.value.table.useDialog && Y.value ? Y.value.open() : "close" in Y.value && Y.value.close());
|
|
672
|
-
});
|
|
673
|
-
function rt() {
|
|
674
|
-
C.value.showTable = !1, ye.value && ye.value.setTableIconState(!1);
|
|
675
|
-
}
|
|
676
|
-
const Jt = c(() => z.value.map((t) => ({
|
|
677
|
-
...t,
|
|
678
|
-
name: t.display
|
|
679
|
-
}))), Kt = c(() => e.value.style.chart.backgroundColor), Qt = c(() => e.value.style.chart.legend), Zt = c(() => e.value.style.chart.title), { exportSvg: el, getSvg: tl } = Ol({
|
|
680
|
-
svg: ke,
|
|
681
|
-
title: Zt,
|
|
682
|
-
legend: Qt,
|
|
683
|
-
legendItems: Jt,
|
|
684
|
-
backgroundColor: Kt
|
|
685
|
-
});
|
|
686
|
-
async function it({ isCb: t }) {
|
|
687
|
-
ue.value = !0, await pt();
|
|
688
|
-
try {
|
|
689
|
-
if (t) {
|
|
690
|
-
const { blob: a, url: l, text: o, dataUrl: n } = await tl();
|
|
691
|
-
await Promise.resolve(e.value.userOptions.callbacks.svg({ blob: a, url: l, text: o, dataUrl: n }));
|
|
692
|
-
} else
|
|
693
|
-
await Promise.resolve(el());
|
|
694
|
-
} finally {
|
|
695
|
-
ue.value = !1;
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
function ll(t) {
|
|
699
|
-
if (t?.stage === "start") {
|
|
700
|
-
ne.value = !0;
|
|
701
|
-
return;
|
|
702
|
-
}
|
|
703
|
-
if (t?.stage === "end") {
|
|
704
|
-
ne.value = !1;
|
|
705
|
-
return;
|
|
706
|
-
}
|
|
707
|
-
Qe();
|
|
708
|
-
}
|
|
709
|
-
async function ct() {
|
|
710
|
-
if (Oe("copyAlt", {
|
|
711
|
-
config: e.value,
|
|
712
|
-
dataset: G.value
|
|
713
|
-
}), !e.value.userOptions.callbacks.altCopy) {
|
|
714
|
-
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
715
|
-
return;
|
|
716
|
-
}
|
|
717
|
-
await Promise.resolve(e.value.userOptions.callbacks.altCopy({
|
|
718
|
-
config: e.value,
|
|
719
|
-
dataset: G.value
|
|
720
|
-
}));
|
|
721
|
-
}
|
|
722
|
-
return mt({
|
|
723
|
-
getData: Vt,
|
|
724
|
-
getImage: Yt,
|
|
725
|
-
generatePdf: Ke,
|
|
726
|
-
generateCsv: _e,
|
|
727
|
-
generateImage: Qe,
|
|
728
|
-
generateSvg: it,
|
|
729
|
-
hideSeries: Et,
|
|
730
|
-
showSeries: Ut,
|
|
731
|
-
toggleTable: ut,
|
|
732
|
-
toggleTooltip: st,
|
|
733
|
-
toggleAnnotator: Le,
|
|
734
|
-
toggleFullscreen: nt,
|
|
735
|
-
copyAlt: ct
|
|
736
|
-
}), (t, a) => (s(), v("div", {
|
|
737
|
-
class: dt(`vue-data-ui-component vue-ui-waffle ${U.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
738
|
-
ref_key: "waffleChart",
|
|
739
|
-
ref: A,
|
|
740
|
-
id: `vue-ui-waffle_${m.value}`,
|
|
741
|
-
style: ae(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
|
|
742
|
-
onMouseenter: a[2] || (a[2] = () => d(qe)(!0)),
|
|
743
|
-
onMouseleave: a[3] || (a[3] = () => d(qe)(!1))
|
|
744
|
-
}, [
|
|
745
|
-
e.value.userOptions.buttons.annotator ? (s(), B(d(Tt), {
|
|
746
|
-
key: 0,
|
|
747
|
-
svgRef: d(ke),
|
|
748
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
749
|
-
color: e.value.style.chart.color,
|
|
750
|
-
active: ve.value,
|
|
751
|
-
isCursorPointer: M.value,
|
|
752
|
-
onClose: Le
|
|
753
|
-
}, {
|
|
754
|
-
"annotator-action-close": h(() => [
|
|
755
|
-
p(t.$slots, "annotator-action-close", {}, void 0, !0)
|
|
756
|
-
]),
|
|
757
|
-
"annotator-action-color": h(({ color: l }) => [
|
|
758
|
-
p(t.$slots, "annotator-action-color", $(x({ color: l })), void 0, !0)
|
|
759
|
-
]),
|
|
760
|
-
"annotator-action-draw": h(({ mode: l }) => [
|
|
761
|
-
p(t.$slots, "annotator-action-draw", $(x({ mode: l })), void 0, !0)
|
|
762
|
-
]),
|
|
763
|
-
"annotator-action-undo": h(({ disabled: l }) => [
|
|
764
|
-
p(t.$slots, "annotator-action-undo", $(x({ disabled: l })), void 0, !0)
|
|
765
|
-
]),
|
|
766
|
-
"annotator-action-redo": h(({ disabled: l }) => [
|
|
767
|
-
p(t.$slots, "annotator-action-redo", $(x({ disabled: l })), void 0, !0)
|
|
768
|
-
]),
|
|
769
|
-
"annotator-action-delete": h(({ disabled: l }) => [
|
|
770
|
-
p(t.$slots, "annotator-action-delete", $(x({ disabled: l })), void 0, !0)
|
|
771
|
-
]),
|
|
772
|
-
_: 3
|
|
773
|
-
}, 8, ["svgRef", "backgroundColor", "color", "active", "isCursorPointer"])) : b("", !0),
|
|
774
|
-
Bt.value ? (s(), v("div", {
|
|
775
|
-
key: 1,
|
|
776
|
-
ref_key: "noTitle",
|
|
777
|
-
ref: Ee,
|
|
778
|
-
class: "vue-data-ui-no-title-space",
|
|
779
|
-
style: "height:36px; width: 100%;background:transparent"
|
|
780
|
-
}, null, 512)) : b("", !0),
|
|
781
|
-
e.value.style.chart.title.text ? (s(), v("div", {
|
|
782
|
-
key: 2,
|
|
783
|
-
ref_key: "chartTitle",
|
|
784
|
-
ref: Me,
|
|
785
|
-
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
786
|
-
}, [
|
|
787
|
-
(s(), B(zl, {
|
|
788
|
-
key: `title_${We.value}`,
|
|
789
|
-
config: {
|
|
790
|
-
title: {
|
|
791
|
-
cy: "waffle-title",
|
|
792
|
-
...e.value.style.chart.title
|
|
793
|
-
},
|
|
794
|
-
subtitle: {
|
|
795
|
-
cy: "waffle-subtitle",
|
|
796
|
-
...e.value.style.chart.title.subtitle
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
}, null, 8, ["config"]))
|
|
800
|
-
], 512)) : b("", !0),
|
|
801
|
-
k("div", {
|
|
802
|
-
id: `legend-top-${m.value}`
|
|
803
|
-
}, null, 8, El),
|
|
804
|
-
e.value.userOptions.show && pe.value && (d(Xe) || d(we)) ? (s(), B(d(xt), {
|
|
805
|
-
ref_key: "userOptionsRef",
|
|
806
|
-
ref: ye,
|
|
807
|
-
key: `user_options_${Ne.value}`,
|
|
808
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
809
|
-
color: e.value.style.chart.color,
|
|
810
|
-
isPrinting: d($e),
|
|
811
|
-
isImaging: d(xe),
|
|
812
|
-
uid: m.value,
|
|
813
|
-
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
814
|
-
hasPdf: e.value.userOptions.buttons.pdf,
|
|
815
|
-
hasImg: e.value.userOptions.buttons.img,
|
|
816
|
-
hasSvg: e.value.userOptions.buttons.svg,
|
|
817
|
-
hasXls: e.value.userOptions.buttons.csv,
|
|
818
|
-
hasTable: e.value.userOptions.buttons.table,
|
|
819
|
-
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
820
|
-
hasAltCopy: e.value.userOptions.buttons.altCopy,
|
|
821
|
-
isFullscreen: U.value,
|
|
822
|
-
isTooltip: C.value.showTooltip,
|
|
823
|
-
titles: { ...e.value.userOptions.buttonTitles },
|
|
824
|
-
chartElement: A.value,
|
|
825
|
-
position: e.value.userOptions.position,
|
|
826
|
-
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
827
|
-
isAnnotation: ve.value,
|
|
828
|
-
callbacks: e.value.userOptions.callbacks,
|
|
829
|
-
printScale: e.value.userOptions.print.scale,
|
|
830
|
-
tableDialog: e.value.table.useDialog,
|
|
831
|
-
isCursorPointer: M.value,
|
|
832
|
-
onToggleFullscreen: nt,
|
|
833
|
-
onGeneratePdf: d(Ke),
|
|
834
|
-
onGenerateCsv: _e,
|
|
835
|
-
onGenerateImage: ll,
|
|
836
|
-
onGenerateSvg: it,
|
|
837
|
-
onToggleTable: ut,
|
|
838
|
-
onToggleTooltip: st,
|
|
839
|
-
onToggleAnnotator: Le,
|
|
840
|
-
onCopyAlt: ct,
|
|
841
|
-
style: ae({
|
|
842
|
-
visibility: d(Xe) ? d(we) ? "visible" : "hidden" : "visible"
|
|
843
|
-
})
|
|
844
|
-
}, Fe({ _: 2 }, [
|
|
845
|
-
t.$slots.menuIcon ? {
|
|
846
|
-
name: "menuIcon",
|
|
847
|
-
fn: h(({ isOpen: l, color: o }) => [
|
|
848
|
-
p(t.$slots, "menuIcon", $(x({ isOpen: l, color: o })), void 0, !0)
|
|
849
|
-
]),
|
|
850
|
-
key: "0"
|
|
851
|
-
} : void 0,
|
|
852
|
-
t.$slots.optionTooltip ? {
|
|
853
|
-
name: "optionTooltip",
|
|
854
|
-
fn: h(() => [
|
|
855
|
-
p(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
856
|
-
]),
|
|
857
|
-
key: "1"
|
|
858
|
-
} : void 0,
|
|
859
|
-
t.$slots.optionPdf ? {
|
|
860
|
-
name: "optionPdf",
|
|
861
|
-
fn: h(() => [
|
|
862
|
-
p(t.$slots, "optionPdf", {}, void 0, !0)
|
|
863
|
-
]),
|
|
864
|
-
key: "2"
|
|
865
|
-
} : void 0,
|
|
866
|
-
t.$slots.optionCsv ? {
|
|
867
|
-
name: "optionCsv",
|
|
868
|
-
fn: h(() => [
|
|
869
|
-
p(t.$slots, "optionCsv", {}, void 0, !0)
|
|
870
|
-
]),
|
|
871
|
-
key: "3"
|
|
872
|
-
} : void 0,
|
|
873
|
-
t.$slots.optionImg ? {
|
|
874
|
-
name: "optionImg",
|
|
875
|
-
fn: h(() => [
|
|
876
|
-
p(t.$slots, "optionImg", {}, void 0, !0)
|
|
877
|
-
]),
|
|
878
|
-
key: "4"
|
|
879
|
-
} : void 0,
|
|
880
|
-
t.$slots.optionSvg ? {
|
|
881
|
-
name: "optionSvg",
|
|
882
|
-
fn: h(() => [
|
|
883
|
-
p(t.$slots, "optionSvg", {}, void 0, !0)
|
|
884
|
-
]),
|
|
885
|
-
key: "5"
|
|
886
|
-
} : void 0,
|
|
887
|
-
t.$slots.optionTable ? {
|
|
888
|
-
name: "optionTable",
|
|
889
|
-
fn: h(() => [
|
|
890
|
-
p(t.$slots, "optionTable", {}, void 0, !0)
|
|
891
|
-
]),
|
|
892
|
-
key: "6"
|
|
893
|
-
} : void 0,
|
|
894
|
-
t.$slots.optionFullscreen ? {
|
|
895
|
-
name: "optionFullscreen",
|
|
896
|
-
fn: h(({ toggleFullscreen: l, isFullscreen: o }) => [
|
|
897
|
-
p(t.$slots, "optionFullscreen", $(x({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
|
|
898
|
-
]),
|
|
899
|
-
key: "7"
|
|
900
|
-
} : void 0,
|
|
901
|
-
t.$slots.optionAnnotator ? {
|
|
902
|
-
name: "optionAnnotator",
|
|
903
|
-
fn: h(({ toggleAnnotator: l, isAnnotator: o }) => [
|
|
904
|
-
p(t.$slots, "optionAnnotator", $(x({ toggleAnnotator: l, isAnnotator: o })), void 0, !0)
|
|
905
|
-
]),
|
|
906
|
-
key: "8"
|
|
907
|
-
} : void 0,
|
|
908
|
-
t.$slots.optionAltCopy ? {
|
|
909
|
-
name: "optionAltCopy",
|
|
910
|
-
fn: h(({ altCopy: l }) => [
|
|
911
|
-
p(t.$slots, "optionAltCopy", $(x({ altCopy: l })), void 0, !0)
|
|
912
|
-
]),
|
|
913
|
-
key: "9"
|
|
914
|
-
} : void 0
|
|
915
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasFullscreen", "hasAltCopy", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "isCursorPointer", "onGeneratePdf", "style"])) : b("", !0),
|
|
916
|
-
(s(), v("svg", {
|
|
917
|
-
ref_key: "svgRef",
|
|
918
|
-
ref: ke,
|
|
919
|
-
xmlns: d(hl),
|
|
920
|
-
class: dt({ "vue-data-ui-fullscreen--on": U.value, "vue-data-ui-fulscreen--off": !U.value }),
|
|
921
|
-
viewBox: `0 0 ${R.value.width <= 0 ? 10 : R.value.width} ${R.value.height <= 0 ? 10 : R.value.height}`,
|
|
922
|
-
style: ae(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
|
|
923
|
-
}, [
|
|
924
|
-
de(d(St)),
|
|
925
|
-
k("defs", null, [
|
|
926
|
-
(s(!0), v(S, null, N(i.value, (l, o) => (s(), v("radialGradient", {
|
|
927
|
-
cx: "50%",
|
|
928
|
-
cy: "50%",
|
|
929
|
-
r: "50%",
|
|
930
|
-
fx: "50%",
|
|
931
|
-
fy: "50%",
|
|
932
|
-
id: `gradient_${m.value}_${o}`
|
|
933
|
-
}, [
|
|
934
|
-
k("stop", {
|
|
935
|
-
offset: "0%",
|
|
936
|
-
"stop-color": d(pl)(d(fl)(l.color, 0.05), 100 - e.value.style.chart.layout.rect.gradientIntensity)
|
|
937
|
-
}, null, 8, jl),
|
|
938
|
-
k("stop", {
|
|
939
|
-
offset: "100%",
|
|
940
|
-
"stop-color": l.color
|
|
941
|
-
}, null, 8, Hl)
|
|
942
|
-
], 8, Gl))), 256))
|
|
943
|
-
]),
|
|
944
|
-
k("defs", null, [
|
|
945
|
-
k("filter", {
|
|
946
|
-
id: `blur_${m.value}`,
|
|
947
|
-
x: "-50%",
|
|
948
|
-
y: "-50%",
|
|
949
|
-
width: "200%",
|
|
950
|
-
height: "200%"
|
|
951
|
-
}, [...a[4] || (a[4] = [
|
|
952
|
-
k("feGaussianBlur", {
|
|
953
|
-
in: "SourceGraphic",
|
|
954
|
-
stdDeviation: 2
|
|
955
|
-
}, null, -1),
|
|
956
|
-
k("feColorMatrix", {
|
|
957
|
-
type: "saturate",
|
|
958
|
-
values: "0"
|
|
959
|
-
}, null, -1)
|
|
960
|
-
])], 8, ql)
|
|
961
|
-
]),
|
|
962
|
-
e.value.useCustomCells && i.value.length ? (s(!0), v(S, { key: 0 }, N(q.value, (l, o) => (s(), v("foreignObject", {
|
|
963
|
-
x: l.x,
|
|
964
|
-
y: l.y,
|
|
965
|
-
height: O.value <= 0 ? 1e-4 : O.value,
|
|
966
|
-
width: I.value <= 0 ? 1e-4 : I.value,
|
|
967
|
-
class: "vue-ui-waffle-custom-cell-foreignObject"
|
|
968
|
-
}, [
|
|
969
|
-
p(t.$slots, "cell", De({ ref_for: !0 }, { cell: { ...l, color: i.value[o].color, ...i.value[o] }, isSelected: [null, void 0].includes(W.value) ? !0 : i.value[o].serieIndex === W.value }), void 0, !0)
|
|
970
|
-
], 8, Xl))), 256)) : b("", !0),
|
|
971
|
-
!i.value.length && !e.value.useCustomCells ? (s(), v("rect", {
|
|
972
|
-
key: 1,
|
|
973
|
-
x: 12,
|
|
974
|
-
y: 12,
|
|
975
|
-
height: P.value.height - 24,
|
|
976
|
-
width: P.value.width - 24,
|
|
977
|
-
rx: 3,
|
|
978
|
-
fill: "none",
|
|
979
|
-
stroke: "black"
|
|
980
|
-
}, null, 8, Yl)) : i.value.length && !e.value.useCustomCells ? (s(), v(S, { key: 2 }, [
|
|
981
|
-
t.$slots.pattern ? (s(), v("g", Jl, [
|
|
982
|
-
(s(!0), v(S, null, N(se.value, (l) => (s(), v("defs", null, [
|
|
983
|
-
p(t.$slots, "pattern", De({ ref_for: !0 }, { seriesIndex: l.absoluteIndex, patternId: `pattern_${m.value}_${l.absoluteIndex}` }), void 0, !0)
|
|
984
|
-
]))), 256))
|
|
985
|
-
])) : b("", !0),
|
|
986
|
-
(s(!0), v(S, null, N(q.value, (l, o) => (s(), v("rect", {
|
|
987
|
-
rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
|
|
988
|
-
x: l.x + e.value.style.chart.layout.grid.spaceBetween / 2,
|
|
989
|
-
y: l.y + e.value.style.chart.layout.grid.spaceBetween / 2,
|
|
990
|
-
height: O.value <= 0 ? 1e-4 : O.value,
|
|
991
|
-
width: I.value <= 0 ? 1e-4 : I.value,
|
|
992
|
-
fill: "white",
|
|
993
|
-
stroke: e.value.style.chart.layout.rect.stroke,
|
|
994
|
-
"stroke-width": e.value.style.chart.layout.rect.strokeWidth,
|
|
995
|
-
filter: ie(i.value[o].serieIndex)
|
|
996
|
-
}, null, 8, Kl))), 256)),
|
|
997
|
-
(s(!0), v(S, null, N(q.value, (l, o) => (s(), v("rect", {
|
|
998
|
-
rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
|
|
999
|
-
x: l.x + e.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1000
|
-
y: l.y + e.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1001
|
-
height: O.value <= 0 ? 1e-4 : O.value,
|
|
1002
|
-
width: I.value <= 0 ? 1e-4 : I.value,
|
|
1003
|
-
fill: e.value.style.chart.layout.rect.useGradient && e.value.style.chart.layout.rect.gradientIntensity > 0 ? `url(#gradient_${m.value}_${o})` : i.value[o].color,
|
|
1004
|
-
stroke: e.value.style.chart.layout.rect.stroke,
|
|
1005
|
-
"stroke-width": e.value.style.chart.layout.rect.strokeWidth,
|
|
1006
|
-
filter: ie(i.value[o].serieIndex)
|
|
1007
|
-
}, null, 8, Ql))), 256)),
|
|
1008
|
-
t.$slots.pattern ? (s(), v("g", Zl, [
|
|
1009
|
-
(s(!0), v(S, null, N(q.value, (l, o) => (s(), v("rect", {
|
|
1010
|
-
rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
|
|
1011
|
-
x: l.x + e.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1012
|
-
y: l.y + e.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1013
|
-
height: O.value <= 0 ? 1e-4 : O.value,
|
|
1014
|
-
width: I.value <= 0 ? 1e-4 : I.value,
|
|
1015
|
-
fill: `url(#pattern_${m.value}_${i.value[o].absoluteIndex})`,
|
|
1016
|
-
stroke: "none",
|
|
1017
|
-
filter: ie(i.value[o].serieIndex)
|
|
1018
|
-
}, null, 8, ea))), 256))
|
|
1019
|
-
])) : b("", !0)
|
|
1020
|
-
], 64)) : b("", !0),
|
|
1021
|
-
(s(!0), v(S, null, N(q.value, (l, o) => (s(), v(S, null, [
|
|
1022
|
-
qt(o, l) ? (s(), v("text", {
|
|
1023
|
-
key: `datalabel_${o}`,
|
|
1024
|
-
textContent: he(Xt(o, l)),
|
|
1025
|
-
x: l.x + e.value.style.chart.layout.labels.captions.offsetX + e.value.style.chart.layout.grid.spaceBetween / 2 + 6,
|
|
1026
|
-
y: l.y + e.value.style.chart.layout.labels.captions.offsetY + e.value.style.chart.layout.grid.spaceBetween / 2 + et.value / 2 + e.value.style.chart.layout.labels.captions.fontSize / 3,
|
|
1027
|
-
"font-size": e.value.style.chart.layout.labels.captions.fontSize,
|
|
1028
|
-
fill: d(gl)(i.value[o].color),
|
|
1029
|
-
filter: ie(i.value[o].serieIndex)
|
|
1030
|
-
}, null, 8, ta)) : b("", !0)
|
|
1031
|
-
], 64))), 256)),
|
|
1032
|
-
(s(!0), v(S, null, N(q.value, (l, o) => (s(), v("rect", {
|
|
1033
|
-
x: l.x + e.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1034
|
-
y: l.y + e.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1035
|
-
height: et.value,
|
|
1036
|
-
width: Ft.value,
|
|
1037
|
-
fill: "transparent",
|
|
1038
|
-
stroke: "none",
|
|
1039
|
-
onMouseover: (n) => Ht(o),
|
|
1040
|
-
onMouseleave: (n) => jt(o),
|
|
1041
|
-
onClick: (n) => Gt(o)
|
|
1042
|
-
}, null, 40, la))), 256)),
|
|
1043
|
-
p(t.$slots, "svg", {
|
|
1044
|
-
svg: {
|
|
1045
|
-
...R.value,
|
|
1046
|
-
isPrintingImg: d($e) | d(xe) | ne.value,
|
|
1047
|
-
isPrintingSvg: ue.value
|
|
1048
|
-
}
|
|
1049
|
-
}, void 0, !0)
|
|
1050
|
-
], 14, Wl)),
|
|
1051
|
-
t.$slots.watermark ? (s(), v("div", aa, [
|
|
1052
|
-
p(t.$slots, "watermark", $(x({ isPrinting: d($e) || d(xe) || ne.value || ue.value })), void 0, !0)
|
|
1053
|
-
])) : b("", !0),
|
|
1054
|
-
k("div", {
|
|
1055
|
-
id: `legend-bottom-${m.value}`
|
|
1056
|
-
}, null, 8, oa),
|
|
1057
|
-
He.value ? (s(), B(sl, {
|
|
1058
|
-
key: 5,
|
|
1059
|
-
to: e.value.style.chart.legend.position === "top" ? `#legend-top-${m.value}` : `#legend-bottom-${m.value}`
|
|
1060
|
-
}, [
|
|
1061
|
-
k("div", {
|
|
1062
|
-
ref_key: "chartLegend",
|
|
1063
|
-
ref: Re
|
|
1064
|
-
}, [
|
|
1065
|
-
e.value.style.chart.legend.show ? (s(), B(Nl, {
|
|
1066
|
-
key: `legend_${je.value}`,
|
|
1067
|
-
legendSet: z.value,
|
|
1068
|
-
config: Wt.value,
|
|
1069
|
-
isCursorPointer: M.value,
|
|
1070
|
-
onClickMarker: a[0] || (a[0] = ({ legend: l }) => X(l.uid))
|
|
1071
|
-
}, Fe({
|
|
1072
|
-
item: h(({ legend: l }) => [
|
|
1073
|
-
k("div", {
|
|
1074
|
-
onClick: (o) => l.segregate(),
|
|
1075
|
-
style: ae(`opacity:${f.value.includes(l.uid) ? 0.5 : 1}`)
|
|
1076
|
-
}, he(l.display), 13, na)
|
|
1077
|
-
]),
|
|
1078
|
-
legendToggle: h(() => [
|
|
1079
|
-
z.value.length > 2 && e.value.style.chart.legend.selectAllToggle.show && !d(me) ? (s(), B(Ml, {
|
|
1080
|
-
key: 0,
|
|
1081
|
-
backgroundColor: e.value.style.chart.legend.selectAllToggle.backgroundColor,
|
|
1082
|
-
color: e.value.style.chart.legend.selectAllToggle.color,
|
|
1083
|
-
fontSize: e.value.style.chart.legend.fontSize,
|
|
1084
|
-
checked: f.value.length > 0,
|
|
1085
|
-
isCursorPointer: M.value,
|
|
1086
|
-
onToggle: Rt
|
|
1087
|
-
}, null, 8, ["backgroundColor", "color", "fontSize", "checked", "isCursorPointer"])) : b("", !0)
|
|
1088
|
-
]),
|
|
1089
|
-
_: 2
|
|
1090
|
-
}, [
|
|
1091
|
-
t.$slots.pattern ? {
|
|
1092
|
-
name: "legend-pattern",
|
|
1093
|
-
fn: h(({ legend: l, index: o }) => [
|
|
1094
|
-
de(Dl, {
|
|
1095
|
-
shape: l.shape,
|
|
1096
|
-
radius: 30,
|
|
1097
|
-
stroke: "none",
|
|
1098
|
-
plot: { x: 30, y: 30 },
|
|
1099
|
-
fill: `url(#pattern_${m.value}_${o})`
|
|
1100
|
-
}, null, 8, ["shape", "fill"])
|
|
1101
|
-
]),
|
|
1102
|
-
key: "0"
|
|
1103
|
-
} : void 0
|
|
1104
|
-
]), 1032, ["legendSet", "config", "isCursorPointer"])) : p(t.$slots, "legend", {
|
|
1105
|
-
key: 1,
|
|
1106
|
-
legend: z.value
|
|
1107
|
-
}, void 0, !0)
|
|
1108
|
-
], 512)
|
|
1109
|
-
], 8, ["to"])) : b("", !0),
|
|
1110
|
-
t.$slots.source ? (s(), v("div", {
|
|
1111
|
-
key: 6,
|
|
1112
|
-
ref_key: "source",
|
|
1113
|
-
ref: Ue,
|
|
1114
|
-
dir: "auto"
|
|
1115
|
-
}, [
|
|
1116
|
-
p(t.$slots, "source", {}, void 0, !0)
|
|
1117
|
-
], 512)) : b("", !0),
|
|
1118
|
-
de(d(wt), {
|
|
1119
|
-
teleportTo: e.value.style.chart.tooltip.teleportTo,
|
|
1120
|
-
show: C.value.showTooltip && fe.value && f.value.length < y.dataset.length,
|
|
1121
|
-
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
1122
|
-
color: e.value.style.chart.tooltip.color,
|
|
1123
|
-
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
1124
|
-
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
1125
|
-
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
1126
|
-
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
1127
|
-
position: e.value.style.chart.tooltip.position,
|
|
1128
|
-
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
1129
|
-
parent: A.value,
|
|
1130
|
-
content: ge.value,
|
|
1131
|
-
isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function",
|
|
1132
|
-
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
1133
|
-
isFullscreen: U.value,
|
|
1134
|
-
smooth: e.value.style.chart.tooltip.smooth,
|
|
1135
|
-
backdropFilter: e.value.style.chart.tooltip.backdropFilter,
|
|
1136
|
-
smoothForce: e.value.style.chart.tooltip.smoothForce,
|
|
1137
|
-
smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold
|
|
1138
|
-
}, {
|
|
1139
|
-
"tooltip-before": h(() => [
|
|
1140
|
-
p(t.$slots, "tooltip-before", $(x({ ...Pe.value })), void 0, !0)
|
|
1141
|
-
]),
|
|
1142
|
-
"tooltip-after": h(() => [
|
|
1143
|
-
p(t.$slots, "tooltip-after", $(x({ ...Pe.value })), void 0, !0)
|
|
1144
|
-
]),
|
|
1145
|
-
_: 3
|
|
1146
|
-
}, 8, ["teleportTo", "show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "fontSize", "isFullscreen", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
|
|
1147
|
-
pe.value && e.value.userOptions.buttons.table ? (s(), B(rl(te.value.component), De({ key: 7 }, te.value.props, {
|
|
1148
|
-
ref_key: "tableUnit",
|
|
1149
|
-
ref: Y,
|
|
1150
|
-
onClose: rt
|
|
1151
|
-
}), Fe({
|
|
1152
|
-
content: h(() => [
|
|
1153
|
-
(s(), B(d(Ct), {
|
|
1154
|
-
key: `table_${Ge.value}`,
|
|
1155
|
-
colNames: ce.value.colNames,
|
|
1156
|
-
head: ce.value.head,
|
|
1157
|
-
body: ce.value.body,
|
|
1158
|
-
config: ce.value.config,
|
|
1159
|
-
title: e.value.table.useDialog ? "" : te.value.title,
|
|
1160
|
-
withCloseButton: !e.value.table.useDialog,
|
|
1161
|
-
isCursorPointer: M.value,
|
|
1162
|
-
onClose: rt
|
|
1163
|
-
}, {
|
|
1164
|
-
th: h(({ th: l }) => [
|
|
1165
|
-
k("div", {
|
|
1166
|
-
innerHTML: l,
|
|
1167
|
-
style: { display: "flex", "align-items": "center" }
|
|
1168
|
-
}, null, 8, ua)
|
|
1169
|
-
]),
|
|
1170
|
-
td: h(({ td: l }) => [
|
|
1171
|
-
ht(he(l.name || l), 1)
|
|
1172
|
-
]),
|
|
1173
|
-
_: 1
|
|
1174
|
-
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton", "isCursorPointer"]))
|
|
1175
|
-
]),
|
|
1176
|
-
_: 2
|
|
1177
|
-
}, [
|
|
1178
|
-
e.value.table.useDialog ? {
|
|
1179
|
-
name: "title",
|
|
1180
|
-
fn: h(() => [
|
|
1181
|
-
ht(he(te.value.title), 1)
|
|
1182
|
-
]),
|
|
1183
|
-
key: "0"
|
|
1184
|
-
} : void 0,
|
|
1185
|
-
e.value.table.useDialog ? {
|
|
1186
|
-
name: "actions",
|
|
1187
|
-
fn: h(() => [
|
|
1188
|
-
k("button", {
|
|
1189
|
-
tabindex: "0",
|
|
1190
|
-
class: "vue-ui-user-options-button",
|
|
1191
|
-
onClick: a[1] || (a[1] = (l) => _e(e.value.userOptions.callbacks.csv)),
|
|
1192
|
-
style: ae({ cursor: M.value ? "pointer" : "default" })
|
|
1193
|
-
}, [
|
|
1194
|
-
de(d(kt), {
|
|
1195
|
-
name: "fileCsv",
|
|
1196
|
-
stroke: te.value.props.color
|
|
1197
|
-
}, null, 8, ["stroke"])
|
|
1198
|
-
], 4)
|
|
1199
|
-
]),
|
|
1200
|
-
key: "1"
|
|
1201
|
-
} : void 0
|
|
1202
|
-
]), 1040)) : b("", !0),
|
|
1203
|
-
p(t.$slots, "skeleton", {}, () => [
|
|
1204
|
-
d(me) ? (s(), B(Pl, { key: 0 })) : b("", !0)
|
|
1205
|
-
], !0)
|
|
1206
|
-
], 46, Ul));
|
|
1207
|
-
}
|
|
1208
|
-
}, Aa = /* @__PURE__ */ Rl(sa, [["__scopeId", "data-v-8be3d29f"]]);
|
|
1209
|
-
export {
|
|
1210
|
-
Aa as default
|
|
1211
|
-
};
|