@hybridcore/ui 1.6.9 → 1.6.11
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/{AnimatedTheme-BOKdw2Oy.js → AnimatedTheme-D3VZKKNV.js} +6 -6
- package/dist/{AxisRenderer-lUbezuh7.js → AxisRenderer-Doyw-FTI.js} +6 -6
- package/dist/{AxisRendererY-DbSiyb45.js → AxisRendererY-BylCU67e.js} +3 -3
- package/dist/{Bullet-PgoNb3Jv.js → Bullet-C6357hTv.js} +1 -1
- package/dist/{Button-XBf4Mwz-.js → Button-DGOT8RcT.js} +3 -3
- package/dist/{CategoryAxis-B8KQp1pE.js → CategoryAxis-B5uTZjhL.js} +3 -3
- package/dist/{Circle-BWRdiMpG.js → Circle-DhzVdFBd.js} +1 -1
- package/dist/{ColorSet-DDmFoKtZ.js → ColorSet-DGLMpbL3.js} +1 -1
- package/dist/{ColumnSeries-rgnGm-Bg.js → ColumnSeries-CqJ-563p.js} +28 -28
- package/dist/{DataProcessor-CvIe9BVn.js → DataProcessor-WXzhvIg6.js} +1 -1
- package/dist/{DateAxis-zNtbSVjW.js → DateAxis-lJZjbAS-.js} +4 -4
- package/dist/{Entity-CCUIdRAr.js → Entity-4Lr2piVN.js} +66 -66
- package/dist/GaplessDateAxis-DowssQ6y.js +296 -0
- package/dist/{Hierarchy-CCvGsF1A.js → Hierarchy-DPEcTr0v.js} +8 -8
- package/dist/{Legend-kbCFjJAW.js → Legend-CTb6rZz_.js} +4 -4
- package/dist/{LineSeries-BLFvwrLT.js → LineSeries-Dg1aytHA.js} +4 -4
- package/dist/{LinearGradient-C7rnipF7.js → LinearGradient-D1hzMjaW.js} +2 -2
- package/dist/{PieSeries-3iLRbqFv.js → PieSeries-C9YUWMnA.js} +8 -8
- package/dist/{RoundedRectangle-CqMMmPM0.js → RoundedRectangle-B23Oh_r6.js} +2 -2
- package/dist/{Scrollbar-BzSBcIUt.js → Scrollbar-CSoXoZSe.js} +4 -4
- package/dist/{Slice-CS23iLiS.js → Slice-CIP7Vmzu.js} +11 -11
- package/dist/{Tick-BADQ8QeT.js → Tick-CRu6rQQy.js} +2 -2
- package/dist/{Tooltip-A_HlttXp.js → Tooltip-RhAldW7s.js} +13 -13
- package/dist/{XYCursor-gHAo40xC.js → XYCursor-Z-Ral42q.js} +3 -3
- package/dist/{ZoomableContainer-Brs1wHM1.js → ZoomableContainer-D1laxHnA.js} +4 -4
- package/dist/components/charts/_common/tooltip.js +2 -2
- package/dist/components/charts/_common/utils.js +2 -2
- package/dist/components/charts/candlestick/logic.js +176 -173
- package/dist/components/charts/chart-wrapper/index.js +36 -34
- package/dist/components/charts/column-line-mix/logic.js +72 -65
- package/dist/components/charts/donut-chart/logic.js +4 -4
- package/dist/components/charts/drill-down-treemap/logic.js +5 -5
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +5 -5
- package/dist/components/charts/forecast-cone/index.js +52 -0
- package/dist/components/charts/forecast-cone/logic.js +331 -0
- package/dist/components/charts/forecast-cone/styled.js +12 -0
- package/dist/components/charts/heatmap/logic.js +9 -9
- package/dist/components/charts/highlighting-line-data/logic.js +10 -10
- package/dist/components/charts/line/logic.js +96 -82
- package/dist/components/charts/logaritmic-scale/logic.js +71 -64
- package/dist/components/charts/multiple-value-axes/logic.js +101 -95
- package/dist/components/charts/nested-pie/logic.js +3 -3
- package/dist/components/charts/packed-circles/logic.js +7 -7
- package/dist/components/charts/pie-chart/logic.js +4 -4
- package/dist/components/charts/stacked-area-radar/logic.js +9 -9
- package/dist/components/charts/stacked-column-chart/logic.js +10 -10
- package/dist/components/charts/xy-chart/logic.js +74 -71
- package/dist/components/metric-card/MetricChart.js +9 -9
- package/dist/main.d.ts +82 -1
- package/dist/main.js +167 -165
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { R as I, A as W } from "../../../AnimatedTheme-
|
|
1
|
+
import { R as I, A as W } from "../../../AnimatedTheme-D3VZKKNV.js";
|
|
2
2
|
import { useThemeProps as z } from "@mui/material";
|
|
3
3
|
import { useRef as d, useLayoutEffect as S } from "react";
|
|
4
|
-
import { X as F, V } from "../../../AxisRenderer-
|
|
5
|
-
import { X as G } from "../../../XYCursor-
|
|
6
|
-
import { D as M } from "../../../DateAxis-
|
|
7
|
-
import { A as N, a as P } from "../../../AxisRendererY-
|
|
8
|
-
import { C as U } from "../../../ColorSet-
|
|
9
|
-
import { c as Z, p as w } from "../../../Entity-
|
|
10
|
-
import { L as j } from "../../../LineSeries-
|
|
11
|
-
import { T as q } from "../../../Tooltip-
|
|
12
|
-
import { L as B } from "../../../Legend-
|
|
4
|
+
import { X as F, V } from "../../../AxisRenderer-Doyw-FTI.js";
|
|
5
|
+
import { X as G } from "../../../XYCursor-Z-Ral42q.js";
|
|
6
|
+
import { D as M } from "../../../DateAxis-lJZjbAS-.js";
|
|
7
|
+
import { A as N, a as P } from "../../../AxisRendererY-BylCU67e.js";
|
|
8
|
+
import { C as U } from "../../../ColorSet-DGLMpbL3.js";
|
|
9
|
+
import { c as Z, p as w } from "../../../Entity-4Lr2piVN.js";
|
|
10
|
+
import { L as j } from "../../../LineSeries-Dg1aytHA.js";
|
|
11
|
+
import { T as q } from "../../../Tooltip-RhAldW7s.js";
|
|
12
|
+
import { L as B } from "../../../Legend-CTb6rZz_.js";
|
|
13
13
|
const ie = (v) => {
|
|
14
14
|
const u = z({
|
|
15
15
|
props: v,
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { R as
|
|
2
|
-
import { useThemeProps as
|
|
1
|
+
import { R as H, T as Z, A as $ } from "../../../AnimatedTheme-D3VZKKNV.js";
|
|
2
|
+
import { useThemeProps as j, useTheme as q } from "@mui/material";
|
|
3
3
|
import U from "lodash";
|
|
4
|
-
import { useId as
|
|
5
|
-
import { humanizeLabel as
|
|
6
|
-
import { attachCombinedAxisTooltip as
|
|
7
|
-
import { colorSetFromPalette as
|
|
8
|
-
import { c as p, p as
|
|
9
|
-
import { X as oe, V as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
4
|
+
import { useId as J, useRef as K, useEffect as Q } from "react";
|
|
5
|
+
import { humanizeLabel as ee } from "../_common/format.js";
|
|
6
|
+
import { attachCombinedAxisTooltip as te } from "../_common/tooltip.js";
|
|
7
|
+
import { colorSetFromPalette as re, applyValueFormat as se } from "../_common/utils.js";
|
|
8
|
+
import { c as p, p as X, b as V } from "../../../Entity-4Lr2piVN.js";
|
|
9
|
+
import { X as oe, V as ae } from "../../../AxisRenderer-Doyw-FTI.js";
|
|
10
|
+
import { A as _, a as ie } from "../../../AxisRendererY-BylCU67e.js";
|
|
11
|
+
import { C as ne } from "../../../CategoryAxis-B5uTZjhL.js";
|
|
12
|
+
import { L as le } from "../../../LineSeries-Dg1aytHA.js";
|
|
13
|
+
import { D as me } from "../../../DataProcessor-WXzhvIg6.js";
|
|
14
|
+
import { B as de } from "../../../Bullet-C6357hTv.js";
|
|
15
|
+
import { C as pe } from "../../../Circle-DhzVdFBd.js";
|
|
16
|
+
import { X as ce } from "../../../XYCursor-Z-Ral42q.js";
|
|
17
|
+
import { L as ue } from "../../../Legend-CTb6rZz_.js";
|
|
18
|
+
import { G as fe } from "../../../GaplessDateAxis-DowssQ6y.js";
|
|
19
|
+
import { D as he } from "../../../DateAxis-lJZjbAS-.js";
|
|
20
|
+
const B = 1.1, ge = {
|
|
20
21
|
millisecond: 1,
|
|
21
22
|
second: 1e3,
|
|
22
23
|
minute: 6e4,
|
|
@@ -25,33 +26,34 @@ const B = 1.1, fe = {
|
|
|
25
26
|
week: 6048e5,
|
|
26
27
|
month: 2592e6,
|
|
27
28
|
year: 31536e6
|
|
28
|
-
},
|
|
29
|
-
const
|
|
29
|
+
}, _e = (E) => {
|
|
30
|
+
const b = j({ props: E, name: "HCLineChart" }), {
|
|
30
31
|
dimensions: t,
|
|
31
32
|
values: m,
|
|
32
33
|
data: g,
|
|
33
34
|
initDelay: P = 0,
|
|
34
35
|
baseInterval: i,
|
|
35
|
-
colors:
|
|
36
|
+
colors: L,
|
|
36
37
|
connectMissingData: k = !0,
|
|
38
|
+
skipEmptyDates: v = !1,
|
|
37
39
|
sx: R,
|
|
38
40
|
...W
|
|
39
|
-
} =
|
|
41
|
+
} = b, l = q(), N = `hc-line-chart-${J().replace(/:/g, "")}`, C = K(null);
|
|
40
42
|
let A = null;
|
|
41
|
-
t.length < 1 ? A = "Missing dimensions config!" : m.length < 1 && (A = "Missing values config!"),
|
|
43
|
+
t.length < 1 ? A = "Missing dimensions config!" : m.length < 1 && (A = "Missing values config!"), Q(() => {
|
|
42
44
|
if (A) return;
|
|
43
|
-
let
|
|
44
|
-
return
|
|
45
|
-
var
|
|
46
|
-
const e =
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
e.setThemes([
|
|
45
|
+
let T;
|
|
46
|
+
return T = setTimeout(() => {
|
|
47
|
+
var G, O, I, M;
|
|
48
|
+
const e = H.new(N);
|
|
49
|
+
C.current = e;
|
|
50
|
+
const z = Z.new(e);
|
|
51
|
+
e.setThemes([$.new(e), z]), e.interfaceColors.setAll({
|
|
50
52
|
text: p(l.palette.text.primary),
|
|
51
53
|
grid: p(l.palette.divider),
|
|
52
54
|
stroke: p(l.palette.divider)
|
|
53
55
|
});
|
|
54
|
-
const
|
|
56
|
+
const s = e.container.children.push(
|
|
55
57
|
oe.new(e, {
|
|
56
58
|
panX: !0,
|
|
57
59
|
panY: !0,
|
|
@@ -63,44 +65,48 @@ const B = 1.1, fe = {
|
|
|
63
65
|
pinchZoomX: !0
|
|
64
66
|
})
|
|
65
67
|
);
|
|
66
|
-
|
|
68
|
+
s.set("colors", re(e, L));
|
|
67
69
|
let n, c = g;
|
|
68
|
-
t[0].type === "date"
|
|
70
|
+
if (t[0].type === "date") {
|
|
71
|
+
const o = v ? fe : he;
|
|
72
|
+
n = s.xAxes.push(
|
|
73
|
+
o.new(e, {
|
|
74
|
+
maxDeviation: 0.1,
|
|
75
|
+
groupData: !1,
|
|
76
|
+
baseInterval: i || { timeUnit: "day", count: 1 },
|
|
77
|
+
renderer: _.new(e, {})
|
|
78
|
+
})
|
|
79
|
+
), c = U.orderBy(g, [t[0].value]);
|
|
80
|
+
} else
|
|
81
|
+
n = s.xAxes.push(
|
|
82
|
+
ne.new(e, {
|
|
83
|
+
categoryField: t[0].value,
|
|
84
|
+
renderer: _.new(e, {})
|
|
85
|
+
})
|
|
86
|
+
), e.numberFormatter.setAll({
|
|
87
|
+
numberFormat: "#",
|
|
88
|
+
numericFields: ["valueX"]
|
|
89
|
+
}), c = U.orderBy(g, [t[0].value]), n.data.setAll(c);
|
|
90
|
+
const Y = s.yAxes.push(
|
|
69
91
|
ae.new(e, {
|
|
70
|
-
maxDeviation: 0.1,
|
|
71
|
-
groupData: !1,
|
|
72
|
-
baseInterval: i || { timeUnit: "day", count: 1 },
|
|
73
|
-
renderer: _.new(e, {})
|
|
74
|
-
})
|
|
75
|
-
), c = U.orderBy(g, [t[0].value])) : (n = o.xAxes.push(
|
|
76
|
-
ne.new(e, {
|
|
77
|
-
categoryField: t[0].value,
|
|
78
|
-
renderer: _.new(e, {})
|
|
79
|
-
})
|
|
80
|
-
), e.numberFormatter.setAll({
|
|
81
|
-
numberFormat: "#",
|
|
82
|
-
numericFields: ["valueX"]
|
|
83
|
-
}), c = U.orderBy(g, [t[0].value]), n.data.setAll(c));
|
|
84
|
-
const N = o.yAxes.push(
|
|
85
|
-
se.new(e, {
|
|
86
92
|
renderer: ie.new(e, {})
|
|
87
93
|
})
|
|
88
94
|
);
|
|
89
|
-
(
|
|
95
|
+
(G = n.get("renderer")) == null || G.grid.template.setAll({
|
|
90
96
|
stroke: p(l.palette.divider),
|
|
91
97
|
strokeOpacity: 1
|
|
92
|
-
}), (O = n.get("renderer")) == null || O.labels.template.setAll({ paddingTop: 12 }), (I =
|
|
98
|
+
}), (O = n.get("renderer")) == null || O.labels.template.setAll({ paddingTop: 12 }), (I = Y.get("renderer")) == null || I.grid.template.setAll({
|
|
93
99
|
stroke: p(l.palette.divider),
|
|
94
100
|
strokeOpacity: 1
|
|
95
|
-
}), m.forEach((
|
|
96
|
-
const a =
|
|
101
|
+
}), m.forEach((o) => {
|
|
102
|
+
const a = s.series.push(
|
|
97
103
|
le.new(e, {
|
|
98
104
|
// Legend/tooltip label: explicit override, else humanize the raw
|
|
99
105
|
// backend field (snake_case / lowercase → Title Case).
|
|
100
|
-
name:
|
|
106
|
+
name: o.label ?? ee(o.name),
|
|
101
107
|
xAxis: n,
|
|
102
|
-
yAxis:
|
|
103
|
-
valueYField:
|
|
108
|
+
yAxis: Y,
|
|
109
|
+
valueYField: o.dataFieldName,
|
|
104
110
|
// When false, the line breaks at missing points. On a date axis the
|
|
105
111
|
// break is auto-detected when adjacent points are spaced more than
|
|
106
112
|
// `autoGapCount` (default 1.1) base intervals apart, so absent dates
|
|
@@ -113,17 +119,17 @@ const B = 1.1, fe = {
|
|
|
113
119
|
if (t[0].type === "date" && (a.data.processor = me.new(e, {
|
|
114
120
|
dateFormat: "i",
|
|
115
121
|
dateFields: [t[0].value]
|
|
116
|
-
})), t[0].type === "date") {
|
|
117
|
-
const y = t[0].value, x =
|
|
122
|
+
})), t[0].type === "date" && !v) {
|
|
123
|
+
const y = t[0].value, x = ge[(i == null ? void 0 : i.timeUnit) ?? "day"] * ((i == null ? void 0 : i.count) ?? 1), d = k ? 1 / 0 : x * B, w = c.map((r) => ({
|
|
118
124
|
t: new Date(r[y]).getTime(),
|
|
119
|
-
hasValue: r[
|
|
120
|
-
})).filter((r) => r.hasValue && !Number.isNaN(r.t)),
|
|
125
|
+
hasValue: r[o.dataFieldName] !== null && r[o.dataFieldName] !== void 0
|
|
126
|
+
})).filter((r) => r.hasValue && !Number.isNaN(r.t)), D = /* @__PURE__ */ new Set();
|
|
121
127
|
w.forEach((r, f) => {
|
|
122
128
|
const F = f > 0 ? r.t - w[f - 1].t : 1 / 0, h = f < w.length - 1 ? w[f + 1].t - r.t : 1 / 0;
|
|
123
|
-
F > d && h > d &&
|
|
124
|
-
}),
|
|
129
|
+
F > d && h > d && D.add(r.t);
|
|
130
|
+
}), D.size > 0 && a.bullets.push((r, f, F) => {
|
|
125
131
|
const h = F.dataContext;
|
|
126
|
-
if (
|
|
132
|
+
if (D.has(new Date(h == null ? void 0 : h[y]).getTime()))
|
|
127
133
|
return de.new(r, {
|
|
128
134
|
sprite: pe.new(r, {
|
|
129
135
|
radius: 3,
|
|
@@ -135,56 +141,64 @@ const B = 1.1, fe = {
|
|
|
135
141
|
});
|
|
136
142
|
}
|
|
137
143
|
a.data.setAll(c), a.strokes.template.setAll({ strokeWidth: 2 }), a.appear();
|
|
138
|
-
}),
|
|
144
|
+
}), s.set(
|
|
139
145
|
"cursor",
|
|
140
146
|
ce.new(e, { xAxis: n, behavior: "none" })
|
|
141
|
-
).lineY.set("visible", !1),
|
|
147
|
+
).lineY.set("visible", !1), te({
|
|
142
148
|
root: e,
|
|
143
|
-
chart:
|
|
149
|
+
chart: s,
|
|
144
150
|
xAxis: n,
|
|
145
151
|
theme: l,
|
|
146
152
|
isDateAxis: t[0].type === "date",
|
|
147
153
|
baseInterval: i,
|
|
148
154
|
follow: !0
|
|
149
155
|
});
|
|
150
|
-
const u =
|
|
156
|
+
const u = s.bottomAxesContainer.children.push(
|
|
151
157
|
ue.new(e, {
|
|
152
|
-
width:
|
|
158
|
+
width: X(100),
|
|
153
159
|
paddingTop: 10,
|
|
154
|
-
centerX:
|
|
155
|
-
x:
|
|
160
|
+
centerX: X(50),
|
|
161
|
+
x: X(50),
|
|
156
162
|
layout: e.gridLayout
|
|
157
163
|
})
|
|
158
164
|
);
|
|
159
|
-
u.itemContainers.template.events.on("pointerover", function(
|
|
165
|
+
u.itemContainers.template.events.on("pointerover", function(o) {
|
|
160
166
|
var x;
|
|
161
|
-
const a =
|
|
162
|
-
|
|
167
|
+
const a = o.target, y = (x = a == null ? void 0 : a.dataItem) == null ? void 0 : x.dataContext;
|
|
168
|
+
s.series.each(function(d) {
|
|
163
169
|
d !== y ? d.strokes.template.setAll({
|
|
164
170
|
strokeOpacity: 0.15,
|
|
165
171
|
stroke: p(0)
|
|
166
172
|
}) : d.strokes.template.setAll({ strokeWidth: 3 });
|
|
167
173
|
});
|
|
168
174
|
}), u.itemContainers.template.events.on("pointerout", function() {
|
|
169
|
-
|
|
170
|
-
|
|
175
|
+
s.series.each(function(o) {
|
|
176
|
+
o.strokes.template.setAll({
|
|
171
177
|
strokeOpacity: 1,
|
|
172
178
|
strokeWidth: 2,
|
|
173
|
-
stroke:
|
|
179
|
+
stroke: o.get("fill")
|
|
174
180
|
});
|
|
175
181
|
});
|
|
176
182
|
}), u.itemContainers.template.set("width", V), u.valueLabels.template.setAll({
|
|
177
183
|
width: V,
|
|
178
184
|
textAlign: "right"
|
|
179
|
-
}), u.data.setAll(
|
|
185
|
+
}), u.data.setAll(s.series.values), se(e, (M = m == null ? void 0 : m[0]) == null ? void 0 : M.format), s.appear(1e3, 100);
|
|
180
186
|
}, P), () => {
|
|
181
187
|
var e;
|
|
182
|
-
|
|
188
|
+
T && clearTimeout(T), (e = C.current) == null || e.dispose(), C.current = null;
|
|
183
189
|
};
|
|
184
|
-
}, [
|
|
185
|
-
|
|
186
|
-
|
|
190
|
+
}, [
|
|
191
|
+
g,
|
|
192
|
+
t,
|
|
193
|
+
m,
|
|
194
|
+
l.palette.mode,
|
|
195
|
+
L,
|
|
196
|
+
k,
|
|
197
|
+
v
|
|
198
|
+
]);
|
|
199
|
+
const S = { ...b };
|
|
200
|
+
return { chartId: N, ownerState: S, sx: R, error: A, other: W };
|
|
187
201
|
};
|
|
188
202
|
export {
|
|
189
|
-
|
|
203
|
+
_e as useLineChartLogic
|
|
190
204
|
};
|
|
@@ -1,44 +1,46 @@
|
|
|
1
|
-
import { R as
|
|
2
|
-
import { useThemeProps as
|
|
1
|
+
import { R as Y, A as R } from "../../../AnimatedTheme-D3VZKKNV.js";
|
|
2
|
+
import { useThemeProps as E, useTheme as I } from "@mui/material";
|
|
3
3
|
import F from "lodash";
|
|
4
|
-
import { useId as
|
|
4
|
+
import { useId as G, useRef as O, useEffect as P } from "react";
|
|
5
5
|
import { humanizeLabel as V } from "../_common/format.js";
|
|
6
6
|
import { attachCombinedAxisTooltip as q } from "../_common/tooltip.js";
|
|
7
7
|
import { colorSetFromPalette as z, applyValueFormat as B } from "../_common/utils.js";
|
|
8
|
-
import { c as i } from "../../../Entity-
|
|
9
|
-
import { X as
|
|
10
|
-
import { X as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
import { c as i } from "../../../Entity-4Lr2piVN.js";
|
|
9
|
+
import { X as H, V as N } from "../../../AxisRenderer-Doyw-FTI.js";
|
|
10
|
+
import { X as U } from "../../../XYCursor-Z-Ral42q.js";
|
|
11
|
+
import { A as X, a as W } from "../../../AxisRendererY-BylCU67e.js";
|
|
12
|
+
import { C as Z } from "../../../CategoryAxis-B5uTZjhL.js";
|
|
13
|
+
import { L as _ } from "../../../LineSeries-Dg1aytHA.js";
|
|
14
|
+
import { D as $ } from "../../../DataProcessor-WXzhvIg6.js";
|
|
15
|
+
import { S as j } from "../../../Scrollbar-CSoXoZSe.js";
|
|
16
|
+
import { G as J } from "../../../GaplessDateAxis-DowssQ6y.js";
|
|
17
|
+
import { D as K } from "../../../DateAxis-lJZjbAS-.js";
|
|
18
|
+
const xe = (k) => {
|
|
19
|
+
const f = E({ props: k, name: "HCLogaritmicScale" }), {
|
|
19
20
|
dimensions: t,
|
|
20
21
|
values: s,
|
|
21
|
-
data:
|
|
22
|
-
initDelay:
|
|
22
|
+
data: n,
|
|
23
|
+
initDelay: S = 0,
|
|
23
24
|
baseInterval: h,
|
|
24
25
|
colors: A,
|
|
25
|
-
|
|
26
|
+
skipEmptyDates: x = !1,
|
|
27
|
+
sx: C,
|
|
26
28
|
...L
|
|
27
|
-
} = f, o = I(), g = `hc-logaritmic-scale-${
|
|
28
|
-
let
|
|
29
|
-
t.length < 1 ?
|
|
30
|
-
if (
|
|
31
|
-
let
|
|
32
|
-
return
|
|
33
|
-
var
|
|
34
|
-
const e =
|
|
35
|
-
|
|
29
|
+
} = f, o = I(), g = `hc-logaritmic-scale-${G().replace(/:/g, "")}`, d = O(null);
|
|
30
|
+
let m = null;
|
|
31
|
+
t.length < 1 ? m = "LogaritmicScale requires at least 1 dimension" : s.length < 1 && (m = "LogaritmicScale requires at least 1 value"), P(() => {
|
|
32
|
+
if (m) return;
|
|
33
|
+
let u;
|
|
34
|
+
return u = setTimeout(() => {
|
|
35
|
+
var v, w, D, b;
|
|
36
|
+
const e = Y.new(g);
|
|
37
|
+
d.current = e, e.setThemes([R.new(e)]), e.interfaceColors.setAll({
|
|
36
38
|
text: i(o.palette.text.primary),
|
|
37
39
|
grid: i(o.palette.divider),
|
|
38
40
|
stroke: i(o.palette.divider)
|
|
39
41
|
});
|
|
40
42
|
const r = e.container.children.push(
|
|
41
|
-
|
|
43
|
+
H.new(e, {
|
|
42
44
|
panX: !0,
|
|
43
45
|
panY: !0,
|
|
44
46
|
wheelX: "none",
|
|
@@ -49,54 +51,59 @@ const fe = (D) => {
|
|
|
49
51
|
);
|
|
50
52
|
r.set("colors", z(e, A)), r.set(
|
|
51
53
|
"cursor",
|
|
52
|
-
|
|
54
|
+
U.new(e, { behavior: "none" })
|
|
53
55
|
).lineY.set("visible", !1);
|
|
54
|
-
let a,
|
|
55
|
-
t[0].type === "date"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
56
|
+
let a, p = n;
|
|
57
|
+
if (t[0].type === "date") {
|
|
58
|
+
p = F.orderBy(n, [t[0].value]);
|
|
59
|
+
const l = x ? J : K;
|
|
60
|
+
a = r.xAxes.push(
|
|
61
|
+
l.new(e, {
|
|
62
|
+
maxDeviation: 0.1,
|
|
63
|
+
groupData: !1,
|
|
64
|
+
baseInterval: h || { timeUnit: "day", count: 1 },
|
|
65
|
+
renderer: X.new(e, {})
|
|
66
|
+
})
|
|
67
|
+
), (v = a.get("renderer")) == null || v.grid.template.setAll({
|
|
68
|
+
stroke: i(o.palette.divider),
|
|
69
|
+
strokeOpacity: 1
|
|
70
|
+
});
|
|
71
|
+
} else
|
|
72
|
+
a = r.xAxes.push(
|
|
73
|
+
Z.new(e, {
|
|
74
|
+
categoryField: t[0].value,
|
|
75
|
+
renderer: X.new(e, {})
|
|
76
|
+
})
|
|
77
|
+
), e.numberFormatter.setAll({
|
|
78
|
+
numberFormat: "#",
|
|
79
|
+
numericFields: ["valueX"]
|
|
80
|
+
}), p = F.orderBy(n, [t[0].value]), a.data.setAll(p), (w = a.get("renderer")) == null || w.grid.template.setAll({
|
|
81
|
+
stroke: i(o.palette.divider),
|
|
82
|
+
strokeOpacity: 1
|
|
83
|
+
});
|
|
84
|
+
const y = r.yAxes.push(
|
|
85
|
+
N.new(e, {
|
|
79
86
|
logarithmic: !0,
|
|
80
87
|
renderer: W.new(e, { minorGridEnabled: !0 })
|
|
81
88
|
})
|
|
82
89
|
);
|
|
83
|
-
(
|
|
90
|
+
(D = y.get("renderer")) == null || D.grid.template.setAll({
|
|
84
91
|
stroke: i(o.palette.divider),
|
|
85
92
|
strokeOpacity: 1
|
|
86
|
-
}), s.forEach((
|
|
93
|
+
}), s.forEach((l) => {
|
|
87
94
|
const c = r.series.push(
|
|
88
95
|
_.new(e, {
|
|
89
|
-
name:
|
|
96
|
+
name: l.label ?? V(l.name),
|
|
90
97
|
xAxis: a,
|
|
91
|
-
yAxis:
|
|
92
|
-
valueYField:
|
|
98
|
+
yAxis: y,
|
|
99
|
+
valueYField: l.dataFieldName,
|
|
93
100
|
...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value }
|
|
94
101
|
})
|
|
95
102
|
);
|
|
96
103
|
c.strokes.template.setAll({ strokeWidth: 3 }), t[0].type === "date" && (c.data.processor = $.new(e, {
|
|
97
104
|
dateFormat: "i",
|
|
98
105
|
dateFields: [t[0].value]
|
|
99
|
-
})), c.data.setAll(
|
|
106
|
+
})), c.data.setAll(p), c.appear(1e3);
|
|
100
107
|
}), q({
|
|
101
108
|
root: e,
|
|
102
109
|
chart: r,
|
|
@@ -109,14 +116,14 @@ const fe = (D) => {
|
|
|
109
116
|
"scrollbarX",
|
|
110
117
|
j.new(e, { orientation: "horizontal" })
|
|
111
118
|
), B(e, (b = s == null ? void 0 : s[0]) == null ? void 0 : b.format), r.appear(1e3, 100);
|
|
112
|
-
},
|
|
119
|
+
}, S), () => {
|
|
113
120
|
var e;
|
|
114
|
-
|
|
121
|
+
u && clearTimeout(u), (e = d.current) == null || e.dispose(), d.current = null;
|
|
115
122
|
};
|
|
116
|
-
}, [
|
|
123
|
+
}, [n, t, s, o.palette.mode, A, x]);
|
|
117
124
|
const T = { ...f };
|
|
118
|
-
return { chartId: g, ownerState: T, sx:
|
|
125
|
+
return { chartId: g, ownerState: T, sx: C, error: m, other: L };
|
|
119
126
|
};
|
|
120
127
|
export {
|
|
121
|
-
|
|
128
|
+
xe as useLogaritmicScaleLogic
|
|
122
129
|
};
|