@wick-charts/vue 0.6.3 → 0.6.4

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 (35) hide show
  1. package/README.md +2 -2
  2. package/dist/BandSeries.vue.js +50 -0
  3. package/dist/BandSeries.vue2.js +4 -0
  4. package/dist/ChartContainer.vue.js +16 -16
  5. package/dist/LineSeries.vue.js +2 -2
  6. package/dist/core/dist/animation/config.js +92 -75
  7. package/dist/core/dist/chart/badge-animator.js +30 -22
  8. package/dist/core/dist/chart/edge-indicators.js +22 -21
  9. package/dist/core/dist/chart/last-value.js +33 -26
  10. package/dist/core/dist/chart.js +168 -167
  11. package/dist/core/dist/data/decimation.js +58 -39
  12. package/dist/core/dist/navigator/controller.js +10 -10
  13. package/dist/core/dist/perf/perf-hud.js +6 -6
  14. package/dist/core/dist/series/band.js +670 -0
  15. package/dist/core/dist/series/bar.js +14 -14
  16. package/dist/core/dist/series/candlestick.js +31 -31
  17. package/dist/core/dist/series/heatmap.js +5 -5
  18. package/dist/core/dist/series/line-intro.js +47 -37
  19. package/dist/core/dist/series/line.js +485 -445
  20. package/dist/core/dist/series/painters/builtins.js +4 -4
  21. package/dist/core/dist/series/painters/canvas-path.js +64 -52
  22. package/dist/core/dist/series/register-builtins.js +9 -8
  23. package/dist/core/dist/snapshots.js +36 -35
  24. package/dist/core/dist/utils/point.js +10 -0
  25. package/dist/index.d.ts +255 -97
  26. package/dist/index.js +195 -191
  27. package/dist/ui/InfoBar.vue.js +100 -81
  28. package/dist/ui/Tooltip.vue.js +118 -91
  29. package/dist/ui/YLabel.vue.js +62 -69
  30. package/package.json +2 -2
  31. package/src/BandSeries.vue +87 -0
  32. package/src/index.ts +8 -0
  33. package/src/ui/InfoBar.vue +20 -1
  34. package/src/ui/Tooltip.vue +36 -2
  35. package/src/ui/YLabel.vue +2 -13
