@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,18 +1,19 @@
|
|
|
1
|
-
import { R as
|
|
2
|
-
import { useTheme as
|
|
3
|
-
import
|
|
4
|
-
import { useRef as
|
|
5
|
-
import { getTooltipDateFormat as
|
|
6
|
-
import { m as
|
|
7
|
-
import { X as
|
|
8
|
-
import { X as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
1
|
+
import { R as le, A as ne } from "../../../AnimatedTheme-D3VZKKNV.js";
|
|
2
|
+
import { useTheme as he, useThemeProps as ce } from "@mui/material";
|
|
3
|
+
import ue from "lodash";
|
|
4
|
+
import { useRef as N, useLayoutEffect as ge, useEffect as B } from "react";
|
|
5
|
+
import { getTooltipDateFormat as pe, attachCursorTooltip as me } from "../_common/tooltip.js";
|
|
6
|
+
import { m as U, e as Z, c as p, p as de } from "../../../Entity-4Lr2piVN.js";
|
|
7
|
+
import { X as fe, V as q } from "../../../AxisRenderer-Doyw-FTI.js";
|
|
8
|
+
import { X as we } from "../../../XYCursor-Z-Ral42q.js";
|
|
9
|
+
import { A as xe, a as J } from "../../../AxisRendererY-BylCU67e.js";
|
|
10
|
+
import { C as G } from "../../../ColumnSeries-CqJ-563p.js";
|
|
11
|
+
import { R as te } from "../../../RoundedRectangle-B23Oh_r6.js";
|
|
12
|
+
import { a as K, b as Q } from "../../../Tooltip-RhAldW7s.js";
|
|
13
|
+
import { D as ee } from "../../../DataProcessor-WXzhvIg6.js";
|
|
14
|
+
import { G as Ye } from "../../../GaplessDateAxis-DowssQ6y.js";
|
|
15
|
+
import { D as ye } from "../../../DateAxis-lJZjbAS-.js";
|
|
16
|
+
class T extends te {
|
|
16
17
|
_beforeChanged() {
|
|
17
18
|
super._beforeChanged(), (this.isDirty("lowX0") || this.isDirty("lowY0") || this.isDirty("lowX1") || this.isDirty("lowY1") || this.isDirty("highX0") || this.isDirty("highX1") || this.isDirty("highY0") || this.isDirty("highY1")) && (this._clear = !0);
|
|
18
19
|
}
|
|
@@ -32,130 +33,132 @@ Object.defineProperty(T, "classNames", {
|
|
|
32
33
|
enumerable: !0,
|
|
33
34
|
configurable: !0,
|
|
34
35
|
writable: !0,
|
|
35
|
-
value:
|
|
36
|
+
value: te.classNames.concat([T.className])
|
|
36
37
|
});
|
|
37
|
-
class
|
|
38
|
+
class V extends G {
|
|
38
39
|
constructor() {
|
|
39
40
|
super(...arguments), Object.defineProperty(this, "columns", {
|
|
40
41
|
enumerable: !0,
|
|
41
42
|
configurable: !0,
|
|
42
43
|
writable: !0,
|
|
43
|
-
value: this.addDisposer(new
|
|
44
|
+
value: this.addDisposer(new K(Q.new({
|
|
44
45
|
themeTags: ["autocolor"]
|
|
45
46
|
}), () => T._new(this._root, {
|
|
46
|
-
themeTags:
|
|
47
|
+
themeTags: U(this.columns.template.get("themeTags", []), ["candlestick", "series", "column"])
|
|
47
48
|
}, [this.columns.template])))
|
|
48
49
|
});
|
|
49
50
|
}
|
|
50
51
|
/**
|
|
51
52
|
* @ignore
|
|
52
53
|
*/
|
|
53
|
-
makeColumn(e,
|
|
54
|
-
const
|
|
55
|
-
return this.get("turboMode") ?
|
|
54
|
+
makeColumn(e, s) {
|
|
55
|
+
const m = s.make();
|
|
56
|
+
return this.get("turboMode") ? m.virtualParent = this.chart : this.mainContainer.children.push(m), m._setDataItem(e), s.push(m), m;
|
|
56
57
|
}
|
|
57
|
-
_updateGraphics(e,
|
|
58
|
-
super._updateGraphics(e,
|
|
59
|
-
const
|
|
60
|
-
let
|
|
61
|
-
if (
|
|
62
|
-
let
|
|
63
|
-
i =
|
|
64
|
-
let
|
|
65
|
-
|
|
58
|
+
_updateGraphics(e, s, m) {
|
|
59
|
+
super._updateGraphics(e, s, m);
|
|
60
|
+
const w = this.getRaw("xAxis"), x = this.getRaw("yAxis");
|
|
61
|
+
let Y = this.get("vcy", 1), y = this.get("vcx", 1), h, c, r, i, d, u, g, f, o = this.get("locationX", e.get("locationX", 0.5)), l = this.get("locationY", e.get("locationY", 0.5)), D = this.get("openLocationX", e.get("openLocationX", o)), a = this.get("openLocationY", e.get("openLocationY", l)), _;
|
|
62
|
+
if (m == 0) {
|
|
63
|
+
let v = x.getDataItemPositionY(e, this._yOpenField, 1, Y), t = x.getDataItemPositionY(e, this._yField, 1, Y);
|
|
64
|
+
i = x.getDataItemPositionY(e, this._yLowField, 1, Y), f = x.getDataItemPositionY(e, this._yHighField, 1, Y), g = Math.max(v, t), r = Math.min(v, t);
|
|
65
|
+
let n = this._aLocationX0 + D - 0.5, C = this._aLocationX1 + o - 0.5;
|
|
66
|
+
h = w.getDataItemPositionX(e, this._xField, n + (C - n) / 2, y), c = h, d = h, u = h, _ = "vertical";
|
|
66
67
|
} else {
|
|
67
|
-
let
|
|
68
|
-
|
|
69
|
-
let
|
|
70
|
-
r =
|
|
68
|
+
let v = w.getDataItemPositionX(e, this._xOpenField, 1, y), t = w.getDataItemPositionX(e, this._xField, 1, y);
|
|
69
|
+
c = w.getDataItemPositionX(e, this._xLowField, 1, y), u = w.getDataItemPositionX(e, this._xHighField, 1, y), d = Math.max(v, t), h = Math.min(v, t);
|
|
70
|
+
let n = this._aLocationY0 + a - 0.5, C = this._aLocationY1 + l - 0.5;
|
|
71
|
+
r = x.getDataItemPositionY(e, this._yField, n + (C - n) / 2, Y), i = r, g = r, f = r, _ = "horizontal";
|
|
71
72
|
}
|
|
72
|
-
this._updateCandleGraphics(e,
|
|
73
|
+
this._updateCandleGraphics(e, h, c, r, i, d, u, g, f, _);
|
|
73
74
|
}
|
|
74
|
-
_updateCandleGraphics(e,
|
|
75
|
+
_updateCandleGraphics(e, s, m, w, x, Y, y, h, c, r) {
|
|
75
76
|
let i = e.get("graphics");
|
|
76
77
|
if (i) {
|
|
77
|
-
let
|
|
78
|
+
let d = this.getPoint(s, w), u = this.getPoint(m, x), g = this.getPoint(Y, h), f = this.getPoint(y, c);
|
|
78
79
|
if (this.get("turboMode")) {
|
|
79
|
-
const
|
|
80
|
-
|
|
80
|
+
const o = this.allColumnsData[this.allColumnsData.length - 1];
|
|
81
|
+
o.lowX0 = d.x, o.lowY0 = d.y, o.lowX1 = u.x, o.lowY1 = u.y, o.highX0 = g.x, o.highY0 = g.y, o.highX1 = f.x, o.highY1 = f.y;
|
|
81
82
|
} else {
|
|
82
|
-
let
|
|
83
|
-
i.set("lowX0",
|
|
84
|
-
let
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
let o = i.x(), l = i.y();
|
|
84
|
+
i.set("lowX0", d.x - o), i.set("lowY0", d.y - l), i.set("lowX1", u.x - o), i.set("lowY1", u.y - l), i.set("highX0", g.x - o), i.set("highY0", g.y - l), i.set("highX1", f.x - o), i.set("highY1", f.y - l), i.set("orientation", r);
|
|
85
|
+
let D = e.get("rangeGraphics");
|
|
86
|
+
D && Z(D, (a) => {
|
|
87
|
+
a.set("lowX0", d.x - o), a.set("lowY0", d.y - l), a.set("lowX1", u.x - o), a.set("lowY1", u.y - l), a.set("highX0", g.x - o), a.set("highY0", g.y - l), a.set("highX1", f.x - o), a.set("highY1", f.y - l), a.set("orientation", r);
|
|
87
88
|
});
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
91
|
}
|
|
91
92
|
_afterColumnsDraw() {
|
|
92
93
|
this.get("turboMode") && this.allColumns.set("draw", (e) => {
|
|
93
|
-
e.clear(),
|
|
94
|
+
e.clear(), Z(this.allColumnsData, (s) => {
|
|
94
95
|
e.beginPath();
|
|
95
|
-
const
|
|
96
|
-
e.beginFill(
|
|
96
|
+
const m = s.width, w = s.height, x = s.x, Y = s.y, y = s.stroke, h = s.fill, c = s.strokeWidth, r = s.strokeOpacity, i = s.fillOpacity, d = s.lowX0, u = s.lowY0, g = s.lowX1, f = s.lowY1, o = s.highX0, l = s.highY0, D = s.highX1, a = s.highY1;
|
|
97
|
+
e.beginFill(h, i), e.beginPath(), e.lineStyle(c, y, r), e.drawRect(x, Y, m, w), e.moveTo(d, u), e.lineTo(g, f), e.moveTo(o, l), e.lineTo(D, a), e.endStroke(), e.endFill();
|
|
97
98
|
});
|
|
98
99
|
});
|
|
99
100
|
}
|
|
100
101
|
_processAxisRange(e) {
|
|
101
|
-
super._processAxisRange(e), e.columns = new
|
|
102
|
-
themeTags:
|
|
102
|
+
super._processAxisRange(e), e.columns = new K(Q.new({}), () => T._new(this._root, {
|
|
103
|
+
themeTags: U(e.columns.template.get("themeTags", []), ["candlestick", "series", "column"])
|
|
103
104
|
}, [this.columns.template, e.columns.template]));
|
|
104
105
|
}
|
|
105
106
|
}
|
|
106
|
-
Object.defineProperty(
|
|
107
|
+
Object.defineProperty(V, "className", {
|
|
107
108
|
enumerable: !0,
|
|
108
109
|
configurable: !0,
|
|
109
110
|
writable: !0,
|
|
110
111
|
value: "CandlestickSeries"
|
|
111
112
|
});
|
|
112
|
-
Object.defineProperty(
|
|
113
|
+
Object.defineProperty(V, "classNames", {
|
|
113
114
|
enumerable: !0,
|
|
114
115
|
configurable: !0,
|
|
115
116
|
writable: !0,
|
|
116
|
-
value:
|
|
117
|
+
value: G.classNames.concat([V.className])
|
|
117
118
|
});
|
|
118
|
-
const
|
|
119
|
-
const e =
|
|
120
|
-
props:
|
|
119
|
+
const $e = ($) => {
|
|
120
|
+
const e = he(), s = ce({
|
|
121
|
+
props: $,
|
|
121
122
|
name: "HCCandlestickChart"
|
|
122
123
|
}), {
|
|
123
|
-
data:
|
|
124
|
-
seriesName:
|
|
125
|
-
height:
|
|
126
|
-
width:
|
|
127
|
-
chartId:
|
|
128
|
-
showVolume:
|
|
129
|
-
risingColor:
|
|
124
|
+
data: m,
|
|
125
|
+
seriesName: w,
|
|
126
|
+
height: x = "100%",
|
|
127
|
+
width: Y = "100%",
|
|
128
|
+
chartId: y = "candlestick-chart",
|
|
129
|
+
showVolume: h = !1,
|
|
130
|
+
risingColor: c = e.palette.success.main,
|
|
130
131
|
fallingColor: r = e.palette.error.main,
|
|
131
132
|
loading: i = !1,
|
|
132
|
-
emptyMessage:
|
|
133
|
-
baseInterval:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
133
|
+
emptyMessage: d = "No data available",
|
|
134
|
+
baseInterval: u,
|
|
135
|
+
skipEmptyDates: g = !1,
|
|
136
|
+
sx: f,
|
|
137
|
+
...o
|
|
138
|
+
} = s, l = ue.orderBy(m, ["date"]), D = {
|
|
139
|
+
...s,
|
|
140
|
+
height: x,
|
|
141
|
+
width: Y,
|
|
142
|
+
chartId: y,
|
|
143
|
+
showVolume: h,
|
|
144
|
+
risingColor: c,
|
|
143
145
|
fallingColor: r,
|
|
144
146
|
loading: i,
|
|
145
|
-
emptyMessage:
|
|
146
|
-
baseInterval:
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
147
|
+
emptyMessage: d,
|
|
148
|
+
baseInterval: u,
|
|
149
|
+
skipEmptyDates: g
|
|
150
|
+
}, a = N(null), _ = N(null), v = N(null);
|
|
151
|
+
return ge(() => {
|
|
152
|
+
var j, H, E;
|
|
153
|
+
if (!v.current) return;
|
|
154
|
+
const t = le.new(v.current);
|
|
155
|
+
_.current = t, t.setThemes([ne.new(t)]), t.interfaceColors.setAll({
|
|
156
|
+
text: p(e.palette.text.primary),
|
|
157
|
+
grid: p(e.palette.divider),
|
|
158
|
+
stroke: p(e.palette.divider)
|
|
156
159
|
});
|
|
157
|
-
const
|
|
158
|
-
|
|
160
|
+
const n = t.container.children.push(
|
|
161
|
+
fe.new(t, {
|
|
159
162
|
panX: !0,
|
|
160
163
|
panY: !0,
|
|
161
164
|
wheelX: "none",
|
|
@@ -165,40 +168,40 @@ const Le = (V) => {
|
|
|
165
168
|
layout: t.verticalLayout
|
|
166
169
|
})
|
|
167
170
|
);
|
|
168
|
-
|
|
171
|
+
a.current = n, n.set(
|
|
169
172
|
"cursor",
|
|
170
|
-
|
|
173
|
+
we.new(t, {
|
|
171
174
|
behavior: "zoomX"
|
|
172
175
|
})
|
|
173
176
|
).lineY.set("visible", !1);
|
|
174
|
-
const
|
|
175
|
-
|
|
177
|
+
const C = g ? Ye : ye, L = n.xAxes.push(
|
|
178
|
+
C.new(t, {
|
|
176
179
|
maxDeviation: 0.3,
|
|
177
180
|
groupData: !0,
|
|
178
|
-
baseInterval:
|
|
179
|
-
renderer:
|
|
181
|
+
baseInterval: u || { timeUnit: "day", count: 1 },
|
|
182
|
+
renderer: xe.new(t, {
|
|
180
183
|
minorGridEnabled: !0
|
|
181
184
|
})
|
|
182
185
|
})
|
|
183
|
-
),
|
|
184
|
-
|
|
185
|
-
renderer:
|
|
186
|
+
), S = n.yAxes.push(
|
|
187
|
+
q.new(t, {
|
|
188
|
+
renderer: J.new(t, {})
|
|
186
189
|
})
|
|
187
190
|
);
|
|
188
|
-
(
|
|
189
|
-
stroke:
|
|
191
|
+
(j = L.get("renderer")) == null || j.grid.template.setAll({
|
|
192
|
+
stroke: p(e.palette.divider),
|
|
190
193
|
strokeOpacity: 1
|
|
191
|
-
}), (
|
|
194
|
+
}), (H = L.get("renderer")) == null || H.labels.template.setAll({
|
|
192
195
|
paddingTop: 12
|
|
193
|
-
}), (
|
|
194
|
-
stroke:
|
|
196
|
+
}), (E = S.get("renderer")) == null || E.grid.template.setAll({
|
|
197
|
+
stroke: p(e.palette.divider),
|
|
195
198
|
strokeOpacity: 1
|
|
196
199
|
});
|
|
197
|
-
const A =
|
|
198
|
-
|
|
199
|
-
name:
|
|
200
|
-
xAxis:
|
|
201
|
-
yAxis:
|
|
200
|
+
const A = n.series.push(
|
|
201
|
+
V.new(t, {
|
|
202
|
+
name: w || "Price",
|
|
203
|
+
xAxis: L,
|
|
204
|
+
yAxis: S,
|
|
202
205
|
valueXField: "date",
|
|
203
206
|
openValueYField: "open",
|
|
204
207
|
highValueYField: "high",
|
|
@@ -207,108 +210,108 @@ const Le = (V) => {
|
|
|
207
210
|
})
|
|
208
211
|
);
|
|
209
212
|
A.columns.template.states.create("riseFromPrevious", {
|
|
210
|
-
fill:
|
|
211
|
-
stroke:
|
|
213
|
+
fill: p(c),
|
|
214
|
+
stroke: p(c)
|
|
212
215
|
}), A.columns.template.states.create("dropFromPrevious", {
|
|
213
|
-
fill:
|
|
214
|
-
stroke:
|
|
215
|
-
}), A.data.processor =
|
|
216
|
+
fill: p(r),
|
|
217
|
+
stroke: p(r)
|
|
218
|
+
}), A.data.processor = ee.new(t, {
|
|
216
219
|
dateFormat: "i",
|
|
217
220
|
dateFields: ["date"]
|
|
218
221
|
});
|
|
219
|
-
let
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
renderer:
|
|
222
|
+
let F = null, M = null;
|
|
223
|
+
h && (M = n.yAxes.push(
|
|
224
|
+
q.new(t, {
|
|
225
|
+
renderer: J.new(t, {
|
|
223
226
|
opposite: !0
|
|
224
227
|
}),
|
|
225
228
|
numberFormat: "#a"
|
|
226
229
|
})
|
|
227
|
-
),
|
|
228
|
-
|
|
230
|
+
), F = n.series.push(
|
|
231
|
+
G.new(t, {
|
|
229
232
|
name: "Volume",
|
|
230
|
-
xAxis:
|
|
231
|
-
yAxis:
|
|
233
|
+
xAxis: L,
|
|
234
|
+
yAxis: M,
|
|
232
235
|
valueYField: "volume",
|
|
233
236
|
valueXField: "date",
|
|
234
|
-
fill:
|
|
235
|
-
stroke:
|
|
237
|
+
fill: p("#2962ff"),
|
|
238
|
+
stroke: p("#2962ff"),
|
|
236
239
|
opacity: 0.6
|
|
237
240
|
})
|
|
238
|
-
),
|
|
239
|
-
width:
|
|
240
|
-
}),
|
|
241
|
+
), F.columns.template.setAll({
|
|
242
|
+
width: de(80)
|
|
243
|
+
}), F.data.processor = ee.new(t, {
|
|
241
244
|
dateFormat: "i",
|
|
242
245
|
dateFields: ["date"]
|
|
243
|
-
})), A.data.setAll(
|
|
244
|
-
const
|
|
245
|
-
return
|
|
246
|
+
})), A.data.setAll(l), h && F && F.data.setAll(l);
|
|
247
|
+
const se = pe(u);
|
|
248
|
+
return me({
|
|
246
249
|
root: t,
|
|
247
|
-
chart:
|
|
250
|
+
chart: n,
|
|
248
251
|
theme: e,
|
|
249
252
|
getText: () => {
|
|
250
|
-
var
|
|
251
|
-
const
|
|
252
|
-
if (
|
|
253
|
+
var W;
|
|
254
|
+
const b = A.get("tooltipDataItem"), O = b == null ? void 0 : b.get("valueY");
|
|
255
|
+
if (b === void 0 || O === void 0 || O === null)
|
|
253
256
|
return "";
|
|
254
|
-
const
|
|
255
|
-
`Open: ${k
|
|
256
|
-
`High: ${
|
|
257
|
-
`Low: ${
|
|
258
|
-
`Close: ${
|
|
257
|
+
const k = b.get("openValueY"), oe = b.get("highValueY"), ie = b.get("lowValueY"), I = b.get("valueX"), z = typeof I == "number" ? t.dateFormatter.format(new Date(I), se) : "", P = (X) => X == null ? "—" : t.numberFormatter.format(X), R = [
|
|
258
|
+
`Open: ${P(k)}`,
|
|
259
|
+
`High: ${P(oe)}`,
|
|
260
|
+
`Low: ${P(ie)}`,
|
|
261
|
+
`Close: ${P(O)}`
|
|
259
262
|
];
|
|
260
|
-
if (typeof
|
|
261
|
-
const
|
|
262
|
-
|
|
263
|
-
`Change: [${
|
|
263
|
+
if (typeof k == "number" && k !== 0) {
|
|
264
|
+
const X = (O - k) / k * 100, re = p(X >= 0 ? c : r), ae = X > 0 ? "+" : "";
|
|
265
|
+
R.push(
|
|
266
|
+
`Change: [${re.toCSSHex()}]${ae}${X.toFixed(2)}%[/]`
|
|
264
267
|
);
|
|
265
268
|
}
|
|
266
|
-
if (
|
|
267
|
-
const
|
|
268
|
-
|
|
269
|
+
if (h && F) {
|
|
270
|
+
const X = (W = F.get("tooltipDataItem")) == null ? void 0 : W.get("valueY");
|
|
271
|
+
X != null && R.push(`Volume: ${P(X)}`);
|
|
269
272
|
}
|
|
270
|
-
return
|
|
271
|
-
${
|
|
272
|
-
`)}` :
|
|
273
|
+
return z ? `[bold]${z}[/]
|
|
274
|
+
${R.join(`
|
|
275
|
+
`)}` : R.join(`
|
|
273
276
|
`);
|
|
274
277
|
}
|
|
275
|
-
}),
|
|
278
|
+
}), n.appear(1e3), A.appear(1e3), () => {
|
|
276
279
|
t.dispose();
|
|
277
280
|
};
|
|
278
|
-
}, [e.palette.mode]),
|
|
279
|
-
if (
|
|
280
|
-
const t =
|
|
281
|
+
}, [e.palette.mode, g]), B(() => {
|
|
282
|
+
if (a.current && _.current) {
|
|
283
|
+
const t = a.current.series.getIndex(
|
|
281
284
|
0
|
|
282
|
-
),
|
|
283
|
-
t == null || t.data.setAll(
|
|
285
|
+
), n = h ? a.current.series.getIndex(1) : null;
|
|
286
|
+
t == null || t.data.setAll(l), n == null || n.data.setAll(l);
|
|
284
287
|
}
|
|
285
|
-
}, [
|
|
286
|
-
if (!
|
|
287
|
-
const t =
|
|
288
|
+
}, [l, h]), B(() => {
|
|
289
|
+
if (!a.current) return;
|
|
290
|
+
const t = a.current.series.getIndex(0);
|
|
288
291
|
t && (t.columns.template.states.create("riseFromPrevious", {
|
|
289
|
-
fill:
|
|
290
|
-
stroke:
|
|
292
|
+
fill: p(c),
|
|
293
|
+
stroke: p(c)
|
|
291
294
|
}), t.columns.template.states.create("dropFromPrevious", {
|
|
292
|
-
fill:
|
|
293
|
-
stroke:
|
|
295
|
+
fill: p(r),
|
|
296
|
+
stroke: p(r)
|
|
294
297
|
}));
|
|
295
|
-
}, [
|
|
296
|
-
chartDivRef:
|
|
297
|
-
data:
|
|
298
|
-
seriesName:
|
|
299
|
-
height:
|
|
300
|
-
width:
|
|
301
|
-
chartId:
|
|
302
|
-
showVolume:
|
|
303
|
-
risingColor:
|
|
298
|
+
}, [c, r]), {
|
|
299
|
+
chartDivRef: v,
|
|
300
|
+
data: m,
|
|
301
|
+
seriesName: w,
|
|
302
|
+
height: x,
|
|
303
|
+
width: Y,
|
|
304
|
+
chartId: y,
|
|
305
|
+
showVolume: h,
|
|
306
|
+
risingColor: c,
|
|
304
307
|
fallingColor: r,
|
|
305
308
|
loading: i,
|
|
306
|
-
emptyMessage:
|
|
307
|
-
sx:
|
|
308
|
-
other:
|
|
309
|
-
ownerState:
|
|
309
|
+
emptyMessage: d,
|
|
310
|
+
sx: f,
|
|
311
|
+
other: o,
|
|
312
|
+
ownerState: D
|
|
310
313
|
};
|
|
311
314
|
};
|
|
312
315
|
export {
|
|
313
|
-
|
|
316
|
+
$e as useCandlestickChartLogic
|
|
314
317
|
};
|
|
@@ -1,47 +1,49 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Typography as
|
|
3
|
-
import { Loading as
|
|
4
|
-
import { CandlestickChart as
|
|
1
|
+
import { jsxs as a, jsx as r, Fragment as l } from "react/jsx-runtime";
|
|
2
|
+
import { Typography as C, Divider as h } from "@mui/material";
|
|
3
|
+
import { Loading as c } from "../../loading/index.js";
|
|
4
|
+
import { CandlestickChart as d } from "../candlestick/index.js";
|
|
5
5
|
import { ColumnLineMix as f } from "../column-line-mix/index.js";
|
|
6
6
|
import { DonutChart as s } from "../donut-chart/index.js";
|
|
7
7
|
import { DrillDownTreemap as u } from "../drill-down-treemap/index.js";
|
|
8
8
|
import { DrillDownVoronoiTreemap as D } from "../drill-down-voronoi-treemap/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/* @__PURE__ */ r(C, {}),
|
|
26
|
-
/* @__PURE__ */ r(
|
|
27
|
-
|
|
28
|
-
o === "
|
|
29
|
-
o === "
|
|
30
|
-
o === "
|
|
9
|
+
import { ForecastConeChart as L } from "../forecast-cone/index.js";
|
|
10
|
+
import { Heatmap as g } from "../heatmap/index.js";
|
|
11
|
+
import { LineChart as x } from "../line/index.js";
|
|
12
|
+
import { LogaritmicScale as k } from "../logaritmic-scale/index.js";
|
|
13
|
+
import { MultipleValueAxes as S } from "../multiple-value-axes/index.js";
|
|
14
|
+
import { NestedPie as P } from "../nested-pie/index.js";
|
|
15
|
+
import { PackedCircles as w } from "../packed-circles/index.js";
|
|
16
|
+
import { PieChart as A } from "../pie-chart/index.js";
|
|
17
|
+
import { StackedAreaRadar as T } from "../stacked-area-radar/index.js";
|
|
18
|
+
import { StackedColumnChart as W } from "../stacked-column-chart/index.js";
|
|
19
|
+
import { XYChart as M } from "../xy-chart/index.js";
|
|
20
|
+
import { useChartWrapperLogic as V } from "./logic.js";
|
|
21
|
+
import { ChartWrapperRoot as v, ChartWrapperHeader as y, ChartWrapperContent as F } from "./styled.js";
|
|
22
|
+
const rr = (i) => {
|
|
23
|
+
const { title: m, type: o, chartProps: e, loading: p, ownerState: t, sx: n } = V(i);
|
|
24
|
+
return /* @__PURE__ */ a(v, { ownerState: t, sx: n, children: [
|
|
25
|
+
/* @__PURE__ */ r(y, { ownerState: t, children: /* @__PURE__ */ r(C, { sx: { paddingLeft: "0.5rem" }, variant: "h3", children: m }) }),
|
|
26
|
+
/* @__PURE__ */ r(h, {}),
|
|
27
|
+
/* @__PURE__ */ r(F, { ownerState: t, children: p ? /* @__PURE__ */ r(c, { show: !0, position: "absolute" }) : /* @__PURE__ */ a(l, { children: [
|
|
28
|
+
o === "MultipleValueAxes" && /* @__PURE__ */ r(S, { ...e }),
|
|
29
|
+
o === "XYChart" && /* @__PURE__ */ r(M, { ...e }),
|
|
30
|
+
o === "HeatLegend" && /* @__PURE__ */ r(g, { ...e }),
|
|
31
|
+
o === "PieChart" && /* @__PURE__ */ r(A, { ...e }),
|
|
31
32
|
o === "DonutChart" && /* @__PURE__ */ r(s, { ...e }),
|
|
32
|
-
o === "StackedColumnChart" && /* @__PURE__ */ r(
|
|
33
|
-
o === "StackedAreaRadar" && /* @__PURE__ */ r(
|
|
34
|
-
o === "LineChart" && /* @__PURE__ */ r(
|
|
35
|
-
o === "NestedPie" && /* @__PURE__ */ r(
|
|
36
|
-
o === "SingleLevelPackedCircles" && /* @__PURE__ */ r(
|
|
37
|
-
o === "LogarithmicScale" && /* @__PURE__ */ r(
|
|
33
|
+
o === "StackedColumnChart" && /* @__PURE__ */ r(W, { ...e }),
|
|
34
|
+
o === "StackedAreaRadar" && /* @__PURE__ */ r(T, { ...e }),
|
|
35
|
+
o === "LineChart" && /* @__PURE__ */ r(x, { ...e }),
|
|
36
|
+
o === "NestedPie" && /* @__PURE__ */ r(P, { ...e }),
|
|
37
|
+
o === "SingleLevelPackedCircles" && /* @__PURE__ */ r(w, { ...e }),
|
|
38
|
+
o === "LogarithmicScale" && /* @__PURE__ */ r(k, { ...e }),
|
|
38
39
|
o === "ColumnAndLineMix" && /* @__PURE__ */ r(f, { ...e }),
|
|
39
40
|
o === "DrillDownTreemap" && /* @__PURE__ */ r(u, { ...e }),
|
|
40
41
|
o === "DrillDownVoronoiTreemap" && /* @__PURE__ */ r(D, { ...e }),
|
|
41
|
-
o === "CandlestickChart" && /* @__PURE__ */ r(
|
|
42
|
+
o === "CandlestickChart" && /* @__PURE__ */ r(d, { ...e }),
|
|
43
|
+
o === "ForecastCone" && /* @__PURE__ */ r(L, { ...e })
|
|
42
44
|
] }) })
|
|
43
45
|
] });
|
|
44
46
|
};
|
|
45
47
|
export {
|
|
46
|
-
|
|
48
|
+
rr as ChartWrapper
|
|
47
49
|
};
|