@wick-charts/vue 0.6.2 → 0.6.3
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/ChartContainer.vue.js +43 -37
- package/dist/LineSeries.vue.js +2 -2
- package/dist/composables.js +39 -26
- package/dist/core/dist/axis/dom-labels.js +56 -43
- package/dist/core/dist/chart/options.js +5 -5
- package/dist/core/dist/chart/scale-guards.js +26 -0
- package/dist/core/dist/chart/y-target.js +46 -19
- package/dist/core/dist/chart.js +670 -519
- package/dist/core/dist/components/crosshair.js +8 -8
- package/dist/core/dist/components/grid.js +26 -17
- package/dist/core/dist/components/marker.js +28 -28
- package/dist/core/dist/components/reference-line.js +16 -16
- package/dist/core/dist/interactions/handler.js +3 -2
- package/dist/core/dist/interactions/zoom.js +6 -5
- package/dist/core/dist/navigator/controller.js +38 -35
- package/dist/core/dist/perf/perf-hud.js +3 -3
- package/dist/core/dist/scales/log-scale.js +76 -0
- package/dist/core/dist/scales/y-scale.js +134 -35
- package/dist/core/dist/series/bar-intro.js +11 -11
- package/dist/core/dist/series/bar.js +301 -251
- package/dist/core/dist/series/base-multi-layer.js +100 -76
- package/dist/core/dist/series/candlestick.js +244 -241
- package/dist/core/dist/series/line-intro.js +18 -18
- package/dist/core/dist/series/line.js +428 -390
- package/dist/core/dist/series/scale-stack.js +25 -0
- package/dist/core/dist/tooltip-position.js +5 -5
- package/dist/index.d.ts +246 -31
- package/dist/index.js +59 -57
- package/dist/ui/Crosshair.vue.js +14 -14
- package/dist/ui/HeatmapTooltip.vue.js +6 -6
- package/dist/ui/PieTooltip.vue.js +4 -4
- package/dist/ui/TimeAxis.vue.js +23 -22
- package/dist/ui/Tooltip.vue.js +71 -69
- package/dist/ui/YAxis.vue.js +25 -24
- package/dist/ui/YLabel.vue.js +48 -48
- package/package.json +2 -2
- package/src/ChartContainer.vue +20 -8
- package/src/composables.ts +35 -1
- package/src/index.ts +5 -0
- package/src/ui/Crosshair.vue +2 -2
- package/src/ui/TimeAxis.vue +7 -4
- package/src/ui/Tooltip.vue +4 -1
- package/src/ui/YAxis.vue +5 -3
- package/src/ui/YLabel.vue +3 -3
|
@@ -6,7 +6,7 @@ function g(e) {
|
|
|
6
6
|
const o = f(e.progress), t = e.range.from + o * (e.range.to - e.range.from);
|
|
7
7
|
return { x: e.timeToX(t), time: t };
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function I(e = {}) {
|
|
10
10
|
const o = e.head ?? !0;
|
|
11
11
|
return (t) => {
|
|
12
12
|
const r = g(t);
|
|
@@ -16,39 +16,39 @@ function X(e = {}) {
|
|
|
16
16
|
function y(e = {}) {
|
|
17
17
|
const o = Math.min(l(e.stagger ?? 0.35), 0.9);
|
|
18
18
|
return (t) => ({
|
|
19
|
-
value: ({ layerIndex: r, value:
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
22
|
-
const n = l((t.progress - o *
|
|
23
|
-
return
|
|
19
|
+
value: ({ layerIndex: r, value: i, position: c }) => {
|
|
20
|
+
const u = t.layerMean(r);
|
|
21
|
+
if (u === null || !Number.isFinite(i)) return i;
|
|
22
|
+
const n = l((t.progress - o * c) / (1 - o));
|
|
23
|
+
return t.lerpValue(u, i, d(n));
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
function T() {
|
|
28
|
-
const e =
|
|
28
|
+
const e = I();
|
|
29
29
|
return (o) => {
|
|
30
30
|
if (o.stacking !== "off") return e(o);
|
|
31
31
|
const t = o.primaryPath();
|
|
32
32
|
if (t === null || t.length < 2) return e(o);
|
|
33
33
|
let r = 0;
|
|
34
|
-
const
|
|
34
|
+
const i = [];
|
|
35
35
|
for (let n = 1; n < t.length; n++) {
|
|
36
|
-
const
|
|
37
|
-
|
|
36
|
+
const s = Math.hypot(t[n].x - t[n - 1].x, t[n].y - t[n - 1].y);
|
|
37
|
+
i.push(s), r += s;
|
|
38
38
|
}
|
|
39
39
|
if (r <= 0) return e(o);
|
|
40
|
-
let
|
|
40
|
+
let c = o.progress * r;
|
|
41
41
|
for (let n = 1; n < t.length; n++) {
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
|
|
42
|
+
const s = i[n - 1];
|
|
43
|
+
if (c > s) {
|
|
44
|
+
c -= s;
|
|
45
45
|
continue;
|
|
46
46
|
}
|
|
47
|
-
const
|
|
47
|
+
const p = s > 0 ? c / s : 1, a = t[n - 1], h = t[n], m = a.x + (h.x - a.x) * p, x = a.time + (h.time - a.time) * p;
|
|
48
48
|
return { clip: { toX: m }, heads: [{ x: m, time: x }] };
|
|
49
49
|
}
|
|
50
|
-
const
|
|
51
|
-
return { clip: { toX:
|
|
50
|
+
const u = t[t.length - 1];
|
|
51
|
+
return { clip: { toX: u.x }, heads: [{ x: u.x, time: u.time }] };
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
function w(e = {}) {
|
|
@@ -79,7 +79,7 @@ export {
|
|
|
79
79
|
b as backfillSweepIntro,
|
|
80
80
|
k as centerOutIntro,
|
|
81
81
|
T as plotterIntro,
|
|
82
|
-
|
|
82
|
+
I as sweepIntro,
|
|
83
83
|
w as traceIntro,
|
|
84
84
|
y as unfoldIntro
|
|
85
85
|
};
|