@hybridcore/ui 1.6.7 → 1.6.9

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.
Files changed (48) hide show
  1. package/dist/AnimatedTheme-BOKdw2Oy.js +7708 -0
  2. package/dist/{AxisRenderer-DTyLLA6c.js → AxisRenderer-lUbezuh7.js} +51 -49
  3. package/dist/{AxisRendererY-C_ItLPNV.js → AxisRendererY-DbSiyb45.js} +3 -3
  4. package/dist/{Bullet-DVczI2TD.js → Bullet-PgoNb3Jv.js} +1 -1
  5. package/dist/{Button-CcsPEIDh.js → Button-XBf4Mwz-.js} +3 -3
  6. package/dist/{CategoryAxis-CwnfaGc8.js → CategoryAxis-B8KQp1pE.js} +3 -3
  7. package/dist/{Circle-Cy5s-pVc.js → Circle-BWRdiMpG.js} +1 -1
  8. package/dist/ColorSet-DDmFoKtZ.js +77 -0
  9. package/dist/{ColumnSeries-CjgdJ2QL.js → ColumnSeries-rgnGm-Bg.js} +4 -4
  10. package/dist/{DataProcessor-CHDO51q4.js → DataProcessor-CvIe9BVn.js} +1 -1
  11. package/dist/{DateAxis-YX3QNIB-.js → DateAxis-zNtbSVjW.js} +8 -7
  12. package/dist/{ColorSet-C7vpNXhM.js → Entity-CCUIdRAr.js} +638 -712
  13. package/dist/{Hierarchy-Bihj0S61.js → Hierarchy-CCvGsF1A.js} +25 -23
  14. package/dist/{Legend-Dp_MKfS4.js → Legend-kbCFjJAW.js} +11 -10
  15. package/dist/{LineSeries-Uiv5o56b.js → LineSeries-BLFvwrLT.js} +13 -12
  16. package/dist/{LinearGradient-DiRq5YcI.js → LinearGradient-C7rnipF7.js} +11 -11
  17. package/dist/{PieSeries-B2fW3z0s.js → PieSeries-3iLRbqFv.js} +34 -32
  18. package/dist/{RoundedRectangle-CWLi2PXn.js → RoundedRectangle-CqMMmPM0.js} +4 -4
  19. package/dist/{Scrollbar-D86MJyr2.js → Scrollbar-BzSBcIUt.js} +4 -4
  20. package/dist/{Slice-B19rbYDZ.js → Slice-CS23iLiS.js} +2 -2
  21. package/dist/{Tick-2bcLyHpF.js → Tick-BADQ8QeT.js} +15 -15
  22. package/dist/Tooltip-A_HlttXp.js +3606 -0
  23. package/dist/{XYCursor-C8WktvKM.js → XYCursor-gHAo40xC.js} +3 -3
  24. package/dist/{ZoomableContainer-DYyqwaMb.js → ZoomableContainer-Brs1wHM1.js} +9 -9
  25. package/dist/components/charts/_common/tooltip.js +73 -0
  26. package/dist/components/charts/_common/utils.js +10 -9
  27. package/dist/components/charts/candlestick/logic.js +181 -156
  28. package/dist/components/charts/column-line-mix/logic.js +80 -77
  29. package/dist/components/charts/donut-chart/logic.js +36 -34
  30. package/dist/components/charts/drill-down-treemap/logic.js +49 -48
  31. package/dist/components/charts/drill-down-voronoi-treemap/logic.js +102 -101
  32. package/dist/components/charts/heatmap/logic.js +33 -32
  33. package/dist/components/charts/highlighting-line-data/logic.js +26 -24
  34. package/dist/components/charts/line/logic.js +123 -174
  35. package/dist/components/charts/logaritmic-scale/logic.js +69 -60
  36. package/dist/components/charts/multiple-value-axes/logic.js +93 -88
  37. package/dist/components/charts/nested-pie/logic.js +3 -3
  38. package/dist/components/charts/packed-circles/logic.js +28 -27
  39. package/dist/components/charts/pie-chart/logic.js +43 -41
  40. package/dist/components/charts/stacked-area-radar/logic.js +124 -121
  41. package/dist/components/charts/stacked-column-chart/logic.js +107 -95
  42. package/dist/components/charts/xy-chart/logic.js +103 -91
  43. package/dist/components/metric-card/MetricChart.js +29 -28
  44. package/dist/components/metric-card/index.js +1 -1
  45. package/dist/components/metric-card/logic.js +74 -67
  46. package/dist/components/metric-card/styled.js +55 -46
  47. package/package.json +1 -1
  48. package/dist/AnimatedTheme-jnasw6rT.js +0 -11305
