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