@@ -1,62 +1,68 @@
1
- import { defineComponent as V, computed as n, inject as B, ref as N, onMounted as T, onUnmounted as W, useSlots as A, unref as e, openBlock as l, createBlock as O, Teleport as D, createElementVNode as i, normalizeStyle as s, renderSlot as M, createElementBlock as u, Fragment as p, toDisplayString as m, renderList as _, createCommentVNode as F } from "vue";
2
- import { buildHoverSnapshots as P, buildLastSnapshots as R } from "../core/dist/snapshots.js";
3
- import { resolveCandlestickBodyColor as $ } from "../core/dist/theme/resolve.js";
4
- import { formatCompact as j, formatPriceAdaptive as U } from "../core/dist/utils/format.js";
5
- import { useCrosshairPosition as X } from "../composables.js";
6
- import { useChartInstance as q, ThemeKey as G, InfoBarAnchorKey as J } from "../context.js";
7
- const Q = {
1
+ import { defineComponent as W, computed as i, inject as B, ref as N, onMounted as T, onUnmounted as A, useSlots as O, unref as t, openBlock as n, createBlock as R, Teleport as D, createElementVNode as l, normalizeStyle as r, renderSlot as M, createElementBlock as s, Fragment as c, toDisplayString as p, renderList as F, createCommentVNode as L } from "vue";
2
+ import { buildHoverSnapshots as P, buildLastSnapshots as $ } from "../core/dist/snapshots.js";
3
+ import { resolveCandlestickBodyColor as j } from "../core/dist/theme/resolve.js";
4
+ import { formatCompact as U, formatPriceAdaptive as X } from "../core/dist/utils/format.js";
5
+ import { useCrosshairPosition as q } from "../composables.js";
6
+ import { useChartInstance as G, ThemeKey as J, InfoBarAnchorKey as Q } from "../context.js";
7
+ const Y = {
8
8
  key: 0,
9
9
  style: { display: "inline-flex", alignItems: "center", gap: "4px" }
10
- }, Y = {
10
+ }, Z = {
11
11
  key: 1,
12
12
  style: { display: "inline-flex", alignItems: "center", gap: "3px" }
13
- }, le = /* @__PURE__ */ V({
13
+ }, ee = {
14
+ key: 2,
15
+ style: { display: "inline-flex", alignItems: "center", gap: "3px" }
16
+ }, ie = /* @__PURE__ */ W({
14
17
  __name: "InfoBar",
15
18
  props: {
16
19
  sort: {},
17
20
  format: { type: Function }
18
21
  },
19
- setup(L) {
20
- const C = L, b = n(() => C.sort ?? "none"), y = n(
21
- () => C.format ?? ((o, w) => w === "volume" ? j(o) : U(o))
22
- ), r = q(), h = X(r), a = B(G), g = B(J);
23
- if (!a)
22
+ setup(E) {
23
+ const b = E, k = i(() => b.sort ?? "none"), f = i(
24
+ () => b.format ?? ((a, _) => _ === "volume" ? U(a) : X(a))
25
+ ), u = G(), y = q(u), o = B(J), g = B(Q);
26
+ if (!o)
24
27
  throw new Error("<InfoBar> must be used within <ChartContainer>: missing ThemeKey.");
25
28
  if (!g)
26
29
  throw new Error("<InfoBar> must be used within <ChartContainer>: missing InfoBarAnchorKey.");
27
- const v = N(0), S = () => {
28
- v.value++;
30
+ const h = N(0), C = () => {
31
+ h.value++;
29
32
  };
30
33
  T(() => {
31
- r.on("overlayChange", S), r.getSeriesIds().length > 0 && v.value++;
32
- }), W(() => {
33
- r.off("overlayChange", S);
34
+ u.on("overlayChange", C), u.getSeriesIds().length > 0 && h.value++;
35
+ }), A(() => {
36
+ u.off("overlayChange", C);
34
37
  });
35
- const x = n(() => {
36
- v.value;
37
- const o = h.value;
38
- return o === null ? null : P(r, { time: o.time, sort: b.value, cacheKey: "infobar-hover" });
39
- }), E = n(() => (v.value, R(r, { sort: b.value, cacheKey: "infobar-last" }))), c = n(() => x.value !== null && x.value.length > 0), f = n(
40
- () => c.value ? x.value : E.value
41
- ), K = n(() => r.getDataInterval()), k = n(() => f.value.length === 0 ? 0 : c.value && h.value ? h.value.time : Math.max(...f.value.map((o) => o.data.time))), z = A(), I = n(() => typeof z.default == "function");
42
- function H(o) {
43
- return "open" in o;
38
+ const x = i(() => {
39
+ h.value;
40
+ const a = y.value;
41
+ return a === null ? null : P(u, { time: a.time, sort: k.value, cacheKey: "infobar-hover" });
42
+ }), K = i(() => (h.value, $(u, { sort: k.value, cacheKey: "infobar-last" }))), m = i(() => x.value !== null && x.value.length > 0), d = i(
43
+ () => m.value ? x.value : K.value
44
+ ), z = i(() => u.getDataInterval()), S = i(() => d.value.length === 0 ? 0 : m.value && y.value ? y.value.time : Math.max(...d.value.map((a) => a.data.time))), H = O(), w = i(() => typeof H.default == "function");
45
+ function I(a) {
46
+ return "open" in a;
47
+ }
48
+ function V(a) {
49
+ return "high" in a && !I(a);
44
50
  }
45
- return (o, w) => e(g) && e(a) && f.value.length > 0 ? (l(), O(D, {
51
+ return (a, _) => t(g) && t(o) && d.value.length > 0 ? (n(), R(D, {
46
52
  key: 0,
47
- to: e(g)
53
+ to: t(g)
48
54
  }, [
49
- i("div", {
55
+ l("div", {
50
56
  "data-tooltip-legend": "",
51
- style: s(
52
- I.value ? {
57
+ style: r(
58
+ w.value ? {
53
59
  display: "flex",
54
60
  alignItems: "center",
55
61
  flexShrink: 0,
56
- fontSize: e(a).typography.fontSize + "px",
57
- fontFamily: e(a).typography.fontFamily,
62
+ fontSize: t(o).typography.fontSize + "px",
63
+ fontFamily: t(o).typography.fontFamily,
58
64
  fontVariantNumeric: "tabular-nums",
59
- opacity: c.value ? 1 : 0.6,
65
+ opacity: m.value ? 1 : 0.6,
60
66
  transition: "opacity 0.2s ease",
61
67
  pointerEvents: "none"
62
68
  } : {
@@ -66,77 +72,90 @@ const Q = {
66
72
  flexWrap: "wrap",
67
73
  padding: "4px 8px",
68
74
  flexShrink: 0,
69
- fontSize: e(a).typography.fontSize + "px",
70
- fontFamily: e(a).typography.fontFamily,
75
+ fontSize: t(o).typography.fontSize + "px",
76
+ fontFamily: t(o).typography.fontFamily,
71
77
  fontVariantNumeric: "tabular-nums",
72
- opacity: c.value ? 1 : 0.6,
78
+ opacity: m.value ? 1 : 0.6,
73
79
  transition: "opacity 0.2s ease",
74
80
  pointerEvents: "none"
75
81
  }
76
82
  )
77
83
  }, [
78
- I.value ? M(o.$slots, "default", {
84
+ w.value ? M(a.$slots, "default", {
79
85
  key: 0,
80
- snapshots: f.value,
81
- time: k.value,
82
- isHover: c.value
83
- }) : (l(), u(p, { key: 1 }, [
84
- i("span", {
85
- style: s({ color: e(a).axis.textColor, marginRight: "2px" })
86
- }, m(e(r).timeScale.formatX(k.value, K.value)), 5),
87
- (l(!0), u(p, null, _(f.value, (t) => (l(), u(p, {
88
- key: t.id
86
+ snapshots: d.value,
87
+ time: S.value,
88
+ isHover: m.value
89
+ }) : (n(), s(c, { key: 1 }, [
90
+ l("span", {
91
+ style: r({ color: t(o).axis.textColor, marginRight: "2px" })
92
+ }, p(t(u).timeScale.formatX(S.value, z.value)), 5),
93
+ (n(!0), s(c, null, F(d.value, (e) => (n(), s(c, {
94
+ key: e.id
89
95
  }, [
90
- H(t.data) ? (l(), u("span", Q, [
91
- (l(!0), u(p, null, _([
92
- { label: "O", field: "open", val: t.data.open },
93
- { label: "H", field: "high", val: t.data.high },
94
- { label: "L", field: "low", val: t.data.low },
95
- { label: "C", field: "close", val: t.data.close }
96
- ], (d) => (l(), u(p, {
97
- key: d.label
96
+ I(e.data) ? (n(), s("span", Y, [
97
+ (n(!0), s(c, null, F([
98
+ { label: "O", field: "open", val: e.data.open },
99
+ { label: "H", field: "high", val: e.data.high },
100
+ { label: "L", field: "low", val: e.data.low },
101
+ { label: "C", field: "close", val: e.data.close }
102
+ ], (v) => (n(), s(c, {
103
+ key: v.label
98
104
  }, [
99
- i("span", {
100
- style: s({ color: e(a).axis.textColor, opacity: 0.5, marginLeft: "5px" })
101
- }, m(d.label), 5),
102
- i("span", {
103
- style: s({
104
- color: e($)(
105
- t.data.close >= t.data.open ? e(a).candlestick.up.body : e(a).candlestick.down.body
105
+ l("span", {
106
+ style: r({ color: t(o).axis.textColor, opacity: 0.5, marginLeft: "5px" })
107
+ }, p(v.label), 5),
108
+ l("span", {
109
+ style: r({
110
+ color: t(j)(
111
+ e.data.close >= e.data.open ? t(o).candlestick.up.body : t(o).candlestick.down.body
106
112
  ),
107
113
  fontWeight: 500,
108
114
  marginLeft: "2px"
109
115
  })
110
- }, m(y.value(d.val, d.field)), 5)
116
+ }, p(f.value(v.val, v.field)), 5)
111
117
  ], 64))), 128)),
112
- t.data.volume != null ? (l(), u(p, { key: 0 }, [
113
- i("span", {
114
- style: s({ color: e(a).axis.textColor, opacity: 0.5, marginLeft: "5px" })
118
+ e.data.volume != null ? (n(), s(c, { key: 0 }, [
119
+ l("span", {
120
+ style: r({ color: t(o).axis.textColor, opacity: 0.5, marginLeft: "5px" })
115
121
  }, "V", 4),
116
- i("span", {
117
- style: s({ color: e(a).axis.textColor, fontWeight: 500, marginLeft: "2px" })
118
- }, m(y.value(t.data.volume, "volume")), 5)
119
- ], 64)) : F("", !0)
120
- ])) : (l(), u("span", Y, [
121
- i("span", {
122
- style: s({
122
+ l("span", {
123
+ style: r({ color: t(o).axis.textColor, fontWeight: 500, marginLeft: "2px" })
124
+ }, p(f.value(e.data.volume, "volume")), 5)
125
+ ], 64)) : L("", !0)
126
+ ])) : V(e.data) ? (n(), s("span", Z, [
127
+ l("span", {
128
+ style: r({
129
+ width: "6px",
130
+ height: "6px",
131
+ borderRadius: "1px",
132
+ background: e.color,
133
+ flexShrink: 0
134
+ })
135
+ }, null, 4),
136
+ l("span", {
137
+ style: r({ color: e.color, fontWeight: 500 })
138
+ }, p(f.value(e.data.low, "low")) + " – " + p(f.value(e.data.high, "high")), 5)
139
+ ])) : (n(), s("span", ee, [
140
+ l("span", {
141
+ style: r({
123
142
  width: "6px",
124
143
  height: "6px",
125
144
  borderRadius: "50%",
126
- background: t.color,
145
+ background: e.color,
127
146
  flexShrink: 0
128
147
  })
129
148
  }, null, 4),
130
- i("span", {
131
- style: s({ color: t.color, fontWeight: 500 })
132
- }, m(y.value(t.data.value, "value")), 5)
149
+ l("span", {
150
+ style: r({ color: e.color, fontWeight: 500 })
151
+ }, p(f.value(e.data.value, "value")), 5)
133
152
  ]))
134
153
  ], 64))), 128))
135
154
  ], 64))
136
155
  ], 4)
137
- ], 8, ["to"])) : F("", !0);
156
+ ], 8, ["to"])) : L("", !0);
138
157
  }
139
158
  });
140
159
  export {
141
- le as default
160
+ ie as default
142
161
  };
@@ -1,88 +1,101 @@
1
- import { defineComponent as P, computed as s, ref as w, onMounted as D, onUnmounted as X, useSlots as Y, watchEffect as Z, 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 $ } from "vue";
2
- import { buildHoverSnapshots as K } from "../core/dist/snapshots.js";
3
- import { resolveCandlestickBodyColor as U } from "../core/dist/theme/resolve.js";
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 } from "../core/dist/utils/time.js";
7
- import { useCrosshairPosition as J } from "../composables.js";
8
- import { useChartInstance as Q } from "../context.js";
9
- const ee = {
1
+ import { defineComponent as D, computed as c, ref as _, onMounted as X, onUnmounted as Y, useSlots as Z, watchEffect as $, openBlock as n, createElementBlock as r, Fragment as x, unref as v, normalizeStyle as h, createElementVNode as s, toDisplayString as d, renderList as H, createCommentVNode as z, renderSlot as K } from "vue";
2
+ import { buildHoverSnapshots as U } from "../core/dist/snapshots.js";
3
+ import { resolveCandlestickBodyColor as j } from "../core/dist/theme/resolve.js";
4
+ import { computeTooltipPosition as I } from "../core/dist/tooltip-position.js";
5
+ import { formatCompact as q, formatPriceAdaptive as G } from "../core/dist/utils/format.js";
6
+ import { formatDate as J } from "../core/dist/utils/time.js";
7
+ import { useCrosshairPosition as Q } from "../composables.js";
8
+ import { useChartInstance as ee } from "../context.js";
9
+ const te = {
10
10
  key: 0,
11
11
  style: { display: "grid", gridTemplateColumns: "auto 1fr", gap: "4px 12px" }
12
- }, te = { style: { opacity: 0.5 } }, oe = {
12
+ }, oe = { style: { opacity: 0.5 } }, ae = {
13
13
  key: 1,
14
14
  style: { display: "flex", alignItems: "center", gap: "8px", padding: "2px 0" }
15
- }, le = { style: { opacity: 0.6, flex: "1" } }, ae = ["data-measured"], ve = /* @__PURE__ */ P({
15
+ }, le = { style: {
16
+ opacity: 0.6,
17
+ flex: "1",
18
+ minWidth: 0,
19
+ overflow: "hidden",
20
+ textOverflow: "ellipsis",
21
+ whiteSpace: "nowrap"
22
+ } }, ie = {
23
+ key: 2,
24
+ style: { display: "flex", alignItems: "center", gap: "8px", padding: "2px 0" }
25
+ }, ne = { style: { opacity: 0.6, flex: "1" } }, re = ["data-measured"], xe = /* @__PURE__ */ D({
16
26
  __name: "Tooltip",
17
27
  props: {
18
28
  sort: {},
19
29
  format: { type: Function }
20
30
  },
21
- setup(I) {
22
- const F = I, L = s(() => F.sort ?? "none"), k = s(
23
- () => F.format ?? ((a, i) => i === "volume" ? j(a) : q(a))
24
- ), t = Q(), n = J(t), C = w(0), W = () => {
25
- C.value++;
31
+ setup(L) {
32
+ const W = L, O = c(() => W.sort ?? "none"), g = c(
33
+ () => W.format ?? ((a, i) => i === "volume" ? q(a) : G(a))
34
+ ), t = ee(), u = Q(t), w = _(0), F = () => {
35
+ w.value++;
26
36
  };
27
- D(() => {
28
- t.on("overlayChange", W), t.getSeriesIds().length > 0 && C.value++;
29
- }), X(() => {
30
- t.off("overlayChange", W);
37
+ X(() => {
38
+ t.on("overlayChange", F), t.getSeriesIds().length > 0 && w.value++;
39
+ }), Y(() => {
40
+ t.off("overlayChange", F);
31
41
  });
32
- const o = s(() => t.getTheme()), A = s(() => t.getDataInterval()), c = s(() => (C.value, n.value ? K(t, {
33
- time: n.value.time,
34
- sort: L.value,
42
+ const o = c(() => t.getTheme()), A = c(() => t.getDataInterval()), f = c(() => (w.value, u.value ? U(t, {
43
+ time: u.value.time,
44
+ sort: O.value,
35
45
  cacheKey: "tooltip"
36
- }) : [])), z = s(() => n.value?.time ?? 0), O = Y(), g = s(() => typeof O.default == "function"), B = w(null), b = w(null);
37
- let S = null;
38
- Z((a) => {
39
- if (!g.value) return;
46
+ }) : [])), C = c(() => u.value?.time ?? 0), T = Z(), y = c(() => typeof T.default == "function"), B = _(null), b = _(null);
47
+ let k = null;
48
+ $((a) => {
49
+ if (!y.value) return;
40
50
  const i = B.value;
41
- !i || typeof ResizeObserver > "u" || (S = new ResizeObserver((e) => {
51
+ !i || typeof ResizeObserver > "u" || (k = new ResizeObserver((e) => {
42
52
  const l = e[0]?.contentRect;
43
53
  if (!l) return;
44
- const y = b.value;
45
- (!y || y.width !== l.width || y.height !== l.height) && (b.value = { width: l.width, height: l.height });
46
- }), S.observe(i), a(() => {
47
- S?.disconnect(), S = null;
54
+ const S = b.value;
55
+ (!S || S.width !== l.width || S.height !== l.height) && (b.value = { width: l.width, height: l.height });
56
+ }), k.observe(i), a(() => {
57
+ k?.disconnect(), k = null;
48
58
  }));
49
59
  });
50
- const h = s(() => {
51
- if (!n.value || c.value.length === 0) return null;
60
+ const m = c(() => {
61
+ if (!u.value || f.value.length === 0) return null;
52
62
  const a = t.getMediaSize(), i = t.plotLeft, e = a.width - t.yAxisWidth, l = a.height - t.xAxisHeight;
53
- if (g.value) {
54
- const v = b.value;
55
- return v ? R({
56
- x: n.value.mediaX,
57
- y: n.value.mediaY,
63
+ if (y.value) {
64
+ const p = b.value;
65
+ return p ? I({
66
+ x: u.value.mediaX,
67
+ y: u.value.mediaY,
58
68
  chartLeft: i,
59
69
  chartWidth: e,
60
70
  chartHeight: l,
61
- tooltipWidth: v.width,
62
- tooltipHeight: v.height
71
+ tooltipWidth: p.width,
72
+ tooltipHeight: p.height
63
73
  }) : { left: i, top: 0 };
64
74
  }
65
- const y = c.value.some((v) => "open" in v.data), E = c.value.filter((v) => !("open" in v.data)).length, M = 160, N = y ? 140 : 40 + E * 22;
66
- return R({
67
- x: n.value.mediaX,
68
- y: n.value.mediaY,
75
+ const S = f.value.some((p) => "open" in p.data), M = f.value.filter((p) => !("open" in p.data)).length, N = f.value.some((p) => "high" in p.data && !("open" in p.data)) ? 220 : 160, P = S ? 140 : 40 + M * 22;
76
+ return I({
77
+ x: u.value.mediaX,
78
+ y: u.value.mediaY,
69
79
  chartLeft: i,
70
80
  chartWidth: e,
71
81
  chartHeight: l,
72
- tooltipWidth: M,
73
- tooltipHeight: N
82
+ tooltipWidth: N,
83
+ tooltipHeight: P
74
84
  });
75
- }), T = s(() => !g.value || b.value !== null);
76
- function V(a) {
85
+ }), V = c(() => !y.value || b.value !== null);
86
+ function R(a) {
77
87
  return "open" in a;
78
88
  }
79
- return (a, i) => (r(), u(x, null, [
80
- p(n) && c.value.length > 0 && h.value && !g.value ? (r(), u("div", {
89
+ function E(a) {
90
+ return "high" in a && !R(a);
91
+ }
92
+ return (a, i) => (n(), r(x, null, [
93
+ v(u) && f.value.length > 0 && m.value && !y.value ? (n(), r("div", {
81
94
  key: 0,
82
- style: m({
95
+ style: h({
83
96
  position: "absolute",
84
- left: h.value.left + "px",
85
- top: h.value.top + "px",
97
+ left: m.value.left + "px",
98
+ top: m.value.top + "px",
86
99
  pointerEvents: "none",
87
100
  background: o.value.tooltip.background,
88
101
  backdropFilter: "blur(12px)",
@@ -100,8 +113,8 @@ const ee = {
100
113
  transition: "opacity 0.15s ease"
101
114
  })
102
115
  }, [
103
- d("div", {
104
- style: m({
116
+ s("div", {
117
+ style: h({
105
118
  fontSize: o.value.axis.fontSize + "px",
106
119
  color: o.value.axis.textColor,
107
120
  marginBottom: "8px",
@@ -109,39 +122,53 @@ const ee = {
109
122
  borderBottom: "1px solid " + o.value.tooltip.borderColor,
110
123
  letterSpacing: "0.02em"
111
124
  })
112
- }, f(p(G)(z.value, { locale: p(t).timeScale.getLocale(), timeZone: p(t).timeScale.getTimeZone() })) + " " + f(p(t).timeScale.formatX(z.value, A.value)), 5),
113
- (r(!0), u(x, null, H(c.value, (e) => (r(), u(x, {
125
+ }, d(v(J)(C.value, { locale: v(t).timeScale.getLocale(), timeZone: v(t).timeScale.getTimeZone() })) + " " + d(v(t).timeScale.formatX(C.value, A.value)), 5),
126
+ (n(!0), r(x, null, H(f.value, (e) => (n(), r(x, {
114
127
  key: e.id
115
128
  }, [
116
- V(e.data) ? (r(), u("div", ee, [
117
- (r(!0), u(x, null, H([
129
+ R(e.data) ? (n(), r("div", te, [
130
+ (n(!0), r(x, null, H([
118
131
  { label: "Open", val: e.data.open, field: "open" },
119
132
  { label: "High", val: e.data.high, field: "high" },
120
133
  { label: "Low", val: e.data.low, field: "low" },
121
134
  { label: "Close", val: e.data.close, field: "close" }
122
- ], (l) => (r(), u(x, {
135
+ ], (l) => (n(), r(x, {
123
136
  key: l.label
124
137
  }, [
125
- d("span", te, f(l.label), 1),
126
- d("span", {
127
- style: m({
138
+ s("span", oe, d(l.label), 1),
139
+ s("span", {
140
+ style: h({
128
141
  fontWeight: 600,
129
- color: p(U)(
142
+ color: v(j)(
130
143
  e.data.close >= e.data.open ? o.value.candlestick.up.body : o.value.candlestick.down.body
131
144
  ),
132
145
  textAlign: "right"
133
146
  })
134
- }, f(k.value(l.val, l.field)), 5)
147
+ }, d(g.value(l.val, l.field)), 5)
135
148
  ], 64))), 128)),
136
- e.data.volume != null ? (r(), u(x, { key: 0 }, [
137
- i[0] || (i[0] = d("span", { style: { opacity: 0.5 } }, "Volume", -1)),
138
- d("span", {
139
- style: m({ fontWeight: 600, color: o.value.tooltip.textColor, textAlign: "right" })
140
- }, f(k.value(e.data.volume, "volume")), 5)
141
- ], 64)) : _("", !0)
142
- ])) : (r(), u("div", oe, [
143
- d("span", {
144
- style: m({
149
+ e.data.volume != null ? (n(), r(x, { key: 0 }, [
150
+ i[0] || (i[0] = s("span", { style: { opacity: 0.5 } }, "Volume", -1)),
151
+ s("span", {
152
+ style: h({ fontWeight: 600, color: o.value.tooltip.textColor, textAlign: "right" })
153
+ }, d(g.value(e.data.volume, "volume")), 5)
154
+ ], 64)) : z("", !0)
155
+ ])) : E(e.data) ? (n(), r("div", ae, [
156
+ s("span", {
157
+ style: h({
158
+ width: "8px",
159
+ height: "8px",
160
+ borderRadius: "2px",
161
+ background: e.color,
162
+ flexShrink: 0
163
+ })
164
+ }, null, 4),
165
+ s("span", le, d(e.label ?? "Range"), 1),
166
+ s("span", {
167
+ style: h({ fontWeight: 600, color: e.color, whiteSpace: "nowrap" })
168
+ }, d(g.value(e.data.low, "low")) + " – " + d(g.value(e.data.high, "high")), 5)
169
+ ])) : (n(), r("div", ie, [
170
+ s("span", {
171
+ style: h({
145
172
  width: "8px",
146
173
  height: "8px",
147
174
  borderRadius: "50%",
@@ -149,22 +176,22 @@ const ee = {
149
176
  flexShrink: 0
150
177
  })
151
178
  }, null, 4),
152
- d("span", le, f(e.label ?? "Value"), 1),
153
- d("span", {
154
- style: m({ fontWeight: 600, color: e.color })
155
- }, f(k.value(e.data.value, "value")), 5)
179
+ s("span", ne, d(e.label ?? "Value"), 1),
180
+ s("span", {
181
+ style: h({ fontWeight: 600, color: e.color })
182
+ }, d(g.value(e.data.value, "value")), 5)
156
183
  ]))
157
184
  ], 64))), 128))
158
- ], 4)) : _("", !0),
159
- p(n) && c.value.length > 0 && h.value && g.value ? (r(), u("div", {
185
+ ], 4)) : z("", !0),
186
+ v(u) && f.value.length > 0 && m.value && y.value ? (n(), r("div", {
160
187
  key: 1,
161
188
  ref_key: "containerRef",
162
189
  ref: B,
163
- "data-measured": T.value ? "true" : "false",
164
- style: m({
190
+ "data-measured": V.value ? "true" : "false",
191
+ style: h({
165
192
  position: "absolute",
166
- left: h.value.left + "px",
167
- top: h.value.top + "px",
193
+ left: m.value.left + "px",
194
+ top: m.value.top + "px",
168
195
  pointerEvents: "none",
169
196
  background: o.value.tooltip.background,
170
197
  backdropFilter: "blur(12px)",
@@ -178,20 +205,20 @@ const ee = {
178
205
  fontVariantNumeric: "tabular-nums",
179
206
  color: o.value.tooltip.textColor,
180
207
  width: "max-content",
181
- maxWidth: p(t).getMediaSize().width - p(t).yAxisWidth + "px",
208
+ maxWidth: v(t).getMediaSize().width - v(t).yAxisWidth + "px",
182
209
  boxSizing: "border-box",
183
210
  zIndex: 10,
184
211
  visibility: b.value !== null ? "visible" : "hidden"
185
212
  })
186
213
  }, [
187
- $(a.$slots, "default", {
188
- snapshots: c.value,
189
- time: z.value
214
+ K(a.$slots, "default", {
215
+ snapshots: f.value,
216
+ time: C.value
190
217
  })
191
- ], 12, ae)) : _("", !0)
218
+ ], 12, re)) : z("", !0)
192
219
  ], 64));
193
220
  }
194
221
  });
195
222
  export {
196
- ve as default
223
+ xe as default
197
224
  };