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