@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.
Files changed (51) hide show
  1. package/dist/{AnimatedTheme-BOKdw2Oy.js → AnimatedTheme-D3VZKKNV.js} +6 -6
  2. package/dist/{AxisRenderer-lUbezuh7.js → AxisRenderer-Doyw-FTI.js} +6 -6
  3. package/dist/{AxisRendererY-DbSiyb45.js → AxisRendererY-BylCU67e.js} +3 -3
  4. package/dist/{Bullet-PgoNb3Jv.js → Bullet-C6357hTv.js} +1 -1
  5. package/dist/{Button-XBf4Mwz-.js → Button-DGOT8RcT.js} +3 -3
  6. package/dist/{CategoryAxis-B8KQp1pE.js → CategoryAxis-B5uTZjhL.js} +3 -3
  7. package/dist/{Circle-BWRdiMpG.js → Circle-DhzVdFBd.js} +1 -1
  8. package/dist/{ColorSet-DDmFoKtZ.js → ColorSet-DGLMpbL3.js} +1 -1
  9. package/dist/{ColumnSeries-rgnGm-Bg.js → ColumnSeries-CqJ-563p.js} +28 -28
  10. package/dist/{DataProcessor-CvIe9BVn.js → DataProcessor-WXzhvIg6.js} +1 -1
  11. package/dist/{DateAxis-zNtbSVjW.js → DateAxis-lJZjbAS-.js} +4 -4
  12. package/dist/{Entity-CCUIdRAr.js → Entity-4Lr2piVN.js} +66 -66
  13. package/dist/GaplessDateAxis-DowssQ6y.js +296 -0
  14. package/dist/{Hierarchy-CCvGsF1A.js → Hierarchy-DPEcTr0v.js} +8 -8
  15. package/dist/{Legend-kbCFjJAW.js → Legend-CTb6rZz_.js} +4 -4
  16. package/dist/{LineSeries-BLFvwrLT.js → LineSeries-Dg1aytHA.js} +4 -4
  17. package/dist/{LinearGradient-C7rnipF7.js → LinearGradient-D1hzMjaW.js} +2 -2
  18. package/dist/{PieSeries-3iLRbqFv.js → PieSeries-C9YUWMnA.js} +8 -8
  19. package/dist/{RoundedRectangle-CqMMmPM0.js → RoundedRectangle-B23Oh_r6.js} +2 -2
  20. package/dist/{Scrollbar-BzSBcIUt.js → Scrollbar-CSoXoZSe.js} +4 -4
  21. package/dist/{Slice-CS23iLiS.js → Slice-CIP7Vmzu.js} +11 -11
  22. package/dist/{Tick-BADQ8QeT.js → Tick-CRu6rQQy.js} +2 -2
  23. package/dist/{Tooltip-A_HlttXp.js → Tooltip-RhAldW7s.js} +13 -13
  24. package/dist/{XYCursor-gHAo40xC.js → XYCursor-Z-Ral42q.js} +3 -3
  25. package/dist/{ZoomableContainer-Brs1wHM1.js → ZoomableContainer-D1laxHnA.js} +4 -4
  26. package/dist/components/charts/_common/tooltip.js +2 -2
  27. package/dist/components/charts/_common/utils.js +2 -2
  28. package/dist/components/charts/candlestick/logic.js +176 -173
  29. package/dist/components/charts/chart-wrapper/index.js +36 -34
  30. package/dist/components/charts/column-line-mix/logic.js +72 -65
  31. package/dist/components/charts/donut-chart/logic.js +4 -4
  32. package/dist/components/charts/drill-down-treemap/logic.js +5 -5
  33. package/dist/components/charts/drill-down-voronoi-treemap/logic.js +5 -5
  34. package/dist/components/charts/forecast-cone/index.js +52 -0
  35. package/dist/components/charts/forecast-cone/logic.js +331 -0
  36. package/dist/components/charts/forecast-cone/styled.js +12 -0
  37. package/dist/components/charts/heatmap/logic.js +9 -9
  38. package/dist/components/charts/highlighting-line-data/logic.js +10 -10
  39. package/dist/components/charts/line/logic.js +96 -82
  40. package/dist/components/charts/logaritmic-scale/logic.js +71 -64
  41. package/dist/components/charts/multiple-value-axes/logic.js +101 -95
  42. package/dist/components/charts/nested-pie/logic.js +3 -3
  43. package/dist/components/charts/packed-circles/logic.js +7 -7
  44. package/dist/components/charts/pie-chart/logic.js +4 -4
  45. package/dist/components/charts/stacked-area-radar/logic.js +9 -9
  46. package/dist/components/charts/stacked-column-chart/logic.js +10 -10
  47. package/dist/components/charts/xy-chart/logic.js +74 -71
  48. package/dist/components/metric-card/MetricChart.js +9 -9
  49. package/dist/main.d.ts +82 -1
  50. package/dist/main.js +167 -165
  51. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
