@shtabapp/ui-kit 1.77.0 → 1.78.2
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/CHANGELOG.md +18 -0
- package/dist/SChartBar-BAO2FtIO.cjs +1 -0
- package/dist/SChartBar-DHjm1H0N.js +304 -0
- package/dist/{SChartBurnup-joKIDLFb.cjs → SChartBurnup-9s2KNzCr.cjs} +1 -1
- package/dist/{SChartBurnup-BeQWgnGT.js → SChartBurnup-B1KU1E5B.js} +63 -63
- package/dist/SChartHorizontalBar-DwY63iRT.cjs +1 -0
- package/dist/SChartHorizontalBar-VKU0b6Jx.js +245 -0
- package/dist/{SChartLegend-dDqLhvIj.js → SChartLegend-At0mMO09.js} +1 -1
- package/dist/{SChartLegend-D1gPKGm0.cjs → SChartLegend-DQMLr6yV.cjs} +1 -1
- package/dist/{SChartLine-BV8Ytso5.js → SChartLine-rnEsQv-q.js} +35 -35
- package/dist/{SChartLine-DeJjaBmo.cjs → SChartLine-tj-AapTr.cjs} +1 -1
- package/dist/SChartMultiLine-C4jjmLEb.js +282 -0
- package/dist/SChartMultiLine-dtd6k59D.cjs +1 -0
- package/dist/{SChartPie-DccW5J0b.cjs → SChartPie-Ddk8r-_I.cjs} +1 -1
- package/dist/{SChartPie-BiLoxutQ.js → SChartPie-Ebg7WSga.js} +31 -31
- package/dist/{SChartProgress-DSxJqRA0.js → SChartProgress-DRSh_taf.js} +27 -27
- package/dist/{SChartProgress-Cpdkad6Q.cjs → SChartProgress-DozBX6ve.cjs} +1 -1
- package/dist/SChartScatter-DilWNoz0.cjs +1 -0
- package/dist/SChartScatter-DnmTw18x.js +249 -0
- package/dist/SChartStackedArea-BJ5HsJzQ.cjs +1 -0
- package/dist/SChartStackedArea-zIygTOp8.js +278 -0
- package/dist/SChartStackedBar-CXpVSagd.js +350 -0
- package/dist/SChartStackedBar-Dj6esSCS.cjs +2 -0
- package/dist/{applyChartHighlightedYTick-BHVwiljn.cjs → applyChartHighlightedYTick-CKsVe7PW.cjs} +1 -1
- package/dist/{applyChartHighlightedYTick-DmsstRVM.js → applyChartHighlightedYTick-DOxlsWPd.js} +1 -1
- package/dist/buildChartMirrorScale-CBUIRPYX.cjs +1 -0
- package/dist/buildChartMirrorScale-_PhGNiFR.js +15 -0
- package/dist/buildMultiLineChartScales-BweU2ftq.cjs +1 -0
- package/dist/buildMultiLineChartScales-DbRe2UFD.js +38 -0
- package/dist/components/SChartBar/SChartBar.types.d.ts +4 -0
- package/dist/components/SChartBar/SChartBar.types.d.ts.map +1 -1
- package/dist/components/SChartBar/SChartBar.vue.d.ts.map +1 -1
- package/dist/components/SChartBar/utils/buildBarChartConfig.d.ts +3 -1
- package/dist/components/SChartBar/utils/buildBarChartConfig.d.ts.map +1 -1
- package/dist/components/SChartBar/utils/createBarValueLabelPlugin.d.ts.map +1 -1
- package/dist/components/SChartHorizontalBar/SChartHorizontalBar.types.d.ts +12 -0
- package/dist/components/SChartHorizontalBar/SChartHorizontalBar.types.d.ts.map +1 -1
- package/dist/components/SChartHorizontalBar/SChartHorizontalBar.vue.d.ts.map +1 -1
- package/dist/components/SChartHorizontalBar/utils/buildSChartHorizontalBarConfig.d.ts +6 -0
- package/dist/components/SChartHorizontalBar/utils/buildSChartHorizontalBarConfig.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/SChartMultiLine.types.d.ts +2 -0
- package/dist/components/SChartMultiLine/SChartMultiLine.types.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/SChartMultiLine.vue.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/utils/buildMultiLineChartConfig.d.ts +2 -1
- package/dist/components/SChartMultiLine/utils/buildMultiLineChartConfig.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/utils/demoMultiLineSeries.d.ts +1 -0
- package/dist/components/SChartMultiLine/utils/demoMultiLineSeries.d.ts.map +1 -1
- package/dist/components/SChartScatter/SChartScatter.types.d.ts +51 -0
- package/dist/components/SChartScatter/SChartScatter.types.d.ts.map +1 -0
- package/dist/components/SChartScatter/SChartScatter.vue.d.ts +12 -0
- package/dist/components/SChartScatter/SChartScatter.vue.d.ts.map +1 -0
- package/dist/components/SChartScatter/index.d.ts +3 -0
- package/dist/components/SChartScatter/index.d.ts.map +1 -0
- package/dist/components/SChartScatter/utils/buildScatterChartConfig.d.ts +20 -0
- package/dist/components/SChartScatter/utils/buildScatterChartConfig.d.ts.map +1 -0
- package/dist/components/SChartScatter/utils/demoScatter.d.ts +6 -0
- package/dist/components/SChartScatter/utils/demoScatter.d.ts.map +1 -0
- package/dist/components/SChartScatter/utils/skeletonScatter.d.ts +5 -0
- package/dist/components/SChartScatter/utils/skeletonScatter.d.ts.map +1 -0
- package/dist/components/SChartStackedArea/SChartStackedArea.types.d.ts +5 -1
- package/dist/components/SChartStackedArea/SChartStackedArea.types.d.ts.map +1 -1
- package/dist/components/SChartStackedArea/SChartStackedArea.vue.d.ts.map +1 -1
- package/dist/components/SChartStackedArea/utils/buildStackedAreaChartConfig.d.ts +3 -1
- package/dist/components/SChartStackedArea/utils/buildStackedAreaChartConfig.d.ts.map +1 -1
- package/dist/components/SChartStackedArea/utils/demoStackedSeries.d.ts +2 -0
- package/dist/components/SChartStackedArea/utils/demoStackedSeries.d.ts.map +1 -1
- package/dist/components/SChartStackedBar/SChartStackedBar.types.d.ts +21 -0
- package/dist/components/SChartStackedBar/SChartStackedBar.types.d.ts.map +1 -1
- package/dist/components/SChartStackedBar/SChartStackedBar.vue.d.ts.map +1 -1
- package/dist/components/SChartStackedBar/index.d.ts +1 -1
- package/dist/components/SChartStackedBar/index.d.ts.map +1 -1
- package/dist/components/SChartStackedBar/utils/buildStackedBarChartConfig.d.ts +7 -1
- package/dist/components/SChartStackedBar/utils/buildStackedBarChartConfig.d.ts.map +1 -1
- package/dist/components/SChartStackedBar/utils/createStackedBarTotalsPlugin.d.ts +6 -0
- package/dist/components/SChartStackedBar/utils/createStackedBarTotalsPlugin.d.ts.map +1 -0
- package/dist/components/SChartStackedBar/utils/createStackedBarTrendPlugin.d.ts +10 -0
- package/dist/components/SChartStackedBar/utils/createStackedBarTrendPlugin.d.ts.map +1 -0
- package/dist/components/SChartStackedBar/utils/demoStackedBarSeries.d.ts +2 -0
- package/dist/components/SChartStackedBar/utils/demoStackedBarSeries.d.ts.map +1 -1
- package/dist/{createChartCrosshairPlugin-EqMlaexu.js → createChartCrosshairPlugin-B4LrgKjG.js} +1 -1
- package/dist/{createChartCrosshairPlugin-BTPv09h4.cjs → createChartCrosshairPlugin-COIICTCz.cjs} +1 -1
- package/dist/{createChartMarkersPlugin-BKxLg4pL.cjs → createChartMarkersPlugin-L7qomZVK.cjs} +1 -1
- package/dist/{createChartMarkersPlugin-DPvfZp_e.js → createChartMarkersPlugin-bAEeP-5Z.js} +1 -1
- package/dist/createCustomTooltipCallbacks-CxeEfJLl.js +12 -0
- package/dist/createCustomTooltipCallbacks-oRAimZTt.cjs +1 -0
- package/dist/entries/chart-bar.cjs +1 -1
- package/dist/entries/chart-bar.js +1 -1
- package/dist/entries/chart-burnup.cjs +1 -1
- package/dist/entries/chart-burnup.js +1 -1
- package/dist/entries/chart-horizontal-bar.cjs +1 -1
- package/dist/entries/chart-horizontal-bar.js +1 -1
- package/dist/entries/chart-line.cjs +1 -1
- package/dist/entries/chart-line.js +1 -1
- package/dist/entries/chart-multi-line.cjs +1 -1
- package/dist/entries/chart-multi-line.js +1 -1
- package/dist/entries/chart-pie.cjs +1 -1
- package/dist/entries/chart-pie.js +1 -1
- package/dist/entries/chart-progress.cjs +1 -1
- package/dist/entries/chart-progress.js +1 -1
- package/dist/entries/chart-scatter.cjs +1 -0
- package/dist/entries/chart-scatter.d.ts +3 -0
- package/dist/entries/chart-scatter.d.ts.map +1 -0
- package/dist/entries/chart-scatter.js +2 -0
- package/dist/entries/chart-stacked-area.cjs +1 -1
- package/dist/entries/chart-stacked-area.js +1 -1
- package/dist/entries/chart-stacked-bar.cjs +1 -1
- package/dist/entries/chart-stacked-bar.d.ts +1 -1
- package/dist/entries/chart-stacked-bar.d.ts.map +1 -1
- package/dist/entries/chart-stacked-bar.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +185 -184
- package/dist/resolveBarStackedSeriesColor-BDJ7XBIB.cjs +1 -0
- package/dist/resolveBarStackedSeriesColor-zEV1Ps7h.js +11 -0
- package/dist/resolveChartLabelFont-D_Pxt-gs.cjs +1 -0
- package/dist/resolveChartLabelFont-WtZd0pFD.js +4 -0
- package/dist/{resolveCssColorValue-DH_SEZj4.js → resolveCssColorValue-BBK7CTmP.js} +1 -1
- package/dist/resolveCssColorValue-D3fS-cK8.cjs +1 -0
- package/dist/{resolveSeriesPaletteColor-DoPeNP_F.js → resolveSeriesPaletteColor-Bk52kyZo.js} +2 -2
- package/dist/resolveSeriesPaletteColor-CVEsFs0o.cjs +1 -0
- package/dist/{resolveStackedChartContext-D4tuSA6Z.cjs → resolveStackedChartContext-BE3ZW2Sf.cjs} +1 -1
- package/dist/{resolveStackedChartContext-BbCzct6O.js → resolveStackedChartContext-Dc6Foe7D.js} +1 -1
- package/dist/uikit-components.css +1 -1
- package/dist/useChartInteractivity-Yk7qEYgl.cjs +2 -0
- package/dist/{useChartInteractivity-DygkiRA1.js → useChartInteractivity-sgbPZgcH.js} +58 -57
- package/dist/utils/chart/bar/createStackedBarTooltipCallbacks.d.ts.map +1 -1
- package/dist/utils/chart/core/buildChartMirrorScale.d.ts +27 -0
- package/dist/utils/chart/core/buildChartMirrorScale.d.ts.map +1 -0
- package/dist/utils/chart/core/chartCssVariables.d.ts +1 -0
- package/dist/utils/chart/core/chartCssVariables.d.ts.map +1 -1
- package/dist/utils/chart/core/chartInteractivity.d.ts +6 -0
- package/dist/utils/chart/core/chartInteractivity.d.ts.map +1 -1
- package/dist/utils/chart/core/createCustomTooltipCallbacks.d.ts +8 -0
- package/dist/utils/chart/core/createCustomTooltipCallbacks.d.ts.map +1 -0
- package/dist/utils/chart/core/registerChartJs.d.ts.map +1 -1
- package/dist/utils/chart/css/resolveChartLabelFont.d.ts +7 -0
- package/dist/utils/chart/css/resolveChartLabelFont.d.ts.map +1 -0
- package/dist/utils/chart/horizontalBar/buildHorizontalBarChartConfig.d.ts +7 -1
- package/dist/utils/chart/horizontalBar/buildHorizontalBarChartConfig.d.ts.map +1 -1
- package/dist/utils/chart/horizontalBar/buildHorizontalBarChartScales.d.ts +3 -1
- package/dist/utils/chart/horizontalBar/buildHorizontalBarChartScales.d.ts.map +1 -1
- package/dist/utils/chart/horizontalBar/createHorizontalBarValueLabelPlugin.d.ts +10 -0
- package/dist/utils/chart/horizontalBar/createHorizontalBarValueLabelPlugin.d.ts.map +1 -0
- package/dist/utils/chart/index.d.ts +1 -0
- package/dist/utils/chart/index.d.ts.map +1 -1
- package/dist/utils/chart/multiLine/buildMultiLineChartScales.d.ts +16 -21
- package/dist/utils/chart/multiLine/buildMultiLineChartScales.d.ts.map +1 -1
- package/package.json +7 -2
- package/dist/SChartBar-BvytQ-2z.js +0 -293
- package/dist/SChartBar-BzCeNCsi.cjs +0 -1
- package/dist/SChartHorizontalBar-C40Yroue.js +0 -176
- package/dist/SChartHorizontalBar-Dwln3uuE.cjs +0 -1
- package/dist/SChartMultiLine-7_HcvVEQ.js +0 -279
- package/dist/SChartMultiLine-Cl9Pf3Wp.cjs +0 -1
- package/dist/SChartStackedArea-B28offwE.js +0 -254
- package/dist/SChartStackedArea-Ce7xyhp1.cjs +0 -1
- package/dist/SChartStackedBar-C77FlKGS.js +0 -245
- package/dist/SChartStackedBar-CqUDrFJ3.cjs +0 -1
- package/dist/buildMultiLineChartScales-Di-yTvEB.js +0 -41
- package/dist/buildMultiLineChartScales-lVP6h9H4.cjs +0 -1
- package/dist/resolveBarStackedSeriesColor-CjwUxrUx.js +0 -11
- package/dist/resolveBarStackedSeriesColor-Czkj5bJY.cjs +0 -1
- package/dist/resolveCssColorValue-BFMo08-w.cjs +0 -1
- package/dist/resolveSeriesPaletteColor-BepW1gdW.cjs +0 -1
- package/dist/useChartInteractivity-CaZ37kX-.cjs +0 -1
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
import { E as e, T as t, _ as n, b as r, c as i, d as a, f as o, g as s, k as c, l, n as u, r as d, s as f, t as p, u as m, x as h } from "./useChartInteractivity-DygkiRA1.js";
|
|
2
|
-
import { t as g } from "./SChartLegend-dDqLhvIj.js";
|
|
3
|
-
import { t as _ } from "./resolveChartValueRange-DZybnmaX.js";
|
|
4
|
-
import { n as v, t as y } from "./createChartMarkersPlugin-DPvfZp_e.js";
|
|
5
|
-
import { t as b } from "./areChartSeriesAligned-DjonrIMm.js";
|
|
6
|
-
import { t as x } from "./createChartCrosshairPlugin-EqMlaexu.js";
|
|
7
|
-
import { t as S } from "./resolveSeriesPaletteColor-DoPeNP_F.js";
|
|
8
|
-
import { t as ee } from "./buildMultiLineChartScales-Di-yTvEB.js";
|
|
9
|
-
import { t as C } from "./splitChartAxisLabel-D-IFyucJ.js";
|
|
10
|
-
import { n as w, t as T } from "./buildChartSeriesPoints-BTyOpkin.js";
|
|
11
|
-
import { t as E } from "./useHasListener-RSjlUyqH.js";
|
|
12
|
-
import { computed as D, createBlock as O, createCommentVNode as k, createElementBlock as A, createElementVNode as j, createVNode as M, defineComponent as N, normalizeClass as P, normalizeStyle as F, openBlock as I, unref as L, useTemplateRef as R, withCtx as z } from "vue";
|
|
13
|
-
//#region src/utils/chart/multiLine/resolveMultiLineSeriesColor.ts
|
|
14
|
-
var B = (n, r, i, a = !1) => S(n, r, i, a, {
|
|
15
|
-
palette: e,
|
|
16
|
-
paletteFallback: t.multiLinePalette1,
|
|
17
|
-
skeletonPalette: c,
|
|
18
|
-
skeletonFallback: t.skeletonPalette1
|
|
19
|
-
}), V = 3, te = .4, H = 4, U = 1.5, W = 5, G = [8, 8], K = 16, q = "--s-ui-chart-multi-line-danger-fill", J = (e, t, n, r, i) => {
|
|
20
|
-
let a = e.flatMap((e) => e.points.map((e) => e.value));
|
|
21
|
-
return i ? {
|
|
22
|
-
min: t ?? 0,
|
|
23
|
-
max: n ?? _(a, { yStep: r }).max
|
|
24
|
-
} : _(a, {
|
|
25
|
-
yMin: t,
|
|
26
|
-
yMax: n,
|
|
27
|
-
yStep: r
|
|
28
|
-
});
|
|
29
|
-
}, Y = (e, t, n) => t ? {
|
|
30
|
-
target: { value: 0 },
|
|
31
|
-
...e ? {} : { above: f },
|
|
32
|
-
below: n
|
|
33
|
-
} : e ? "origin" : !1, X = ({ seriesList: e, colorHostElement: c, yMax: u, yMin: p, yStep: h = W, mirrorYAxis: g = !0, straightSegments: _ = !1, zeroLine: S = !1, dangerBelowZero: w = !1, markers: T = [], skeleton: E = !1, thinLines: D = !1, verticalGrid: O = !1, xAxisOffset: k = !1, highlightedYTick: A, formatYTick: j, formatValue: M, onSeriesClick: N, onPointClick: P }) => {
|
|
34
|
-
if (!b(e)) return null;
|
|
35
|
-
let F = r(t.axisLabel, c), I = r(t.grid, c), L = r(q, c), R = r(t.tooltipBackground, c), z = r(t.tooltipText, c), X = J(e, p, u, h, E), Z = (e[0]?.points.map((e) => e.label) ?? []).map(C), Q = D ? U : H, $ = d({
|
|
36
|
-
kind: "series",
|
|
37
|
-
skeleton: E,
|
|
38
|
-
colorHostElement: c,
|
|
39
|
-
onIndexClick: N,
|
|
40
|
-
onElementIndexClick: P
|
|
41
|
-
});
|
|
42
|
-
return {
|
|
43
|
-
type: "line",
|
|
44
|
-
data: {
|
|
45
|
-
labels: Z,
|
|
46
|
-
datasets: e.map((e, t) => {
|
|
47
|
-
let n = B(t, c, e.fillColor, E), r = !!e.area && !E, a = w && t === 0 && !E, o = r ? (e) => l(e, n, f, i) : n;
|
|
48
|
-
return {
|
|
49
|
-
label: e.label,
|
|
50
|
-
data: e.points.map((e) => e.value),
|
|
51
|
-
borderColor: n,
|
|
52
|
-
backgroundColor: o,
|
|
53
|
-
pointBackgroundColor: n,
|
|
54
|
-
pointHoverBackgroundColor: n,
|
|
55
|
-
...E ? {} : {
|
|
56
|
-
hoverBorderColor: n,
|
|
57
|
-
hoverBackgroundColor: o
|
|
58
|
-
},
|
|
59
|
-
borderWidth: Q,
|
|
60
|
-
...e.dashed && !E ? { borderDash: G } : {},
|
|
61
|
-
fill: Y(r, a, L),
|
|
62
|
-
pointRadius: _ && !E ? V : 0,
|
|
63
|
-
pointHoverRadius: 4,
|
|
64
|
-
tension: _ ? 0 : te
|
|
65
|
-
};
|
|
66
|
-
})
|
|
67
|
-
},
|
|
68
|
-
options: {
|
|
69
|
-
responsive: !0,
|
|
70
|
-
maintainAspectRatio: !1,
|
|
71
|
-
layout: { padding: { top: T.length > 0 ? K : 0 } },
|
|
72
|
-
onHover: $.onHover,
|
|
73
|
-
onClick: $.onClick,
|
|
74
|
-
interaction: m(E, {
|
|
75
|
-
mode: "index",
|
|
76
|
-
intersect: !1
|
|
77
|
-
}),
|
|
78
|
-
hover: E ? void 0 : {
|
|
79
|
-
mode: "nearest",
|
|
80
|
-
intersect: !1
|
|
81
|
-
},
|
|
82
|
-
plugins: {
|
|
83
|
-
legend: { display: !1 },
|
|
84
|
-
tooltip: {
|
|
85
|
-
enabled: a(E),
|
|
86
|
-
backgroundColor: R,
|
|
87
|
-
titleColor: z,
|
|
88
|
-
bodyColor: z,
|
|
89
|
-
footerColor: z,
|
|
90
|
-
displayColors: !1,
|
|
91
|
-
position: s,
|
|
92
|
-
yAlign: "bottom",
|
|
93
|
-
xAlign: "center",
|
|
94
|
-
caretPadding: 8,
|
|
95
|
-
callbacks: n({
|
|
96
|
-
resolveTitle: (e) => Z[e],
|
|
97
|
-
formatValue: M
|
|
98
|
-
})
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
scales: ee({
|
|
102
|
-
axisLabelColor: F,
|
|
103
|
-
gridColor: I,
|
|
104
|
-
yMin: X.min,
|
|
105
|
-
yMax: X.max,
|
|
106
|
-
yStep: h,
|
|
107
|
-
mirrorYAxis: g,
|
|
108
|
-
verticalGrid: O,
|
|
109
|
-
xAxisOffset: k,
|
|
110
|
-
highlightedYTick: E ? void 0 : A,
|
|
111
|
-
colorHostElement: c,
|
|
112
|
-
...j ? { formatYAxisTick: (e) => typeof e == "number" ? j(e) : e } : {}
|
|
113
|
-
})
|
|
114
|
-
},
|
|
115
|
-
plugins: o(E, [
|
|
116
|
-
...S ? [v(c)] : [],
|
|
117
|
-
x(c),
|
|
118
|
-
...T.length > 0 ? [y({ markers: T }, c)] : [],
|
|
119
|
-
...$.plugins
|
|
120
|
-
])
|
|
121
|
-
};
|
|
122
|
-
}, Z = [
|
|
123
|
-
"26.01",
|
|
124
|
-
"2.02",
|
|
125
|
-
"9.02",
|
|
126
|
-
"16.02",
|
|
127
|
-
"23.02",
|
|
128
|
-
"2.03",
|
|
129
|
-
"9.03",
|
|
130
|
-
"16.03",
|
|
131
|
-
"23.03",
|
|
132
|
-
"30.03",
|
|
133
|
-
"6.04"
|
|
134
|
-
], Q = [{
|
|
135
|
-
label: "Series 1",
|
|
136
|
-
points: T(Z, [
|
|
137
|
-
30,
|
|
138
|
-
34,
|
|
139
|
-
38,
|
|
140
|
-
44,
|
|
141
|
-
46,
|
|
142
|
-
50,
|
|
143
|
-
54,
|
|
144
|
-
56,
|
|
145
|
-
58,
|
|
146
|
-
60,
|
|
147
|
-
62
|
|
148
|
-
])
|
|
149
|
-
}, {
|
|
150
|
-
label: "Series 2",
|
|
151
|
-
points: T(Z, [
|
|
152
|
-
22,
|
|
153
|
-
24,
|
|
154
|
-
26,
|
|
155
|
-
28,
|
|
156
|
-
30,
|
|
157
|
-
32,
|
|
158
|
-
33,
|
|
159
|
-
35,
|
|
160
|
-
36,
|
|
161
|
-
38,
|
|
162
|
-
40
|
|
163
|
-
])
|
|
164
|
-
}], $ = { class: "s-ui-chart-multi-line__canvas-wrap" }, ne = /* @__PURE__ */ N({
|
|
165
|
-
__name: "SChartMultiLine",
|
|
166
|
-
props: {
|
|
167
|
-
series: { default: () => [] },
|
|
168
|
-
loading: {
|
|
169
|
-
type: Boolean,
|
|
170
|
-
default: !1
|
|
171
|
-
},
|
|
172
|
-
yMax: {},
|
|
173
|
-
yMin: {},
|
|
174
|
-
yStep: {},
|
|
175
|
-
mirrorYAxis: {
|
|
176
|
-
type: Boolean,
|
|
177
|
-
default: !0
|
|
178
|
-
},
|
|
179
|
-
straightSegments: {
|
|
180
|
-
type: Boolean,
|
|
181
|
-
default: !1
|
|
182
|
-
},
|
|
183
|
-
zeroLine: {
|
|
184
|
-
type: Boolean,
|
|
185
|
-
default: !1
|
|
186
|
-
},
|
|
187
|
-
dangerBelowZero: {
|
|
188
|
-
type: Boolean,
|
|
189
|
-
default: !1
|
|
190
|
-
},
|
|
191
|
-
markers: { default: () => [] },
|
|
192
|
-
showLegend: {
|
|
193
|
-
type: Boolean,
|
|
194
|
-
default: !0
|
|
195
|
-
},
|
|
196
|
-
height: {},
|
|
197
|
-
thinLines: {
|
|
198
|
-
type: Boolean,
|
|
199
|
-
default: !1
|
|
200
|
-
},
|
|
201
|
-
verticalGrid: {
|
|
202
|
-
type: Boolean,
|
|
203
|
-
default: !1
|
|
204
|
-
},
|
|
205
|
-
xAxisOffset: {
|
|
206
|
-
type: Boolean,
|
|
207
|
-
default: !1
|
|
208
|
-
},
|
|
209
|
-
highlightedYTick: {},
|
|
210
|
-
formatYTick: { type: Function },
|
|
211
|
-
formatValue: { type: Function }
|
|
212
|
-
},
|
|
213
|
-
emits: ["seriesClick", "pointClick"],
|
|
214
|
-
setup(e, { expose: t, emit: n }) {
|
|
215
|
-
let r = n, i = R("chartRootRef"), a = R("chartCanvasRef"), o = D(() => e.loading ? Q : e.series), s = (t) => {
|
|
216
|
-
let n = e.series[t];
|
|
217
|
-
n && r("seriesClick", t, n);
|
|
218
|
-
}, c = E("onSeriesClick"), l = (t, n) => {
|
|
219
|
-
let i = e.series[n], a = i?.points[t];
|
|
220
|
-
i && a && r("pointClick", t, n, a, i);
|
|
221
|
-
}, d = E("onPointClick"), f = D(() => {
|
|
222
|
-
if (e.height !== void 0) return { "--s-ui-chart-multi-line-viewport-height": typeof e.height == "number" ? `${e.height}px` : e.height };
|
|
223
|
-
}), m = D(() => !e.loading && e.series.length === 0 ? null : X({
|
|
224
|
-
seriesList: o.value,
|
|
225
|
-
colorHostElement: i.value,
|
|
226
|
-
yMax: e.yMax,
|
|
227
|
-
yMin: e.yMin,
|
|
228
|
-
yStep: e.yStep,
|
|
229
|
-
mirrorYAxis: e.mirrorYAxis,
|
|
230
|
-
straightSegments: e.straightSegments,
|
|
231
|
-
zeroLine: e.zeroLine,
|
|
232
|
-
dangerBelowZero: e.dangerBelowZero,
|
|
233
|
-
markers: e.markers,
|
|
234
|
-
skeleton: e.loading,
|
|
235
|
-
thinLines: e.thinLines,
|
|
236
|
-
verticalGrid: e.verticalGrid,
|
|
237
|
-
xAxisOffset: e.xAxisOffset,
|
|
238
|
-
highlightedYTick: e.highlightedYTick,
|
|
239
|
-
formatYTick: e.formatYTick,
|
|
240
|
-
formatValue: e.formatValue,
|
|
241
|
-
onSeriesClick: c() ? s : void 0,
|
|
242
|
-
onPointClick: d() ? l : void 0
|
|
243
|
-
})), _ = D(() => w(o.value, (t, n) => B(t, i.value, n, e.loading))), { chartInstance: v } = u({
|
|
244
|
-
canvasRef: a,
|
|
245
|
-
config: m,
|
|
246
|
-
enabled: D(() => e.loading || e.series.length > 0)
|
|
247
|
-
}), { exportImage: y, handleLegendItemHover: b } = p({
|
|
248
|
-
chartInstance: v,
|
|
249
|
-
canvasRef: a,
|
|
250
|
-
colorHostElement: i
|
|
251
|
-
});
|
|
252
|
-
return t({ exportImage: y }), (t, n) => (I(), A("div", {
|
|
253
|
-
ref_key: "chartRootRef",
|
|
254
|
-
ref: i,
|
|
255
|
-
class: P(["s-ui-chart-multi-line", { "s-ui-chart-multi-line--skeleton": e.loading }]),
|
|
256
|
-
style: F(f.value)
|
|
257
|
-
}, [j("div", $, [M(L(h), { loading: e.loading }, {
|
|
258
|
-
default: z(() => [j("canvas", {
|
|
259
|
-
ref_key: "chartCanvasRef",
|
|
260
|
-
ref: a,
|
|
261
|
-
class: "s-ui-chart-multi-line__canvas"
|
|
262
|
-
}, null, 512)]),
|
|
263
|
-
_: 1
|
|
264
|
-
}, 8, ["loading"])]), e.showLegend && _.value.length ? (I(), O(L(g), {
|
|
265
|
-
key: 0,
|
|
266
|
-
items: _.value,
|
|
267
|
-
disabled: e.loading,
|
|
268
|
-
interactive: !e.loading,
|
|
269
|
-
onItemHover: L(b)
|
|
270
|
-
}, null, 8, [
|
|
271
|
-
"items",
|
|
272
|
-
"disabled",
|
|
273
|
-
"interactive",
|
|
274
|
-
"onItemHover"
|
|
275
|
-
])) : k("", !0)], 6));
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
//#endregion
|
|
279
|
-
export { ne as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./useChartInteractivity-CaZ37kX-.cjs"),t=require("./SChartLegend-D1gPKGm0.cjs"),n=require("./resolveChartValueRange-DBCYLCXs.cjs"),r=require("./createChartMarkersPlugin-BKxLg4pL.cjs"),i=require("./areChartSeriesAligned-DiBX3TTk.cjs"),a=require("./createChartCrosshairPlugin-BTPv09h4.cjs"),o=require("./resolveSeriesPaletteColor-BepW1gdW.cjs"),s=require("./buildMultiLineChartScales-lVP6h9H4.cjs"),c=require("./splitChartAxisLabel-DAmQOJn6.cjs"),l=require("./buildChartSeriesPoints-Cqo2ed-n.cjs"),u=require("./useHasListener-BPgtbbo6.cjs");let d=require("vue");var f=(t,n,r,i=!1)=>o.t(t,n,r,i,{palette:e.E,paletteFallback:e.T.multiLinePalette1,skeletonPalette:e.k,skeletonFallback:e.T.skeletonPalette1}),p=3,m=.4,h=4,g=1.5,_=5,v=[8,8],y=16,b=`--s-ui-chart-multi-line-danger-fill`,x=(e,t,r,i,a)=>{let o=e.flatMap(e=>e.points.map(e=>e.value));return a?{min:t??0,max:r??n.t(o,{yStep:i}).max}:n.t(o,{yMin:t,yMax:r,yStep:i})},S=(t,n,r)=>n?{target:{value:0},...t?{}:{above:e.s},below:r}:t?`origin`:!1,C=({seriesList:t,colorHostElement:n,yMax:o,yMin:l,yStep:u=_,mirrorYAxis:d=!0,straightSegments:C=!1,zeroLine:w=!1,dangerBelowZero:T=!1,markers:E=[],skeleton:D=!1,thinLines:O=!1,verticalGrid:k=!1,xAxisOffset:A=!1,highlightedYTick:j,formatYTick:M,formatValue:N,onSeriesClick:P,onPointClick:F})=>{if(!i.t(t))return null;let I=e.b(e.T.axisLabel,n),L=e.b(e.T.grid,n),R=e.b(b,n),z=e.b(e.T.tooltipBackground,n),B=e.b(e.T.tooltipText,n),V=x(t,l,o,u,D),H=(t[0]?.points.map(e=>e.label)??[]).map(c.t),U=O?g:h,W=e.r({kind:`series`,skeleton:D,colorHostElement:n,onIndexClick:P,onElementIndexClick:F});return{type:`line`,data:{labels:H,datasets:t.map((t,r)=>{let i=f(r,n,t.fillColor,D),a=!!t.area&&!D,o=T&&r===0&&!D,s=a?t=>e.l(t,i,e.s,e.c):i;return{label:t.label,data:t.points.map(e=>e.value),borderColor:i,backgroundColor:s,pointBackgroundColor:i,pointHoverBackgroundColor:i,...D?{}:{hoverBorderColor:i,hoverBackgroundColor:s},borderWidth:U,...t.dashed&&!D?{borderDash:v}:{},fill:S(a,o,R),pointRadius:C&&!D?p:0,pointHoverRadius:4,tension:C?0:m}})},options:{responsive:!0,maintainAspectRatio:!1,layout:{padding:{top:E.length>0?y:0}},onHover:W.onHover,onClick:W.onClick,interaction:e.u(D,{mode:`index`,intersect:!1}),hover:D?void 0:{mode:`nearest`,intersect:!1},plugins:{legend:{display:!1},tooltip:{enabled:e.d(D),backgroundColor:z,titleColor:B,bodyColor:B,footerColor:B,displayColors:!1,position:e.g,yAlign:`bottom`,xAlign:`center`,caretPadding:8,callbacks:e._({resolveTitle:e=>H[e],formatValue:N})}},scales:s.t({axisLabelColor:I,gridColor:L,yMin:V.min,yMax:V.max,yStep:u,mirrorYAxis:d,verticalGrid:k,xAxisOffset:A,highlightedYTick:D?void 0:j,colorHostElement:n,...M?{formatYAxisTick:e=>typeof e==`number`?M(e):e}:{}})},plugins:e.f(D,[...w?[r.n(n)]:[],a.t(n),...E.length>0?[r.t({markers:E},n)]:[],...W.plugins])}},w=[`26.01`,`2.02`,`9.02`,`16.02`,`23.02`,`2.03`,`9.03`,`16.03`,`23.03`,`30.03`,`6.04`],T=[{label:`Series 1`,points:l.t(w,[30,34,38,44,46,50,54,56,58,60,62])},{label:`Series 2`,points:l.t(w,[22,24,26,28,30,32,33,35,36,38,40])}],E={class:`s-ui-chart-multi-line__canvas-wrap`},D=(0,d.defineComponent)({__name:`SChartMultiLine`,props:{series:{default:()=>[]},loading:{type:Boolean,default:!1},yMax:{},yMin:{},yStep:{},mirrorYAxis:{type:Boolean,default:!0},straightSegments:{type:Boolean,default:!1},zeroLine:{type:Boolean,default:!1},dangerBelowZero:{type:Boolean,default:!1},markers:{default:()=>[]},showLegend:{type:Boolean,default:!0},height:{},thinLines:{type:Boolean,default:!1},verticalGrid:{type:Boolean,default:!1},xAxisOffset:{type:Boolean,default:!1},highlightedYTick:{},formatYTick:{type:Function},formatValue:{type:Function}},emits:[`seriesClick`,`pointClick`],setup(n,{expose:r,emit:i}){let a=i,o=(0,d.useTemplateRef)(`chartRootRef`),s=(0,d.useTemplateRef)(`chartCanvasRef`),c=(0,d.computed)(()=>n.loading?T:n.series),p=e=>{let t=n.series[e];t&&a(`seriesClick`,e,t)},m=u.t(`onSeriesClick`),h=(e,t)=>{let r=n.series[t],i=r?.points[e];r&&i&&a(`pointClick`,e,t,i,r)},g=u.t(`onPointClick`),_=(0,d.computed)(()=>{if(n.height!==void 0)return{"--s-ui-chart-multi-line-viewport-height":typeof n.height==`number`?`${n.height}px`:n.height}}),v=(0,d.computed)(()=>!n.loading&&n.series.length===0?null:C({seriesList:c.value,colorHostElement:o.value,yMax:n.yMax,yMin:n.yMin,yStep:n.yStep,mirrorYAxis:n.mirrorYAxis,straightSegments:n.straightSegments,zeroLine:n.zeroLine,dangerBelowZero:n.dangerBelowZero,markers:n.markers,skeleton:n.loading,thinLines:n.thinLines,verticalGrid:n.verticalGrid,xAxisOffset:n.xAxisOffset,highlightedYTick:n.highlightedYTick,formatYTick:n.formatYTick,formatValue:n.formatValue,onSeriesClick:m()?p:void 0,onPointClick:g()?h:void 0})),y=(0,d.computed)(()=>l.n(c.value,(e,t)=>f(e,o.value,t,n.loading))),{chartInstance:b}=e.n({canvasRef:s,config:v,enabled:(0,d.computed)(()=>n.loading||n.series.length>0)}),{exportImage:x,handleLegendItemHover:S}=e.t({chartInstance:b,canvasRef:s,colorHostElement:o});return r({exportImage:x}),(r,i)=>((0,d.openBlock)(),(0,d.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:o,class:(0,d.normalizeClass)([`s-ui-chart-multi-line`,{"s-ui-chart-multi-line--skeleton":n.loading}]),style:(0,d.normalizeStyle)(_.value)},[(0,d.createElementVNode)(`div`,E,[(0,d.createVNode)((0,d.unref)(e.x),{loading:n.loading},{default:(0,d.withCtx)(()=>[(0,d.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:s,class:`s-ui-chart-multi-line__canvas`},null,512)]),_:1},8,[`loading`])]),n.showLegend&&y.value.length?((0,d.openBlock)(),(0,d.createBlock)((0,d.unref)(t.t),{key:0,items:y.value,disabled:n.loading,interactive:!n.loading,onItemHover:(0,d.unref)(S)},null,8,[`items`,`disabled`,`interactive`,`onItemHover`])):(0,d.createCommentVNode)(``,!0)],6))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return D}});
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
import { A as e, T as t, d as n, f as r, k as i, m as a, n as o, p as s, r as c, t as l, u, x as d } from "./useChartInteractivity-DygkiRA1.js";
|
|
2
|
-
import { t as f } from "./SChartLegend-dDqLhvIj.js";
|
|
3
|
-
import { t as p } from "./buildCartesianChartScales-EofFq3ry.js";
|
|
4
|
-
import { t as m } from "./resolveStackedChartContext-BbCzct6O.js";
|
|
5
|
-
import { t as h } from "./createChartCrosshairPlugin-EqMlaexu.js";
|
|
6
|
-
import { t as g } from "./resolveSeriesPaletteColor-DoPeNP_F.js";
|
|
7
|
-
import { n as _, t as v } from "./buildChartSeriesPoints-BTyOpkin.js";
|
|
8
|
-
import { t as y } from "./useHasListener-RSjlUyqH.js";
|
|
9
|
-
import { computed as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createVNode as T, defineComponent as E, normalizeClass as D, openBlock as O, unref as k, useTemplateRef as A, withCtx as j } from "vue";
|
|
10
|
-
//#region src/utils/chart/stacked/resolveStackedSeriesColor.ts
|
|
11
|
-
var M = (n, r, a, o = !1) => g(n, r, a, o, {
|
|
12
|
-
palette: e,
|
|
13
|
-
paletteFallback: t.stackedPalette1,
|
|
14
|
-
skeletonPalette: i,
|
|
15
|
-
skeletonFallback: t.skeletonPalette1
|
|
16
|
-
}), N = 20, P = "stack0", F = ({ seriesList: e, colorHostElement: t, yMax: i, yMin: o, yStep: l = N, skeleton: d = !1, totalLabel: f, onSeriesClick: g }) => {
|
|
17
|
-
let _ = m({
|
|
18
|
-
seriesList: e,
|
|
19
|
-
colorHostElement: t,
|
|
20
|
-
yMax: i,
|
|
21
|
-
yMin: o,
|
|
22
|
-
yStep: l,
|
|
23
|
-
skeleton: d
|
|
24
|
-
});
|
|
25
|
-
if (!_) return null;
|
|
26
|
-
let { axisLabelColor: v, gridColor: y, tooltipBackgroundColor: b, tooltipTextColor: x, resolvedYMax: S, resolvedYMin: C, chartLabels: w } = _, T = c({
|
|
27
|
-
kind: "series",
|
|
28
|
-
skeleton: d,
|
|
29
|
-
colorHostElement: t,
|
|
30
|
-
onIndexClick: g
|
|
31
|
-
});
|
|
32
|
-
return {
|
|
33
|
-
type: "line",
|
|
34
|
-
data: {
|
|
35
|
-
labels: w,
|
|
36
|
-
datasets: e.map((e, n) => {
|
|
37
|
-
let r = M(n, t, e.fillColor, d);
|
|
38
|
-
return {
|
|
39
|
-
label: e.label,
|
|
40
|
-
data: e.points.map((e) => e.value),
|
|
41
|
-
borderColor: r,
|
|
42
|
-
backgroundColor: r,
|
|
43
|
-
...d ? {} : {
|
|
44
|
-
hoverBorderColor: r,
|
|
45
|
-
hoverBackgroundColor: r
|
|
46
|
-
},
|
|
47
|
-
borderWidth: 0,
|
|
48
|
-
fill: !0,
|
|
49
|
-
pointRadius: 0,
|
|
50
|
-
pointHoverRadius: 0,
|
|
51
|
-
tension: 0,
|
|
52
|
-
stack: P
|
|
53
|
-
};
|
|
54
|
-
})
|
|
55
|
-
},
|
|
56
|
-
options: {
|
|
57
|
-
responsive: !0,
|
|
58
|
-
maintainAspectRatio: !1,
|
|
59
|
-
onHover: T.onHover,
|
|
60
|
-
onClick: T.onClick,
|
|
61
|
-
hover: d ? void 0 : {
|
|
62
|
-
mode: "nearest",
|
|
63
|
-
intersect: !1
|
|
64
|
-
},
|
|
65
|
-
interaction: u(d, {
|
|
66
|
-
mode: "index",
|
|
67
|
-
intersect: !1
|
|
68
|
-
}),
|
|
69
|
-
plugins: {
|
|
70
|
-
legend: { display: !1 },
|
|
71
|
-
tooltip: {
|
|
72
|
-
enabled: n(d),
|
|
73
|
-
backgroundColor: b,
|
|
74
|
-
titleColor: x,
|
|
75
|
-
bodyColor: x,
|
|
76
|
-
footerColor: x,
|
|
77
|
-
displayColors: !1,
|
|
78
|
-
position: s,
|
|
79
|
-
yAlign: "bottom",
|
|
80
|
-
xAlign: "center",
|
|
81
|
-
caretPadding: 8,
|
|
82
|
-
callbacks: a({ total: f })
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
scales: p({
|
|
86
|
-
axisLabelColor: v,
|
|
87
|
-
gridColor: y,
|
|
88
|
-
yMin: C,
|
|
89
|
-
yMax: S,
|
|
90
|
-
yStep: l,
|
|
91
|
-
stacked: !0
|
|
92
|
-
})
|
|
93
|
-
},
|
|
94
|
-
plugins: r(d, [h(t), ...T.plugins])
|
|
95
|
-
};
|
|
96
|
-
}, I = [
|
|
97
|
-
"24.02",
|
|
98
|
-
"28.02",
|
|
99
|
-
"04.03",
|
|
100
|
-
"08.03",
|
|
101
|
-
"12.03",
|
|
102
|
-
"16.03",
|
|
103
|
-
"20.03",
|
|
104
|
-
"24.03",
|
|
105
|
-
"28.03",
|
|
106
|
-
"01.04",
|
|
107
|
-
"05.04",
|
|
108
|
-
"09.04",
|
|
109
|
-
"13.04",
|
|
110
|
-
"17.04"
|
|
111
|
-
], L = [
|
|
112
|
-
18,
|
|
113
|
-
22,
|
|
114
|
-
26,
|
|
115
|
-
30,
|
|
116
|
-
34,
|
|
117
|
-
38,
|
|
118
|
-
42,
|
|
119
|
-
44,
|
|
120
|
-
46,
|
|
121
|
-
48,
|
|
122
|
-
49,
|
|
123
|
-
50,
|
|
124
|
-
51,
|
|
125
|
-
52
|
|
126
|
-
], R = [
|
|
127
|
-
6,
|
|
128
|
-
6,
|
|
129
|
-
7,
|
|
130
|
-
7,
|
|
131
|
-
7,
|
|
132
|
-
7,
|
|
133
|
-
7,
|
|
134
|
-
7,
|
|
135
|
-
7,
|
|
136
|
-
7,
|
|
137
|
-
7,
|
|
138
|
-
7,
|
|
139
|
-
7,
|
|
140
|
-
7
|
|
141
|
-
], z = [
|
|
142
|
-
10,
|
|
143
|
-
11,
|
|
144
|
-
12,
|
|
145
|
-
12,
|
|
146
|
-
11,
|
|
147
|
-
10,
|
|
148
|
-
10,
|
|
149
|
-
10,
|
|
150
|
-
10,
|
|
151
|
-
10,
|
|
152
|
-
10,
|
|
153
|
-
10,
|
|
154
|
-
10,
|
|
155
|
-
10
|
|
156
|
-
], B = [
|
|
157
|
-
32,
|
|
158
|
-
30,
|
|
159
|
-
28,
|
|
160
|
-
26,
|
|
161
|
-
28,
|
|
162
|
-
30,
|
|
163
|
-
29,
|
|
164
|
-
28,
|
|
165
|
-
27,
|
|
166
|
-
26,
|
|
167
|
-
26,
|
|
168
|
-
27,
|
|
169
|
-
28,
|
|
170
|
-
28
|
|
171
|
-
], V = [
|
|
172
|
-
"Готово",
|
|
173
|
-
"На ревью",
|
|
174
|
-
"В процессе",
|
|
175
|
-
"Бэклог"
|
|
176
|
-
], H = [
|
|
177
|
-
{
|
|
178
|
-
label: V[0] ?? "Series 1",
|
|
179
|
-
points: v(I, L)
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
label: V[1] ?? "Series 2",
|
|
183
|
-
points: v(I, R)
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
label: V[2] ?? "Series 3",
|
|
187
|
-
points: v(I, z)
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
label: V[3] ?? "Series 4",
|
|
191
|
-
points: v(I, B)
|
|
192
|
-
}
|
|
193
|
-
], U = { class: "s-ui-chart-stacked-area__canvas-wrap" }, W = /* @__PURE__ */ E({
|
|
194
|
-
__name: "SChartStackedArea",
|
|
195
|
-
props: {
|
|
196
|
-
series: { default: () => [] },
|
|
197
|
-
loading: {
|
|
198
|
-
type: Boolean,
|
|
199
|
-
default: !1
|
|
200
|
-
},
|
|
201
|
-
yMax: {},
|
|
202
|
-
yStep: {},
|
|
203
|
-
totalLabel: {}
|
|
204
|
-
},
|
|
205
|
-
emits: ["seriesClick"],
|
|
206
|
-
setup(e, { expose: t, emit: n }) {
|
|
207
|
-
let r = n, i = A("chartRootRef"), a = A("chartCanvasRef"), s = b(() => e.loading ? H : e.series), c = (t) => {
|
|
208
|
-
let n = e.series[t];
|
|
209
|
-
n && r("seriesClick", t, n);
|
|
210
|
-
}, u = y("onSeriesClick"), p = b(() => !e.loading && e.series.length === 0 ? null : F({
|
|
211
|
-
seriesList: s.value,
|
|
212
|
-
colorHostElement: i.value,
|
|
213
|
-
yMax: e.loading ? 160 : e.yMax,
|
|
214
|
-
yMin: e.loading ? 0 : void 0,
|
|
215
|
-
yStep: e.loading ? 20 : e.yStep,
|
|
216
|
-
skeleton: e.loading,
|
|
217
|
-
totalLabel: e.totalLabel,
|
|
218
|
-
onSeriesClick: u() ? c : void 0
|
|
219
|
-
})), m = b(() => _(s.value, (t, n) => M(t, i.value, n, e.loading))), { chartInstance: h } = o({
|
|
220
|
-
canvasRef: a,
|
|
221
|
-
config: p,
|
|
222
|
-
enabled: b(() => e.loading || e.series.length > 0)
|
|
223
|
-
}), { exportImage: g, handleLegendItemHover: v } = l({
|
|
224
|
-
chartInstance: h,
|
|
225
|
-
canvasRef: a,
|
|
226
|
-
colorHostElement: i
|
|
227
|
-
});
|
|
228
|
-
return t({ exportImage: g }), (t, n) => (O(), C("div", {
|
|
229
|
-
ref_key: "chartRootRef",
|
|
230
|
-
ref: i,
|
|
231
|
-
class: D(["s-ui-chart-stacked-area", { "s-ui-chart-stacked-area--skeleton": e.loading }])
|
|
232
|
-
}, [w("div", U, [T(k(d), { loading: e.loading }, {
|
|
233
|
-
default: j(() => [w("canvas", {
|
|
234
|
-
ref_key: "chartCanvasRef",
|
|
235
|
-
ref: a,
|
|
236
|
-
class: "s-ui-chart-stacked-area__canvas"
|
|
237
|
-
}, null, 512)]),
|
|
238
|
-
_: 1
|
|
239
|
-
}, 8, ["loading"])]), m.value.length ? (O(), x(k(f), {
|
|
240
|
-
key: 0,
|
|
241
|
-
items: m.value,
|
|
242
|
-
disabled: e.loading,
|
|
243
|
-
interactive: !e.loading,
|
|
244
|
-
onItemHover: k(v)
|
|
245
|
-
}, null, 8, [
|
|
246
|
-
"items",
|
|
247
|
-
"disabled",
|
|
248
|
-
"interactive",
|
|
249
|
-
"onItemHover"
|
|
250
|
-
])) : S("", !0)], 2));
|
|
251
|
-
}
|
|
252
|
-
});
|
|
253
|
-
//#endregion
|
|
254
|
-
export { W as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./useChartInteractivity-CaZ37kX-.cjs"),t=require("./SChartLegend-D1gPKGm0.cjs"),n=require("./buildCartesianChartScales-Dck5yBMo.cjs"),r=require("./resolveStackedChartContext-D4tuSA6Z.cjs"),i=require("./createChartCrosshairPlugin-BTPv09h4.cjs"),a=require("./resolveSeriesPaletteColor-BepW1gdW.cjs"),o=require("./buildChartSeriesPoints-Cqo2ed-n.cjs"),s=require("./useHasListener-BPgtbbo6.cjs");let c=require("vue");var l=(t,n,r,i=!1)=>a.t(t,n,r,i,{palette:e.A,paletteFallback:e.T.stackedPalette1,skeletonPalette:e.k,skeletonFallback:e.T.skeletonPalette1}),u=20,d=`stack0`,f=({seriesList:t,colorHostElement:a,yMax:o,yMin:s,yStep:c=u,skeleton:f=!1,totalLabel:p,onSeriesClick:m})=>{let h=r.t({seriesList:t,colorHostElement:a,yMax:o,yMin:s,yStep:c,skeleton:f});if(!h)return null;let{axisLabelColor:g,gridColor:_,tooltipBackgroundColor:v,tooltipTextColor:y,resolvedYMax:b,resolvedYMin:x,chartLabels:S}=h,C=e.r({kind:`series`,skeleton:f,colorHostElement:a,onIndexClick:m});return{type:`line`,data:{labels:S,datasets:t.map((e,t)=>{let n=l(t,a,e.fillColor,f);return{label:e.label,data:e.points.map(e=>e.value),borderColor:n,backgroundColor:n,...f?{}:{hoverBorderColor:n,hoverBackgroundColor:n},borderWidth:0,fill:!0,pointRadius:0,pointHoverRadius:0,tension:0,stack:d}})},options:{responsive:!0,maintainAspectRatio:!1,onHover:C.onHover,onClick:C.onClick,hover:f?void 0:{mode:`nearest`,intersect:!1},interaction:e.u(f,{mode:`index`,intersect:!1}),plugins:{legend:{display:!1},tooltip:{enabled:e.d(f),backgroundColor:v,titleColor:y,bodyColor:y,footerColor:y,displayColors:!1,position:e.p,yAlign:`bottom`,xAlign:`center`,caretPadding:8,callbacks:e.m({total:p})}},scales:n.t({axisLabelColor:g,gridColor:_,yMin:x,yMax:b,yStep:c,stacked:!0})},plugins:e.f(f,[i.t(a),...C.plugins])}},p=[`24.02`,`28.02`,`04.03`,`08.03`,`12.03`,`16.03`,`20.03`,`24.03`,`28.03`,`01.04`,`05.04`,`09.04`,`13.04`,`17.04`],m=[18,22,26,30,34,38,42,44,46,48,49,50,51,52],h=[6,6,7,7,7,7,7,7,7,7,7,7,7,7],g=[10,11,12,12,11,10,10,10,10,10,10,10,10,10],_=[32,30,28,26,28,30,29,28,27,26,26,27,28,28],v=[`Готово`,`На ревью`,`В процессе`,`Бэклог`],y=[{label:v[0]??`Series 1`,points:o.t(p,m)},{label:v[1]??`Series 2`,points:o.t(p,h)},{label:v[2]??`Series 3`,points:o.t(p,g)},{label:v[3]??`Series 4`,points:o.t(p,_)}],b={class:`s-ui-chart-stacked-area__canvas-wrap`},x=(0,c.defineComponent)({__name:`SChartStackedArea`,props:{series:{default:()=>[]},loading:{type:Boolean,default:!1},yMax:{},yStep:{},totalLabel:{}},emits:[`seriesClick`],setup(n,{expose:r,emit:i}){let a=i,u=(0,c.useTemplateRef)(`chartRootRef`),d=(0,c.useTemplateRef)(`chartCanvasRef`),p=(0,c.computed)(()=>n.loading?y:n.series),m=e=>{let t=n.series[e];t&&a(`seriesClick`,e,t)},h=s.t(`onSeriesClick`),g=(0,c.computed)(()=>!n.loading&&n.series.length===0?null:f({seriesList:p.value,colorHostElement:u.value,yMax:n.loading?160:n.yMax,yMin:n.loading?0:void 0,yStep:n.loading?20:n.yStep,skeleton:n.loading,totalLabel:n.totalLabel,onSeriesClick:h()?m:void 0})),_=(0,c.computed)(()=>o.n(p.value,(e,t)=>l(e,u.value,t,n.loading))),{chartInstance:v}=e.n({canvasRef:d,config:g,enabled:(0,c.computed)(()=>n.loading||n.series.length>0)}),{exportImage:x,handleLegendItemHover:S}=e.t({chartInstance:v,canvasRef:d,colorHostElement:u});return r({exportImage:x}),(r,i)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:u,class:(0,c.normalizeClass)([`s-ui-chart-stacked-area`,{"s-ui-chart-stacked-area--skeleton":n.loading}])},[(0,c.createElementVNode)(`div`,b,[(0,c.createVNode)((0,c.unref)(e.x),{loading:n.loading},{default:(0,c.withCtx)(()=>[(0,c.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:d,class:`s-ui-chart-stacked-area__canvas`},null,512)]),_:1},8,[`loading`])]),_.value.length?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(t.t),{key:0,items:_.value,disabled:n.loading,interactive:!n.loading,onItemHover:(0,c.unref)(S)},null,8,[`items`,`disabled`,`interactive`,`onItemHover`])):(0,c.createCommentVNode)(``,!0)],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return x}});
|