@hybridcore/ui 1.6.11 → 1.6.12
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-D3VZKKNV.js → AnimatedTheme-ktdO3Bel.js} +6 -6
- package/dist/{AxisRenderer-Doyw-FTI.js → AxisRenderer-BCQoUJw6.js} +6 -6
- package/dist/{AxisRendererY-BylCU67e.js → AxisRendererY-AXWvGU6r.js} +3 -3
- package/dist/{Bullet-C6357hTv.js → Bullet-Djj7Vs9T.js} +1 -1
- package/dist/{Button-DGOT8RcT.js → Button-BLY4PVJC.js} +3 -3
- package/dist/{CategoryAxis-B5uTZjhL.js → CategoryAxis-B6NqW8qd.js} +3 -3
- package/dist/{Circle-DhzVdFBd.js → Circle-BnfBNKBD.js} +1 -1
- package/dist/{ColorSet-DGLMpbL3.js → ColorSet-cyPmWGwh.js} +1 -1
- package/dist/{ColumnSeries-CqJ-563p.js → ColumnSeries-CtRTsn-E.js} +28 -28
- package/dist/{DateAxis-lJZjbAS-.js → DateAxis-DEXKps1S.js} +4 -4
- package/dist/{Entity-4Lr2piVN.js → Entity-BJCuhdq_.js} +14 -14
- package/dist/GaplessDateAxis-B2g2jgSG.js +376 -0
- package/dist/{Hierarchy-DPEcTr0v.js → Hierarchy-CEOK8Gzh.js} +4 -4
- package/dist/{Legend-CTb6rZz_.js → Legend-CFvQiIfn.js} +4 -4
- package/dist/{LineSeries-Dg1aytHA.js → LineSeries-D_IL2qGF.js} +4 -4
- package/dist/{LinearGradient-D1hzMjaW.js → LinearGradient-CxQyCSEB.js} +2 -2
- package/dist/{PieSeries-C9YUWMnA.js → PieSeries-CMH0Z7pz.js} +8 -8
- package/dist/{RoundedRectangle-B23Oh_r6.js → RoundedRectangle-BKLX1LKM.js} +2 -2
- package/dist/{Scrollbar-CSoXoZSe.js → Scrollbar-CTI7_8Qw.js} +4 -4
- package/dist/{Slice-CIP7Vmzu.js → Slice-BUncQh1B.js} +11 -11
- package/dist/{Tick-CRu6rQQy.js → Tick--VhF0xlz.js} +2 -2
- package/dist/{Tooltip-RhAldW7s.js → Tooltip-vyZRZWih.js} +1 -1
- package/dist/{XYCursor-Z-Ral42q.js → XYCursor-CVUSpqb9.js} +3 -3
- package/dist/{ZoomableContainer-D1laxHnA.js → ZoomableContainer-Ca_pDVYQ.js} +2 -2
- 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 +34 -35
- package/dist/components/charts/column-line-mix/logic.js +40 -41
- 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/logic.js +134 -120
- 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 +19 -20
- package/dist/components/charts/logaritmic-scale/logic.js +30 -31
- package/dist/components/charts/multiple-value-axes/logic.js +18 -19
- 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 +28 -29
- package/dist/components/metric-card/MetricChart.js +9 -9
- package/dist/main.d.ts +13 -0
- package/package.json +1 -1
- package/dist/DataProcessor-WXzhvIg6.js +0 -83
- package/dist/GaplessDateAxis-DowssQ6y.js +0 -296
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
import { D as Q } from "./DateAxis-lJZjbAS-.js";
|
|
2
|
-
import { g as V, r as x, c as it, a as S, D as J, b as st, d as at } from "./AnimatedTheme-D3VZKKNV.js";
|
|
3
|
-
import { n as y, o as A, q as nt, e as v, f as U, r as K, u as rt } from "./Entity-4Lr2piVN.js";
|
|
4
|
-
import { f as W } from "./Tooltip-RhAldW7s.js";
|
|
5
|
-
class Z extends Q {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments), Object.defineProperty(this, "_frequency", {
|
|
8
|
-
enumerable: !0,
|
|
9
|
-
configurable: !0,
|
|
10
|
-
writable: !0,
|
|
11
|
-
value: 1
|
|
12
|
-
}), Object.defineProperty(this, "_m", {
|
|
13
|
-
enumerable: !0,
|
|
14
|
-
configurable: !0,
|
|
15
|
-
writable: !0,
|
|
16
|
-
value: 0
|
|
17
|
-
}), Object.defineProperty(this, "_dates", {
|
|
18
|
-
enumerable: !0,
|
|
19
|
-
configurable: !0,
|
|
20
|
-
writable: !0,
|
|
21
|
-
value: []
|
|
22
|
-
}), Object.defineProperty(this, "_customDates", {
|
|
23
|
-
enumerable: !0,
|
|
24
|
-
configurable: !0,
|
|
25
|
-
writable: !0,
|
|
26
|
-
value: void 0
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
_afterNew() {
|
|
30
|
-
this.valueFields.push("date"), this.addTag("gapless"), super._afterNew();
|
|
31
|
-
}
|
|
32
|
-
_getDates() {
|
|
33
|
-
return this._customDates ? this._customDates : this._dates;
|
|
34
|
-
}
|
|
35
|
-
_updateDates(t, a) {
|
|
36
|
-
if (!a.get("ignoreMinMax")) {
|
|
37
|
-
const n = this._getDates(), s = y(n, (r) => A(r, t));
|
|
38
|
-
s.found || nt(n, s.index, t);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
_updateAllDates() {
|
|
42
|
-
if (!this._customDates) {
|
|
43
|
-
const t = this._dates;
|
|
44
|
-
t.length = 0, v(this.series, (h) => {
|
|
45
|
-
let o = "valueX";
|
|
46
|
-
h.get("yAxis") == this && (o = "valueY"), v(h.dataItems, (l) => {
|
|
47
|
-
let d = l.get(o);
|
|
48
|
-
U(d) && l.open && this._updateDates(l.open[o], h);
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
const a = this.get("extraMax", 0), n = this.get("extraMin", 0);
|
|
52
|
-
let s = t.length;
|
|
53
|
-
const r = this.getPrivate("baseInterval"), i = r.count, e = r.timeUnit;
|
|
54
|
-
if (a > 0) {
|
|
55
|
-
const h = s * a;
|
|
56
|
-
let o = t[s - 1];
|
|
57
|
-
if (U(o))
|
|
58
|
-
for (let l = s - 1; l < s + h; l++)
|
|
59
|
-
o += V(e, i * this._getM(e)), o = x(o, e, i, this._root), t.push(o);
|
|
60
|
-
}
|
|
61
|
-
if (n > 0) {
|
|
62
|
-
const h = s * n;
|
|
63
|
-
let o = t[0];
|
|
64
|
-
if (U(o))
|
|
65
|
-
for (let l = 0; l < h; l++)
|
|
66
|
-
o -= V(e, i), o = x(o, e, i, this._root), t.unshift(o);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Convers value to a relative position on axis.
|
|
72
|
-
*
|
|
73
|
-
* @param value Value
|
|
74
|
-
* @return Relative position
|
|
75
|
-
*/
|
|
76
|
-
valueToPosition(t) {
|
|
77
|
-
const a = this._getDates(), n = this.get("startLocation", 0), s = this.get("endLocation", 1), r = a.length - n - (1 - s), i = y(a, (h) => A(h, t));
|
|
78
|
-
let e = i.index;
|
|
79
|
-
if (i.found)
|
|
80
|
-
return (e - n) / r;
|
|
81
|
-
{
|
|
82
|
-
e > 0 && (e -= 1);
|
|
83
|
-
let h = a[e];
|
|
84
|
-
const o = a[e + 1];
|
|
85
|
-
if (o) {
|
|
86
|
-
let d = o;
|
|
87
|
-
Math.abs(d - t) < Math.abs(h - t) && (h = d, e++);
|
|
88
|
-
}
|
|
89
|
-
let l = t - h;
|
|
90
|
-
return (e - n) / r + l / this.baseDuration() / r;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Converts numeric value from axis scale to index.
|
|
95
|
-
*
|
|
96
|
-
* @param value Value
|
|
97
|
-
* @return Index
|
|
98
|
-
*/
|
|
99
|
-
valueToIndex(t) {
|
|
100
|
-
const a = this._getDates(), n = y(a, (r) => A(r, t));
|
|
101
|
-
let s = n.index;
|
|
102
|
-
return n.found || s > 0 && (s -= 1), s;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Converts a relative position to a corresponding numeric value from axis
|
|
106
|
-
* scale.
|
|
107
|
-
*
|
|
108
|
-
* @param position Relative position
|
|
109
|
-
* @return Value
|
|
110
|
-
*/
|
|
111
|
-
positionToValue(t) {
|
|
112
|
-
const a = this.get("startLocation", 0), n = this.get("endLocation", 1), s = this._getDates();
|
|
113
|
-
let r = Math.round(s.length - a - (1 - n)), i = t * r, e = Math.floor(i);
|
|
114
|
-
return e < 0 && (e = 0), e > r - 1 && (e = r - 1), s[e] + (i - e + a) * this.baseDuration();
|
|
115
|
-
}
|
|
116
|
-
_fixZoomFactor() {
|
|
117
|
-
this.setPrivateRaw("maxZoomFactor", this._getDates().length - this.get("startLocation", 0) - (1 - this.get("endLocation", 1)));
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Zooms the axis to specific `start` and `end` dates.
|
|
121
|
-
*
|
|
122
|
-
* Optional `duration` specifies duration of zoom animation in milliseconds.
|
|
123
|
-
*
|
|
124
|
-
* @param start Start Date
|
|
125
|
-
* @param end End Date
|
|
126
|
-
* @param duration Duration in milliseconds
|
|
127
|
-
*/
|
|
128
|
-
zoomToDates(t, a, n) {
|
|
129
|
-
const s = this._getDates(), r = s.length;
|
|
130
|
-
let i = y(s, (o) => A(o, t.getTime())), e = s[Math.min(i.index, r - 1)];
|
|
131
|
-
i = y(s, (o) => A(o, a.getTime()));
|
|
132
|
-
let h = s[i.index];
|
|
133
|
-
i.index >= r && (h = s[r - 1] + this.baseDuration()), this.zoomToValues(e, h, n);
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Zooms the axis to specific `start` and `end` values.
|
|
137
|
-
*
|
|
138
|
-
* Optional `duration` specifies duration of zoom animation in milliseconds.
|
|
139
|
-
*
|
|
140
|
-
* @param start Start value
|
|
141
|
-
* @param end End value
|
|
142
|
-
* @param duration Duration in milliseconds
|
|
143
|
-
*/
|
|
144
|
-
zoomToValues(t, a, n) {
|
|
145
|
-
const s = this.getPrivate("min", 0), r = this.getPrivate("max", 0);
|
|
146
|
-
t = W(t, s, r), a = W(a, s, r), this.zoom(this.valueToPosition(t), this.valueToPosition(a), n);
|
|
147
|
-
}
|
|
148
|
-
_prepareAxisItems() {
|
|
149
|
-
let t = this.getPrivate("selectionMin", 0), a = this.getPrivate("selectionMax", 0);
|
|
150
|
-
if (U(t) && U(a)) {
|
|
151
|
-
this._seriesValuesDirty && (this._seriesValuesDirty = !1, this._updateAllDates());
|
|
152
|
-
const n = this._root, s = n.utc, r = n.timezone, i = this._getDates(), e = this.get("renderer"), h = i.length, o = this.baseDuration();
|
|
153
|
-
let l = this.valueToIndex(t);
|
|
154
|
-
l > 0 && l--;
|
|
155
|
-
let d = this.valueToIndex(a);
|
|
156
|
-
d < h - 1 && d++;
|
|
157
|
-
let u = e.axisLength() / Math.max(e.get("minGridDistance"), 1 / Number.MAX_SAFE_INTEGER), f = Math.min(h, Math.ceil((d - l) / u));
|
|
158
|
-
f = Math.max(1, f), l = Math.floor(l / f) * f, this._frequency = f, v(this.dataItems, (_) => {
|
|
159
|
-
this._toggleDataItem(_, !1);
|
|
160
|
-
}), v(this.minorDataItems, (_) => {
|
|
161
|
-
this._toggleDataItem(_, !1);
|
|
162
|
-
});
|
|
163
|
-
let w = a - t - ((a - t) / o - (d - l)) * o, m = it(0, w, u, this.get("gridIntervals"));
|
|
164
|
-
const z = this.getPrivate("baseInterval");
|
|
165
|
-
let g = S(m);
|
|
166
|
-
g < o && (m = Object.assign({}, z), g = S(m)), this._intervalDuration = g;
|
|
167
|
-
const b = m.timeUnit, M = this.get("dateFormats");
|
|
168
|
-
let E = Date.now();
|
|
169
|
-
i[0] && (E = i[0]);
|
|
170
|
-
let R = x(this.getPrivate("selectionMin", 0), b, m.count, n, E);
|
|
171
|
-
const $ = e.get("minorLabelsEnabled"), Y = e.get("minorGridEnabled", $);
|
|
172
|
-
let P, F = 0, N;
|
|
173
|
-
Y && (P = this._getMinorInterval(m), F = S(P));
|
|
174
|
-
let L = this._getIndexes(R, this.getPrivate("selectionMax", R) + g, m, this.getPrivate("min", R));
|
|
175
|
-
if (L.length > 0) {
|
|
176
|
-
let _ = 0;
|
|
177
|
-
this._m = 0;
|
|
178
|
-
let C = R - g * 10;
|
|
179
|
-
const B = at(b);
|
|
180
|
-
if (P) {
|
|
181
|
-
let k = i[L[0]];
|
|
182
|
-
this._addMinorGrid(k - g, k, F, P);
|
|
183
|
-
}
|
|
184
|
-
let tt = e.axisLength() / e.gridCount() * 0.5;
|
|
185
|
-
v(L, (k) => {
|
|
186
|
-
var q;
|
|
187
|
-
let c;
|
|
188
|
-
this.dataItems.length < _ + 1 ? (c = new J(this, void 0, {}), this._dataItems.push(c), this.processDataItem(c)) : c = this.dataItems[_];
|
|
189
|
-
let D = i[k], et = new Date(D), j = D;
|
|
190
|
-
_ < L.length - 1 ? j = i[L[_ + 1]] : j += g, c.setRaw("value", D), c.setRaw("endValue", j), c.setRaw("index", _), c.setRaw("labelEndValue", void 0);
|
|
191
|
-
let H = M[b];
|
|
192
|
-
B && this.get("markUnitChange") && U(C) && b != "year" && st(D, C, B, s, r) && (H = this.get("periodChangeDateFormats")[b]), this._createAssets(c, []);
|
|
193
|
-
const T = c.get("label");
|
|
194
|
-
T && T.set("text", n.dateFormatter.format(et, H)), this._toggleDataItem(c, !0);
|
|
195
|
-
let X = m.count;
|
|
196
|
-
if (b == "week" && c.setRaw("labelEndValue", D), Y) {
|
|
197
|
-
let I = m.timeUnit;
|
|
198
|
-
if (I == "week" && (I = "day"), X > 1 || m.timeUnit == "week") {
|
|
199
|
-
let p = x(D, I, 1, n) + V(I, this._getM(I)), O = this.valueToIndex(p);
|
|
200
|
-
if (p = i[O], p == D) {
|
|
201
|
-
let G = i[O + 1];
|
|
202
|
-
G ? p = G : p += F;
|
|
203
|
-
}
|
|
204
|
-
c.setRaw("labelEndValue", p);
|
|
205
|
-
}
|
|
206
|
-
X = 1;
|
|
207
|
-
}
|
|
208
|
-
if (this._prepareDataItem(c, X), T && N && e.getPrivate("letter") == "X") {
|
|
209
|
-
let I = N.get("label");
|
|
210
|
-
if (I) {
|
|
211
|
-
let p = T.x(), O = I.x();
|
|
212
|
-
if (p - O < tt) {
|
|
213
|
-
let G = this._pickWorse(N, c, m);
|
|
214
|
-
G && ((q = G.get("label")) === null || q === void 0 || q.setPrivate("visible", !1));
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
P && this._addMinorGrid(D, j, F, P), _++, T && T.getPrivate("visible") && (N = c), C = D;
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
v(this.series, (_) => {
|
|
222
|
-
_.inited && _._markDirtyAxes();
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
this._updateGhost();
|
|
226
|
-
}
|
|
227
|
-
_pickWorse(t, a, n) {
|
|
228
|
-
const s = n.timeUnit, r = t.get("value", 0), i = a.get("value", 0);
|
|
229
|
-
return s == "hour" && new Date(r).getDate() != new Date(i).getDate() ? t : a;
|
|
230
|
-
}
|
|
231
|
-
_addMinorGrid(t, a, n, s) {
|
|
232
|
-
const r = this.get("minorDateFormats", this.get("dateFormats")), i = s.timeUnit;
|
|
233
|
-
let e = t + V(i, this._getM(i));
|
|
234
|
-
e = x(e, i, 1, this._root);
|
|
235
|
-
let h = a - n * 0.5, o = this._getIndexes(e, h, s, e);
|
|
236
|
-
const l = this._getDates();
|
|
237
|
-
v(o, (d) => {
|
|
238
|
-
let u;
|
|
239
|
-
this.minorDataItems.length < this._m + 1 ? (u = new J(this, void 0, {}), this.minorDataItems.push(u), this.processDataItem(u)) : u = this.minorDataItems[this._m], e = l[d], u.setRaw("value", e), u.setRaw("endValue", e + n), u.setRaw("index", d), this._createAssets(u, ["minor"], !0);
|
|
240
|
-
const f = u.get("label");
|
|
241
|
-
if (f)
|
|
242
|
-
if (this.get("renderer").get("minorLabelsEnabled")) {
|
|
243
|
-
let w = new Date(e), m = r[i];
|
|
244
|
-
f.set("text", this._root.dateFormatter.format(w, m));
|
|
245
|
-
} else
|
|
246
|
-
f.setPrivate("visible", !1);
|
|
247
|
-
this._toggleDataItem(u, !0), this._prepareDataItem(u, 1), this._m++;
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
_getIndexes(t, a, n, s) {
|
|
251
|
-
const r = [], i = n.timeUnit, e = n.count, h = this._getM(i), o = this.getPrivate("baseInterval"), l = this._root, d = this._getDates();
|
|
252
|
-
let u = e - 1, f = -1 / 0, w = V(i, h), m = V(i, e * h), z = t;
|
|
253
|
-
for (i == "day" && (t = s); t <= a; ) {
|
|
254
|
-
t = x(t, i, e, l);
|
|
255
|
-
let g = this.valueToIndex(t), b = d[g];
|
|
256
|
-
if (i == "day" && o.timeUnit == "day")
|
|
257
|
-
this._hasDate(t) && u++, u == e && (t >= z - m * 2 && K(r, g), u = 0), t += w, t = x(t, i, 1, l);
|
|
258
|
-
else {
|
|
259
|
-
if (b < t) {
|
|
260
|
-
for (let M = g, E = d.length; M < E; M++)
|
|
261
|
-
if (b = d[M], b >= t) {
|
|
262
|
-
g = M;
|
|
263
|
-
break;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
K(r, g), t += m, t = x(t, i, e, l);
|
|
267
|
-
}
|
|
268
|
-
if (t == f && (t += m + w, t = x(t, i, e, l)), t == f)
|
|
269
|
-
break;
|
|
270
|
-
f = t;
|
|
271
|
-
}
|
|
272
|
-
return r;
|
|
273
|
-
}
|
|
274
|
-
_hasDate(t) {
|
|
275
|
-
return y(this._getDates(), (n) => rt(n, t)).found;
|
|
276
|
-
}
|
|
277
|
-
_nextTime(t, a, n) {
|
|
278
|
-
let s = W(this.valueToIndex(t) + a, 0, this._dates.length - 1);
|
|
279
|
-
return this._dates[s];
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
Object.defineProperty(Z, "className", {
|
|
283
|
-
enumerable: !0,
|
|
284
|
-
configurable: !0,
|
|
285
|
-
writable: !0,
|
|
286
|
-
value: "GaplessDateAxis"
|
|
287
|
-
});
|
|
288
|
-
Object.defineProperty(Z, "classNames", {
|
|
289
|
-
enumerable: !0,
|
|
290
|
-
configurable: !0,
|
|
291
|
-
writable: !0,
|
|
292
|
-
value: Q.classNames.concat([Z.className])
|
|
293
|
-
});
|
|
294
|
-
export {
|
|
295
|
-
Z as G
|
|
296
|
-
};
|