vue-data-ui 3.22.9 → 3.22.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-DdymhUfY.js → Arrow-Ku6rQ87g.js} +1 -1
- package/dist/{BaseDraggableDialog-Av7Uxq5V.js → BaseDraggableDialog-CdkCqtag.js} +2 -2
- package/dist/{BaseIcon-UdRAvP2h.js → BaseIcon-CDTIUIKV.js} +1 -1
- package/dist/{BaseLegendToggle-DWtet-Hh.js → BaseLegendToggle-BrQ2OlzI.js} +1 -1
- package/dist/{BaseZoomControls-BY2KLqs6.js → BaseZoomControls-CkEX0292.js} +2 -2
- package/dist/{ColorPicker-DR_ummtM.js → ColorPicker-C959ZIW9.js} +2 -2
- package/dist/{DataTable-BxpTMgfK.js → DataTable-ByZy5gt1.js} +2 -2
- package/dist/{Legend-ROt6ugzW.js → Legend-5VQGLnmx.js} +2 -2
- package/dist/{NonSvgPenAndPaper-B6EG_Sga.js → NonSvgPenAndPaper-Bd8OzTqw.js} +3 -3
- package/dist/{PackageVersion-D__dRVRA.js → PackageVersion-BoTvk0i5.js} +1 -1
- package/dist/{PenAndPaper-DsXi7GJ-.js → PenAndPaper-CLaZJl6K.js} +3 -3
- package/dist/{Shape-UpH0a4Ur.js → Shape-B5ksaGa1.js} +3 -3
- package/dist/{Slicer-CW_XPIKL.js → Slicer-WsWTQPKt.js} +21 -21
- package/dist/{SlicerPreview-CTz41lOu.js → SlicerPreview-3n516NyE.js} +214 -214
- package/dist/{SparkTooltip-BTLN-Kex.js → SparkTooltip-CbYYc-xb.js} +1 -1
- package/dist/{Title-CcNiYzEo.js → Title-Cr3jP7Qd.js} +1 -1
- package/dist/{Tooltip-CxOrWlFy.js → Tooltip-CDbLl3TD.js} +1 -1
- package/dist/{UserOptions-trvJ26nz.js → UserOptions-BUQOnoPR.js} +2 -2
- package/dist/components/arrow.js +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-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-BbwhsRIr.js → dom-to-png-COPbGrdd.js} +1 -1
- package/dist/exposedLib-CZbtc2a6.js +25 -0
- package/dist/{img-DnP3eXuv.js → img-CNdXiUfZ.js} +1 -1
- package/dist/{labelUtils-DBEh078l.js → labelUtils-JaoYKi2N.js} +1 -1
- package/dist/{lib-JqW18y5I.js → lib-CnHx5WfV.js} +118 -107
- package/dist/{package-ByOT60IK.js → package-BRBLwZUc.js} +1 -1
- package/dist/{pdf-hj3gzrE7.js → pdf-CEMzBeuV.js} +1 -1
- package/dist/{render-common-D18VrP0h.js → render-common-DJXFRGhU.js} +10 -10
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/types/utils.d.ts +40 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-BGnDfZdg.js → useAutoSizeLabelsInsideViewbox-BUPt2iaP.js} +1 -1
- package/dist/{useNestedProp-DIuuzG1r.js → useNestedProp-D8NuRneO.js} +2 -2
- package/dist/{usePrinter-CqqHmnBI.js → usePrinter-B-X_Pub0.js} +2 -2
- package/dist/utils.js +26 -24
- package/dist/{vue-data-ui-ub3fCh6P.js → vue-data-ui-Bx_8d3b_.js} +68 -68
- package/dist/vue-data-ui.js +77 -77
- package/dist/vue-ui-3d-bar-CfUfbpSE.js +1825 -0
- package/dist/{vue-ui-accordion-CjAGqEJg.js → vue-ui-accordion-Oo3IsX3-.js} +3 -3
- package/dist/vue-ui-age-pyramid-DD-4y5Jd.js +1247 -0
- package/dist/{vue-ui-annotator-BIucnT0L.js → vue-ui-annotator-BvGE3lzE.js} +8 -8
- package/dist/vue-ui-bullet-DYOdbaO2.js +710 -0
- package/dist/vue-ui-bump-B8fJoxHF.js +1249 -0
- package/dist/{vue-ui-candlestick-DULUMU-Q.js → vue-ui-candlestick-BUP1JoNs.js} +287 -287
- package/dist/vue-ui-carousel-table-D-Bwhydt.js +455 -0
- package/dist/vue-ui-chestnut-C2VK2NEx.js +2042 -0
- package/dist/{vue-ui-chord-DL1M7cgL.js → vue-ui-chord-AA-QjUQI.js} +42 -42
- package/dist/{vue-ui-circle-pack-C1Pgq6si.js → vue-ui-circle-pack-CdBFGYOK.js} +37 -37
- package/dist/{vue-ui-cursor-d2uLAKTQ.js → vue-ui-cursor-Cm_J_5Gk.js} +5 -5
- package/dist/{vue-ui-dag-CVh9FpZr.js → vue-ui-dag-CgRph4-n.js} +32 -32
- package/dist/{vue-ui-dashboard-BH0N3ebj.js → vue-ui-dashboard-BuPw5QjB.js} +69 -69
- package/dist/{vue-ui-digits-R6wi3J-Y.js → vue-ui-digits-ClrukmcB.js} +3 -3
- package/dist/vue-ui-donut-Bc-EPZvu.js +2419 -0
- package/dist/{vue-ui-donut-BWDeVzLc.js → vue-ui-donut-DtQCrMKL.js} +207 -207
- package/dist/vue-ui-donut-evolution-DHkiY-BD.js +1522 -0
- package/dist/vue-ui-dumbbell-BlHEH4Mw.js +1564 -0
- package/dist/{vue-ui-flow-CNczKwTh.js → vue-ui-flow-PjwAW2tY.js} +71 -71
- package/dist/vue-ui-funnel-DojI09FV.js +782 -0
- package/dist/{vue-ui-galaxy-v3cTbUiM.js → vue-ui-galaxy-txYIK_LG.js} +276 -276
- package/dist/{vue-ui-gauge-DxvMjfoc.js → vue-ui-gauge-CoL0OzSd.js} +178 -178
- package/dist/{vue-ui-geo-BgmLkZZ2.js → vue-ui-geo-yuL-_sqF.js} +20 -20
- package/dist/{vue-ui-gizmo-n1kmcGeE.js → vue-ui-gizmo-CbC5zV3K.js} +9 -9
- package/dist/{vue-ui-heatmap-dSTh8ah_.js → vue-ui-heatmap-CwqsZIsR.js} +331 -331
- package/dist/{vue-ui-history-plot-N8BqMFVU.js → vue-ui-history-plot-CuWssH-D.js} +414 -414
- package/dist/vue-ui-horizontal-bar-Dyje3GND.js +1689 -0
- package/dist/{vue-ui-kpi-BKrUk9o8.js → vue-ui-kpi-BdYenScF.js} +3 -3
- package/dist/{vue-ui-mini-loader-D5we7V_W.js → vue-ui-mini-loader-BbwE3vBT.js} +2 -2
- package/dist/vue-ui-molecule-BBh31vmd.js +931 -0
- package/dist/{vue-ui-mood-radar-CpBRHQo_.js → vue-ui-mood-radar-B_6GFlaR.js} +261 -261
- package/dist/vue-ui-nested-donuts-BWq-At5Y.js +1493 -0
- package/dist/vue-ui-onion-BwGbSE-6.js +1200 -0
- package/dist/vue-ui-parallel-coordinate-plot-Bh9hNoqf.js +1416 -0
- package/dist/vue-ui-quadrant-B72Y4Zuw.js +1984 -0
- package/dist/{vue-ui-quick-chart-BO98uEPl.js → vue-ui-quick-chart-B3LF2ViM.js} +108 -108
- package/dist/vue-ui-radar-4v_E8oGX.js +1287 -0
- package/dist/{vue-ui-rating-CN-ZiAES.js → vue-ui-rating-CzLGCFWK.js} +101 -101
- package/dist/vue-ui-relation-circle-B_8dyIv2.js +924 -0
- package/dist/vue-ui-ridgeline-BArLhskj.js +1628 -0
- package/dist/vue-ui-rings-Csn5BgLk.js +1252 -0
- package/dist/vue-ui-scatter-BBaOx94M.js +2422 -0
- package/dist/{vue-ui-skeleton-DC2bZ0nk.js → vue-ui-skeleton-KeIPGp9U.js} +99 -99
- package/dist/{vue-ui-smiley-Dyyu1je3.js → vue-ui-smiley-C1mYDh4R.js} +17 -17
- package/dist/vue-ui-spark-trend-EqCqmHmU.js +443 -0
- package/dist/{vue-ui-sparkbar-DhIo1qsW.js → vue-ui-sparkbar-BPh45vBP.js} +66 -66
- package/dist/{vue-ui-sparkgauge-D0Fo3Hts.js → vue-ui-sparkgauge-CtouPcyW.js} +65 -65
- package/dist/vue-ui-sparkhistogram-D4sI0DHN.js +576 -0
- package/dist/{vue-ui-sparkline-ApivEMBP.js → vue-ui-sparkline-BDFZ78Fz.js} +51 -51
- package/dist/vue-ui-sparkstackbar-CbTXIfxm.js +674 -0
- package/dist/{vue-ui-stackbar-Ds4hXATH.js → vue-ui-stackbar-nMXIY9x8.js} +108 -108
- package/dist/vue-ui-stackline-CzfXl5ah.js +2425 -0
- package/dist/{vue-ui-strip-plot-C3ZHf4bD.js → vue-ui-strip-plot-BCf5nthl.js} +65 -65
- package/dist/vue-ui-table-BAKkFXki.js +1338 -0
- package/dist/{vue-ui-table-heatmap-CNXNXXBU.js → vue-ui-table-heatmap-CUMxqHKK.js} +15 -15
- package/dist/{vue-ui-table-sparkline-B9JJ4pFF.js → vue-ui-table-sparkline-BVTm16fd.js} +20 -20
- package/dist/vue-ui-thermometer-CGeEW1KV.js +770 -0
- package/dist/{vue-ui-timer-5NAWw5BN.js → vue-ui-timer-Bz7EnsM1.js} +5 -5
- package/dist/{vue-ui-tiremarks-Caz_g1c5.js → vue-ui-tiremarks-IOqtk_Rr.js} +17 -17
- package/dist/{vue-ui-treemap-F9upPyOI.js → vue-ui-treemap-JxNNtb7v.js} +232 -232
- package/dist/vue-ui-waffle-D34mcJWi.js +1368 -0
- package/dist/{vue-ui-wheel-DD6Q39BA.js → vue-ui-wheel-B_qEhyvk.js} +44 -44
- package/dist/{vue-ui-word-cloud-BZLT5svo.js → vue-ui-word-cloud-TtObhd91.js} +32 -32
- package/dist/{vue-ui-world-DbEJN5NA.js → vue-ui-world-R9o00A6c.js} +210 -210
- package/dist/{vue-ui-xy-BYMAITk_.js → vue-ui-xy-CUt6sU1s.js} +766 -766
- package/dist/{vue-ui-xy-Cn9Q8YPr.js → vue-ui-xy-Do34-UbE.js} +134 -134
- package/dist/vue-ui-xy-canvas-C6eRRH--.js +1790 -0
- package/package.json +1 -1
- package/dist/exposedLib-VXFp3Z2c.js +0 -19
- package/dist/vue-ui-3d-bar-taPI41_I.js +0 -1825
- package/dist/vue-ui-age-pyramid-jvQZbF8E.js +0 -1247
- package/dist/vue-ui-bullet-CIATzlsk.js +0 -710
- package/dist/vue-ui-bump-D8MxltQE.js +0 -1249
- package/dist/vue-ui-carousel-table-BSmdexG7.js +0 -455
- package/dist/vue-ui-chestnut-BIh1nQ7q.js +0 -2042
- package/dist/vue-ui-donut-BoZdciGh.js +0 -2419
- package/dist/vue-ui-donut-evolution-CpC9EMro.js +0 -1522
- package/dist/vue-ui-dumbbell-DGA5Bfnl.js +0 -1564
- package/dist/vue-ui-funnel-CaD2tZCT.js +0 -782
- package/dist/vue-ui-horizontal-bar-CwiQxYzv.js +0 -1689
- package/dist/vue-ui-molecule--kK1JfnP.js +0 -931
- package/dist/vue-ui-nested-donuts-8Ehwcuns.js +0 -1493
- package/dist/vue-ui-onion-Cf6JiYTH.js +0 -1200
- package/dist/vue-ui-parallel-coordinate-plot-Blnqp1DB.js +0 -1416
- package/dist/vue-ui-quadrant-CxU0jiOm.js +0 -1984
- package/dist/vue-ui-radar-eH2Qih4_.js +0 -1287
- package/dist/vue-ui-relation-circle-BIcP-aAt.js +0 -924
- package/dist/vue-ui-ridgeline-ChXHzEJw.js +0 -1628
- package/dist/vue-ui-rings-J990vNbX.js +0 -1252
- package/dist/vue-ui-scatter-BeJB0EKg.js +0 -2422
- package/dist/vue-ui-spark-trend-CpDX85H3.js +0 -443
- package/dist/vue-ui-sparkhistogram-CUjFiuAh.js +0 -576
- package/dist/vue-ui-sparkstackbar-DsKQJx_n.js +0 -674
- package/dist/vue-ui-stackline-DJbcVvmN.js +0 -2425
- package/dist/vue-ui-table-uudidrYt.js +0 -1338
- package/dist/vue-ui-thermometer-Bvw3oQb3.js +0 -770
- package/dist/vue-ui-waffle-Bk9AsrPp.js +0 -1368
- package/dist/vue-ui-xy-canvas-Dcm2ftwm.js +0 -1790
|
@@ -1,1790 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { $ as t, Et as n, G as r, It as i, J as a, Kt as o, Mt as s, Rt as c, S as l, T as u, Wt as ee, Z as te, a as ne, b as re, gt as ie, h as ae, i as oe, kt as se, lt as ce, ot as le, wt as ue, yt as de } from "./lib-JqW18y5I.js";
|
|
3
|
-
import { n as fe, r as pe, t as me } from "./useTimeLabels-BmBRv27Y.js";
|
|
4
|
-
import { t as he } from "./useConfig-DYM3f6EI.js";
|
|
5
|
-
import { t as ge } from "./usePrinter-CqqHmnBI.js";
|
|
6
|
-
import { n as _e, t as ve } from "./BaseScanner-DZvpgOjM.js";
|
|
7
|
-
import { t as ye } from "./useNestedProp-DIuuzG1r.js";
|
|
8
|
-
import { t as be } from "./useThemeCheck-C43Tcqmk.js";
|
|
9
|
-
import { t as xe } from "./img-DnP3eXuv.js";
|
|
10
|
-
import { n as Se } from "./Title-CcNiYzEo.js";
|
|
11
|
-
import { t as Ce } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
12
|
-
import { a as we, c as Te, i as d, n as Ee, o as De, r as Oe, s as f, t as ke } from "./canvas-lib-BOP_HS11.js";
|
|
13
|
-
import { t as Ae } from "./useResponsive-BfnK0KxU.js";
|
|
14
|
-
import { t as je } from "./BaseIcon-UdRAvP2h.js";
|
|
15
|
-
import { t as Me } from "./SlicerPreview-CTz41lOu.js";
|
|
16
|
-
import { t as Ne } from "./vue-ui-accordion-CjAGqEJg.js";
|
|
17
|
-
import { t as Pe } from "./BaseLegendToggle-DWtet-Hh.js";
|
|
18
|
-
import { t as Fe } from "./useUserOptionState-DK-_1ddE.js";
|
|
19
|
-
import { t as Ie } from "./useChartAccessibility-DYqac8yF.js";
|
|
20
|
-
import { t as Le } from "./Legend-ROt6ugzW.js";
|
|
21
|
-
import { t as Re } from "./vue_ui_xy_canvas-Cb6dg3eK.js";
|
|
22
|
-
import { Teleport as ze, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as Be, createElementVNode as g, createSlots as Ve, createTextVNode as He, createVNode as Ue, defineAsyncComponent as We, guardReactiveProps as _, mergeProps as Ge, nextTick as Ke, normalizeClass as qe, normalizeProps as v, normalizeStyle as Je, onBeforeUnmount as Ye, onMounted as Xe, openBlock as y, ref as b, renderSlot as x, resolveDynamicComponent as Ze, shallowRef as Qe, toDisplayString as $e, toRefs as et, unref as S, useSlots as tt, watch as C, watchEffect as nt, withCtx as w } from "vue";
|
|
23
|
-
//#region src/components/vue-ui-xy-canvas.vue
|
|
24
|
-
var rt = /* @__PURE__ */ e({ default: () => mt }), it = ["id"], at = ["id"], ot = {
|
|
25
|
-
class: "sr-only",
|
|
26
|
-
"aria-live": "polite",
|
|
27
|
-
"aria-atomic": "true"
|
|
28
|
-
}, st = ["id"], ct = ["aria-label", "aria-describedby"], lt = {
|
|
29
|
-
key: 0,
|
|
30
|
-
style: {
|
|
31
|
-
position: "absolute",
|
|
32
|
-
top: "100%",
|
|
33
|
-
left: "0",
|
|
34
|
-
width: "100%"
|
|
35
|
-
},
|
|
36
|
-
"data-dom-to-png-ignore": "",
|
|
37
|
-
"aria-hidden": "true"
|
|
38
|
-
}, ut = ["id"], dt = ["onClick"], ft = {
|
|
39
|
-
key: 4,
|
|
40
|
-
class: "vue-data-ui-watermark"
|
|
41
|
-
}, pt = ["innerHTML"], mt = /*#__PURE__*/ Ce({
|
|
42
|
-
__name: "vue-ui-xy-canvas",
|
|
43
|
-
props: {
|
|
44
|
-
dataset: {
|
|
45
|
-
type: Array,
|
|
46
|
-
default() {
|
|
47
|
-
return [];
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
config: {
|
|
51
|
-
type: Object,
|
|
52
|
-
default() {
|
|
53
|
-
return {};
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
selectedXIndex: {
|
|
57
|
-
type: Number,
|
|
58
|
-
default: void 0
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
emits: [
|
|
62
|
-
"selectLegend",
|
|
63
|
-
"selectX",
|
|
64
|
-
"copyAlt"
|
|
65
|
-
],
|
|
66
|
-
setup(e, { expose: Ce, emit: rt }) {
|
|
67
|
-
let mt = We(() => import("./Tooltip-CxOrWlFy.js")), ht = We(() => import("./DataTable-BxpTMgfK.js")), gt = We(() => import("./UserOptions-trvJ26nz.js").then((e) => e.n)), _t = We(() => import("./NonSvgPenAndPaper-B6EG_Sga.js")), vt = We(() => import("./BaseDraggableDialog-Av7Uxq5V.js").then((e) => e.n)), { vue_ui_xy_canvas: yt } = he(), { isThemeValid: bt, warnInvalidTheme: xt } = be(), T = e, E = b(r()), D = b(null), St = b(null), O = b(null), k = b(1), A = b(1), Ct = b(!1), j = b(null), wt = b(""), Tt = b(null), M = b([]), Et = b(1), N = b(!0), P = b(!0), Dt = b(null), Ot = b(0), kt = b(!1), At = b(null), jt = b(null), F = b(null), Mt = b(null), Nt = b(0), Pt = b(0), Ft = b(0), I = b(null), It = b(!1), Lt = b(null), Rt = b(null), zt = b(!1), Bt = b(!1), Vt = b(!1), L = b(null), Ht = b(!1), Ut = b(!1), Wt = b(!1), R = b(null), Gt = b({
|
|
68
|
-
x: 0,
|
|
69
|
-
y: 0
|
|
70
|
-
}), z = p(() => Array.isArray(en.value) && en.value.length > 0), Kt = rt, qt = tt();
|
|
71
|
-
Xe(() => {
|
|
72
|
-
qt["chart-background"] && console.warn("VueUiXyCanvas does not support the #chart-background slot.");
|
|
73
|
-
});
|
|
74
|
-
let B = b(sn()), Jt = p(() => {
|
|
75
|
-
let e = B.value.style.chart.title.text || "XY chart", t = J.value.end - J.value.start;
|
|
76
|
-
return `${e}. ${q.value.filter((e) => !M.value.includes(e.absoluteIndex)).length} series. ${t} visible data points.`;
|
|
77
|
-
}), Yt = p(() => {
|
|
78
|
-
if (R.value === null) return "";
|
|
79
|
-
let e = R.value + J.value.start;
|
|
80
|
-
return `${B.value.style.chart.grid.x.timeLabels.values.slice(J.value.start, J.value.end)[R.value] ? B.value.style.chart.tooltip.useDefaultTimeFormat ? Z.value.slice(J.value.start, J.value.end)[R.value]?.text : Xn.value[R.value]?.text : Z.value[e]?.text ?? `Point ${e + 1}`}. ${q.value.filter((e) => !M.value.includes(e.absoluteIndex)).map((e) => {
|
|
81
|
-
let t = e.series[R.value], n = t?.value ?? t ?? null;
|
|
82
|
-
return `${e.name}: ${n}`;
|
|
83
|
-
}).join(". ")}.`;
|
|
84
|
-
}), Xt = p(() => B.value.userOptions.useCursorPointer), Zt = p(() => !!B.value.debug), Qt = p(() => o({
|
|
85
|
-
defaultConfig: {
|
|
86
|
-
userOptions: { show: !1 },
|
|
87
|
-
table: { show: !1 },
|
|
88
|
-
style: { chart: {
|
|
89
|
-
backgroundColor: "#99999930",
|
|
90
|
-
grid: {
|
|
91
|
-
x: {
|
|
92
|
-
axisColor: "#6A6A6A",
|
|
93
|
-
timeLabels: { show: !1 },
|
|
94
|
-
axisName: "",
|
|
95
|
-
horizontalLines: { color: "#6A6A6A" }
|
|
96
|
-
},
|
|
97
|
-
y: {
|
|
98
|
-
axisColor: "#6A6A6A",
|
|
99
|
-
axisLabels: { show: !1 },
|
|
100
|
-
axisName: "",
|
|
101
|
-
verticalLines: { color: "#6A6A6A" }
|
|
102
|
-
},
|
|
103
|
-
zeroLine: { color: "#6A6A6A" }
|
|
104
|
-
},
|
|
105
|
-
legend: { backgroundColor: "#99999930" },
|
|
106
|
-
paddingProportions: { left: .05 },
|
|
107
|
-
scale: {
|
|
108
|
-
max: null,
|
|
109
|
-
min: null
|
|
110
|
-
},
|
|
111
|
-
zoom: {
|
|
112
|
-
endIndex: null,
|
|
113
|
-
startIndex: null
|
|
114
|
-
}
|
|
115
|
-
} }
|
|
116
|
-
},
|
|
117
|
-
userConfig: B.value.skeletonConfig ?? {}
|
|
118
|
-
})), { loading: $t, FINAL_DATASET: en } = _e({
|
|
119
|
-
...et(T),
|
|
120
|
-
FINAL_CONFIG: B,
|
|
121
|
-
prepareConfig: sn,
|
|
122
|
-
skeletonDataset: T.config?.skeletonDataset ?? [{
|
|
123
|
-
name: "",
|
|
124
|
-
series: [
|
|
125
|
-
0,
|
|
126
|
-
1,
|
|
127
|
-
2,
|
|
128
|
-
3,
|
|
129
|
-
5,
|
|
130
|
-
8,
|
|
131
|
-
13,
|
|
132
|
-
21,
|
|
133
|
-
34,
|
|
134
|
-
55,
|
|
135
|
-
89,
|
|
136
|
-
134
|
|
137
|
-
],
|
|
138
|
-
type: "line",
|
|
139
|
-
smooth: !0,
|
|
140
|
-
color: "#BABABA"
|
|
141
|
-
}, {
|
|
142
|
-
name: "",
|
|
143
|
-
series: [
|
|
144
|
-
0,
|
|
145
|
-
.5,
|
|
146
|
-
1,
|
|
147
|
-
1.5,
|
|
148
|
-
2.5,
|
|
149
|
-
4,
|
|
150
|
-
6.5,
|
|
151
|
-
10.5,
|
|
152
|
-
17,
|
|
153
|
-
27.5,
|
|
154
|
-
44.5,
|
|
155
|
-
67
|
|
156
|
-
],
|
|
157
|
-
type: "bar",
|
|
158
|
-
color: "#AAAAAA"
|
|
159
|
-
}],
|
|
160
|
-
skeletonConfig: o({
|
|
161
|
-
defaultConfig: B.value,
|
|
162
|
-
userConfig: Qt.value
|
|
163
|
-
})
|
|
164
|
-
}), { userOptionsVisible: tn, setUserOptionsVisibility: nn, keepUserOptionState: rn } = Fe({ config: B.value }), { svgRef: V } = Ie({ config: B.value.style.chart.title });
|
|
165
|
-
function an() {
|
|
166
|
-
nn(!0);
|
|
167
|
-
}
|
|
168
|
-
function on() {
|
|
169
|
-
nn(!1), Kt("selectX", {
|
|
170
|
-
dataset: null,
|
|
171
|
-
index: null,
|
|
172
|
-
indexLabel: null
|
|
173
|
-
}), j.value = null;
|
|
174
|
-
}
|
|
175
|
-
function sn() {
|
|
176
|
-
let e = ye({
|
|
177
|
-
userConfig: T.config,
|
|
178
|
-
defaultConfig: yt
|
|
179
|
-
}), t = {}, n = e.theme;
|
|
180
|
-
if (n) if (!bt.value(e)) xt(e), t = e;
|
|
181
|
-
else {
|
|
182
|
-
let r = ye({
|
|
183
|
-
userConfig: Re[n] || T.config,
|
|
184
|
-
defaultConfig: e
|
|
185
|
-
});
|
|
186
|
-
t = {
|
|
187
|
-
...ye({
|
|
188
|
-
userConfig: T.config,
|
|
189
|
-
defaultConfig: r
|
|
190
|
-
}),
|
|
191
|
-
customPalette: e.customPalette.length ? e.customPalette : ee[n] || s
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
else t = e;
|
|
195
|
-
return T.config && ie(T.config, "style.chart.grid.y.timeLabels") && (console.warn("VueUiXyCanvas: you are using the deprecated config.style.chart.grid.y.timeLabels. It is recommended to move this configuration to config.style.chart.grid.x.timeLabels."), t.style.chart.grid.x.timeLabels = ye({
|
|
196
|
-
defaultConfig: t.style.chart.grid.x.timeLabels,
|
|
197
|
-
userConfig: T.config.style.chart.grid.y.timeLabels
|
|
198
|
-
})), t;
|
|
199
|
-
}
|
|
200
|
-
C(() => T.config, (e) => {
|
|
201
|
-
$t.value || (B.value = sn()), tn.value = !B.value.userOptions.showOnChartHover, Sr(), Nt.value += 1, Pt.value += 1, Ft.value += 1, H.value.showTable = B.value.table.show, H.value.showDataLabels = B.value.style.chart.dataLabels.show, H.value.stacked = B.value.style.chart.stacked, H.value.showTooltip = B.value.style.chart.tooltip.show;
|
|
202
|
-
}, { deep: !0 }), C(() => T.dataset, async (e) => {
|
|
203
|
-
!Array.isArray(e) || e.length === 0 || (await Ke(), V.value && !O.value && (O.value = V.value.getContext("2d", { willReadFrequently: !0 })), N.value = !0, P.value = !0, await An(), zn(), Nt.value += 1, Pt.value += 1, Ft.value += 1);
|
|
204
|
-
}, { deep: !0 });
|
|
205
|
-
let cn = b(B.value.style.chart.aspectRatio), { isPrinting: ln, isImaging: un, generatePdf: dn, generateImage: fn } = ge({
|
|
206
|
-
elementId: `xy_canvas_${E.value}`,
|
|
207
|
-
fileName: B.value.style.chart.title.text || "vue-ui-xy-canvas",
|
|
208
|
-
options: B.value.userOptions.print
|
|
209
|
-
}), H = b({
|
|
210
|
-
showTable: B.value.table.show,
|
|
211
|
-
showDataLabels: B.value.style.chart.dataLabels.show,
|
|
212
|
-
stacked: B.value.style.chart.stacked,
|
|
213
|
-
showTooltip: B.value.style.chart.tooltip.show
|
|
214
|
-
});
|
|
215
|
-
function pn(e) {
|
|
216
|
-
kt.value = e, Ot.value += 1;
|
|
217
|
-
}
|
|
218
|
-
let mn = p(() => l(B.value.customPalette)), hn = p(() => M.value.length === K.value.length), U = p(() => K.value ? Math.max(...K.value.filter((e, t) => hn.value ? !0 : !M.value.includes(e.absoluteIndex)).map((e) => e.series.length)) : 0);
|
|
219
|
-
function gn(e) {
|
|
220
|
-
L.value = e, Q();
|
|
221
|
-
}
|
|
222
|
-
let _n = b(0), vn = b(0);
|
|
223
|
-
function yn() {
|
|
224
|
-
if (!O.value || !B.value.style.chart.grid.x.timeLabels.show) return 0;
|
|
225
|
-
let e = Z.value || [], t = J.value.start ?? 0, n = J.value.end ?? 0;
|
|
226
|
-
if (!Math.max(0, n - t)) return 0;
|
|
227
|
-
let r = Math.round(k.value / 40 * B.value.style.chart.grid.x.timeLabels.fontSizeRatio), i = `${B.value.style.chart.grid.x.timeLabels.bold ? "bold " : ""}${r}px ${B.value.style.fontFamily}`;
|
|
228
|
-
O.value.save(), O.value.font = i;
|
|
229
|
-
let a = 0;
|
|
230
|
-
for (let r = t; r < n; r += 1) {
|
|
231
|
-
let t = e[r]?.text ?? `${r + 1}`, n = O.value.measureText(String(t));
|
|
232
|
-
n.width > a && (a = n.width);
|
|
233
|
-
}
|
|
234
|
-
O.value.restore();
|
|
235
|
-
let o = (B.value.style.chart.grid.x.timeLabels.rotation || 0) * Math.PI / 180, s = r, c = Math.abs(Math.sin(o)) * a + Math.abs(Math.cos(o)) * s, l = B.value.style.chart.grid.x.timeLabels.offsetY || 1, u = k.value / l;
|
|
236
|
-
return Math.max(0, u + c + 4);
|
|
237
|
-
}
|
|
238
|
-
function bn() {
|
|
239
|
-
_n.value = yn();
|
|
240
|
-
}
|
|
241
|
-
function xn() {
|
|
242
|
-
vn.value && cancelAnimationFrame(vn.value), vn.value = requestAnimationFrame(() => {
|
|
243
|
-
requestAnimationFrame(() => {
|
|
244
|
-
bn();
|
|
245
|
-
});
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
Ye(() => {
|
|
249
|
-
vn.value && cancelAnimationFrame(vn.value);
|
|
250
|
-
});
|
|
251
|
-
let W = p(() => {
|
|
252
|
-
let e = k.value - k.value * (B.value.style.chart.paddingProportions.left + B.value.style.chart.paddingProportions.right), t = A.value * B.value.style.chart.paddingProportions.top, n = A.value * B.value.style.chart.paddingProportions.bottom, r = _n.value, i = A.value - n - r, a = A.value - (t + n) - r;
|
|
253
|
-
return {
|
|
254
|
-
canvasWidth: k.value,
|
|
255
|
-
canvasHeight: A.value,
|
|
256
|
-
left: k.value * B.value.style.chart.paddingProportions.left,
|
|
257
|
-
top: t,
|
|
258
|
-
right: k.value - k.value * B.value.style.chart.paddingProportions.right,
|
|
259
|
-
bottom: i,
|
|
260
|
-
width: e,
|
|
261
|
-
height: a,
|
|
262
|
-
slot: e / (J.value.end - J.value.start)
|
|
263
|
-
};
|
|
264
|
-
});
|
|
265
|
-
function Sn(e, t) {
|
|
266
|
-
return e / t;
|
|
267
|
-
}
|
|
268
|
-
function Cn({ hasAutoScale: e, series: t, min: n, max: r, scale: i, yOffset: a, individualHeight: o, stackIndex: s = null }) {
|
|
269
|
-
return t.map((t, n) => {
|
|
270
|
-
let r = i.min < 0 ? Math.abs(i.min) : 0, c = Sn(t + r, r + i.max), l, u;
|
|
271
|
-
e && (l = i.min, u = Sn(t - l, i.max - l));
|
|
272
|
-
let ee = 0;
|
|
273
|
-
return ee = s === null ? W.value.bottom - W.value.height * (e ? u : c) : W.value.bottom - a - o * (e ? u : c), {
|
|
274
|
-
x: W.value.left + W.value.slot * n + W.value.slot / 2,
|
|
275
|
-
y: ee,
|
|
276
|
-
value: t
|
|
277
|
-
};
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
let G = p(() => {
|
|
281
|
-
let e = B.value.style.chart.scale.min === null ? Math.min(...K.value.filter((e, t) => !M.value.includes(e.absoluteIndex)).flatMap((e) => e.series.slice(J.value.start, J.value.end))) : B.value.style.chart.scale.min, t = B.value.style.chart.scale.max === null ? Math.max(...K.value.filter((e, t) => !M.value.includes(e.absoluteIndex)).flatMap((e) => e.series.slice(J.value.start, J.value.end))) : B.value.style.chart.scale.max, n = ae(e < 0 ? e : 0, t === e ? e + 1 < 0 ? 0 : e + 1 : t < 0 ? 0 : t, B.value.style.chart.scale.ticks), r = n.min < 0 ? Math.abs(n.min) : 0, i = W.value.bottom - W.value.height * (r / (n.max + r));
|
|
282
|
-
return {
|
|
283
|
-
absoluteMin: r,
|
|
284
|
-
max: t,
|
|
285
|
-
min: e,
|
|
286
|
-
scale: n,
|
|
287
|
-
yLabels: n.ticks.map((e) => ({
|
|
288
|
-
y: W.value.bottom - W.value.height * ((e + r) / (n.max + r)),
|
|
289
|
-
x: W.value.left - 8,
|
|
290
|
-
value: e
|
|
291
|
-
})),
|
|
292
|
-
zero: i
|
|
293
|
-
};
|
|
294
|
-
}), wn = p(() => q.value.map((e) => `
|
|
295
|
-
<div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
|
|
296
|
-
<svg viewBox="0 0 10 10" height="12" width="12">
|
|
297
|
-
<circle cx="5" cy="5" r="5" fill="${e.color}"/>
|
|
298
|
-
</svg>
|
|
299
|
-
<span>${e.name ? e.name + ": " : ""}</span>
|
|
300
|
-
<span>${oe(B.value.style.chart.dataLabels.formatter, e.series[j.value] ?? "-", a({
|
|
301
|
-
p: e.prefix || "",
|
|
302
|
-
v: e.series[j.value] ?? "-",
|
|
303
|
-
s: e.suffix || "",
|
|
304
|
-
r: e.rounding || 0
|
|
305
|
-
}), {
|
|
306
|
-
datapoint: e,
|
|
307
|
-
seriesIndex: j.value
|
|
308
|
-
})}</span>
|
|
309
|
-
</div>
|
|
310
|
-
`)), Tn = p(() => B.value.style.chart.line.cutNullValues), K = p(() => en.value.map((e, t) => ({
|
|
311
|
-
...e,
|
|
312
|
-
series: ue({
|
|
313
|
-
data: i(e.series, [], Tn.value),
|
|
314
|
-
threshold: B.value.downsample.threshold
|
|
315
|
-
}),
|
|
316
|
-
absoluteIndex: t,
|
|
317
|
-
color: re(e.color || mn.value[t] || s[t] || s[t % s.length])
|
|
318
|
-
}))), En = p(() => {
|
|
319
|
-
if (!B.value.style.chart.zoom.minimap.show) return [];
|
|
320
|
-
let e = K.value.filter((e) => !M.value.includes(e.absoluteIndex)), t = Math.max(...e.map((e) => e.series.length)), n = [];
|
|
321
|
-
for (let r = 0; r < t; r += 1) n.push(e.map((e) => e.series[r] || 0).reduce((e, t) => (e || 0) + (t || 0), 0));
|
|
322
|
-
let r = Math.min(...n);
|
|
323
|
-
return n.map((e) => e + (r < 0 ? Math.abs(r) : 0));
|
|
324
|
-
}), Dn = p(() => B.value.style.chart.zoom.minimap.show ? K.value.map((e) => ({
|
|
325
|
-
...e,
|
|
326
|
-
isVisible: !M.value.includes(e.absoluteIndex)
|
|
327
|
-
})) : []);
|
|
328
|
-
C(U, (e) => {
|
|
329
|
-
e && An();
|
|
330
|
-
});
|
|
331
|
-
let q = p(() => ne(K.value.filter((e, t) => !M.value.includes(e.absoluteIndex))).map((e, t) => ({
|
|
332
|
-
...e,
|
|
333
|
-
series: e.series.slice(J.value.start, J.value.end)
|
|
334
|
-
})).map((e, t) => {
|
|
335
|
-
let n = [null, void 0].includes(e.scaleMin) ? Math.min(...e.series) || 0 : e.scaleMin, r = [null, void 0].includes(e.scaleMax) ? Math.max(...e.series) || 1 : e.scaleMax;
|
|
336
|
-
n === r && (n = n >= 0 ? r - 1 : n, r = r >= 0 ? r : n + 1);
|
|
337
|
-
let i = {
|
|
338
|
-
ratios: e.series.filter((e) => ![null, void 0].includes(e)).map((e) => (e - n) / (r - n)),
|
|
339
|
-
valueMin: n,
|
|
340
|
-
valueMax: r
|
|
341
|
-
}, a = e.scaleSteps || B.value.style.chart.scale.ticks, o;
|
|
342
|
-
o = e.autoScaling ? ae(i.valueMin, i.valueMax, a) : ae(i.valueMin < 0 ? i.valueMin : 0, i.valueMax <= 0 ? 0 : i.valueMax, a);
|
|
343
|
-
let s = H.value.stacked ? W.value.height * (1 - e.cumulatedStackRatio) : 0, c = H.value.stacked ? W.value.height / B.value.style.chart.stackGap : 0, l = H.value.stacked ? W.value.height * e.stackRatio - c : W.value.height, u = o.min < 0 ? Math.abs(o.min) : 0, ee;
|
|
344
|
-
ee = e.autoScaling && H.value.stacked && r <= 0 ? W.value.bottom - s - l : W.value.bottom - s - l * (u / (o.max + u));
|
|
345
|
-
let te = o.ticks.map((e, t) => ({
|
|
346
|
-
y: W.value.bottom - s - l * (t / (o.ticks.length - 1)),
|
|
347
|
-
x: W.value.left - 8,
|
|
348
|
-
value: e
|
|
349
|
-
})), ne = Cn({
|
|
350
|
-
hasAutoScale: H.value.stacked && e.autoScaling,
|
|
351
|
-
series: e.series,
|
|
352
|
-
min: H.value.stacked ? n : G.value.min,
|
|
353
|
-
max: H.value.stacked ? r : G.value.max,
|
|
354
|
-
scale: H.value.stacked ? o : G.value.scale,
|
|
355
|
-
yOffset: s,
|
|
356
|
-
individualHeight: l,
|
|
357
|
-
stackIndex: H.value.stacked ? t : null
|
|
358
|
-
});
|
|
359
|
-
return {
|
|
360
|
-
...e,
|
|
361
|
-
coordinatesLine: ne,
|
|
362
|
-
min: n,
|
|
363
|
-
max: r,
|
|
364
|
-
localScale: o,
|
|
365
|
-
localZero: ee,
|
|
366
|
-
localMin: u,
|
|
367
|
-
localYLabels: te,
|
|
368
|
-
yOffset: s,
|
|
369
|
-
individualHeight: l
|
|
370
|
-
};
|
|
371
|
-
})), J = b({
|
|
372
|
-
start: 0,
|
|
373
|
-
end: U.value
|
|
374
|
-
}), Y = b({
|
|
375
|
-
start: 0,
|
|
376
|
-
end: U.value
|
|
377
|
-
}), On = b(null);
|
|
378
|
-
function kn() {
|
|
379
|
-
return new Promise((e) => requestAnimationFrame(() => requestAnimationFrame(() => e())));
|
|
380
|
-
}
|
|
381
|
-
Ye(() => {
|
|
382
|
-
On.value && cancelAnimationFrame(On.value);
|
|
383
|
-
});
|
|
384
|
-
async function An() {
|
|
385
|
-
Nn(), await Ke(), On.value && cancelAnimationFrame(On.value), On.value = requestAnimationFrame(async () => {
|
|
386
|
-
await kn(), Nn();
|
|
387
|
-
});
|
|
388
|
-
}
|
|
389
|
-
let jn = p(() => B.value.style.chart.zoom.preview.enable && (Y.value.start !== J.value.start || Y.value.end !== J.value.end));
|
|
390
|
-
function Mn(e, t) {
|
|
391
|
-
Y.value[e] = t;
|
|
392
|
-
}
|
|
393
|
-
async function Nn() {
|
|
394
|
-
if (!zt.value) {
|
|
395
|
-
zt.value = !0;
|
|
396
|
-
try {
|
|
397
|
-
let { startIndex: e, endIndex: t } = B.value.style.chart.zoom, n = Math.max(...K.value.map((e) => e.series.length)), r = e ?? 0, i = t == null ? n : Math.min(In(t + 1), n);
|
|
398
|
-
Vt.value = !0, J.value.start = r, J.value.end = i, Y.value.start = r, Y.value.end = i, Ln(), Bt.value = !0, await Ke(), F.value && (F.value.setStartValue(J.value.start), F.value.setEndValue(J.value.end));
|
|
399
|
-
} finally {
|
|
400
|
-
queueMicrotask(() => {
|
|
401
|
-
Vt.value = !1;
|
|
402
|
-
}), zt.value = !1;
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
function Pn(e) {
|
|
407
|
-
zt.value || Vt.value || e !== J.value.start && (J.value.start = e, Y.value.start = e, Ln());
|
|
408
|
-
}
|
|
409
|
-
function Fn(e) {
|
|
410
|
-
if (zt.value || Vt.value) return;
|
|
411
|
-
let t = In(e);
|
|
412
|
-
t !== J.value.end && (J.value.end = t, Y.value.end = t, Ln());
|
|
413
|
-
}
|
|
414
|
-
function In(e) {
|
|
415
|
-
let t = U.value;
|
|
416
|
-
return e > t ? t : e < 0 || e < J.value.start ? B.value.style.chart.zoom.startIndex === null ? 1 : B.value.style.chart.zoom.startIndex + 1 : e;
|
|
417
|
-
}
|
|
418
|
-
function Ln() {
|
|
419
|
-
let e = Math.max(1, Math.max(...K.value.map((e) => e.series.length))), t = Math.max(0, Math.min(J.value.start ?? 0, e - 1)), n = Math.max(t + 1, Math.min(J.value.end ?? e, e));
|
|
420
|
-
(!Number.isFinite(t) || !Number.isFinite(n) || n <= t) && (t = 0, n = e), J.value = {
|
|
421
|
-
start: t,
|
|
422
|
-
end: n
|
|
423
|
-
}, Y.value.start = t, Y.value.end = n, F.value && (F.value.setStartValue(t), F.value.setEndValue(n));
|
|
424
|
-
}
|
|
425
|
-
let Rn = p(() => q.value.filter((e) => [
|
|
426
|
-
"line",
|
|
427
|
-
"plot",
|
|
428
|
-
void 0
|
|
429
|
-
].includes(e.type))), X = p(() => q.value.filter((e) => e.type === "bar"));
|
|
430
|
-
function zn() {
|
|
431
|
-
if (!V.value || !St.value) return;
|
|
432
|
-
let e = St.value.offsetWidth, t = St.value.offsetHeight;
|
|
433
|
-
V.value.width = e * Et.value * 2, V.value.height = t * Et.value * 2, k.value = e * Et.value * 2, A.value = t * Et.value * 2, O.value?.scale(Et.value, Et.value), Q();
|
|
434
|
-
}
|
|
435
|
-
C(z, async (e) => {
|
|
436
|
-
if (!e) {
|
|
437
|
-
Dt.value = null, Ct.value = !1, j.value = null, I.value = null;
|
|
438
|
-
return;
|
|
439
|
-
}
|
|
440
|
-
await Ke(), V.value && !O.value && (O.value = V.value.getContext("2d", { willReadFrequently: !0 })), N.value = !0, P.value = !0, await An(), zn(), Q();
|
|
441
|
-
});
|
|
442
|
-
function Bn() {
|
|
443
|
-
if (O.value && (O.value.clearRect(0, 0, 1e4, 1e4), O.value.fillStyle = B.value.style.chart.backgroundColor, O.value.fillRect(0, 0, W.value.canvasWidth, W.value.canvasHeight), z.value)) {
|
|
444
|
-
if (H.value.stacked) B.value.style.chart.grid.y.verticalLines.show && J.value.end - J.value.start < B.value.style.chart.grid.y.verticalLines.hideUnderXLength ? q.value.forEach((e) => {
|
|
445
|
-
for (let t = 0; t < J.value.end - J.value.start + 1; t += 1) d(O.value, [{
|
|
446
|
-
x: W.value.left + W.value.slot * t,
|
|
447
|
-
y: W.value.bottom - e.yOffset - e.individualHeight
|
|
448
|
-
}, {
|
|
449
|
-
x: W.value.left + W.value.slot * t,
|
|
450
|
-
y: W.value.bottom - e.yOffset
|
|
451
|
-
}], { color: B.value.style.chart.grid.y.verticalLines.color });
|
|
452
|
-
}) : B.value.style.chart.grid.y.verticalLines.show && J.value.end - J.value.start >= B.value.style.chart.grid.y.verticalLines.hideUnderXLength && q.value.forEach((e) => {
|
|
453
|
-
for (let t = J.value.start; t < J.value.end; t += 1) t % Math.floor((J.value.end - J.value.start) / B.value.style.chart.grid.x.timeLabels.modulo) === 0 && d(O.value, [{
|
|
454
|
-
x: W.value.left + W.value.slot * (t - J.value.start) + W.value.slot / 2,
|
|
455
|
-
y: W.value.bottom - e.yOffset - e.individualHeight
|
|
456
|
-
}, {
|
|
457
|
-
x: W.value.left + W.value.slot * (t - J.value.start) + W.value.slot / 2,
|
|
458
|
-
y: W.value.bottom - e.yOffset
|
|
459
|
-
}], { color: B.value.style.chart.grid.y.verticalLines.color });
|
|
460
|
-
}), B.value.style.chart.grid.x.horizontalLines.show && (B.value.style.chart.grid.x.horizontalLines.alternate ? q.value.forEach((e) => {
|
|
461
|
-
e.localYLabels.forEach((t, n) => {
|
|
462
|
-
n < e.localYLabels.length - 1 && De(O.value, [
|
|
463
|
-
{
|
|
464
|
-
x: W.value.left,
|
|
465
|
-
y: t.y
|
|
466
|
-
},
|
|
467
|
-
{
|
|
468
|
-
x: W.value.right,
|
|
469
|
-
y: t.y
|
|
470
|
-
},
|
|
471
|
-
{
|
|
472
|
-
x: W.value.right,
|
|
473
|
-
y: e.localYLabels[n + 1].y
|
|
474
|
-
},
|
|
475
|
-
{
|
|
476
|
-
x: W.value.left,
|
|
477
|
-
y: e.localYLabels[n + 1].y
|
|
478
|
-
}
|
|
479
|
-
], {
|
|
480
|
-
fillColor: n % 2 == 0 ? "transparent" : c(B.value.style.chart.grid.x.horizontalLines.color, B.value.style.chart.grid.x.horizontalLines.opacity),
|
|
481
|
-
strokeColor: "transparent"
|
|
482
|
-
});
|
|
483
|
-
});
|
|
484
|
-
}) : q.value.forEach((e) => {
|
|
485
|
-
e.localYLabels.slice(J.value.start, J.value.end).forEach((e) => {
|
|
486
|
-
d(O.value, [{
|
|
487
|
-
x: W.value.left,
|
|
488
|
-
y: e.y
|
|
489
|
-
}, {
|
|
490
|
-
x: W.value.right,
|
|
491
|
-
y: e.y
|
|
492
|
-
}], { color: B.value.style.chart.grid.x.horizontalLines.color });
|
|
493
|
-
});
|
|
494
|
-
})), B.value.style.chart.grid.zeroLine.show && q.value.forEach((e) => {
|
|
495
|
-
d(O.value, [{
|
|
496
|
-
x: W.value.left,
|
|
497
|
-
y: e.localZero
|
|
498
|
-
}, {
|
|
499
|
-
x: W.value.right,
|
|
500
|
-
y: e.localZero
|
|
501
|
-
}], {
|
|
502
|
-
color: B.value.style.chart.grid.zeroLine.color,
|
|
503
|
-
lineDash: B.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
|
|
504
|
-
});
|
|
505
|
-
}), B.value.style.chart.grid.y.axisLabels.show && q.value.forEach((e) => {
|
|
506
|
-
d(O.value, [{
|
|
507
|
-
x: W.value.left,
|
|
508
|
-
y: W.value.bottom - e.yOffset
|
|
509
|
-
}, {
|
|
510
|
-
x: W.value.left,
|
|
511
|
-
y: W.value.bottom - e.yOffset - e.individualHeight
|
|
512
|
-
}], { color: e.color }), d(O.value, [{
|
|
513
|
-
x: W.value.right,
|
|
514
|
-
y: W.value.bottom - e.yOffset
|
|
515
|
-
}, {
|
|
516
|
-
x: W.value.right,
|
|
517
|
-
y: W.value.bottom - e.yOffset - e.individualHeight
|
|
518
|
-
}], { color: e.color });
|
|
519
|
-
}), q.value.forEach((e) => {
|
|
520
|
-
f(O.value, e.name, k.value / 35, W.value.bottom - e.yOffset - e.individualHeight / 2, {
|
|
521
|
-
align: "center",
|
|
522
|
-
rotation: -90,
|
|
523
|
-
color: e.color,
|
|
524
|
-
font: `${Math.round(k.value / 40 * B.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${B.value.style.fontFamily}`
|
|
525
|
-
});
|
|
526
|
-
});
|
|
527
|
-
else {
|
|
528
|
-
if (B.value.style.chart.grid.y.verticalLines.show && J.value.end - J.value.start < B.value.style.chart.grid.y.verticalLines.hideUnderXLength) for (let e = 0; e < J.value.end - J.value.start + 1; e += 1) d(O.value, [{
|
|
529
|
-
x: W.value.left + W.value.slot * e,
|
|
530
|
-
y: W.value.top
|
|
531
|
-
}, {
|
|
532
|
-
x: W.value.left + W.value.slot * e,
|
|
533
|
-
y: W.value.bottom
|
|
534
|
-
}], { color: B.value.style.chart.grid.y.verticalLines.color });
|
|
535
|
-
else if (B.value.style.chart.grid.y.verticalLines.show && J.value.end - J.value.start >= B.value.style.chart.grid.y.verticalLines.hideUnderXLength) for (let e = J.value.start; e < J.value.end; e += 1) e % Math.floor((J.value.end - J.value.start) / B.value.style.chart.grid.x.timeLabels.modulo) === 0 && d(O.value, [{
|
|
536
|
-
x: W.value.left + W.value.slot * (e - J.value.start) + W.value.slot / 2,
|
|
537
|
-
y: W.value.top
|
|
538
|
-
}, {
|
|
539
|
-
x: W.value.left + W.value.slot * (e - J.value.start) + W.value.slot / 2,
|
|
540
|
-
y: W.value.bottom
|
|
541
|
-
}], { color: B.value.style.chart.grid.y.verticalLines.color });
|
|
542
|
-
B.value.style.chart.grid.x.horizontalLines.show && (B.value.style.chart.grid.x.horizontalLines.alternate ? G.value.yLabels.forEach((e, t) => {
|
|
543
|
-
t < G.value.yLabels.length - 1 && De(O.value, [
|
|
544
|
-
{
|
|
545
|
-
x: W.value.left,
|
|
546
|
-
y: e.y
|
|
547
|
-
},
|
|
548
|
-
{
|
|
549
|
-
x: W.value.right,
|
|
550
|
-
y: e.y
|
|
551
|
-
},
|
|
552
|
-
{
|
|
553
|
-
x: W.value.right,
|
|
554
|
-
y: G.value.yLabels[t + 1].y
|
|
555
|
-
},
|
|
556
|
-
{
|
|
557
|
-
x: W.value.left,
|
|
558
|
-
y: G.value.yLabels[t + 1].y
|
|
559
|
-
}
|
|
560
|
-
], {
|
|
561
|
-
fillColor: t % 2 == 0 ? "transparent" : c(B.value.style.chart.grid.x.horizontalLines.color, B.value.style.chart.grid.x.horizontalLines.opacity),
|
|
562
|
-
strokeColor: "transparent"
|
|
563
|
-
});
|
|
564
|
-
}) : G.value.yLabels.forEach((e) => {
|
|
565
|
-
d(O.value, [{
|
|
566
|
-
x: W.value.left,
|
|
567
|
-
y: e.y
|
|
568
|
-
}, {
|
|
569
|
-
x: W.value.right,
|
|
570
|
-
y: e.y
|
|
571
|
-
}], { color: B.value.style.chart.grid.x.horizontalLines.color });
|
|
572
|
-
})), B.value.style.chart.grid.y.showAxis && d(O.value, [{
|
|
573
|
-
x: W.value.left,
|
|
574
|
-
y: W.value.top
|
|
575
|
-
}, {
|
|
576
|
-
x: W.value.left,
|
|
577
|
-
y: W.value.bottom
|
|
578
|
-
}], {
|
|
579
|
-
color: B.value.style.chart.grid.y.axisColor,
|
|
580
|
-
lineWidth: B.value.style.chart.grid.y.axisThickness
|
|
581
|
-
}), B.value.style.chart.grid.x.showAxis && d(O.value, [{
|
|
582
|
-
x: W.value.left,
|
|
583
|
-
y: W.value.bottom
|
|
584
|
-
}, {
|
|
585
|
-
x: W.value.right,
|
|
586
|
-
y: W.value.bottom
|
|
587
|
-
}], {
|
|
588
|
-
color: B.value.style.chart.grid.x.axisColor,
|
|
589
|
-
lineWidth: B.value.style.chart.grid.x.axisThickness
|
|
590
|
-
}), B.value.style.chart.grid.zeroLine.show && d(O.value, [{
|
|
591
|
-
x: W.value.left,
|
|
592
|
-
y: G.value.zero
|
|
593
|
-
}, {
|
|
594
|
-
x: W.value.right,
|
|
595
|
-
y: G.value.zero
|
|
596
|
-
}], {
|
|
597
|
-
color: B.value.style.chart.grid.zeroLine.color,
|
|
598
|
-
lineDash: B.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
|
|
599
|
-
});
|
|
600
|
-
}
|
|
601
|
-
B.value.style.chart.grid.y.axisName && f(O.value, B.value.style.chart.grid.y.axisName, k.value - k.value / 40 * B.value.style.chart.grid.y.axisLabels.fontSizeRatio * 1.2, W.value.bottom - W.value.height / 2, {
|
|
602
|
-
font: `${B.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(k.value / 40 * B.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${B.value.style.fontFamily}`,
|
|
603
|
-
color: B.value.style.chart.color,
|
|
604
|
-
align: "center",
|
|
605
|
-
rotation: 90
|
|
606
|
-
}), B.value.style.chart.grid.x.axisName && f(O.value, B.value.style.chart.grid.x.axisName, k.value / 2, A.value, {
|
|
607
|
-
font: `${B.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(k.value / 40 * B.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${B.value.style.fontFamily}`,
|
|
608
|
-
color: B.value.style.chart.color,
|
|
609
|
-
align: "center"
|
|
610
|
-
});
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
function Vn(e) {
|
|
614
|
-
for (let t = 0; t < e.coordinatesLine.length; t += 1) {
|
|
615
|
-
let n = (j.value === t || L.value === t ? k.value / 150 : B.value.style.chart.line.plots.show || e.type === "plot" ? k.value / 200 : 0) * B.value.style.chart.line.plots.radiusRatio;
|
|
616
|
-
ke(O.value, {
|
|
617
|
-
x: e.coordinatesLine[t].x,
|
|
618
|
-
y: e.coordinatesLine[t].y
|
|
619
|
-
}, n, {
|
|
620
|
-
color: B.value.style.chart.backgroundColor,
|
|
621
|
-
fillStyle: e.color,
|
|
622
|
-
strokeColor: "transparent"
|
|
623
|
-
});
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
function Hn() {
|
|
627
|
-
q.value.forEach((e) => {
|
|
628
|
-
e.showYMarker && cr(e) && f(O.value, oe(B.value.style.chart.dataLabels.formatter, cr(e).value, a({
|
|
629
|
-
p: e.prefix || B.value.style.chart.grid.y.axisLabels.prefix || "",
|
|
630
|
-
v: cr(e).value,
|
|
631
|
-
s: e.suffix || B.value.style.chart.grid.y.axisLabels.suffix || "",
|
|
632
|
-
r: e.rounding || B.value.style.chart.grid.y.axisLabels.rounding || 0
|
|
633
|
-
}), {
|
|
634
|
-
datapoint: cr(e),
|
|
635
|
-
seriesIndex: null
|
|
636
|
-
}), W.value.left - 8 + B.value.style.chart.grid.y.axisLabels.offsetX, cr(e).y, {
|
|
637
|
-
align: "right",
|
|
638
|
-
font: `${B.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(k.value / 40 * B.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${B.value.style.fontFamily}`,
|
|
639
|
-
color: e.color
|
|
640
|
-
});
|
|
641
|
-
});
|
|
642
|
-
}
|
|
643
|
-
function Un() {
|
|
644
|
-
B.value.style.chart.grid.y.axisLabels.show && (H.value.stacked ? q.value.forEach((e) => {
|
|
645
|
-
e.localYLabels.forEach((t, n) => {
|
|
646
|
-
f(O.value, oe(B.value.style.chart.dataLabels.formatter, t.value, a({
|
|
647
|
-
p: e.prefix || B.value.style.chart.grid.y.axisLabels.prefix || "",
|
|
648
|
-
v: t.value,
|
|
649
|
-
s: e.suffix || B.value.style.chart.grid.y.axisLabels.suffix || "",
|
|
650
|
-
r: e.rounding || B.value.style.chart.grid.y.axisLabels.rounding || 0
|
|
651
|
-
}), {
|
|
652
|
-
datapoint: t,
|
|
653
|
-
seriesIndex: n
|
|
654
|
-
}), t.x + B.value.style.chart.grid.y.axisLabels.offsetX, t.y, {
|
|
655
|
-
align: "right",
|
|
656
|
-
font: `${B.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(k.value / 40 * B.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${B.value.style.fontFamily}`,
|
|
657
|
-
color: e.color,
|
|
658
|
-
globalAlpha: e.showYMarker && ![null, void 0].includes(j.value ?? L.value) ? .2 : 1
|
|
659
|
-
});
|
|
660
|
-
});
|
|
661
|
-
}) : G.value.yLabels.forEach((e, t) => {
|
|
662
|
-
f(O.value, oe(B.value.style.chart.dataLabels.formatter, e.value, a({
|
|
663
|
-
p: B.value.style.chart.grid.y.axisLabels.prefix || "",
|
|
664
|
-
v: e.value,
|
|
665
|
-
s: B.value.style.chart.grid.y.axisLabels.suffix || "",
|
|
666
|
-
r: B.value.style.chart.grid.y.axisLabels.rounding || 0
|
|
667
|
-
}), {
|
|
668
|
-
datapoint: e,
|
|
669
|
-
seriesIndex: t
|
|
670
|
-
}), e.x + B.value.style.chart.grid.y.axisLabels.offsetX, e.y, {
|
|
671
|
-
align: "right",
|
|
672
|
-
font: `${B.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(k.value / 40 * B.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${B.value.style.fontFamily}`,
|
|
673
|
-
color: B.value.style.chart.grid.y.axisLabels.color,
|
|
674
|
-
globalAlpha: q.value.some((e) => e.showYMarker) && ![null, void 0].includes(j.value ?? L.value) ? .2 : 1
|
|
675
|
-
});
|
|
676
|
-
}));
|
|
677
|
-
}
|
|
678
|
-
function Wn(e) {
|
|
679
|
-
for (let t = 0; t < e.coordinatesLine.length; t += 1) f(O.value, oe(B.value.style.chart.dataLabels.formatter, e.coordinatesLine[t].value, a({
|
|
680
|
-
p: e.prefix || "",
|
|
681
|
-
v: e.coordinatesLine[t].value,
|
|
682
|
-
s: e.suffix || "",
|
|
683
|
-
r: e.rounding || 0
|
|
684
|
-
}), {
|
|
685
|
-
datapoint: e.coordinatesLine[t],
|
|
686
|
-
seriesIndex: t
|
|
687
|
-
}), e.coordinatesLine[t].x, e.coordinatesLine[t].y + B.value.style.chart.dataLabels.offsetY, {
|
|
688
|
-
align: "center",
|
|
689
|
-
font: `${B.value.style.chart.dataLabels.bold ? "bold " : ""}${Math.round(k.value / 40 * B.value.style.chart.dataLabels.fontSizeRatio)}px ${B.value.style.fontFamily}`,
|
|
690
|
-
color: B.value.style.chart.dataLabels.useSerieColor ? e.color : B.value.style.chart.dataLabels.color,
|
|
691
|
-
strokeColor: B.value.style.chart.backgroundColor,
|
|
692
|
-
lineWidth: .5
|
|
693
|
-
});
|
|
694
|
-
}
|
|
695
|
-
let Z = b([]), Gn = 0;
|
|
696
|
-
nt(() => {
|
|
697
|
-
let e = ++Gn;
|
|
698
|
-
(async () => {
|
|
699
|
-
let t = await me({
|
|
700
|
-
values: B.value.style.chart.grid.x.timeLabels.values,
|
|
701
|
-
maxDatapoints: U.value,
|
|
702
|
-
formatter: B.value.style.chart.grid.x.timeLabels.datetimeFormatter,
|
|
703
|
-
start: 0,
|
|
704
|
-
end: U.value
|
|
705
|
-
});
|
|
706
|
-
e === Gn && (Z.value = t);
|
|
707
|
-
})();
|
|
708
|
-
}), nt(() => {
|
|
709
|
-
B.value.style.chart.grid.x.timeLabels.show, B.value.style.chart.grid.x.timeLabels.rotation, B.value.style.chart.grid.x.timeLabels.offsetY, B.value.style.chart.grid.x.timeLabels.fontSizeRatio, B.value.style.chart.grid.x.timeLabels.bold, J.value.start, J.value.end, k.value, A.value, (Z.value || []).map((e) => e?.text ?? "").join("|"), xn();
|
|
710
|
-
}, { flush: "post" });
|
|
711
|
-
let Kn = b({
|
|
712
|
-
months: [],
|
|
713
|
-
shortMonths: [],
|
|
714
|
-
days: [],
|
|
715
|
-
shortDays: []
|
|
716
|
-
}), qn = 0;
|
|
717
|
-
nt(() => {
|
|
718
|
-
let e = ++qn, t = B.value.style.chart.grid.x.timeLabels.datetimeFormatter;
|
|
719
|
-
(async () => {
|
|
720
|
-
let n = await pe(t.locale).catch(() => pe("en"));
|
|
721
|
-
e === qn && (Kn.value = n.data);
|
|
722
|
-
})();
|
|
723
|
-
});
|
|
724
|
-
let Jn = p(() => {
|
|
725
|
-
let e = B.value.style.chart.grid.x.timeLabels.datetimeFormatter, t = fe({
|
|
726
|
-
useUTC: e.useUTC,
|
|
727
|
-
locale: Kn.value,
|
|
728
|
-
januaryAsYear: e.januaryAsYear
|
|
729
|
-
});
|
|
730
|
-
return (e, n) => {
|
|
731
|
-
let r = B.value.style.chart.grid.x.timeLabels.values?.[e];
|
|
732
|
-
return r == null ? "" : t.formatDate(new Date(r), n);
|
|
733
|
-
};
|
|
734
|
-
}), Yn = p(() => (B.value.style.chart.grid.x.timeLabels.values || []).map((e, t) => ({
|
|
735
|
-
text: Jn.value(t, B.value.style.chart.zoom.timeFormat),
|
|
736
|
-
absoluteIndex: t
|
|
737
|
-
}))), Xn = p(() => (B.value.style.chart.grid.x.timeLabels.values || []).map((e, t) => ({
|
|
738
|
-
text: Jn.value(t, B.value.style.chart.tooltip.timeFormat),
|
|
739
|
-
absoluteIndex: t
|
|
740
|
-
})));
|
|
741
|
-
function Zn() {
|
|
742
|
-
for (let e = J.value.start; e < J.value.end; e += 1) (J.value.end - J.value.start < B.value.style.chart.grid.x.timeLabels.modulo || J.value.end - J.value.start >= B.value.style.chart.grid.x.timeLabels.modulo && (e % Math.floor((J.value.end - J.value.start) / B.value.style.chart.grid.x.timeLabels.modulo) === 0 || (e === j.value + J.value.start || e === L.value) && B.value.style.chart.grid.x.timeLabels.showMarker)) && f(O.value, Z.value[e] ? Z.value[e].text : e + 1, W.value.left + W.value.slot * (e - J.value.start) + W.value.slot / 2, W.value.bottom + k.value / B.value.style.chart.grid.x.timeLabels.offsetY, {
|
|
743
|
-
align: B.value.style.chart.grid.x.timeLabels.rotation === 0 ? "center" : B.value.style.chart.grid.x.timeLabels.rotation > 0 ? "left" : "right",
|
|
744
|
-
font: `${B.value.style.chart.grid.x.timeLabels.bold ? "bold " : ""}${Math.round(k.value / 40 * B.value.style.chart.grid.x.timeLabels.fontSizeRatio)}px ${B.value.style.fontFamily}`,
|
|
745
|
-
color: B.value.style.chart.grid.x.timeLabels.showMarker ? c(B.value.style.chart.grid.x.timeLabels.color, j.value !== null || L.value !== null ? j.value + J.value.start === e || L.value === e ? 100 : 20 : 100) : B.value.style.chart.grid.x.timeLabels.color,
|
|
746
|
-
rotation: B.value.style.chart.grid.x.timeLabels.rotation
|
|
747
|
-
});
|
|
748
|
-
}
|
|
749
|
-
function Qn() {
|
|
750
|
-
d(O.value, [{
|
|
751
|
-
x: W.value.left + W.value.slot * (j.value ?? L.value) + W.value.slot / 2,
|
|
752
|
-
y: W.value.top
|
|
753
|
-
}, {
|
|
754
|
-
x: W.value.left + W.value.slot * (j.value ?? L.value) + W.value.slot / 2,
|
|
755
|
-
y: W.value.bottom
|
|
756
|
-
}], {
|
|
757
|
-
color: B.value.style.chart.selector.color,
|
|
758
|
-
lineDash: B.value.style.chart.selector.dashed ? [8, 8] : [0, 0],
|
|
759
|
-
lineWidth: 2,
|
|
760
|
-
linceCap: "round"
|
|
761
|
-
});
|
|
762
|
-
}
|
|
763
|
-
function $n() {
|
|
764
|
-
I.value && d(O.value, [{
|
|
765
|
-
x: W.value.left,
|
|
766
|
-
y: I.value
|
|
767
|
-
}, {
|
|
768
|
-
x: W.value.right,
|
|
769
|
-
y: I.value
|
|
770
|
-
}], {
|
|
771
|
-
color: B.value.style.chart.selector.color,
|
|
772
|
-
lineDash: B.value.style.chart.selector.dashed ? [8, 8] : [0, 0],
|
|
773
|
-
lineWidth: 2,
|
|
774
|
-
linceCap: "round"
|
|
775
|
-
});
|
|
776
|
-
}
|
|
777
|
-
function er() {
|
|
778
|
-
X.value.forEach((e, t) => {
|
|
779
|
-
for (let r = 0; r < e.coordinatesLine.length; r += 1) De(O.value, [
|
|
780
|
-
{
|
|
781
|
-
x: W.value.left + W.value.slot * r + W.value.slot / 10 + (H.value.stacked ? 0 : W.value.slot / X.value.length * t - (t === 0 ? 0 : W.value.slot / (5 * X.value.length) * t)),
|
|
782
|
-
y: H.value.stacked ? e.localZero : G.value.zero
|
|
783
|
-
},
|
|
784
|
-
{
|
|
785
|
-
x: W.value.left + W.value.slot * r + W.value.slot / 10 + (H.value.stacked ? 0 : W.value.slot / X.value.length * t - (t === 0 ? 0 : W.value.slot / (5 * X.value.length) * t)) + W.value.slot * .8 / (H.value.stacked ? 1 : X.value.length),
|
|
786
|
-
y: H.value.stacked ? e.localZero : G.value.zero
|
|
787
|
-
},
|
|
788
|
-
{
|
|
789
|
-
x: W.value.left + W.value.slot * r + W.value.slot / 10 + (H.value.stacked ? 0 : W.value.slot / X.value.length * t - (t === 0 ? 0 : W.value.slot / (5 * X.value.length) * t)) + W.value.slot * .8 / (H.value.stacked ? 1 : X.value.length),
|
|
790
|
-
y: e.coordinatesLine[r].y
|
|
791
|
-
},
|
|
792
|
-
{
|
|
793
|
-
x: W.value.left + W.value.slot * r + W.value.slot / 10 + (H.value.stacked ? 0 : W.value.slot / X.value.length * t - (t === 0 ? 0 : W.value.slot / (5 * X.value.length) * t)),
|
|
794
|
-
y: e.coordinatesLine[r].y
|
|
795
|
-
}
|
|
796
|
-
], {
|
|
797
|
-
strokeColor: B.value.style.chart.backgroundColor,
|
|
798
|
-
gradient: {
|
|
799
|
-
type: "linear",
|
|
800
|
-
start: {
|
|
801
|
-
x: e.coordinatesLine[r].x,
|
|
802
|
-
y: e.coordinatesLine[r].y
|
|
803
|
-
},
|
|
804
|
-
end: {
|
|
805
|
-
x: e.coordinatesLine[r].x,
|
|
806
|
-
y: H.value.stacked ? e.localZero : G.value.zero
|
|
807
|
-
},
|
|
808
|
-
stops: [{
|
|
809
|
-
offset: 0,
|
|
810
|
-
color: e.color
|
|
811
|
-
}, {
|
|
812
|
-
offset: 1,
|
|
813
|
-
color: B.value.style.chart.bar.gradient.show ? n(e.color, .5) : e.color
|
|
814
|
-
}]
|
|
815
|
-
}
|
|
816
|
-
}), H.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && f(O.value, oe(B.value.style.chart.dataLabels.formatter, e.coordinatesLine[r].value, a({
|
|
817
|
-
p: e.prefix || "",
|
|
818
|
-
v: e.coordinatesLine[r].value,
|
|
819
|
-
s: e.suffix || "",
|
|
820
|
-
r: e.rounding || 0
|
|
821
|
-
}), {
|
|
822
|
-
datapoint: e.coordinatesLine[r],
|
|
823
|
-
seriesIndex: r
|
|
824
|
-
}), W.value.left + W.value.slot * r + W.value.slot / 10 + (H.value.stacked ? 0 : W.value.slot / X.value.length * t - (t === 0 ? 0 : W.value.slot / (5 * X.value.length) * t)) + W.value.slot * .4 / (H.value.stacked ? 1 : X.value.length), (e.coordinatesLine[r].value < 0 ? H.value.stacked ? e.localZero : G.value.zero : e.coordinatesLine[r].y) + B.value.style.chart.dataLabels.offsetY, {
|
|
825
|
-
align: "center",
|
|
826
|
-
font: `${Math.round(k.value / 40 * B.value.style.chart.dataLabels.fontSizeRatio)}px ${B.value.style.fontFamily}`,
|
|
827
|
-
color: B.value.style.chart.dataLabels.useSerieColor ? e.color : B.value.style.chart.dataLabels.color,
|
|
828
|
-
strokeColor: B.value.style.chart.backgroundColor,
|
|
829
|
-
lineWidth: .8
|
|
830
|
-
});
|
|
831
|
-
});
|
|
832
|
-
}
|
|
833
|
-
function tr(e, t) {
|
|
834
|
-
let n = e.coordinatesLine.map((t, n) => e.series[n] != null && Number.isFinite(t?.y) ? t : null), r = [], i = [], a = [];
|
|
835
|
-
for (let e = 0; e < n.length; e += 1) {
|
|
836
|
-
let o = n[e];
|
|
837
|
-
if (o) a.push(o);
|
|
838
|
-
else {
|
|
839
|
-
if (a.length >= 2) {
|
|
840
|
-
let e = a[0], n = a[a.length - 1];
|
|
841
|
-
r.push([
|
|
842
|
-
{
|
|
843
|
-
x: e.x,
|
|
844
|
-
y: t
|
|
845
|
-
},
|
|
846
|
-
...a,
|
|
847
|
-
{
|
|
848
|
-
x: n.x,
|
|
849
|
-
y: t
|
|
850
|
-
}
|
|
851
|
-
]);
|
|
852
|
-
} else a.length === 1 && i.push(a[0]);
|
|
853
|
-
a = [];
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
if (a.length >= 2) {
|
|
857
|
-
let e = a[0], n = a[a.length - 1];
|
|
858
|
-
r.push([
|
|
859
|
-
{
|
|
860
|
-
x: e.x,
|
|
861
|
-
y: t
|
|
862
|
-
},
|
|
863
|
-
...a,
|
|
864
|
-
{
|
|
865
|
-
x: n.x,
|
|
866
|
-
y: t
|
|
867
|
-
}
|
|
868
|
-
]);
|
|
869
|
-
} else a.length === 1 && i.push(a[0]);
|
|
870
|
-
return {
|
|
871
|
-
polygons: r,
|
|
872
|
-
singles: i
|
|
873
|
-
};
|
|
874
|
-
}
|
|
875
|
-
function nr(e) {
|
|
876
|
-
let t = e.coordinatesLine.map((t, n) => e.series[n] != null && Number.isFinite(t?.y) ? t : null), n = [], r = [];
|
|
877
|
-
for (let e = 0; e < t.length; e += 1) {
|
|
878
|
-
let i = t[e];
|
|
879
|
-
i ? r.push(i) : (r.length >= 2 && n.push(r), r = []);
|
|
880
|
-
}
|
|
881
|
-
return r.length >= 2 && n.push(r), n;
|
|
882
|
-
}
|
|
883
|
-
function rr(e) {
|
|
884
|
-
if (Tn.value) {
|
|
885
|
-
let t = nr(e);
|
|
886
|
-
for (let n of t) d(O.value, n, {
|
|
887
|
-
color: e.color,
|
|
888
|
-
lineWidth: 3
|
|
889
|
-
});
|
|
890
|
-
} else d(O.value, e.coordinatesLine, {
|
|
891
|
-
color: e.color,
|
|
892
|
-
lineWidth: 3
|
|
893
|
-
});
|
|
894
|
-
}
|
|
895
|
-
function ir(e) {
|
|
896
|
-
let t = !!Tn.value;
|
|
897
|
-
if (e.useArea) {
|
|
898
|
-
let n = H.value.stacked ? e.localZero : G.value.zero;
|
|
899
|
-
if (t) {
|
|
900
|
-
let { polygons: t, singles: r } = tr(e, n);
|
|
901
|
-
for (let n of t) we(O.value, n, {
|
|
902
|
-
fillColor: c(e.color, B.value.style.chart.area.opacity),
|
|
903
|
-
strokeColor: "transparent"
|
|
904
|
-
});
|
|
905
|
-
let i = k.value / 200 * B.value.style.chart.line.plots.radiusRatio;
|
|
906
|
-
for (let t of r) ke(O.value, {
|
|
907
|
-
x: t.x,
|
|
908
|
-
y: t.y
|
|
909
|
-
}, i, {
|
|
910
|
-
color: B.value.style.chart.backgroundColor,
|
|
911
|
-
fillStyle: e.color,
|
|
912
|
-
strokeColor: "transparent"
|
|
913
|
-
});
|
|
914
|
-
} else {
|
|
915
|
-
let t = {
|
|
916
|
-
x: e.coordinatesLine[0].x,
|
|
917
|
-
y: n
|
|
918
|
-
}, r = {
|
|
919
|
-
x: e.coordinatesLine.at(-1).x,
|
|
920
|
-
y: n
|
|
921
|
-
};
|
|
922
|
-
we(O.value, [
|
|
923
|
-
t,
|
|
924
|
-
...e.coordinatesLine,
|
|
925
|
-
r
|
|
926
|
-
], {
|
|
927
|
-
fillColor: c(e.color, B.value.style.chart.area.opacity),
|
|
928
|
-
strokeColor: "transparent"
|
|
929
|
-
});
|
|
930
|
-
}
|
|
931
|
-
rr(e);
|
|
932
|
-
return;
|
|
933
|
-
}
|
|
934
|
-
rr(e);
|
|
935
|
-
}
|
|
936
|
-
function ar() {
|
|
937
|
-
q.value.forEach((e, t) => {
|
|
938
|
-
d(O.value, [{
|
|
939
|
-
x: W.value.left,
|
|
940
|
-
y: W.value.bottom - e.yOffset
|
|
941
|
-
}, {
|
|
942
|
-
x: W.value.right,
|
|
943
|
-
y: W.value.bottom - e.yOffset
|
|
944
|
-
}], {
|
|
945
|
-
color: B.value.style.chart.grid.x.horizontalLines.color,
|
|
946
|
-
lineWidth: 1
|
|
947
|
-
});
|
|
948
|
-
});
|
|
949
|
-
}
|
|
950
|
-
function or() {
|
|
951
|
-
let { left: e, top: t, width: n, height: r } = W.value, i = J.value.start, a = J.value.end - i, o = n / a, s = Y.value.start - i, c = Y.value.end - i, l = Math.max(0, Math.min(a, s)), u = Math.max(0, Math.min(a, c));
|
|
952
|
-
De(O.value, [
|
|
953
|
-
{
|
|
954
|
-
x: e + l * o,
|
|
955
|
-
y: t
|
|
956
|
-
},
|
|
957
|
-
{
|
|
958
|
-
x: e + l * o + (u - l) * o,
|
|
959
|
-
y: t
|
|
960
|
-
},
|
|
961
|
-
{
|
|
962
|
-
x: e + l * o + (u - l) * o,
|
|
963
|
-
y: t + r
|
|
964
|
-
},
|
|
965
|
-
{
|
|
966
|
-
x: e + l * o,
|
|
967
|
-
y: t + r
|
|
968
|
-
}
|
|
969
|
-
], {
|
|
970
|
-
fillColor: B.value.style.chart.zoom.preview.fill,
|
|
971
|
-
strokeColor: B.value.style.chart.zoom.preview.stroke,
|
|
972
|
-
lineDash: [
|
|
973
|
-
,
|
|
974
|
-
,
|
|
975
|
-
,
|
|
976
|
-
,
|
|
977
|
-
].fill(B.value.style.chart.zoom.preview.strokeDasharray),
|
|
978
|
-
lineWidth: B.value.style.chart.zoom.preview.strokeWidth
|
|
979
|
-
});
|
|
980
|
-
}
|
|
981
|
-
function Q() {
|
|
982
|
-
!z.value || !V.value || !O.value || (Bn(), N.value ? ((j.value !== null || L.value !== null) && B.value.style.chart.selector.show && Qn(), er(), H.value.stacked && B.value.style.chart.grid.x.showAxis && ar(), Rn.value.forEach((e) => {
|
|
983
|
-
(e.type === "line" || !e.type) && ir(e), P.value && (Vn(e), H.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && Wn(e));
|
|
984
|
-
}), V.value && (Dt.value = Ee(V.value))) : (Dt.value && (O.value.clearRect(0, 0, 1e4, 1e4), O.value.drawImage(Dt.value, 0, 0)), (j.value !== null || L.value !== null) && B.value.style.chart.selector.show && Qn(), (j.value !== null || L.value !== null) && q.value.forEach((e) => {
|
|
985
|
-
let t = j.value ?? L.value, n = e.coordinatesLine[t];
|
|
986
|
-
(e.type === "line" || !e.type || e.type === "plot") && n && Number.isFinite(n.x) && Number.isFinite(n.y) && ke(O.value, {
|
|
987
|
-
x: n.x,
|
|
988
|
-
y: n.y
|
|
989
|
-
}, k.value / 150 * B.value.style.chart.line.plots.radiusRatio, {
|
|
990
|
-
color: B.value.style.chart.backgroundColor,
|
|
991
|
-
fillStyle: e.color,
|
|
992
|
-
strokeColor: "transparent"
|
|
993
|
-
});
|
|
994
|
-
})), B.value.style.chart.grid.x.timeLabels.show && Zn(), B.value.style.chart.selector.show && B.value.style.chart.selector.showHorizontalSelector && $n(), Un(), Hn(), B.value.style.chart.zoom.preview.enable && (J.value.start !== Y.value.start || J.value.end !== Y.value.end) && or(), N.value = !1);
|
|
995
|
-
}
|
|
996
|
-
let sr = Oe(() => {
|
|
997
|
-
P.value = !0, zn();
|
|
998
|
-
}, U.value > 200 ? 10 : 1, !P.value);
|
|
999
|
-
function cr(e) {
|
|
1000
|
-
if ([null, void 0].includes(j.value ?? L.value) || !e.coordinatesLine[j.value ?? L.value]) return !1;
|
|
1001
|
-
let { y: t, value: n } = e.coordinatesLine[j.value ?? L.value];
|
|
1002
|
-
return {
|
|
1003
|
-
y: t,
|
|
1004
|
-
value: n
|
|
1005
|
-
};
|
|
1006
|
-
}
|
|
1007
|
-
function lr(e) {
|
|
1008
|
-
if (!z.value || !V.value || hn.value) return;
|
|
1009
|
-
let { left: t, top: n } = V.value.getBoundingClientRect(), r = e.clientX - t;
|
|
1010
|
-
if (I.value = (e.clientY - n) * 2, (I.value < W.value.top || I.value > W.value.bottom) && (I.value = null), r * 2 < W.value.left || r * 2 > W.value.right) {
|
|
1011
|
-
mr();
|
|
1012
|
-
return;
|
|
1013
|
-
}
|
|
1014
|
-
let i = r * 2 - W.value.left, a = Math.floor(i / W.value.slot);
|
|
1015
|
-
if (j.value = a, R.value = a, Ct.value = !0, Ut.value = !1, !P.value) return;
|
|
1016
|
-
let o = "", s = B.value.style.chart.tooltip.customFormat, c = q.value.map((e) => ({
|
|
1017
|
-
shape: e.shape || null,
|
|
1018
|
-
name: e.name,
|
|
1019
|
-
color: e.color,
|
|
1020
|
-
type: e.type || "line",
|
|
1021
|
-
value: e.series.find((e, t) => t === j.value)
|
|
1022
|
-
}));
|
|
1023
|
-
Tt.value = {
|
|
1024
|
-
timeLabel: B.value.style.chart.grid.x.timeLabels.values.slice(J.value.start, J.value.end)[j.value] ? B.value.style.chart.tooltip.useDefaultTimeFormat ? Z.value.slice(J.value.start, J.value.end)[j.value]?.text : Xn.value[j.value]?.text : "",
|
|
1025
|
-
datapoint: c,
|
|
1026
|
-
seriesIndex: j.value,
|
|
1027
|
-
series: q.value,
|
|
1028
|
-
config: B.value
|
|
1029
|
-
}, vr({
|
|
1030
|
-
seriesIndex: j.value,
|
|
1031
|
-
datapoint: c
|
|
1032
|
-
}), de(s) && le(() => s({
|
|
1033
|
-
seriesIndex: j.value,
|
|
1034
|
-
datapoint: c,
|
|
1035
|
-
series: q.value,
|
|
1036
|
-
config: B.value
|
|
1037
|
-
})) ? wt.value = s({
|
|
1038
|
-
seriesIndex: j.value,
|
|
1039
|
-
datapoint: c,
|
|
1040
|
-
series: q.value,
|
|
1041
|
-
config: B.value
|
|
1042
|
-
}) : (B.value.style.chart.grid.x.timeLabels.values.slice(J.value.start, J.value.end)[j.value] ? o += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${B.value.style.chart.tooltip.borderColor}; width:100%">${B.value.style.chart.tooltip.useDefaultTimeFormat ? Z.value.slice(J.value.start, J.value.end)[j.value]?.text : Xn.value[j.value]?.text}</div>` : o += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${B.value.style.chart.tooltip.borderColor}; width:100%">${Z.value[j.value + J.value.start]?.text ?? ""}</div>`, o += wn.value.join(""), wt.value = o), P.value = !1;
|
|
1043
|
-
}
|
|
1044
|
-
function ur(e) {
|
|
1045
|
-
return q.value.map((t) => ({
|
|
1046
|
-
shape: t.shape || null,
|
|
1047
|
-
name: t.name,
|
|
1048
|
-
color: t.color,
|
|
1049
|
-
type: t.type || "line",
|
|
1050
|
-
value: t.series.find((t, n) => n === e)
|
|
1051
|
-
}));
|
|
1052
|
-
}
|
|
1053
|
-
function dr(e) {
|
|
1054
|
-
let t = "", n = B.value.style.chart.tooltip.customFormat, r = ur(e);
|
|
1055
|
-
return vr({
|
|
1056
|
-
seriesIndex: e,
|
|
1057
|
-
datapoint: r
|
|
1058
|
-
}), de(n) && le(() => n({
|
|
1059
|
-
seriesIndex: e,
|
|
1060
|
-
datapoint: r,
|
|
1061
|
-
series: q.value,
|
|
1062
|
-
config: B.value
|
|
1063
|
-
})) ? n({
|
|
1064
|
-
seriesIndex: e,
|
|
1065
|
-
datapoint: r,
|
|
1066
|
-
series: q.value,
|
|
1067
|
-
config: B.value
|
|
1068
|
-
}) : (B.value.style.chart.grid.x.timeLabels.values.slice(J.value.start, J.value.end)[e] ? t += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${B.value.style.chart.tooltip.borderColor}; width:100%">${B.value.style.chart.tooltip.useDefaultTimeFormat ? Z.value.slice(J.value.start, J.value.end)[e]?.text : Xn.value[e]?.text}</div>` : t += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${B.value.style.chart.tooltip.borderColor}; width:100%">${Z.value[e + J.value.start]?.text ?? ""}</div>`, t += wn.value.join(""), t);
|
|
1069
|
-
}
|
|
1070
|
-
function fr(e) {
|
|
1071
|
-
if (!V.value || !W.value?.slot) return;
|
|
1072
|
-
let t = V.value.getBoundingClientRect(), n = t.width / W.value.canvasWidth, r = t.height / W.value.canvasHeight, i = W.value.left + W.value.slot * e + W.value.slot / 2, a = W.value.top + W.value.height / 2;
|
|
1073
|
-
Gt.value = {
|
|
1074
|
-
x: t.left + i * n,
|
|
1075
|
-
y: t.top + a * r
|
|
1076
|
-
};
|
|
1077
|
-
}
|
|
1078
|
-
function pr(e, { fromKeyboard: t = !1 } = {}) {
|
|
1079
|
-
!z.value || hn.value || e != null && (e < 0 || e >= J.value.end - J.value.start || (j.value = e, R.value = e, Ct.value = !0, Ut.value = t, wt.value = dr(e), t && fr(e), P.value = !1, Q()));
|
|
1080
|
-
}
|
|
1081
|
-
function mr() {
|
|
1082
|
-
Ct.value = !1, j.value = null, R.value = null, wt.value = "", I.value = null, Ut.value = !1, Q();
|
|
1083
|
-
}
|
|
1084
|
-
function hr() {
|
|
1085
|
-
Wt.value = !0;
|
|
1086
|
-
}
|
|
1087
|
-
function gr() {
|
|
1088
|
-
Wt.value = !1, mr();
|
|
1089
|
-
}
|
|
1090
|
-
function _r(e) {
|
|
1091
|
-
if (!V.value || Rr.value || document.activeElement !== V.value) return;
|
|
1092
|
-
let t = e.key === "ArrowLeft", n = e.key === "ArrowRight";
|
|
1093
|
-
if (!t && !n) return;
|
|
1094
|
-
let r = J.value.end - J.value.start;
|
|
1095
|
-
if (r <= 0) return;
|
|
1096
|
-
e.preventDefault(), e.stopPropagation();
|
|
1097
|
-
let i = R.value;
|
|
1098
|
-
i !== null && i >= 0 && i < r ? n ? (i += 1, i >= r && (i = 0)) : (--i, i < 0 && (i = r - 1)) : i = n ? 0 : r - 1, pr(i, { fromKeyboard: !0 });
|
|
1099
|
-
}
|
|
1100
|
-
function vr({ seriesIndex: e, datapoint: t }) {
|
|
1101
|
-
Kt("selectX", {
|
|
1102
|
-
dataset: t,
|
|
1103
|
-
index: J.value.start + e,
|
|
1104
|
-
indexLabel: ""
|
|
1105
|
-
});
|
|
1106
|
-
}
|
|
1107
|
-
C(() => T.selectedXIndex, (e) => {
|
|
1108
|
-
if ([null, void 0].includes(T.selectedXIndex)) {
|
|
1109
|
-
mr();
|
|
1110
|
-
return;
|
|
1111
|
-
}
|
|
1112
|
-
let t = e - J.value.start;
|
|
1113
|
-
t < 0 || e >= J.value.end ? mr() : pr(t, { fromKeyboard: !1 });
|
|
1114
|
-
}, { immediate: !0 }), C(() => j.value, (e) => {
|
|
1115
|
-
sr();
|
|
1116
|
-
}), C(() => J.value, (e) => {
|
|
1117
|
-
N.value = !0, Q();
|
|
1118
|
-
}, { deep: !0 }), C(() => Y.value, (e) => {
|
|
1119
|
-
Q();
|
|
1120
|
-
}, { deep: !0 }), C(() => H.value.showDataLabels, (e) => {
|
|
1121
|
-
N.value = !0, Q();
|
|
1122
|
-
}), C(() => I.value, (e) => {
|
|
1123
|
-
e && Q();
|
|
1124
|
-
}), C(() => H.value.stacked, (e) => {
|
|
1125
|
-
N.value = !0, P.value = !0, sr();
|
|
1126
|
-
});
|
|
1127
|
-
function yr() {
|
|
1128
|
-
mr();
|
|
1129
|
-
}
|
|
1130
|
-
let $ = Qe(null), br = Qe(null), xr = Qe(null);
|
|
1131
|
-
Xe(() => {
|
|
1132
|
-
It.value = !0, Sr();
|
|
1133
|
-
});
|
|
1134
|
-
function Sr() {
|
|
1135
|
-
if (se(T.dataset) && Zt.value && t({
|
|
1136
|
-
componentName: "VueUiXyCanvas",
|
|
1137
|
-
type: "dataset"
|
|
1138
|
-
}), Ke(() => {
|
|
1139
|
-
V.value && !O.value && (O.value = V.value.getContext("2d", { willReadFrequently: !0 })), O.value && z.value && (N.value = !0, P.value = !0, zn());
|
|
1140
|
-
}), B.value.responsive) {
|
|
1141
|
-
let e = Te(() => {
|
|
1142
|
-
let { width: e, height: t } = Ae({
|
|
1143
|
-
chart: D.value,
|
|
1144
|
-
title: B.value.style.chart.title.text ? At.value : null,
|
|
1145
|
-
legend: B.value.style.chart.legend.show ? jt.value : null,
|
|
1146
|
-
slicer: B.value.style.chart.zoom.show && U.value > 6 ? F.value?.$el : null,
|
|
1147
|
-
source: Mt.value
|
|
1148
|
-
});
|
|
1149
|
-
requestAnimationFrame(() => {
|
|
1150
|
-
cn.value = `${e} / ${t}`;
|
|
1151
|
-
});
|
|
1152
|
-
});
|
|
1153
|
-
$.value && (br.value && $.value.unobserve(br.value), $.value.disconnect()), $.value = new ResizeObserver(e), br.value = D.value.parentNode, $.value.observe(br.value);
|
|
1154
|
-
}
|
|
1155
|
-
xr.value && xr.value.disconnect(), xr.value = new ResizeObserver(async (e) => {
|
|
1156
|
-
for (let t of e) t.contentBoxSize && St.value && (N.value = !0, sr());
|
|
1157
|
-
}), xr.value.observe(St.value), An();
|
|
1158
|
-
}
|
|
1159
|
-
Ye(() => {
|
|
1160
|
-
xr.value && xr.value.disconnect(), $.value && (br.value && $.value.unobserve(br.value), $.value.disconnect());
|
|
1161
|
-
});
|
|
1162
|
-
function Cr() {
|
|
1163
|
-
M.value.length ? M.value = [] : Or.value.forEach((e, t) => {
|
|
1164
|
-
M.value.push(t);
|
|
1165
|
-
}), N.value = !0, sr(), Kt("selectLegend", q.value);
|
|
1166
|
-
}
|
|
1167
|
-
function wr(e) {
|
|
1168
|
-
M.value.includes(e) ? M.value = M.value.filter((t) => t !== e) : M.value.push(e), N.value = !0, sr(), Kt("selectLegend", q.value);
|
|
1169
|
-
}
|
|
1170
|
-
function Tr(e) {
|
|
1171
|
-
return K.value.length ? K.value.find((t) => t.name === e) || (B.value.debug && console.warn(`VueUiXyCanvas - Series name not found "${e}"`), null) : (B.value.debug && console.warn("VueUiXyCanvas - There are no series to show."), null);
|
|
1172
|
-
}
|
|
1173
|
-
function Er(e) {
|
|
1174
|
-
let t = Tr(e);
|
|
1175
|
-
t !== null && M.value.includes(t.absoluteIndex) && wr(t.absoluteIndex);
|
|
1176
|
-
}
|
|
1177
|
-
function Dr(e) {
|
|
1178
|
-
let t = Tr(e);
|
|
1179
|
-
t !== null && (M.value.includes(t.absoluteIndex) || wr(t.absoluteIndex));
|
|
1180
|
-
}
|
|
1181
|
-
let Or = p(() => K.value.map((e, t) => ({
|
|
1182
|
-
...e,
|
|
1183
|
-
name: e.name,
|
|
1184
|
-
color: re(e.color) || mn.value[t] || s[t] || s[t % s.length],
|
|
1185
|
-
shape: e.shape || "circle",
|
|
1186
|
-
prefix: e.prefix || "",
|
|
1187
|
-
suffix: e.suffix || "",
|
|
1188
|
-
rounding: e.rounding || 0
|
|
1189
|
-
})).map((e) => ({
|
|
1190
|
-
...e,
|
|
1191
|
-
opacity: M.value.includes(e.absoluteIndex) ? .5 : 1,
|
|
1192
|
-
segregate: () => wr(e.absoluteIndex),
|
|
1193
|
-
isSegregated: M.value.includes(e.absoluteIndex)
|
|
1194
|
-
}))), kr = p(() => ({
|
|
1195
|
-
cy: "donut-div-legend",
|
|
1196
|
-
backgroundColor: B.value.style.chart.legend.backgroundColor,
|
|
1197
|
-
color: B.value.style.chart.legend.color,
|
|
1198
|
-
fontSize: B.value.style.chart.legend.fontSize,
|
|
1199
|
-
paddingBottom: 12,
|
|
1200
|
-
fontWeight: B.value.style.chart.legend.bold ? "bold" : ""
|
|
1201
|
-
})), Ar = p(() => {
|
|
1202
|
-
let e = [""].concat(q.value.map((e) => e.name), " <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2\" /></svg>"), t = [];
|
|
1203
|
-
for (let e = 0; e < U.value; e += 1) {
|
|
1204
|
-
let n = q.value.map((t) => t.series[e] ?? 0).reduce((e, t) => e + t, 0);
|
|
1205
|
-
t.push([B.value.style.chart.grid.x.timeLabels.values.slice(J.value.start, J.value.end)[e] ? Z?.value?.slice(J.value.start, J.value.end)?.[e]?.text ?? e + 1 : e + 1].concat(q.value.map((t) => (t.series[e] ?? 0).toFixed(B.value.table.rounding)), (n ?? 0).toFixed(B.value.table.rounding)));
|
|
1206
|
-
}
|
|
1207
|
-
let n = {
|
|
1208
|
-
th: {
|
|
1209
|
-
backgroundColor: B.value.table.th.backgroundColor,
|
|
1210
|
-
color: B.value.table.th.color,
|
|
1211
|
-
outline: B.value.table.th.outline
|
|
1212
|
-
},
|
|
1213
|
-
td: {
|
|
1214
|
-
backgroundColor: B.value.table.td.backgroundColor,
|
|
1215
|
-
color: B.value.table.td.color,
|
|
1216
|
-
outline: B.value.table.td.outline
|
|
1217
|
-
},
|
|
1218
|
-
breakpoint: B.value.table.responsiveBreakpoint
|
|
1219
|
-
}, r = [B.value.table.columnNames.period].concat(q.value.map((e) => e.name), B.value.table.columnNames.total);
|
|
1220
|
-
return {
|
|
1221
|
-
head: e,
|
|
1222
|
-
body: t.slice(0, J.value.end - J.value.start),
|
|
1223
|
-
config: n,
|
|
1224
|
-
colNames: r
|
|
1225
|
-
};
|
|
1226
|
-
}), jr = p(() => {
|
|
1227
|
-
if (q.value.length === 0) return {
|
|
1228
|
-
head: [],
|
|
1229
|
-
body: [],
|
|
1230
|
-
config: {},
|
|
1231
|
-
columnNames: []
|
|
1232
|
-
};
|
|
1233
|
-
let e = q.value.map((e) => ({
|
|
1234
|
-
label: e.name,
|
|
1235
|
-
color: e.color,
|
|
1236
|
-
type: e.type
|
|
1237
|
-
})), t = [];
|
|
1238
|
-
for (let e = J.value.start; e < J.value.end; e += 1) {
|
|
1239
|
-
let n = [B.value.style.chart.grid.x.timeLabels.values[e] ? Z.value[e].text : e + 1];
|
|
1240
|
-
q.value.forEach((t) => {
|
|
1241
|
-
n.push(Number((t.series[e] || 0).toFixed(B.value.table.rounding)));
|
|
1242
|
-
}), t.push(n);
|
|
1243
|
-
}
|
|
1244
|
-
return {
|
|
1245
|
-
head: e,
|
|
1246
|
-
body: t
|
|
1247
|
-
};
|
|
1248
|
-
});
|
|
1249
|
-
function Mr(e = null) {
|
|
1250
|
-
let t = [
|
|
1251
|
-
[B.value.style.chart.title.text],
|
|
1252
|
-
[B.value.style.chart.title.subtitle.text],
|
|
1253
|
-
[""]
|
|
1254
|
-
], n = ["", ...jr.value.head.map((e) => e.label)], r = jr.value.body, i = u(t.concat([n]).concat(r));
|
|
1255
|
-
e ? e(i) : te({
|
|
1256
|
-
csvContent: i,
|
|
1257
|
-
title: B.value.style.chart.title.text || "vue-ui-xy-canvas"
|
|
1258
|
-
});
|
|
1259
|
-
}
|
|
1260
|
-
function Nr() {
|
|
1261
|
-
return q.value;
|
|
1262
|
-
}
|
|
1263
|
-
function Pr() {
|
|
1264
|
-
H.value.showTable = !H.value.showTable;
|
|
1265
|
-
}
|
|
1266
|
-
function Fr() {
|
|
1267
|
-
H.value.showDataLabels = !H.value.showDataLabels;
|
|
1268
|
-
}
|
|
1269
|
-
function Ir() {
|
|
1270
|
-
H.value.stacked = !H.value.stacked;
|
|
1271
|
-
}
|
|
1272
|
-
function Lr() {
|
|
1273
|
-
H.value.showTooltip = !H.value.showTooltip;
|
|
1274
|
-
}
|
|
1275
|
-
let Rr = b(!1);
|
|
1276
|
-
function zr() {
|
|
1277
|
-
Rr.value = !Rr.value;
|
|
1278
|
-
}
|
|
1279
|
-
async function Br({ scale: e = 2 } = {}) {
|
|
1280
|
-
if (!D.value) return;
|
|
1281
|
-
let { imageUri: t, base64: n } = await xe({
|
|
1282
|
-
domElement: D.value,
|
|
1283
|
-
base64: !0,
|
|
1284
|
-
img: !0,
|
|
1285
|
-
scale: e
|
|
1286
|
-
}), r = D.value.getBoundingClientRect(), i = {
|
|
1287
|
-
width: r.width,
|
|
1288
|
-
height: r.height,
|
|
1289
|
-
aspectRatio: r.height ? r.width / r.height : 0
|
|
1290
|
-
}, a = await ce(t, e) ?? i;
|
|
1291
|
-
return {
|
|
1292
|
-
imageUri: t,
|
|
1293
|
-
base64: n,
|
|
1294
|
-
title: B.value.style.chart.title.text,
|
|
1295
|
-
...a
|
|
1296
|
-
};
|
|
1297
|
-
}
|
|
1298
|
-
let Vr = p(() => {
|
|
1299
|
-
let e = B.value.table.useDialog && !B.value.table.show, t = H.value.showTable;
|
|
1300
|
-
return {
|
|
1301
|
-
component: e ? vt : Ne,
|
|
1302
|
-
title: `${B.value.style.chart.title.text}${B.value.style.chart.title.subtitle.text ? `: ${B.value.style.chart.title.subtitle.text}` : ""}`,
|
|
1303
|
-
props: e ? {
|
|
1304
|
-
backgroundColor: B.value.table.th.backgroundColor,
|
|
1305
|
-
color: B.value.table.th.color,
|
|
1306
|
-
headerColor: B.value.table.th.color,
|
|
1307
|
-
headerBg: B.value.table.th.backgroundColor,
|
|
1308
|
-
isFullscreen: kt.value,
|
|
1309
|
-
fullscreenParent: D.value,
|
|
1310
|
-
forcedWidth: Math.min(800, window.innerWidth * .8),
|
|
1311
|
-
isCursorPointer: Xt.value
|
|
1312
|
-
} : {
|
|
1313
|
-
hideDetails: !0,
|
|
1314
|
-
config: {
|
|
1315
|
-
open: t,
|
|
1316
|
-
maxHeight: 1e4,
|
|
1317
|
-
body: {
|
|
1318
|
-
backgroundColor: B.value.style.chart.backgroundColor,
|
|
1319
|
-
color: B.value.style.chart.color
|
|
1320
|
-
},
|
|
1321
|
-
head: {
|
|
1322
|
-
backgroundColor: B.value.style.chart.backgroundColor,
|
|
1323
|
-
color: B.value.style.chart.color
|
|
1324
|
-
}
|
|
1325
|
-
}
|
|
1326
|
-
}
|
|
1327
|
-
};
|
|
1328
|
-
});
|
|
1329
|
-
C(() => H.value.showTable, (e) => {
|
|
1330
|
-
B.value.table.show || (e && B.value.table.useDialog && Lt.value ? Lt.value.open() : "close" in Lt.value && Lt.value.close());
|
|
1331
|
-
});
|
|
1332
|
-
function Hr() {
|
|
1333
|
-
H.value.showTable = !1, Rt.value && Rt.value.setTableIconState(!1);
|
|
1334
|
-
}
|
|
1335
|
-
function Ur(e) {
|
|
1336
|
-
if (e?.stage === "start") {
|
|
1337
|
-
Ht.value = !0;
|
|
1338
|
-
return;
|
|
1339
|
-
}
|
|
1340
|
-
if (e?.stage === "end") {
|
|
1341
|
-
Ht.value = !1;
|
|
1342
|
-
return;
|
|
1343
|
-
}
|
|
1344
|
-
fn();
|
|
1345
|
-
}
|
|
1346
|
-
async function Wr() {
|
|
1347
|
-
if (Kt("copyAlt", {
|
|
1348
|
-
config: B.value,
|
|
1349
|
-
dataset: q.value
|
|
1350
|
-
}), !B.value.userOptions.callbacks.altCopy) {
|
|
1351
|
-
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
1352
|
-
return;
|
|
1353
|
-
}
|
|
1354
|
-
await Promise.resolve(B.value.userOptions.callbacks.altCopy({
|
|
1355
|
-
config: B.value,
|
|
1356
|
-
dataset: q.value
|
|
1357
|
-
}));
|
|
1358
|
-
}
|
|
1359
|
-
return Ce({
|
|
1360
|
-
getData: Nr,
|
|
1361
|
-
getImage: Br,
|
|
1362
|
-
generateCsv: Mr,
|
|
1363
|
-
generatePdf: dn,
|
|
1364
|
-
generateImage: fn,
|
|
1365
|
-
hideSeries: Dr,
|
|
1366
|
-
showSeries: Er,
|
|
1367
|
-
toggleTable: Pr,
|
|
1368
|
-
toggleLabels: Fr,
|
|
1369
|
-
toggleStack: Ir,
|
|
1370
|
-
toggleTooltip: Lr,
|
|
1371
|
-
toggleAnnotator: zr,
|
|
1372
|
-
toggleFullscreen: pn,
|
|
1373
|
-
copyAlt: Wr
|
|
1374
|
-
}), (t, n) => (y(), Be("div", {
|
|
1375
|
-
style: Je(`width:100%; position:relative; ${B.value.responsive ? "height: 100%" : ""}; background:${B.value.style.chart.backgroundColor};`),
|
|
1376
|
-
ref_key: "xy",
|
|
1377
|
-
ref: D,
|
|
1378
|
-
id: `xy_canvas_${E.value}`,
|
|
1379
|
-
class: qe(`vue-data-ui-component vue-ui-xy-canvas ${kt.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
1380
|
-
onMouseenter: an,
|
|
1381
|
-
onMouseleave: on
|
|
1382
|
-
}, [
|
|
1383
|
-
g("div", {
|
|
1384
|
-
id: `chart-instructions-${E.value}`,
|
|
1385
|
-
class: "sr-only"
|
|
1386
|
-
}, [g("p", null, $e(B.value.a11y.translations.keyboardNavigation), 1)], 8, at),
|
|
1387
|
-
g("div", ot, $e(Yt.value), 1),
|
|
1388
|
-
B.value.style.chart.title.text ? (y(), Be("div", {
|
|
1389
|
-
key: 0,
|
|
1390
|
-
ref_key: "chartTitle",
|
|
1391
|
-
ref: At,
|
|
1392
|
-
style: Je(`width:100%;background:${B.value.style.chart.backgroundColor};`)
|
|
1393
|
-
}, [(y(), m(Se, {
|
|
1394
|
-
key: `title_${Nt.value}`,
|
|
1395
|
-
config: {
|
|
1396
|
-
title: {
|
|
1397
|
-
cy: "xy-canvas-title",
|
|
1398
|
-
...B.value.style.chart.title
|
|
1399
|
-
},
|
|
1400
|
-
subtitle: {
|
|
1401
|
-
cy: "xy-canvas-subtitle",
|
|
1402
|
-
...B.value.style.chart.title.subtitle
|
|
1403
|
-
}
|
|
1404
|
-
}
|
|
1405
|
-
}, null, 8, ["config"]))], 4)) : h("", !0),
|
|
1406
|
-
g("div", { id: `legend-top-${E.value}` }, null, 8, st),
|
|
1407
|
-
B.value.userOptions.show && z.value && (S(rn) || S(tn)) ? (y(), m(S(gt), {
|
|
1408
|
-
ref_key: "userOptionsRef",
|
|
1409
|
-
ref: Rt,
|
|
1410
|
-
key: `user_option_${Ot.value}`,
|
|
1411
|
-
backgroundColor: B.value.style.chart.backgroundColor,
|
|
1412
|
-
color: B.value.style.chart.color,
|
|
1413
|
-
isPrinting: S(ln),
|
|
1414
|
-
isImaging: S(un),
|
|
1415
|
-
uid: E.value,
|
|
1416
|
-
hasTooltip: B.value.userOptions.buttons.tooltip && B.value.style.chart.tooltip.show,
|
|
1417
|
-
hasPdf: B.value.userOptions.buttons.pdf,
|
|
1418
|
-
hasImg: B.value.userOptions.buttons.img,
|
|
1419
|
-
hasXls: B.value.userOptions.buttons.csv,
|
|
1420
|
-
hasLabel: B.value.userOptions.buttons.labels,
|
|
1421
|
-
hasStack: e.dataset.length > 1 && B.value.userOptions.buttons.stack,
|
|
1422
|
-
hasFullscreen: B.value.userOptions.buttons.fullscreen,
|
|
1423
|
-
hasAltCopy: B.value.userOptions.buttons.altCopy,
|
|
1424
|
-
hasTable: J.value.end - J.value.start <= 730 && B.value.userOptions.buttons.table,
|
|
1425
|
-
isFullscreen: kt.value,
|
|
1426
|
-
isTooltip: H.value.showTooltip,
|
|
1427
|
-
isStacked: H.value.stacked,
|
|
1428
|
-
titles: { ...B.value.userOptions.buttonTitles },
|
|
1429
|
-
chartElement: D.value,
|
|
1430
|
-
position: B.value.userOptions.position,
|
|
1431
|
-
hasAnnotator: B.value.userOptions.buttons.annotator,
|
|
1432
|
-
isAnnotation: Rr.value,
|
|
1433
|
-
callbacks: B.value.userOptions.callbacks,
|
|
1434
|
-
printScale: B.value.userOptions.print.scale,
|
|
1435
|
-
tableDialog: B.value.table.useDialog,
|
|
1436
|
-
isCursorPointer: Xt.value,
|
|
1437
|
-
onToggleFullscreen: pn,
|
|
1438
|
-
onGeneratePdf: S(dn),
|
|
1439
|
-
onGenerateCsv: Mr,
|
|
1440
|
-
onGenerateImage: Ur,
|
|
1441
|
-
onToggleTable: Pr,
|
|
1442
|
-
onToggleLabels: Fr,
|
|
1443
|
-
onToggleStack: Ir,
|
|
1444
|
-
onToggleTooltip: Lr,
|
|
1445
|
-
onToggleAnnotator: zr,
|
|
1446
|
-
onCopyAlt: Wr,
|
|
1447
|
-
style: Je({ visibility: S(rn) ? S(tn) ? "visible" : "hidden" : "visible" })
|
|
1448
|
-
}, Ve({ _: 2 }, [
|
|
1449
|
-
t.$slots.menuIcon ? {
|
|
1450
|
-
name: "menuIcon",
|
|
1451
|
-
fn: w(({ isOpen: e, color: n }) => [x(t.$slots, "menuIcon", v(_({
|
|
1452
|
-
isOpen: e,
|
|
1453
|
-
color: n
|
|
1454
|
-
})), void 0, !0)]),
|
|
1455
|
-
key: "0"
|
|
1456
|
-
} : void 0,
|
|
1457
|
-
t.$slots.optionTooltip ? {
|
|
1458
|
-
name: "optionTooltip",
|
|
1459
|
-
fn: w(() => [x(t.$slots, "optionTooltip", {}, void 0, !0)]),
|
|
1460
|
-
key: "1"
|
|
1461
|
-
} : void 0,
|
|
1462
|
-
t.$slots.optionPdf ? {
|
|
1463
|
-
name: "optionPdf",
|
|
1464
|
-
fn: w(() => [x(t.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1465
|
-
key: "2"
|
|
1466
|
-
} : void 0,
|
|
1467
|
-
t.$slots.optionCsv ? {
|
|
1468
|
-
name: "optionCsv",
|
|
1469
|
-
fn: w(() => [x(t.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1470
|
-
key: "3"
|
|
1471
|
-
} : void 0,
|
|
1472
|
-
t.$slots.optionImg ? {
|
|
1473
|
-
name: "optionImg",
|
|
1474
|
-
fn: w(() => [x(t.$slots, "optionImg", {}, void 0, !0)]),
|
|
1475
|
-
key: "4"
|
|
1476
|
-
} : void 0,
|
|
1477
|
-
t.$slots.optionTable ? {
|
|
1478
|
-
name: "optionTable",
|
|
1479
|
-
fn: w(() => [x(t.$slots, "optionTable", {}, void 0, !0)]),
|
|
1480
|
-
key: "5"
|
|
1481
|
-
} : void 0,
|
|
1482
|
-
t.$slots.optionLabels ? {
|
|
1483
|
-
name: "optionLabels",
|
|
1484
|
-
fn: w(() => [x(t.$slots, "optionLabels", {}, void 0, !0)]),
|
|
1485
|
-
key: "6"
|
|
1486
|
-
} : void 0,
|
|
1487
|
-
t.$slots.optionStack ? {
|
|
1488
|
-
name: "optionStack",
|
|
1489
|
-
fn: w(() => [x(t.$slots, "optionStack", {}, void 0, !0)]),
|
|
1490
|
-
key: "7"
|
|
1491
|
-
} : void 0,
|
|
1492
|
-
t.$slots.optionFullscreen ? {
|
|
1493
|
-
name: "optionFullscreen",
|
|
1494
|
-
fn: w(({ toggleFullscreen: e, isFullscreen: n }) => [x(t.$slots, "optionFullscreen", v(_({
|
|
1495
|
-
toggleFullscreen: e,
|
|
1496
|
-
isFullscreen: n
|
|
1497
|
-
})), void 0, !0)]),
|
|
1498
|
-
key: "8"
|
|
1499
|
-
} : void 0,
|
|
1500
|
-
t.$slots.optionAnnotator ? {
|
|
1501
|
-
name: "optionAnnotator",
|
|
1502
|
-
fn: w(({ toggleAnnotator: e, isAnnotator: n }) => [x(t.$slots, "optionAnnotator", v(_({
|
|
1503
|
-
toggleAnnotator: e,
|
|
1504
|
-
isAnnotator: n
|
|
1505
|
-
})), void 0, !0)]),
|
|
1506
|
-
key: "9"
|
|
1507
|
-
} : void 0,
|
|
1508
|
-
t.$slots.optionAltCopy ? {
|
|
1509
|
-
name: "optionAltCopy",
|
|
1510
|
-
fn: w(({ altCopy: e }) => [x(t.$slots, "optionAltCopy", v(_({ altCopy: e })), void 0, !0)]),
|
|
1511
|
-
key: "10"
|
|
1512
|
-
} : void 0,
|
|
1513
|
-
t.$slots["custom-menu-before"] ? {
|
|
1514
|
-
name: "custom-menu-before",
|
|
1515
|
-
fn: w(() => [x(t.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
1516
|
-
key: "11"
|
|
1517
|
-
} : void 0,
|
|
1518
|
-
t.$slots["custom-menu-after"] ? {
|
|
1519
|
-
name: "custom-menu-after",
|
|
1520
|
-
fn: w(() => [x(t.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
1521
|
-
key: "12"
|
|
1522
|
-
} : void 0
|
|
1523
|
-
]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasXls.hasLabel.hasStack.hasFullscreen.hasAltCopy.hasTable.isFullscreen.isTooltip.isStacked.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.style".split("."))) : h("", !0),
|
|
1524
|
-
g("div", {
|
|
1525
|
-
class: "vue-ui-xy-canvas",
|
|
1526
|
-
style: Je(`position: relative; aspect-ratio: ${cn.value}`),
|
|
1527
|
-
ref_key: "container",
|
|
1528
|
-
ref: St
|
|
1529
|
-
}, [
|
|
1530
|
-
g("canvas", {
|
|
1531
|
-
ref_key: "canvas",
|
|
1532
|
-
ref: V,
|
|
1533
|
-
"aria-label": Jt.value,
|
|
1534
|
-
"aria-describedby": `chart-instructions-${E.value}`,
|
|
1535
|
-
role: "img",
|
|
1536
|
-
"aria-live": "polite",
|
|
1537
|
-
tabindex: "0",
|
|
1538
|
-
style: {
|
|
1539
|
-
width: "100%",
|
|
1540
|
-
height: "100%"
|
|
1541
|
-
},
|
|
1542
|
-
onMousemove: n[0] ||= (e) => lr(e),
|
|
1543
|
-
onMouseleave: yr,
|
|
1544
|
-
onFocus: hr,
|
|
1545
|
-
onBlur: gr,
|
|
1546
|
-
onKeydown: _r
|
|
1547
|
-
}, null, 40, ct),
|
|
1548
|
-
t.$slots.hint ? (y(), Be("div", lt, [x(t.$slots, "hint", v(_({
|
|
1549
|
-
hint: B.value.a11y.translations.keyboardNavigation,
|
|
1550
|
-
isVisible: Wt.value
|
|
1551
|
-
})), void 0, !0)])) : h("", !0),
|
|
1552
|
-
x(t.$slots, "skeleton", {}, () => [S($t) ? (y(), m(ve, { key: 0 })) : h("", !0)], !0),
|
|
1553
|
-
Ue(S(mt), {
|
|
1554
|
-
teleportTo: B.value.style.chart.tooltip.teleportTo,
|
|
1555
|
-
show: H.value.showTooltip && Ct.value,
|
|
1556
|
-
backgroundColor: B.value.style.chart.tooltip.backgroundColor,
|
|
1557
|
-
color: B.value.style.chart.tooltip.color,
|
|
1558
|
-
fontSize: B.value.style.chart.tooltip.fontSize,
|
|
1559
|
-
borderRadius: B.value.style.chart.tooltip.borderRadius,
|
|
1560
|
-
borderColor: B.value.style.chart.tooltip.borderColor,
|
|
1561
|
-
borderWidth: B.value.style.chart.tooltip.borderWidth,
|
|
1562
|
-
position: B.value.style.chart.tooltip.position,
|
|
1563
|
-
offsetX: B.value.style.chart.tooltip.offsetX,
|
|
1564
|
-
offsetY: B.value.style.chart.tooltip.offsetY,
|
|
1565
|
-
parent: t.$refs.xy,
|
|
1566
|
-
content: wt.value,
|
|
1567
|
-
isFullscreen: kt.value,
|
|
1568
|
-
backgroundOpacity: B.value.style.chart.tooltip.backgroundOpacity,
|
|
1569
|
-
isCustom: S(de)(B.value.style.chart.tooltip.customFormat),
|
|
1570
|
-
smooth: B.value.style.chart.tooltip.smooth,
|
|
1571
|
-
backdropFilter: B.value.style.chart.tooltip.backdropFilter,
|
|
1572
|
-
smoothForce: B.value.style.chart.tooltip.smoothForce,
|
|
1573
|
-
smoothSnapThreshold: B.value.style.chart.tooltip.smoothSnapThreshold,
|
|
1574
|
-
isA11yMode: Ut.value,
|
|
1575
|
-
a11yPosition: Gt.value
|
|
1576
|
-
}, {
|
|
1577
|
-
"tooltip-before": w(() => [x(t.$slots, "tooltip-before", v(_({ ...Tt.value })), void 0, !0)]),
|
|
1578
|
-
tooltip: w(() => [x(t.$slots, "tooltip", v(_({ ...Tt.value })), void 0, !0)]),
|
|
1579
|
-
"tooltip-after": w(() => [x(t.$slots, "tooltip-after", v(_({ ...Tt.value })), void 0, !0)]),
|
|
1580
|
-
_: 3
|
|
1581
|
-
}, 8, [
|
|
1582
|
-
"teleportTo",
|
|
1583
|
-
"show",
|
|
1584
|
-
"backgroundColor",
|
|
1585
|
-
"color",
|
|
1586
|
-
"fontSize",
|
|
1587
|
-
"borderRadius",
|
|
1588
|
-
"borderColor",
|
|
1589
|
-
"borderWidth",
|
|
1590
|
-
"position",
|
|
1591
|
-
"offsetX",
|
|
1592
|
-
"offsetY",
|
|
1593
|
-
"parent",
|
|
1594
|
-
"content",
|
|
1595
|
-
"isFullscreen",
|
|
1596
|
-
"backgroundOpacity",
|
|
1597
|
-
"isCustom",
|
|
1598
|
-
"smooth",
|
|
1599
|
-
"backdropFilter",
|
|
1600
|
-
"smoothForce",
|
|
1601
|
-
"smoothSnapThreshold",
|
|
1602
|
-
"isA11yMode",
|
|
1603
|
-
"a11yPosition"
|
|
1604
|
-
])
|
|
1605
|
-
], 4),
|
|
1606
|
-
B.value.style.chart.zoom.show && U.value > 6 && z.value && Bt.value && !S($t) ? (y(), m(Me, {
|
|
1607
|
-
key: 2,
|
|
1608
|
-
ref_key: "chartSlicer",
|
|
1609
|
-
ref: F,
|
|
1610
|
-
"data-dom-to-png-ignore-layout": "",
|
|
1611
|
-
allMinimaps: Dn.value,
|
|
1612
|
-
background: B.value.style.chart.zoom.color,
|
|
1613
|
-
borderColor: B.value.style.chart.backgroundColor,
|
|
1614
|
-
customFormat: B.value.style.chart.zoom.customFormat,
|
|
1615
|
-
cutNullValues: Tn.value,
|
|
1616
|
-
enableRangeHandles: B.value.style.chart.zoom.enableRangeHandles,
|
|
1617
|
-
enableSelectionDrag: B.value.style.chart.zoom.enableSelectionDrag,
|
|
1618
|
-
end: J.value.end,
|
|
1619
|
-
focusOnDrag: B.value.style.chart.zoom.focusOnDrag,
|
|
1620
|
-
focusRangeRatio: B.value.style.chart.zoom.focusRangeRatio,
|
|
1621
|
-
fontSize: B.value.style.chart.zoom.fontSize,
|
|
1622
|
-
immediate: !B.value.style.chart.zoom.preview.enable,
|
|
1623
|
-
inputColor: B.value.style.chart.zoom.color,
|
|
1624
|
-
isPreview: jn.value,
|
|
1625
|
-
labelLeft: B.value.style.chart.grid.x.timeLabels.values[J.value.start] ? Z.value[J.value.start]?.text : "",
|
|
1626
|
-
labelRight: B.value.style.chart.grid.x.timeLabels.values[J.value.end - 1] ? Z.value[J.value.end - 1]?.text : "",
|
|
1627
|
-
max: U.value,
|
|
1628
|
-
min: 0,
|
|
1629
|
-
minimap: En.value,
|
|
1630
|
-
minimapCompact: B.value.style.chart.zoom.minimap.compact,
|
|
1631
|
-
minimapFrameColor: B.value.style.chart.zoom.minimap.frameColor,
|
|
1632
|
-
minimapIndicatorColor: B.value.style.chart.zoom.minimap.indicatorColor,
|
|
1633
|
-
minimapLineColor: B.value.style.chart.zoom.minimap.lineColor,
|
|
1634
|
-
minimapMerged: B.value.style.chart.zoom.minimap.merged,
|
|
1635
|
-
minimapSelectedColor: B.value.style.chart.zoom.minimap.selectedColor,
|
|
1636
|
-
minimapSelectedColorOpacity: B.value.style.chart.zoom.minimap.selectedColorOpacity,
|
|
1637
|
-
minimapSelectedIndex: j.value,
|
|
1638
|
-
minimapSelectionRadius: B.value.style.chart.zoom.minimap.selectionRadius,
|
|
1639
|
-
preciseLabels: Yn.value?.length ? Yn.value : Z.value,
|
|
1640
|
-
refreshEndPoint: B.value.style.chart.zoom.endIndex === null ? U.value : B.value.style.chart.zoom.endIndex + 1,
|
|
1641
|
-
refreshStartPoint: B.value.style.chart.zoom.startIndex === null ? 0 : B.value.style.chart.zoom.startIndex,
|
|
1642
|
-
selectColor: B.value.style.chart.zoom.highlightColor,
|
|
1643
|
-
selectedSeries: K.value,
|
|
1644
|
-
smoothMinimap: B.value.style.chart.zoom.minimap.smooth,
|
|
1645
|
-
start: J.value.start,
|
|
1646
|
-
timeLabels: Z.value,
|
|
1647
|
-
usePreciseLabels: B.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !B.value.style.chart.zoom.useDefaultFormat,
|
|
1648
|
-
textColor: B.value.style.chart.color,
|
|
1649
|
-
useResetSlot: B.value.style.chart.zoom.useResetSlot,
|
|
1650
|
-
valueEnd: J.value.end,
|
|
1651
|
-
valueStart: J.value.start,
|
|
1652
|
-
verticalHandles: B.value.style.chart.zoom.minimap.verticalHandles,
|
|
1653
|
-
maxWidth: B.value.style.chart.zoom.maxWidth,
|
|
1654
|
-
additionalMinimapHeight: B.value.style.chart.zoom.minimap.additionalHeight,
|
|
1655
|
-
handleType: B.value.style.chart.zoom.minimap.handleType,
|
|
1656
|
-
handleIconColor: B.value.style.chart.zoom.minimap.handleIconColor,
|
|
1657
|
-
handleBorderWidth: B.value.style.chart.zoom.minimap.handleBorderWidth,
|
|
1658
|
-
handleBorderColor: B.value.style.chart.zoom.minimap.handleBorderColor,
|
|
1659
|
-
handleFill: B.value.style.chart.zoom.minimap.handleFill,
|
|
1660
|
-
handleWidth: B.value.style.chart.zoom.minimap.handleWidth,
|
|
1661
|
-
onFutureEnd: n[1] ||= (e) => Mn("end", e),
|
|
1662
|
-
onFutureStart: n[2] ||= (e) => Mn("start", e),
|
|
1663
|
-
onReset: An,
|
|
1664
|
-
onTrapMouse: gn,
|
|
1665
|
-
"onUpdate:end": Fn,
|
|
1666
|
-
"onUpdate:start": Pn
|
|
1667
|
-
}, {
|
|
1668
|
-
"reset-action": w(({ reset: e }) => [x(t.$slots, "reset-action", v(_({ reset: e })), void 0, !0)]),
|
|
1669
|
-
_: 3
|
|
1670
|
-
}, 8, /* @__PURE__ */ "allMinimaps.background.borderColor.customFormat.cutNullValues.enableRangeHandles.enableSelectionDrag.end.focusOnDrag.focusRangeRatio.fontSize.immediate.inputColor.isPreview.labelLeft.labelRight.max.minimap.minimapCompact.minimapFrameColor.minimapIndicatorColor.minimapLineColor.minimapMerged.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectedIndex.minimapSelectionRadius.preciseLabels.refreshEndPoint.refreshStartPoint.selectColor.selectedSeries.smoothMinimap.start.timeLabels.usePreciseLabels.textColor.useResetSlot.valueEnd.valueStart.verticalHandles.maxWidth.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth".split("."))) : h("", !0),
|
|
1671
|
-
g("div", { id: `legend-bottom-${E.value}` }, null, 8, ut),
|
|
1672
|
-
It.value && (B.value.style.chart.legend.show || t.$slots.legend) ? (y(), m(ze, {
|
|
1673
|
-
key: 3,
|
|
1674
|
-
to: B.value.style.chart.legend.position === "top" ? `#legend-top-${E.value}` : `#legend-bottom-${E.value}`
|
|
1675
|
-
}, [g("div", {
|
|
1676
|
-
ref_key: "chartLegend",
|
|
1677
|
-
ref: jt
|
|
1678
|
-
}, [x(t.$slots, "legend", { legend: Or.value }, () => [B.value.style.chart.legend.show && z.value ? (y(), m(Le, {
|
|
1679
|
-
legendSet: Or.value,
|
|
1680
|
-
config: kr.value,
|
|
1681
|
-
key: `legend_${Ft.value}`,
|
|
1682
|
-
isCursorPointer: Xt.value,
|
|
1683
|
-
onClickMarker: n[3] ||= ({ i: e }) => wr(e)
|
|
1684
|
-
}, {
|
|
1685
|
-
item: w(({ legend: e, index: t }) => [g("div", {
|
|
1686
|
-
onClick: (t) => e.segregate(),
|
|
1687
|
-
style: Je(`opacity:${M.value.includes(t) ? .5 : 1}`)
|
|
1688
|
-
}, $e(e.name), 13, dt)]),
|
|
1689
|
-
legendToggle: w(() => [Or.value.length > 2 && B.value.style.chart.legend.selectAllToggle.show && !S($t) ? (y(), m(Pe, {
|
|
1690
|
-
key: 0,
|
|
1691
|
-
backgroundColor: B.value.style.chart.legend.selectAllToggle.backgroundColor,
|
|
1692
|
-
color: B.value.style.chart.legend.selectAllToggle.color,
|
|
1693
|
-
fontSize: B.value.style.chart.legend.fontSize,
|
|
1694
|
-
checked: M.value.length > 0,
|
|
1695
|
-
isCursorPointer: Xt.value,
|
|
1696
|
-
onToggle: Cr
|
|
1697
|
-
}, null, 8, [
|
|
1698
|
-
"backgroundColor",
|
|
1699
|
-
"color",
|
|
1700
|
-
"fontSize",
|
|
1701
|
-
"checked",
|
|
1702
|
-
"isCursorPointer"
|
|
1703
|
-
])) : h("", !0)]),
|
|
1704
|
-
_: 1
|
|
1705
|
-
}, 8, [
|
|
1706
|
-
"legendSet",
|
|
1707
|
-
"config",
|
|
1708
|
-
"isCursorPointer"
|
|
1709
|
-
])) : h("", !0)], !0)], 512)], 8, ["to"])) : h("", !0),
|
|
1710
|
-
t.$slots.watermark ? (y(), Be("div", ft, [x(t.$slots, "watermark", v(_({ isPrinting: S(ln) || S(un) || Ht.value })), void 0, !0)])) : h("", !0),
|
|
1711
|
-
t.$slots.source ? (y(), Be("div", {
|
|
1712
|
-
key: 5,
|
|
1713
|
-
ref_key: "source",
|
|
1714
|
-
ref: Mt,
|
|
1715
|
-
dir: "auto"
|
|
1716
|
-
}, [x(t.$slots, "source", {}, void 0, !0)], 512)) : h("", !0),
|
|
1717
|
-
z.value && B.value.userOptions.buttons.table ? (y(), m(Ze(Vr.value.component), Ge({ key: 6 }, Vr.value.props, {
|
|
1718
|
-
ref_key: "tableUnit",
|
|
1719
|
-
ref: Lt,
|
|
1720
|
-
onClose: Hr
|
|
1721
|
-
}), Ve({
|
|
1722
|
-
content: w(() => [(y(), m(S(ht), {
|
|
1723
|
-
key: `table_${Pt.value}`,
|
|
1724
|
-
colNames: Ar.value.colNames,
|
|
1725
|
-
head: Ar.value.head,
|
|
1726
|
-
body: Ar.value.body,
|
|
1727
|
-
config: Ar.value.config,
|
|
1728
|
-
title: B.value.table.useDialog ? "" : Vr.value.title,
|
|
1729
|
-
withCloseButton: !B.value.table.useDialog,
|
|
1730
|
-
isCursorPointer: Xt.value,
|
|
1731
|
-
onClose: Hr
|
|
1732
|
-
}, {
|
|
1733
|
-
th: w(({ th: e }) => [g("div", { innerHTML: e }, null, 8, pt)]),
|
|
1734
|
-
td: w(({ td: e }) => [He($e(e), 1)]),
|
|
1735
|
-
_: 1
|
|
1736
|
-
}, 8, [
|
|
1737
|
-
"colNames",
|
|
1738
|
-
"head",
|
|
1739
|
-
"body",
|
|
1740
|
-
"config",
|
|
1741
|
-
"title",
|
|
1742
|
-
"withCloseButton",
|
|
1743
|
-
"isCursorPointer"
|
|
1744
|
-
]))]),
|
|
1745
|
-
_: 2
|
|
1746
|
-
}, [B.value.table.useDialog ? {
|
|
1747
|
-
name: "title",
|
|
1748
|
-
fn: w(() => [He($e(Vr.value.title), 1)]),
|
|
1749
|
-
key: "0"
|
|
1750
|
-
} : void 0, B.value.table.useDialog ? {
|
|
1751
|
-
name: "actions",
|
|
1752
|
-
fn: w(() => [g("button", {
|
|
1753
|
-
tabindex: "0",
|
|
1754
|
-
class: "vue-ui-user-options-button",
|
|
1755
|
-
onClick: n[4] ||= (e) => Mr(B.value.userOptions.callbacks.csv),
|
|
1756
|
-
style: Je({ cursor: Xt.value ? "pointer" : "default" })
|
|
1757
|
-
}, [Ue(je, {
|
|
1758
|
-
name: "fileCsv",
|
|
1759
|
-
stroke: Vr.value.props.color
|
|
1760
|
-
}, null, 8, ["stroke"])], 4)]),
|
|
1761
|
-
key: "1"
|
|
1762
|
-
} : void 0]), 1040)) : h("", !0),
|
|
1763
|
-
B.value.userOptions.buttons.annotator && q.value.length ? (y(), m(S(_t), {
|
|
1764
|
-
key: 7,
|
|
1765
|
-
parent: D.value,
|
|
1766
|
-
backgroundColor: B.value.style.chart.backgroundColor,
|
|
1767
|
-
color: B.value.style.chart.color,
|
|
1768
|
-
active: Rr.value,
|
|
1769
|
-
isCursorPointer: Xt.value,
|
|
1770
|
-
onClose: zr
|
|
1771
|
-
}, {
|
|
1772
|
-
"annotator-action-close": w(() => [x(t.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
1773
|
-
"annotator-action-color": w(({ color: e }) => [x(t.$slots, "annotator-action-color", v(_({ color: e })), void 0, !0)]),
|
|
1774
|
-
"annotator-action-draw": w(({ mode: e }) => [x(t.$slots, "annotator-action-draw", v(_({ mode: e })), void 0, !0)]),
|
|
1775
|
-
"annotator-action-undo": w(({ disabled: e }) => [x(t.$slots, "annotator-action-undo", v(_({ disabled: e })), void 0, !0)]),
|
|
1776
|
-
"annotator-action-redo": w(({ disabled: e }) => [x(t.$slots, "annotator-action-redo", v(_({ disabled: e })), void 0, !0)]),
|
|
1777
|
-
"annotator-action-delete": w(({ disabled: e }) => [x(t.$slots, "annotator-action-delete", v(_({ disabled: e })), void 0, !0)]),
|
|
1778
|
-
_: 3
|
|
1779
|
-
}, 8, [
|
|
1780
|
-
"parent",
|
|
1781
|
-
"backgroundColor",
|
|
1782
|
-
"color",
|
|
1783
|
-
"active",
|
|
1784
|
-
"isCursorPointer"
|
|
1785
|
-
])) : h("", !0)
|
|
1786
|
-
], 46, it));
|
|
1787
|
-
}
|
|
1788
|
-
}, [["__scopeId", "data-v-926aa518"]]);
|
|
1789
|
-
//#endregion
|
|
1790
|
-
export { rt as n, mt as t };
|