@@ -1,15 +1,17 @@
1
- import { R as I, A as W, T as z } from "../../../AnimatedTheme-jnasw6rT.js";
2
- import { useThemeProps as S } from "@mui/material";
3
- import { useRef as d, useLayoutEffect as F } from "react";
4
- import { X as V, V as G } from "../../../AxisRenderer-DTyLLA6c.js";
5
- import { X as M } from "../../../XYCursor-C8WktvKM.js";
6
- import { D as N } from "../../../DateAxis-YX3QNIB-.js";
7
- import { A as P, a as U } from "../../../AxisRendererY-C_ItLPNV.js";
8
- import { C as Z, c as j, p as w } from "../../../ColorSet-C7vpNXhM.js";
9
- import { L as q } from "../../../LineSeries-Uiv5o56b.js";
10
- import { L as B } from "../../../Legend-Dp_MKfS4.js";
11
- const ae = (v) => {
12
- const u = S({
1
+ import { R as I, A as W } from "../../../AnimatedTheme-BOKdw2Oy.js";
2
+ import { useThemeProps as z } from "@mui/material";
3
+ import { useRef as d, useLayoutEffect as S } from "react";
4
+ import { X as F, V } from "../../../AxisRenderer-lUbezuh7.js";
5
+ import { X as G } from "../../../XYCursor-gHAo40xC.js";
6
+ import { D as M } from "../../../DateAxis-zNtbSVjW.js";
7
+ import { A as N, a as P } from "../../../AxisRendererY-DbSiyb45.js";
8
+ import { C as U } from "../../../ColorSet-DDmFoKtZ.js";
9
+ import { c as Z, p as w } from "../../../Entity-CCUIdRAr.js";
10
+ import { L as j } from "../../../LineSeries-BLFvwrLT.js";
11
+ import { T as q } from "../../../Tooltip-A_HlttXp.js";
12
+ import { L as B } from "../../../Legend-kbCFjJAW.js";
13
+ const ie = (v) => {
14
+ const u = z({
13
15
  props: v,
14
16
  name: "HCHighlightLineChart"
15
17
  }), {
@@ -31,12 +33,12 @@ const ae = (v) => {
31
33
  loading: g,
32
34
  emptyMessage: x
33
35
  }, y = d(null), C = d(null), h = d(null);
34
- return F(() => {
36
+ return S(() => {
35
37
  if (!h.current) return;
36
38
  const e = I.new(h.current);
37
39
  C.current = e, e.setThemes([W.new(e)]);
38
40
  const o = e.container.children.push(
39
- V.new(e, {
41
+ F.new(e, {
40
42
  panX: !0,
41
43
  panY: !0,
42
44
  wheelX: "panX",
@@ -46,26 +48,26 @@ const ae = (v) => {
46
48
  );
47
49
  y.current = o, o.set(
48
50
  "cursor",
49
- M.new(e, {
51
+ G.new(e, {
50
52
  behavior: "zoomX"
51
53
  })
52
54
  ).lineY.set("visible", !1);
53
55
  const R = o.xAxes.push(
54
- N.new(e, {
56
+ M.new(e, {
55
57
  maxDeviation: 0.3,
56
58
  baseInterval: { timeUnit: "day", count: 1 },
57
- renderer: P.new(e, {
59
+ renderer: N.new(e, {
58
60
  minorGridEnabled: !0
59
61
  })
60
62
  })
61
63
  ), Y = o.yAxes.push(
62
- G.new(e, {
63
- renderer: U.new(e, {})
64
+ V.new(e, {
65
+ renderer: P.new(e, {})
64
66
  })
65
- ), c = [], b = Z.new(e, {});
67
+ ), c = [], b = U.new(e, {});
66
68
  m.forEach((t, i) => {
67
- const s = t.color ? j(t.color) : b.getIndex(i), r = o.series.push(
68
- q.new(e, {
69
+ const s = t.color ? Z(t.color) : b.getIndex(i), r = o.series.push(
70
+ j.new(e, {
69
71
  name: t.name,
70
72
  xAxis: R,
71
73
  yAxis: Y,
@@ -73,7 +75,7 @@ const ae = (v) => {
73
75
  valueXField: "date",
74
76
  stroke: s,
75
77
  fill: s,
76
- tooltip: z.new(e, {
78
+ tooltip: q.new(e, {
77
79
  labelText: "{name}: {valueY}"
78
80
  })
79
81
  })
@@ -122,5 +124,5 @@ const ae = (v) => {
122
124
  };
123
125
  };
124
126
  export {
125
- ae as useHighlightLineChartLogic
127
+ ie as useHighlightLineChartLogic
126
128
  };
@@ -1,21 +1,22 @@
1
- import { R as Z, a as q, A as J, T as K } from "../../../AnimatedTheme-jnasw6rT.js";
2
- import { useThemeProps as Q, useTheme as ee } from "@mui/material";
3
- import _ from "lodash";
4
- import { useId as te, useRef as oe, useEffect as re } from "react";
5
- import { humanizeLabel as ae } from "../_common/format.js";
6
- import { colorSetFromPalette as se, applyValueFormat as ne } from "../_common/utils.js";
7
- import { c, p as k, b as U } from "../../../ColorSet-C7vpNXhM.js";
8
- import { X as ie, V as le } from "../../../AxisRenderer-DTyLLA6c.js";
9
- import { D as me } from "../../../DateAxis-YX3QNIB-.js";
10
- import { A as V, a as de } from "../../../AxisRendererY-C_ItLPNV.js";
11
- import { C as pe } from "../../../CategoryAxis-CwnfaGc8.js";
12
- import { L as ce } from "../../../LineSeries-Uiv5o56b.js";
13
- import { D as ue } from "../../../DataProcessor-CHDO51q4.js";
14
- import { B as ye } from "../../../Bullet-DVczI2TD.js";
15
- import { C as fe } from "../../../Circle-Cy5s-pVc.js";
16
- import { X as he } from "../../../XYCursor-C8WktvKM.js";
17
- import { L as ge } from "../../../Legend-Dp_MKfS4.js";
18
- const R = 1.1, Ae = {
1
+ import { R as z, T as H, A as Z } from "../../../AnimatedTheme-BOKdw2Oy.js";
2
+ import { useThemeProps as $, useTheme as j } from "@mui/material";
3
+ import U from "lodash";
4
+ import { useId as q, useRef as J, useEffect as K } from "react";
5
+ import { humanizeLabel as Q } from "../_common/format.js";
6
+ import { attachCombinedAxisTooltip as ee } from "../_common/tooltip.js";
7
+ import { colorSetFromPalette as te, applyValueFormat as re } from "../_common/utils.js";
8
+ import { c as p, p as D, b as V } from "../../../Entity-CCUIdRAr.js";
9
+ import { X as oe, V as se } from "../../../AxisRenderer-lUbezuh7.js";
10
+ import { D as ae } from "../../../DateAxis-zNtbSVjW.js";
11
+ import { A as _, a as ie } from "../../../AxisRendererY-DbSiyb45.js";
12
+ import { C as ne } from "../../../CategoryAxis-B8KQp1pE.js";
13
+ import { L as le } from "../../../LineSeries-BLFvwrLT.js";
14
+ import { D as me } from "../../../DataProcessor-CvIe9BVn.js";
15
+ import { B as de } from "../../../Bullet-PgoNb3Jv.js";
16
+ import { C as pe } from "../../../Circle-BWRdiMpG.js";
17
+ import { X as ce } from "../../../XYCursor-gHAo40xC.js";
18
+ import { L as ue } from "../../../Legend-kbCFjJAW.js";
19
+ const B = 1.1, fe = {
19
20
  millisecond: 1,
20
21
  second: 1e3,
21
22
  minute: 6e4,
@@ -24,43 +25,34 @@ const R = 1.1, Ae = {
24
25
  week: 6048e5,
25
26
  month: 2592e6,
26
27
  year: 31536e6
27
- }, xe = {
28
- millisecond: "d MMM, yyyy HH:mm:ss.SSS",
29
- second: "d MMM, yyyy HH:mm:ss",
30
- minute: "d MMM, yyyy HH:mm",
31
- hour: "d MMM, yyyy HH:mm",
32
- day: "d MMM, yyyy",
33
- week: "d MMM, yyyy",
34
- month: "MMM yyyy",
35
- year: "yyyy"
36
- }, Ue = (B) => {
37
- const b = Q({ props: B, name: "HCLineChart" }), {
38
- dimensions: r,
39
- values: y,
40
- data: w,
41
- initDelay: E = 0,
42
- baseInterval: l,
43
- colors: X,
44
- connectMissingData: T = !0,
45
- sx: G,
46
- ...I
47
- } = b, m = ee(), H = `hc-line-chart-${te().replace(/:/g, "")}`, F = oe(null);
48
- let v = null;
49
- r.length < 1 ? v = "Missing dimensions config!" : y.length < 1 && (v = "Missing values config!"), re(() => {
50
- if (v) return;
28
+ }, Ue = (G) => {
29
+ const X = $({ props: G, name: "HCLineChart" }), {
30
+ dimensions: t,
31
+ values: m,
32
+ data: g,
33
+ initDelay: P = 0,
34
+ baseInterval: i,
35
+ colors: b,
36
+ connectMissingData: k = !0,
37
+ sx: R,
38
+ ...W
39
+ } = X, l = j(), L = `hc-line-chart-${q().replace(/:/g, "")}`, v = J(null);
40
+ let A = null;
41
+ t.length < 1 ? A = "Missing dimensions config!" : m.length < 1 && (A = "Missing values config!"), K(() => {
42
+ if (A) return;
51
43
  let C;
52
44
  return C = setTimeout(() => {
53
- var $, O, S, Y, P;
54
- const e = Z.new(H);
55
- F.current = e;
56
- const j = q.new(e);
57
- e.setThemes([J.new(e), j]), e.interfaceColors.setAll({
58
- text: c(m.palette.text.primary),
59
- grid: c(m.palette.divider),
60
- stroke: c(m.palette.divider)
45
+ var Y, O, I, M;
46
+ const e = z.new(L);
47
+ v.current = e;
48
+ const S = H.new(e);
49
+ e.setThemes([Z.new(e), S]), e.interfaceColors.setAll({
50
+ text: p(l.palette.text.primary),
51
+ grid: p(l.palette.divider),
52
+ stroke: p(l.palette.divider)
61
53
  });
62
- const n = e.container.children.push(
63
- ie.new(e, {
54
+ const o = e.container.children.push(
55
+ oe.new(e, {
64
56
  panX: !0,
65
57
  panY: !0,
66
58
  wheelX: "none",
@@ -71,170 +63,127 @@ const R = 1.1, Ae = {
71
63
  pinchZoomX: !0
72
64
  })
73
65
  );
74
- n.set("colors", se(e, X));
75
- let d, f = w;
76
- r[0].type === "date" ? (d = n.xAxes.push(
77
- me.new(e, {
66
+ o.set("colors", te(e, b));
67
+ let n, c = g;
68
+ t[0].type === "date" ? (n = o.xAxes.push(
69
+ ae.new(e, {
78
70
  maxDeviation: 0.1,
79
71
  groupData: !1,
80
- baseInterval: l || { timeUnit: "day", count: 1 },
81
- renderer: V.new(e, {})
72
+ baseInterval: i || { timeUnit: "day", count: 1 },
73
+ renderer: _.new(e, {})
82
74
  })
83
- ), f = _.orderBy(w, [r[0].value])) : (d = n.xAxes.push(
84
- pe.new(e, {
85
- categoryField: r[0].value,
86
- renderer: V.new(e, {})
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, {})
87
79
  })
88
80
  ), e.numberFormatter.setAll({
89
81
  numberFormat: "#",
90
82
  numericFields: ["valueX"]
91
- }), f = _.orderBy(w, [r[0].value]), d.data.setAll(f));
92
- const N = n.yAxes.push(
93
- le.new(e, {
94
- renderer: de.new(e, {})
83
+ }), c = U.orderBy(g, [t[0].value]), n.data.setAll(c));
84
+ const N = o.yAxes.push(
85
+ se.new(e, {
86
+ renderer: ie.new(e, {})
95
87
  })
96
88
  );
97
- ($ = d.get("renderer")) == null || $.grid.template.setAll({
98
- stroke: c(m.palette.divider),
89
+ (Y = n.get("renderer")) == null || Y.grid.template.setAll({
90
+ stroke: p(l.palette.divider),
99
91
  strokeOpacity: 1
100
- }), (O = d.get("renderer")) == null || O.labels.template.setAll({ paddingTop: 12 }), (S = N.get("renderer")) == null || S.grid.template.setAll({
101
- stroke: c(m.palette.divider),
92
+ }), (O = n.get("renderer")) == null || O.labels.template.setAll({ paddingTop: 12 }), (I = N.get("renderer")) == null || I.grid.template.setAll({
93
+ stroke: p(l.palette.divider),
102
94
  strokeOpacity: 1
103
- });
104
- const M = K.new(e, {
105
- getFillFromSprite: !1
106
- });
107
- (Y = M.get("background")) == null || Y.setAll({
108
- fill: c(m.palette.background.paper),
109
- stroke: c(m.palette.divider),
110
- fillOpacity: 1
111
- }), M.label.setAll({
112
- fill: c(m.palette.text.primary),
113
- textAlign: "left",
114
- lineHeight: k(160)
115
- });
116
- const L = xe[(l == null ? void 0 : l.timeUnit) ?? "day"], z = c(m.palette.text.secondary).toCSSHex();
117
- M.label.adapters.add("text", () => {
118
- let t = "";
119
- const a = [];
120
- if (n.series.each((i) => {
121
- const s = i.get("tooltipDataItem"), p = s == null ? void 0 : s.get("valueY");
122
- if (s === void 0 || p === void 0 || p === null)
123
- return;
124
- if (!t)
125
- if (r[0].type === "date") {
126
- const o = s.get("valueX");
127
- typeof o == "number" && (t = e.dateFormatter.format(
128
- new Date(o),
129
- L
130
- ));
131
- } else
132
- t = `${s.get("categoryX") ?? ""}`;
133
- const u = i.get("stroke"), g = u ? `[${u.toCSSHex()}]●[/] ` : "";
134
- a.push(
135
- `${g}${i.get("name")}: ${e.numberFormatter.format(
136
- p
137
- )}`
138
- );
139
- }), a.length === 0) {
140
- if (r[0].type === "date") {
141
- const s = d.positionToValue(
142
- d.getPrivate("tooltipPosition", 0)
143
- );
144
- typeof s == "number" && !Number.isNaN(s) && (t = e.dateFormatter.format(new Date(s), L));
145
- }
146
- const i = `[${z}]No data[/]`;
147
- return t ? `[bold]${t}[/]
148
- ${i}` : i;
149
- }
150
- return t ? `[bold]${t}[/]
151
- ${a.join(`
152
- `)}` : a.join(`
153
- `);
154
- }), d.set("tooltip", M), y.forEach((t) => {
155
- const a = n.series.push(
156
- ce.new(e, {
95
+ }), m.forEach((s) => {
96
+ const a = o.series.push(
97
+ le.new(e, {
157
98
  // Legend/tooltip label: explicit override, else humanize the raw
158
99
  // backend field (snake_case / lowercase → Title Case).
159
- name: t.label ?? ae(t.name),
160
- xAxis: d,
100
+ name: s.label ?? Q(s.name),
101
+ xAxis: n,
161
102
  yAxis: N,
162
- valueYField: t.dataFieldName,
103
+ valueYField: s.dataFieldName,
163
104
  // When false, the line breaks at missing points. On a date axis the
164
105
  // break is auto-detected when adjacent points are spaced more than
165
106
  // `autoGapCount` (default 1.1) base intervals apart, so absent dates
166
107
  // surface as gaps instead of being bridged by a straight segment.
167
- connect: T,
168
- autoGapCount: R,
169
- ...r[0].type === "date" ? { valueXField: r[0].value } : { categoryXField: r[0].value }
108
+ connect: k,
109
+ autoGapCount: B,
110
+ ...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value }
170
111
  })
171
112
  );
172
- if (r[0].type === "date" && (a.data.processor = ue.new(e, {
113
+ if (t[0].type === "date" && (a.data.processor = me.new(e, {
173
114
  dateFormat: "i",
174
- dateFields: [r[0].value]
175
- })), r[0].type === "date") {
176
- const i = r[0].value, s = Ae[(l == null ? void 0 : l.timeUnit) ?? "day"] * ((l == null ? void 0 : l.count) ?? 1), p = T ? 1 / 0 : s * R, u = f.map((o) => ({
177
- t: new Date(o[i]).getTime(),
178
- hasValue: o[t.dataFieldName] !== null && o[t.dataFieldName] !== void 0
179
- })).filter((o) => o.hasValue && !Number.isNaN(o.t)), g = /* @__PURE__ */ new Set();
180
- u.forEach((o, A) => {
181
- const D = A > 0 ? o.t - u[A - 1].t : 1 / 0, x = A < u.length - 1 ? u[A + 1].t - o.t : 1 / 0;
182
- D > p && x > p && g.add(o.t);
183
- }), g.size > 0 && a.bullets.push((o, A, D) => {
184
- const x = D.dataContext;
185
- if (g.has(new Date(x == null ? void 0 : x[i]).getTime()))
186
- return ye.new(o, {
187
- sprite: fe.new(o, {
115
+ dateFields: [t[0].value]
116
+ })), t[0].type === "date") {
117
+ const y = t[0].value, x = fe[(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
+ t: new Date(r[y]).getTime(),
119
+ hasValue: r[s.dataFieldName] !== null && r[s.dataFieldName] !== void 0
120
+ })).filter((r) => r.hasValue && !Number.isNaN(r.t)), T = /* @__PURE__ */ new Set();
121
+ w.forEach((r, f) => {
122
+ 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 && T.add(r.t);
124
+ }), T.size > 0 && a.bullets.push((r, f, F) => {
125
+ const h = F.dataContext;
126
+ if (T.has(new Date(h == null ? void 0 : h[y]).getTime()))
127
+ return de.new(r, {
128
+ sprite: pe.new(r, {
188
129
  radius: 3,
189
130
  fill: a.get("fill"),
190
- stroke: o.interfaceColors.get("background"),
131
+ stroke: r.interfaceColors.get("background"),
191
132
  strokeWidth: 1
192
133
  })
193
134
  });
194
135
  });
195
136
  }
196
- a.data.setAll(f), a.strokes.template.setAll({ strokeWidth: 2 }), a.appear();
197
- }), n.set(
137
+ a.data.setAll(c), a.strokes.template.setAll({ strokeWidth: 2 }), a.appear();
138
+ }), o.set(
198
139
  "cursor",
199
- he.new(e, { xAxis: d, behavior: "none" })
200
- ).lineY.set("visible", !1);
201
- const h = n.bottomAxesContainer.children.push(
202
- ge.new(e, {
203
- width: k(100),
140
+ ce.new(e, { xAxis: n, behavior: "none" })
141
+ ).lineY.set("visible", !1), ee({
142
+ root: e,
143
+ chart: o,
144
+ xAxis: n,
145
+ theme: l,
146
+ isDateAxis: t[0].type === "date",
147
+ baseInterval: i,
148
+ follow: !0
149
+ });
150
+ const u = o.bottomAxesContainer.children.push(
151
+ ue.new(e, {
152
+ width: D(100),
204
153
  paddingTop: 10,
205
- centerX: k(50),
206
- x: k(50),
154
+ centerX: D(50),
155
+ x: D(50),
207
156
  layout: e.gridLayout
208
157
  })
209
158
  );
210
- h.itemContainers.template.events.on("pointerover", function(t) {
211
- var s;
212
- const a = t.target, i = (s = a == null ? void 0 : a.dataItem) == null ? void 0 : s.dataContext;
213
- n.series.each(function(p) {
214
- p !== i ? p.strokes.template.setAll({
159
+ u.itemContainers.template.events.on("pointerover", function(s) {
160
+ var x;
161
+ const a = s.target, y = (x = a == null ? void 0 : a.dataItem) == null ? void 0 : x.dataContext;
162
+ o.series.each(function(d) {
163
+ d !== y ? d.strokes.template.setAll({
215
164
  strokeOpacity: 0.15,
216
- stroke: c(0)
217
- }) : p.strokes.template.setAll({ strokeWidth: 3 });
165
+ stroke: p(0)
166
+ }) : d.strokes.template.setAll({ strokeWidth: 3 });
218
167
  });
219
- }), h.itemContainers.template.events.on("pointerout", function() {
220
- n.series.each(function(t) {
221
- t.strokes.template.setAll({
168
+ }), u.itemContainers.template.events.on("pointerout", function() {
169
+ o.series.each(function(s) {
170
+ s.strokes.template.setAll({
222
171
  strokeOpacity: 1,
223
172
  strokeWidth: 2,
224
- stroke: t.get("fill")
173
+ stroke: s.get("fill")
225
174
  });
226
175
  });
227
- }), h.itemContainers.template.set("width", U), h.valueLabels.template.setAll({
228
- width: U,
176
+ }), u.itemContainers.template.set("width", V), u.valueLabels.template.setAll({
177
+ width: V,
229
178
  textAlign: "right"
230
- }), h.data.setAll(n.series.values), ne(e, (P = y == null ? void 0 : y[0]) == null ? void 0 : P.format), n.appear(1e3, 100);
231
- }, E), () => {
179
+ }), u.data.setAll(o.series.values), re(e, (M = m == null ? void 0 : m[0]) == null ? void 0 : M.format), o.appear(1e3, 100);
180
+ }, P), () => {
232
181
  var e;
233
- C && clearTimeout(C), (e = F.current) == null || e.dispose(), F.current = null;
182
+ C && clearTimeout(C), (e = v.current) == null || e.dispose(), v.current = null;
234
183
  };
235
- }, [w, r, y, m.palette.mode, X, T]);
236
- const W = { ...b };
237
- return { chartId: H, ownerState: W, sx: G, error: v, other: I };
184
+ }, [g, t, m, l.palette.mode, b, k]);
185
+ const E = { ...X };
186
+ return { chartId: L, ownerState: E, sx: R, error: A, other: W };
238
187
  };
239
188
  export {
240
189
  Ue as useLineChartLogic
@@ -1,113 +1,122 @@
1
- import { R as C, A as R, T as u } from "../../../AnimatedTheme-jnasw6rT.js";
2
- import { useThemeProps as I, useTheme as E } from "@mui/material";
1
+ import { R as C, A as Y } from "../../../AnimatedTheme-BOKdw2Oy.js";
2
+ import { useThemeProps as R, useTheme as I } from "@mui/material";
3
3
  import F from "lodash";
4
- import { useId as O, useRef as P, useEffect as V } from "react";
5
- import { colorSetFromPalette as q, applyValueFormat as B } from "../_common/utils.js";
6
- import { c as i } from "../../../ColorSet-C7vpNXhM.js";
7
- import { X as z, V as G } from "../../../AxisRenderer-DTyLLA6c.js";
8
- import { X as H } from "../../../XYCursor-C8WktvKM.js";
9
- import { D as N } from "../../../DateAxis-YX3QNIB-.js";
10
- import { A as X, a as U } from "../../../AxisRendererY-C_ItLPNV.js";
11
- import { C as W } from "../../../CategoryAxis-CwnfaGc8.js";
12
- import { L as Z } from "../../../LineSeries-Uiv5o56b.js";
13
- import { D as _ } from "../../../DataProcessor-CHDO51q4.js";
14
- import { S as $ } from "../../../Scrollbar-D86MJyr2.js";
15
- const ce = (b) => {
16
- const f = I({ props: b, name: "HCLogaritmicScale" }), {
4
+ import { useId as E, useRef as O, useEffect as P } from "react";
5
+ import { humanizeLabel as V } from "../_common/format.js";
6
+ import { attachCombinedAxisTooltip as q } from "../_common/tooltip.js";
7
+ import { colorSetFromPalette as z, applyValueFormat as B } from "../_common/utils.js";
8
+ import { c as i } from "../../../Entity-CCUIdRAr.js";
9
+ import { X as G, V as H } from "../../../AxisRenderer-lUbezuh7.js";
10
+ import { X as N } from "../../../XYCursor-gHAo40xC.js";
11
+ import { D as U } from "../../../DateAxis-zNtbSVjW.js";
12
+ import { A as X, a as W } from "../../../AxisRendererY-DbSiyb45.js";
13
+ import { C as Z } from "../../../CategoryAxis-B8KQp1pE.js";
14
+ import { L as _ } from "../../../LineSeries-BLFvwrLT.js";
15
+ import { D as $ } from "../../../DataProcessor-CvIe9BVn.js";
16
+ import { S as j } from "../../../Scrollbar-BzSBcIUt.js";
17
+ const fe = (D) => {
18
+ const f = R({ props: D, name: "HCLogaritmicScale" }), {
17
19
  dimensions: t,
18
- values: a,
20
+ values: s,
19
21
  data: l,
20
22
  initDelay: k = 0,
21
- baseInterval: S,
22
- colors: h,
23
- sx: T,
24
- ...D
25
- } = f, o = E(), g = `hc-logaritmic-scale-${O().replace(/:/g, "")}`, c = P(null);
23
+ baseInterval: h,
24
+ colors: A,
25
+ sx: S,
26
+ ...L
27
+ } = f, o = I(), g = `hc-logaritmic-scale-${E().replace(/:/g, "")}`, p = O(null);
26
28
  let n = null;
27
- t.length < 1 ? n = "LogaritmicScale requires at least 1 dimension" : a.length < 1 && (n = "LogaritmicScale requires at least 1 value"), V(() => {
29
+ t.length < 1 ? n = "LogaritmicScale requires at least 1 dimension" : s.length < 1 && (n = "LogaritmicScale requires at least 1 value"), P(() => {
28
30
  if (n) return;
29
31
  let d;
30
32
  return d = setTimeout(() => {
31
- var v, w, x, y;
33
+ var y, v, w, b;
32
34
  const e = C.new(g);
33
- c.current = e, e.setThemes([R.new(e)]), e.interfaceColors.setAll({
35
+ p.current = e, e.setThemes([Y.new(e)]), e.interfaceColors.setAll({
34
36
  text: i(o.palette.text.primary),
35
37
  grid: i(o.palette.divider),
36
38
  stroke: i(o.palette.divider)
37
39
  });
38
40
  const r = e.container.children.push(
39
- z.new(e, {
41
+ G.new(e, {
40
42
  panX: !0,
41
43
  panY: !0,
42
44
  wheelX: "none",
43
45
  wheelY: "none",
46
+ maxTooltipDistance: -1,
44
47
  pinchZoomX: !0
45
48
  })
46
49
  );
47
- r.set("colors", q(e, h)), r.set(
50
+ r.set("colors", z(e, A)), r.set(
48
51
  "cursor",
49
- H.new(e, { behavior: "none" })
52
+ N.new(e, { behavior: "none" })
50
53
  ).lineY.set("visible", !1);
51
- let s, m = l;
52
- t[0].type === "date" ? (m = F.orderBy(l, [t[0].value]), s = r.xAxes.push(
53
- N.new(e, {
54
+ let a, m = l;
55
+ t[0].type === "date" ? (m = F.orderBy(l, [t[0].value]), a = r.xAxes.push(
56
+ U.new(e, {
54
57
  maxDeviation: 0.1,
55
58
  groupData: !1,
56
- baseInterval: S || { timeUnit: "day", count: 1 },
57
- renderer: X.new(e, {}),
58
- tooltip: u.new(e, {})
59
+ baseInterval: h || { timeUnit: "day", count: 1 },
60
+ renderer: X.new(e, {})
59
61
  })
60
- ), (v = s.get("renderer")) == null || v.grid.template.setAll({
62
+ ), (y = a.get("renderer")) == null || y.grid.template.setAll({
61
63
  stroke: i(o.palette.divider),
62
64
  strokeOpacity: 1
63
- })) : (s = r.xAxes.push(
64
- W.new(e, {
65
+ })) : (a = r.xAxes.push(
66
+ Z.new(e, {
65
67
  categoryField: t[0].value,
66
- renderer: X.new(e, {}),
67
- tooltip: u.new(e, {})
68
+ renderer: X.new(e, {})
68
69
  })
69
70
  ), e.numberFormatter.setAll({
70
71
  numberFormat: "#",
71
72
  numericFields: ["valueX"]
72
- }), m = F.orderBy(l, [t[0].value]), s.data.setAll(m), (w = s.get("renderer")) == null || w.grid.template.setAll({
73
+ }), m = F.orderBy(l, [t[0].value]), a.data.setAll(m), (v = a.get("renderer")) == null || v.grid.template.setAll({
73
74
  stroke: i(o.palette.divider),
74
75
  strokeOpacity: 1
75
76
  }));
76
- const A = r.yAxes.push(
77
- G.new(e, {
77
+ const x = r.yAxes.push(
78
+ H.new(e, {
78
79
  logarithmic: !0,
79
- renderer: U.new(e, { minorGridEnabled: !0 })
80
+ renderer: W.new(e, { minorGridEnabled: !0 })
80
81
  })
81
82
  );
82
- (x = A.get("renderer")) == null || x.grid.template.setAll({
83
+ (w = x.get("renderer")) == null || w.grid.template.setAll({
83
84
  stroke: i(o.palette.divider),
84
85
  strokeOpacity: 1
85
- }), a.forEach((L) => {
86
- const p = r.series.push(
87
- Z.new(e, {
88
- xAxis: s,
89
- yAxis: A,
90
- valueYField: L.dataFieldName,
91
- ...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value },
92
- tooltip: u.new(e, { labelText: "{valueY}" })
86
+ }), s.forEach((u) => {
87
+ const c = r.series.push(
88
+ _.new(e, {
89
+ name: u.label ?? V(u.name),
90
+ xAxis: a,
91
+ yAxis: x,
92
+ valueYField: u.dataFieldName,
93
+ ...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value }
93
94
  })
94
95
  );
95
- p.strokes.template.setAll({ strokeWidth: 3 }), t[0].type === "date" && (p.data.processor = _.new(e, {
96
+ c.strokes.template.setAll({ strokeWidth: 3 }), t[0].type === "date" && (c.data.processor = $.new(e, {
96
97
  dateFormat: "i",
97
98
  dateFields: [t[0].value]
98
- })), p.data.setAll(m), p.appear(1e3);
99
+ })), c.data.setAll(m), c.appear(1e3);
100
+ }), q({
101
+ root: e,
102
+ chart: r,
103
+ xAxis: a,
104
+ theme: o,
105
+ isDateAxis: t[0].type === "date",
106
+ baseInterval: h,
107
+ follow: !0
99
108
  }), r.set(
100
109
  "scrollbarX",
101
- $.new(e, { orientation: "horizontal" })
102
- ), B(e, (y = a == null ? void 0 : a[0]) == null ? void 0 : y.format), r.appear(1e3, 100);
110
+ j.new(e, { orientation: "horizontal" })
111
+ ), B(e, (b = s == null ? void 0 : s[0]) == null ? void 0 : b.format), r.appear(1e3, 100);
103
112
  }, k), () => {
104
113
  var e;
105
- d && clearTimeout(d), (e = c.current) == null || e.dispose(), c.current = null;
114
+ d && clearTimeout(d), (e = p.current) == null || e.dispose(), p.current = null;
106
115
  };
107
- }, [l, t, a, o.palette.mode, h]);
108
- const Y = { ...f };
109
- return { chartId: g, ownerState: Y, sx: T, error: n, other: D };
116
+ }, [l, t, s, o.palette.mode, A]);
117
+ const T = { ...f };
118
+ return { chartId: g, ownerState: T, sx: S, error: n, other: L };
110
119
  };
111
120
  export {
112
- ce as useLogaritmicScaleLogic
121
+ fe as useLogaritmicScaleLogic
113
122
  };