- import { R as I, A as W } from "../../../AnimatedTheme-BOKdw2Oy.js";
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-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";
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 z, T as H, A as Z } from "../../../AnimatedTheme-BOKdw2Oy.js";
2
- import { useThemeProps as $, useTheme as j } from "@mui/material";
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 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 = {
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
- }, Ue = (G) => {
29
- const X = $({ props: G, name: "HCLineChart" }), {
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: b,
36
+ colors: L,
36
37
  connectMissingData: k = !0,
38
+ skipEmptyDates: v = !1,
37
39
  sx: R,
38
40
  ...W
39
- } = X, l = j(), L = `hc-line-chart-${q().replace(/:/g, "")}`, v = J(null);
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!"), K(() => {
43
+ t.length < 1 ? A = "Missing dimensions config!" : m.length < 1 && (A = "Missing values config!"), Q(() => {
42
44
  if (A) return;
43
- let C;
44
- return C = setTimeout(() => {
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({
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 o = e.container.children.push(
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
- o.set("colors", te(e, b));
68
+ s.set("colors", re(e, L));
67
69
  let n, c = g;
68
- t[0].type === "date" ? (n = o.xAxes.push(
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
- (Y = n.get("renderer")) == null || Y.grid.template.setAll({
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 = N.get("renderer")) == null || I.grid.template.setAll({
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((s) => {
96
- const a = o.series.push(
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: s.label ?? Q(s.name),
106
+ name: o.label ?? ee(o.name),
101
107
  xAxis: n,
102
- yAxis: N,
103
- valueYField: s.dataFieldName,
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 = 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) => ({
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[s.dataFieldName] !== null && r[s.dataFieldName] !== void 0
120
- })).filter((r) => r.hasValue && !Number.isNaN(r.t)), T = /* @__PURE__ */ new Set();
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 && T.add(r.t);
124
- }), T.size > 0 && a.bullets.push((r, f, F) => {
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 (T.has(new Date(h == null ? void 0 : h[y]).getTime()))
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
- }), o.set(
144
+ }), s.set(
139
145
  "cursor",
140
146
  ce.new(e, { xAxis: n, behavior: "none" })
141
- ).lineY.set("visible", !1), ee({
147
+ ).lineY.set("visible", !1), te({
142
148
  root: e,
143
- chart: o,
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 = o.bottomAxesContainer.children.push(
156
+ const u = s.bottomAxesContainer.children.push(
151
157
  ue.new(e, {
152
- width: D(100),
158
+ width: X(100),
153
159
  paddingTop: 10,
154
- centerX: D(50),
155
- x: D(50),
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(s) {
165
+ u.itemContainers.template.events.on("pointerover", function(o) {
160
166
  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) {
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
- o.series.each(function(s) {
170
- s.strokes.template.setAll({
175
+ s.series.each(function(o) {
176
+ o.strokes.template.setAll({
171
177
  strokeOpacity: 1,
172
178
  strokeWidth: 2,
173
- stroke: s.get("fill")
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(o.series.values), re(e, (M = m == null ? void 0 : m[0]) == null ? void 0 : M.format), o.appear(1e3, 100);
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
- C && clearTimeout(C), (e = v.current) == null || e.dispose(), v.current = null;
188
+ T && clearTimeout(T), (e = C.current) == null || e.dispose(), C.current = null;
183
189
  };
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 };
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
- Ue as useLineChartLogic
203
+ _e as useLineChartLogic
190
204
  };
@@ -1,44 +1,46 @@
1
- import { R as C, A as Y } from "../../../AnimatedTheme-BOKdw2Oy.js";
2
- import { useThemeProps as R, useTheme as I } from "@mui/material";
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 E, useRef as O, useEffect as P } from "react";
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-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" }), {
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: l,
22
- initDelay: k = 0,
22
+ data: n,
23
+ initDelay: S = 0,
23
24
  baseInterval: h,
24
25
  colors: A,
25
- sx: S,
26
+ skipEmptyDates: x = !1,
27
+ sx: C,
26
28
  ...L
27
- } = f, o = I(), g = `hc-logaritmic-scale-${E().replace(/:/g, "")}`, p = O(null);
28
- let n = null;
29
- t.length < 1 ? n = "LogaritmicScale requires at least 1 dimension" : s.length < 1 && (n = "LogaritmicScale requires at least 1 value"), P(() => {
30
- if (n) return;
31
- let d;
32
- return d = setTimeout(() => {
33
- var y, v, w, b;
34
- const e = C.new(g);
35
- p.current = e, e.setThemes([Y.new(e)]), e.interfaceColors.setAll({
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
- G.new(e, {
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
- N.new(e, { behavior: "none" })
54
+ U.new(e, { behavior: "none" })
53
55
  ).lineY.set("visible", !1);
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, {
57
- maxDeviation: 0.1,
58
- groupData: !1,
59
- baseInterval: h || { timeUnit: "day", count: 1 },
60
- renderer: X.new(e, {})
61
- })
62
- ), (y = a.get("renderer")) == null || y.grid.template.setAll({
63
- stroke: i(o.palette.divider),
64
- strokeOpacity: 1
65
- })) : (a = r.xAxes.push(
66
- Z.new(e, {
67
- categoryField: t[0].value,
68
- renderer: X.new(e, {})
69
- })
70
- ), e.numberFormatter.setAll({
71
- numberFormat: "#",
72
- numericFields: ["valueX"]
73
- }), m = F.orderBy(l, [t[0].value]), a.data.setAll(m), (v = a.get("renderer")) == null || v.grid.template.setAll({
74
- stroke: i(o.palette.divider),
75
- strokeOpacity: 1
76
- }));
77
- const x = r.yAxes.push(
78
- H.new(e, {
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
- (w = x.get("renderer")) == null || w.grid.template.setAll({
90
+ (D = y.get("renderer")) == null || D.grid.template.setAll({
84
91
  stroke: i(o.palette.divider),
85
92
  strokeOpacity: 1
86
- }), s.forEach((u) => {
93
+ }), s.forEach((l) => {
87
94
  const c = r.series.push(
88
95
  _.new(e, {
89
- name: u.label ?? V(u.name),
96
+ name: l.label ?? V(l.name),
90
97
  xAxis: a,
91
- yAxis: x,
92
- valueYField: u.dataFieldName,
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(m), c.appear(1e3);
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
- }, k), () => {
119
+ }, S), () => {
113
120
  var e;
114
- d && clearTimeout(d), (e = p.current) == null || e.dispose(), p.current = null;
121
+ u && clearTimeout(u), (e = d.current) == null || e.dispose(), d.current = null;
115
122
  };
116
- }, [l, t, s, o.palette.mode, A]);
123
+ }, [n, t, s, o.palette.mode, A, x]);
117
124
  const T = { ...f };
118
- return { chartId: g, ownerState: T, sx: S, error: n, other: L };
125
+ return { chartId: g, ownerState: T, sx: C, error: m, other: L };
119
126
  };
120
127
  export {
121
- fe as useLogaritmicScaleLogic
128
+ xe as useLogaritmicScaleLogic
122
129
  };