vue-data-ui 2.6.24 → 2.6.25-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-wDaSVoPf.cjs → Arrow-DGHwRVXv.cjs} +1 -1
- package/dist/{Arrow-CF3NjnkA.js → Arrow-e8QJjBO6.js} +1 -1
- package/dist/{BaseIcon-C4WRCMmb.cjs → BaseIcon-CbKNr0gK.cjs} +1 -1
- package/dist/{BaseIcon-BtcvUPWF.js → BaseIcon-DvoYtRts.js} +1 -1
- package/dist/{DataTable-CdCwimMg.cjs → DataTable-CpRndtK2.cjs} +1 -1
- package/dist/{DataTable-ByaBWEYb.js → DataTable-JnkW2vNQ.js} +2 -2
- package/dist/{Legend-BSYRK6Q_.cjs → Legend-B1C5ki60.cjs} +1 -1
- package/dist/{Legend-C-2SfIPW.js → Legend-CX8D1an8.js} +2 -2
- package/dist/{PackageVersion-BiK7Dx4X.js → PackageVersion-CSDNzmtD.js} +3 -3
- package/dist/PackageVersion-SHS15u6D.cjs +1 -0
- package/dist/{PenAndPaper-f3zHe5BC.js → PenAndPaper-LsWIsYAT.js} +3 -3
- package/dist/{PenAndPaper-DOWIdZvQ.cjs → PenAndPaper-XKtkHjFi.cjs} +1 -1
- package/dist/{PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-DHVJRD8Q.js → PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-Ba5_bVxO.js} +3 -3
- package/dist/{PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-D0PiYPFe.cjs → PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-CrpxkbSf.cjs} +1 -1
- package/dist/{Shape-coApcye5.cjs → Shape-BKLGTXa6.cjs} +1 -1
- package/dist/{Shape-BDGST5GY.js → Shape-C7g9SGMc.js} +1 -1
- package/dist/{Slicer-DH7c09Nd.js → Slicer-CZF9axdM.js} +2 -2
- package/dist/{Slicer-BXJXxW-u.cjs → Slicer-ervRxMK4.cjs} +1 -1
- package/dist/{Title-BVFJm0A0.js → Title-Bk3eTyPx.js} +1 -1
- package/dist/{Title-BnX-oH1C.cjs → Title-C8tnhWKY.cjs} +1 -1
- package/dist/{Tooltip-CeVBkaaR.cjs → Tooltip-C81ZXpgi.cjs} +1 -1
- package/dist/{Tooltip-BGERkvjK.js → Tooltip-C9CqTY-d.js} +1 -1
- package/dist/index-Ckp-Sr3x.cjs +9 -0
- package/dist/{index-DemRsUvG.js → index-sUrVQKbu.js} +4 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +1 -0
- package/dist/types/vue-data-ui.d.ts +1 -0
- package/dist/{useNestedProp-DvO0Mp94.js → useNestedProp-DR6XaY7z.js} +1 -1
- package/dist/{useNestedProp-C8eIYJIz.cjs → useNestedProp-WVkJYQik.cjs} +1 -1
- package/dist/{usePrinter-DMfMqFyO.js → usePrinter-CPqFl26m.js} +1 -1
- package/dist/{usePrinter-D6taMMgW.cjs → usePrinter-DyM8T4Nn.cjs} +1 -1
- package/dist/{vue-data-ui-BtJq8Z8S.cjs → vue-data-ui-CA4SKLhU.cjs} +1 -1
- package/dist/{vue-data-ui-BEuKSdnW.js → vue-data-ui-DFc3ZnK_.js} +61 -61
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-D3mGE27n.cjs → vue-ui-3d-bar-BtT_LrpL.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-dKnpTu5u.js → vue-ui-3d-bar-CeeaQg2L.js} +9 -9
- package/dist/{vue-ui-accordion-C0kWmaMq.js → vue-ui-accordion-ByWjz6kY.js} +3 -3
- package/dist/{vue-ui-accordion-D4bxWDy8.cjs → vue-ui-accordion-C6JS8eWZ.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DFUCuJHW.js → vue-ui-age-pyramid-C8l6S4fi.js} +10 -10
- package/dist/{vue-ui-age-pyramid-DTBDqmNa.cjs → vue-ui-age-pyramid-DGGVmeOm.cjs} +1 -1
- package/dist/{vue-ui-annotator-BrATC8rJ.js → vue-ui-annotator-C7c2SYsX.js} +1 -1
- package/dist/{vue-ui-annotator-DoVhDHt5.cjs → vue-ui-annotator-DGMJ1nN5.cjs} +1 -1
- package/dist/{vue-ui-bullet-bGgUZsv1.cjs → vue-ui-bullet-Dp_i8f0c.cjs} +1 -1
- package/dist/{vue-ui-bullet-B3BiTbbB.js → vue-ui-bullet-pxYRHhQW.js} +8 -8
- package/dist/{vue-ui-candlestick-DKN07ffF.cjs → vue-ui-candlestick-BO1msoGJ.cjs} +1 -1
- package/dist/{vue-ui-candlestick-CRPzO3jV.js → vue-ui-candlestick-BuROSCDq.js} +11 -11
- package/dist/{vue-ui-carousel-table-yJ1cZ2SB.js → vue-ui-carousel-table-B7GpI1Er.js} +4 -4
- package/dist/{vue-ui-carousel-table-Czyd-yQT.cjs → vue-ui-carousel-table-BeSjmND9.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DRsZmKvi.js → vue-ui-chestnut-CPUcdGHm.js} +8 -8
- package/dist/{vue-ui-chestnut-Bj4tpH0Z.cjs → vue-ui-chestnut-De3A8LuI.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-BBvHAYcK.cjs → vue-ui-circle-pack-B16m7_5c.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-XwKYgJdF.js → vue-ui-circle-pack-Lrtz9UmA.js} +9 -9
- package/dist/{vue-ui-cursor-5bSGnkYd.cjs → vue-ui-cursor-DiNp74hG.cjs} +1 -1
- package/dist/{vue-ui-cursor-iTemcqMh.js → vue-ui-cursor-hUSclTSD.js} +2 -2
- package/dist/{vue-ui-dashboard-DcnZVhVH.cjs → vue-ui-dashboard-BD4z8r25.cjs} +1 -1
- package/dist/{vue-ui-dashboard-By4J6P3X.js → vue-ui-dashboard-qxxc0AZK.js} +2 -2
- package/dist/{vue-ui-digits-DG65Tfkm.cjs → vue-ui-digits-DppKgGD2.cjs} +1 -1
- package/dist/{vue-ui-digits-CkiC_YMf.js → vue-ui-digits-Dqzgfdmm.js} +2 -2
- package/dist/{vue-ui-donut-mCho6qBB.cjs → vue-ui-donut-DH7R5FMc.cjs} +1 -1
- package/dist/{vue-ui-donut-BXIjFGJB.js → vue-ui-donut-Drh7OM-Z.js} +12 -12
- package/dist/{vue-ui-donut-evolution-kg8wqJDB.cjs → vue-ui-donut-evolution-Dq1qofHg.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-Bv2oM81w.js → vue-ui-donut-evolution-KusZ2dLl.js} +11 -11
- package/dist/{vue-ui-dumbbell-CBN-X80u.cjs → vue-ui-dumbbell-BqCnjCbD.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-o4QpOynw.js → vue-ui-dumbbell-DDBITCEN.js} +10 -10
- package/dist/{vue-ui-flow-CncXcy0d.js → vue-ui-flow-CsL79Q1d.js} +9 -9
- package/dist/{vue-ui-flow-DR5034H5.cjs → vue-ui-flow-zC6-lv8r.cjs} +1 -1
- package/dist/{vue-ui-funnel-D_S6rQ9k.cjs → vue-ui-funnel-BHacZI-y.cjs} +1 -1
- package/dist/{vue-ui-funnel-B5w0-4vu.js → vue-ui-funnel-Ch2Zk05Q.js} +9 -9
- package/dist/{vue-ui-galaxy-DXE6dFTu.js → vue-ui-galaxy-BCMnWIwV.js} +11 -11
- package/dist/{vue-ui-galaxy-DS3XMtZa.cjs → vue-ui-galaxy-jAU06BYs.cjs} +1 -1
- package/dist/{vue-ui-gauge-V2uXgW7I.cjs → vue-ui-gauge-C4PC_Rgg.cjs} +1 -1
- package/dist/{vue-ui-gauge-VkQfLBcb.js → vue-ui-gauge-i0oHDqLp.js} +7 -7
- package/dist/{vue-ui-gizmo-Cj9PY8rs.js → vue-ui-gizmo-BLOTtWHT.js} +3 -3
- package/dist/{vue-ui-gizmo-bCgG-r_M.cjs → vue-ui-gizmo-Cp8fVvCr.cjs} +1 -1
- package/dist/{vue-ui-heatmap-C7gBu19g.cjs → vue-ui-heatmap-Bv0eoDOk.cjs} +1 -1
- package/dist/{vue-ui-heatmap-36GeFTus.js → vue-ui-heatmap-h9yC9DH7.js} +10 -10
- package/dist/{vue-ui-history-plot-B8wCm4rL.js → vue-ui-history-plot-C3HvT6tH.js} +11 -11
- package/dist/{vue-ui-history-plot-Ba2F3ma5.cjs → vue-ui-history-plot-UFTXCPyP.cjs} +1 -1
- package/dist/{vue-ui-kpi-zSGrUH-l.js → vue-ui-kpi-BeKCmMyI.js} +3 -3
- package/dist/{vue-ui-kpi-C7blSAMJ.cjs → vue-ui-kpi-Ic5aTCOv.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BD7Ie55D.js → vue-ui-mini-loader-B8epbfej.js} +2 -2
- package/dist/{vue-ui-mini-loader-3cvYovRy.cjs → vue-ui-mini-loader-CAdRQ00t.cjs} +1 -1
- package/dist/{vue-ui-molecule-DTVrFf15.cjs → vue-ui-molecule-D1XEVuhs.cjs} +1 -1
- package/dist/{vue-ui-molecule-CNAG2Nyi.js → vue-ui-molecule-TaOKoX-6.js} +10 -10
- package/dist/{vue-ui-mood-radar-CuVymXcE.js → vue-ui-mood-radar-BpYycWTI.js} +11 -11
- package/dist/{vue-ui-mood-radar-DFHVK8CB.cjs → vue-ui-mood-radar-CYJ_rEZc.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-BFXA48jU.cjs → vue-ui-nested-donuts-BeeIv8Kv.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-BRDod5S4.js → vue-ui-nested-donuts-CDOVx61s.js} +11 -11
- package/dist/{vue-ui-onion-jLEkENH3.cjs → vue-ui-onion-U_kHsguq.cjs} +1 -1
- package/dist/{vue-ui-onion-BeULK855.js → vue-ui-onion-iL6Or3Y_.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-BQK1LFap.js → vue-ui-parallel-coordinate-plot-BmpTo5Q7.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-vH5KDV5C.cjs → vue-ui-parallel-coordinate-plot-DtqT3MyD.cjs} +1 -1
- package/dist/{vue-ui-quadrant-yN--29xI.js → vue-ui-quadrant-BQ0V5snU.js} +12 -12
- package/dist/{vue-ui-quadrant-BUJ_2TfY.cjs → vue-ui-quadrant-Cq37OeGT.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-B8s0HfLG.js → vue-ui-quick-chart-B_9HLLR2.js} +9 -9
- package/dist/{vue-ui-quick-chart-Dy5e9EbI.cjs → vue-ui-quick-chart-xRPguDo9.cjs} +1 -1
- package/dist/{vue-ui-radar-DNVE3P2u.js → vue-ui-radar-B7RdVJTj.js} +12 -12
- package/dist/{vue-ui-radar-DqWSc0Ri.cjs → vue-ui-radar-CSFxhmXk.cjs} +1 -1
- package/dist/{vue-ui-rating-BzoHa_Xm.cjs → vue-ui-rating-B36jdYxn.cjs} +1 -1
- package/dist/{vue-ui-rating-pEtSN7qF.js → vue-ui-rating-KsEBULle.js} +2 -2
- package/dist/{vue-ui-relation-circle-CkCpcFUh.cjs → vue-ui-relation-circle-BoyLlZ5D.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-Db5QIgyX.js → vue-ui-relation-circle-COMfjUwO.js} +7 -7
- package/dist/{vue-ui-rings-CCYGbn-w.js → vue-ui-rings-BfvoG-X7.js} +12 -12
- package/dist/{vue-ui-rings-Dcx1RI3v.cjs → vue-ui-rings-ZwX0jEjg.cjs} +1 -1
- package/dist/{vue-ui-scatter-DJWbwJc-.js → vue-ui-scatter-B1i8HXF-.js} +12 -12
- package/dist/{vue-ui-scatter-DhPfwLTo.cjs → vue-ui-scatter-Du32_l6t.cjs} +1 -1
- package/dist/{vue-ui-screenshot-Bbkc82hY.js → vue-ui-screenshot-0-jv2wCR.js} +1 -1
- package/dist/{vue-ui-screenshot-jKerg5g_.cjs → vue-ui-screenshot-UWKpSJFr.cjs} +1 -1
- package/dist/{vue-ui-skeleton-pv3sv7Lv.cjs → vue-ui-skeleton-DNvMzjZY.cjs} +1 -1
- package/dist/{vue-ui-skeleton-5TjpkMTD.js → vue-ui-skeleton-DeutOJK7.js} +3 -3
- package/dist/{vue-ui-smiley-DwyVZnbf.cjs → vue-ui-smiley-BuTFODXW.cjs} +1 -1
- package/dist/{vue-ui-smiley-Cmr-yvoN.js → vue-ui-smiley-CrgEgjfY.js} +2 -2
- package/dist/{vue-ui-spark-trend-CdR_LNbz.js → vue-ui-spark-trend-BJSi4TTA.js} +5 -5
- package/dist/{vue-ui-spark-trend-BfpC69Rf.cjs → vue-ui-spark-trend-DuQAQ095.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CCHf1UWo.js → vue-ui-sparkbar-BzcrP1qG.js} +4 -4
- package/dist/{vue-ui-sparkbar-xD5Yd7Z-.cjs → vue-ui-sparkbar-CQKodOn8.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-BhdOefUS.js → vue-ui-sparkgauge-B3AA_dpV.js} +4 -4
- package/dist/{vue-ui-sparkgauge-LCYwqBpU.cjs → vue-ui-sparkgauge-CZhxgc9r.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-BYnq8406.cjs → vue-ui-sparkhistogram-BJsXAIdc.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-nkPBrovr.js → vue-ui-sparkhistogram-CyIHr0vZ.js} +5 -5
- package/dist/{vue-ui-sparkline-B85oZ43L.js → vue-ui-sparkline-BkE70PXL.js} +4 -4
- package/dist/{vue-ui-sparkline-DXP4hIdC.cjs → vue-ui-sparkline-D88GycT5.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-ilI8fpIz.cjs → vue-ui-sparkstackbar-D5dRIbSB.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-V7INAzpf.js → vue-ui-sparkstackbar-GtaYZy_T.js} +5 -5
- package/dist/{vue-ui-stackbar-DaAsN81z.cjs → vue-ui-stackbar-CJsVD8Xo.cjs} +1 -1
- package/dist/{vue-ui-stackbar-BtKP5hCO.js → vue-ui-stackbar-DHxUN9G5.js} +13 -13
- package/dist/{vue-ui-strip-plot-D20CENu1.js → vue-ui-strip-plot-CGJwiQKO.js} +11 -11
- package/dist/{vue-ui-strip-plot-DRF_yjql.cjs → vue-ui-strip-plot-D39tRq-k.cjs} +1 -1
- package/dist/{vue-ui-table-BXFPiplW.js → vue-ui-table-ClPyeIHT.js} +1 -1
- package/dist/{vue-ui-table-DZ4sqrq2.cjs → vue-ui-table-D5w4md5E.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BzRvSr0i.js → vue-ui-table-heatmap-CPc63dHp.js} +4 -4
- package/dist/{vue-ui-table-heatmap-TvLepJ62.cjs → vue-ui-table-heatmap-DqYUckW5.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BT-AdDNH.cjs → vue-ui-table-sparkline-DQbMZ7g-.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BUXOBLm6.js → vue-ui-table-sparkline-yj2QsbjU.js} +5 -5
- package/dist/{vue-ui-thermometer-BQq7s9zK.cjs → vue-ui-thermometer-6gYdDmZx.cjs} +1 -1
- package/dist/{vue-ui-thermometer-ClhSAGOe.js → vue-ui-thermometer-CRWzadDe.js} +7 -7
- package/dist/{vue-ui-timer-C8bnmq5H.js → vue-ui-timer-B7oGISYj.js} +5 -5
- package/dist/{vue-ui-timer-Brw77esz.cjs → vue-ui-timer-CswmNVUs.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-B3RRA7SW.cjs → vue-ui-tiremarks-CW6cihYg.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-iQunddHD.js → vue-ui-tiremarks-NrkdfifQ.js} +7 -7
- package/dist/{vue-ui-treemap-DPrymyeh.js → vue-ui-treemap-4BCL-TuK.js} +11 -11
- package/dist/{vue-ui-treemap-DqPXxUyM.cjs → vue-ui-treemap-C5VzJKnf.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-DAIV8bL-.cjs → vue-ui-vertical-bar-C5-Dx2cR.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-67sEQw3O.js → vue-ui-vertical-bar-CIpHl8yB.js} +12 -12
- package/dist/{vue-ui-waffle-DGUdtn0S.js → vue-ui-waffle-AODGwZNa.js} +12 -12
- package/dist/{vue-ui-waffle-Bzb83CXy.cjs → vue-ui-waffle-CLCercNd.cjs} +1 -1
- package/dist/{vue-ui-wheel-BWgZoCqk.js → vue-ui-wheel-C4lFLyvf.js} +7 -7
- package/dist/{vue-ui-wheel-BvtzwkQ7.cjs → vue-ui-wheel-tJM1VHBF.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DztNBq0w.js → vue-ui-word-cloud-BEKciB4a.js} +10 -10
- package/dist/{vue-ui-word-cloud-U21NvaCz.cjs → vue-ui-word-cloud-q3VERyH3.cjs} +1 -1
- package/dist/vue-ui-xy-BLJrvzoK.js +2541 -0
- package/dist/vue-ui-xy-DSOWkbIl.cjs +3 -0
- package/dist/{vue-ui-xy-canvas-BXV5dpRc.js → vue-ui-xy-canvas-BdwEtJfj.js} +12 -12
- package/dist/{vue-ui-xy-canvas-CyvhHbkZ.cjs → vue-ui-xy-canvas-SB7ToCN4.cjs} +1 -1
- package/package.json +2 -2
- package/dist/PackageVersion-BOKy76ww.cjs +0 -1
- package/dist/index-inkOR4zq.cjs +0 -9
- package/dist/vue-ui-xy-CHyiFCbV.js +0 -2512
- package/dist/vue-ui-xy-DB4EGI04.cjs +0 -3
|
@@ -0,0 +1,2541 @@
|
|
|
1
|
+
import { P as D, W as q, c as X, A as j, F as $, w as ee, s as te, o as le, _ as re, a6 as ie, x as ae, C as se, y as ne, a4 as ce, e as oe, r as he, f as U, a7 as ue, R as de, S as ge, q as fe, b as Ie, z as me, d as be, a8 as Ne, v as xe, a9 as Fe, a2 as _e, aa as Ae, i as ye, G as Le, L as Ce, u as Se, p as ke, B as we, a as Oe, t as Ge } from "./index-sUrVQKbu.js";
|
|
2
|
+
import { D as ve } from "./DataTable-JnkW2vNQ.js";
|
|
3
|
+
import { _ as pe } from "./Title-Bk3eTyPx.js";
|
|
4
|
+
import { u as ze, _ as Me } from "./Tooltip-C9CqTY-d.js";
|
|
5
|
+
import { U as Te } from "./usePrinter-CPqFl26m.js";
|
|
6
|
+
import { _ as Pe } from "./Shape-C7g9SGMc.js";
|
|
7
|
+
import Ve from "./BaseIcon-DvoYtRts.js";
|
|
8
|
+
import Re from "./vue-ui-table-sparkline-yj2QsbjU.js";
|
|
9
|
+
import De from "./vue-ui-skeleton-DeutOJK7.js";
|
|
10
|
+
import { S as He } from "./Slicer-CZF9axdM.js";
|
|
11
|
+
import We from "./vue-ui-accordion-ByWjz6kY.js";
|
|
12
|
+
import { u as Z } from "./useNestedProp-DR6XaY7z.js";
|
|
13
|
+
import { _ as Be } from "./PackageVersion-CSDNzmtD.js";
|
|
14
|
+
import { P as Ee } from "./PenAndPaper-LsWIsYAT.js";
|
|
15
|
+
import { resolveComponent as R, createElementBlock as s, openBlock as i, normalizeStyle as F, normalizeClass as W, createBlock as H, createCommentVNode as h, createVNode as Y, createSlots as Ye, withCtx as P, renderSlot as S, normalizeProps as B, guardReactiveProps as E, createElementVNode as d, createTextVNode as J, Fragment as g, renderList as m, toDisplayString as w, mergeProps as K, withDirectives as qe, vModelCheckbox as Xe } from "vue";
|
|
16
|
+
import { _ as Ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
|
+
const Ze = X(), Je = {
|
|
18
|
+
name: "vue-ui-xy",
|
|
19
|
+
props: {
|
|
20
|
+
config: {
|
|
21
|
+
type: Object,
|
|
22
|
+
default() {
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
dataset: {
|
|
27
|
+
type: Array,
|
|
28
|
+
default() {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
components: {
|
|
34
|
+
DataTable: ve,
|
|
35
|
+
Shape: Pe,
|
|
36
|
+
Title: pe,
|
|
37
|
+
Tooltip: Me,
|
|
38
|
+
UserOptions: Te,
|
|
39
|
+
BaseIcon: Ve,
|
|
40
|
+
TableSparkline: Re,
|
|
41
|
+
Skeleton: De,
|
|
42
|
+
Slicer: He,
|
|
43
|
+
Accordion: We,
|
|
44
|
+
PackageVersion: Be,
|
|
45
|
+
PenAndPaper: Ee
|
|
46
|
+
},
|
|
47
|
+
data() {
|
|
48
|
+
this.dataset.forEach((u, l) => {
|
|
49
|
+
[null, void 0].includes(u.series) && this.error({
|
|
50
|
+
componentName: "VueUiXy",
|
|
51
|
+
type: "datasetSerieAttribute",
|
|
52
|
+
property: "series (number[])",
|
|
53
|
+
index: l
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
const t = this.config.downsample && this.config.downsample.threshold ? this.config.downsample.threshold : 500, a = Math.max(...this.dataset.map((u) => this.largestTriangleThreeBucketsArray({ data: u.series, threshold: t }).length)), o = {
|
|
57
|
+
start: 0,
|
|
58
|
+
end: a
|
|
59
|
+
};
|
|
60
|
+
return {
|
|
61
|
+
themePalettes: Ge,
|
|
62
|
+
themes: Oe,
|
|
63
|
+
slicerStep: 0,
|
|
64
|
+
selectedScale: null,
|
|
65
|
+
CTX: null,
|
|
66
|
+
CANVAS: null,
|
|
67
|
+
opacity: we,
|
|
68
|
+
useSafeValues: !0,
|
|
69
|
+
palette: ke,
|
|
70
|
+
height: 600,
|
|
71
|
+
width: 1e3,
|
|
72
|
+
viewBox: "0 0 1000 600",
|
|
73
|
+
clientPosition: {
|
|
74
|
+
x: 0,
|
|
75
|
+
y: 0
|
|
76
|
+
},
|
|
77
|
+
canvasClientPosition: {
|
|
78
|
+
x: 0,
|
|
79
|
+
y: 0
|
|
80
|
+
},
|
|
81
|
+
icons: {
|
|
82
|
+
line: "line",
|
|
83
|
+
bar: "bar",
|
|
84
|
+
plot: "plot"
|
|
85
|
+
},
|
|
86
|
+
isAnnotator: !1,
|
|
87
|
+
isFullscreen: !1,
|
|
88
|
+
isPrinting: !1,
|
|
89
|
+
isImaging: !1,
|
|
90
|
+
isTooltip: !1,
|
|
91
|
+
mutableConfig: {
|
|
92
|
+
dataLabels: {
|
|
93
|
+
show: !0
|
|
94
|
+
},
|
|
95
|
+
showTooltip: !0,
|
|
96
|
+
showTable: !1,
|
|
97
|
+
isStacked: !1,
|
|
98
|
+
useIndividualScale: !1
|
|
99
|
+
},
|
|
100
|
+
selectedSerieIndex: null,
|
|
101
|
+
selectedRowIndex: null,
|
|
102
|
+
segregatedSeries: [],
|
|
103
|
+
uniqueId: X(),
|
|
104
|
+
step: 0,
|
|
105
|
+
tableStep: 0,
|
|
106
|
+
titleStep: 0,
|
|
107
|
+
slicer: o,
|
|
108
|
+
__to__: null,
|
|
109
|
+
maxX: a,
|
|
110
|
+
showSparklineTable: !0,
|
|
111
|
+
segregateStep: 0,
|
|
112
|
+
sliderId: Ze,
|
|
113
|
+
fontSizes: {
|
|
114
|
+
xAxis: 18,
|
|
115
|
+
yAxis: 12,
|
|
116
|
+
dataLabels: 20,
|
|
117
|
+
plotLabels: 10
|
|
118
|
+
},
|
|
119
|
+
plotRadii: {
|
|
120
|
+
plot: 3,
|
|
121
|
+
line: 3
|
|
122
|
+
},
|
|
123
|
+
selectedMinimapIndex: null,
|
|
124
|
+
showUserOptionsOnChartHover: !1,
|
|
125
|
+
keepUserOptionState: !0,
|
|
126
|
+
userOptionsVisible: !0,
|
|
127
|
+
svgRef: null
|
|
128
|
+
};
|
|
129
|
+
},
|
|
130
|
+
watch: {
|
|
131
|
+
dataset: {
|
|
132
|
+
handler(t, a) {
|
|
133
|
+
this.maxX = Math.max(...this.dataset.map((o) => this.largestTriangleThreeBucketsArray({
|
|
134
|
+
data: o.series,
|
|
135
|
+
threshold: this.FINAL_CONFIG.downsample.threshold
|
|
136
|
+
}).length)), this.slicer = {
|
|
137
|
+
start: 0,
|
|
138
|
+
end: this.maxX
|
|
139
|
+
}, this.slicerStep += 1, this.segregateStep += 1;
|
|
140
|
+
},
|
|
141
|
+
deep: !0
|
|
142
|
+
},
|
|
143
|
+
config: {
|
|
144
|
+
handler(t, a) {
|
|
145
|
+
this.FINAL_CONFIG = this.prepareConfig(), this.prepareChart(), this.titleStep += 1, this.tableStep += 1, this.mutableConfig = {
|
|
146
|
+
dataLabels: {
|
|
147
|
+
show: !0
|
|
148
|
+
},
|
|
149
|
+
showTooltip: this.FINAL_CONFIG.chart.tooltip.show === !0,
|
|
150
|
+
showTable: this.FINAL_CONFIG.showTable === !0,
|
|
151
|
+
isStacked: this.FINAL_CONFIG.chart.grid.labels.yAxis.stacked,
|
|
152
|
+
useIndividualScale: this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale
|
|
153
|
+
};
|
|
154
|
+
},
|
|
155
|
+
deep: !0
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
computed: {
|
|
159
|
+
chartAriaLabel() {
|
|
160
|
+
const t = this.FINAL_CONFIG.chart.title.text || "Chart visualization", a = this.FINAL_CONFIG.chart.title.subtitle.text || "";
|
|
161
|
+
return `${t}. ${a}`;
|
|
162
|
+
},
|
|
163
|
+
optimize() {
|
|
164
|
+
return {
|
|
165
|
+
linePlot: this.maxSeries > this.FINAL_CONFIG.line.dot.hideAboveMaxSerieLength
|
|
166
|
+
};
|
|
167
|
+
},
|
|
168
|
+
hasOptionsNoTitle() {
|
|
169
|
+
return this.FINAL_CONFIG.chart.userOptions.show && (!this.FINAL_CONFIG.chart.title.show || !this.FINAL_CONFIG.chart.title.text);
|
|
170
|
+
},
|
|
171
|
+
minimap() {
|
|
172
|
+
if (!this.FINAL_CONFIG.chart.zoom.minimap.show) return [];
|
|
173
|
+
const t = this.datasetWithIds.filter((l) => !this.segregatedSeries.includes(l.id)), a = Math.max(...t.map((l) => l.series.length)), o = [];
|
|
174
|
+
for (let l = 0; l < a; l += 1)
|
|
175
|
+
o.push(t.map((e) => e.series[l] || 0).reduce((e, A) => (e || 0) + (A || 0), 0));
|
|
176
|
+
const u = Math.min(...o);
|
|
177
|
+
return o.map((l) => l + (u < 0 ? Math.abs(u) : 0));
|
|
178
|
+
},
|
|
179
|
+
customPalette() {
|
|
180
|
+
return this.convertCustomPalette(this.FINAL_CONFIG.customPalette);
|
|
181
|
+
},
|
|
182
|
+
backgroundColor() {
|
|
183
|
+
return this.FINAL_CONFIG.chart.backgroundColor;
|
|
184
|
+
},
|
|
185
|
+
slicerColor() {
|
|
186
|
+
return this.FINAL_CONFIG.chart.zoom.color;
|
|
187
|
+
},
|
|
188
|
+
allScales() {
|
|
189
|
+
const t = this.lineSet.map((e) => ({
|
|
190
|
+
name: e.name,
|
|
191
|
+
color: e.color,
|
|
192
|
+
scale: e.individualScale,
|
|
193
|
+
scaleYLabels: e.scaleYLabels,
|
|
194
|
+
zero: e.zeroPosition,
|
|
195
|
+
max: e.individualMax,
|
|
196
|
+
scaleLabel: e.scaleLabel || "",
|
|
197
|
+
id: e.id,
|
|
198
|
+
yOffset: e.yOffset || 0,
|
|
199
|
+
individualHeight: e.individualHeight || this.drawingArea.height,
|
|
200
|
+
autoScaleYLabels: e.autoScaleYLabels
|
|
201
|
+
})), a = this.barSet.map((e) => ({
|
|
202
|
+
name: e.name,
|
|
203
|
+
color: e.color,
|
|
204
|
+
scale: e.individualScale,
|
|
205
|
+
scaleYLabels: e.scaleYLabels,
|
|
206
|
+
zero: e.zeroPosition,
|
|
207
|
+
max: e.individualMax,
|
|
208
|
+
scaleLabel: e.scaleLabel || "",
|
|
209
|
+
id: e.id,
|
|
210
|
+
yOffset: e.yOffset || 0,
|
|
211
|
+
individualHeight: e.individualHeight || this.drawingArea.height
|
|
212
|
+
})), o = this.plotSet.map((e) => ({
|
|
213
|
+
name: e.name,
|
|
214
|
+
color: e.color,
|
|
215
|
+
scale: e.individualScale,
|
|
216
|
+
scaleYLabels: e.scaleYLabels,
|
|
217
|
+
// FIX
|
|
218
|
+
zero: e.zeroPosition,
|
|
219
|
+
max: e.individualMax,
|
|
220
|
+
scaleLabel: e.scaleLabel || "",
|
|
221
|
+
id: e.id,
|
|
222
|
+
yOffset: e.yOffset || 0,
|
|
223
|
+
individualHeight: e.individualHeight || this.drawingArea.height
|
|
224
|
+
})), u = this.mutableConfig.useIndividualScale && !this.mutableConfig.isStacked ? Object.values(this.scaleGroups) : [...t, ...a, ...o];
|
|
225
|
+
console.log(u);
|
|
226
|
+
const l = u.flatMap((e) => e).length;
|
|
227
|
+
return u.flatMap((e, A) => ({
|
|
228
|
+
unique: e.unique,
|
|
229
|
+
id: e.id,
|
|
230
|
+
groupId: e.groupId,
|
|
231
|
+
scaleLabel: e.scaleLabel,
|
|
232
|
+
name: this.mutableConfig.useIndividualScale && !this.mutableConfig.isStacked ? e.unique ? e.name : e.groupName : e.name,
|
|
233
|
+
color: this.mutableConfig.useIndividualScale && !this.mutableConfig.isStacked ? e.unique ? e.color : e.groupColor : e.color,
|
|
234
|
+
scale: e.scale,
|
|
235
|
+
yOffset: e.yOffset,
|
|
236
|
+
individualHeight: e.individualHeight,
|
|
237
|
+
x: this.mutableConfig.isStacked ? this.drawingArea.left : this.drawingArea.left / l * (A + 1),
|
|
238
|
+
yLabels: e.scaleYLabels || e.scale.ticks.map((b) => ({
|
|
239
|
+
y: b >= 0 ? e.zero - e.individualHeight * (b / e.max) : e.zero + e.individualHeight * Math.abs(b) / e.max,
|
|
240
|
+
value: b
|
|
241
|
+
}))
|
|
242
|
+
}));
|
|
243
|
+
},
|
|
244
|
+
isDataset() {
|
|
245
|
+
return !!this.dataset && this.dataset.length;
|
|
246
|
+
},
|
|
247
|
+
chartFont() {
|
|
248
|
+
const t = document.getElementById(`vue-ui-xy_${this.uniqueId}`);
|
|
249
|
+
return window.getComputedStyle(t, null).getPropertyValue("font-family");
|
|
250
|
+
},
|
|
251
|
+
FINAL_CONFIG: {
|
|
252
|
+
get: function() {
|
|
253
|
+
return this.prepareConfig();
|
|
254
|
+
},
|
|
255
|
+
set: function(t) {
|
|
256
|
+
return t;
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
hasHighlightArea() {
|
|
260
|
+
return Array.isArray(this.FINAL_CONFIG.chart.highlightArea) ? this.FINAL_CONFIG.chart.highlightArea.some((t) => t.show) : this.FINAL_CONFIG.chart.highlightArea && this.FINAL_CONFIG.chart.highlightArea.show;
|
|
261
|
+
},
|
|
262
|
+
highlightAreas() {
|
|
263
|
+
if (Array.isArray(this.FINAL_CONFIG.chart.highlightArea))
|
|
264
|
+
return this.FINAL_CONFIG.chart.highlightArea.map((a) => ({
|
|
265
|
+
...a,
|
|
266
|
+
span: a.from === a.to ? 1 : a.to < a.from ? 0 : a.to - a.from + 1
|
|
267
|
+
}));
|
|
268
|
+
const t = this.FINAL_CONFIG.chart.highlightArea;
|
|
269
|
+
return [{ ...t, span: t.from === t.to ? 1 : t.to < t.from ? 0 : t.to - t.from + 1 }];
|
|
270
|
+
},
|
|
271
|
+
xPadding() {
|
|
272
|
+
return this.FINAL_CONFIG.chart.grid.position === "middle" ? 0 : this.drawingArea.width / this.maxSeries / 2;
|
|
273
|
+
},
|
|
274
|
+
relativeZero() {
|
|
275
|
+
return [null, void 0].includes(this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin) ? this.niceScale.min >= 0 ? 0 : Math.abs(this.niceScale.min) : -this.niceScale.min;
|
|
276
|
+
},
|
|
277
|
+
absoluteMax() {
|
|
278
|
+
return this.niceScale.max + this.relativeZero;
|
|
279
|
+
},
|
|
280
|
+
datasetWithIds() {
|
|
281
|
+
return this.useSafeValues ? this.dataset.map((t, a) => ({
|
|
282
|
+
...t,
|
|
283
|
+
series: this.largestTriangleThreeBucketsArray({
|
|
284
|
+
data: t.series,
|
|
285
|
+
threshold: this.FINAL_CONFIG.downsample.threshold
|
|
286
|
+
}),
|
|
287
|
+
id: `uniqueId_${a}`
|
|
288
|
+
})) : this.dataset;
|
|
289
|
+
},
|
|
290
|
+
safeDataset() {
|
|
291
|
+
return this.useSafeValues ? this.dataset.map((t, a) => {
|
|
292
|
+
const o = this.largestTriangleThreeBucketsArray({
|
|
293
|
+
data: t.series,
|
|
294
|
+
threshold: this.FINAL_CONFIG.downsample.threshold
|
|
295
|
+
}), u = `uniqueId_${a}`;
|
|
296
|
+
return {
|
|
297
|
+
...t,
|
|
298
|
+
slotAbsoluteIndex: a,
|
|
299
|
+
series: o.map((l) => this.isSafeValue(l) ? l : null).slice(this.slicer.start, this.slicer.end),
|
|
300
|
+
color: this.convertColorToHex(t.color ? t.color : this.customPalette[a] ? this.customPalette[a] : this.palette[a]),
|
|
301
|
+
id: u,
|
|
302
|
+
scaleLabel: t.scaleLabel || u
|
|
303
|
+
};
|
|
304
|
+
}) : this.dataset;
|
|
305
|
+
},
|
|
306
|
+
relativeDataset() {
|
|
307
|
+
return this.safeDataset.map((t, a) => ({
|
|
308
|
+
...t,
|
|
309
|
+
series: t.series.map((o) => o + this.relativeZero),
|
|
310
|
+
absoluteValues: t.series
|
|
311
|
+
})).filter((t) => !this.segregatedSeries.includes(t.id));
|
|
312
|
+
},
|
|
313
|
+
tableSparklineDataset() {
|
|
314
|
+
return this.relativeDataset.map((t) => {
|
|
315
|
+
const a = t.absoluteValues.map((o) => [void 0, null].includes(o) ? 0 : o);
|
|
316
|
+
return {
|
|
317
|
+
id: t.id,
|
|
318
|
+
name: t.name,
|
|
319
|
+
color: t.color,
|
|
320
|
+
values: this.fillArray(this.maxSeries, a)
|
|
321
|
+
};
|
|
322
|
+
});
|
|
323
|
+
},
|
|
324
|
+
tableSparklineConfig() {
|
|
325
|
+
return {
|
|
326
|
+
responsiveBreakpoint: this.FINAL_CONFIG.table.responsiveBreakpoint,
|
|
327
|
+
roundingValues: this.FINAL_CONFIG.table.rounding,
|
|
328
|
+
showAverage: !1,
|
|
329
|
+
showMedian: !1,
|
|
330
|
+
showTotal: !1,
|
|
331
|
+
fontFamily: this.FINAL_CONFIG.chart.fontFamily,
|
|
332
|
+
prefix: this.FINAL_CONFIG.chart.labels.prefix,
|
|
333
|
+
suffix: this.FINAL_CONFIG.chart.labels.suffix,
|
|
334
|
+
colNames: JSON.parse(JSON.stringify(this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values)),
|
|
335
|
+
thead: {
|
|
336
|
+
backgroundColor: this.FINAL_CONFIG.table.th.backgroundColor,
|
|
337
|
+
color: this.FINAL_CONFIG.table.th.color,
|
|
338
|
+
outline: this.FINAL_CONFIG.table.th.outline
|
|
339
|
+
},
|
|
340
|
+
tbody: {
|
|
341
|
+
backgroundColor: this.FINAL_CONFIG.table.td.backgroundColor,
|
|
342
|
+
color: this.FINAL_CONFIG.table.td.color,
|
|
343
|
+
outline: this.FINAL_CONFIG.table.td.outline
|
|
344
|
+
},
|
|
345
|
+
userOptions: {
|
|
346
|
+
show: !1
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
},
|
|
350
|
+
absoluteDataset() {
|
|
351
|
+
return this.safeDataset.map((t, a) => ({
|
|
352
|
+
absoluteIndex: a,
|
|
353
|
+
...t,
|
|
354
|
+
series: t.series.map((o) => o + this.relativeZero),
|
|
355
|
+
absoluteValues: t.series,
|
|
356
|
+
segregate: () => this.segregate(t),
|
|
357
|
+
isSegregated: this.segregatedSeries.includes(t.id)
|
|
358
|
+
}));
|
|
359
|
+
},
|
|
360
|
+
activeSeriesLength() {
|
|
361
|
+
return this.absoluteDataset.length;
|
|
362
|
+
},
|
|
363
|
+
activeSeriesWithStackRatios() {
|
|
364
|
+
return this.assignStackRatios(this.absoluteDataset.filter((t) => !this.segregatedSeries.includes(t.id)));
|
|
365
|
+
},
|
|
366
|
+
scaleGroups() {
|
|
367
|
+
const t = Object.groupBy(this.activeSeriesWithStackRatios, (o) => o.scaleLabel), a = {};
|
|
368
|
+
for (const [o, u] of Object.entries(t)) {
|
|
369
|
+
const l = u.flatMap((e) => e.absoluteValues);
|
|
370
|
+
a[o] = {
|
|
371
|
+
min: Math.min(...l) || 0,
|
|
372
|
+
max: Math.max(...l) || 1,
|
|
373
|
+
groupId: `scale_group_${this.createUid()}`
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
return a;
|
|
377
|
+
},
|
|
378
|
+
barSet() {
|
|
379
|
+
return this.activeSeriesWithStackRatios.filter((t) => t.type === "bar").map((t, a) => {
|
|
380
|
+
this.checkAutoScaleError(t);
|
|
381
|
+
const o = this.scaleGroups[t.scaleLabel].min, u = this.scaleGroups[t.scaleLabel].max;
|
|
382
|
+
t.absoluteValues.filter((x) => ![null, void 0].includes(x)).map((x) => (x - o) / (u - o));
|
|
383
|
+
const l = {
|
|
384
|
+
valueMin: o,
|
|
385
|
+
valueMax: u < 0 ? 0 : u
|
|
386
|
+
}, e = {
|
|
387
|
+
max: t.scaleMax || Math.max(...t.absoluteValues) || 1,
|
|
388
|
+
min: t.scaleMin || Math.min(...t.absoluteValues.filter((x) => ![void 0, null].includes(x))) > 0 ? 0 : Math.min(...t.absoluteValues.filter((x) => ![null, void 0].includes(x)))
|
|
389
|
+
}, A = t.scaleSteps || this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps, b = 1.0000001, I = this.calculateNiceScaleWithExactExtremes(e.min, e.max === e.min ? e.max * b : e.max, A), y = this.calculateNiceScaleWithExactExtremes(l.valueMin, l.valueMax === l.valueMin ? l.valueMax * b : l.valueMax, A), v = I.min >= 0 ? 0 : Math.abs(I.min), O = 0, p = I.max + v, G = y.max + Math.abs(O), N = this.mutableConfig.isStacked ? this.drawingArea.height * (1 - t.cumulatedStackRatio) : 0, L = this.mutableConfig.isStacked ? this.drawingArea.height * t.stackRatio - this.FINAL_CONFIG.chart.grid.labels.yAxis.gap : this.drawingArea.height, z = this.drawingArea.bottom - N - L * v / p, V = this.drawingArea.bottom - N - L * O / G, r = this.absoluteDataset.filter((x) => x.type === "bar").filter((x) => !this.segregatedSeries.includes(x.id)).length, c = t.series.map((x, T) => {
|
|
390
|
+
const _ = this.mutableConfig.useIndividualScale ? (t.absoluteValues[T] + v) / p : this.ratioToMax(x), k = this.mutableConfig.useIndividualScale && this.mutableConfig.isStacked ? this.drawingArea.left + this.drawingArea.width / this.maxSeries * T : this.drawingArea.left + this.slot.bar * a + this.slot.bar * T * r - this.barSlot / 2 - a * this.barPeriodGap;
|
|
391
|
+
return {
|
|
392
|
+
yOffset: this.checkNaN(N),
|
|
393
|
+
individualHeight: this.checkNaN(L),
|
|
394
|
+
x: this.checkNaN(k),
|
|
395
|
+
y: this.drawingArea.bottom - N - L * _,
|
|
396
|
+
value: t.absoluteValues[T],
|
|
397
|
+
zeroPosition: this.checkNaN(z),
|
|
398
|
+
individualMax: this.checkNaN(p),
|
|
399
|
+
comment: t.comments && t.comments.slice(this.slicer.start, this.slicer.end)[T] || ""
|
|
400
|
+
};
|
|
401
|
+
}), n = t.absoluteValues.map((x) => y.min >= 0 ? (x - Math.abs(y.min)) / (y.max - Math.abs(y.min)) : (x + Math.abs(y.min)) / (y.max + Math.abs(y.min))), f = t.series.map((x, T) => {
|
|
402
|
+
const _ = this.mutableConfig.useIndividualScale && this.mutableConfig.isStacked ? this.drawingArea.left + this.drawingArea.width / this.maxSeries * T : this.drawingArea.left - this.slot.bar / 2 + this.slot.bar * a + this.slot.bar * T * this.absoluteDataset.filter((k) => k.type === "bar").filter((k) => !this.segregatedSeries.includes(k.id)).length;
|
|
403
|
+
return {
|
|
404
|
+
yOffset: this.checkNaN(N),
|
|
405
|
+
individualHeight: this.checkNaN(L),
|
|
406
|
+
x: this.checkNaN(_),
|
|
407
|
+
y: this.checkNaN(this.drawingArea.bottom - this.checkNaN(N) - (this.checkNaN(L) * n[T] || 0)),
|
|
408
|
+
value: t.absoluteValues[T],
|
|
409
|
+
zeroPosition: this.checkNaN(z),
|
|
410
|
+
individualMax: this.checkNaN(p),
|
|
411
|
+
comment: t.comments && t.comments.slice(this.slicer.start, this.slicer.end)[T] || ""
|
|
412
|
+
};
|
|
413
|
+
}), C = I.ticks.map((x) => ({
|
|
414
|
+
y: x >= 0 ? z - L * (x / p) : z + L * Math.abs(x) / p,
|
|
415
|
+
value: x,
|
|
416
|
+
prefix: t.prefix || this.FINAL_CONFIG.chart.labels.prefix,
|
|
417
|
+
suffix: t.suffix || this.FINAL_CONFIG.chart.labels.suffix,
|
|
418
|
+
datapoint: t
|
|
419
|
+
})), M = y.ticks.map((x) => {
|
|
420
|
+
const T = (x - y.min) / (y.max - y.min);
|
|
421
|
+
return {
|
|
422
|
+
y: x >= 0 ? V - L * T : V + L * T,
|
|
423
|
+
value: x,
|
|
424
|
+
prefix: t.prefix || this.FINAL_CONFIG.chart.labels.prefix,
|
|
425
|
+
suffix: t.suffix || this.FINAL_CONFIG.chart.labels.suffix,
|
|
426
|
+
datapoint: t
|
|
427
|
+
};
|
|
428
|
+
});
|
|
429
|
+
return this.scaleGroups[t.scaleLabel].name = t.name, this.scaleGroups[t.scaleLabel].groupName = t.scaleLabel, this.scaleGroups[t.scaleLabel].groupColor = this.FINAL_CONFIG.chart.grid.labels.yAxis.groupColor || t.color, this.scaleGroups[t.scaleLabel].color = t.color, this.scaleGroups[t.scaleLabel].scaleYLabels = t.autoScaling ? M : C, this.scaleGroups[t.scaleLabel].zeroPosition = t.autoScaling ? V : z, this.scaleGroups[t.scaleLabel].individualMax = t.autoScaling ? G : p, this.scaleGroups[t.scaleLabel].scaleLabel = t.scaleLabel, this.scaleGroups[t.scaleLabel].id = t.id, this.scaleGroups[t.scaleLabel].yOffset = N, this.scaleGroups[t.scaleLabel].individualHeight = L, this.scaleGroups[t.scaleLabel].autoScaleYLabels = M, this.scaleGroups[t.scaleLabel].unique = this.activeSeriesWithStackRatios.filter((x) => x.scaleLabel === t.scaleLabel).length === 1, {
|
|
430
|
+
...t,
|
|
431
|
+
yOffset: N,
|
|
432
|
+
autoScaleYLabels: M,
|
|
433
|
+
individualHeight: L,
|
|
434
|
+
scaleYLabels: t.autoScaling ? M : C,
|
|
435
|
+
individualScale: t.autoScaling ? y : I,
|
|
436
|
+
individualMax: t.autoScaling ? G : p,
|
|
437
|
+
zeroPosition: t.autoScaling ? V : z,
|
|
438
|
+
plots: t.autoScaling ? f : c,
|
|
439
|
+
groupId: this.scaleGroups[t.scaleLabel].groupId
|
|
440
|
+
};
|
|
441
|
+
});
|
|
442
|
+
},
|
|
443
|
+
lineSet() {
|
|
444
|
+
return this.activeSeriesWithStackRatios.filter((t) => t.type === "line").map((t) => {
|
|
445
|
+
this.checkAutoScaleError(t);
|
|
446
|
+
const a = this.scaleGroups[t.scaleLabel].min, o = this.scaleGroups[t.scaleLabel].max;
|
|
447
|
+
t.absoluteValues.filter((_) => ![null, void 0].includes(_)).map((_) => (_ - a) / (o - a));
|
|
448
|
+
const u = {
|
|
449
|
+
valueMin: a,
|
|
450
|
+
valueMax: o
|
|
451
|
+
}, l = {
|
|
452
|
+
max: t.scaleMax || Math.max(...t.absoluteValues) || 1,
|
|
453
|
+
min: t.scaleMin || (Math.min(...t.absoluteValues) > 0 ? 0 : Math.min(...t.absoluteValues))
|
|
454
|
+
}, e = t.scaleSteps || this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps, A = 1.0000001, b = this.calculateNiceScaleWithExactExtremes(l.min, l.max === l.min ? l.max * A : l.max, e), I = this.calculateNiceScaleWithExactExtremes(u.valueMin, u.valueMax === u.valueMin ? u.valueMax * A : u.valueMax, e), y = b.min >= 0 ? 0 : Math.abs(b.min), v = 0, O = b.max + Math.abs(y), p = I.max + Math.abs(v), G = this.mutableConfig.isStacked ? this.drawingArea.height * (1 - t.cumulatedStackRatio) : 0, N = this.mutableConfig.isStacked ? this.drawingArea.height * t.stackRatio - this.FINAL_CONFIG.chart.grid.labels.yAxis.gap : this.drawingArea.height, L = this.drawingArea.bottom - G - N * y / O, z = this.drawingArea.bottom - G - N * v / p, V = t.series.map((_, k) => {
|
|
455
|
+
const Q = this.mutableConfig.useIndividualScale ? (t.absoluteValues[k] + Math.abs(y)) / O : this.ratioToMax(_);
|
|
456
|
+
return {
|
|
457
|
+
x: this.checkNaN(this.drawingArea.left + this.slot.line / 2 + this.slot.line * k),
|
|
458
|
+
y: this.checkNaN(this.drawingArea.bottom - G - N * Q),
|
|
459
|
+
value: t.absoluteValues[k],
|
|
460
|
+
comment: t.comments && t.comments.slice(this.slicer.start, this.slicer.end)[k] || ""
|
|
461
|
+
};
|
|
462
|
+
}), r = t.absoluteValues.map((_) => I.min >= 0 ? (_ - Math.abs(I.min)) / (I.max - Math.abs(I.min)) : (_ + Math.abs(I.min)) / (I.max + Math.abs(I.min))), c = t.series.map((_, k) => [void 0, null].includes(t.absoluteValues[k]) ? {
|
|
463
|
+
x: this.checkNaN(this.drawingArea.left + this.slot.line / 2 + this.slot.line * k),
|
|
464
|
+
y: L,
|
|
465
|
+
value: t.absoluteValues[k],
|
|
466
|
+
comment: t.comments && t.comments.slice(this.slicer.start, this.slicer.end)[k] || ""
|
|
467
|
+
} : {
|
|
468
|
+
x: this.checkNaN(this.drawingArea.left + this.slot.line / 2 + this.slot.line * k),
|
|
469
|
+
y: this.checkNaN(this.drawingArea.bottom - G - (N * r[k] || 0)),
|
|
470
|
+
value: t.absoluteValues[k],
|
|
471
|
+
comment: t.comments && t.comments.slice(this.slicer.start, this.slicer.end)[k] || ""
|
|
472
|
+
}), n = this.createSmoothPath(V.filter((_) => _.value !== null)), f = this.createSmoothPath(c.filter((_) => _.value !== null)), C = this.createStraightPath(V.filter((_) => _.value !== null)), M = this.createStraightPath(c.filter((_) => _.value !== null)), x = b.ticks.map((_) => ({
|
|
473
|
+
y: _ >= 0 ? L - N * (_ / O) : L + N * Math.abs(_) / O,
|
|
474
|
+
value: _,
|
|
475
|
+
prefix: t.prefix || this.FINAL_CONFIG.chart.labels.prefix,
|
|
476
|
+
suffix: t.suffix || this.FINAL_CONFIG.chart.labels.suffix,
|
|
477
|
+
datapoint: t
|
|
478
|
+
})), T = I.ticks.map((_) => {
|
|
479
|
+
const k = (_ - I.min) / (I.max - I.min);
|
|
480
|
+
return {
|
|
481
|
+
y: _ >= 0 ? z - N * k : z + N * k,
|
|
482
|
+
value: _,
|
|
483
|
+
prefix: t.prefix || this.FINAL_CONFIG.chart.labels.prefix,
|
|
484
|
+
suffix: t.suffix || this.FINAL_CONFIG.chart.labels.suffix,
|
|
485
|
+
datapoint: t
|
|
486
|
+
};
|
|
487
|
+
});
|
|
488
|
+
return this.scaleGroups[t.scaleLabel].name = t.name, this.scaleGroups[t.scaleLabel].groupName = t.scaleLabel, this.scaleGroups[t.scaleLabel].groupColor = this.FINAL_CONFIG.chart.grid.labels.yAxis.groupColor || t.color, this.scaleGroups[t.scaleLabel].color = t.color, this.scaleGroups[t.scaleLabel].scaleYLabels = t.autoScaling ? T : x, this.scaleGroups[t.scaleLabel].zeroPosition = t.autoScaling ? z : L, this.scaleGroups[t.scaleLabel].individualMax = t.autoScaling ? p : O, this.scaleGroups[t.scaleLabel].scaleLabel = t.scaleLabel, this.scaleGroups[t.scaleLabel].id = t.id, this.scaleGroups[t.scaleLabel].yOffset = G, this.scaleGroups[t.scaleLabel].individualHeight = N, this.scaleGroups[t.scaleLabel].autoScaleYLabels = T, this.scaleGroups[t.scaleLabel].unique = this.activeSeriesWithStackRatios.filter((_) => _.scaleLabel === t.scaleLabel).length === 1, {
|
|
489
|
+
...t,
|
|
490
|
+
yOffset: G,
|
|
491
|
+
autoScaleYLabels: T,
|
|
492
|
+
individualHeight: N,
|
|
493
|
+
scaleYLabels: t.autoScaling ? T : x,
|
|
494
|
+
individualScale: t.autoScaling ? I : b,
|
|
495
|
+
individualMax: t.autoScaling ? p : O,
|
|
496
|
+
zeroPosition: t.autoScaling ? z : L,
|
|
497
|
+
curve: t.autoScaling ? f : n,
|
|
498
|
+
plots: t.autoScaling ? c : V,
|
|
499
|
+
area: t.useArea ? this.mutableConfig.useIndividualScale ? this.createIndividualArea(t.autoScaling ? c : V, t.autoScaling ? z : L) : this.createArea(V) : "",
|
|
500
|
+
straight: t.autoScaling ? M : C,
|
|
501
|
+
groupId: this.scaleGroups[t.scaleLabel].groupId
|
|
502
|
+
};
|
|
503
|
+
});
|
|
504
|
+
},
|
|
505
|
+
plotSet() {
|
|
506
|
+
return this.activeSeriesWithStackRatios.filter((t) => t.type === "plot").map((t) => {
|
|
507
|
+
this.checkAutoScaleError(t);
|
|
508
|
+
const a = this.scaleGroups[t.scaleLabel].min, o = this.scaleGroups[t.scaleLabel].max;
|
|
509
|
+
t.absoluteValues.filter((C) => ![null, void 0].includes(C)).map((C) => (C - a) / (o - a));
|
|
510
|
+
const u = {
|
|
511
|
+
valueMin: a,
|
|
512
|
+
valueMax: o
|
|
513
|
+
}, l = {
|
|
514
|
+
max: t.scaleMax || Math.max(...t.absoluteValues) || 1,
|
|
515
|
+
min: t.scaleMin || Math.min(...t.absoluteValues) > 0 ? 0 : Math.min(...t.absoluteValues)
|
|
516
|
+
}, e = t.scaleSteps || this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps, A = 1.0000001, b = this.calculateNiceScaleWithExactExtremes(l.min, l.max === l.min ? l.max * A : l.max, e), I = this.calculateNiceScaleWithExactExtremes(u.valueMin, u.valueMax === u.valueMin ? u.valueMax * A : u.valueMax, e), y = b.min >= 0 ? 0 : Math.abs(b.min), v = 0, O = b.max + y, p = I.max + Math.abs(v), G = this.mutableConfig.isStacked ? this.drawingArea.height * (1 - t.cumulatedStackRatio) : 0, N = this.mutableConfig.isStacked ? this.drawingArea.height * t.stackRatio - this.FINAL_CONFIG.chart.grid.labels.yAxis.gap : this.drawingArea.height, L = this.drawingArea.bottom - G - N * y / O, z = this.drawingArea.bottom - G - N * v / p, V = t.series.map((C, M) => {
|
|
517
|
+
const x = this.mutableConfig.useIndividualScale ? (t.absoluteValues[M] + Math.abs(y)) / O : this.ratioToMax(C);
|
|
518
|
+
return {
|
|
519
|
+
x: this.checkNaN(this.drawingArea.left + this.slot.plot / 2 + this.slot.plot * M),
|
|
520
|
+
y: this.checkNaN(this.drawingArea.bottom - G - N * x),
|
|
521
|
+
value: t.absoluteValues[M],
|
|
522
|
+
comment: t.comments && t.comments.slice(this.slicer.start, this.slicer.end)[M] || ""
|
|
523
|
+
};
|
|
524
|
+
}), r = t.absoluteValues.map((C) => I.min >= 0 ? (C - Math.abs(I.min)) / (I.max - Math.abs(I.min)) : (C + Math.abs(I.min)) / (I.max + Math.abs(I.min))), c = t.series.map((C, M) => ({
|
|
525
|
+
x: this.checkNaN(this.drawingArea.left + this.slot.plot / 2 + this.slot.plot * M),
|
|
526
|
+
y: this.checkNaN(this.drawingArea.bottom - G - (N * r[M] || 0)),
|
|
527
|
+
value: t.absoluteValues[M],
|
|
528
|
+
comment: t.comments && t.comments.slice(this.slicer.start, this.slicer.end)[M] || ""
|
|
529
|
+
})), n = b.ticks.map((C) => ({
|
|
530
|
+
y: C >= 0 ? L - N * (C / O) : L + N * Math.abs(C) / O,
|
|
531
|
+
value: C,
|
|
532
|
+
prefix: t.prefix || this.FINAL_CONFIG.chart.labels.prefix,
|
|
533
|
+
suffix: t.suffix || this.FINAL_CONFIG.chart.labels.suffix,
|
|
534
|
+
datapoint: t
|
|
535
|
+
})), f = I.ticks.map((C) => {
|
|
536
|
+
const M = (C - I.min) / (I.max - I.min);
|
|
537
|
+
return {
|
|
538
|
+
y: C >= 0 ? z - N * M : z + N * M,
|
|
539
|
+
value: C,
|
|
540
|
+
prefix: t.prefix || this.FINAL_CONFIG.chart.labels.prefix,
|
|
541
|
+
suffix: t.suffix || this.FINAL_CONFIG.chart.labels.suffix,
|
|
542
|
+
datapoint: t
|
|
543
|
+
};
|
|
544
|
+
});
|
|
545
|
+
return this.scaleGroups[t.scaleLabel].name = t.name, this.scaleGroups[t.scaleLabel].groupName = t.scaleLabel, this.scaleGroups[t.scaleLabel].groupColor = this.FINAL_CONFIG.chart.grid.labels.yAxis.groupColor || t.color, this.scaleGroups[t.scaleLabel].color = t.color, this.scaleGroups[t.scaleLabel].scaleYLabels = t.autoScaling ? f : n, this.scaleGroups[t.scaleLabel].zeroPosition = t.autoScaling ? z : L, this.scaleGroups[t.scaleLabel].individualMax = t.autoScaling ? p : O, this.scaleGroups[t.scaleLabel].scaleLabel = t.scaleLabel, this.scaleGroups[t.scaleLabel].id = t.id, this.scaleGroups[t.scaleLabel].yOffset = G, this.scaleGroups[t.scaleLabel].individualHeight = N, this.scaleGroups[t.scaleLabel].autoScaleYLabels = f, this.scaleGroups[t.scaleLabel].unique = this.activeSeriesWithStackRatios.filter((C) => C.scaleLabel === t.scaleLabel).length === 1, {
|
|
546
|
+
...t,
|
|
547
|
+
yOffset: G,
|
|
548
|
+
autoScaleYLabels: f,
|
|
549
|
+
individualHeight: N,
|
|
550
|
+
scaleYLabels: t.autoScaling ? f : n,
|
|
551
|
+
individualScale: t.autoScaling ? I : b,
|
|
552
|
+
individualMax: t.autoScaling ? p : O,
|
|
553
|
+
zeroPosition: t.autoScaling ? z : L,
|
|
554
|
+
plots: t.autoScaling ? c : V,
|
|
555
|
+
groupId: this.scaleGroups[t.scaleLabel].groupId
|
|
556
|
+
};
|
|
557
|
+
});
|
|
558
|
+
},
|
|
559
|
+
drawingArea() {
|
|
560
|
+
const t = this.mutableConfig.useIndividualScale && this.FINAL_CONFIG.chart.grid.labels.show ? this.absoluteDataset.filter((a) => !this.segregatedSeries.includes(a.id)).length * (this.mutableConfig.isStacked ? 0 : this.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth) : 0;
|
|
561
|
+
return {
|
|
562
|
+
top: this.FINAL_CONFIG.chart.padding.top,
|
|
563
|
+
right: this.width - this.FINAL_CONFIG.chart.padding.right,
|
|
564
|
+
bottom: this.height - this.FINAL_CONFIG.chart.padding.bottom,
|
|
565
|
+
left: this.FINAL_CONFIG.chart.padding.left + t,
|
|
566
|
+
height: this.height - (this.FINAL_CONFIG.chart.padding.top + this.FINAL_CONFIG.chart.padding.bottom),
|
|
567
|
+
width: this.width - (this.FINAL_CONFIG.chart.padding.right + this.FINAL_CONFIG.chart.padding.left + t)
|
|
568
|
+
};
|
|
569
|
+
},
|
|
570
|
+
max() {
|
|
571
|
+
return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax ? this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax : Math.max(...this.safeDataset.filter((t) => !this.segregatedSeries.includes(t.id)).map((t) => Math.max(...t.series)));
|
|
572
|
+
},
|
|
573
|
+
min() {
|
|
574
|
+
if (this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin !== null)
|
|
575
|
+
return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin;
|
|
576
|
+
const t = Math.min(...this.safeDataset.filter((a) => !this.segregatedSeries.includes(a.id)).map((a) => Math.min(...a.series)));
|
|
577
|
+
return t > 0 ? 0 : t;
|
|
578
|
+
},
|
|
579
|
+
niceScale() {
|
|
580
|
+
return this.calculateNiceScaleWithExactExtremes(this.min, this.max < 0 ? 0 : this.max, this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps);
|
|
581
|
+
},
|
|
582
|
+
maxSeries() {
|
|
583
|
+
return this.slicer.end - this.slicer.start;
|
|
584
|
+
},
|
|
585
|
+
timeLabels() {
|
|
586
|
+
const t = Math.max(...this.dataset.map((o) => this.largestTriangleThreeBucketsArray({ data: o.series, threshold: this.FINAL_CONFIG.downsample.threshold }).length)), a = [];
|
|
587
|
+
for (let o = 0; o < t; o += 1)
|
|
588
|
+
a.push({
|
|
589
|
+
text: this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[o] || String(o),
|
|
590
|
+
absoluteIndex: o
|
|
591
|
+
});
|
|
592
|
+
return a.slice(this.slicer.start, this.slicer.end);
|
|
593
|
+
},
|
|
594
|
+
slot() {
|
|
595
|
+
return {
|
|
596
|
+
bar: this.drawingArea.width / this.maxSeries / this.safeDataset.filter((t) => t.type === "bar").filter((t) => !this.segregatedSeries.includes(t.id)).length,
|
|
597
|
+
plot: this.drawingArea.width / this.maxSeries,
|
|
598
|
+
line: this.drawingArea.width / this.maxSeries
|
|
599
|
+
};
|
|
600
|
+
},
|
|
601
|
+
barSlot() {
|
|
602
|
+
const t = this.safeDataset.filter((a) => a.type === "bar").filter((a) => !this.segregatedSeries.includes(a.id)).length;
|
|
603
|
+
return this.drawingArea.width / this.maxSeries / t - this.barPeriodGap * t;
|
|
604
|
+
},
|
|
605
|
+
barPeriodGap() {
|
|
606
|
+
return this.slot.line * this.FINAL_CONFIG.bar.periodGap;
|
|
607
|
+
},
|
|
608
|
+
maxSlot() {
|
|
609
|
+
return Math.max(...Object.values(this.slot).filter((t) => t !== 1 / 0));
|
|
610
|
+
},
|
|
611
|
+
table() {
|
|
612
|
+
if (this.safeDataset.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
|
|
613
|
+
const t = this.relativeDataset.map((o) => ({
|
|
614
|
+
label: o.name,
|
|
615
|
+
color: o.color,
|
|
616
|
+
type: o.type
|
|
617
|
+
})), a = [];
|
|
618
|
+
return this.timeLabels.forEach((o, u) => {
|
|
619
|
+
const l = [o.text];
|
|
620
|
+
this.relativeDataset.forEach((e) => {
|
|
621
|
+
l.push(this.canShowValue(e.absoluteValues[u]) ? Number(e.absoluteValues[u].toFixed(this.FINAL_CONFIG.table.rounding)) : "");
|
|
622
|
+
}), a.push(l);
|
|
623
|
+
}), { head: t, body: a };
|
|
624
|
+
},
|
|
625
|
+
dataTable() {
|
|
626
|
+
const t = this.FINAL_CONFIG.table.showSum;
|
|
627
|
+
let a = [""].concat(this.relativeDataset.map((e) => e.name));
|
|
628
|
+
t && (a = a.concat(' <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>'));
|
|
629
|
+
let o = [];
|
|
630
|
+
for (let e = 0; e < this.maxSeries; e += 1) {
|
|
631
|
+
const A = this.relativeDataset.map((b) => b.absoluteValues[e] ?? 0).reduce((b, I) => b + I, 0);
|
|
632
|
+
o.push(
|
|
633
|
+
[
|
|
634
|
+
this.timeLabels[e].text ?? "-"
|
|
635
|
+
].concat(this.relativeDataset.map(
|
|
636
|
+
(b) => this.applyDataLabel(
|
|
637
|
+
b.type === "line" ? this.FINAL_CONFIG.line.labels.formatter : b.type === "bar" ? this.FINAL_CONFIG.bar.labels.formatter : this.FINAL_CONFIG.plot.labels.formatter,
|
|
638
|
+
b.absoluteValues[e] ?? 0,
|
|
639
|
+
this.dataLabel({
|
|
640
|
+
p: b.prefix || this.FINAL_CONFIG.chart.labels.prefix,
|
|
641
|
+
v: b.absoluteValues[e] ?? 0,
|
|
642
|
+
s: b.suffix || this.FINAL_CONFIG.chart.labels.suffix,
|
|
643
|
+
r: this.FINAL_CONFIG.table.rounding
|
|
644
|
+
})
|
|
645
|
+
)
|
|
646
|
+
)).concat(t ? (A ?? 0).toFixed(this.FINAL_CONFIG.table.rounding) : [])
|
|
647
|
+
);
|
|
648
|
+
}
|
|
649
|
+
const u = {
|
|
650
|
+
th: {
|
|
651
|
+
backgroundColor: this.FINAL_CONFIG.table.th.backgroundColor,
|
|
652
|
+
color: this.FINAL_CONFIG.table.th.color,
|
|
653
|
+
outline: this.FINAL_CONFIG.table.th.outline
|
|
654
|
+
},
|
|
655
|
+
td: {
|
|
656
|
+
backgroundColor: this.FINAL_CONFIG.table.td.backgroundColor,
|
|
657
|
+
color: this.FINAL_CONFIG.table.td.color,
|
|
658
|
+
outline: this.FINAL_CONFIG.table.td.outline
|
|
659
|
+
},
|
|
660
|
+
breakpoint: this.FINAL_CONFIG.table.responsiveBreakpoint
|
|
661
|
+
}, l = [this.FINAL_CONFIG.table.columnNames.period].concat(this.relativeDataset.map((e) => e.name)).concat(this.FINAL_CONFIG.table.columnNames.total);
|
|
662
|
+
return { head: a, body: o, config: u, colNames: l };
|
|
663
|
+
},
|
|
664
|
+
dataTooltipSlot() {
|
|
665
|
+
return {
|
|
666
|
+
datapoint: this.selectedSeries,
|
|
667
|
+
seriesIndex: this.selectedSerieIndex,
|
|
668
|
+
series: this.absoluteDataset,
|
|
669
|
+
bars: this.barSet,
|
|
670
|
+
lines: this.lineSet,
|
|
671
|
+
plots: this.plotSet,
|
|
672
|
+
config: this.FINAL_CONFIG
|
|
673
|
+
};
|
|
674
|
+
},
|
|
675
|
+
selectedSeries() {
|
|
676
|
+
return this.relativeDataset.map((t) => ({
|
|
677
|
+
slotAbsoluteIndex: t.slotAbsoluteIndex,
|
|
678
|
+
shape: t.shape || null,
|
|
679
|
+
name: t.name,
|
|
680
|
+
color: t.color,
|
|
681
|
+
type: t.type,
|
|
682
|
+
value: t.absoluteValues.find((a, o) => o === this.selectedSerieIndex),
|
|
683
|
+
comments: t.comments || [],
|
|
684
|
+
prefix: t.prefix || this.FINAL_CONFIG.chart.labels.prefix,
|
|
685
|
+
suffix: t.suffix || this.FINAL_CONFIG.chart.labels.suffix
|
|
686
|
+
}));
|
|
687
|
+
},
|
|
688
|
+
tooltipContent() {
|
|
689
|
+
let t = "", a = this.selectedSeries.map((l) => l.value).filter((l) => this.isSafeValue(l) && l !== null).reduce((l, e) => Math.abs(l) + Math.abs(e), 0);
|
|
690
|
+
const o = this.timeLabels[this.selectedSerieIndex], u = this.FINAL_CONFIG.chart.tooltip.customFormat;
|
|
691
|
+
return this.isFunction(u) && this.functionReturnsString(() => u({
|
|
692
|
+
seriesIndex: this.selectedSerieIndex,
|
|
693
|
+
datapoint: this.selectedSeries,
|
|
694
|
+
series: this.absoluteDataset,
|
|
695
|
+
bars: this.barSet,
|
|
696
|
+
lines: this.lineSet,
|
|
697
|
+
plots: this.plotSet,
|
|
698
|
+
config: this.FINAL_CONFIG
|
|
699
|
+
})) ? u({
|
|
700
|
+
seriesIndex: this.selectedSerieIndex,
|
|
701
|
+
datapoint: this.selectedSeries,
|
|
702
|
+
series: this.absoluteDataset,
|
|
703
|
+
bars: this.barSet,
|
|
704
|
+
lines: this.lineSet,
|
|
705
|
+
plots: this.plotSet,
|
|
706
|
+
config: this.FINAL_CONFIG
|
|
707
|
+
}) : (o && o.text && this.FINAL_CONFIG.chart.tooltip.showTimeLabel && (t += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${this.FINAL_CONFIG.chart.tooltip.borderColor}; width:100%">${o.text}</div>`), this.selectedSeries.forEach((l) => {
|
|
708
|
+
if (this.isSafeValue(l.value)) {
|
|
709
|
+
let e = "", A = "";
|
|
710
|
+
switch (this.icons[l.type]) {
|
|
711
|
+
case "bar":
|
|
712
|
+
e = `<svg viewBox="0 0 40 40" height="14" width="14">${this.$slots.pattern ? `<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${l.color}" />` : ""}<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${this.$slots.pattern ? `url(#pattern_${this.uniqueId}_${l.slotAbsoluteIndex}` : l.color}" /></svg>`;
|
|
713
|
+
break;
|
|
714
|
+
case "line":
|
|
715
|
+
!l.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(l.shape) ? A = `<circle cx="10" cy="8" r="4" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${l.color}" />` : l.shape === "triangle" ? A = `<path d="${D({ plot: { x: 10, y: 8 }, radius: 4, sides: 3, rotation: 0.52 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : l.shape === "square" ? A = `<path d="${D({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0.8 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : l.shape === "diamond" ? A = `<path d="${D({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : l.shape === "pentagon" ? A = `<path d="${D({ plot: { x: 10, y: 8 }, radius: 4, sides: 5, rotation: 0.95 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : l.shape === "hexagon" ? A = `<path d="${D({ plot: { x: 10, y: 8 }, radius: 4, sides: 6, rotation: 0 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : l.shape === "star" && (A = `<polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${l.color}" points="${q({ plot: { x: 10, y: 8 }, radius: 4 })}" />`), e = `<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="1.5" x="0" y="6.5" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" height="3" width="20" fill="${l.color}" />${A}</svg>`;
|
|
716
|
+
break;
|
|
717
|
+
case "plot":
|
|
718
|
+
if (!l.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(l.shape)) {
|
|
719
|
+
e = `<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" /></svg>`;
|
|
720
|
+
break;
|
|
721
|
+
}
|
|
722
|
+
if (l.shape === "star") {
|
|
723
|
+
e = `<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" points="${q({ plot: { x: 6, y: 6 }, radius: 5 })}" /></svg>`;
|
|
724
|
+
break;
|
|
725
|
+
}
|
|
726
|
+
if (l.shape === "triangle") {
|
|
727
|
+
e = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${D({ plot: { x: 6, y: 6 }, radius: 6, sides: 3, rotation: 0.52 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
728
|
+
break;
|
|
729
|
+
}
|
|
730
|
+
if (l.shape === "square") {
|
|
731
|
+
e = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${D({ plot: { x: 6, y: 6 }, radius: 6, sides: 4, rotation: 0.8 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
732
|
+
break;
|
|
733
|
+
}
|
|
734
|
+
if (l.shape === "diamond") {
|
|
735
|
+
e = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${D({ plot: { x: 6, y: 6 }, radius: 5, sides: 4, rotation: 0 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
736
|
+
break;
|
|
737
|
+
}
|
|
738
|
+
if (l.shape === "pentagon") {
|
|
739
|
+
e = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${D({ plot: { x: 6, y: 6 }, radius: 5, sides: 5, rotation: 0.95 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
740
|
+
break;
|
|
741
|
+
}
|
|
742
|
+
if (l.shape === "hexagon") {
|
|
743
|
+
e = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${D({ plot: { x: 6, y: 6 }, radius: 5, sides: 6, rotation: 0 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
744
|
+
break;
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
t += `<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${e}</div> ${l.name}: <b>${this.FINAL_CONFIG.chart.tooltip.showValue ? this.applyDataLabel(
|
|
748
|
+
l.type === "line" ? this.FINAL_CONFIG.line.labels.formatter : l.type === "bar" ? this.FINAL_CONFIG.bar.labels.formatter : this.FINAL_CONFIG.plot.labels.formatter,
|
|
749
|
+
l.value,
|
|
750
|
+
this.dataLabel({
|
|
751
|
+
p: l.prefix,
|
|
752
|
+
v: l.value,
|
|
753
|
+
s: l.suffix,
|
|
754
|
+
r: this.FINAL_CONFIG.chart.tooltip.roundingValue
|
|
755
|
+
}),
|
|
756
|
+
{ datapoint: l }
|
|
757
|
+
) : ""}</b> ${this.FINAL_CONFIG.chart.tooltip.showPercentage ? `(${U({
|
|
758
|
+
v: this.checkNaN(Math.abs(l.value) / a * 100),
|
|
759
|
+
s: "%",
|
|
760
|
+
r: this.FINAL_CONFIG.chart.tooltip.roundingPercentage
|
|
761
|
+
})})` : ""}</div>`, this.FINAL_CONFIG.chart.comments.showInTooltip && l.comments.length && l.comments.slice(this.slicer.start, this.slicer.end)[this.selectedSerieIndex] && (t += `<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${l.color}">${l.comments.slice(this.slicer.start, this.slicer.end)[this.selectedSerieIndex]}</div>`);
|
|
762
|
+
}
|
|
763
|
+
}), `<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${this.FINAL_CONFIG.chart.tooltip.color}">${t}</div>`);
|
|
764
|
+
},
|
|
765
|
+
svg() {
|
|
766
|
+
return {
|
|
767
|
+
height: this.height,
|
|
768
|
+
width: this.width
|
|
769
|
+
};
|
|
770
|
+
},
|
|
771
|
+
yLabels() {
|
|
772
|
+
return this.niceScale.ticks.map((t) => ({
|
|
773
|
+
y: t >= 0 ? this.zero - this.drawingArea.height * this.ratioToMax(t) : this.zero + this.drawingArea.height * this.ratioToMax(Math.abs(t)),
|
|
774
|
+
value: t,
|
|
775
|
+
prefix: this.FINAL_CONFIG.chart.labels.prefix,
|
|
776
|
+
suffix: this.FINAL_CONFIG.chart.labels.suffix
|
|
777
|
+
}));
|
|
778
|
+
},
|
|
779
|
+
zero() {
|
|
780
|
+
return this.drawingArea.bottom - this.drawingArea.height * this.ratioToMax(this.relativeZero);
|
|
781
|
+
}
|
|
782
|
+
},
|
|
783
|
+
mounted() {
|
|
784
|
+
this.svgRef = this.$refs.svgRef, this.prepareChart(), this.setupSlicer(), document.addEventListener("mousemove", (t) => {
|
|
785
|
+
this.clientPosition = {
|
|
786
|
+
x: t.clientX,
|
|
787
|
+
y: t.clientY
|
|
788
|
+
};
|
|
789
|
+
});
|
|
790
|
+
},
|
|
791
|
+
methods: {
|
|
792
|
+
abbreviate: Ce,
|
|
793
|
+
adaptColorToBackground: Le,
|
|
794
|
+
applyDataLabel: ye,
|
|
795
|
+
assignStackRatios: Ae,
|
|
796
|
+
calcLinearProgression: _e,
|
|
797
|
+
calculateNiceScaleWithExactExtremes: Fe,
|
|
798
|
+
checkNaN: xe,
|
|
799
|
+
closestDecimal: Ne,
|
|
800
|
+
convertColorToHex: be,
|
|
801
|
+
convertConfigColors: me,
|
|
802
|
+
convertCustomPalette: Ie,
|
|
803
|
+
createCsvContent: fe,
|
|
804
|
+
createSmoothPath: ge,
|
|
805
|
+
createStraightPath: de,
|
|
806
|
+
createTSpans: ue,
|
|
807
|
+
dataLabel: U,
|
|
808
|
+
downloadCsv: he,
|
|
809
|
+
error: oe,
|
|
810
|
+
forceValidValue: ce,
|
|
811
|
+
functionReturnsString: ne,
|
|
812
|
+
hasDeepProperty: se,
|
|
813
|
+
isFunction: ae,
|
|
814
|
+
isSafeValue: ie,
|
|
815
|
+
largestTriangleThreeBucketsArray: re,
|
|
816
|
+
objectIsEmpty: le,
|
|
817
|
+
setOpacity: te,
|
|
818
|
+
shiftHue: ee,
|
|
819
|
+
translateSize: $,
|
|
820
|
+
treeShake: j,
|
|
821
|
+
useMouse: ze,
|
|
822
|
+
useNestedProp: Z,
|
|
823
|
+
createUid: X,
|
|
824
|
+
setUserOptionsVisibility(t = !1) {
|
|
825
|
+
this.showUserOptionsOnChartHover && (this.userOptionsVisible = t);
|
|
826
|
+
},
|
|
827
|
+
toggleAnnotator() {
|
|
828
|
+
this.isAnnotator = !this.isAnnotator;
|
|
829
|
+
},
|
|
830
|
+
selectTimeLabel(t, a) {
|
|
831
|
+
const o = this.relativeDataset.map((u) => ({
|
|
832
|
+
shape: u.shape || null,
|
|
833
|
+
name: u.name,
|
|
834
|
+
color: u.color,
|
|
835
|
+
type: u.type,
|
|
836
|
+
value: u.absoluteValues.find((l, e) => e === a),
|
|
837
|
+
comments: u.comments || [],
|
|
838
|
+
prefix: u.prefix || this.FINAL_CONFIG.chart.labels.prefix,
|
|
839
|
+
suffix: u.suffix || this.FINAL_CONFIG.chart.labels.suffix
|
|
840
|
+
}));
|
|
841
|
+
this.$emit("selectTimeLabel", {
|
|
842
|
+
datapoint: o,
|
|
843
|
+
absoluteIndex: t.absoluteIndex,
|
|
844
|
+
label: t.text
|
|
845
|
+
});
|
|
846
|
+
},
|
|
847
|
+
getHighlightAreaPosition(t) {
|
|
848
|
+
const a = this.drawingArea.left + this.drawingArea.width / this.maxSeries * (t.from - this.slicer.start), o = this.drawingArea.width / (this.slicer.end - this.slicer.start) * t.span < 0 ? 1e-5 : this.drawingArea.width / (this.slicer.end - this.slicer.start) * t.span;
|
|
849
|
+
return {
|
|
850
|
+
x: a < this.drawingArea.left ? this.drawingArea.left : a,
|
|
851
|
+
width: o
|
|
852
|
+
};
|
|
853
|
+
},
|
|
854
|
+
prepareConfig() {
|
|
855
|
+
const t = Se().vue_ui_xy;
|
|
856
|
+
if (!Object.keys(this.config || {}).length)
|
|
857
|
+
return t;
|
|
858
|
+
const a = this.useNestedProp({
|
|
859
|
+
userConfig: this.config,
|
|
860
|
+
defaultConfig: t
|
|
861
|
+
});
|
|
862
|
+
return this.config && this.hasDeepProperty(this.config, "chart.highlightArea") && (Array.isArray(this.config.chart.highlightArea) ? a.chart.highlightArea = this.config.chart.highlightArea : a.chart.highlightArea = [this.config.chart.highlightArea]), this.config && this.hasDeepProperty(this.config, "chart.grid.labels.yAxis.scaleMin") ? a.chart.grid.labels.yAxis.scaleMin = this.config.chart.grid.labels.yAxis.scaleMin : a.chart.grid.labels.yAxis.scaleMin = null, this.config && this.hasDeepProperty(this.config, "chart.grid.labels.yAxis.scaleMax") ? a.chart.grid.labels.yAxis.scaleMax = this.config.chart.grid.labels.yAxis.scaleMax : a.chart.grid.labels.yAxis.scaleMax = null, this.config && this.hasDeepProperty(this.config, "chart.zoom.startIndex") ? a.chart.zoom.startIndex = this.config.chart.zoom.startIndex : a.chart.zoom.startIndex = null, this.config && this.hasDeepProperty(this.config, "chart.zoom.endIndex") ? a.chart.zoom.endIndex = this.config.chart.zoom.endIndex : a.chart.zoom.endIndex = null, this.config && this.hasDeepProperty(this.config, "chart.grid.labels.yAxis.groupColor") ? a.chart.grid.labels.yAxis.groupColor = this.config.chart.grid.labels.yAxis.groupColor : a.chart.grid.labels.yAxis.groupColor = null, a.theme ? {
|
|
863
|
+
...Z({
|
|
864
|
+
userConfig: this.themes.vue_ui_xy[a.theme] || this.config,
|
|
865
|
+
defaultConfig: a
|
|
866
|
+
}),
|
|
867
|
+
customPalette: this.themePalettes[a.theme] || this.palette
|
|
868
|
+
} : a;
|
|
869
|
+
},
|
|
870
|
+
prepareChart() {
|
|
871
|
+
if (this.objectIsEmpty(this.dataset) ? this.error({
|
|
872
|
+
componentName: "VueUiXy",
|
|
873
|
+
type: "dataset"
|
|
874
|
+
}) : this.dataset.forEach((t, a) => {
|
|
875
|
+
[null, void 0].includes(t.name) && this.error({
|
|
876
|
+
componentName: "VueUiXy",
|
|
877
|
+
type: "datasetSerieAttribute",
|
|
878
|
+
property: "name (string)",
|
|
879
|
+
index: a
|
|
880
|
+
});
|
|
881
|
+
}), this.FINAL_CONFIG.showWarnings && this.dataset.forEach((t) => {
|
|
882
|
+
t.series.forEach((a, o) => {
|
|
883
|
+
this.isSafeValue(a) || console.warn(`VueUiXy has detected an unsafe value in your dataset:
|
|
884
|
+
-----> The serie '${t.name}' contains the value '${a}' at index ${o}.
|
|
885
|
+
'${a}' was converted to null to allow the chart to display.`);
|
|
886
|
+
});
|
|
887
|
+
}), this.showUserOptionsOnChartHover = this.FINAL_CONFIG.chart.userOptions.showOnChartHover, this.keepUserOptionState = this.FINAL_CONFIG.chart.userOptions.keepStateOnChartLeave, this.userOptionsVisible = !this.FINAL_CONFIG.chart.userOptions.showOnChartHover, this.mutableConfig = {
|
|
888
|
+
dataLabels: {
|
|
889
|
+
show: !0
|
|
890
|
+
},
|
|
891
|
+
showTooltip: this.FINAL_CONFIG.chart.tooltip.show === !0,
|
|
892
|
+
showTable: this.FINAL_CONFIG.showTable === !0,
|
|
893
|
+
isStacked: this.FINAL_CONFIG.chart.grid.labels.yAxis.stacked,
|
|
894
|
+
useIndividualScale: this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale
|
|
895
|
+
}, this.FINAL_CONFIG.responsive) {
|
|
896
|
+
const a = this.$refs.chart.parentNode, { height: o, width: u } = a.getBoundingClientRect();
|
|
897
|
+
let l = null, e = 0;
|
|
898
|
+
this.FINAL_CONFIG.chart.title.show && (l = this.$refs.chartTitle, e = l.getBoundingClientRect().height);
|
|
899
|
+
let A = null, b = 0;
|
|
900
|
+
this.FINAL_CONFIG.chart.zoom.show && this.maxX > 6 && this.isDataset && (A = this.$refs.chartSlicer.$el, b = A.getBoundingClientRect().height);
|
|
901
|
+
let I = null, y = 0;
|
|
902
|
+
this.FINAL_CONFIG.chart.legend.show && (I = this.$refs.chartLegend, y = I.getBoundingClientRect().height);
|
|
903
|
+
let v = 0;
|
|
904
|
+
this.$refs.source && (v = this.$refs.source.getBoundingClientRect().height);
|
|
905
|
+
let O = 0;
|
|
906
|
+
this.$refs.noTitle && (O = this.$refs.noTitle.getBoundingClientRect().height), this.height = o - e - y - b - v - O, this.width = u, this.viewBox = `0 0 ${this.width < 0 ? 10 : this.width} ${this.height < 0 ? 10 : this.height}`, this.convertSizes(), new ResizeObserver((G) => {
|
|
907
|
+
for (const N of G)
|
|
908
|
+
this.$refs.chartTitle && (e = this.$refs.chartTitle.getBoundingClientRect().height), this.$refs.chartSlicer && this.$refs.chartSlicer.$el && (b = this.$refs.chartSlicer.$el.getBoundingClientRect().height), this.$refs.chartLegend && (y = this.$refs.chartLegend.getBoundingClientRect().height), this.$refs.source && (v = this.$refs.source.getBoundingClientRect().height), requestAnimationFrame(() => {
|
|
909
|
+
this.height = N.contentBoxSize[0].blockSize - e - y - b - v - 24, this.width = N.contentBoxSize[0].inlineSize, this.viewBox = `0 0 ${this.width < 0 ? 10 : this.width} ${this.height < 0 ? 10 : this.height}`, this.convertSizes();
|
|
910
|
+
});
|
|
911
|
+
}).observe(a);
|
|
912
|
+
} else
|
|
913
|
+
this.height = this.FINAL_CONFIG.chart.height, this.width = this.FINAL_CONFIG.chart.width, this.viewBox = `0 0 ${this.width} ${this.height}`, this.fontSizes.dataLabels = this.FINAL_CONFIG.chart.grid.labels.fontSize, this.fontSizes.yAxis = this.FINAL_CONFIG.chart.grid.labels.axis.fontSize, this.fontSizes.xAxis = this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.fontSize, this.fontSizes.plotLabels = this.FINAL_CONFIG.chart.labels.fontSize, this.plotRadii.plot = this.FINAL_CONFIG.plot.radius, this.plotRadii.line = this.FINAL_CONFIG.line.radius;
|
|
914
|
+
},
|
|
915
|
+
selectMinimapIndex(t) {
|
|
916
|
+
this.selectedMinimapIndex = t;
|
|
917
|
+
},
|
|
918
|
+
convertSizes() {
|
|
919
|
+
this.fontSizes.dataLabels = this.translateSize({
|
|
920
|
+
relator: this.height,
|
|
921
|
+
adjuster: 400,
|
|
922
|
+
source: this.FINAL_CONFIG.chart.grid.labels.fontSize,
|
|
923
|
+
threshold: 10,
|
|
924
|
+
fallback: 10
|
|
925
|
+
}), this.fontSizes.yAxis = this.translateSize({
|
|
926
|
+
relator: this.width,
|
|
927
|
+
adjuster: 1e3,
|
|
928
|
+
source: this.FINAL_CONFIG.chart.grid.labels.axis.fontSize,
|
|
929
|
+
threshold: 10,
|
|
930
|
+
fallback: 10
|
|
931
|
+
}), this.fontSizes.xAxis = this.translateSize({
|
|
932
|
+
relator: this.width,
|
|
933
|
+
adjuster: 1e3,
|
|
934
|
+
source: this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.fontSize,
|
|
935
|
+
threshold: 10,
|
|
936
|
+
fallback: 10
|
|
937
|
+
}), this.fontSizes.plotLabels = this.translateSize({
|
|
938
|
+
relator: this.width,
|
|
939
|
+
adjuster: 800,
|
|
940
|
+
source: this.FINAL_CONFIG.chart.labels.fontSize,
|
|
941
|
+
threshold: 10,
|
|
942
|
+
fallback: 10
|
|
943
|
+
}), this.plotRadii.plot = this.translateSize({
|
|
944
|
+
relator: this.width,
|
|
945
|
+
adjuster: 800,
|
|
946
|
+
source: this.FINAL_CONFIG.plot.radius,
|
|
947
|
+
threshold: 1,
|
|
948
|
+
fallback: 1
|
|
949
|
+
}), this.plotRadii.line = this.translateSize({
|
|
950
|
+
relator: this.width,
|
|
951
|
+
adjuster: 800,
|
|
952
|
+
source: this.FINAL_CONFIG.line.radius,
|
|
953
|
+
threshold: 1,
|
|
954
|
+
fallback: 1
|
|
955
|
+
});
|
|
956
|
+
},
|
|
957
|
+
toggleStack() {
|
|
958
|
+
this.mutableConfig.isStacked = !this.mutableConfig.isStacked, this.mutableConfig.isStacked ? this.mutableConfig.useIndividualScale = !0 : this.mutableConfig.useIndividualScale = this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale;
|
|
959
|
+
},
|
|
960
|
+
toggleTable() {
|
|
961
|
+
this.mutableConfig.showTable = !this.mutableConfig.showTable;
|
|
962
|
+
},
|
|
963
|
+
toggleLabels() {
|
|
964
|
+
this.mutableConfig.dataLabels.show = !this.mutableConfig.dataLabels.show;
|
|
965
|
+
},
|
|
966
|
+
toggleTooltip() {
|
|
967
|
+
this.mutableConfig.showTooltip = !this.mutableConfig.showTooltip;
|
|
968
|
+
},
|
|
969
|
+
checkAutoScaleError(t) {
|
|
970
|
+
t.autoScaling && (this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale || console.warn(`VueUiXy (datapoint: ${t.name}) : autoScaling only works when config.chart.grid.labels.yAxis.useIndividualScale is set to true`), this.FINAL_CONFIG.chart.grid.labels.yAxis.stacked || console.warn(`VueUiXy (datapoint: ${t.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`));
|
|
971
|
+
},
|
|
972
|
+
createArea(t) {
|
|
973
|
+
if (!t[0]) return [-10, -10, "", -10, -10];
|
|
974
|
+
const a = { x: t[0].x, y: this.zero }, o = { x: t.at(-1).x, y: this.zero }, u = [];
|
|
975
|
+
return t.forEach((l) => {
|
|
976
|
+
u.push(`${l.x},${l.y} `);
|
|
977
|
+
}), [a.x, a.y, ...u, o.x, o.y].toString();
|
|
978
|
+
},
|
|
979
|
+
createIndividualArea(t, a) {
|
|
980
|
+
if (!t[0]) return [-10, -10, "", -10, -10];
|
|
981
|
+
const o = { x: t[0] ? t[0].x : Math.min(...t.filter((e) => !!e).map((e) => e.x)), y: a }, u = { x: t.at(-1) ? t.at(-1).x : Math.min(...t.filter((e) => !!e).map((e) => e.x)), y: a }, l = [];
|
|
982
|
+
return t.filter((e) => !!e).forEach((e) => {
|
|
983
|
+
l.push(`${e.x},${e.y} `);
|
|
984
|
+
}), [o.x, o.y, ...l, u.x, u.y].toString();
|
|
985
|
+
},
|
|
986
|
+
createStar: q,
|
|
987
|
+
createPolygonPath: D,
|
|
988
|
+
fillArray(t, a) {
|
|
989
|
+
let o = Array(t).fill(0);
|
|
990
|
+
for (let u = 0; u < a.length && u < t; u += 1)
|
|
991
|
+
o[u] = a[u];
|
|
992
|
+
return o;
|
|
993
|
+
},
|
|
994
|
+
async setupSlicer() {
|
|
995
|
+
(this.FINAL_CONFIG.chart.zoom.startIndex !== null || this.FINAL_CONFIG.chart.zoom.endIndex !== null) && this.$refs.chartSlicer ? (this.FINAL_CONFIG.chart.zoom.startIndex !== null && (await this.$nextTick(), await this.$nextTick(), this.$refs.chartSlicer.setStartValue(this.FINAL_CONFIG.chart.zoom.startIndex)), this.FINAL_CONFIG.chart.zoom.endIndex !== null && (await this.$nextTick(), await this.$nextTick(), this.$refs.chartSlicer.setEndValue(this.validSlicerEnd(this.FINAL_CONFIG.chart.zoom.endIndex + 1)))) : (this.slicer = {
|
|
996
|
+
start: 0,
|
|
997
|
+
end: Math.max(...this.dataset.map((t) => this.largestTriangleThreeBucketsArray({ data: t.series, threshold: this.FINAL_CONFIG.downsample.threshold }).length))
|
|
998
|
+
}, this.slicerStep += 1);
|
|
999
|
+
},
|
|
1000
|
+
refreshSlicer() {
|
|
1001
|
+
this.setupSlicer();
|
|
1002
|
+
},
|
|
1003
|
+
validSlicerEnd(t) {
|
|
1004
|
+
const a = Math.max(...this.dataset.map((o) => this.largestTriangleThreeBucketsArray({ data: o.series, threshold: this.FINAL_CONFIG.downsample.threshold }).length));
|
|
1005
|
+
return t > a ? a : t < 0 || this.FINAL_CONFIG.chart.zoom.startIndex !== null && t < this.FINAL_CONFIG.chart.zoom.startIndex ? this.FINAL_CONFIG.chart.zoom.startIndex !== null ? this.FINAL_CONFIG.chart.zoom.startIndex + 1 : 1 : t;
|
|
1006
|
+
},
|
|
1007
|
+
calcRectHeight(t) {
|
|
1008
|
+
const a = ![null, void 0].includes(this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin) && this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin > 0 && this.min >= 0 ? this.drawingArea.bottom : this.zero;
|
|
1009
|
+
return t.value >= 0 ? this.checkNaN(a - t.y <= 0 ? 1e-5 : a - t.y) : this.checkNaN(t.y - this.zero <= 0 ? 1e-5 : t.y - this.zero);
|
|
1010
|
+
},
|
|
1011
|
+
calcIndividualHeight(t) {
|
|
1012
|
+
return t.value >= 0 ? this.checkNaN(t.zeroPosition - t.y <= 0 ? 1e-5 : t.zeroPosition - t.y) : this.checkNaN(t.y - t.zeroPosition <= 0 ? 1e-5 : t.zeroPosition - t.y);
|
|
1013
|
+
},
|
|
1014
|
+
calcRectWidth() {
|
|
1015
|
+
return this.mutableConfig.useIndividualScale && this.mutableConfig.isStacked ? this.slot.line - this.drawingArea.width / this.maxSeries * 0.1 : this.slot.bar;
|
|
1016
|
+
},
|
|
1017
|
+
calcRectX(t) {
|
|
1018
|
+
return this.mutableConfig.useIndividualScale && this.mutableConfig.isStacked ? t.x + this.drawingArea.width / this.maxSeries * 0.05 : t.x + this.slot.bar / 2;
|
|
1019
|
+
},
|
|
1020
|
+
calcRectY(t) {
|
|
1021
|
+
return t.value >= 0 ? t.y : this.zero;
|
|
1022
|
+
},
|
|
1023
|
+
calcIndividualRectY(t) {
|
|
1024
|
+
return t.value >= 0 ? t.y : [null, void 0, NaN, 1 / 0, -1 / 0].includes(t.zeroPosition) ? 0 : t.zeroPosition;
|
|
1025
|
+
},
|
|
1026
|
+
canShowValue(t) {
|
|
1027
|
+
return ![null, void 0, NaN, 1 / 0, -1 / 0].includes(t);
|
|
1028
|
+
},
|
|
1029
|
+
findClosestValue(t, a) {
|
|
1030
|
+
let o = a[0], u = Math.abs(t - a[0]);
|
|
1031
|
+
for (let l = 1; l < a.length; l += 1) {
|
|
1032
|
+
const e = Math.abs(t - a[l]);
|
|
1033
|
+
e < u && a[l] < t && (o = a[l], u = e);
|
|
1034
|
+
}
|
|
1035
|
+
return o;
|
|
1036
|
+
},
|
|
1037
|
+
ratioToMax(t) {
|
|
1038
|
+
return t / (this.canShowValue(this.absoluteMax) ? this.absoluteMax : 1);
|
|
1039
|
+
},
|
|
1040
|
+
selectX(t) {
|
|
1041
|
+
this.$emit(
|
|
1042
|
+
"selectX",
|
|
1043
|
+
{
|
|
1044
|
+
dataset: this.relativeDataset.map((a) => ({
|
|
1045
|
+
name: a.name,
|
|
1046
|
+
value: [null, void 0, NaN].includes(a.absoluteValues[t]) ? null : a.absoluteValues[t],
|
|
1047
|
+
color: a.color,
|
|
1048
|
+
type: a.type
|
|
1049
|
+
})),
|
|
1050
|
+
index: t,
|
|
1051
|
+
indexLabel: this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[t]
|
|
1052
|
+
}
|
|
1053
|
+
);
|
|
1054
|
+
},
|
|
1055
|
+
getData() {
|
|
1056
|
+
return this.absoluteDataset.map((t) => ({
|
|
1057
|
+
values: t.absoluteValues,
|
|
1058
|
+
color: t.color,
|
|
1059
|
+
name: t.name,
|
|
1060
|
+
type: t.type
|
|
1061
|
+
}));
|
|
1062
|
+
},
|
|
1063
|
+
segregate(t) {
|
|
1064
|
+
if (this.segregatedSeries.includes(t.id))
|
|
1065
|
+
this.segregatedSeries = this.segregatedSeries.filter((a) => a !== t.id);
|
|
1066
|
+
else {
|
|
1067
|
+
if (this.segregatedSeries.length + 1 === this.safeDataset.length) return;
|
|
1068
|
+
this.segregatedSeries.push(t.id);
|
|
1069
|
+
}
|
|
1070
|
+
this.$emit("selectLegend", this.relativeDataset.map((a) => ({
|
|
1071
|
+
name: a.name,
|
|
1072
|
+
values: a.absoluteValues,
|
|
1073
|
+
color: a.color,
|
|
1074
|
+
type: a.type
|
|
1075
|
+
}))), this.segregateStep += 1;
|
|
1076
|
+
},
|
|
1077
|
+
toggleTooltipVisibility(t, a = null) {
|
|
1078
|
+
this.isTooltip = t, t ? this.selectedSerieIndex = a : this.selectedSerieIndex = null;
|
|
1079
|
+
},
|
|
1080
|
+
toggleFullscreen(t) {
|
|
1081
|
+
this.isFullscreen = t, this.step += 1;
|
|
1082
|
+
},
|
|
1083
|
+
showSpinnerPdf() {
|
|
1084
|
+
this.isPrinting = !0;
|
|
1085
|
+
},
|
|
1086
|
+
async generatePdf() {
|
|
1087
|
+
this.showSpinnerPdf(), clearTimeout(this.__to__), this.isPrinting = !0, this.__to__ = setTimeout(async () => {
|
|
1088
|
+
try {
|
|
1089
|
+
const { default: t } = await import("./pdf-DVWl3Adn.js");
|
|
1090
|
+
await t({
|
|
1091
|
+
domElement: document.getElementById(`vue-ui-xy_${this.uniqueId}`),
|
|
1092
|
+
fileName: this.FINAL_CONFIG.chart.title.text || "vue-ui-xy"
|
|
1093
|
+
});
|
|
1094
|
+
} catch (t) {
|
|
1095
|
+
console.error("Error generating PDF:", t);
|
|
1096
|
+
} finally {
|
|
1097
|
+
this.isPrinting = !1;
|
|
1098
|
+
}
|
|
1099
|
+
}, 100);
|
|
1100
|
+
},
|
|
1101
|
+
generateCsv() {
|
|
1102
|
+
const t = [[this.FINAL_CONFIG.chart.title.text], [this.FINAL_CONFIG.chart.title.subtitle.text], [""]], a = ["", ...this.table.head.map((e) => e.label)], o = this.table.body, u = t.concat([a]).concat(o), l = this.createCsvContent(u);
|
|
1103
|
+
this.downloadCsv({ csvContent: l, title: this.FINAL_CONFIG.chart.title.text || "vue-ui-xy" });
|
|
1104
|
+
},
|
|
1105
|
+
showSpinnerImage() {
|
|
1106
|
+
this.isImaging = !0;
|
|
1107
|
+
},
|
|
1108
|
+
async generateImage() {
|
|
1109
|
+
this.showSpinnerImage(), clearTimeout(this.__to__), this.isImaging = !0, this.__to__ = setTimeout(async () => {
|
|
1110
|
+
try {
|
|
1111
|
+
const { default: t } = await import("./img-itj0Vdmx.js");
|
|
1112
|
+
await t({
|
|
1113
|
+
domElement: document.getElementById(`vue-ui-xy_${this.uniqueId}`),
|
|
1114
|
+
fileName: this.FINAL_CONFIG.chart.title.text || "vue-ui-xy",
|
|
1115
|
+
format: "png"
|
|
1116
|
+
});
|
|
1117
|
+
} catch (t) {
|
|
1118
|
+
console.error("Error generating image:", t);
|
|
1119
|
+
} finally {
|
|
1120
|
+
this.isImaging = !1;
|
|
1121
|
+
}
|
|
1122
|
+
}, 100);
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
}, Ke = ["id"], Qe = {
|
|
1126
|
+
key: 1,
|
|
1127
|
+
ref: "noTitle",
|
|
1128
|
+
class: "vue-data-ui-no-title-space",
|
|
1129
|
+
style: "height:36px; width: 100%; background:transparent"
|
|
1130
|
+
}, je = ["viewBox", "aria-label"], $e = ["x", "y", "width", "height"], et = { key: 1 }, tt = { class: "vue-ui-xy-grid" }, lt = ["stroke", "x1", "x2", "y1", "y2"], rt = ["stroke", "x1", "x2", "y1", "y2"], it = { key: 1 }, at = ["x1", "x2", "y1", "y2", "stroke"], st = ["x1", "x2", "y1", "y2", "stroke"], nt = ["x1", "x2", "y1", "y2", "stroke"], ct = { key: 3 }, ot = ["x1", "x2", "y1", "y2", "stroke"], ht = ["id"], ut = ["stop-color"], dt = ["stop-color"], gt = ["stop-color"], ft = ["id"], It = ["stop-color"], mt = ["stop-color"], bt = ["stop-color"], Nt = ["id"], xt = ["stop-color"], Ft = ["stop-color"], _t = ["id"], At = ["stop-color"], yt = ["stop-color"], Lt = ["id"], Ct = ["stop-color"], St = ["stop-color"], kt = ["x", "y", "height", "width", "fill"], wt = ["x", "y", "width"], Ot = ["x", "y", "height", "width", "fill"], Gt = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], vt = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], pt = ["width", "x", "y"], zt = { key: 0 }, Mt = ["id"], Tt = ["fill"], Pt = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], Vt = ["x", "y", "font-size", "fill"], Rt = ["stroke", "x1", "x2", "y1", "y2"], Dt = { key: 2 }, Ht = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Wt = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray"], Bt = { key: 4 }, Et = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Yt = ["fill", "font-size", "transform"], qt = ["x1", "x2", "y1", "y2", "stroke"], Xt = ["x", "y", "font-size", "fill"], Ut = ["x1", "x2", "y1", "y2", "stroke"], Zt = ["x", "y", "font-size", "fill"], Jt = ["width", "x", "y"], Kt = { style: { width: "100%" } }, Qt = { key: 0 }, jt = ["id"], $t = ["fill"], el = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], tl = ["x", "y", "font-size", "fill"], ll = ["d", "stroke", "stroke-width", "stroke-dasharray"], rl = ["d", "stroke", "stroke-width", "stroke-dasharray"], il = { key: 5 }, al = { key: 0 }, sl = ["d", "fill"], nl = ["d", "fill"], cl = ["d", "fill"], ol = ["d", "fill"], hl = ["d", "stroke", "stroke-width", "stroke-dasharray"], ul = ["d", "stroke", "stroke-width", "stroke-dasharray"], dl = ["width", "x", "y"], gl = { style: { width: "100%" } }, fl = { key: 3 }, Il = ["id"], ml = ["fill"], bl = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], Nl = ["x", "y", "font-size", "fill"], xl = { key: 6 }, Fl = ["x", "y", "font-size", "fill"], _l = ["x", "y", "font-size", "fill", "font-weight"], Al = { key: 7 }, yl = ["x", "y", "font-size", "fill"], Ll = ["x", "y"], Cl = ["x", "y"], Sl = { key: 8 }, kl = ["x", "y", "font-size", "fill"], wl = ["x", "y"], Ol = ["x", "y"], Gl = ["x", "y", "font-size", "fill", "innerHTML"], vl = ["x", "y", "font-size", "fill", "innerHTML"], pl = ["x", "y", "font-size", "fill", "innerHTML"], zl = ["x", "y", "font-size", "fill", "innerHTML"], Ml = ["id"], Tl = ["stop-color"], Pl = ["stop-color"], Vl = ["x", "y", "width", "height", "fill", "onMouseenter"], Rl = ["font-size", "fill", "transform"], Dl = ["x", "y", "font-size", "fill"], Hl = { key: 10 }, Wl = ["text-anchor", "font-size", "fill", "transform", "onClick"], Bl = ["x", "y", "height", "width", "onMouseenter", "onClick"], El = {
|
|
1131
|
+
key: 11,
|
|
1132
|
+
style: { "pointer-events": "none" }
|
|
1133
|
+
}, Yl = ["x", "y"], ql = ["cx", "cy", "r", "fill"], Xl = {
|
|
1134
|
+
key: 5,
|
|
1135
|
+
class: "vue-data-ui-watermark"
|
|
1136
|
+
}, Ul = ["onClick"], Zl = {
|
|
1137
|
+
key: 0,
|
|
1138
|
+
viewBox: "0 0 20 12",
|
|
1139
|
+
height: "14",
|
|
1140
|
+
width: "20"
|
|
1141
|
+
}, Jl = ["stroke", "fill"], Kl = {
|
|
1142
|
+
key: 1,
|
|
1143
|
+
viewBox: "0 0 40 40",
|
|
1144
|
+
height: "14",
|
|
1145
|
+
width: "14"
|
|
1146
|
+
}, Ql = ["fill"], jl = ["fill"], $l = {
|
|
1147
|
+
key: 2,
|
|
1148
|
+
viewBox: "0 0 12 12",
|
|
1149
|
+
height: "14",
|
|
1150
|
+
width: "14"
|
|
1151
|
+
}, er = {
|
|
1152
|
+
key: 9,
|
|
1153
|
+
ref: "chartLegend"
|
|
1154
|
+
}, tr = {
|
|
1155
|
+
key: 10,
|
|
1156
|
+
ref: "source",
|
|
1157
|
+
dir: "auto"
|
|
1158
|
+
}, lr = {
|
|
1159
|
+
style: { display: "flex", "flex-direction": "row", gap: "6px", "align-items": "center", "padding-left": "6px" },
|
|
1160
|
+
"data-html2canvas-ignore": ""
|
|
1161
|
+
}, rr = ["innerHTML"];
|
|
1162
|
+
function ir(t, a, o, u, l, e) {
|
|
1163
|
+
const A = R("PenAndPaper"), b = R("Title"), I = R("UserOptions"), y = R("PackageVersion"), v = R("Shape"), O = R("Skeleton"), p = R("Slicer"), G = R("Tooltip"), N = R("BaseIcon"), L = R("TableSparkline"), z = R("DataTable"), V = R("Accordion");
|
|
1164
|
+
return i(), s("div", {
|
|
1165
|
+
id: `vue-ui-xy_${l.uniqueId}`,
|
|
1166
|
+
class: W(`vue-ui-xy ${l.isFullscreen ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.FINAL_CONFIG.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
1167
|
+
ref: "chart",
|
|
1168
|
+
style: F(`background:${e.FINAL_CONFIG.chart.backgroundColor}; color:${e.FINAL_CONFIG.chart.color};width:100%;font-family:${e.FINAL_CONFIG.chart.fontFamily};${e.FINAL_CONFIG.responsive ? "height: 100%" : ""}`),
|
|
1169
|
+
onMouseenter: a[7] || (a[7] = () => e.setUserOptionsVisibility(!0)),
|
|
1170
|
+
onMouseleave: a[8] || (a[8] = () => e.setUserOptionsVisibility(!1))
|
|
1171
|
+
}, [
|
|
1172
|
+
e.FINAL_CONFIG.chart.userOptions.buttons.annotator ? (i(), H(A, {
|
|
1173
|
+
key: 0,
|
|
1174
|
+
svgRef: l.svgRef,
|
|
1175
|
+
backgroundColor: e.FINAL_CONFIG.chart.backgroundColor,
|
|
1176
|
+
color: e.FINAL_CONFIG.chart.color,
|
|
1177
|
+
active: l.isAnnotator,
|
|
1178
|
+
onClose: e.toggleAnnotator
|
|
1179
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active", "onClose"])) : h("", !0),
|
|
1180
|
+
e.hasOptionsNoTitle ? (i(), s("div", Qe, null, 512)) : h("", !0),
|
|
1181
|
+
e.FINAL_CONFIG.chart.title.show ? (i(), s("div", {
|
|
1182
|
+
key: 2,
|
|
1183
|
+
ref: "chartTitle",
|
|
1184
|
+
class: "vue-ui-xy-title",
|
|
1185
|
+
style: F(`font-family:${e.FINAL_CONFIG.chart.fontFamily}`)
|
|
1186
|
+
}, [
|
|
1187
|
+
(i(), H(b, {
|
|
1188
|
+
key: `title_${l.titleStep}`,
|
|
1189
|
+
config: {
|
|
1190
|
+
title: {
|
|
1191
|
+
cy: "xy-div-title",
|
|
1192
|
+
...e.FINAL_CONFIG.chart.title
|
|
1193
|
+
},
|
|
1194
|
+
subtitle: {
|
|
1195
|
+
cy: "xy-div-subtitle",
|
|
1196
|
+
...e.FINAL_CONFIG.chart.title.subtitle
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
}, null, 8, ["config"]))
|
|
1200
|
+
], 4)) : h("", !0),
|
|
1201
|
+
e.FINAL_CONFIG.chart.userOptions.show && e.isDataset && (l.keepUserOptionState || l.userOptionsVisible) ? (i(), H(I, {
|
|
1202
|
+
ref: "defails",
|
|
1203
|
+
key: `user_options_${l.step}`,
|
|
1204
|
+
backgroundColor: e.FINAL_CONFIG.chart.backgroundColor,
|
|
1205
|
+
color: e.FINAL_CONFIG.chart.color,
|
|
1206
|
+
isPrinting: l.isPrinting,
|
|
1207
|
+
isImaging: l.isImaging,
|
|
1208
|
+
uid: l.uniqueId,
|
|
1209
|
+
hasTooltip: e.FINAL_CONFIG.chart.userOptions.buttons.tooltip && e.FINAL_CONFIG.chart.tooltip.show,
|
|
1210
|
+
hasPdf: e.FINAL_CONFIG.chart.userOptions.buttons.pdf,
|
|
1211
|
+
hasXls: e.FINAL_CONFIG.chart.userOptions.buttons.csv,
|
|
1212
|
+
hasImg: e.FINAL_CONFIG.chart.userOptions.buttons.img,
|
|
1213
|
+
hasLabel: e.FINAL_CONFIG.chart.userOptions.buttons.labels,
|
|
1214
|
+
hasTable: e.FINAL_CONFIG.chart.userOptions.buttons.table,
|
|
1215
|
+
hasStack: o.dataset.length > 1 && e.FINAL_CONFIG.chart.userOptions.buttons.stack,
|
|
1216
|
+
hasFullscreen: e.FINAL_CONFIG.chart.userOptions.buttons.fullscreen,
|
|
1217
|
+
isStacked: l.mutableConfig.isStacked,
|
|
1218
|
+
isFullscreen: l.isFullscreen,
|
|
1219
|
+
chartElement: t.$refs.chart,
|
|
1220
|
+
position: e.FINAL_CONFIG.chart.userOptions.position,
|
|
1221
|
+
isTooltip: l.mutableConfig.showTooltip,
|
|
1222
|
+
titles: { ...e.FINAL_CONFIG.chart.userOptions.buttonTitles },
|
|
1223
|
+
hasAnnotator: e.FINAL_CONFIG.chart.userOptions.buttons.annotator,
|
|
1224
|
+
isAnnotation: l.isAnnotator,
|
|
1225
|
+
onToggleFullscreen: e.toggleFullscreen,
|
|
1226
|
+
onGeneratePdf: e.generatePdf,
|
|
1227
|
+
onGenerateCsv: e.generateCsv,
|
|
1228
|
+
onGenerateImage: e.generateImage,
|
|
1229
|
+
onToggleTable: e.toggleTable,
|
|
1230
|
+
onToggleLabels: e.toggleLabels,
|
|
1231
|
+
onToggleStack: e.toggleStack,
|
|
1232
|
+
onToggleTooltip: e.toggleTooltip,
|
|
1233
|
+
onToggleAnnotator: e.toggleAnnotator,
|
|
1234
|
+
style: F({
|
|
1235
|
+
visibility: l.keepUserOptionState ? l.userOptionsVisible ? "visible" : "hidden" : "visible"
|
|
1236
|
+
})
|
|
1237
|
+
}, Ye({ _: 2 }, [
|
|
1238
|
+
t.$slots.menuIcon ? {
|
|
1239
|
+
name: "menuIcon",
|
|
1240
|
+
fn: P(({ isOpen: r, color: c }) => [
|
|
1241
|
+
S(t.$slots, "menuIcon", B(E({ isOpen: r, color: c })), void 0, !0)
|
|
1242
|
+
]),
|
|
1243
|
+
key: "0"
|
|
1244
|
+
} : void 0,
|
|
1245
|
+
t.$slots.optionTooltip ? {
|
|
1246
|
+
name: "optionTooltip",
|
|
1247
|
+
fn: P(() => [
|
|
1248
|
+
S(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
1249
|
+
]),
|
|
1250
|
+
key: "1"
|
|
1251
|
+
} : void 0,
|
|
1252
|
+
t.$slots.optionPdf ? {
|
|
1253
|
+
name: "optionPdf",
|
|
1254
|
+
fn: P(() => [
|
|
1255
|
+
S(t.$slots, "optionPdf", {}, void 0, !0)
|
|
1256
|
+
]),
|
|
1257
|
+
key: "2"
|
|
1258
|
+
} : void 0,
|
|
1259
|
+
t.$slots.optionCsv ? {
|
|
1260
|
+
name: "optionCsv",
|
|
1261
|
+
fn: P(() => [
|
|
1262
|
+
S(t.$slots, "optionCsv", {}, void 0, !0)
|
|
1263
|
+
]),
|
|
1264
|
+
key: "3"
|
|
1265
|
+
} : void 0,
|
|
1266
|
+
t.$slots.optionImg ? {
|
|
1267
|
+
name: "optionImg",
|
|
1268
|
+
fn: P(() => [
|
|
1269
|
+
S(t.$slots, "optionImg", {}, void 0, !0)
|
|
1270
|
+
]),
|
|
1271
|
+
key: "4"
|
|
1272
|
+
} : void 0,
|
|
1273
|
+
t.$slots.optionTable ? {
|
|
1274
|
+
name: "optionTable",
|
|
1275
|
+
fn: P(() => [
|
|
1276
|
+
S(t.$slots, "optionTable", {}, void 0, !0)
|
|
1277
|
+
]),
|
|
1278
|
+
key: "5"
|
|
1279
|
+
} : void 0,
|
|
1280
|
+
t.$slots.optionLabels ? {
|
|
1281
|
+
name: "optionLabels",
|
|
1282
|
+
fn: P(() => [
|
|
1283
|
+
S(t.$slots, "optionLabels", {}, void 0, !0)
|
|
1284
|
+
]),
|
|
1285
|
+
key: "6"
|
|
1286
|
+
} : void 0,
|
|
1287
|
+
t.$slots.optionStack ? {
|
|
1288
|
+
name: "optionStack",
|
|
1289
|
+
fn: P(() => [
|
|
1290
|
+
S(t.$slots, "optionStack", {}, void 0, !0)
|
|
1291
|
+
]),
|
|
1292
|
+
key: "7"
|
|
1293
|
+
} : void 0,
|
|
1294
|
+
t.$slots.optionFullscreen ? {
|
|
1295
|
+
name: "optionFullscreen",
|
|
1296
|
+
fn: P(({ toggleFullscreen: r, isFullscreen: c }) => [
|
|
1297
|
+
S(t.$slots, "optionFullscreen", B(E({ toggleFullscreen: r, isFullscreen: c })), void 0, !0)
|
|
1298
|
+
]),
|
|
1299
|
+
key: "8"
|
|
1300
|
+
} : void 0,
|
|
1301
|
+
t.$slots.optionAnnotator ? {
|
|
1302
|
+
name: "optionAnnotator",
|
|
1303
|
+
fn: P(({ toggleAnnotator: r, isAnnotator: c }) => [
|
|
1304
|
+
S(t.$slots, "optionAnnotator", B(E({ toggleAnnotator: r, isAnnotator: c })), void 0, !0)
|
|
1305
|
+
]),
|
|
1306
|
+
key: "9"
|
|
1307
|
+
} : void 0
|
|
1308
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasLabel", "hasTable", "hasStack", "hasFullscreen", "isStacked", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "onToggleFullscreen", "onGeneratePdf", "onGenerateCsv", "onGenerateImage", "onToggleTable", "onToggleLabels", "onToggleStack", "onToggleTooltip", "onToggleAnnotator", "style"])) : h("", !0),
|
|
1309
|
+
e.isDataset ? (i(), s("svg", {
|
|
1310
|
+
key: 4,
|
|
1311
|
+
ref: "svgRef",
|
|
1312
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1313
|
+
class: W([{ "vue-data-ui-fullscreen--on": l.isFullscreen, "vue-data-ui-fulscreen--off": !l.isFullscreen }, "vue-ui-xy-svg"]),
|
|
1314
|
+
width: "100%",
|
|
1315
|
+
viewBox: l.viewBox,
|
|
1316
|
+
style: F(`background: transparent; color:${e.FINAL_CONFIG.chart.color}; font-family:${e.FINAL_CONFIG.chart.fontFamily}`),
|
|
1317
|
+
"aria-label": e.chartAriaLabel,
|
|
1318
|
+
role: "img",
|
|
1319
|
+
"aria-live": "polite"
|
|
1320
|
+
}, [
|
|
1321
|
+
Y(y),
|
|
1322
|
+
t.$slots["chart-background"] ? (i(), s("foreignObject", {
|
|
1323
|
+
key: 0,
|
|
1324
|
+
x: e.drawingArea.left + e.xPadding < 0 ? 0 : e.drawingArea.left + e.xPadding,
|
|
1325
|
+
y: e.drawingArea.top,
|
|
1326
|
+
width: e.drawingArea.width - (e.FINAL_CONFIG.chart.grid.position === "middle" ? 0 : e.drawingArea.width / e.maxSeries) < 0 ? 0 : e.drawingArea.width - (e.FINAL_CONFIG.chart.grid.position === "middle" ? 0 : e.drawingArea.width / e.maxSeries),
|
|
1327
|
+
height: e.drawingArea.height < 0 ? 0 : e.drawingArea.height,
|
|
1328
|
+
style: {
|
|
1329
|
+
pointerEvents: "none"
|
|
1330
|
+
}
|
|
1331
|
+
}, [
|
|
1332
|
+
S(t.$slots, "chart-background", {}, void 0, !0)
|
|
1333
|
+
], 8, $e)) : h("", !0),
|
|
1334
|
+
e.maxSeries > 0 ? (i(), s("g", et, [
|
|
1335
|
+
d("g", tt, [
|
|
1336
|
+
e.FINAL_CONFIG.chart.grid.labels.xAxis.showBaseline ? (i(), s("line", {
|
|
1337
|
+
key: 0,
|
|
1338
|
+
stroke: e.FINAL_CONFIG.chart.grid.stroke,
|
|
1339
|
+
"stroke-width": "1",
|
|
1340
|
+
x1: e.drawingArea.left + e.xPadding,
|
|
1341
|
+
x2: e.drawingArea.right - e.xPadding,
|
|
1342
|
+
y1: e.forceValidValue(e.drawingArea.bottom),
|
|
1343
|
+
y2: e.forceValidValue(e.drawingArea.bottom),
|
|
1344
|
+
"stroke-linecap": "round"
|
|
1345
|
+
}, null, 8, lt)) : h("", !0),
|
|
1346
|
+
l.mutableConfig.useIndividualScale ? e.FINAL_CONFIG.chart.grid.showHorizontalLines ? (i(!0), s(g, { key: 2 }, m(e.allScales, (r) => (i(), s("g", null, [
|
|
1347
|
+
r.id === l.selectedScale && r.yLabels.length ? (i(!0), s(g, { key: 0 }, m(r.yLabels, (c) => (i(), s("line", {
|
|
1348
|
+
x1: e.drawingArea.left + e.xPadding,
|
|
1349
|
+
x2: e.drawingArea.right - e.xPadding,
|
|
1350
|
+
y1: e.forceValidValue(c.y),
|
|
1351
|
+
y2: e.forceValidValue(c.y),
|
|
1352
|
+
stroke: r.color,
|
|
1353
|
+
"stroke-width": 0.5,
|
|
1354
|
+
"stroke-linecap": "round"
|
|
1355
|
+
}, null, 8, st))), 256)) : r.yLabels.length ? (i(!0), s(g, { key: 1 }, m(r.yLabels, (c) => (i(), s("line", {
|
|
1356
|
+
x1: e.drawingArea.left + e.xPadding,
|
|
1357
|
+
x2: e.drawingArea.right - e.xPadding,
|
|
1358
|
+
y1: e.forceValidValue(c.y),
|
|
1359
|
+
y2: e.forceValidValue(c.y),
|
|
1360
|
+
stroke: e.FINAL_CONFIG.chart.grid.stroke,
|
|
1361
|
+
"stroke-width": 0.5,
|
|
1362
|
+
"stroke-linecap": "round"
|
|
1363
|
+
}, null, 8, nt))), 256)) : h("", !0)
|
|
1364
|
+
]))), 256)) : h("", !0) : (i(), s(g, { key: 1 }, [
|
|
1365
|
+
e.FINAL_CONFIG.chart.grid.labels.yAxis.showBaseline ? (i(), s("line", {
|
|
1366
|
+
key: 0,
|
|
1367
|
+
stroke: e.FINAL_CONFIG.chart.grid.stroke,
|
|
1368
|
+
"stroke-width": "1",
|
|
1369
|
+
x1: e.drawingArea.left + e.xPadding,
|
|
1370
|
+
x2: e.drawingArea.left + e.xPadding,
|
|
1371
|
+
y1: e.forceValidValue(e.drawingArea.top),
|
|
1372
|
+
y2: e.forceValidValue(e.drawingArea.bottom),
|
|
1373
|
+
"stroke-linecap": "round"
|
|
1374
|
+
}, null, 8, rt)) : h("", !0),
|
|
1375
|
+
e.FINAL_CONFIG.chart.grid.showHorizontalLines ? (i(), s("g", it, [
|
|
1376
|
+
(i(!0), s(g, null, m(e.yLabels, (r) => (i(), s("line", {
|
|
1377
|
+
x1: e.drawingArea.left + e.xPadding,
|
|
1378
|
+
x2: e.drawingArea.right - e.xPadding,
|
|
1379
|
+
y1: e.forceValidValue(r.y),
|
|
1380
|
+
y2: e.forceValidValue(r.y),
|
|
1381
|
+
stroke: e.FINAL_CONFIG.chart.grid.stroke,
|
|
1382
|
+
"stroke-width": 0.5,
|
|
1383
|
+
"stroke-linecap": "round"
|
|
1384
|
+
}, null, 8, at))), 256))
|
|
1385
|
+
])) : h("", !0)
|
|
1386
|
+
], 64)),
|
|
1387
|
+
e.FINAL_CONFIG.chart.grid.showVerticalLines ? (i(), s("g", ct, [
|
|
1388
|
+
(i(!0), s(g, null, m(e.maxSeries + (e.FINAL_CONFIG.chart.grid.position === "middle" ? 1 : 0), (r, c) => (i(), s("line", {
|
|
1389
|
+
key: `grid_vertical_line_${c}`,
|
|
1390
|
+
x1: e.drawingArea.width / e.maxSeries * c + e.drawingArea.left + e.xPadding,
|
|
1391
|
+
x2: e.drawingArea.width / e.maxSeries * c + e.drawingArea.left + e.xPadding,
|
|
1392
|
+
y1: e.forceValidValue(e.drawingArea.top),
|
|
1393
|
+
y2: e.forceValidValue(e.drawingArea.bottom),
|
|
1394
|
+
"stroke-width": "0.5",
|
|
1395
|
+
stroke: e.FINAL_CONFIG.chart.grid.stroke
|
|
1396
|
+
}, null, 8, ot))), 128))
|
|
1397
|
+
])) : h("", !0)
|
|
1398
|
+
]),
|
|
1399
|
+
(i(!0), s(g, null, m(e.barSet, (r, c) => (i(), s("defs", {
|
|
1400
|
+
key: `def_rect_${c}`
|
|
1401
|
+
}, [
|
|
1402
|
+
d("linearGradient", {
|
|
1403
|
+
id: `rectGradient_pos_${c}_${l.uniqueId}`,
|
|
1404
|
+
x2: "0%",
|
|
1405
|
+
y2: "100%"
|
|
1406
|
+
}, [
|
|
1407
|
+
d("stop", {
|
|
1408
|
+
offset: "0%",
|
|
1409
|
+
"stop-color": r.color
|
|
1410
|
+
}, null, 8, ut),
|
|
1411
|
+
d("stop", {
|
|
1412
|
+
offset: "62%",
|
|
1413
|
+
"stop-color": `${e.shiftHue(r.color, 0.02)}`
|
|
1414
|
+
}, null, 8, dt),
|
|
1415
|
+
d("stop", {
|
|
1416
|
+
offset: "100%",
|
|
1417
|
+
"stop-color": `${e.shiftHue(r.color, 0.05)}`
|
|
1418
|
+
}, null, 8, gt)
|
|
1419
|
+
], 8, ht),
|
|
1420
|
+
d("linearGradient", {
|
|
1421
|
+
id: `rectGradient_neg_${c}_${l.uniqueId}`,
|
|
1422
|
+
x2: "0%",
|
|
1423
|
+
y2: "100%"
|
|
1424
|
+
}, [
|
|
1425
|
+
d("stop", {
|
|
1426
|
+
offset: "0%",
|
|
1427
|
+
"stop-color": `${e.shiftHue(r.color, 0.05)}`
|
|
1428
|
+
}, null, 8, It),
|
|
1429
|
+
d("stop", {
|
|
1430
|
+
offset: "38%",
|
|
1431
|
+
"stop-color": `${e.shiftHue(r.color, 0.02)}`
|
|
1432
|
+
}, null, 8, mt),
|
|
1433
|
+
d("stop", {
|
|
1434
|
+
offset: "100%",
|
|
1435
|
+
"stop-color": r.color
|
|
1436
|
+
}, null, 8, bt)
|
|
1437
|
+
], 8, ft)
|
|
1438
|
+
]))), 128)),
|
|
1439
|
+
(i(!0), s(g, null, m(e.plotSet, (r, c) => (i(), s("defs", {
|
|
1440
|
+
key: `def_plot_${c}`
|
|
1441
|
+
}, [
|
|
1442
|
+
d("radialGradient", {
|
|
1443
|
+
id: `plotGradient_${c}_${l.uniqueId}`,
|
|
1444
|
+
cx: "50%",
|
|
1445
|
+
cy: "50%",
|
|
1446
|
+
r: "50%",
|
|
1447
|
+
fx: "50%",
|
|
1448
|
+
fy: "50%"
|
|
1449
|
+
}, [
|
|
1450
|
+
d("stop", {
|
|
1451
|
+
offset: "0%",
|
|
1452
|
+
"stop-color": `${e.shiftHue(r.color, 0.05)}`
|
|
1453
|
+
}, null, 8, xt),
|
|
1454
|
+
d("stop", {
|
|
1455
|
+
offset: "100%",
|
|
1456
|
+
"stop-color": r.color
|
|
1457
|
+
}, null, 8, Ft)
|
|
1458
|
+
], 8, Nt)
|
|
1459
|
+
]))), 128)),
|
|
1460
|
+
(i(!0), s(g, null, m(e.lineSet, (r, c) => (i(), s("defs", {
|
|
1461
|
+
key: `def_line_${c}`
|
|
1462
|
+
}, [
|
|
1463
|
+
d("radialGradient", {
|
|
1464
|
+
id: `lineGradient_${c}_${l.uniqueId}`,
|
|
1465
|
+
cx: "50%",
|
|
1466
|
+
cy: "50%",
|
|
1467
|
+
r: "50%",
|
|
1468
|
+
fx: "50%",
|
|
1469
|
+
fy: "50%"
|
|
1470
|
+
}, [
|
|
1471
|
+
d("stop", {
|
|
1472
|
+
offset: "0%",
|
|
1473
|
+
"stop-color": `${e.shiftHue(r.color, 0.05)}`
|
|
1474
|
+
}, null, 8, At),
|
|
1475
|
+
d("stop", {
|
|
1476
|
+
offset: "100%",
|
|
1477
|
+
"stop-color": r.color
|
|
1478
|
+
}, null, 8, yt)
|
|
1479
|
+
], 8, _t),
|
|
1480
|
+
d("linearGradient", {
|
|
1481
|
+
id: `areaGradient_${c}_${l.uniqueId}`,
|
|
1482
|
+
x1: "0%",
|
|
1483
|
+
x2: "100%",
|
|
1484
|
+
y1: "0%",
|
|
1485
|
+
y2: "0%"
|
|
1486
|
+
}, [
|
|
1487
|
+
d("stop", {
|
|
1488
|
+
offset: "0%",
|
|
1489
|
+
"stop-color": `${e.setOpacity(e.shiftHue(r.color, 0.03), e.FINAL_CONFIG.line.area.opacity)}`
|
|
1490
|
+
}, null, 8, Ct),
|
|
1491
|
+
d("stop", {
|
|
1492
|
+
offset: "100%",
|
|
1493
|
+
"stop-color": `${e.setOpacity(r.color, e.FINAL_CONFIG.line.area.opacity)}`
|
|
1494
|
+
}, null, 8, St)
|
|
1495
|
+
], 8, Lt)
|
|
1496
|
+
]))), 128)),
|
|
1497
|
+
(i(!0), s(g, null, m(e.highlightAreas, (r) => (i(), s("g", null, [
|
|
1498
|
+
r.show ? (i(!0), s(g, { key: 0 }, m(r.span, (c, n) => (i(), s("g", null, [
|
|
1499
|
+
d("rect", {
|
|
1500
|
+
style: F({
|
|
1501
|
+
transition: "none",
|
|
1502
|
+
opacity: r.from + n >= l.slicer.start && r.from + n <= l.slicer.end - 1 ? 1 : 0
|
|
1503
|
+
}),
|
|
1504
|
+
x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * (r.from + n - l.slicer.start),
|
|
1505
|
+
y: e.drawingArea.top,
|
|
1506
|
+
height: e.drawingArea.height < 0 ? 10 : e.drawingArea.height,
|
|
1507
|
+
width: e.drawingArea.width / e.maxSeries < 0 ? 1e-5 : e.drawingArea.width / e.maxSeries,
|
|
1508
|
+
fill: e.setOpacity(r.color, r.opacity)
|
|
1509
|
+
}, null, 12, kt),
|
|
1510
|
+
r.caption.text && n === 0 ? (i(), s("foreignObject", {
|
|
1511
|
+
key: 0,
|
|
1512
|
+
x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * (r.from + n - l.slicer.start) - (r.caption.width === "auto" ? 0 : r.caption.width / 2 - e.drawingArea.width / e.maxSeries * r.span / 2),
|
|
1513
|
+
y: e.drawingArea.top + r.caption.offsetY,
|
|
1514
|
+
style: F({
|
|
1515
|
+
overflow: "visible",
|
|
1516
|
+
opacity: r.to >= l.slicer.start && r.from < l.slicer.end ? 1 : 0
|
|
1517
|
+
}),
|
|
1518
|
+
height: "1",
|
|
1519
|
+
width: r.caption.width === "auto" ? e.drawingArea.width / e.maxSeries * r.span : r.caption.width
|
|
1520
|
+
}, [
|
|
1521
|
+
d("div", {
|
|
1522
|
+
style: F(`padding:${r.caption.padding}px;text-align:${r.caption.textAlign};font-size:${r.caption.fontSize}px;color:${r.caption.color};font-weight:${r.caption.bold ? "bold" : "normal"}`)
|
|
1523
|
+
}, w(r.caption.text), 5)
|
|
1524
|
+
], 12, wt)) : h("", !0)
|
|
1525
|
+
]))), 256)) : h("", !0)
|
|
1526
|
+
]))), 256)),
|
|
1527
|
+
d("g", null, [
|
|
1528
|
+
(i(!0), s(g, null, m(e.maxSeries, (r, c) => (i(), s("g", {
|
|
1529
|
+
key: `tooltip_trap_highlighter_${c}`
|
|
1530
|
+
}, [
|
|
1531
|
+
d("rect", {
|
|
1532
|
+
x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * c,
|
|
1533
|
+
y: e.drawingArea.top,
|
|
1534
|
+
height: e.drawingArea.height < 0 ? 10 : e.drawingArea.height,
|
|
1535
|
+
width: e.drawingArea.width / e.maxSeries < 0 ? 1e-5 : e.drawingArea.width / e.maxSeries,
|
|
1536
|
+
fill: [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(c) ? e.setOpacity(e.FINAL_CONFIG.chart.highlighter.color, e.FINAL_CONFIG.chart.highlighter.opacity) : "transparent"
|
|
1537
|
+
}, null, 8, Ot)
|
|
1538
|
+
]))), 128))
|
|
1539
|
+
]),
|
|
1540
|
+
e.barSet.length ? (i(!0), s(g, { key: 0 }, m(e.barSet, (r, c) => (i(), s("g", {
|
|
1541
|
+
key: `serie_bar_${c}`,
|
|
1542
|
+
class: W(`serie_bar_${c}`),
|
|
1543
|
+
style: F(`opacity:${l.selectedScale ? l.selectedScale === r.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
1544
|
+
}, [
|
|
1545
|
+
(i(!0), s(g, null, m(r.plots, (n, f) => (i(), s("g", {
|
|
1546
|
+
key: `bar_plot_${c}_${f}`
|
|
1547
|
+
}, [
|
|
1548
|
+
e.canShowValue(n.value) ? (i(), s("rect", {
|
|
1549
|
+
key: 0,
|
|
1550
|
+
x: e.calcRectX(n),
|
|
1551
|
+
y: l.mutableConfig.useIndividualScale ? e.calcIndividualRectY(n) : e.calcRectY(n),
|
|
1552
|
+
height: l.mutableConfig.useIndividualScale ? Math.abs(e.calcIndividualHeight(n)) : Math.abs(e.calcRectHeight(n)),
|
|
1553
|
+
width: e.calcRectWidth() - (l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? 0 : e.barPeriodGap) < 0 ? 1e-5 : e.calcRectWidth() - (l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? 0 : e.barPeriodGap),
|
|
1554
|
+
rx: e.FINAL_CONFIG.bar.borderRadius,
|
|
1555
|
+
fill: e.FINAL_CONFIG.bar.useGradient ? n.value >= 0 ? `url(#rectGradient_pos_${c}_${l.uniqueId})` : `url(#rectGradient_neg_${c}_${l.uniqueId})` : r.color,
|
|
1556
|
+
stroke: e.FINAL_CONFIG.bar.border.useSerieColor ? r.color : e.FINAL_CONFIG.bar.border.stroke,
|
|
1557
|
+
"stroke-width": e.FINAL_CONFIG.bar.border.strokeWidth
|
|
1558
|
+
}, null, 8, Gt)) : h("", !0),
|
|
1559
|
+
e.canShowValue(n.value) && t.$slots.pattern ? (i(), s("rect", {
|
|
1560
|
+
key: 1,
|
|
1561
|
+
x: e.calcRectX(n),
|
|
1562
|
+
y: l.mutableConfig.useIndividualScale ? e.calcIndividualRectY(n) : e.calcRectY(n),
|
|
1563
|
+
height: l.mutableConfig.useIndividualScale ? Math.abs(e.calcIndividualHeight(n)) : Math.abs(e.calcRectHeight(n)),
|
|
1564
|
+
width: e.calcRectWidth() - (l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? 0 : e.barPeriodGap) < 0 ? 1e-5 : e.calcRectWidth() - (l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? 0 : e.barPeriodGap),
|
|
1565
|
+
rx: e.FINAL_CONFIG.bar.borderRadius,
|
|
1566
|
+
fill: `url(#pattern_${l.uniqueId}_${r.slotAbsoluteIndex})`,
|
|
1567
|
+
stroke: e.FINAL_CONFIG.bar.border.useSerieColor ? r.color : e.FINAL_CONFIG.bar.border.stroke,
|
|
1568
|
+
"stroke-width": e.FINAL_CONFIG.bar.border.strokeWidth
|
|
1569
|
+
}, null, 8, vt)) : h("", !0),
|
|
1570
|
+
n.comment && e.FINAL_CONFIG.chart.comments.show ? (i(), s("foreignObject", {
|
|
1571
|
+
key: 2,
|
|
1572
|
+
style: { overflow: "visible" },
|
|
1573
|
+
height: "12",
|
|
1574
|
+
width: (e.calcRectWidth() - (l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? 0 : e.barPeriodGap) < 0 ? 1e-5 : e.calcRectWidth() - (l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? 0 : e.barPeriodGap) / 2) + e.FINAL_CONFIG.chart.comments.width,
|
|
1575
|
+
x: e.calcRectX(n) - e.FINAL_CONFIG.chart.comments.width / 2 + e.FINAL_CONFIG.chart.comments.offsetX,
|
|
1576
|
+
y: e.checkNaN(n.y) + e.FINAL_CONFIG.chart.comments.offsetY + 6
|
|
1577
|
+
}, [
|
|
1578
|
+
S(t.$slots, "plot-comment", {
|
|
1579
|
+
plot: { ...n, color: r.color, seriesIndex: c, datapointIndex: f }
|
|
1580
|
+
}, void 0, !0)
|
|
1581
|
+
], 8, pt)) : h("", !0)
|
|
1582
|
+
]))), 128)),
|
|
1583
|
+
Object.hasOwn(r, "useProgression") && r.useProgression === !0 && !isNaN(e.calcLinearProgression(r.plots).trend) ? (i(), s("g", zt, [
|
|
1584
|
+
d("defs", null, [
|
|
1585
|
+
d("marker", {
|
|
1586
|
+
id: `bar_arrow_${c}`,
|
|
1587
|
+
markerWidth: 7,
|
|
1588
|
+
markerHeight: 7,
|
|
1589
|
+
refX: "0",
|
|
1590
|
+
refY: 7 / 2,
|
|
1591
|
+
orient: "auto"
|
|
1592
|
+
}, [
|
|
1593
|
+
d("polygon", {
|
|
1594
|
+
points: `0 0, 7 ${7 / 2}, 0 7`,
|
|
1595
|
+
fill: r.color
|
|
1596
|
+
}, null, 8, Tt)
|
|
1597
|
+
], 8, Mt)
|
|
1598
|
+
]),
|
|
1599
|
+
r.plots.length > 1 ? (i(), s("line", {
|
|
1600
|
+
key: 0,
|
|
1601
|
+
x1: e.calcLinearProgression(r.plots).x1,
|
|
1602
|
+
x2: e.calcLinearProgression(r.plots).x2,
|
|
1603
|
+
y1: e.forceValidValue(e.calcLinearProgression(r.plots).y1),
|
|
1604
|
+
y2: e.forceValidValue(e.calcLinearProgression(r.plots).y2),
|
|
1605
|
+
"stroke-width": 1,
|
|
1606
|
+
stroke: r.color,
|
|
1607
|
+
"stroke-dasharray": 2,
|
|
1608
|
+
"marker-end": `url(#bar_arrow_${c})`
|
|
1609
|
+
}, null, 8, Pt)) : h("", !0),
|
|
1610
|
+
r.plots.length > 1 ? (i(), s("text", {
|
|
1611
|
+
key: 1,
|
|
1612
|
+
"text-anchor": "middle",
|
|
1613
|
+
x: e.calcLinearProgression(r.plots).x2,
|
|
1614
|
+
y: e.calcLinearProgression(r.plots).y2 - 6,
|
|
1615
|
+
"font-size": l.fontSizes.plotLabels,
|
|
1616
|
+
fill: r.color
|
|
1617
|
+
}, w(e.dataLabel({
|
|
1618
|
+
v: e.calcLinearProgression(r.plots).trend * 100,
|
|
1619
|
+
s: "%",
|
|
1620
|
+
r: 2
|
|
1621
|
+
})), 9, Vt)) : h("", !0)
|
|
1622
|
+
])) : h("", !0)
|
|
1623
|
+
], 6))), 128)) : h("", !0),
|
|
1624
|
+
!l.mutableConfig.useIndividualScale && e.FINAL_CONFIG.chart.grid.labels.zeroLine.show ? (i(), s("line", {
|
|
1625
|
+
key: 1,
|
|
1626
|
+
stroke: e.FINAL_CONFIG.chart.grid.stroke,
|
|
1627
|
+
"stroke-width": "1",
|
|
1628
|
+
x1: e.drawingArea.left + e.xPadding,
|
|
1629
|
+
x2: e.drawingArea.right - e.xPadding,
|
|
1630
|
+
y1: e.forceValidValue(e.zero),
|
|
1631
|
+
y2: e.forceValidValue(e.zero),
|
|
1632
|
+
"stroke-linecap": "round"
|
|
1633
|
+
}, null, 8, Rt)) : h("", !0),
|
|
1634
|
+
e.FINAL_CONFIG.chart.highlighter.useLine && (![null, void 0].includes(l.selectedSerieIndex) || ![null, void 0].includes(l.selectedMinimapIndex)) ? (i(), s("g", Dt, [
|
|
1635
|
+
d("line", {
|
|
1636
|
+
x1: e.drawingArea.left + e.drawingArea.width / e.maxSeries * ((l.selectedSerieIndex !== null ? l.selectedSerieIndex : 0) || (l.selectedMinimapIndex !== null ? l.selectedMinimapIndex : 0)) + e.drawingArea.width / e.maxSeries / 2,
|
|
1637
|
+
x2: e.drawingArea.left + e.drawingArea.width / e.maxSeries * ((l.selectedSerieIndex !== null ? l.selectedSerieIndex : 0) || (l.selectedMinimapIndex !== null ? l.selectedMinimapIndex : 0)) + e.drawingArea.width / e.maxSeries / 2,
|
|
1638
|
+
y1: e.forceValidValue(e.drawingArea.top),
|
|
1639
|
+
y2: e.forceValidValue(e.drawingArea.bottom),
|
|
1640
|
+
stroke: e.FINAL_CONFIG.chart.highlighter.color,
|
|
1641
|
+
"stroke-width": e.FINAL_CONFIG.chart.highlighter.lineWidth,
|
|
1642
|
+
"stroke-dasharray": e.FINAL_CONFIG.chart.highlighter.lineDasharray,
|
|
1643
|
+
"stroke-linecap": "round",
|
|
1644
|
+
style: { transition: "none !important", animation: "none !important", "pointer-events": "none" }
|
|
1645
|
+
}, null, 8, Ht)
|
|
1646
|
+
])) : h("", !0),
|
|
1647
|
+
e.FINAL_CONFIG.chart.grid.frame.show ? (i(), s("rect", {
|
|
1648
|
+
key: 3,
|
|
1649
|
+
style: { pointerEvents: "none", transition: "none" },
|
|
1650
|
+
x: e.drawingArea.left + e.xPadding < 0 ? 0 : e.drawingArea.left + e.xPadding,
|
|
1651
|
+
y: e.drawingArea.top,
|
|
1652
|
+
width: e.drawingArea.width - (e.FINAL_CONFIG.chart.grid.position === "middle" ? 0 : e.drawingArea.width / e.maxSeries) < 0 ? 0 : e.drawingArea.width - (e.FINAL_CONFIG.chart.grid.position === "middle" ? 0 : e.drawingArea.width / e.maxSeries),
|
|
1653
|
+
height: e.drawingArea.height < 0 ? 0 : e.drawingArea.height,
|
|
1654
|
+
fill: "transparent",
|
|
1655
|
+
stroke: e.FINAL_CONFIG.chart.grid.frame.stroke,
|
|
1656
|
+
"stroke-width": e.FINAL_CONFIG.chart.grid.frame.strokeWidth,
|
|
1657
|
+
"stroke-linecap": e.FINAL_CONFIG.chart.grid.frame.strokeLinecap,
|
|
1658
|
+
"stroke-linejoin": e.FINAL_CONFIG.chart.grid.frame.strokeLinejoin,
|
|
1659
|
+
"stroke-dasharray": e.FINAL_CONFIG.chart.grid.frame.strokeDasharray
|
|
1660
|
+
}, null, 8, Wt)) : h("", !0),
|
|
1661
|
+
e.FINAL_CONFIG.chart.grid.labels.show ? (i(), s("g", Bt, [
|
|
1662
|
+
l.mutableConfig.useIndividualScale ? (i(), s(g, { key: 0 }, [
|
|
1663
|
+
(i(!0), s(g, null, m(e.allScales, (r) => (i(), s("g", null, [
|
|
1664
|
+
d("line", {
|
|
1665
|
+
x1: r.x + e.xPadding,
|
|
1666
|
+
x2: r.x + e.xPadding,
|
|
1667
|
+
y1: l.mutableConfig.isStacked ? e.forceValidValue(e.drawingArea.bottom - r.yOffset - r.individualHeight) : e.forceValidValue(e.drawingArea.top),
|
|
1668
|
+
y2: l.mutableConfig.isStacked ? e.forceValidValue(e.drawingArea.bottom - r.yOffset) : e.forceValidValue(e.drawingArea.bottom),
|
|
1669
|
+
stroke: r.color,
|
|
1670
|
+
"stroke-width": e.FINAL_CONFIG.chart.grid.stroke,
|
|
1671
|
+
"stroke-linecap": "round",
|
|
1672
|
+
style: F(`opacity:${l.selectedScale ? l.selectedScale === r.id ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out`)
|
|
1673
|
+
}, null, 12, Et)
|
|
1674
|
+
]))), 256)),
|
|
1675
|
+
(i(!0), s(g, null, m(e.allScales, (r) => (i(), s("g", {
|
|
1676
|
+
style: F(`opacity:${l.selectedScale ? l.selectedScale === r.id ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out`)
|
|
1677
|
+
}, [
|
|
1678
|
+
d("text", {
|
|
1679
|
+
fill: r.color,
|
|
1680
|
+
"font-size": l.fontSizes.dataLabels,
|
|
1681
|
+
"text-anchor": "middle",
|
|
1682
|
+
transform: `translate(${r.x - e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth + 5 + e.xPadding}, ${l.mutableConfig.isStacked ? e.drawingArea.bottom - r.yOffset - r.individualHeight / 2 : e.drawingArea.top + e.drawingArea.height / 2}) rotate(-90)`
|
|
1683
|
+
}, w(r.name) + " " + w(r.scaleLabel && r.unique ? `- ${r.scaleLabel}` : ""), 9, Yt),
|
|
1684
|
+
(i(!0), s(g, null, m(r.yLabels, (c, n) => (i(), s("line", {
|
|
1685
|
+
x1: r.x - 3 + e.xPadding,
|
|
1686
|
+
x2: r.x + e.xPadding,
|
|
1687
|
+
y1: e.forceValidValue(c.y),
|
|
1688
|
+
y2: e.forceValidValue(c.y),
|
|
1689
|
+
stroke: r.color,
|
|
1690
|
+
"stroke-width": 1,
|
|
1691
|
+
"stroke-linecap": "round"
|
|
1692
|
+
}, null, 8, qt))), 256)),
|
|
1693
|
+
(i(!0), s(g, null, m(r.yLabels, (c, n) => (i(), s("text", {
|
|
1694
|
+
x: r.x - 5 + e.xPadding,
|
|
1695
|
+
y: e.forceValidValue(c.y) + l.fontSizes.dataLabels / 3,
|
|
1696
|
+
"font-size": l.fontSizes.dataLabels,
|
|
1697
|
+
"text-anchor": "end",
|
|
1698
|
+
fill: r.color
|
|
1699
|
+
}, w(e.applyDataLabel(
|
|
1700
|
+
e.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,
|
|
1701
|
+
c.value,
|
|
1702
|
+
e.dataLabel({
|
|
1703
|
+
p: c.prefix,
|
|
1704
|
+
v: c.value,
|
|
1705
|
+
s: c.suffix,
|
|
1706
|
+
r: 1
|
|
1707
|
+
}),
|
|
1708
|
+
{ datapoint: c.datapoint, seriesIndex: n }
|
|
1709
|
+
)), 9, Xt))), 256))
|
|
1710
|
+
], 4))), 256))
|
|
1711
|
+
], 64)) : (i(!0), s(g, { key: 1 }, m(e.yLabels, (r, c) => (i(), s("g", {
|
|
1712
|
+
key: `yLabel_${c}`
|
|
1713
|
+
}, [
|
|
1714
|
+
e.canShowValue(r) && r.value >= e.niceScale.min && r.value <= e.niceScale.max ? (i(), s("line", {
|
|
1715
|
+
key: 0,
|
|
1716
|
+
x1: e.drawingArea.left + e.xPadding,
|
|
1717
|
+
x2: e.drawingArea.left - 5 + e.xPadding,
|
|
1718
|
+
y1: e.forceValidValue(r.y),
|
|
1719
|
+
y2: e.forceValidValue(r.y),
|
|
1720
|
+
stroke: e.FINAL_CONFIG.chart.grid.stroke,
|
|
1721
|
+
"stroke-width": "1",
|
|
1722
|
+
"stroke-linecap": "round"
|
|
1723
|
+
}, null, 8, Ut)) : h("", !0),
|
|
1724
|
+
r.value >= e.niceScale.min && r.value <= e.niceScale.max ? (i(), s("text", {
|
|
1725
|
+
key: 1,
|
|
1726
|
+
x: e.drawingArea.left - 7 + e.xPadding,
|
|
1727
|
+
y: e.checkNaN(r.y + l.fontSizes.dataLabels / 3),
|
|
1728
|
+
"font-size": l.fontSizes.dataLabels,
|
|
1729
|
+
"text-anchor": "end",
|
|
1730
|
+
fill: e.FINAL_CONFIG.chart.grid.labels.color
|
|
1731
|
+
}, w(e.canShowValue(r.value) ? e.applyDataLabel(
|
|
1732
|
+
e.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,
|
|
1733
|
+
r.value,
|
|
1734
|
+
e.dataLabel({
|
|
1735
|
+
p: r.prefix,
|
|
1736
|
+
v: r.value,
|
|
1737
|
+
s: r.suffix,
|
|
1738
|
+
r: 1
|
|
1739
|
+
})
|
|
1740
|
+
) : ""), 9, Zt)) : h("", !0)
|
|
1741
|
+
]))), 128))
|
|
1742
|
+
])) : h("", !0),
|
|
1743
|
+
(i(!0), s(g, null, m(e.plotSet, (r, c) => (i(), s("g", {
|
|
1744
|
+
key: `serie_plot_${c}`,
|
|
1745
|
+
class: W(`serie_plot_${c}`),
|
|
1746
|
+
style: F(`opacity:${l.selectedScale ? l.selectedScale === r.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
1747
|
+
}, [
|
|
1748
|
+
(i(!0), s(g, null, m(r.plots, (n, f) => (i(), s("g", {
|
|
1749
|
+
key: `circle_plot_${c}_${f}`
|
|
1750
|
+
}, [
|
|
1751
|
+
n && e.canShowValue(n.value) ? (i(), H(v, {
|
|
1752
|
+
key: 0,
|
|
1753
|
+
shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(r.shape) ? r.shape : "circle",
|
|
1754
|
+
color: e.FINAL_CONFIG.plot.useGradient ? `url(#plotGradient_${c}_${l.uniqueId})` : e.FINAL_CONFIG.plot.dot.useSerieColor ? r.color : e.FINAL_CONFIG.plot.dot.fill,
|
|
1755
|
+
plot: { x: e.checkNaN(n.x), y: e.checkNaN(n.y) },
|
|
1756
|
+
radius: l.selectedSerieIndex !== null && l.selectedSerieIndex === f || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === f ? (l.plotRadii.plot || 6) * 1.5 : l.plotRadii.plot || 6,
|
|
1757
|
+
stroke: e.FINAL_CONFIG.plot.dot.useSerieColor ? e.FINAL_CONFIG.chart.backgroundColor : r.color,
|
|
1758
|
+
strokeWidth: e.FINAL_CONFIG.plot.dot.strokeWidth
|
|
1759
|
+
}, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth"])) : h("", !0),
|
|
1760
|
+
n.comment && e.FINAL_CONFIG.chart.comments.show ? (i(), s("foreignObject", {
|
|
1761
|
+
key: 1,
|
|
1762
|
+
style: { overflow: "visible" },
|
|
1763
|
+
height: "12",
|
|
1764
|
+
width: e.FINAL_CONFIG.chart.comments.width,
|
|
1765
|
+
x: n.x - e.FINAL_CONFIG.chart.comments.width / 2 + e.FINAL_CONFIG.chart.comments.offsetX,
|
|
1766
|
+
y: n.y + e.FINAL_CONFIG.chart.comments.offsetY + 6
|
|
1767
|
+
}, [
|
|
1768
|
+
d("div", Kt, [
|
|
1769
|
+
S(t.$slots, "plot-comment", {
|
|
1770
|
+
plot: { ...n, color: r.color, seriesIndex: c, datapointIndex: f }
|
|
1771
|
+
}, void 0, !0)
|
|
1772
|
+
])
|
|
1773
|
+
], 8, Jt)) : h("", !0)
|
|
1774
|
+
]))), 128)),
|
|
1775
|
+
Object.hasOwn(r, "useProgression") && r.useProgression === !0 && !isNaN(e.calcLinearProgression(r.plots).trend) ? (i(), s("g", Qt, [
|
|
1776
|
+
d("defs", null, [
|
|
1777
|
+
d("marker", {
|
|
1778
|
+
id: `plot_arrow_${c}`,
|
|
1779
|
+
markerWidth: 7,
|
|
1780
|
+
markerHeight: 7,
|
|
1781
|
+
refX: "0",
|
|
1782
|
+
refY: 7 / 2,
|
|
1783
|
+
orient: "auto"
|
|
1784
|
+
}, [
|
|
1785
|
+
d("polygon", {
|
|
1786
|
+
points: `0 0, 7 ${7 / 2}, 0 7`,
|
|
1787
|
+
fill: r.color
|
|
1788
|
+
}, null, 8, $t)
|
|
1789
|
+
], 8, jt)
|
|
1790
|
+
]),
|
|
1791
|
+
r.plots.length > 1 ? (i(), s("line", {
|
|
1792
|
+
key: 0,
|
|
1793
|
+
x1: e.calcLinearProgression(r.plots).x1,
|
|
1794
|
+
x2: e.calcLinearProgression(r.plots).x2,
|
|
1795
|
+
y1: e.forceValidValue(e.calcLinearProgression(r.plots).y1),
|
|
1796
|
+
y2: e.forceValidValue(e.calcLinearProgression(r.plots).y2),
|
|
1797
|
+
"stroke-width": 1,
|
|
1798
|
+
stroke: r.color,
|
|
1799
|
+
"stroke-dasharray": 2,
|
|
1800
|
+
"marker-end": `url(#plot_arrow_${c})`
|
|
1801
|
+
}, null, 8, el)) : h("", !0),
|
|
1802
|
+
r.plots.length > 1 ? (i(), s("text", {
|
|
1803
|
+
key: 1,
|
|
1804
|
+
"text-anchor": "middle",
|
|
1805
|
+
x: e.calcLinearProgression(r.plots).x2,
|
|
1806
|
+
y: e.calcLinearProgression(r.plots).y2 - 6,
|
|
1807
|
+
"font-size": l.fontSizes.plotLabels,
|
|
1808
|
+
fill: r.color
|
|
1809
|
+
}, w(e.dataLabel({
|
|
1810
|
+
v: e.calcLinearProgression(r.plots).trend * 100,
|
|
1811
|
+
s: "%",
|
|
1812
|
+
r: 2
|
|
1813
|
+
})), 9, tl)) : h("", !0)
|
|
1814
|
+
])) : h("", !0)
|
|
1815
|
+
], 6))), 128)),
|
|
1816
|
+
(i(!0), s(g, null, m(e.lineSet, (r, c) => (i(), s("g", {
|
|
1817
|
+
key: `serie_line_${c}`,
|
|
1818
|
+
class: W(`serie_line_${c}`),
|
|
1819
|
+
style: F(`opacity:${l.selectedScale ? l.selectedScale === r.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
1820
|
+
}, [
|
|
1821
|
+
r.smooth && r.plots.length > 1 ? (i(), s("path", {
|
|
1822
|
+
key: 0,
|
|
1823
|
+
d: `M${r.curve}`,
|
|
1824
|
+
stroke: e.FINAL_CONFIG.chart.backgroundColor,
|
|
1825
|
+
"stroke-width": e.FINAL_CONFIG.line.strokeWidth + 1,
|
|
1826
|
+
"stroke-dasharray": r.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
|
|
1827
|
+
fill: "none"
|
|
1828
|
+
}, null, 8, ll)) : r.plots.length > 1 ? (i(), s("path", {
|
|
1829
|
+
key: 1,
|
|
1830
|
+
d: `M${r.straight}`,
|
|
1831
|
+
stroke: e.FINAL_CONFIG.chart.backgroundColor,
|
|
1832
|
+
"stroke-width": e.FINAL_CONFIG.line.strokeWidth + 1,
|
|
1833
|
+
"stroke-dasharray": r.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
|
|
1834
|
+
fill: "none",
|
|
1835
|
+
"stroke-linecap": "round",
|
|
1836
|
+
"stroke-linejoin": "round"
|
|
1837
|
+
}, null, 8, rl)) : h("", !0)
|
|
1838
|
+
], 6))), 128)),
|
|
1839
|
+
t.$slots.pattern ? (i(), s("defs", il, [
|
|
1840
|
+
(i(!0), s(g, null, m(e.safeDataset, (r, c) => S(t.$slots, "pattern", K({
|
|
1841
|
+
key: `serie_pattern_slot_${c}`,
|
|
1842
|
+
ref_for: !0
|
|
1843
|
+
}, { ...r, seriesIndex: r.slotAbsoluteIndex, patternId: `pattern_${l.uniqueId}_${c}` }), void 0, !0)), 128))
|
|
1844
|
+
])) : h("", !0),
|
|
1845
|
+
(i(!0), s(g, null, m(e.lineSet, (r, c) => (i(), s("g", {
|
|
1846
|
+
key: `serie_line_${c}`,
|
|
1847
|
+
class: W(`serie_line_${c}`),
|
|
1848
|
+
style: F(`opacity:${l.selectedScale ? l.selectedScale === r.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
1849
|
+
}, [
|
|
1850
|
+
r.useArea && r.plots.length > 1 ? (i(), s("g", al, [
|
|
1851
|
+
r.smooth ? (i(), s(g, { key: 0 }, [
|
|
1852
|
+
d("path", {
|
|
1853
|
+
d: `M ${r.plots[0] ? r.plots[0].x : Math.min(...r.plots.filter((n) => !!n).map((n) => n.x))},${l.mutableConfig.isStacked ? e.drawingArea.bottom - r.yOffset : e.drawingArea.bottom} ${r.curve} L ${r.plots.at(-1) ? r.plots.at(-1).x : e.drawingArea.left + e.slot.line * c + e.slot.line / 2},${l.mutableConfig.isStacked ? e.drawingArea.bottom - r.yOffset : e.drawingArea.bottom} Z`,
|
|
1854
|
+
fill: e.FINAL_CONFIG.line.area.useGradient ? `url(#areaGradient_${c}_${l.uniqueId})` : e.setOpacity(r.color, e.FINAL_CONFIG.line.area.opacity)
|
|
1855
|
+
}, null, 8, sl),
|
|
1856
|
+
t.$slots.pattern ? (i(), s("path", {
|
|
1857
|
+
key: 0,
|
|
1858
|
+
d: `M ${r.plots[0] ? r.plots[0].x : Math.min(...r.plots.filter((n) => !!n).map((n) => n.x))},${l.mutableConfig.isStacked ? e.drawingArea.bottom - r.yOffset : e.drawingArea.bottom} ${r.curve} L ${r.plots.at(-1) ? r.plots.at(-1).x : e.drawingArea.left + e.slot.line * c + e.slot.line / 2},${l.mutableConfig.isStacked ? e.drawingArea.bottom - r.yOffset : e.drawingArea.bottom} Z`,
|
|
1859
|
+
fill: `url(#pattern_${l.uniqueId}_${r.slotAbsoluteIndex})`
|
|
1860
|
+
}, null, 8, nl)) : h("", !0)
|
|
1861
|
+
], 64)) : (i(), s(g, { key: 1 }, [
|
|
1862
|
+
d("path", {
|
|
1863
|
+
d: `M${r.area}Z`,
|
|
1864
|
+
fill: e.FINAL_CONFIG.line.area.useGradient ? `url(#areaGradient_${c}_${l.uniqueId})` : e.setOpacity(r.color, e.FINAL_CONFIG.line.area.opacity)
|
|
1865
|
+
}, null, 8, cl),
|
|
1866
|
+
t.$slots.pattern ? (i(), s("path", {
|
|
1867
|
+
key: 0,
|
|
1868
|
+
d: `M${r.area}Z`,
|
|
1869
|
+
fill: `url(#pattern_${l.uniqueId}_${r.slotAbsoluteIndex})`
|
|
1870
|
+
}, null, 8, ol)) : h("", !0)
|
|
1871
|
+
], 64))
|
|
1872
|
+
])) : h("", !0),
|
|
1873
|
+
r.smooth && r.plots.length > 1 ? (i(), s("path", {
|
|
1874
|
+
key: 1,
|
|
1875
|
+
d: `M${r.curve}`,
|
|
1876
|
+
stroke: r.color,
|
|
1877
|
+
"stroke-width": e.FINAL_CONFIG.line.strokeWidth,
|
|
1878
|
+
"stroke-dasharray": r.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
|
|
1879
|
+
fill: "none",
|
|
1880
|
+
"stroke-linecap": "round"
|
|
1881
|
+
}, null, 8, hl)) : r.plots.length > 1 ? (i(), s("path", {
|
|
1882
|
+
key: 2,
|
|
1883
|
+
d: `M${r.straight}`,
|
|
1884
|
+
stroke: r.color,
|
|
1885
|
+
"stroke-width": e.FINAL_CONFIG.line.strokeWidth,
|
|
1886
|
+
"stroke-dasharray": r.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
|
|
1887
|
+
fill: "none",
|
|
1888
|
+
"stroke-linecap": "round",
|
|
1889
|
+
"stroke-linejoin": "round"
|
|
1890
|
+
}, null, 8, ul)) : h("", !0),
|
|
1891
|
+
(i(!0), s(g, null, m(r.plots, (n, f) => (i(), s(g, {
|
|
1892
|
+
key: `circle_line_${c}_${f}`
|
|
1893
|
+
}, [
|
|
1894
|
+
!e.optimize.linePlot && n && e.canShowValue(n.value) || e.optimize.linePlot && n && e.canShowValue(n.value) && (l.selectedSerieIndex !== null && l.selectedSerieIndex === f || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === f) ? (i(), H(v, {
|
|
1895
|
+
key: 0,
|
|
1896
|
+
shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(r.shape) ? r.shape : "circle",
|
|
1897
|
+
color: e.FINAL_CONFIG.line.useGradient ? `url(#lineGradient_${c}_${l.uniqueId})` : e.FINAL_CONFIG.line.dot.useSerieColor ? r.color : e.FINAL_CONFIG.line.dot.fill,
|
|
1898
|
+
plot: { x: e.checkNaN(n.x), y: e.checkNaN(n.y) },
|
|
1899
|
+
radius: l.selectedSerieIndex !== null && l.selectedSerieIndex === f || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === f ? (l.plotRadii.line || 6) * 1.5 : l.plotRadii.line || 6,
|
|
1900
|
+
stroke: e.FINAL_CONFIG.line.dot.useSerieColor ? e.FINAL_CONFIG.chart.backgroundColor : r.color,
|
|
1901
|
+
strokeWidth: e.FINAL_CONFIG.line.dot.strokeWidth
|
|
1902
|
+
}, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth"])) : h("", !0),
|
|
1903
|
+
n.comment && e.FINAL_CONFIG.chart.comments.show ? (i(), s("foreignObject", {
|
|
1904
|
+
key: 1,
|
|
1905
|
+
style: { overflow: "visible" },
|
|
1906
|
+
height: "12",
|
|
1907
|
+
width: e.FINAL_CONFIG.chart.comments.width,
|
|
1908
|
+
x: n.x - e.FINAL_CONFIG.chart.comments.width / 2 + e.FINAL_CONFIG.chart.comments.offsetX,
|
|
1909
|
+
y: n.y + e.FINAL_CONFIG.chart.comments.offsetY + 6
|
|
1910
|
+
}, [
|
|
1911
|
+
d("div", gl, [
|
|
1912
|
+
S(t.$slots, "plot-comment", {
|
|
1913
|
+
plot: { ...n, color: r.color, seriesIndex: c, datapointIndex: f }
|
|
1914
|
+
}, void 0, !0)
|
|
1915
|
+
])
|
|
1916
|
+
], 8, dl)) : h("", !0)
|
|
1917
|
+
], 64))), 128)),
|
|
1918
|
+
Object.hasOwn(r, "useProgression") && r.useProgression === !0 && !isNaN(e.calcLinearProgression(r.plots).trend) ? (i(), s("g", fl, [
|
|
1919
|
+
d("defs", null, [
|
|
1920
|
+
d("marker", {
|
|
1921
|
+
id: `line_arrow_${c}`,
|
|
1922
|
+
markerWidth: 7,
|
|
1923
|
+
markerHeight: 7,
|
|
1924
|
+
refX: "0",
|
|
1925
|
+
refY: 7 / 2,
|
|
1926
|
+
orient: "auto"
|
|
1927
|
+
}, [
|
|
1928
|
+
d("polygon", {
|
|
1929
|
+
points: `0 0, 7 ${7 / 2}, 0 7`,
|
|
1930
|
+
fill: r.color
|
|
1931
|
+
}, null, 8, ml)
|
|
1932
|
+
], 8, Il)
|
|
1933
|
+
]),
|
|
1934
|
+
r.plots.length > 1 ? (i(), s("line", {
|
|
1935
|
+
key: 0,
|
|
1936
|
+
x1: e.calcLinearProgression(r.plots).x1,
|
|
1937
|
+
x2: e.calcLinearProgression(r.plots).x2,
|
|
1938
|
+
y1: e.forceValidValue(e.calcLinearProgression(r.plots).y1),
|
|
1939
|
+
y2: e.forceValidValue(e.calcLinearProgression(r.plots).y2),
|
|
1940
|
+
"stroke-width": 1,
|
|
1941
|
+
stroke: r.color,
|
|
1942
|
+
"stroke-dasharray": 2,
|
|
1943
|
+
"marker-end": `url(#line_arrow_${c})`
|
|
1944
|
+
}, null, 8, bl)) : h("", !0),
|
|
1945
|
+
r.plots.length > 1 ? (i(), s("text", {
|
|
1946
|
+
key: 1,
|
|
1947
|
+
"text-anchor": "middle",
|
|
1948
|
+
x: e.calcLinearProgression(r.plots).x2,
|
|
1949
|
+
y: e.calcLinearProgression(r.plots).y2 - 6,
|
|
1950
|
+
"font-size": l.fontSizes.plotLabels,
|
|
1951
|
+
fill: r.color
|
|
1952
|
+
}, w(e.dataLabel({
|
|
1953
|
+
v: e.calcLinearProgression(r.plots).trend * 100,
|
|
1954
|
+
s: "%",
|
|
1955
|
+
r: 2
|
|
1956
|
+
})), 9, Nl)) : h("", !0)
|
|
1957
|
+
])) : h("", !0)
|
|
1958
|
+
], 6))), 128)),
|
|
1959
|
+
(e.FINAL_CONFIG.bar.labels.show || e.FINAL_CONFIG.bar.serieName.show) && l.mutableConfig.dataLabels.show ? (i(), s("g", xl, [
|
|
1960
|
+
(i(!0), s(g, null, m(e.barSet, (r, c) => (i(), s(g, {
|
|
1961
|
+
key: `xLabel_bar_${c}`
|
|
1962
|
+
}, [
|
|
1963
|
+
(i(!0), s(g, null, m(r.plots, (n, f) => (i(), s(g, {
|
|
1964
|
+
key: `xLabel_bar_${c}_${f}`
|
|
1965
|
+
}, [
|
|
1966
|
+
n && (!Object.hasOwn(r, "dataLabels") || r.dataLabels === !0 || l.selectedSerieIndex !== null && l.selectedSerieIndex === f || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === f) && e.FINAL_CONFIG.bar.labels.show ? (i(), s("text", {
|
|
1967
|
+
key: 0,
|
|
1968
|
+
x: l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? n.x + e.slot.line / 2 : e.calcRectX(n) + e.calcRectWidth() / 2 - e.barPeriodGap / 2,
|
|
1969
|
+
y: e.checkNaN(n.y) + (n.value >= 0 ? e.FINAL_CONFIG.bar.labels.offsetY : -e.FINAL_CONFIG.bar.labels.offsetY * 3),
|
|
1970
|
+
"text-anchor": "middle",
|
|
1971
|
+
"font-size": l.fontSizes.plotLabels,
|
|
1972
|
+
fill: e.FINAL_CONFIG.bar.labels.color,
|
|
1973
|
+
style: F(`opacity:${l.selectedScale ? l.selectedScale === r.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
1974
|
+
}, w(e.canShowValue(n.value) ? e.applyDataLabel(
|
|
1975
|
+
e.FINAL_CONFIG.bar.labels.formatter,
|
|
1976
|
+
n.value,
|
|
1977
|
+
e.dataLabel({
|
|
1978
|
+
p: r.prefix || e.FINAL_CONFIG.chart.labels.prefix,
|
|
1979
|
+
v: n.value,
|
|
1980
|
+
s: r.suffix || e.FINAL_CONFIG.chart.labels.suffix,
|
|
1981
|
+
r: e.FINAL_CONFIG.bar.labels.rounding
|
|
1982
|
+
}),
|
|
1983
|
+
{
|
|
1984
|
+
datapoint: n,
|
|
1985
|
+
serie: r
|
|
1986
|
+
}
|
|
1987
|
+
) : ""), 13, Fl)) : h("", !0),
|
|
1988
|
+
n && e.FINAL_CONFIG.bar.serieName.show ? (i(), s("text", {
|
|
1989
|
+
key: 1,
|
|
1990
|
+
x: l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? n.x + e.slot.line / 2 : n.x + e.calcRectWidth() * 1.1,
|
|
1991
|
+
y: n.y + (n.value > 0 ? e.FINAL_CONFIG.bar.serieName.offsetY : -e.FINAL_CONFIG.bar.serieName.offsetY * 3),
|
|
1992
|
+
"text-anchor": "middle",
|
|
1993
|
+
"font-size": l.fontSizes.plotLabels,
|
|
1994
|
+
fill: e.FINAL_CONFIG.bar.serieName.useSerieColor ? r.color : e.FINAL_CONFIG.bar.serieName.color,
|
|
1995
|
+
"font-weight": e.FINAL_CONFIG.bar.serieName.bold ? "bold" : "normal",
|
|
1996
|
+
style: F(`opacity:${l.selectedScale ? l.selectedScale === r.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
1997
|
+
}, w(e.FINAL_CONFIG.bar.serieName.useAbbreviation ? e.abbreviate({ source: r.name, length: e.FINAL_CONFIG.bar.serieName.abbreviationSize }) : r.name), 13, _l)) : h("", !0)
|
|
1998
|
+
], 64))), 128))
|
|
1999
|
+
], 64))), 128))
|
|
2000
|
+
])) : h("", !0),
|
|
2001
|
+
e.FINAL_CONFIG.plot.labels.show && l.mutableConfig.dataLabels.show ? (i(), s("g", Al, [
|
|
2002
|
+
(i(!0), s(g, null, m(e.plotSet, (r, c) => (i(), s(g, {
|
|
2003
|
+
key: `xLabel_plot_${c}`
|
|
2004
|
+
}, [
|
|
2005
|
+
(i(!0), s(g, null, m(r.plots, (n, f) => (i(), s(g, {
|
|
2006
|
+
key: `xLabel_plot_${c}_${f}`
|
|
2007
|
+
}, [
|
|
2008
|
+
n && !Object.hasOwn(r, "dataLabels") || r.dataLabels === !0 || l.selectedSerieIndex !== null && l.selectedSerieIndex === f || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === f ? (i(), s("text", {
|
|
2009
|
+
key: 0,
|
|
2010
|
+
x: n.x,
|
|
2011
|
+
y: n.y + e.FINAL_CONFIG.plot.labels.offsetY,
|
|
2012
|
+
"text-anchor": "middle",
|
|
2013
|
+
"font-size": l.fontSizes.plotLabels,
|
|
2014
|
+
fill: e.FINAL_CONFIG.plot.labels.color,
|
|
2015
|
+
style: F(`opacity:${l.selectedScale ? l.selectedScale === r.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2016
|
+
}, w(e.canShowValue(n.value) ? e.applyDataLabel(
|
|
2017
|
+
e.FINAL_CONFIG.plot.labels.formatter,
|
|
2018
|
+
n.value,
|
|
2019
|
+
e.dataLabel({
|
|
2020
|
+
p: r.prefix || e.FINAL_CONFIG.chart.labels.prefix,
|
|
2021
|
+
v: n.value,
|
|
2022
|
+
s: r.suffix || e.FINAL_CONFIG.chart.labels.suffix,
|
|
2023
|
+
r: e.FINAL_CONFIG.plot.labels.rounding
|
|
2024
|
+
}),
|
|
2025
|
+
{
|
|
2026
|
+
datapoint: n,
|
|
2027
|
+
serie: r
|
|
2028
|
+
}
|
|
2029
|
+
) : ""), 13, yl)) : h("", !0),
|
|
2030
|
+
n && f === 0 && r.useTag && r.useTag === "start" ? (i(), s("foreignObject", {
|
|
2031
|
+
key: 1,
|
|
2032
|
+
x: n.x,
|
|
2033
|
+
y: n.y - 20,
|
|
2034
|
+
height: 24,
|
|
2035
|
+
width: "150",
|
|
2036
|
+
style: F(`overflow: visible; opacity:${l.selectedScale ? l.selectedScale === r.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2037
|
+
}, [
|
|
2038
|
+
d("div", {
|
|
2039
|
+
style: F(`padding: 3px; background:${e.setOpacity(r.color, 80)};color:${e.adaptColorToBackground(r.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)
|
|
2040
|
+
}, w(r.name), 5)
|
|
2041
|
+
], 12, Ll)) : h("", !0),
|
|
2042
|
+
n && f === r.plots.length - 1 && r.useTag && r.useTag === "end" ? (i(), s("foreignObject", {
|
|
2043
|
+
key: 2,
|
|
2044
|
+
x: n.x - r.name.length * (l.fontSizes.plotLabels / 2),
|
|
2045
|
+
y: n.y - 20,
|
|
2046
|
+
height: 24,
|
|
2047
|
+
width: "150",
|
|
2048
|
+
style: F(`overflow: visible; opacity:${l.selectedScale ? l.selectedScale === r.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2049
|
+
}, [
|
|
2050
|
+
d("div", {
|
|
2051
|
+
style: F(`padding: 3px; background:${e.setOpacity(r.color, 80)};color:${e.adaptColorToBackground(r.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)
|
|
2052
|
+
}, w(r.name), 5)
|
|
2053
|
+
], 12, Cl)) : h("", !0)
|
|
2054
|
+
], 64))), 128))
|
|
2055
|
+
], 64))), 128))
|
|
2056
|
+
])) : h("", !0),
|
|
2057
|
+
e.FINAL_CONFIG.line.labels.show && l.mutableConfig.dataLabels.show ? (i(), s("g", Sl, [
|
|
2058
|
+
(i(!0), s(g, null, m(e.lineSet, (r, c) => (i(), s(g, {
|
|
2059
|
+
key: `xLabel_line_${c}`
|
|
2060
|
+
}, [
|
|
2061
|
+
(i(!0), s(g, null, m(r.plots, (n, f) => (i(), s(g, {
|
|
2062
|
+
key: `xLabel_line_${c}_${f}`
|
|
2063
|
+
}, [
|
|
2064
|
+
n && !Object.hasOwn(r, "dataLabels") || r.dataLabels === !0 || l.selectedSerieIndex !== null && l.selectedSerieIndex === f || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === f ? (i(), s("text", {
|
|
2065
|
+
key: 0,
|
|
2066
|
+
x: n.x,
|
|
2067
|
+
y: n.y + (n.value >= 0 ? e.FINAL_CONFIG.line.labels.offsetY : -e.FINAL_CONFIG.line.labels.offsetY * 3),
|
|
2068
|
+
"text-anchor": "middle",
|
|
2069
|
+
"font-size": l.fontSizes.plotLabels,
|
|
2070
|
+
fill: e.FINAL_CONFIG.line.labels.color,
|
|
2071
|
+
style: F(`opacity:${l.selectedScale ? l.selectedScale === r.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2072
|
+
}, w(e.canShowValue(n.value) ? e.applyDataLabel(
|
|
2073
|
+
e.FINAL_CONFIG.line.labels.formatter,
|
|
2074
|
+
n.value,
|
|
2075
|
+
e.dataLabel({
|
|
2076
|
+
p: r.prefix || e.FINAL_CONFIG.chart.labels.prefix,
|
|
2077
|
+
v: n.value,
|
|
2078
|
+
s: r.suffix || e.FINAL_CONFIG.chart.labels.suffix,
|
|
2079
|
+
r: e.FINAL_CONFIG.line.labels.rounding
|
|
2080
|
+
}),
|
|
2081
|
+
{
|
|
2082
|
+
datapoint: n,
|
|
2083
|
+
serie: r
|
|
2084
|
+
}
|
|
2085
|
+
) : ""), 13, kl)) : h("", !0),
|
|
2086
|
+
n && f === 0 && r.useTag && r.useTag === "start" ? (i(), s("foreignObject", {
|
|
2087
|
+
key: 1,
|
|
2088
|
+
x: n.x,
|
|
2089
|
+
y: n.y - 20,
|
|
2090
|
+
height: 24,
|
|
2091
|
+
width: "150",
|
|
2092
|
+
style: F(`overflow: visible; opacity:${l.selectedScale ? l.selectedScale === r.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2093
|
+
}, [
|
|
2094
|
+
d("div", {
|
|
2095
|
+
style: F(`padding: 3px; background:${e.setOpacity(r.color, 80)};color:${e.adaptColorToBackground(r.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)
|
|
2096
|
+
}, w(r.name), 5)
|
|
2097
|
+
], 12, wl)) : h("", !0),
|
|
2098
|
+
n && f === r.plots.length - 1 && r.useTag && r.useTag === "end" ? (i(), s("foreignObject", {
|
|
2099
|
+
key: 2,
|
|
2100
|
+
x: n.x - r.name.length * (l.fontSizes.plotLabels / 2),
|
|
2101
|
+
y: n.y - 20,
|
|
2102
|
+
height: 24,
|
|
2103
|
+
width: "150",
|
|
2104
|
+
style: F(`overflow: visible; opacity:${l.selectedScale ? l.selectedScale === r.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2105
|
+
}, [
|
|
2106
|
+
d("div", {
|
|
2107
|
+
style: F(`padding: 3px; background:${e.setOpacity(r.color, 80)};color:${e.adaptColorToBackground(r.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)
|
|
2108
|
+
}, w(r.name), 5)
|
|
2109
|
+
], 12, Ol)) : h("", !0)
|
|
2110
|
+
], 64))), 128))
|
|
2111
|
+
], 64))), 128))
|
|
2112
|
+
])) : h("", !0),
|
|
2113
|
+
(i(!0), s(g, null, m(e.lineSet, (r, c) => (i(), s(g, {
|
|
2114
|
+
key: `xLabel_line_${c}`
|
|
2115
|
+
}, [
|
|
2116
|
+
(i(!0), s(g, null, m(r.plots, (n, f) => (i(), s(g, {
|
|
2117
|
+
key: `xLabel_line_${c}_${f}`
|
|
2118
|
+
}, [
|
|
2119
|
+
n && f === 0 && r.showSerieName && r.showSerieName === "start" ? (i(), s("text", {
|
|
2120
|
+
key: 0,
|
|
2121
|
+
x: n.x - l.fontSizes.plotLabels,
|
|
2122
|
+
y: n.y,
|
|
2123
|
+
"font-size": l.fontSizes.plotLabels,
|
|
2124
|
+
"text-anchor": "end",
|
|
2125
|
+
fill: r.color,
|
|
2126
|
+
innerHTML: e.createTSpans({
|
|
2127
|
+
content: r.name,
|
|
2128
|
+
fontSize: l.fontSizes.plotLabels,
|
|
2129
|
+
fill: r.color,
|
|
2130
|
+
x: n.x - l.fontSizes.plotLabels,
|
|
2131
|
+
y: n.y,
|
|
2132
|
+
maxWords: 2
|
|
2133
|
+
}),
|
|
2134
|
+
style: F(`opacity:${l.selectedScale ? l.selectedScale === r.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2135
|
+
}, null, 12, Gl)) : h("", !0),
|
|
2136
|
+
n && f === r.plots.length - 1 && r.showSerieName && r.showSerieName === "end" ? (i(), s("text", {
|
|
2137
|
+
key: 1,
|
|
2138
|
+
x: n.x + l.fontSizes.plotLabels,
|
|
2139
|
+
y: n.y,
|
|
2140
|
+
"font-size": l.fontSizes.plotLabels,
|
|
2141
|
+
"text-anchor": "start",
|
|
2142
|
+
fill: r.color,
|
|
2143
|
+
innerHTML: e.createTSpans({
|
|
2144
|
+
content: r.name,
|
|
2145
|
+
fontSize: l.fontSizes.plotLabels,
|
|
2146
|
+
fill: r.color,
|
|
2147
|
+
x: n.x + l.fontSizes.plotLabels,
|
|
2148
|
+
y: n.y,
|
|
2149
|
+
maxWords: 2
|
|
2150
|
+
}),
|
|
2151
|
+
style: F(`opacity:${l.selectedScale ? l.selectedScale === r.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2152
|
+
}, null, 12, vl)) : h("", !0)
|
|
2153
|
+
], 64))), 128))
|
|
2154
|
+
], 64))), 128)),
|
|
2155
|
+
(i(!0), s(g, null, m(e.plotSet, (r, c) => (i(), s(g, {
|
|
2156
|
+
key: `xLabel_plot_${c}`
|
|
2157
|
+
}, [
|
|
2158
|
+
(i(!0), s(g, null, m(r.plots, (n, f) => (i(), s(g, {
|
|
2159
|
+
key: `xLabel_plot_${c}_${f}`
|
|
2160
|
+
}, [
|
|
2161
|
+
n && f === 0 && r.showSerieName && r.showSerieName === "start" ? (i(), s("text", {
|
|
2162
|
+
key: 0,
|
|
2163
|
+
x: n.x - l.fontSizes.plotLabels,
|
|
2164
|
+
y: n.y,
|
|
2165
|
+
"font-size": l.fontSizes.plotLabels,
|
|
2166
|
+
"text-anchor": "end",
|
|
2167
|
+
fill: r.color,
|
|
2168
|
+
innerHTML: e.createTSpans({
|
|
2169
|
+
content: r.name,
|
|
2170
|
+
fontSize: l.fontSizes.plotLabels,
|
|
2171
|
+
fill: r.color,
|
|
2172
|
+
x: n.x - l.fontSizes.plotLabels,
|
|
2173
|
+
y: n.y,
|
|
2174
|
+
maxWords: 2
|
|
2175
|
+
}),
|
|
2176
|
+
style: F(`opacity:${l.selectedScale ? l.selectedScale === r.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2177
|
+
}, null, 12, pl)) : h("", !0),
|
|
2178
|
+
n && f === r.plots.length - 1 && r.showSerieName && r.showSerieName === "end" ? (i(), s("text", {
|
|
2179
|
+
key: 1,
|
|
2180
|
+
x: n.x + l.fontSizes.plotLabels,
|
|
2181
|
+
y: n.y,
|
|
2182
|
+
"font-size": l.fontSizes.plotLabels,
|
|
2183
|
+
"text-anchor": "start",
|
|
2184
|
+
fill: r.color,
|
|
2185
|
+
innerHTML: e.createTSpans({
|
|
2186
|
+
content: r.name,
|
|
2187
|
+
fontSize: l.fontSizes.plotLabels,
|
|
2188
|
+
fill: r.color,
|
|
2189
|
+
x: n.x + l.fontSizes.plotLabels,
|
|
2190
|
+
y: n.y,
|
|
2191
|
+
maxWords: 2
|
|
2192
|
+
}),
|
|
2193
|
+
style: F(`opacity:${l.selectedScale ? l.selectedScale === r.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2194
|
+
}, null, 12, zl)) : h("", !0)
|
|
2195
|
+
], 64))), 128))
|
|
2196
|
+
], 64))), 128)),
|
|
2197
|
+
l.mutableConfig.useIndividualScale && !l.mutableConfig.isStacked ? (i(), s(g, { key: 9 }, [
|
|
2198
|
+
d("defs", null, [
|
|
2199
|
+
(i(!0), s(g, null, m(e.allScales, (r, c) => (i(), s("linearGradient", {
|
|
2200
|
+
id: `individual_scale_gradient_${l.uniqueId}_${c}`,
|
|
2201
|
+
x1: "0%",
|
|
2202
|
+
x2: "100%",
|
|
2203
|
+
y1: "0%",
|
|
2204
|
+
y2: "0%"
|
|
2205
|
+
}, [
|
|
2206
|
+
d("stop", {
|
|
2207
|
+
offset: "0%",
|
|
2208
|
+
"stop-color": e.FINAL_CONFIG.chart.backgroundColor,
|
|
2209
|
+
"stop-opacity": "0"
|
|
2210
|
+
}, null, 8, Tl),
|
|
2211
|
+
d("stop", {
|
|
2212
|
+
offset: "100%",
|
|
2213
|
+
"stop-color": r.color,
|
|
2214
|
+
"stop-opacity": "0.2"
|
|
2215
|
+
}, null, 8, Pl)
|
|
2216
|
+
], 8, Ml))), 256))
|
|
2217
|
+
]),
|
|
2218
|
+
(i(!0), s(g, null, m(e.allScales, (r, c) => (i(), s("rect", {
|
|
2219
|
+
x: r.x - e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth + e.xPadding,
|
|
2220
|
+
y: e.drawingArea.top,
|
|
2221
|
+
width: e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth,
|
|
2222
|
+
height: e.drawingArea.height < 0 ? 10 : e.drawingArea.height,
|
|
2223
|
+
fill: l.selectedScale === r.groupId ? `url(#individual_scale_gradient_${l.uniqueId}_${c})` : "transparent",
|
|
2224
|
+
onMouseenter: (n) => l.selectedScale = r.groupId,
|
|
2225
|
+
onMouseleave: a[0] || (a[0] = (n) => l.selectedScale = null)
|
|
2226
|
+
}, null, 40, Vl))), 256))
|
|
2227
|
+
], 64)) : h("", !0),
|
|
2228
|
+
d("g", null, [
|
|
2229
|
+
e.FINAL_CONFIG.chart.grid.labels.axis.yLabel && !l.mutableConfig.useIndividualScale ? (i(), s("text", {
|
|
2230
|
+
key: 0,
|
|
2231
|
+
"font-size": l.fontSizes.yAxis,
|
|
2232
|
+
fill: e.FINAL_CONFIG.chart.grid.labels.color,
|
|
2233
|
+
transform: `translate(${l.fontSizes.yAxis + e.FINAL_CONFIG.chart.grid.labels.axis.yLabelOffsetX}, ${e.drawingArea.top + e.drawingArea.height / 2}) rotate(-90)`,
|
|
2234
|
+
"text-anchor": "middle",
|
|
2235
|
+
style: { transition: "none" }
|
|
2236
|
+
}, w(e.FINAL_CONFIG.chart.grid.labels.axis.yLabel), 9, Rl)) : h("", !0),
|
|
2237
|
+
e.FINAL_CONFIG.chart.grid.labels.axis.xLabel ? (i(), s("text", {
|
|
2238
|
+
key: 1,
|
|
2239
|
+
"text-anchor": "middle",
|
|
2240
|
+
x: l.width / 2,
|
|
2241
|
+
y: e.drawingArea.bottom + l.fontSizes.yAxis + l.fontSizes.xAxis * 1.3 + e.FINAL_CONFIG.chart.grid.labels.axis.xLabelOffsetY,
|
|
2242
|
+
"font-size": l.fontSizes.yAxis,
|
|
2243
|
+
fill: e.FINAL_CONFIG.chart.grid.labels.color
|
|
2244
|
+
}, w(e.FINAL_CONFIG.chart.grid.labels.axis.xLabel), 9, Dl)) : h("", !0)
|
|
2245
|
+
]),
|
|
2246
|
+
a[9] || (a[9] = J('v-for="(label, i) in timeLabels" :key="`time_label_${i}`" ')),
|
|
2247
|
+
e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.show ? (i(), s("g", Hl, [
|
|
2248
|
+
t.$slots["time-label"] ? (i(!0), s(g, { key: 0 }, m(e.timeLabels, (r, c) => S(t.$slots, "time-label", K({
|
|
2249
|
+
key: `time_label_${c}`,
|
|
2250
|
+
ref_for: !0
|
|
2251
|
+
}, {
|
|
2252
|
+
x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * c + e.drawingArea.width / e.maxSeries / 2,
|
|
2253
|
+
y: e.drawingArea.bottom + l.fontSizes.xAxis * 1.3 + e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset,
|
|
2254
|
+
fontSize: l.fontSizes.xAxis,
|
|
2255
|
+
fill: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,
|
|
2256
|
+
transform: `translate(${e.drawingArea.left + e.drawingArea.width / e.maxSeries * c + e.drawingArea.width / e.maxSeries / 2}, ${e.drawingArea.bottom + l.fontSizes.xAxis * 1.3 + e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation})`,
|
|
2257
|
+
absoluteIndex: r.absoluteIndex,
|
|
2258
|
+
content: r.text,
|
|
2259
|
+
textAnchor: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
|
|
2260
|
+
show: r && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || r && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && (c === 0 || c === e.timeLabels.length - 1) && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || r && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && l.selectedSerieIndex === c && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || r && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo && c % Math.floor((this.slicer.end - this.slicer.start) / e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.modulo) === 0
|
|
2261
|
+
}), void 0, !0)), 128)) : (i(!0), s(g, { key: 1 }, m(e.timeLabels, (r, c) => (i(), s("g", {
|
|
2262
|
+
key: `time_label_${c}`
|
|
2263
|
+
}, [
|
|
2264
|
+
r && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || r && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && (c === 0 || c === e.timeLabels.length - 1) && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || r && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && l.selectedSerieIndex === c && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || r && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo && c % Math.floor((this.slicer.end - this.slicer.start) / e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.modulo) === 0 ? (i(), s("text", {
|
|
2265
|
+
key: 0,
|
|
2266
|
+
"text-anchor": e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
|
|
2267
|
+
"font-size": l.fontSizes.xAxis,
|
|
2268
|
+
fill: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,
|
|
2269
|
+
transform: `translate(${e.drawingArea.left + e.drawingArea.width / e.maxSeries * c + e.drawingArea.width / e.maxSeries / 2}, ${e.drawingArea.bottom + l.fontSizes.xAxis * 1.3 + e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation})`,
|
|
2270
|
+
style: {
|
|
2271
|
+
cursor: "pointer"
|
|
2272
|
+
},
|
|
2273
|
+
onClick: () => e.selectTimeLabel(r, c)
|
|
2274
|
+
}, w(r.text || ""), 9, Wl)) : h("", !0)
|
|
2275
|
+
]))), 128))
|
|
2276
|
+
])) : h("", !0),
|
|
2277
|
+
d("g", null, [
|
|
2278
|
+
(i(!0), s(g, null, m(e.maxSeries, (r, c) => (i(), s("rect", {
|
|
2279
|
+
key: `tooltip_trap_${c}`,
|
|
2280
|
+
x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * c,
|
|
2281
|
+
y: e.drawingArea.top,
|
|
2282
|
+
height: e.drawingArea.height < 0 ? 10 : e.drawingArea.height,
|
|
2283
|
+
width: e.drawingArea.width / e.maxSeries < 0 ? 1e-5 : e.drawingArea.width / e.maxSeries,
|
|
2284
|
+
fill: "transparent",
|
|
2285
|
+
onMouseenter: (n) => e.toggleTooltipVisibility(!0, c),
|
|
2286
|
+
onMouseleave: a[1] || (a[1] = (n) => e.toggleTooltipVisibility(!1)),
|
|
2287
|
+
onClick: (n) => e.selectX(c)
|
|
2288
|
+
}, null, 40, Bl))), 128))
|
|
2289
|
+
]),
|
|
2290
|
+
e.FINAL_CONFIG.chart.timeTag.show && (![null, void 0].includes(l.selectedSerieIndex) || ![null, void 0].includes(l.selectedMinimapIndex)) ? (i(), s("g", El, [
|
|
2291
|
+
(i(), s("foreignObject", {
|
|
2292
|
+
x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * ((l.selectedSerieIndex !== null ? l.selectedSerieIndex : 0) || (l.selectedMinimapIndex !== null ? l.selectedMinimapIndex : 0)) - 100 + e.drawingArea.width / e.maxSeries / 2,
|
|
2293
|
+
y: e.drawingArea.bottom,
|
|
2294
|
+
width: "200",
|
|
2295
|
+
height: "40",
|
|
2296
|
+
style: { overflow: "visible !important" }
|
|
2297
|
+
}, [
|
|
2298
|
+
d("div", {
|
|
2299
|
+
class: "vue-ui-xy-time-tag",
|
|
2300
|
+
style: F(`width: fit-content;margin: 0 auto;text-align:center;padding:3px 12px;background:${e.FINAL_CONFIG.chart.timeTag.backgroundColor};color:${e.FINAL_CONFIG.chart.timeTag.color};font-size:${e.FINAL_CONFIG.chart.timeTag.fontSize}px`)
|
|
2301
|
+
}, w(e.timeLabels[(l.selectedSerieIndex !== null ? l.selectedSerieIndex : 0) || (l.selectedMinimapIndex !== null ? l.selectedMinimapIndex : 0)].text || (l.selectedSerieIndex !== null ? l.selectedSerieIndex : 0) || (l.selectedMinimapIndex !== null ? l.selectedMinimapIndex : 0)), 5)
|
|
2302
|
+
], 8, Yl)),
|
|
2303
|
+
d("circle", {
|
|
2304
|
+
cx: e.drawingArea.left + e.drawingArea.width / e.maxSeries * ((l.selectedSerieIndex !== null ? l.selectedSerieIndex : 0) || (l.selectedMinimapIndex !== null ? l.selectedMinimapIndex : 0)) + e.drawingArea.width / e.maxSeries / 2,
|
|
2305
|
+
cy: e.drawingArea.bottom,
|
|
2306
|
+
r: e.FINAL_CONFIG.chart.timeTag.circleMarker.radius,
|
|
2307
|
+
fill: e.FINAL_CONFIG.chart.timeTag.circleMarker.color
|
|
2308
|
+
}, null, 8, ql)
|
|
2309
|
+
])) : h("", !0)
|
|
2310
|
+
])) : h("", !0),
|
|
2311
|
+
S(t.$slots, "svg", { svg: e.svg }, void 0, !0)
|
|
2312
|
+
], 14, je)) : h("", !0),
|
|
2313
|
+
t.$slots.watermark ? (i(), s("div", Xl, [
|
|
2314
|
+
S(t.$slots, "watermark", B(E({ isPrinting: l.isPrinting || l.isImaging })), void 0, !0)
|
|
2315
|
+
])) : h("", !0),
|
|
2316
|
+
e.isDataset ? h("", !0) : (i(), H(O, {
|
|
2317
|
+
key: 6,
|
|
2318
|
+
config: {
|
|
2319
|
+
type: "line",
|
|
2320
|
+
style: {
|
|
2321
|
+
backgroundColor: e.FINAL_CONFIG.chart.backgroundColor,
|
|
2322
|
+
line: {
|
|
2323
|
+
axis: {
|
|
2324
|
+
color: e.FINAL_CONFIG.chart.grid.stroke
|
|
2325
|
+
},
|
|
2326
|
+
path: {
|
|
2327
|
+
color: e.FINAL_CONFIG.chart.grid.stroke,
|
|
2328
|
+
strokeWidth: 0.5
|
|
2329
|
+
}
|
|
2330
|
+
}
|
|
2331
|
+
}
|
|
2332
|
+
}
|
|
2333
|
+
}, null, 8, ["config"])),
|
|
2334
|
+
e.FINAL_CONFIG.chart.zoom.show && l.maxX > 6 && e.isDataset ? (i(), H(p, {
|
|
2335
|
+
ref: "chartSlicer",
|
|
2336
|
+
key: `slicer_${l.slicerStep}`,
|
|
2337
|
+
background: e.FINAL_CONFIG.chart.zoom.color,
|
|
2338
|
+
fontSize: e.FINAL_CONFIG.chart.zoom.fontSize,
|
|
2339
|
+
useResetSlot: e.FINAL_CONFIG.chart.zoom.useResetSlot,
|
|
2340
|
+
labelLeft: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[l.slicer.start],
|
|
2341
|
+
labelRight: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[l.slicer.end - 1],
|
|
2342
|
+
textColor: e.FINAL_CONFIG.chart.color,
|
|
2343
|
+
inputColor: e.FINAL_CONFIG.chart.zoom.color,
|
|
2344
|
+
selectColor: e.FINAL_CONFIG.chart.zoom.highlightColor,
|
|
2345
|
+
borderColor: e.FINAL_CONFIG.chart.backgroundColor,
|
|
2346
|
+
minimap: e.minimap,
|
|
2347
|
+
smoothMinimap: e.FINAL_CONFIG.chart.zoom.minimap.smooth,
|
|
2348
|
+
minimapSelectedColor: e.FINAL_CONFIG.chart.zoom.minimap.selectedColor,
|
|
2349
|
+
minimapSelectionRadius: e.FINAL_CONFIG.chart.zoom.minimap.selectionRadius,
|
|
2350
|
+
minimapLineColor: e.FINAL_CONFIG.chart.zoom.minimap.lineColor,
|
|
2351
|
+
minimapSelectedColorOpacity: e.FINAL_CONFIG.chart.zoom.minimap.selectedColorOpacity,
|
|
2352
|
+
minimapSelectedIndex: l.selectedSerieIndex,
|
|
2353
|
+
minimapIndicatorColor: e.FINAL_CONFIG.chart.zoom.minimap.indicatorColor,
|
|
2354
|
+
verticalHandles: e.FINAL_CONFIG.chart.zoom.minimap.verticalHandles,
|
|
2355
|
+
max: l.maxX,
|
|
2356
|
+
min: 0,
|
|
2357
|
+
valueStart: l.slicer.start,
|
|
2358
|
+
valueEnd: l.slicer.end,
|
|
2359
|
+
start: l.slicer.start,
|
|
2360
|
+
"onUpdate:start": a[2] || (a[2] = (r) => l.slicer.start = r),
|
|
2361
|
+
end: l.slicer.end,
|
|
2362
|
+
"onUpdate:end": a[3] || (a[3] = (r) => l.slicer.end = r),
|
|
2363
|
+
refreshStartPoint: e.FINAL_CONFIG.chart.zoom.startIndex !== null ? e.FINAL_CONFIG.chart.zoom.startIndex : 0,
|
|
2364
|
+
refreshEndPoint: e.FINAL_CONFIG.chart.zoom.endIndex !== null ? e.FINAL_CONFIG.chart.zoom.endIndex + 1 : Math.max(...o.dataset.map((r) => e.largestTriangleThreeBucketsArray({ data: r.series, threshold: e.FINAL_CONFIG.downsample.threshold }).length)),
|
|
2365
|
+
enableRangeHandles: e.FINAL_CONFIG.chart.zoom.enableRangeHandles,
|
|
2366
|
+
enableSelectionDrag: e.FINAL_CONFIG.chart.zoom.enableSelectionDrag,
|
|
2367
|
+
onReset: e.refreshSlicer,
|
|
2368
|
+
onTrapMouse: e.selectMinimapIndex
|
|
2369
|
+
}, {
|
|
2370
|
+
"reset-action": P(({ reset: r }) => [
|
|
2371
|
+
S(t.$slots, "reset-action", B(E({ reset: r })), void 0, !0)
|
|
2372
|
+
]),
|
|
2373
|
+
_: 3
|
|
2374
|
+
}, 8, ["background", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "borderColor", "minimap", "smoothMinimap", "minimapSelectedColor", "minimapSelectionRadius", "minimapLineColor", "minimapSelectedColorOpacity", "minimapSelectedIndex", "minimapIndicatorColor", "verticalHandles", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag", "onReset", "onTrapMouse"])) : h("", !0),
|
|
2375
|
+
e.FINAL_CONFIG.chart.legend.show ? (i(), s("div", {
|
|
2376
|
+
key: 8,
|
|
2377
|
+
ref: "chartLegend",
|
|
2378
|
+
class: "vue-ui-xy-legend",
|
|
2379
|
+
style: F(`font-size:${e.FINAL_CONFIG.chart.legend.fontSize}px`)
|
|
2380
|
+
}, [
|
|
2381
|
+
(i(!0), s(g, null, m(e.absoluteDataset, (r, c) => (i(), s("div", {
|
|
2382
|
+
key: `div_legend_item_${c}`,
|
|
2383
|
+
onClick: (n) => e.segregate(r),
|
|
2384
|
+
class: W({ "vue-ui-xy-legend-item": !0, "vue-ui-xy-legend-item-segregated": l.segregatedSeries.includes(r.id) })
|
|
2385
|
+
}, [
|
|
2386
|
+
l.icons[r.type] === "line" ? (i(), s("svg", Zl, [
|
|
2387
|
+
d("rect", {
|
|
2388
|
+
x: "0",
|
|
2389
|
+
y: "7.5",
|
|
2390
|
+
rx: "1.5",
|
|
2391
|
+
stroke: e.FINAL_CONFIG.chart.backgroundColor,
|
|
2392
|
+
"stroke-width": 0.5,
|
|
2393
|
+
height: "3",
|
|
2394
|
+
width: "20",
|
|
2395
|
+
fill: r.color
|
|
2396
|
+
}, null, 8, Jl),
|
|
2397
|
+
Y(v, {
|
|
2398
|
+
plot: { x: 10, y: 9 },
|
|
2399
|
+
radius: 4,
|
|
2400
|
+
color: r.color,
|
|
2401
|
+
shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(r.shape) ? r.shape : "circle",
|
|
2402
|
+
stroke: e.FINAL_CONFIG.chart.backgroundColor,
|
|
2403
|
+
strokeWidth: 0.5
|
|
2404
|
+
}, null, 8, ["color", "shape", "stroke"])
|
|
2405
|
+
])) : l.icons[r.type] === "bar" ? (i(), s("svg", Kl, [
|
|
2406
|
+
l.icons[r.type] === "bar" && t.$slots.pattern ? (i(), s("rect", {
|
|
2407
|
+
key: 0,
|
|
2408
|
+
x: "0",
|
|
2409
|
+
y: "0",
|
|
2410
|
+
rx: "1",
|
|
2411
|
+
height: "40",
|
|
2412
|
+
width: "40",
|
|
2413
|
+
stroke: "none",
|
|
2414
|
+
fill: r.color
|
|
2415
|
+
}, null, 8, Ql)) : h("", !0),
|
|
2416
|
+
l.icons[r.type] === "bar" ? (i(), s("rect", {
|
|
2417
|
+
key: 1,
|
|
2418
|
+
x: "0",
|
|
2419
|
+
y: "0",
|
|
2420
|
+
rx: "1",
|
|
2421
|
+
height: "40",
|
|
2422
|
+
width: "40",
|
|
2423
|
+
stroke: "none",
|
|
2424
|
+
fill: t.$slots.pattern ? `url(#pattern_${l.uniqueId}_${r.slotAbsoluteIndex})` : r.color
|
|
2425
|
+
}, null, 8, jl)) : h("", !0)
|
|
2426
|
+
])) : (i(), s("svg", $l, [
|
|
2427
|
+
Y(v, {
|
|
2428
|
+
plot: { x: 6, y: 6 },
|
|
2429
|
+
radius: 5,
|
|
2430
|
+
color: r.color,
|
|
2431
|
+
shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(r.shape) ? r.shape : "circle"
|
|
2432
|
+
}, null, 8, ["color", "shape"])
|
|
2433
|
+
])),
|
|
2434
|
+
d("span", {
|
|
2435
|
+
style: F(`color:${e.FINAL_CONFIG.chart.legend.color}`)
|
|
2436
|
+
}, w(r.name), 5)
|
|
2437
|
+
], 10, Ul))), 128))
|
|
2438
|
+
], 4)) : (i(), s("div", er, [
|
|
2439
|
+
S(t.$slots, "legend", { legend: e.absoluteDataset }, void 0, !0)
|
|
2440
|
+
], 512)),
|
|
2441
|
+
t.$slots.source ? (i(), s("div", tr, [
|
|
2442
|
+
S(t.$slots, "source", {}, void 0, !0)
|
|
2443
|
+
], 512)) : h("", !0),
|
|
2444
|
+
Y(G, {
|
|
2445
|
+
show: l.mutableConfig.showTooltip && l.isTooltip,
|
|
2446
|
+
backgroundColor: e.FINAL_CONFIG.chart.tooltip.backgroundColor,
|
|
2447
|
+
color: e.FINAL_CONFIG.chart.tooltip.color,
|
|
2448
|
+
fontSize: e.FINAL_CONFIG.chart.tooltip.fontSize,
|
|
2449
|
+
borderRadius: e.FINAL_CONFIG.chart.tooltip.borderRadius,
|
|
2450
|
+
borderColor: e.FINAL_CONFIG.chart.tooltip.borderColor,
|
|
2451
|
+
borderWidth: e.FINAL_CONFIG.chart.tooltip.borderWidth,
|
|
2452
|
+
backgroundOpacity: e.FINAL_CONFIG.chart.tooltip.backgroundOpacity,
|
|
2453
|
+
position: e.FINAL_CONFIG.chart.tooltip.position,
|
|
2454
|
+
offsetY: e.FINAL_CONFIG.chart.tooltip.offsetY,
|
|
2455
|
+
parent: t.$refs.chart,
|
|
2456
|
+
content: e.tooltipContent,
|
|
2457
|
+
isFullscreen: l.isFullscreen,
|
|
2458
|
+
isCustom: e.FINAL_CONFIG.chart.tooltip.customFormat && typeof e.FINAL_CONFIG.chart.tooltip.customFormat == "function"
|
|
2459
|
+
}, {
|
|
2460
|
+
"tooltip-before": P(() => [
|
|
2461
|
+
S(t.$slots, "tooltip-before", B(E({ ...e.dataTooltipSlot })), void 0, !0)
|
|
2462
|
+
]),
|
|
2463
|
+
"tooltip-after": P(() => [
|
|
2464
|
+
S(t.$slots, "tooltip-after", B(E({ ...e.dataTooltipSlot })), void 0, !0)
|
|
2465
|
+
]),
|
|
2466
|
+
_: 3
|
|
2467
|
+
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
|
|
2468
|
+
e.isDataset ? (i(), H(V, {
|
|
2469
|
+
key: 11,
|
|
2470
|
+
hideDetails: "",
|
|
2471
|
+
config: {
|
|
2472
|
+
open: l.mutableConfig.showTable,
|
|
2473
|
+
maxHeight: 1e4,
|
|
2474
|
+
body: {
|
|
2475
|
+
backgroundColor: e.FINAL_CONFIG.chart.backgroundColor,
|
|
2476
|
+
color: e.FINAL_CONFIG.chart.color
|
|
2477
|
+
},
|
|
2478
|
+
head: {
|
|
2479
|
+
backgroundColor: e.FINAL_CONFIG.chart.backgroundColor,
|
|
2480
|
+
color: e.FINAL_CONFIG.chart.color
|
|
2481
|
+
}
|
|
2482
|
+
}
|
|
2483
|
+
}, {
|
|
2484
|
+
content: P(() => [
|
|
2485
|
+
d("div", {
|
|
2486
|
+
style: F(`${l.isPrinting ? "" : "max-height:400px"};overflow:auto;width:100%;margin-top:48px`)
|
|
2487
|
+
}, [
|
|
2488
|
+
d("div", lr, [
|
|
2489
|
+
qe(d("input", {
|
|
2490
|
+
type: "checkbox",
|
|
2491
|
+
"onUpdate:modelValue": a[4] || (a[4] = (r) => l.showSparklineTable = r)
|
|
2492
|
+
}, null, 512), [
|
|
2493
|
+
[Xe, l.showSparklineTable]
|
|
2494
|
+
]),
|
|
2495
|
+
d("div", {
|
|
2496
|
+
onClick: a[5] || (a[5] = (r) => l.showSparklineTable = !l.showSparklineTable),
|
|
2497
|
+
style: { cursor: "pointer" }
|
|
2498
|
+
}, [
|
|
2499
|
+
Y(N, {
|
|
2500
|
+
name: "chartLine",
|
|
2501
|
+
size: 20,
|
|
2502
|
+
stroke: e.FINAL_CONFIG.chart.color
|
|
2503
|
+
}, null, 8, ["stroke"])
|
|
2504
|
+
])
|
|
2505
|
+
]),
|
|
2506
|
+
l.showSparklineTable ? (i(), H(L, {
|
|
2507
|
+
key: `sparkline_${l.segregateStep}`,
|
|
2508
|
+
dataset: e.tableSparklineDataset,
|
|
2509
|
+
config: e.tableSparklineConfig
|
|
2510
|
+
}, null, 8, ["dataset", "config"])) : (i(), H(z, {
|
|
2511
|
+
key: `table_${l.tableStep}`,
|
|
2512
|
+
colNames: e.dataTable.colNames,
|
|
2513
|
+
head: e.dataTable.head,
|
|
2514
|
+
body: e.dataTable.body,
|
|
2515
|
+
config: e.dataTable.config,
|
|
2516
|
+
title: `${e.FINAL_CONFIG.chart.title.text}${e.FINAL_CONFIG.chart.title.subtitle.text ? ` : ${e.FINAL_CONFIG.chart.title.subtitle.text}` : ""}`,
|
|
2517
|
+
onClose: a[6] || (a[6] = (r) => l.mutableConfig.showTable = !1)
|
|
2518
|
+
}, {
|
|
2519
|
+
th: P(({ th: r }) => [
|
|
2520
|
+
d("div", { innerHTML: r }, null, 8, rr)
|
|
2521
|
+
]),
|
|
2522
|
+
td: P(({ td: r }) => [
|
|
2523
|
+
J(w(isNaN(Number(r)) ? r : e.dataLabel({
|
|
2524
|
+
p: e.FINAL_CONFIG.chart.labels.prefix,
|
|
2525
|
+
v: r,
|
|
2526
|
+
s: e.FINAL_CONFIG.chart.labels.suffix,
|
|
2527
|
+
r: e.FINAL_CONFIG.table.rounding
|
|
2528
|
+
})), 1)
|
|
2529
|
+
]),
|
|
2530
|
+
_: 1
|
|
2531
|
+
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
2532
|
+
], 4)
|
|
2533
|
+
]),
|
|
2534
|
+
_: 1
|
|
2535
|
+
}, 8, ["config"])) : h("", !0)
|
|
2536
|
+
], 46, Ke);
|
|
2537
|
+
}
|
|
2538
|
+
const _r = /* @__PURE__ */ Ue(Je, [["render", ir], ["__scopeId", "data-v-04b73dfd"]]);
|
|
2539
|
+
export {
|
|
2540
|
+
_r as default
|
|
2541
|
+
};
|