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,1220 +0,0 @@
|
|
|
1
|
-
import { useCssVars as ia, defineAsyncComponent as Q, ref as v, shallowRef as ft, computed as m, toRefs as ca, watch as Te, onMounted as gt, onBeforeUnmount as pt, openBlock as r, createElementBlock as i, unref as d, normalizeStyle as E, normalizeClass as U, createBlock as G, withCtx as p, renderSlot as h, normalizeProps as N, guardReactiveProps as R, createCommentVNode as f, createElementVNode as I, createSlots as Oe, withModifiers as bt, createVNode as be, Fragment as V, renderList as Z, mergeProps as mt, toDisplayString as J, Teleport as va, resolveDynamicComponent as da, createTextVNode as yt, nextTick as Be } from "vue";
|
|
2
|
-
import { j as Le, t as kt, m as ha, p as me, o as fa, q as Ct, r as ga, n as pa, s as ba, X as ma, W as ya, l as De, ar as ka, at as Ca, a0 as $a, a1 as wa, k as Aa } from "./lib-GwPnJSrY.js";
|
|
3
|
-
import { t as Ma, u as Pa } from "./useResponsive-DfdjqQps.js";
|
|
4
|
-
import { u as Ia } from "./useConfig-CIgyKZ6R.js";
|
|
5
|
-
import { u as xa, B as _a } from "./BaseScanner-BhhkKVoj.js";
|
|
6
|
-
import { u as Sa } from "./usePrinter-DiK5R6k-.js";
|
|
7
|
-
import { u as Ta } from "./useSvgExport-ByUukOZt.js";
|
|
8
|
-
import { u as Ee } from "./useNestedProp-BBT0mbHh.js";
|
|
9
|
-
import { u as Oa } from "./useThemeCheck-D1ZYXUwG.js";
|
|
10
|
-
import { u as Ba } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
|
-
import { u as La } from "./useChartAccessibility-9icAAmYg.js";
|
|
12
|
-
import Da from "./img-BYYzY_QU.js";
|
|
13
|
-
import { _ as Ea } from "./Shape-CSyWYgXc.js";
|
|
14
|
-
import Na from "./Title-BfyrP-jp.js";
|
|
15
|
-
import Ra from "./vue_ui_chord-Bc1_ocwK.js";
|
|
16
|
-
import Fa from "./Legend-1LMMsPxL.js";
|
|
17
|
-
import { _ as za } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
18
|
-
const Ua = ["id"], Va = ["id"], Xa = ["xmlns", "viewBox"], ja = ["width", "height"], Ga = { key: 1 }, Ya = ["id", "d"], Wa = { key: 2 }, qa = ["transform"], Ha = ["d", "fill", "stroke", "stroke-width", "onMouseenter", "onMouseleave", "onClick"], Qa = ["d", "fill", "stroke", "stroke-width"], Za = ["d", "fill"], Ja = ["d", "fill", "stroke", "stroke-width", "onMouseenter", "onClick", "onMouseleave"], Ka = ["d", "fill", "stroke", "stroke-width"], eo = ["d", "fill", "stroke", "stroke-width"], to = ["d", "fill", "stroke", "stroke-width"], ao = { key: 0 }, oo = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], lo = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], no = ["cx", "cy", "r", "stroke", "stroke-width", "fill"], so = ["transform", "fill", "text-anchor", "font-size", "font-weight"], ro = { key: 1 }, uo = ["font-size", "font-weight", "fill"], io = ["href"], co = ["transform", "text-anchor", "font-size", "font-weight", "fill", "innerHTML"], vo = {
|
|
19
|
-
key: 4,
|
|
20
|
-
class: "vue-data-ui-watermark"
|
|
21
|
-
}, ho = ["id"], fo = ["onClick"], go = {
|
|
22
|
-
key: 7,
|
|
23
|
-
"data-dom-to-png-ignore": "",
|
|
24
|
-
class: "reset-wrapper"
|
|
25
|
-
}, po = { style: { "text-align": "right", width: "100%" } }, bo = {
|
|
26
|
-
__name: "vue-ui-chord",
|
|
27
|
-
props: {
|
|
28
|
-
dataset: {
|
|
29
|
-
type: Object,
|
|
30
|
-
default() {
|
|
31
|
-
return {};
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
config: {
|
|
35
|
-
type: Object,
|
|
36
|
-
default() {
|
|
37
|
-
return {};
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
emits: ["selectLegend", "selectGroup", "selectRibbon", "copyAlt"],
|
|
42
|
-
setup($t, { expose: wt, emit: At }) {
|
|
43
|
-
ia((e) => ({
|
|
44
|
-
v78a6832a: e.slicerColor
|
|
45
|
-
}));
|
|
46
|
-
const Mt = Q(() => import("./vue-ui-accordion-BGHTqIBt.js")), Ne = Q(() => import("./BaseIcon-CNx8Tzl5.js")), Pt = Q(() => import("./DataTable-Bo1pmAqG.js")), It = Q(() => import("./PackageVersion-DN9d0ME5.js")), xt = Q(() => import("./PenAndPaper-DWV1FMIi.js")), _t = Q(() => import("./UserOptions-CrLqEimB.js")), St = Q(() => import("./BaseDraggableDialog-DSpKTn3R.js")), { vue_ui_chord: Tt } = Ia(), { isThemeValid: Ot, warnInvalidTheme: Bt } = Oa(), x = $t, ae = At, F = v(!!x.dataset && Object.hasOwn(x.dataset, "matrix")), w = v(Le()), A = v(null), C = v(null), b = v(null), Re = v(0), B = v(null), Fe = v(null), ze = v(null), Ue = v(null), Ve = v(null), ye = v(0), ke = v(0), Ce = v(0), K = v(!1), X = ft(null), ee = ft(null), Xe = v(!1), oe = v(null), $e = v(null), ie = v(!1), ce = v(!1), t = v(Pe()), Y = m(() => t.value.userOptions.useCursorPointer), Lt = m(() => kt({
|
|
47
|
-
defaultConfig: {
|
|
48
|
-
useCssAnimation: !1,
|
|
49
|
-
userOptions: { show: !1 },
|
|
50
|
-
table: { show: !1 },
|
|
51
|
-
style: {
|
|
52
|
-
chart: {
|
|
53
|
-
backgroundColor: "#99999930",
|
|
54
|
-
legend: {
|
|
55
|
-
backgroundColor: "transparent"
|
|
56
|
-
},
|
|
57
|
-
arcs: {
|
|
58
|
-
stroke: "#6A6A6A",
|
|
59
|
-
labels: {
|
|
60
|
-
show: !1
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
ribbons: {
|
|
64
|
-
stroke: "#6A6A6A",
|
|
65
|
-
underlayerOpacity: 0,
|
|
66
|
-
labels: {
|
|
67
|
-
show: !1
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
userConfig: t.value.skeletonConfig ?? {}
|
|
74
|
-
})), { loading: je, FINAL_DATASET: M, manualLoading: le } = xa({
|
|
75
|
-
...ca(x),
|
|
76
|
-
FINAL_CONFIG: t,
|
|
77
|
-
prepareConfig: Pe,
|
|
78
|
-
callback: () => {
|
|
79
|
-
Promise.resolve().then(async () => {
|
|
80
|
-
await Be(), W.value.showTable = t.value.table.show;
|
|
81
|
-
});
|
|
82
|
-
},
|
|
83
|
-
skeletonDataset: x.config?.skeletonDataset ?? {
|
|
84
|
-
matrix: [
|
|
85
|
-
[12e3, 6e3, 9e3, 3e3],
|
|
86
|
-
[2e3, 1e4, 2e3, 6001],
|
|
87
|
-
[8e3, 1600, 8e3, 8001],
|
|
88
|
-
[1e3, 1e3, 1e3, 7001]
|
|
89
|
-
],
|
|
90
|
-
labels: [],
|
|
91
|
-
colors: ["#DBDBDB", "#C4C4C4", "#ADADAD", "#969696"]
|
|
92
|
-
},
|
|
93
|
-
skeletonConfig: kt({
|
|
94
|
-
defaultConfig: t.value,
|
|
95
|
-
userConfig: Lt.value
|
|
96
|
-
})
|
|
97
|
-
}), { userOptionsVisible: we, setUserOptionsVisibility: Ge, keepUserOptionState: Ye } = Ba({ config: t.value }), { svgRef: te } = La({ config: t.value.style.chart.title }), { isPrinting: Ae, isImaging: Me, generatePdf: We, generateImage: qe } = Sa({
|
|
98
|
-
elementId: `chord_${w.value}`,
|
|
99
|
-
fileName: t.value.style.chart.title.text || "vue-ui-chord",
|
|
100
|
-
options: t.value.userOptions.print
|
|
101
|
-
}), W = v({
|
|
102
|
-
showTable: t.value.table.show
|
|
103
|
-
});
|
|
104
|
-
function Pe() {
|
|
105
|
-
const e = Ee({
|
|
106
|
-
userConfig: x.config,
|
|
107
|
-
defaultConfig: Tt
|
|
108
|
-
}), o = e.theme;
|
|
109
|
-
if (!o) return e;
|
|
110
|
-
if (!Ot.value(e))
|
|
111
|
-
return Bt(e), e;
|
|
112
|
-
const a = Ee({
|
|
113
|
-
userConfig: Ra[o] || x.config,
|
|
114
|
-
defaultConfig: e
|
|
115
|
-
}), l = Ee({
|
|
116
|
-
userConfig: x.config,
|
|
117
|
-
defaultConfig: a
|
|
118
|
-
});
|
|
119
|
-
return {
|
|
120
|
-
...l,
|
|
121
|
-
customPalette: l.customPalette.length ? l.customPalette : ha[o] || me
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
Te(() => x.config, (e) => {
|
|
125
|
-
je.value || (t.value = Pe()), we.value = !t.value.userOptions.showOnChartHover, Ie(), ye.value += 1, ke.value += 1, Ce.value += 1, _.value = t.value.initialRotation, W.value.showTable = t.value.table.show;
|
|
126
|
-
}, { deep: !0 });
|
|
127
|
-
const He = m(() => t.value.debug);
|
|
128
|
-
Te(() => x.dataset, () => {
|
|
129
|
-
Qe(), Ie(), ye.value += 1, ke.value += 1, Ce.value += 1;
|
|
130
|
-
});
|
|
131
|
-
function Qe() {
|
|
132
|
-
if (fa(x.dataset)) {
|
|
133
|
-
Ct({
|
|
134
|
-
componentName: "VueUiChord",
|
|
135
|
-
type: "dataset",
|
|
136
|
-
debug: He.value
|
|
137
|
-
}), F.value = !1, le.value = !0;
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
const e = ga({
|
|
141
|
-
datasetObject: x.dataset,
|
|
142
|
-
requiredAttributes: ["matrix"]
|
|
143
|
-
});
|
|
144
|
-
if (e.length) {
|
|
145
|
-
e.forEach((s) => {
|
|
146
|
-
Ct({
|
|
147
|
-
componentName: "VueUiChord",
|
|
148
|
-
type: "datasetAttribute",
|
|
149
|
-
property: s,
|
|
150
|
-
debug: He.value
|
|
151
|
-
});
|
|
152
|
-
}), F.value = !1, le.value = !0;
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
const o = x.dataset.matrix;
|
|
156
|
-
if (!Array.isArray(o) || o.length < 2) {
|
|
157
|
-
console.warn(`VueUiChord: dataset.matrix requires a minimum of 2 datapoints, for example:
|
|
158
|
-
|
|
159
|
-
matrix:[
|
|
160
|
-
[1, 1],
|
|
161
|
-
[1, 1]
|
|
162
|
-
]`), F.value = !1, le.value = !0;
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
const a = o.length, l = o.findIndex((s) => !Array.isArray(s) || s.length !== a);
|
|
166
|
-
if (l !== -1) {
|
|
167
|
-
console.warn(
|
|
168
|
-
`VueUiChord - Invalid matrix: dataset.matrix at index ${l} has ${Array.isArray(o[l]) ? o[l].length : "NaN"} elements instead of the required ${a}
|
|
169
|
-
|
|
170
|
-
dataset.matrix[${l}] = [${Array.isArray(o[l]) ? o[l].toString() : "invalid"}]`
|
|
171
|
-
), F.value = !1, le.value = !0;
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
F.value = !0, le.value = !1;
|
|
175
|
-
}
|
|
176
|
-
function Ie() {
|
|
177
|
-
if (Qe(), t.value.responsive) {
|
|
178
|
-
const e = Ma(() => {
|
|
179
|
-
const { width: o, height: a, heightNoTitle: l, heightSource: s, heightTitle: n, heightLegend: u } = Pa({
|
|
180
|
-
chart: B.value,
|
|
181
|
-
title: t.value.style.chart.title.text ? Fe.value : null,
|
|
182
|
-
legend: t.value.style.chart.legend.show ? ze.value : null,
|
|
183
|
-
source: Ue.value,
|
|
184
|
-
noTitle: Ve.value
|
|
185
|
-
}), g = n + u + s + l;
|
|
186
|
-
o < a ? B.value.style.width = "100%" : (B.value.style.height = "100%", te.value.style.height = `calc(100% - ${g}px)`);
|
|
187
|
-
}, 100);
|
|
188
|
-
X.value && (ee.value && X.value.unobserve(ee.value), X.value.disconnect()), X.value = new ResizeObserver(e), ee.value = B.value.parentNode, X.value.observe(ee.value), e();
|
|
189
|
-
}
|
|
190
|
-
Ze.value = setTimeout(() => {
|
|
191
|
-
K.value = !0;
|
|
192
|
-
}, 500);
|
|
193
|
-
}
|
|
194
|
-
function Dt() {
|
|
195
|
-
if (!M.value || !Object.hasOwn(M.value, "matrix") || M.value.matrix.length < 2) {
|
|
196
|
-
console.warn(`VueUiChord: dataset.matrix requires a minimum of 2 datapoints, for example:
|
|
197
|
-
|
|
198
|
-
matrix:[
|
|
199
|
-
[1, 1],
|
|
200
|
-
[1, 1]
|
|
201
|
-
]`), F.value = !1;
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
M.value.matrix.forEach((e, o) => {
|
|
205
|
-
e.length !== M.value.matrix.length && (console.warn(`VueUiChord - Invalid matrix: dataset.matrix at index ${o} has ${e.length} elements instead of the required ${M.value.matrix.length}
|
|
206
|
-
|
|
207
|
-
dataset.matrix[${o}] = [${e.toString()}] has a length of ${e.length} but should have the same length as the matrix itself (${M.value.matrix.length})`), F.value = !1);
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
const Ze = v(null);
|
|
211
|
-
gt(() => {
|
|
212
|
-
Xe.value = !0, Ie();
|
|
213
|
-
});
|
|
214
|
-
const L = v({
|
|
215
|
-
height: 600,
|
|
216
|
-
width: 600
|
|
217
|
-
}), Et = m(() => t.value.userOptions.show && !t.value.style.chart.title.text), Nt = m(() => pa(t.value.customPalette)), y = m(() => ({
|
|
218
|
-
inner: L.value.width * 0.3 * t.value.style.chart.arcs.innerRadiusRatio,
|
|
219
|
-
outer: L.value.width * 0.34 * t.value.style.chart.arcs.outerRadiusRatio
|
|
220
|
-
})), Rt = m(() => t.value.style.chart.arcs.padAngle / 100), k = m(() => ({
|
|
221
|
-
matrix: M.value.matrix ?? [[0]],
|
|
222
|
-
labels: M.value.labels ?? [""],
|
|
223
|
-
colors: M.value.colors && Array.isArray(M.value.colors) && M.value.colors.length ? M.value.colors.map((e) => ba(e)) : M.value.matrix.map((e, o) => Nt.value[o] || me[o] || me[o % me.length])
|
|
224
|
-
}));
|
|
225
|
-
function Ft(e, o) {
|
|
226
|
-
const a = e.length, l = y.value.inner, s = new Array(a).fill(0);
|
|
227
|
-
let n = 0;
|
|
228
|
-
for (let c = 0; c < a; c += 1)
|
|
229
|
-
for (let $ = 0; $ < a; $ += 1)
|
|
230
|
-
s[c] += e[c][$], n += e[c][$];
|
|
231
|
-
const u = (2 * Math.PI - o * a) / n, g = [];
|
|
232
|
-
let S = 0;
|
|
233
|
-
for (let c = 0; c < a; c += 1) {
|
|
234
|
-
const $ = S, O = $ + s[c] * u;
|
|
235
|
-
g.push({
|
|
236
|
-
index: c,
|
|
237
|
-
pattern: `pattern_${w.value}_${c}`,
|
|
238
|
-
startAngle: $,
|
|
239
|
-
endAngle: O,
|
|
240
|
-
name: k.value.labels[c],
|
|
241
|
-
id: Le(),
|
|
242
|
-
color: k.value.colors[c],
|
|
243
|
-
proportion: s[c] / n
|
|
244
|
-
}), S = O + o;
|
|
245
|
-
}
|
|
246
|
-
const T = [];
|
|
247
|
-
for (let c = 0; c < a; c += 1) {
|
|
248
|
-
const $ = e[c].map((D, j) => ({ j, v: D }));
|
|
249
|
-
$.sort((D, j) => j.v - D.v);
|
|
250
|
-
let O = g[c].startAngle;
|
|
251
|
-
for (const { j: D, v: j } of $) {
|
|
252
|
-
const H = O, ue = H + j * u;
|
|
253
|
-
T.push({
|
|
254
|
-
index: c,
|
|
255
|
-
subIndex: D,
|
|
256
|
-
pattern: `pattern_${w.value}_${c}`,
|
|
257
|
-
startAngle: H,
|
|
258
|
-
endAngle: ue,
|
|
259
|
-
value: j,
|
|
260
|
-
groupName: k.value.labels[c],
|
|
261
|
-
groupId: g[c].id,
|
|
262
|
-
groupColor: k.value.colors[c],
|
|
263
|
-
midAngle: (H + ue) / 2,
|
|
264
|
-
midBaseX: Math.cos((H + ue) / 2 - Math.PI / 2) * l,
|
|
265
|
-
midBaseY: Math.sin((H + ue) / 2 - Math.PI / 2) * l
|
|
266
|
-
}), O = ue;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
const z = [];
|
|
270
|
-
for (const c of T) {
|
|
271
|
-
const $ = T.find(
|
|
272
|
-
(O) => O.index === c.subIndex && O.subIndex === c.index
|
|
273
|
-
);
|
|
274
|
-
z.push({ source: c, target: $, id: Le() });
|
|
275
|
-
}
|
|
276
|
-
return { groups: g, chords: z };
|
|
277
|
-
}
|
|
278
|
-
const P = m(() => {
|
|
279
|
-
const e = Ft(k.value.matrix, Rt.value);
|
|
280
|
-
return Dt(), e.chords.sort(
|
|
281
|
-
(o, a) => Math.max(a.source.value, a.target.value) - Math.max(o.source.value, o.target.value)
|
|
282
|
-
), e;
|
|
283
|
-
}), zt = m(() => {
|
|
284
|
-
const e = y.value.outer + t.value.style.chart.ribbons.labels.offset + 12, a = t.value.style.chart.ribbons.labels.fontSize * 0.6, l = [];
|
|
285
|
-
if (C.value) {
|
|
286
|
-
const n = C.value;
|
|
287
|
-
if (n.source.value) {
|
|
288
|
-
const u = String(n.source.value);
|
|
289
|
-
l.push({
|
|
290
|
-
id: n.id + "-src",
|
|
291
|
-
theta: n.source.midAngle,
|
|
292
|
-
w: u.length * a / e,
|
|
293
|
-
midBaseX: n.source.midBaseX,
|
|
294
|
-
midBaseY: n.source.midBaseY,
|
|
295
|
-
groupColor: n.source.groupColor,
|
|
296
|
-
value: n.source.value
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
if (n.target && n.target.value && n.target.value !== n.source.value) {
|
|
300
|
-
const u = String(n.target.value);
|
|
301
|
-
l.push({
|
|
302
|
-
id: n.id + "-tgt",
|
|
303
|
-
theta: n.target.midAngle,
|
|
304
|
-
w: u.length * a / e,
|
|
305
|
-
midBaseX: n.target.midBaseX,
|
|
306
|
-
midBaseY: n.target.midBaseY,
|
|
307
|
-
groupColor: n.target.groupColor,
|
|
308
|
-
value: n.target.value
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
return l;
|
|
312
|
-
}
|
|
313
|
-
function s(n) {
|
|
314
|
-
P.value.chords.filter((u) => u.source.groupId === n && u.source.value).forEach((u) => {
|
|
315
|
-
{
|
|
316
|
-
const g = String(u.source.value);
|
|
317
|
-
l.push({
|
|
318
|
-
id: u.id + "-src",
|
|
319
|
-
theta: u.source.midAngle,
|
|
320
|
-
w: g.length * a / e,
|
|
321
|
-
midBaseX: u.source.midBaseX,
|
|
322
|
-
midBaseY: u.source.midBaseY,
|
|
323
|
-
groupColor: u.source.groupColor,
|
|
324
|
-
value: u.source.value
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
if (u.target && u.target.value && u.target.value !== u.source.value) {
|
|
328
|
-
const g = String(u.target.value);
|
|
329
|
-
l.push({
|
|
330
|
-
id: u.id + "-tgt",
|
|
331
|
-
theta: u.target.midAngle,
|
|
332
|
-
w: g.length * a / e,
|
|
333
|
-
midBaseX: u.target.midBaseX,
|
|
334
|
-
midBaseY: u.target.midBaseY,
|
|
335
|
-
groupColor: u.target.groupColor,
|
|
336
|
-
value: u.target.value
|
|
337
|
-
});
|
|
338
|
-
}
|
|
339
|
-
});
|
|
340
|
-
}
|
|
341
|
-
return b.value && s(b.value), A.value && s(A.value.id), l;
|
|
342
|
-
}), Ut = m(() => {
|
|
343
|
-
const e = zt.value.map((s) => ({ ...s })).sort((s, n) => s.theta - n.theta), o = t.value.style.chart.ribbons.labels.minSeparationDeg * Math.PI / 180;
|
|
344
|
-
let a = !0, l = 0;
|
|
345
|
-
for (; a && l++ < 10; ) {
|
|
346
|
-
a = !1;
|
|
347
|
-
for (let g = 1; g < e.length; g += 1) {
|
|
348
|
-
const S = e[g - 1], T = e[g], z = S.theta + S.w + o;
|
|
349
|
-
T.theta < z && (T.theta = z, a = !0);
|
|
350
|
-
}
|
|
351
|
-
const s = e[0], n = e[e.length - 1], u = n.theta + n.w + o - 2 * Math.PI;
|
|
352
|
-
s.theta < u && (s.theta = u, a = !0);
|
|
353
|
-
}
|
|
354
|
-
return e;
|
|
355
|
-
});
|
|
356
|
-
function Je(e, o, a, l) {
|
|
357
|
-
const s = e - Math.PI / 2, n = o - Math.PI / 2, u = Math.cos(s) * a, g = Math.sin(s) * a, S = Math.cos(n) * a, T = Math.sin(n) * a, z = Math.cos(n) * l, c = Math.sin(n) * l, $ = Math.cos(s) * l, O = Math.sin(s) * l, D = o - e > Math.PI ? 1 : 0;
|
|
358
|
-
return `M${u},${g} A${a},${a} 0 ${D} 1 ${S},${T} L${z},${c} A${l},${l} 0 ${D} 0 ${$},${O} Z`;
|
|
359
|
-
}
|
|
360
|
-
function ve(e, o) {
|
|
361
|
-
const a = y.value.inner, l = e.startAngle - Math.PI / 2, s = e.endAngle - Math.PI / 2, n = o.startAngle - Math.PI / 2, u = o.endAngle - Math.PI / 2, g = Math.cos(l) * a, S = Math.sin(l) * a, T = Math.cos(s) * a, z = Math.sin(s) * a, c = Math.cos(n) * a, $ = Math.sin(n) * a, O = Math.cos(u) * a, D = Math.sin(u) * a, j = e.endAngle - e.startAngle > Math.PI ? 1 : 0, H = o.endAngle - o.startAngle > Math.PI ? 1 : 0;
|
|
362
|
-
return `M${g},${S}A${a},${a} 0 ${j} 1 ${T},${z}Q0,0 ${c},${$}A${a},${a} 0 ${H} 1 ${O},${D}Q0,0 ${g},${S}Z`;
|
|
363
|
-
}
|
|
364
|
-
const Ke = m(() => _.value * Math.PI / 180);
|
|
365
|
-
function Vt(e) {
|
|
366
|
-
return (e.startAngle + e.endAngle) / 2;
|
|
367
|
-
}
|
|
368
|
-
function Xt(e) {
|
|
369
|
-
return ((Vt(e) + Ke.value) % (2 * Math.PI) + 2 * Math.PI) % (2 * Math.PI);
|
|
370
|
-
}
|
|
371
|
-
function jt(e) {
|
|
372
|
-
let o = e + Ke.value;
|
|
373
|
-
return o = (o % (2 * Math.PI) + 2 * Math.PI) % (2 * Math.PI), o > Math.PI ? "end" : "start";
|
|
374
|
-
}
|
|
375
|
-
function Gt(e) {
|
|
376
|
-
const o = e - Math.PI / 2, a = Math.cos(o) * (y.value.outer + t.value.style.chart.arcs.labels.offset + 24), l = Math.sin(o) * (y.value.outer + t.value.style.chart.arcs.labels.offset + 24);
|
|
377
|
-
return `translate(${a},${l})`;
|
|
378
|
-
}
|
|
379
|
-
function Yt(e, o, a) {
|
|
380
|
-
const l = e - Math.PI / 2, s = o - Math.PI / 2, n = Math.cos(l) * a, u = Math.sin(l) * a, g = Math.cos(s) * a, S = Math.sin(s) * a, T = o - e > Math.PI ? 1 : 0;
|
|
381
|
-
return `M${n},${u} A${a},${a} 0 ${T} 1 ${g},${S}`;
|
|
382
|
-
}
|
|
383
|
-
const _ = v(t.value.initialRotation), ne = v(!1);
|
|
384
|
-
let et = 0, tt = 0;
|
|
385
|
-
function at(e) {
|
|
386
|
-
const o = te.value.getBoundingClientRect(), a = o.left + o.width / 2, l = o.top + o.height / 2, s = e.clientX ?? e.touches[0].clientX, n = e.clientY ?? e.touches[0].clientY;
|
|
387
|
-
return Math.atan2(n - l, s - a);
|
|
388
|
-
}
|
|
389
|
-
function ot(e) {
|
|
390
|
-
!t.value.enableRotation || se.value || (e.preventDefault(), ne.value = !0, et = _.value, tt = at(e));
|
|
391
|
-
}
|
|
392
|
-
function de(e) {
|
|
393
|
-
if (!ne.value) return;
|
|
394
|
-
const o = at(e);
|
|
395
|
-
_.value = et + (o - tt) * 180 / Math.PI;
|
|
396
|
-
}
|
|
397
|
-
function he() {
|
|
398
|
-
ne.value = !1;
|
|
399
|
-
}
|
|
400
|
-
function lt(e) {
|
|
401
|
-
return Aa(
|
|
402
|
-
t.value.style.chart.ribbons.labels.formatter,
|
|
403
|
-
e,
|
|
404
|
-
De({
|
|
405
|
-
p: t.value.style.chart.ribbons.labels.prefix,
|
|
406
|
-
v: e,
|
|
407
|
-
s: t.value.style.chart.ribbons.labels.suffix,
|
|
408
|
-
r: t.value.style.chart.ribbons.labels.rounding
|
|
409
|
-
})
|
|
410
|
-
);
|
|
411
|
-
}
|
|
412
|
-
gt(() => {
|
|
413
|
-
window.addEventListener("mousemove", de), window.addEventListener("mouseup", he), window.addEventListener("touchmove", de, { passive: !1 }), window.addEventListener("touchend", he);
|
|
414
|
-
}), pt(() => {
|
|
415
|
-
window.removeEventListener("mousemove", de), window.removeEventListener("mouseup", he), window.removeEventListener("touchmove", de), window.removeEventListener("touchend", he), clearTimeout(Ze.value), X.value && (ee.value && X.value.unobserve(ee.value), X.value.disconnect());
|
|
416
|
-
});
|
|
417
|
-
const fe = v(!1);
|
|
418
|
-
function nt(e) {
|
|
419
|
-
fe.value = e, Re.value += 1;
|
|
420
|
-
}
|
|
421
|
-
function Wt(e, o) {
|
|
422
|
-
t.value.events.datapointEnter && t.value.events.datapointEnter({ datapoint: e, seriesIndex: o }), !b.value && (A.value = e);
|
|
423
|
-
}
|
|
424
|
-
function qt(e, o) {
|
|
425
|
-
A.value = null, t.value.events.datapointLeave && t.value.events.datapointLeave({ datapoint: e, seriesIndex: o });
|
|
426
|
-
}
|
|
427
|
-
function Ht(e, o) {
|
|
428
|
-
ae("selectGroup", e), t.value.events.datapointClick && t.value.events.datapointClick({ datapoint: e, seriesIndex: o });
|
|
429
|
-
}
|
|
430
|
-
function Qt(e, o) {
|
|
431
|
-
t.value.events.datapointEnter && t.value.events.datapointEnter({ datapoint: e, seriesIndex: o }), !b.value && (C.value = e);
|
|
432
|
-
}
|
|
433
|
-
function Zt(e, o) {
|
|
434
|
-
C.value = null, t.value.events.datapointLeave && t.value.events.datapointLeave({ datapoint: e, seriesIndex: o });
|
|
435
|
-
}
|
|
436
|
-
function Jt(e, o) {
|
|
437
|
-
ae("selectRibbon", e), t.value.events.datapointClick && t.value.events.datapointClick({ datapoint: e, seriesIndex: o });
|
|
438
|
-
}
|
|
439
|
-
function st(e) {
|
|
440
|
-
return !b.value && !A.value && !C.value ? 0.8 : (b.value ? b.value === e.source.groupId : A.value ? A.value.id === e.source.groupId : C.value?.id === e.id) ? 1 : 0.1;
|
|
441
|
-
}
|
|
442
|
-
function rt(e) {
|
|
443
|
-
return !b.value && !A.value && !C.value || (b.value ? b.value === e.id : A.value ? A.value.id === e.id : [C.value?.source.groupId, C.value?.target.groupId].includes(e.id)) ? 1 : 0.3;
|
|
444
|
-
}
|
|
445
|
-
const se = v(!1);
|
|
446
|
-
function xe() {
|
|
447
|
-
se.value = !se.value;
|
|
448
|
-
}
|
|
449
|
-
function ut() {
|
|
450
|
-
W.value.showTable = !W.value.showTable;
|
|
451
|
-
}
|
|
452
|
-
function Kt() {
|
|
453
|
-
return P.value;
|
|
454
|
-
}
|
|
455
|
-
const q = v(null);
|
|
456
|
-
function it() {
|
|
457
|
-
const e = t.value.initialRotation;
|
|
458
|
-
q.value !== null && cancelAnimationFrame(q.value);
|
|
459
|
-
const o = () => {
|
|
460
|
-
_.value += (e - _.value) * 0.05, Math.abs(_.value - e) < 0.1 ? (_.value = e, q.value = null) : q.value = requestAnimationFrame(o);
|
|
461
|
-
};
|
|
462
|
-
q.value = requestAnimationFrame(o);
|
|
463
|
-
}
|
|
464
|
-
pt(() => {
|
|
465
|
-
q.value !== null && cancelAnimationFrame(q.value);
|
|
466
|
-
});
|
|
467
|
-
function ct(e) {
|
|
468
|
-
e === b.value ? (b.value = null, ae("selectLegend", null)) : (b.value = e, ae("selectLegend", P.value.groups.find((o) => o.id === e)));
|
|
469
|
-
}
|
|
470
|
-
const _e = m(() => P.value.groups.map((e, o) => ({
|
|
471
|
-
name: e.name,
|
|
472
|
-
color: e.color,
|
|
473
|
-
shape: "circle",
|
|
474
|
-
patternIndex: o,
|
|
475
|
-
pattern: `pattern_${w.value}_${o}`,
|
|
476
|
-
id: e.id,
|
|
477
|
-
select: () => ct(e.id),
|
|
478
|
-
opacity: b.value ? b.value === e.id ? 1 : 0.3 : 1
|
|
479
|
-
}))), ea = m(() => ({
|
|
480
|
-
cy: "chord-div-legend",
|
|
481
|
-
backgroundColor: t.value.style.chart.legend.backgroundColor,
|
|
482
|
-
color: t.value.style.chart.legend.color,
|
|
483
|
-
fontSize: t.value.style.chart.legend.fontSize,
|
|
484
|
-
paddingBottom: 12,
|
|
485
|
-
fontWeight: t.value.style.chart.legend.bold ? "bold" : ""
|
|
486
|
-
})), ge = m(() => {
|
|
487
|
-
const e = P.value.groups.map((a, l) => ({
|
|
488
|
-
name: a.name || l,
|
|
489
|
-
color: a.color
|
|
490
|
-
})), o = k.value.matrix;
|
|
491
|
-
return { head: e, body: o };
|
|
492
|
-
}), pe = m(() => {
|
|
493
|
-
const e = [{ name: "", color: null }, ...ge.value.head], o = ge.value.body.map((s, n) => [
|
|
494
|
-
ge.value.head[n],
|
|
495
|
-
...ge.value.body[n]
|
|
496
|
-
]), a = {
|
|
497
|
-
th: {
|
|
498
|
-
backgroundColor: t.value.table.th.backgroundColor,
|
|
499
|
-
color: t.value.table.th.color,
|
|
500
|
-
outline: t.value.table.th.outline
|
|
501
|
-
},
|
|
502
|
-
td: {
|
|
503
|
-
backgroundColor: t.value.table.td.backgroundColor,
|
|
504
|
-
color: t.value.table.td.color,
|
|
505
|
-
outline: t.value.table.td.outline
|
|
506
|
-
},
|
|
507
|
-
breakpoint: t.value.table.responsiveBreakpoint
|
|
508
|
-
};
|
|
509
|
-
return {
|
|
510
|
-
colNames: e,
|
|
511
|
-
head: e,
|
|
512
|
-
body: o,
|
|
513
|
-
config: a
|
|
514
|
-
};
|
|
515
|
-
});
|
|
516
|
-
function Se(e = null) {
|
|
517
|
-
Be(() => {
|
|
518
|
-
const o = k.value.matrix.map((s, n) => [
|
|
519
|
-
[k.value.labels[n] || n],
|
|
520
|
-
s
|
|
521
|
-
]), a = [
|
|
522
|
-
[t.value.style.chart.title.text],
|
|
523
|
-
[t.value.style.chart.title.subtitle.text],
|
|
524
|
-
[
|
|
525
|
-
[""],
|
|
526
|
-
...k.value.labels.map((s, n) => [s || n])
|
|
527
|
-
]
|
|
528
|
-
].concat(o), l = $a(a);
|
|
529
|
-
e ? e(l) : wa({ csvContent: l, title: t.value.style.chart.title.text || "vue-ui-chord" });
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
async function ta({ scale: e = 2 } = {}) {
|
|
533
|
-
if (!B.value) return;
|
|
534
|
-
const { width: o, height: a } = B.value.getBoundingClientRect(), l = o / a, { imageUri: s, base64: n } = await Da({ domElement: B.value, base64: !0, img: !0, scale: e });
|
|
535
|
-
return {
|
|
536
|
-
imageUri: s,
|
|
537
|
-
base64: n,
|
|
538
|
-
title: t.value.style.chart.title.text,
|
|
539
|
-
width: o,
|
|
540
|
-
height: a,
|
|
541
|
-
aspectRatio: l
|
|
542
|
-
};
|
|
543
|
-
}
|
|
544
|
-
function aa(e, o) {
|
|
545
|
-
return `${k.value.labels[o]}${t.value.style.chart.arcs.labels.showPercentage ? De({
|
|
546
|
-
p: " (",
|
|
547
|
-
v: isNaN(e.proportion) ? 0 : e.proportion * 100,
|
|
548
|
-
s: "%)",
|
|
549
|
-
r: t.value.style.chart.arcs.labels.roundingPercentage
|
|
550
|
-
}) : ""}`;
|
|
551
|
-
}
|
|
552
|
-
const re = m(() => {
|
|
553
|
-
const e = t.value.table.useDialog && !t.value.table.show, o = W.value.showTable;
|
|
554
|
-
return {
|
|
555
|
-
component: e ? St : Mt,
|
|
556
|
-
title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? `: ${t.value.style.chart.title.subtitle.text}` : ""}`,
|
|
557
|
-
props: e ? {
|
|
558
|
-
backgroundColor: t.value.table.th.backgroundColor,
|
|
559
|
-
color: t.value.table.th.color,
|
|
560
|
-
headerColor: t.value.table.th.color,
|
|
561
|
-
headerBg: t.value.table.th.backgroundColor,
|
|
562
|
-
isFullscreen: fe.value,
|
|
563
|
-
fullscreenParent: B.value,
|
|
564
|
-
forcedWidth: Math.min(800, window.innerWidth * 0.8),
|
|
565
|
-
isCursorPointer: Y.value
|
|
566
|
-
} : {
|
|
567
|
-
hideDetails: !0,
|
|
568
|
-
config: {
|
|
569
|
-
open: o,
|
|
570
|
-
maxHeight: 1e4,
|
|
571
|
-
body: {
|
|
572
|
-
backgroundColor: t.value.style.chart.backgroundColor,
|
|
573
|
-
color: t.value.style.chart.color
|
|
574
|
-
},
|
|
575
|
-
head: {
|
|
576
|
-
backgroundColor: t.value.style.chart.backgroundColor,
|
|
577
|
-
color: t.value.style.chart.color
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
};
|
|
582
|
-
});
|
|
583
|
-
Te(() => W.value.showTable, (e) => {
|
|
584
|
-
t.value.table.show || (e && t.value.table.useDialog && oe.value ? oe.value.open() : "close" in oe.value && oe.value.close());
|
|
585
|
-
});
|
|
586
|
-
function vt() {
|
|
587
|
-
W.value.showTable = !1, $e.value && $e.value.setTableIconState(!1);
|
|
588
|
-
}
|
|
589
|
-
const oa = m(() => t.value.style.chart.backgroundColor), la = m(() => t.value.style.chart.legend), na = m(() => t.value.style.chart.title), { exportSvg: sa, getSvg: ra } = Ta({
|
|
590
|
-
svg: te,
|
|
591
|
-
title: na,
|
|
592
|
-
legend: la,
|
|
593
|
-
legendItems: _e,
|
|
594
|
-
backgroundColor: oa
|
|
595
|
-
});
|
|
596
|
-
async function dt({ isCb: e }) {
|
|
597
|
-
ce.value = !0, await Be();
|
|
598
|
-
try {
|
|
599
|
-
if (e) {
|
|
600
|
-
const { blob: o, url: a, text: l, dataUrl: s } = await ra();
|
|
601
|
-
await Promise.resolve(t.value.userOptions.callbacks.svg({ blob: o, url: a, text: l, dataUrl: s }));
|
|
602
|
-
} else
|
|
603
|
-
await Promise.resolve(sa());
|
|
604
|
-
} finally {
|
|
605
|
-
ce.value = !1;
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
function ua(e) {
|
|
609
|
-
if (e?.stage === "start") {
|
|
610
|
-
ie.value = !0;
|
|
611
|
-
return;
|
|
612
|
-
}
|
|
613
|
-
if (e?.stage === "end") {
|
|
614
|
-
ie.value = !1;
|
|
615
|
-
return;
|
|
616
|
-
}
|
|
617
|
-
qe();
|
|
618
|
-
}
|
|
619
|
-
async function ht() {
|
|
620
|
-
if (ae("copyAlt", {
|
|
621
|
-
config: t.value,
|
|
622
|
-
dataset: k.value
|
|
623
|
-
}), !t.value.userOptions.callbacks.altCopy) {
|
|
624
|
-
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
625
|
-
return;
|
|
626
|
-
}
|
|
627
|
-
await Promise.resolve(t.value.userOptions.callbacks.altCopy({
|
|
628
|
-
config: t.value,
|
|
629
|
-
dataset: k.value
|
|
630
|
-
}));
|
|
631
|
-
}
|
|
632
|
-
return wt({
|
|
633
|
-
getData: Kt,
|
|
634
|
-
getImage: ta,
|
|
635
|
-
generateCsv: Se,
|
|
636
|
-
generateImage: qe,
|
|
637
|
-
generateSvg: dt,
|
|
638
|
-
generatePdf: We,
|
|
639
|
-
toggleAnnotator: xe,
|
|
640
|
-
toggleTable: ut,
|
|
641
|
-
toggleFullscreen: nt,
|
|
642
|
-
copyAlt: ht
|
|
643
|
-
}), (e, o) => (r(), i("div", {
|
|
644
|
-
ref_key: "chordChart",
|
|
645
|
-
ref: B,
|
|
646
|
-
class: U({
|
|
647
|
-
"vue-data-ui-component": !0,
|
|
648
|
-
"vue-ui-chord": !0,
|
|
649
|
-
"vue-data-ui-wrapper-fullscreen": fe.value,
|
|
650
|
-
"vue-data-ui-responsive": t.value.responsive
|
|
651
|
-
}),
|
|
652
|
-
style: E(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),
|
|
653
|
-
id: `chord_${w.value}`,
|
|
654
|
-
onMouseenter: o[2] || (o[2] = () => d(Ge)(!0)),
|
|
655
|
-
onMouseleave: o[3] || (o[3] = () => d(Ge)(!1))
|
|
656
|
-
}, [
|
|
657
|
-
t.value.userOptions.buttons.annotator && d(te) ? (r(), G(d(xt), {
|
|
658
|
-
key: 0,
|
|
659
|
-
color: t.value.style.chart.color,
|
|
660
|
-
backgroundColor: t.value.style.chart.backgroundColor,
|
|
661
|
-
active: se.value,
|
|
662
|
-
svgRef: d(te),
|
|
663
|
-
isCursorPointer: Y.value,
|
|
664
|
-
onClose: xe
|
|
665
|
-
}, {
|
|
666
|
-
"annotator-action-close": p(() => [
|
|
667
|
-
h(e.$slots, "annotator-action-close", {}, void 0, !0)
|
|
668
|
-
]),
|
|
669
|
-
"annotator-action-color": p(({ color: a }) => [
|
|
670
|
-
h(e.$slots, "annotator-action-color", N(R({ color: a })), void 0, !0)
|
|
671
|
-
]),
|
|
672
|
-
"annotator-action-draw": p(({ mode: a }) => [
|
|
673
|
-
h(e.$slots, "annotator-action-draw", N(R({ mode: a })), void 0, !0)
|
|
674
|
-
]),
|
|
675
|
-
"annotator-action-undo": p(({ disabled: a }) => [
|
|
676
|
-
h(e.$slots, "annotator-action-undo", N(R({ disabled: a })), void 0, !0)
|
|
677
|
-
]),
|
|
678
|
-
"annotator-action-redo": p(({ disabled: a }) => [
|
|
679
|
-
h(e.$slots, "annotator-action-redo", N(R({ disabled: a })), void 0, !0)
|
|
680
|
-
]),
|
|
681
|
-
"annotator-action-delete": p(({ disabled: a }) => [
|
|
682
|
-
h(e.$slots, "annotator-action-delete", N(R({ disabled: a })), void 0, !0)
|
|
683
|
-
]),
|
|
684
|
-
_: 3
|
|
685
|
-
}, 8, ["color", "backgroundColor", "active", "svgRef", "isCursorPointer"])) : f("", !0),
|
|
686
|
-
h(e.$slots, "userConfig", {}, void 0, !0),
|
|
687
|
-
Et.value ? (r(), i("div", {
|
|
688
|
-
key: 1,
|
|
689
|
-
ref_key: "noTitle",
|
|
690
|
-
ref: Ve,
|
|
691
|
-
class: "vue-data-ui-no-title-space",
|
|
692
|
-
style: "height:36px; width: 100%;background:transparent"
|
|
693
|
-
}, null, 512)) : f("", !0),
|
|
694
|
-
t.value.style.chart.title.text ? (r(), i("div", {
|
|
695
|
-
key: 2,
|
|
696
|
-
ref_key: "chartTitle",
|
|
697
|
-
ref: Fe,
|
|
698
|
-
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
699
|
-
}, [
|
|
700
|
-
(r(), G(Na, {
|
|
701
|
-
key: `title_${ye.value}`,
|
|
702
|
-
config: {
|
|
703
|
-
title: {
|
|
704
|
-
cy: "chord-div-title",
|
|
705
|
-
...t.value.style.chart.title
|
|
706
|
-
},
|
|
707
|
-
subtitle: {
|
|
708
|
-
cy: "chord-div-subtitle",
|
|
709
|
-
...t.value.style.chart.title.subtitle
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
}, null, 8, ["config"]))
|
|
713
|
-
], 512)) : f("", !0),
|
|
714
|
-
I("div", {
|
|
715
|
-
id: `legend-top-${w.value}`
|
|
716
|
-
}, null, 8, Va),
|
|
717
|
-
t.value.userOptions.show && F.value && (d(Ye) || d(we)) ? (r(), G(d(_t), {
|
|
718
|
-
ref_key: "userOptionsRef",
|
|
719
|
-
ref: $e,
|
|
720
|
-
key: `user_option_${Re.value}`,
|
|
721
|
-
backgroundColor: t.value.style.chart.backgroundColor,
|
|
722
|
-
color: t.value.style.chart.color,
|
|
723
|
-
isPrinting: d(Ae),
|
|
724
|
-
isImaging: d(Me),
|
|
725
|
-
uid: w.value,
|
|
726
|
-
hasTooltip: !1,
|
|
727
|
-
hasPdf: t.value.userOptions.buttons.pdf,
|
|
728
|
-
hasImg: t.value.userOptions.buttons.img,
|
|
729
|
-
hasSvg: t.value.userOptions.buttons.svg,
|
|
730
|
-
hasXls: t.value.userOptions.buttons.csv,
|
|
731
|
-
hasTable: t.value.userOptions.buttons.table,
|
|
732
|
-
hasLabel: !1,
|
|
733
|
-
hasFullscreen: t.value.userOptions.buttons.fullscreen,
|
|
734
|
-
hasAltCopy: t.value.userOptions.buttons.altCopy,
|
|
735
|
-
isFullscreen: fe.value,
|
|
736
|
-
chartElement: B.value,
|
|
737
|
-
position: t.value.userOptions.position,
|
|
738
|
-
titles: { ...t.value.userOptions.buttonTitles },
|
|
739
|
-
hasAnnotator: t.value.userOptions.buttons.annotator,
|
|
740
|
-
isAnnotation: se.value,
|
|
741
|
-
callbacks: t.value.userOptions.callbacks,
|
|
742
|
-
printScale: t.value.userOptions.print.scale,
|
|
743
|
-
tableDialog: t.value.table.useDialog,
|
|
744
|
-
isCursorPointer: Y.value,
|
|
745
|
-
onToggleFullscreen: nt,
|
|
746
|
-
onGeneratePdf: d(We),
|
|
747
|
-
onGenerateCsv: Se,
|
|
748
|
-
onGenerateImage: ua,
|
|
749
|
-
onGenerateSvg: dt,
|
|
750
|
-
onToggleTable: ut,
|
|
751
|
-
onToggleAnnotator: xe,
|
|
752
|
-
onCopyAlt: ht,
|
|
753
|
-
style: E({
|
|
754
|
-
visibility: d(Ye) ? d(we) ? "visible" : "hidden" : "visible"
|
|
755
|
-
})
|
|
756
|
-
}, Oe({ _: 2 }, [
|
|
757
|
-
e.$slots.menuIcon ? {
|
|
758
|
-
name: "menuIcon",
|
|
759
|
-
fn: p(({ isOpen: a, color: l }) => [
|
|
760
|
-
h(e.$slots, "menuIcon", N(R({ isOpen: a, color: l })), void 0, !0)
|
|
761
|
-
]),
|
|
762
|
-
key: "0"
|
|
763
|
-
} : void 0,
|
|
764
|
-
e.$slots.optionPdf ? {
|
|
765
|
-
name: "optionPdf",
|
|
766
|
-
fn: p(() => [
|
|
767
|
-
h(e.$slots, "optionPdf", {}, void 0, !0)
|
|
768
|
-
]),
|
|
769
|
-
key: "1"
|
|
770
|
-
} : void 0,
|
|
771
|
-
e.$slots.optionCsv ? {
|
|
772
|
-
name: "optionCsv",
|
|
773
|
-
fn: p(() => [
|
|
774
|
-
h(e.$slots, "optionCsv", {}, void 0, !0)
|
|
775
|
-
]),
|
|
776
|
-
key: "2"
|
|
777
|
-
} : void 0,
|
|
778
|
-
e.$slots.optionImg ? {
|
|
779
|
-
name: "optionImg",
|
|
780
|
-
fn: p(() => [
|
|
781
|
-
h(e.$slots, "optionImg", {}, void 0, !0)
|
|
782
|
-
]),
|
|
783
|
-
key: "3"
|
|
784
|
-
} : void 0,
|
|
785
|
-
e.$slots.optionSvg ? {
|
|
786
|
-
name: "optionSvg",
|
|
787
|
-
fn: p(() => [
|
|
788
|
-
h(e.$slots, "optionSvg", {}, void 0, !0)
|
|
789
|
-
]),
|
|
790
|
-
key: "4"
|
|
791
|
-
} : void 0,
|
|
792
|
-
e.$slots.optionTable ? {
|
|
793
|
-
name: "optionTable",
|
|
794
|
-
fn: p(() => [
|
|
795
|
-
h(e.$slots, "optionTable", {}, void 0, !0)
|
|
796
|
-
]),
|
|
797
|
-
key: "5"
|
|
798
|
-
} : void 0,
|
|
799
|
-
e.$slots.optionFullscreen ? {
|
|
800
|
-
name: "optionFullscreen",
|
|
801
|
-
fn: p(({ toggleFullscreen: a, isFullscreen: l }) => [
|
|
802
|
-
h(e.$slots, "optionFullscreen", N(R({ toggleFullscreen: a, isFullscreen: l })), void 0, !0)
|
|
803
|
-
]),
|
|
804
|
-
key: "6"
|
|
805
|
-
} : void 0,
|
|
806
|
-
e.$slots.optionAnnotator ? {
|
|
807
|
-
name: "optionAnnotator",
|
|
808
|
-
fn: p(({ toggleAnnotator: a, isAnnotator: l }) => [
|
|
809
|
-
h(e.$slots, "optionAnnotator", N(R({ toggleAnnotator: a, isAnnotator: l })), void 0, !0)
|
|
810
|
-
]),
|
|
811
|
-
key: "7"
|
|
812
|
-
} : void 0,
|
|
813
|
-
e.$slots.optionAltCopy ? {
|
|
814
|
-
name: "optionAltCopy",
|
|
815
|
-
fn: p(({ altCopy: a }) => [
|
|
816
|
-
h(e.$slots, "optionAltCopy", N(R({ altCopy: a })), void 0, !0)
|
|
817
|
-
]),
|
|
818
|
-
key: "8"
|
|
819
|
-
} : void 0
|
|
820
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasFullscreen", "hasAltCopy", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "isCursorPointer", "onGeneratePdf", "style"])) : f("", !0),
|
|
821
|
-
(r(), i("svg", {
|
|
822
|
-
xmlns: d(ma),
|
|
823
|
-
ref_key: "svgRef",
|
|
824
|
-
ref: te,
|
|
825
|
-
viewBox: `0 0 ${L.value.width} ${L.value.height}`,
|
|
826
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
827
|
-
style: {
|
|
828
|
-
overflow: "visible"
|
|
829
|
-
},
|
|
830
|
-
class: U({ "vue-ui-chord-rotating": ne.value, "vue-ui-chord-idle": !ne.value }),
|
|
831
|
-
onMousedown: bt(ot, ["prevent"]),
|
|
832
|
-
onTouchstart: bt(ot, ["prevent"])
|
|
833
|
-
}, [
|
|
834
|
-
be(d(It)),
|
|
835
|
-
e.$slots["chart-background"] ? (r(), i("foreignObject", {
|
|
836
|
-
key: 0,
|
|
837
|
-
x: 0,
|
|
838
|
-
y: 0,
|
|
839
|
-
width: L.value.width <= 0 ? 10 : L.value.width,
|
|
840
|
-
height: L.value.height <= 0 ? 10 : L.value.height,
|
|
841
|
-
style: {
|
|
842
|
-
pointerEvents: "none"
|
|
843
|
-
}
|
|
844
|
-
}, [
|
|
845
|
-
h(e.$slots, "chart-background", {}, void 0, !0)
|
|
846
|
-
], 8, ja)) : f("", !0),
|
|
847
|
-
t.value.style.chart.arcs.labels.curved ? (r(), i("defs", Ga, [
|
|
848
|
-
(r(!0), i(V, null, Z(P.value.groups, (a, l) => (r(), i("path", {
|
|
849
|
-
key: `labelPath-${l}`,
|
|
850
|
-
id: `labelPath-${l}_${w.value}`,
|
|
851
|
-
d: Yt(
|
|
852
|
-
a.startAngle,
|
|
853
|
-
a.endAngle,
|
|
854
|
-
(y.value.inner + y.value.outer) / 2 + t.value.style.chart.arcs.labels.offset
|
|
855
|
-
),
|
|
856
|
-
fill: "none"
|
|
857
|
-
}, null, 8, Ya))), 128))
|
|
858
|
-
])) : f("", !0),
|
|
859
|
-
e.$slots.pattern ? (r(), i("g", Wa, [
|
|
860
|
-
(r(!0), i(V, null, Z(P.value.groups, (a, l) => (r(), i("defs", null, [
|
|
861
|
-
h(e.$slots, "pattern", mt({ ref_for: !0 }, { seriesIndex: a.index, patternId: `pattern_${w.value}_${l}` }), void 0, !0)
|
|
862
|
-
]))), 256))
|
|
863
|
-
])) : f("", !0),
|
|
864
|
-
I("g", {
|
|
865
|
-
transform: `translate(${L.value.width / 2}, ${L.value.height / 2}) rotate(${_.value})`
|
|
866
|
-
}, [
|
|
867
|
-
(r(!0), i(V, null, Z(P.value.groups, (a, l) => (r(), i("g", null, [
|
|
868
|
-
(r(), i("path", {
|
|
869
|
-
class: U({ "vue-ui-chord-arc": !0, "vue-ui-chord-arc-animated": t.value.useCssAnimation && !K.value }),
|
|
870
|
-
key: `arc-${l}`,
|
|
871
|
-
d: Je(
|
|
872
|
-
a.startAngle,
|
|
873
|
-
a.endAngle,
|
|
874
|
-
y.value.outer,
|
|
875
|
-
y.value.inner
|
|
876
|
-
),
|
|
877
|
-
fill: k.value.colors[l],
|
|
878
|
-
stroke: t.value.style.chart.arcs.stroke,
|
|
879
|
-
"stroke-width": t.value.style.chart.arcs.strokeWidth,
|
|
880
|
-
"stroke-linecap": "round",
|
|
881
|
-
"stroke-linejoin": "round",
|
|
882
|
-
style: E({
|
|
883
|
-
opacity: rt(a)
|
|
884
|
-
}),
|
|
885
|
-
onMouseenter: (s) => Wt(a, l),
|
|
886
|
-
onMouseleave: (s) => qt(a, l),
|
|
887
|
-
onClick: (s) => Ht(a, l)
|
|
888
|
-
}, null, 46, Ha)),
|
|
889
|
-
e.$slots.pattern ? (r(), i("path", {
|
|
890
|
-
class: U({ "vue-ui-chord-arc": !0, "vue-ui-chord-arc-animated": t.value.useCssAnimation && !K.value }),
|
|
891
|
-
key: `arc-${l}`,
|
|
892
|
-
d: Je(
|
|
893
|
-
a.startAngle,
|
|
894
|
-
a.endAngle,
|
|
895
|
-
y.value.outer,
|
|
896
|
-
y.value.inner
|
|
897
|
-
),
|
|
898
|
-
fill: `url(#${a.pattern})`,
|
|
899
|
-
stroke: t.value.style.chart.arcs.stroke,
|
|
900
|
-
"stroke-width": t.value.style.chart.arcs.strokeWidth,
|
|
901
|
-
"stroke-linecap": "round",
|
|
902
|
-
"stroke-linejoin": "round",
|
|
903
|
-
style: E({
|
|
904
|
-
opacity: rt(a),
|
|
905
|
-
pointerEvents: "none"
|
|
906
|
-
})
|
|
907
|
-
}, null, 14, Qa)) : f("", !0)
|
|
908
|
-
]))), 256)),
|
|
909
|
-
I("g", null, [
|
|
910
|
-
(r(!0), i(V, null, Z(A.value ? P.value.chords.filter((a) => a.source.groupId === A.value.id) : b.value ? P.value.chords.filter((a) => a.source.groupId === b.value) : P.value.chords, (a, l) => (r(), i(V, {
|
|
911
|
-
key: `ribbon-${a.id}`
|
|
912
|
-
}, [
|
|
913
|
-
a.source.value ? (r(), i("path", {
|
|
914
|
-
key: 0,
|
|
915
|
-
class: U({ "vue-ui-chord-ribbon": !0, "vue-ui-chord-ribbon-animated": t.value.useCssAnimation && !K.value }),
|
|
916
|
-
d: ve(a.source, a.target),
|
|
917
|
-
fill: t.value.style.chart.backgroundColor,
|
|
918
|
-
style: E({ opacity: t.value.style.chart.ribbons.underlayerOpacity })
|
|
919
|
-
}, null, 14, Za)) : f("", !0),
|
|
920
|
-
a.source.value ? (r(), i("path", {
|
|
921
|
-
key: 1,
|
|
922
|
-
class: U({ "vue-ui-chord-ribbon": !0, "vue-ui-chord-ribbon-animated": t.value.useCssAnimation && !K.value }),
|
|
923
|
-
d: ve(a.source, a.target),
|
|
924
|
-
fill: k.value.colors[a.source.index],
|
|
925
|
-
stroke: t.value.style.chart.ribbons.stroke,
|
|
926
|
-
"stroke-width": t.value.style.chart.ribbons.strokeWidth,
|
|
927
|
-
"stroke-linecap": "round",
|
|
928
|
-
"stroke-linejoin": "round",
|
|
929
|
-
style: E({ opacity: st(a) }),
|
|
930
|
-
onMouseenter: (s) => Qt({
|
|
931
|
-
...a,
|
|
932
|
-
path: ve(a.source, a.target),
|
|
933
|
-
color: k.value.colors[a.source.index]
|
|
934
|
-
}, l),
|
|
935
|
-
onClick: (s) => Jt({
|
|
936
|
-
...a,
|
|
937
|
-
color: k.value.colors[a.source.index]
|
|
938
|
-
}, l),
|
|
939
|
-
onMouseleave: (s) => Zt({
|
|
940
|
-
...a,
|
|
941
|
-
color: k.value.colors[a.source.index]
|
|
942
|
-
}, l)
|
|
943
|
-
}, null, 46, Ja)) : f("", !0),
|
|
944
|
-
a.source.value && e.$slots.pattern ? (r(), i("path", {
|
|
945
|
-
key: 2,
|
|
946
|
-
class: U({ "vue-ui-chord-ribbon": !0, "vue-ui-chord-ribbon-animated": t.value.useCssAnimation && !K.value }),
|
|
947
|
-
d: ve(a.source, a.target),
|
|
948
|
-
fill: `url(#pattern_${w.value}_${a.source.index})`,
|
|
949
|
-
stroke: t.value.style.chart.ribbons.stroke,
|
|
950
|
-
"stroke-width": t.value.style.chart.ribbons.strokeWidth,
|
|
951
|
-
"stroke-linecap": "round",
|
|
952
|
-
"stroke-linejoin": "round",
|
|
953
|
-
style: E({
|
|
954
|
-
opacity: st(a),
|
|
955
|
-
pointerEvents: "none"
|
|
956
|
-
})
|
|
957
|
-
}, null, 14, Ka)) : f("", !0)
|
|
958
|
-
], 64))), 128)),
|
|
959
|
-
C.value ? (r(), i("path", {
|
|
960
|
-
key: 0,
|
|
961
|
-
d: C.value.path,
|
|
962
|
-
fill: C.value.color,
|
|
963
|
-
stroke: t.value.style.chart.ribbons.stroke,
|
|
964
|
-
"stroke-width": t.value.style.chart.ribbons.strokeWidth,
|
|
965
|
-
"stroke-linecap": "round",
|
|
966
|
-
"stroke-linejoin": "round",
|
|
967
|
-
class: U({ "vue-ui-chord-ribbon": !0 }),
|
|
968
|
-
style: {
|
|
969
|
-
pointerEvents: "none"
|
|
970
|
-
}
|
|
971
|
-
}, null, 8, eo)) : f("", !0),
|
|
972
|
-
C.value && e.$slots.pattern ? (r(), i("path", {
|
|
973
|
-
key: 1,
|
|
974
|
-
d: C.value.path,
|
|
975
|
-
fill: `url(#${C.value.source.pattern})`,
|
|
976
|
-
stroke: t.value.style.chart.ribbons.stroke,
|
|
977
|
-
"stroke-width": t.value.style.chart.ribbons.strokeWidth,
|
|
978
|
-
"stroke-linecap": "round",
|
|
979
|
-
"stroke-linejoin": "round",
|
|
980
|
-
class: U({ "vue-ui-chord-ribbon": !0 }),
|
|
981
|
-
style: {
|
|
982
|
-
pointerEvents: "none"
|
|
983
|
-
}
|
|
984
|
-
}, null, 8, to)) : f("", !0)
|
|
985
|
-
]),
|
|
986
|
-
(A.value || C.value || b.value) && t.value.style.chart.ribbons.labels.show ? (r(), i("g", ao, [
|
|
987
|
-
(r(!0), i(V, null, Z(Ut.value, (a) => (r(), i(V, {
|
|
988
|
-
key: a.id
|
|
989
|
-
}, [
|
|
990
|
-
I("line", {
|
|
991
|
-
x1: a.midBaseX,
|
|
992
|
-
y1: a.midBaseY,
|
|
993
|
-
x2: Math.cos(a.theta - Math.PI / 2) * (y.value.outer + t.value.style.chart.ribbons.labels.offset + 12),
|
|
994
|
-
y2: Math.sin(a.theta - Math.PI / 2) * (y.value.outer + t.value.style.chart.ribbons.labels.offset + 12),
|
|
995
|
-
stroke: t.value.style.chart.backgroundColor,
|
|
996
|
-
"stroke-width": t.value.style.chart.ribbons.labels.connector.strokeWidth * 3,
|
|
997
|
-
"pointer-events": "none"
|
|
998
|
-
}, null, 8, oo),
|
|
999
|
-
I("line", {
|
|
1000
|
-
x1: a.midBaseX,
|
|
1001
|
-
y1: a.midBaseY,
|
|
1002
|
-
x2: Math.cos(a.theta - Math.PI / 2) * (y.value.outer + t.value.style.chart.ribbons.labels.offset + 12),
|
|
1003
|
-
y2: Math.sin(a.theta - Math.PI / 2) * (y.value.outer + t.value.style.chart.ribbons.labels.offset + 12),
|
|
1004
|
-
stroke: t.value.style.chart.ribbons.labels.connector.stroke,
|
|
1005
|
-
"stroke-width": t.value.style.chart.ribbons.labels.connector.strokeWidth,
|
|
1006
|
-
"pointer-events": "none"
|
|
1007
|
-
}, null, 8, lo),
|
|
1008
|
-
t.value.style.chart.ribbons.labels.marker.show ? (r(), i("circle", {
|
|
1009
|
-
key: 0,
|
|
1010
|
-
cx: Math.cos(a.theta - Math.PI / 2) * (y.value.outer + t.value.style.chart.ribbons.labels.offset + 12),
|
|
1011
|
-
cy: Math.sin(a.theta - Math.PI / 2) * (y.value.outer + t.value.style.chart.ribbons.labels.offset + 12),
|
|
1012
|
-
r: t.value.style.chart.ribbons.labels.marker.radius,
|
|
1013
|
-
stroke: t.value.style.chart.ribbons.labels.marker.stroke,
|
|
1014
|
-
"stroke-width": t.value.style.chart.ribbons.labels.marker.strokeWidth,
|
|
1015
|
-
fill: a.groupColor,
|
|
1016
|
-
"pointer-events": "none"
|
|
1017
|
-
}, null, 8, no)) : f("", !0),
|
|
1018
|
-
I("text", {
|
|
1019
|
-
transform: `
|
|
1020
|
-
translate(
|
|
1021
|
-
${Math.cos(a.theta - Math.PI / 2) * (y.value.outer + t.value.style.chart.ribbons.labels.offset + 24)},
|
|
1022
|
-
${Math.sin(a.theta - Math.PI / 2) * (y.value.outer + t.value.style.chart.ribbons.labels.offset + 24)}
|
|
1023
|
-
) rotate(${-_.value})
|
|
1024
|
-
`,
|
|
1025
|
-
fill: t.value.style.chart.ribbons.labels.useSerieColor ? a.groupColor : t.value.style.chart.ribbons.labels.color,
|
|
1026
|
-
"text-anchor": jt(a.theta),
|
|
1027
|
-
"font-size": t.value.style.chart.ribbons.labels.fontSize,
|
|
1028
|
-
"font-weight": t.value.style.chart.ribbons.labels.bold ? "bold" : "normal",
|
|
1029
|
-
dy: ".35em",
|
|
1030
|
-
"pointer-events": "none"
|
|
1031
|
-
}, J(lt(a.value)), 9, so)
|
|
1032
|
-
], 64))), 128))
|
|
1033
|
-
])) : f("", !0),
|
|
1034
|
-
t.value.style.chart.arcs.labels.show ? (r(), i("g", ro, [
|
|
1035
|
-
t.value.style.chart.arcs.labels.curved ? (r(!0), i(V, { key: 0 }, Z(P.value.groups, (a, l) => (r(), i("text", {
|
|
1036
|
-
class: "vue-ui-chord-label-curved",
|
|
1037
|
-
key: `curved-label-${l}`,
|
|
1038
|
-
"font-size": t.value.style.chart.arcs.labels.fontSize,
|
|
1039
|
-
"font-weight": t.value.style.chart.arcs.labels.bold ? "bold" : "normal",
|
|
1040
|
-
fill: t.value.style.chart.arcs.labels.adaptColorToBackground ? d(ya)(k.value.colors[l]) : t.value.style.chart.arcs.labels.color
|
|
1041
|
-
}, [
|
|
1042
|
-
I("textPath", {
|
|
1043
|
-
href: `#labelPath-${l}_${w.value}`,
|
|
1044
|
-
startOffset: "50%",
|
|
1045
|
-
"text-anchor": "middle"
|
|
1046
|
-
}, J(k.value.labels[l]) + J(t.value.style.chart.arcs.labels.showPercentage ? d(De)({
|
|
1047
|
-
p: " (",
|
|
1048
|
-
v: isNaN(a.proportion) ? 0 : a.proportion * 100,
|
|
1049
|
-
s: "%)",
|
|
1050
|
-
r: t.value.style.chart.arcs.labels.roundingPercentage
|
|
1051
|
-
}) : ""), 9, io)
|
|
1052
|
-
], 8, uo))), 128)) : !A.value && !C.value && !b.value ? (r(!0), i(V, { key: 1 }, Z(P.value.groups, (a, l) => (r(), i("text", {
|
|
1053
|
-
class: "vue-ui-chord-label-straight",
|
|
1054
|
-
key: `label-${l}`,
|
|
1055
|
-
transform: `
|
|
1056
|
-
${Gt((a.startAngle + a.endAngle) / 2)}
|
|
1057
|
-
rotate(${-_.value})
|
|
1058
|
-
`,
|
|
1059
|
-
dy: ".35em",
|
|
1060
|
-
"text-anchor": Xt(a) > Math.PI ? "end" : "start",
|
|
1061
|
-
"font-size": t.value.style.chart.arcs.labels.fontSize,
|
|
1062
|
-
"font-weight": t.value.style.chart.arcs.labels.bold ? "bold" : "normal",
|
|
1063
|
-
fill: t.value.style.chart.arcs.labels.color,
|
|
1064
|
-
innerHTML: d(ka)({
|
|
1065
|
-
content: d(Ca)(aa(a, l)),
|
|
1066
|
-
fontSize: t.value.style.chart.arcs.labels.fontSize,
|
|
1067
|
-
fill: t.value.style.chart.arcs.labels.color,
|
|
1068
|
-
x: 0,
|
|
1069
|
-
y: 0
|
|
1070
|
-
})
|
|
1071
|
-
}, null, 8, co))), 128)) : f("", !0)
|
|
1072
|
-
])) : f("", !0)
|
|
1073
|
-
], 8, qa),
|
|
1074
|
-
h(e.$slots, "svg", {
|
|
1075
|
-
svg: {
|
|
1076
|
-
height: 600,
|
|
1077
|
-
width: 600,
|
|
1078
|
-
isPrintingImg: d(Ae) | d(Me) | ie.value,
|
|
1079
|
-
isPrintingSvg: ce.value
|
|
1080
|
-
}
|
|
1081
|
-
}, void 0, !0)
|
|
1082
|
-
], 42, Xa)),
|
|
1083
|
-
e.$slots.watermark ? (r(), i("div", vo, [
|
|
1084
|
-
h(e.$slots, "watermark", N(R({ isPrinting: d(Ae) || d(Me) || ie.value || ce.value })), void 0, !0)
|
|
1085
|
-
])) : f("", !0),
|
|
1086
|
-
I("div", {
|
|
1087
|
-
id: `legend-bottom-${w.value}`
|
|
1088
|
-
}, null, 8, ho),
|
|
1089
|
-
Xe.value ? (r(), G(va, {
|
|
1090
|
-
key: 5,
|
|
1091
|
-
to: t.value.style.chart.legend.position === "top" ? `#legend-top-${w.value}` : `#legend-bottom-${w.value}`
|
|
1092
|
-
}, [
|
|
1093
|
-
I("div", {
|
|
1094
|
-
ref_key: "chartLegend",
|
|
1095
|
-
ref: ze
|
|
1096
|
-
}, [
|
|
1097
|
-
t.value.style.chart.legend.show ? (r(), G(Fa, {
|
|
1098
|
-
key: `legend_${Ce.value}`,
|
|
1099
|
-
legendSet: _e.value,
|
|
1100
|
-
config: ea.value,
|
|
1101
|
-
isCursorPointer: Y.value,
|
|
1102
|
-
onClickMarker: o[0] || (o[0] = ({ legend: a }) => ct(a.id))
|
|
1103
|
-
}, Oe({
|
|
1104
|
-
item: p(({ legend: a }) => [
|
|
1105
|
-
I("div", {
|
|
1106
|
-
style: E({
|
|
1107
|
-
opacity: b.value ? b.value === a.id ? 1 : 0.3 : 1
|
|
1108
|
-
}),
|
|
1109
|
-
onClick: (l) => a.select()
|
|
1110
|
-
}, J(a.name), 13, fo)
|
|
1111
|
-
]),
|
|
1112
|
-
_: 2
|
|
1113
|
-
}, [
|
|
1114
|
-
e.$slots.pattern ? {
|
|
1115
|
-
name: "legend-pattern",
|
|
1116
|
-
fn: p(({ legend: a, index: l }) => [
|
|
1117
|
-
be(Ea, {
|
|
1118
|
-
shape: a.shape,
|
|
1119
|
-
radius: 30,
|
|
1120
|
-
stroke: "none",
|
|
1121
|
-
plot: { x: 30, y: 30 },
|
|
1122
|
-
fill: `url(#pattern_${w.value}_${l})`
|
|
1123
|
-
}, null, 8, ["shape", "fill"])
|
|
1124
|
-
]),
|
|
1125
|
-
key: "0"
|
|
1126
|
-
} : void 0
|
|
1127
|
-
]), 1032, ["legendSet", "config", "isCursorPointer"])) : f("", !0),
|
|
1128
|
-
h(e.$slots, "legend", { legend: _e.value }, void 0, !0)
|
|
1129
|
-
], 512)
|
|
1130
|
-
], 8, ["to"])) : f("", !0),
|
|
1131
|
-
e.$slots.source ? (r(), i("div", {
|
|
1132
|
-
key: 6,
|
|
1133
|
-
ref_key: "source",
|
|
1134
|
-
ref: Ue,
|
|
1135
|
-
dir: "auto"
|
|
1136
|
-
}, [
|
|
1137
|
-
h(e.$slots, "source", {}, void 0, !0)
|
|
1138
|
-
], 512)) : f("", !0),
|
|
1139
|
-
_.value !== t.value.initialRotation ? (r(), i("div", go, [
|
|
1140
|
-
h(e.$slots, "reset-action", { reset: it }, () => [
|
|
1141
|
-
I("button", {
|
|
1142
|
-
"data-cy-reset": "",
|
|
1143
|
-
tabindex: "0",
|
|
1144
|
-
role: "button",
|
|
1145
|
-
class: "vue-data-ui-refresh-button",
|
|
1146
|
-
style: E({
|
|
1147
|
-
background: t.value.style.chart.backgroundColor,
|
|
1148
|
-
cursor: Y.value ? "pointer" : "default"
|
|
1149
|
-
}),
|
|
1150
|
-
onClick: it
|
|
1151
|
-
}, [
|
|
1152
|
-
be(d(Ne), {
|
|
1153
|
-
name: "refresh",
|
|
1154
|
-
stroke: t.value.style.chart.color
|
|
1155
|
-
}, null, 8, ["stroke"])
|
|
1156
|
-
], 4)
|
|
1157
|
-
], !0)
|
|
1158
|
-
])) : f("", !0),
|
|
1159
|
-
F.value && t.value.userOptions.buttons.table ? (r(), G(da(re.value.component), mt({ key: 8 }, re.value.props, {
|
|
1160
|
-
ref_key: "tableUnit",
|
|
1161
|
-
ref: oe,
|
|
1162
|
-
onClose: vt
|
|
1163
|
-
}), Oe({
|
|
1164
|
-
content: p(() => [
|
|
1165
|
-
(r(), G(d(Pt), {
|
|
1166
|
-
key: `table_${ke.value}`,
|
|
1167
|
-
colNames: pe.value.colNames,
|
|
1168
|
-
head: pe.value.head,
|
|
1169
|
-
body: pe.value.body,
|
|
1170
|
-
config: pe.value.config,
|
|
1171
|
-
title: t.value.table.useDialog ? "" : re.value.title,
|
|
1172
|
-
withCloseButton: !t.value.table.useDialog,
|
|
1173
|
-
isCursorPointer: Y.value,
|
|
1174
|
-
onClose: vt
|
|
1175
|
-
}, {
|
|
1176
|
-
th: p(({ th: a }) => [
|
|
1177
|
-
yt(J(a.name), 1)
|
|
1178
|
-
]),
|
|
1179
|
-
td: p(({ td: a }) => [
|
|
1180
|
-
I("div", po, J(a.name ? a.name : lt(a)), 1)
|
|
1181
|
-
]),
|
|
1182
|
-
_: 1
|
|
1183
|
-
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton", "isCursorPointer"]))
|
|
1184
|
-
]),
|
|
1185
|
-
_: 2
|
|
1186
|
-
}, [
|
|
1187
|
-
t.value.table.useDialog ? {
|
|
1188
|
-
name: "title",
|
|
1189
|
-
fn: p(() => [
|
|
1190
|
-
yt(J(re.value.title), 1)
|
|
1191
|
-
]),
|
|
1192
|
-
key: "0"
|
|
1193
|
-
} : void 0,
|
|
1194
|
-
t.value.table.useDialog ? {
|
|
1195
|
-
name: "actions",
|
|
1196
|
-
fn: p(() => [
|
|
1197
|
-
I("button", {
|
|
1198
|
-
tabindex: "0",
|
|
1199
|
-
class: "vue-ui-user-options-button",
|
|
1200
|
-
onClick: o[1] || (o[1] = (a) => Se(t.value.userOptions.callbacks.csv)),
|
|
1201
|
-
style: E({ cursor: Y.value ? "pointer" : "default" })
|
|
1202
|
-
}, [
|
|
1203
|
-
be(d(Ne), {
|
|
1204
|
-
name: "fileCsv",
|
|
1205
|
-
stroke: re.value.props.color
|
|
1206
|
-
}, null, 8, ["stroke"])
|
|
1207
|
-
], 4)
|
|
1208
|
-
]),
|
|
1209
|
-
key: "1"
|
|
1210
|
-
} : void 0
|
|
1211
|
-
]), 1040)) : f("", !0),
|
|
1212
|
-
h(e.$slots, "skeleton", {}, () => [
|
|
1213
|
-
d(je) ? (r(), G(_a, { key: 0 })) : f("", !0)
|
|
1214
|
-
], !0)
|
|
1215
|
-
], 46, Ua));
|
|
1216
|
-
}
|
|
1217
|
-
}, Do = /* @__PURE__ */ za(bo, [["__scopeId", "data-v-9e6da50e"]]);
|
|
1218
|
-
export {
|
|
1219
|
-
Do as default
|
|
1220
|
-
};
|