@wick-charts/vue 0.5.1 → 0.6.1

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 (82) hide show
  1. package/README.md +45 -6
  2. package/dist/BarSeries.vue.js +26 -20
  3. package/dist/CandlestickSeries.vue.js +30 -24
  4. package/dist/ChartContainer.vue.js +125 -72
  5. package/dist/HeatmapSeries.vue.js +40 -0
  6. package/dist/HeatmapSeries.vue2.js +4 -0
  7. package/dist/LineSeries.vue.js +26 -20
  8. package/dist/PieSeries.vue.js +24 -18
  9. package/dist/core/dist/animation/animator.js +21 -21
  10. package/dist/core/dist/animation/config.js +114 -87
  11. package/dist/core/dist/animation/easing.js +3 -1
  12. package/dist/core/dist/animation/intro-wave.js +68 -0
  13. package/dist/core/dist/axis/dom-labels.js +13 -14
  14. package/dist/core/dist/chart/badge-animator.js +56 -0
  15. package/dist/core/dist/chart/edge-indicators.js +28 -13
  16. package/dist/core/dist/chart/last-value.js +18 -17
  17. package/dist/core/dist/chart/options.js +27 -16
  18. package/dist/core/dist/chart/y-target.js +13 -12
  19. package/dist/core/dist/chart.js +868 -441
  20. package/dist/core/dist/components/annotation-chip.js +28 -0
  21. package/dist/core/dist/components/crosshair.js +8 -6
  22. package/dist/core/dist/components/edge-indicator.js +58 -26
  23. package/dist/core/dist/components/loading-indicator.js +46 -0
  24. package/dist/core/dist/components/marker.js +49 -31
  25. package/dist/core/dist/components/reference-line.js +27 -36
  26. package/dist/core/dist/components/time-region.js +30 -28
  27. package/dist/core/dist/data/store.js +38 -19
  28. package/dist/core/dist/data/sync.js +60 -38
  29. package/dist/core/dist/heatmap-tooltip.js +16 -0
  30. package/dist/core/dist/interactions/handler.js +86 -46
  31. package/dist/core/dist/perf/perf-hud.js +5 -5
  32. package/dist/core/dist/scales/x-scale.js +85 -37
  33. package/dist/core/dist/scales/y-scale.js +38 -27
  34. package/dist/core/dist/series/bar-intro.js +18 -0
  35. package/dist/core/dist/series/bar.js +337 -205
  36. package/dist/core/dist/series/base-multi-layer.js +224 -96
  37. package/dist/core/dist/series/candlestick-intro.js +57 -0
  38. package/dist/core/dist/series/candlestick.js +454 -276
  39. package/dist/core/dist/series/heatmap.js +387 -0
  40. package/dist/core/dist/series/line-intro.js +85 -0
  41. package/dist/core/dist/series/line.js +590 -282
  42. package/dist/core/dist/series/painters/builtins.js +2 -2
  43. package/dist/core/dist/series/pie.js +396 -259
  44. package/dist/core/dist/series/register-builtins.js +8 -7
  45. package/dist/core/dist/series/types.js +6 -0
  46. package/dist/core/dist/series/wave-intro.js +26 -0
  47. package/dist/core/dist/theme/create.js +69 -63
  48. package/dist/core/dist/theme/themes/mint-breeze.js +2 -2
  49. package/dist/core/dist/theme/themes/sand-dune.js +2 -2
  50. package/dist/core/dist/utils/color.js +109 -34
  51. package/dist/core/dist/utils/deep-equal.js +18 -0
  52. package/dist/core/dist/utils/time.js +25 -19
  53. package/dist/index.d.ts +1494 -122
  54. package/dist/index.js +177 -130
  55. package/dist/ui/Crosshair.vue.js +20 -21
  56. package/dist/ui/HeatmapTooltip.vue.js +96 -0
  57. package/dist/ui/HeatmapTooltip.vue2.js +4 -0
  58. package/dist/ui/InfoBar.vue.js +46 -47
  59. package/dist/ui/Legend.vue.js +80 -79
  60. package/dist/ui/PieLegend.vue.js +5 -5
  61. package/dist/ui/PieTooltip.vue.js +77 -67
  62. package/dist/ui/Tooltip.vue.js +60 -60
  63. package/dist/ui/YAxis.vue.js +2 -2
  64. package/dist/ui/YLabel.vue.js +94 -61
  65. package/package.json +2 -2
  66. package/src/BarSeries.vue +23 -7
  67. package/src/CandlestickSeries.vue +23 -7
  68. package/src/ChartContainer.vue +250 -13
  69. package/src/HeatmapSeries.vue +69 -0
  70. package/src/LineSeries.vue +23 -7
  71. package/src/PieSeries.vue +22 -6
  72. package/src/index.ts +84 -3
  73. package/src/ui/Crosshair.vue +1 -2
  74. package/src/ui/HeatmapTooltip.vue +144 -0
  75. package/src/ui/InfoBar.vue +1 -2
  76. package/src/ui/Legend.vue +13 -0
  77. package/src/ui/Marker.vue +1 -1
  78. package/src/ui/PieTooltip.vue +10 -0
  79. package/src/ui/ReferenceLine.vue +2 -2
  80. package/src/ui/TimeRegion.vue +2 -2
  81. package/src/ui/Tooltip.vue +2 -2
  82. package/src/ui/YLabel.vue +123 -8
