@hybridcore/ui 1.6.8 → 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.
- package/dist/AnimatedTheme-BOKdw2Oy.js +7708 -0
- package/dist/{AxisRenderer-DTyLLA6c.js → AxisRenderer-lUbezuh7.js} +51 -49
- package/dist/{AxisRendererY-C_ItLPNV.js → AxisRendererY-DbSiyb45.js} +3 -3
- package/dist/{Bullet-DVczI2TD.js → Bullet-PgoNb3Jv.js} +1 -1
- package/dist/{Button-CcsPEIDh.js → Button-XBf4Mwz-.js} +3 -3
- package/dist/{CategoryAxis-CwnfaGc8.js → CategoryAxis-B8KQp1pE.js} +3 -3
- package/dist/{Circle-Cy5s-pVc.js → Circle-BWRdiMpG.js} +1 -1
- package/dist/ColorSet-DDmFoKtZ.js +77 -0
- package/dist/{ColumnSeries-CjgdJ2QL.js → ColumnSeries-rgnGm-Bg.js} +4 -4
- package/dist/{DataProcessor-CHDO51q4.js → DataProcessor-CvIe9BVn.js} +1 -1
- package/dist/{DateAxis-YX3QNIB-.js → DateAxis-zNtbSVjW.js} +8 -7
- package/dist/{ColorSet-C7vpNXhM.js → Entity-CCUIdRAr.js} +638 -712
- package/dist/{Hierarchy-Bihj0S61.js → Hierarchy-CCvGsF1A.js} +25 -23
- package/dist/{Legend-Dp_MKfS4.js → Legend-kbCFjJAW.js} +11 -10
- package/dist/{LineSeries-Uiv5o56b.js → LineSeries-BLFvwrLT.js} +13 -12
- package/dist/{LinearGradient-DiRq5YcI.js → LinearGradient-C7rnipF7.js} +11 -11
- package/dist/{PieSeries-B2fW3z0s.js → PieSeries-3iLRbqFv.js} +34 -32
- package/dist/{RoundedRectangle-CWLi2PXn.js → RoundedRectangle-CqMMmPM0.js} +4 -4
- package/dist/{Scrollbar-D86MJyr2.js → Scrollbar-BzSBcIUt.js} +4 -4
- package/dist/{Slice-B19rbYDZ.js → Slice-CS23iLiS.js} +2 -2
- package/dist/{Tick-2bcLyHpF.js → Tick-BADQ8QeT.js} +15 -15
- package/dist/Tooltip-A_HlttXp.js +3606 -0
- package/dist/{XYCursor-C8WktvKM.js → XYCursor-gHAo40xC.js} +3 -3
- package/dist/{ZoomableContainer-DYyqwaMb.js → ZoomableContainer-Brs1wHM1.js} +9 -9
- package/dist/components/charts/_common/tooltip.js +73 -0
- package/dist/components/charts/_common/utils.js +10 -9
- package/dist/components/charts/candlestick/logic.js +181 -156
- package/dist/components/charts/column-line-mix/logic.js +80 -77
- package/dist/components/charts/donut-chart/logic.js +36 -34
- package/dist/components/charts/drill-down-treemap/logic.js +49 -48
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +102 -101
- package/dist/components/charts/heatmap/logic.js +33 -32
- package/dist/components/charts/highlighting-line-data/logic.js +26 -24
- package/dist/components/charts/line/logic.js +123 -174
- package/dist/components/charts/logaritmic-scale/logic.js +69 -60
- package/dist/components/charts/multiple-value-axes/logic.js +93 -88
- package/dist/components/charts/nested-pie/logic.js +3 -3
- package/dist/components/charts/packed-circles/logic.js +28 -27
- package/dist/components/charts/pie-chart/logic.js +43 -41
- package/dist/components/charts/stacked-area-radar/logic.js +124 -121
- package/dist/components/charts/stacked-column-chart/logic.js +107 -95
- package/dist/components/charts/xy-chart/logic.js +103 -91
- package/dist/components/metric-card/MetricChart.js +29 -28
- package/package.json +1 -1
- package/dist/AnimatedTheme-jnasw6rT.js +0 -11305
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as m, G as X, r as v } from "./
|
|
2
|
-
import { m as Y, b, s as y, d as T, e as C, i as L, k as w, g as A, f as P } from "./
|
|
3
|
-
import { G as x } from "./AxisRenderer-
|
|
1
|
+
import { C as m, G as X, r as v } from "./Tooltip-A_HlttXp.js";
|
|
2
|
+
import { m as Y, b, s as y, d as T, e as C, i as L, k as w, g as A, f as P } from "./Entity-CCUIdRAr.js";
|
|
3
|
+
import { G as x } from "./AxisRenderer-lUbezuh7.js";
|
|
4
4
|
class c extends m {
|
|
5
5
|
constructor() {
|
|
6
6
|
super(...arguments), Object.defineProperty(this, "_alwaysShow", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as c,
|
|
2
|
-
import { b as g, c as D, f
|
|
1
|
+
import { C as c, R as v, f as x } from "./Tooltip-A_HlttXp.js";
|
|
2
|
+
import { b as g, c as D, f, v as O, k as b, r as z } from "./Entity-CCUIdRAr.js";
|
|
3
3
|
class d extends c {
|
|
4
4
|
constructor() {
|
|
5
5
|
super(...arguments), Object.defineProperty(this, "_za", {
|
|
@@ -52,7 +52,7 @@ class d extends c {
|
|
|
52
52
|
x: 0,
|
|
53
53
|
y: 0,
|
|
54
54
|
draggable: !0,
|
|
55
|
-
background:
|
|
55
|
+
background: v.new(this._root, {
|
|
56
56
|
fill: D(16777215),
|
|
57
57
|
fillOpacity: 0
|
|
58
58
|
})
|
|
@@ -79,14 +79,14 @@ class d extends c {
|
|
|
79
79
|
const n = this.contents;
|
|
80
80
|
n.adapters.add("x", (e) => {
|
|
81
81
|
const t = n.get("scale", 1);
|
|
82
|
-
if (
|
|
82
|
+
if (f(e) && t >= 1) {
|
|
83
83
|
let o = this.get("maxPanOut", 0.4), a = n.width();
|
|
84
84
|
e = Math.min(a * o, e), e = Math.max(this.width() - a * t * (1 + o), e);
|
|
85
85
|
}
|
|
86
86
|
return e;
|
|
87
87
|
}), n.adapters.add("y", (e) => {
|
|
88
88
|
const t = n.get("scale", 1);
|
|
89
|
-
if (
|
|
89
|
+
if (f(e) && t >= 1) {
|
|
90
90
|
let o = this.get("maxPanOut", 0.4), a = n.height();
|
|
91
91
|
e = Math.min(a * o, e), e = Math.max(this.height() - a * t * (1 + o), e);
|
|
92
92
|
}
|
|
@@ -119,7 +119,7 @@ class d extends c {
|
|
|
119
119
|
* @return Zoom Animation object
|
|
120
120
|
*/
|
|
121
121
|
zoomToPoint(s, i) {
|
|
122
|
-
i && (i =
|
|
122
|
+
i && (i = x(i, this.get("minZoomLevel", 1), this.get("maxZoomLevel", 32)));
|
|
123
123
|
const n = this.contents.get("scale", 1);
|
|
124
124
|
let e = s.x, t = s.y, o = e, a = t;
|
|
125
125
|
const h = this.contents;
|
|
@@ -161,7 +161,7 @@ class d extends c {
|
|
|
161
161
|
const i = this.contents;
|
|
162
162
|
this._downScale = i.get("scale", 1);
|
|
163
163
|
const n = i._downPoints;
|
|
164
|
-
let e =
|
|
164
|
+
let e = b(n).length;
|
|
165
165
|
if (e == 1) {
|
|
166
166
|
let t = n[1];
|
|
167
167
|
t || (t = n[0]), t && t.x == s.point.x && t.y == s.point.y && (e = 0);
|
|
@@ -177,7 +177,7 @@ class d extends c {
|
|
|
177
177
|
}
|
|
178
178
|
_handleThisMove(s) {
|
|
179
179
|
const n = s.originalEvent.pointerId;
|
|
180
|
-
if (this.get("pinchZoom") && n && (this._movePoints[n] = s.point,
|
|
180
|
+
if (this.get("pinchZoom") && n && (this._movePoints[n] = s.point, b(this.contents._downPoints).length > 1)) {
|
|
181
181
|
this._handlePinch();
|
|
182
182
|
return;
|
|
183
183
|
}
|
|
@@ -193,7 +193,7 @@ class d extends c {
|
|
|
193
193
|
let e = i[0], t = i[1], o = n[0], a = n[1];
|
|
194
194
|
if (e && t && o && a) {
|
|
195
195
|
e = this.toLocal(e), t = this.toLocal(t), o = this.toLocal(o), a = this.toLocal(a);
|
|
196
|
-
let h = Math.hypot(t.x - e.x, t.y - e.y), r = Math.hypot(a.x - o.x, a.y - o.y) / h * this._downScale, l = { x: o.x + (a.x - o.x) / 2, y: o.y + (a.y - o.y) / 2 }, u = { x: e.x + (t.x - e.x) / 2, y: e.y + (t.y - e.y) / 2 },
|
|
196
|
+
let h = Math.hypot(t.x - e.x, t.y - e.y), r = Math.hypot(a.x - o.x, a.y - o.y) / h * this._downScale, l = { x: o.x + (a.x - o.x) / 2, y: o.y + (a.y - o.y) / 2 }, u = { x: e.x + (t.x - e.x) / 2, y: e.y + (t.y - e.y) / 2 }, _ = this._downX || 0, w = this._downY || 0, p = this._downScale, y = l.x - (-_ + u.x) / p * r, P = l.y - (-w + u.y) / p * r;
|
|
197
197
|
this.contents.setAll({
|
|
198
198
|
x: y,
|
|
199
199
|
y: P,
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { T as x } from "../../../Tooltip-A_HlttXp.js";
|
|
2
|
+
import { c as p, p as v } from "../../../Entity-CCUIdRAr.js";
|
|
3
|
+
const F = {
|
|
4
|
+
millisecond: "d MMM, yyyy HH:mm:ss.SSS",
|
|
5
|
+
second: "d MMM, yyyy HH:mm:ss",
|
|
6
|
+
minute: "d MMM, yyyy HH:mm",
|
|
7
|
+
hour: "d MMM, yyyy HH:mm",
|
|
8
|
+
day: "d MMM, yyyy",
|
|
9
|
+
week: "d MMM, yyyy",
|
|
10
|
+
month: "MMM yyyy",
|
|
11
|
+
year: "yyyy"
|
|
12
|
+
}, $ = (o) => F[(o == null ? void 0 : o.timeUnit) ?? "day"], T = (o, t) => {
|
|
13
|
+
var i;
|
|
14
|
+
(i = o.get("background")) == null || i.setAll({
|
|
15
|
+
fill: p(t.palette.background.paper),
|
|
16
|
+
stroke: p(t.palette.divider),
|
|
17
|
+
fillOpacity: 1
|
|
18
|
+
}), o.label.setAll({
|
|
19
|
+
fill: p(t.palette.text.primary),
|
|
20
|
+
textAlign: "left",
|
|
21
|
+
lineHeight: v(160)
|
|
22
|
+
});
|
|
23
|
+
}, D = (o) => {
|
|
24
|
+
const { root: t, chart: i, theme: s, getText: y } = o, e = x.new(t, { getFillFromSprite: !1 });
|
|
25
|
+
T(e, s), e.label.adapters.add("text", y), t.tooltipContainer.children.push(e);
|
|
26
|
+
const n = i.get("cursor");
|
|
27
|
+
return n == null || n.events.on("cursormoved", () => {
|
|
28
|
+
const c = n.getPrivate("point");
|
|
29
|
+
c && (e.label.text.markDirtyText(), e.set("pointTo", n.toGlobal(c)), e.show());
|
|
30
|
+
}), n == null || n.events.on("cursorhidden", () => e.hide()), e;
|
|
31
|
+
}, A = (o) => {
|
|
32
|
+
const { root: t, chart: i, xAxis: s, theme: y, isDateAxis: e, baseInterval: n, follow: c } = o, f = $(n), b = p(y.palette.text.secondary).toCSSHex(), g = () => {
|
|
33
|
+
let l = "";
|
|
34
|
+
const m = [];
|
|
35
|
+
if (i.series.each((r) => {
|
|
36
|
+
const a = r.get("tooltipDataItem"), u = a == null ? void 0 : a.get("valueY");
|
|
37
|
+
if (a === void 0 || u === void 0 || u === null)
|
|
38
|
+
return;
|
|
39
|
+
if (!l)
|
|
40
|
+
if (e) {
|
|
41
|
+
const h = a.get("valueX");
|
|
42
|
+
typeof h == "number" && (l = t.dateFormatter.format(new Date(h), f));
|
|
43
|
+
} else
|
|
44
|
+
l = `${a.get("categoryX") ?? ""}`;
|
|
45
|
+
const M = r.get("fill") ?? r.get("stroke"), H = M ? `[${M.toCSSHex()}]●[/] ` : "";
|
|
46
|
+
m.push(
|
|
47
|
+
`${H}${r.get("name")}: ${t.numberFormatter.format(u)}`
|
|
48
|
+
);
|
|
49
|
+
}), m.length === 0) {
|
|
50
|
+
if (e) {
|
|
51
|
+
const a = s.positionToValue(
|
|
52
|
+
s.getPrivate("tooltipPosition", 0)
|
|
53
|
+
);
|
|
54
|
+
typeof a == "number" && !Number.isNaN(a) && (l = t.dateFormatter.format(new Date(a), f));
|
|
55
|
+
}
|
|
56
|
+
const r = `[${b}]No data[/]`;
|
|
57
|
+
return l ? `[bold]${l}[/]
|
|
58
|
+
${r}` : r;
|
|
59
|
+
}
|
|
60
|
+
return l ? `[bold]${l}[/]
|
|
61
|
+
${m.join(`
|
|
62
|
+
`)}` : m.join(`
|
|
63
|
+
`);
|
|
64
|
+
};
|
|
65
|
+
if (c) return D({ root: t, chart: i, theme: y, getText: g });
|
|
66
|
+
const d = x.new(t, { getFillFromSprite: !1 });
|
|
67
|
+
return T(d, y), d.label.adapters.add("text", g), s.set("tooltip", d), d;
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
A as attachCombinedAxisTooltip,
|
|
71
|
+
D as attachCursorTooltip,
|
|
72
|
+
$ as getTooltipDateFormat
|
|
73
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { buildAmNumberFormat as
|
|
2
|
-
import { C as m
|
|
1
|
+
import { buildAmNumberFormat as e } from "./format.js";
|
|
2
|
+
import { C as m } from "../../../ColorSet-DDmFoKtZ.js";
|
|
3
|
+
import { c as F } from "../../../Entity-CCUIdRAr.js";
|
|
3
4
|
const a = [
|
|
4
5
|
"#294D94",
|
|
5
6
|
"#375F97",
|
|
@@ -11,15 +12,15 @@ const a = [
|
|
|
11
12
|
"#9FCFBF",
|
|
12
13
|
"#B9E1C9",
|
|
13
14
|
"#D6F1D5"
|
|
14
|
-
],
|
|
15
|
-
colors:
|
|
15
|
+
], c = (r, o = a) => m.new(r, {
|
|
16
|
+
colors: o.map((t) => F(t)),
|
|
16
17
|
reuse: !0
|
|
17
|
-
}),
|
|
18
|
-
const
|
|
19
|
-
|
|
18
|
+
}), l = (r, o) => {
|
|
19
|
+
const t = e(o) ?? "#,###.##";
|
|
20
|
+
r.numberFormatter.set("numericFields", void 0), r.numberFormatter.set("numberFormat", t);
|
|
20
21
|
};
|
|
21
22
|
export {
|
|
22
23
|
a as DEFAULT_VIRIDIS_COOL,
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
l as applyValueFormat,
|
|
25
|
+
c as colorSetFromPalette
|
|
25
26
|
};
|