@@ -1,96 +1,96 @@
1
- import { defineComponent as H, computed as a, useSlots as O, ref as m, onMounted as P, onUnmounted as R, watchEffect as D, openBlock as x, createElementBlock as g, Fragment as B, unref as y, normalizeStyle as b, createElementVNode as r, toDisplayString as _, createCommentVNode as T, renderSlot as L } from "vue";
1
+ import { defineComponent as H, computed as a, useSlots as R, ref as x, onMounted as O, onUnmounted as P, watchEffect as B, openBlock as m, createElementBlock as g, Fragment as D, unref as b, normalizeStyle as y, createElementVNode as s, toDisplayString as _, createCommentVNode as I, renderSlot as L } from "vue";
2
2
  import { computeTooltipPosition as C } from "../core/dist/tooltip-position.js";
3
3
  import { formatCompact as X } from "../core/dist/utils/format.js";
4
4
  import { useCrosshairPosition as Y } from "../composables.js";
5
5
  import { useChartInstance as M } from "../context.js";
6
- const U = { style: { display: "flex", alignItems: "center", gap: "8px" } }, A = { style: { fontWeight: 600 } }, N = { style: { display: "flex", justifyContent: "space-between", gap: "16px" } }, V = { style: { opacity: 0.6 } }, $ = { style: { fontWeight: 600 } }, j = ["data-measured"], G = 160, q = 70, te = /* @__PURE__ */ H({
6
+ const U = { style: { display: "flex", alignItems: "center", gap: "8px" } }, A = { style: { fontWeight: 600 } }, N = { style: { display: "flex", justifyContent: "space-between", gap: "16px" } }, V = { style: { opacity: 0.6 } }, j = { style: { fontWeight: 600 } }, G = ["data-measured"], $ = 160, q = 70, te = /* @__PURE__ */ H({
7
7
  __name: "PieTooltip",
8
8
  props: {
9
9
  seriesId: {},
10
10
  format: { type: Function }
11
11
  },
12
- setup(F) {
13
- const S = F, w = a(() => S.format ?? X), o = M(), i = Y(o), W = O(), p = a(() => typeof W.default == "function"), c = m(0), I = () => {
12
+ setup(T) {
13
+ const S = T, k = a(() => S.format ?? X), i = M(), l = Y(i), W = R(), d = a(() => typeof W.default == "function"), c = x(0), w = () => {
14
14
  c.value++;
15
15
  };
16
- P(() => {
17
- o.on("overlayChange", I);
18
- }), R(() => {
19
- o.off("overlayChange", I);
16
+ O(() => {
17
+ i.on("overlayChange", w);
18
+ }), P(() => {
19
+ i.off("overlayChange", w);
20
20
  });
21
- function E(e, t) {
22
- if (t !== void 0) return t;
23
- const v = e.getSeriesIdsByType("pie", { visibleOnly: !0 });
24
- return v.length > 0 ? v[0] : null;
21
+ function E(t, o) {
22
+ if (o !== void 0) return o;
23
+ const f = t.getSeriesIdsByType("pie", { visibleOnly: !0 });
24
+ return f.length > 0 ? f[0] : null;
25
25
  }
26
- const s = a(() => (c.value, o.getTheme())), z = a(() => (c.value, E(o, S.seriesId))), n = a(() => (i.value, c.value, z.value === null ? null : o.getHoverInfo(z.value))), k = m(null), u = m(null);
27
- let f = null;
28
- D((e) => {
29
- if (!p.value) return;
30
- const t = k.value;
31
- !t || typeof ResizeObserver > "u" || (f = new ResizeObserver((v) => {
32
- const d = v[0]?.contentRect;
33
- if (!d) return;
26
+ const e = a(() => (c.value, i.getTheme())), z = a(() => (c.value, E(i, S.seriesId))), n = a(() => (l.value, c.value, z.value === null ? null : i.getHoverInfo(z.value))), F = x(null), u = x(null);
27
+ let v = null;
28
+ B((t) => {
29
+ if (!d.value) return;
30
+ const o = F.value;
31
+ !o || typeof ResizeObserver > "u" || (v = new ResizeObserver((f) => {
32
+ const p = f[0]?.contentRect;
33
+ if (!p) return;
34
34
  const h = u.value;
35
- (!h || h.width !== d.width || h.height !== d.height) && (u.value = { width: d.width, height: d.height });
36
- }), f.observe(t), e(() => {
37
- f?.disconnect(), f = null;
35
+ (!h || h.width !== p.width || h.height !== p.height) && (u.value = { width: p.width, height: p.height });
36
+ }), v.observe(o), t(() => {
37
+ v?.disconnect(), v = null;
38
38
  }));
39
39
  });
40
- const l = a(() => {
41
- if (!i.value || !n.value) return null;
42
- const e = o.getMediaSize();
43
- if (p.value) {
44
- const t = u.value;
45
- return t ? C({
46
- x: i.value.mediaX,
47
- y: i.value.mediaY,
48
- chartWidth: e.width,
49
- chartHeight: e.height,
50
- tooltipWidth: t.width,
51
- tooltipHeight: t.height,
40
+ const r = a(() => {
41
+ if (!l.value || !n.value) return null;
42
+ const t = i.getMediaSize();
43
+ if (d.value) {
44
+ const o = u.value;
45
+ return o ? C({
46
+ x: l.value.mediaX,
47
+ y: l.value.mediaY,
48
+ chartWidth: t.width,
49
+ chartHeight: t.height,
50
+ tooltipWidth: o.width,
51
+ tooltipHeight: o.height,
52
52
  offsetX: 16,
53
53
  offsetY: 16
54
54
  }) : { left: 0, top: 0 };
55
55
  }
56
56
  return C({
57
- x: i.value.mediaX,
58
- y: i.value.mediaY,
59
- chartWidth: e.width,
60
- chartHeight: e.height,
61
- tooltipWidth: G,
57
+ x: l.value.mediaX,
58
+ y: l.value.mediaY,
59
+ chartWidth: t.width,
60
+ chartHeight: t.height,
61
+ tooltipWidth: $,
62
62
  tooltipHeight: q,
63
63
  offsetX: 16,
64
64
  offsetY: 16
65
65
  });
66
66
  });
67
- return (e, t) => (x(), g(B, null, [
68
- n.value && y(i) && l.value && !p.value ? (x(), g("div", {
67
+ return (t, o) => (m(), g(D, null, [
68
+ n.value && b(l) && r.value && !d.value ? (m(), g("div", {
69
69
  key: 0,
70
- style: b({
70
+ style: y({
71
71
  position: "absolute",
72
- left: l.value.left + "px",
73
- top: l.value.top + "px",
72
+ left: r.value.left + "px",
73
+ top: r.value.top + "px",
74
74
  pointerEvents: "none",
75
- background: s.value.tooltip.background,
75
+ background: e.value.tooltip.background,
76
76
  backdropFilter: "blur(12px)",
77
77
  WebkitBackdropFilter: "blur(12px)",
78
- border: "1px solid " + s.value.tooltip.borderColor,
78
+ border: "1px solid " + e.value.tooltip.borderColor,
79
79
  borderRadius: "8px",
80
80
  padding: "10px 14px",
81
81
  boxShadow: "0 4px 16px rgba(0,0,0,0.1), 0 1px 4px rgba(0,0,0,0.06)",
82
- fontSize: s.value.typography.fontSize + "px",
83
- fontFamily: s.value.typography.fontFamily,
84
- color: s.value.tooltip.textColor,
82
+ fontSize: e.value.typography.fontSize + "px",
83
+ fontFamily: e.value.typography.fontFamily,
84
+ color: e.value.tooltip.textColor,
85
85
  zIndex: 10,
86
86
  display: "flex",
87
87
  flexDirection: "column",
88
88
  gap: "6px"
89
89
  })
90
90
  }, [
91
- r("div", U, [
92
- r("span", {
93
- style: b({
91
+ s("div", U, [
92
+ s("span", {
93
+ style: y({
94
94
  width: "10px",
95
95
  height: "10px",
96
96
  borderRadius: "50%",
@@ -98,35 +98,45 @@ const U = { style: { display: "flex", alignItems: "center", gap: "8px" } }, A =
98
98
  flexShrink: 0
99
99
  })
100
100
  }, null, 4),
101
- r("span", A, _(n.value.label), 1)
101
+ s("span", A, _(n.value.label), 1)
102
102
  ]),
103
- r("div", N, [
104
- r("span", V, _(w.value(n.value.value)), 1),
105
- r("span", $, _(n.value.percent.toFixed(1)) + "%", 1)
103
+ s("div", N, [
104
+ s("span", V, _(k.value(n.value.value)), 1),
105
+ s("span", j, _(n.value.percent.toFixed(1)) + "%", 1)
106
106
  ])
107
- ], 4)) : T("", !0),
108
- n.value && y(i) && l.value && p.value ? (x(), g("div", {
107
+ ], 4)) : I("", !0),
108
+ n.value && b(l) && r.value && d.value ? (m(), g("div", {
109
109
  key: 1,
110
110
  ref_key: "containerRef",
111
- ref: k,
111
+ ref: F,
112
112
  "data-measured": u.value !== null ? "true" : "false",
113
- style: b({
113
+ style: y({
114
114
  position: "absolute",
115
- left: l.value.left + "px",
116
- top: l.value.top + "px",
115
+ left: r.value.left + "px",
116
+ top: r.value.top + "px",
117
117
  pointerEvents: "none",
118
+ background: e.value.tooltip.background,
119
+ backdropFilter: "blur(12px)",
120
+ WebkitBackdropFilter: "blur(12px)",
121
+ border: "1px solid " + e.value.tooltip.borderColor,
122
+ borderRadius: "8px",
123
+ padding: "10px 14px",
124
+ boxShadow: "0 4px 16px rgba(0,0,0,0.1), 0 1px 4px rgba(0,0,0,0.06)",
125
+ fontFamily: e.value.typography.fontFamily,
126
+ fontSize: e.value.typography.fontSize + "px",
127
+ color: e.value.tooltip.textColor,
118
128
  zIndex: 10,
119
129
  width: "max-content",
120
- maxWidth: y(o).getMediaSize().width + "px",
130
+ maxWidth: b(i).getMediaSize().width + "px",
121
131
  boxSizing: "border-box",
122
132
  visibility: u.value !== null ? "visible" : "hidden"
123
133
  })
124
134
  }, [
125
- L(e.$slots, "default", {
135
+ L(t.$slots, "default", {
126
136
  info: n.value,
127
- format: w.value
137
+ format: k.value
128
138
  })
129
- ], 12, j)) : T("", !0)
139
+ ], 12, G)) : I("", !0)
130
140
  ], 64));
131
141
  }
132
142
  });
@@ -1,67 +1,67 @@
1
- import { defineComponent as P, computed as s, ref as w, onMounted as D, onUnmounted as M, useSlots as X, watchEffect as Y, openBlock as r, createElementBlock as u, Fragment as x, unref as v, normalizeStyle as m, createElementVNode as p, toDisplayString as f, renderList as H, createCommentVNode as _, renderSlot as $ } from "vue";
2
- import { buildHoverSnapshots as K } from "../core/dist/snapshots.js";
3
- import { resolveCandlestickBodyColor as U } from "../core/dist/theme/resolve.js";
1
+ import { defineComponent as P, computed as s, ref as w, onMounted as D, onUnmounted as M, useSlots as X, watchEffect as Y, openBlock as r, createElementBlock as u, Fragment as x, unref as p, normalizeStyle as m, createElementVNode as d, toDisplayString as f, renderList as H, createCommentVNode as _, renderSlot as Z } from "vue";
2
+ import { buildHoverSnapshots as $ } from "../core/dist/snapshots.js";
3
+ import { resolveCandlestickBodyColor as K } from "../core/dist/theme/resolve.js";
4
4
  import { computeTooltipPosition as R } from "../core/dist/tooltip-position.js";
5
- import { formatCompact as j, formatPriceAdaptive as q } from "../core/dist/utils/format.js";
6
- import { formatDate as G, formatTime as J } from "../core/dist/utils/time.js";
7
- import { useCrosshairPosition as Q } from "../composables.js";
8
- import { useChartInstance as Z } from "../context.js";
9
- const ee = {
5
+ import { formatCompact as U, formatPriceAdaptive as j } from "../core/dist/utils/format.js";
6
+ import { formatDate as q } from "../core/dist/utils/time.js";
7
+ import { useCrosshairPosition as G } from "../composables.js";
8
+ import { useChartInstance as J } from "../context.js";
9
+ const Q = {
10
10
  key: 0,
11
11
  style: { display: "grid", gridTemplateColumns: "auto 1fr", gap: "4px 12px" }
12
- }, te = { style: { opacity: 0.5 } }, oe = {
12
+ }, ee = { style: { opacity: 0.5 } }, te = {
13
13
  key: 1,
14
14
  style: { display: "flex", alignItems: "center", gap: "8px", padding: "2px 0" }
15
- }, ae = { style: { opacity: 0.6, flex: "1" } }, le = ["data-measured"], ve = /* @__PURE__ */ P({
15
+ }, oe = { style: { opacity: 0.6, flex: "1" } }, le = ["data-measured"], ce = /* @__PURE__ */ P({
16
16
  __name: "Tooltip",
17
17
  props: {
18
18
  sort: {},
19
19
  format: { type: Function }
20
20
  },
21
- setup(A) {
22
- const F = A, I = s(() => F.sort ?? "none"), C = s(
23
- () => F.format ?? ((l, n) => n === "volume" ? j(l) : q(l))
24
- ), o = Z(), i = Q(o), S = w(0), W = () => {
25
- S.value++;
21
+ setup(I) {
22
+ const F = I, A = s(() => F.sort ?? "none"), k = s(
23
+ () => F.format ?? ((a, n) => n === "volume" ? U(a) : j(a))
24
+ ), o = J(), i = G(o), C = w(0), W = () => {
25
+ C.value++;
26
26
  };
27
27
  D(() => {
28
- o.on("overlayChange", W), o.getSeriesIds().length > 0 && S.value++;
28
+ o.on("overlayChange", W), o.getSeriesIds().length > 0 && C.value++;
29
29
  }), M(() => {
30
30
  o.off("overlayChange", W);
31
31
  });
32
- const t = s(() => o.getTheme()), O = s(() => o.getDataInterval()), d = s(() => (S.value, i.value ? K(o, {
32
+ const t = s(() => o.getTheme()), O = s(() => o.getDataInterval()), c = s(() => (C.value, i.value ? $(o, {
33
33
  time: i.value.time,
34
- sort: I.value,
34
+ sort: A.value,
35
35
  cacheKey: "tooltip"
36
36
  }) : [])), z = s(() => i.value?.time ?? 0), T = X(), g = s(() => typeof T.default == "function"), B = w(null), b = w(null);
37
- let k = null;
38
- Y((l) => {
37
+ let S = null;
38
+ Y((a) => {
39
39
  if (!g.value) return;
40
40
  const n = B.value;
41
- !n || typeof ResizeObserver > "u" || (k = new ResizeObserver((e) => {
42
- const a = e[0]?.contentRect;
43
- if (!a) return;
41
+ !n || typeof ResizeObserver > "u" || (S = new ResizeObserver((e) => {
42
+ const l = e[0]?.contentRect;
43
+ if (!l) return;
44
44
  const y = b.value;
45
- (!y || y.width !== a.width || y.height !== a.height) && (b.value = { width: a.width, height: a.height });
46
- }), k.observe(n), l(() => {
47
- k?.disconnect(), k = null;
45
+ (!y || y.width !== l.width || y.height !== l.height) && (b.value = { width: l.width, height: l.height });
46
+ }), S.observe(n), a(() => {
47
+ S?.disconnect(), S = null;
48
48
  }));
49
49
  });
50
50
  const h = s(() => {
51
- if (!i.value || d.value.length === 0) return null;
52
- const l = o.getMediaSize(), n = l.width - o.yAxisWidth, e = l.height - o.xAxisHeight;
51
+ if (!i.value || c.value.length === 0) return null;
52
+ const a = o.getMediaSize(), n = a.width - o.yAxisWidth, e = a.height - o.xAxisHeight;
53
53
  if (g.value) {
54
- const c = b.value;
55
- return c ? R({
54
+ const v = b.value;
55
+ return v ? R({
56
56
  x: i.value.mediaX,
57
57
  y: i.value.mediaY,
58
58
  chartWidth: n,
59
59
  chartHeight: e,
60
- tooltipWidth: c.width,
61
- tooltipHeight: c.height
60
+ tooltipWidth: v.width,
61
+ tooltipHeight: v.height
62
62
  }) : { left: 0, top: 0 };
63
63
  }
64
- const a = d.value.some((c) => "open" in c.data), y = d.value.filter((c) => !("open" in c.data)).length, L = 160, N = a ? 140 : 40 + y * 22;
64
+ const l = c.value.some((v) => "open" in v.data), y = c.value.filter((v) => !("open" in v.data)).length, L = 160, N = l ? 140 : 40 + y * 22;
65
65
  return R({
66
66
  x: i.value.mediaX,
67
67
  y: i.value.mediaY,
@@ -71,11 +71,11 @@ const ee = {
71
71
  tooltipHeight: N
72
72
  });
73
73
  }), V = s(() => !g.value || b.value !== null);
74
- function E(l) {
75
- return "open" in l;
74
+ function E(a) {
75
+ return "open" in a;
76
76
  }
77
- return (l, n) => (r(), u(x, null, [
78
- v(i) && d.value.length > 0 && h.value && !g.value ? (r(), u("div", {
77
+ return (a, n) => (r(), u(x, null, [
78
+ p(i) && c.value.length > 0 && h.value && !g.value ? (r(), u("div", {
79
79
  key: 0,
80
80
  style: m({
81
81
  position: "absolute",
@@ -98,7 +98,7 @@ const ee = {
98
98
  transition: "opacity 0.15s ease"
99
99
  })
100
100
  }, [
101
- p("div", {
101
+ d("div", {
102
102
  style: m({
103
103
  fontSize: t.value.axis.fontSize + "px",
104
104
  color: t.value.axis.textColor,
@@ -107,38 +107,38 @@ const ee = {
107
107
  borderBottom: "1px solid " + t.value.tooltip.borderColor,
108
108
  letterSpacing: "0.02em"
109
109
  })
110
- }, f(v(G)(z.value)) + " " + f(v(J)(z.value, O.value)), 5),
111
- (r(!0), u(x, null, H(d.value, (e) => (r(), u(x, {
110
+ }, f(p(q)(z.value, { locale: p(o).timeScale.getLocale(), timeZone: p(o).timeScale.getTimeZone() })) + " " + f(p(o).timeScale.formatX(z.value, O.value)), 5),
111
+ (r(!0), u(x, null, H(c.value, (e) => (r(), u(x, {
112
112
  key: e.id
113
113
  }, [
114
- E(e.data) ? (r(), u("div", ee, [
114
+ E(e.data) ? (r(), u("div", Q, [
115
115
  (r(!0), u(x, null, H([
116
116
  { label: "Open", val: e.data.open, field: "open" },
117
117
  { label: "High", val: e.data.high, field: "high" },
118
118
  { label: "Low", val: e.data.low, field: "low" },
119
119
  { label: "Close", val: e.data.close, field: "close" }
120
- ], (a) => (r(), u(x, {
121
- key: a.label
120
+ ], (l) => (r(), u(x, {
121
+ key: l.label
122
122
  }, [
123
- p("span", te, f(a.label), 1),
124
- p("span", {
123
+ d("span", ee, f(l.label), 1),
124
+ d("span", {
125
125
  style: m({
126
126
  fontWeight: 600,
127
- color: v(U)(
127
+ color: p(K)(
128
128
  e.data.close >= e.data.open ? t.value.candlestick.up.body : t.value.candlestick.down.body
129
129
  ),
130
130
  textAlign: "right"
131
131
  })
132
- }, f(C.value(a.val, a.field)), 5)
132
+ }, f(k.value(l.val, l.field)), 5)
133
133
  ], 64))), 128)),
134
134
  e.data.volume != null ? (r(), u(x, { key: 0 }, [
135
- n[0] || (n[0] = p("span", { style: { opacity: 0.5 } }, "Volume", -1)),
136
- p("span", {
135
+ n[0] || (n[0] = d("span", { style: { opacity: 0.5 } }, "Volume", -1)),
136
+ d("span", {
137
137
  style: m({ fontWeight: 600, color: t.value.tooltip.textColor, textAlign: "right" })
138
- }, f(C.value(e.data.volume, "volume")), 5)
138
+ }, f(k.value(e.data.volume, "volume")), 5)
139
139
  ], 64)) : _("", !0)
140
- ])) : (r(), u("div", oe, [
141
- p("span", {
140
+ ])) : (r(), u("div", te, [
141
+ d("span", {
142
142
  style: m({
143
143
  width: "8px",
144
144
  height: "8px",
@@ -147,14 +147,14 @@ const ee = {
147
147
  flexShrink: 0
148
148
  })
149
149
  }, null, 4),
150
- p("span", ae, f(e.label ?? "Value"), 1),
151
- p("span", {
150
+ d("span", oe, f(e.label ?? "Value"), 1),
151
+ d("span", {
152
152
  style: m({ fontWeight: 600, color: e.color })
153
- }, f(C.value(e.data.value, "value")), 5)
153
+ }, f(k.value(e.data.value, "value")), 5)
154
154
  ]))
155
155
  ], 64))), 128))
156
156
  ], 4)) : _("", !0),
157
- v(i) && d.value.length > 0 && h.value && g.value ? (r(), u("div", {
157
+ p(i) && c.value.length > 0 && h.value && g.value ? (r(), u("div", {
158
158
  key: 1,
159
159
  ref_key: "containerRef",
160
160
  ref: B,
@@ -176,14 +176,14 @@ const ee = {
176
176
  fontVariantNumeric: "tabular-nums",
177
177
  color: t.value.tooltip.textColor,
178
178
  width: "max-content",
179
- maxWidth: v(o).getMediaSize().width - v(o).yAxisWidth + "px",
179
+ maxWidth: p(o).getMediaSize().width - p(o).yAxisWidth + "px",
180
180
  boxSizing: "border-box",
181
181
  zIndex: 10,
182
182
  visibility: b.value !== null ? "visible" : "hidden"
183
183
  })
184
184
  }, [
185
- $(l.$slots, "default", {
186
- snapshots: d.value,
185
+ Z(a.$slots, "default", {
186
+ snapshots: c.value,
187
187
  time: z.value
188
188
  })
189
189
  ], 12, le)) : _("", !0)
@@ -191,5 +191,5 @@ const ee = {
191
191
  }
192
192
  });
193
193
  export {
194
- ve as default
194
+ ce as default
195
195
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as m, ref as p, onMounted as r, watch as s, onUnmounted as o, openBlock as f, createElementBlock as b, normalizeStyle as y, unref as u } from "vue";
1
+ import { defineComponent as m, ref as p, onMounted as r, watch as s, onUnmounted as o, openBlock as b, createElementBlock as f, normalizeStyle as y, unref as u } from "vue";
2
2
  import { mountAxisLabels as x } from "../core/dist/axis/dom-labels.js";
3
3
  import { useChartInstance as h } from "../context.js";
4
4
  const _ = /* @__PURE__ */ m({
@@ -23,7 +23,7 @@ const _ = /* @__PURE__ */ m({
23
23
  t.value !== null && (l = x({ chart: n, container: t.value, axis: "y" }));
24
24
  }), o(() => {
25
25
  l?.(), l = null;
26
- }), (L, S) => (f(), b("div", {
26
+ }), (L, S) => (b(), f("div", {
27
27
  ref_key: "containerRef",
28
28
  ref: t,
29
29
  style: y({