@wick-charts/vue 0.6.3 → 0.7.0

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 (67) hide show
  1. package/README.md +6 -6
  2. package/dist/BandSeries.vue.js +52 -0
  3. package/dist/BandSeries.vue2.js +4 -0
  4. package/dist/BarSeries.vue.js +15 -13
  5. package/dist/CandlestickSeries.vue.js +31 -29
  6. package/dist/ChartContainer.vue.js +75 -68
  7. package/dist/LineSeries.vue.js +19 -17
  8. package/dist/composables.js +46 -36
  9. package/dist/core/dist/animation/config.js +92 -75
  10. package/dist/core/dist/animation/viewport-engine.js +155 -96
  11. package/dist/core/dist/axis/dom-labels.js +56 -51
  12. package/dist/core/dist/chart/badge-animator.js +30 -22
  13. package/dist/core/dist/chart/edge-indicators.js +22 -21
  14. package/dist/core/dist/chart/last-value.js +33 -26
  15. package/dist/core/dist/chart/scale-guards.js +23 -5
  16. package/dist/core/dist/chart/x-guards.js +37 -0
  17. package/dist/core/dist/chart.js +1286 -842
  18. package/dist/core/dist/data/decimation.js +58 -39
  19. package/dist/core/dist/data/sync.js +37 -31
  20. package/dist/core/dist/navigator/controller.js +41 -41
  21. package/dist/core/dist/perf/perf-hud.js +3 -3
  22. package/dist/core/dist/scales/tick-tracker.js +2 -2
  23. package/dist/core/dist/scales/x-scale.js +167 -53
  24. package/dist/core/dist/scales/y-scale.js +36 -34
  25. package/dist/core/dist/series/band.js +723 -0
  26. package/dist/core/dist/series/bar.js +297 -291
  27. package/dist/core/dist/series/base-multi-layer.js +283 -237
  28. package/dist/core/dist/series/candlestick.js +32 -31
  29. package/dist/core/dist/series/heatmap.js +5 -5
  30. package/dist/core/dist/series/line-intro.js +47 -37
  31. package/dist/core/dist/series/line.js +489 -448
  32. package/dist/core/dist/series/painters/builtins.js +4 -4
  33. package/dist/core/dist/series/painters/canvas-path.js +64 -52
  34. package/dist/core/dist/series/register-builtins.js +9 -8
  35. package/dist/core/dist/snapshots.js +59 -46
  36. package/dist/core/dist/utils/point.js +10 -0
  37. package/dist/index.d.ts +552 -129
  38. package/dist/index.js +195 -191
  39. package/dist/ui/Crosshair.vue.js +51 -27
  40. package/dist/ui/InfoBar.vue.js +98 -79
  41. package/dist/ui/Marker.vue.js +14 -11
  42. package/dist/ui/Navigator.vue.js +23 -23
  43. package/dist/ui/ReferenceLine.vue.js +19 -16
  44. package/dist/ui/Tooltip.vue.js +116 -84
  45. package/dist/ui/XAxis.vue.js +48 -0
  46. package/dist/ui/XAxis.vue2.js +4 -0
  47. package/dist/ui/YAxis.vue.js +44 -28
  48. package/dist/ui/YLabel.vue.js +82 -85
  49. package/package.json +2 -2
  50. package/src/BandSeries.vue +92 -0
  51. package/src/BarSeries.vue +13 -6
  52. package/src/CandlestickSeries.vue +9 -5
  53. package/src/ChartContainer.vue +20 -0
  54. package/src/LineSeries.vue +13 -6
  55. package/src/composables.ts +23 -4
  56. package/src/index.ts +16 -1
  57. package/src/ui/Crosshair.vue +41 -1
  58. package/src/ui/InfoBar.vue +22 -2
  59. package/src/ui/Marker.vue +5 -1
  60. package/src/ui/Navigator.vue +2 -1
  61. package/src/ui/ReferenceLine.vue +5 -1
  62. package/src/ui/Tooltip.vue +43 -6
  63. package/src/ui/{TimeAxis.vue → XAxis.vue} +18 -5
  64. package/src/ui/YAxis.vue +66 -12
  65. package/src/ui/YLabel.vue +37 -18
  66. package/dist/ui/TimeAxis.vue.js +0 -44
  67. package/dist/ui/TimeAxis.vue2.js +0 -4
@@ -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 X, computed as h, ref as z, onMounted as Y, onUnmounted as Z, useSlots as $, watchEffect as K, openBlock as i, createElementBlock as n, Fragment as f, unref as d, normalizeStyle as m, createElementVNode as s, createTextVNode as R, toDisplayString as c, createCommentVNode as w, renderList as H, renderSlot as U } from "vue";
2
+ import { buildHoverSnapshots as j, formatHeaderX as q } from "../core/dist/snapshots.js";
3
+ import { resolveCandlestickBodyColor as G } from "../core/dist/theme/resolve.js";
4
+ import { computeTooltipPosition as I } from "../core/dist/tooltip-position.js";
5
+ import { formatCompact as J, formatPriceAdaptive as Q } from "../core/dist/utils/format.js";
6
+ import { formatDate as ee } from "../core/dist/utils/time.js";
7
+ import { useCrosshairPosition as te } from "../composables.js";
8
+ import { useChartInstance as oe } from "../context.js";
9
+ const ae = {
10
10
  key: 0,
11
11
  style: { display: "grid", gridTemplateColumns: "auto 1fr", gap: "4px 12px" }
12
- }, te = { style: { opacity: 0.5 } }, oe = {
12
+ }, le = { style: { opacity: 0.5 } }, ie = {
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
+ }, ne = { style: {
16
+ opacity: 0.6,
17
+ flex: "1",
18
+ minWidth: 0,
19
+ overflow: "hidden",
20
+ textOverflow: "ellipsis",
21
+ whiteSpace: "nowrap"
22
+ } }, re = {
23
+ key: 2,
24
+ style: { display: "flex", alignItems: "center", gap: "8px", padding: "2px 0" }
25
+ }, se = { style: { opacity: 0.6, flex: "1" } }, ue = ["data-measured"], ye = /* @__PURE__ */ X({
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 = () => {
31
+ setup(T) {
32
+ const F = T, O = h(() => F.sort ?? "none"), x = h(
33
+ () => F.format ?? ((a, r) => r === "volume" ? J(a) : Q(a))
34
+ ), t = oe(), u = te(t), C = z(0), W = () => {
25
35
  C.value++;
26
36
  };
27
- D(() => {
37
+ Y(() => {
28
38
  t.on("overlayChange", W), t.getSeriesIds().length > 0 && C.value++;
29
- }), X(() => {
39
+ }), Z(() => {
30
40
  t.off("overlayChange", W);
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 = h(() => t.getTheme()), V = h(() => t.getDataInterval()), v = h(() => (C.value, u.value ? j(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);
46
+ }) : [])), _ = h(() => u.value?.time ?? 0), A = $(), y = h(() => typeof A.default == "function"), B = z(null), b = z(null);
37
47
  let S = null;
38
- Z((a) => {
39
- if (!g.value) return;
40
- const i = B.value;
41
- !i || typeof ResizeObserver > "u" || (S = new ResizeObserver((e) => {
48
+ K((a) => {
49
+ if (!y.value) return;
50
+ const r = B.value;
51
+ !r || typeof ResizeObserver > "u" || (S = 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(() => {
54
+ const k = b.value;
55
+ (!k || k.width !== l.width || k.height !== l.height) && (b.value = { width: l.width, height: l.height });
56
+ }), S.observe(r), a(() => {
47
57
  S?.disconnect(), S = null;
48
58
  }));
49
59
  });
50
- const h = s(() => {
51
- if (!n.value || c.value.length === 0) return null;
52
- 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,
58
- chartLeft: i,
60
+ const g = h(() => {
61
+ if (!u.value || v.value.length === 0) return null;
62
+ const a = t.getMediaSize(), r = t.plotLeft, e = t.getLayout().chartArea.width, l = a.height - t.xAxisHeight;
63
+ if (y.value) {
64
+ const p = b.value;
65
+ return p ? I({
66
+ x: u.value.mediaX,
67
+ y: u.value.mediaY,
68
+ chartLeft: r,
59
69
  chartWidth: e,
60
70
  chartHeight: l,
61
- tooltipWidth: v.width,
62
- tooltipHeight: v.height
63
- }) : { left: i, top: 0 };
71
+ tooltipWidth: p.width,
72
+ tooltipHeight: p.height
73
+ }) : { left: r, 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,
69
- chartLeft: i,
75
+ const k = v.value.some((p) => "open" in p.data), P = v.value.filter((p) => !("open" in p.data)).length, D = v.value.some((p) => "high" in p.data && !("open" in p.data)) ? 220 : 160, M = k ? 140 : 40 + P * 22;
76
+ return I({
77
+ x: u.value.mediaX,
78
+ y: u.value.mediaY,
79
+ chartLeft: r,
70
80
  chartWidth: e,
71
81
  chartHeight: l,
72
- tooltipWidth: M,
73
- tooltipHeight: N
82
+ tooltipWidth: D,
83
+ tooltipHeight: M
74
84
  });
75
- }), T = s(() => !g.value || b.value !== null);
76
- function V(a) {
85
+ }), E = h(() => !y.value || b.value !== null);
86
+ function L(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 N(a) {
90
+ return "high" in a && !L(a);
91
+ }
92
+ return (a, r) => (i(), n(f, null, [
93
+ d(u) && v.value.length > 0 && g.value && !y.value ? (i(), n("div", {
81
94
  key: 0,
82
95
  style: m({
83
96
  position: "absolute",
84
- left: h.value.left + "px",
85
- top: h.value.top + "px",
97
+ left: g.value.left + "px",
98
+ top: g.value.top + "px",
86
99
  pointerEvents: "none",
87
100
  background: o.value.tooltip.background,
88
101
  backdropFilter: "blur(12px)",
@@ -100,7 +113,7 @@ const ee = {
100
113
  transition: "opacity 0.15s ease"
101
114
  })
102
115
  }, [
103
- d("div", {
116
+ s("div", {
104
117
  style: m({
105
118
  fontSize: o.value.axis.fontSize + "px",
106
119
  color: o.value.axis.textColor,
@@ -109,38 +122,57 @@ 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
+ }, [
126
+ d(t).timeScale.getType() === "time" ? (i(), n(f, { key: 0 }, [
127
+ R(c(d(ee)(_.value, { locale: d(t).timeScale.getLocale(), timeZone: d(t).timeScale.getTimeZone() })), 1)
128
+ ], 64)) : w("", !0),
129
+ R(" " + c(d(q)(d(t), { time: _.value, snapshots: v.value, interval: V.value })), 1)
130
+ ], 4),
131
+ (i(!0), n(f, null, H(v.value, (e) => (i(), n(f, {
114
132
  key: e.id
115
133
  }, [
116
- V(e.data) ? (r(), u("div", ee, [
117
- (r(!0), u(x, null, H([
134
+ L(e.data) ? (i(), n("div", ae, [
135
+ (i(!0), n(f, null, H([
118
136
  { label: "Open", val: e.data.open, field: "open" },
119
137
  { label: "High", val: e.data.high, field: "high" },
120
138
  { label: "Low", val: e.data.low, field: "low" },
121
139
  { label: "Close", val: e.data.close, field: "close" }
122
- ], (l) => (r(), u(x, {
140
+ ], (l) => (i(), n(f, {
123
141
  key: l.label
124
142
  }, [
125
- d("span", te, f(l.label), 1),
126
- d("span", {
143
+ s("span", le, c(l.label), 1),
144
+ s("span", {
127
145
  style: m({
128
146
  fontWeight: 600,
129
- color: p(U)(
147
+ color: d(G)(
130
148
  e.data.close >= e.data.open ? o.value.candlestick.up.body : o.value.candlestick.down.body
131
149
  ),
132
150
  textAlign: "right"
133
151
  })
134
- }, f(k.value(l.val, l.field)), 5)
152
+ }, c(x.value(l.val, l.field)), 5)
135
153
  ], 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", {
154
+ e.data.volume != null ? (i(), n(f, { key: 0 }, [
155
+ r[0] || (r[0] = s("span", { style: { opacity: 0.5 } }, "Volume", -1)),
156
+ s("span", {
139
157
  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", {
158
+ }, c(x.value(e.data.volume, "volume")), 5)
159
+ ], 64)) : w("", !0)
160
+ ])) : N(e.data) ? (i(), n("div", ie, [
161
+ s("span", {
162
+ style: m({
163
+ width: "8px",
164
+ height: "8px",
165
+ borderRadius: "2px",
166
+ background: e.color,
167
+ flexShrink: 0
168
+ })
169
+ }, null, 4),
170
+ s("span", ne, c(e.label ?? "Range"), 1),
171
+ s("span", {
172
+ style: m({ fontWeight: 600, color: e.color, whiteSpace: "nowrap" })
173
+ }, c(x.value(e.data.low, "low")) + " – " + c(x.value(e.data.high, "high")), 5)
174
+ ])) : (i(), n("div", re, [
175
+ s("span", {
144
176
  style: m({
145
177
  width: "8px",
146
178
  height: "8px",
@@ -149,22 +181,22 @@ const ee = {
149
181
  flexShrink: 0
150
182
  })
151
183
  }, null, 4),
152
- d("span", le, f(e.label ?? "Value"), 1),
153
- d("span", {
184
+ s("span", se, c(e.label ?? "Value"), 1),
185
+ s("span", {
154
186
  style: m({ fontWeight: 600, color: e.color })
155
- }, f(k.value(e.data.value, "value")), 5)
187
+ }, c(x.value(e.data.value, "value")), 5)
156
188
  ]))
157
189
  ], 64))), 128))
158
- ], 4)) : _("", !0),
159
- p(n) && c.value.length > 0 && h.value && g.value ? (r(), u("div", {
190
+ ], 4)) : w("", !0),
191
+ d(u) && v.value.length > 0 && g.value && y.value ? (i(), n("div", {
160
192
  key: 1,
161
193
  ref_key: "containerRef",
162
194
  ref: B,
163
- "data-measured": T.value ? "true" : "false",
195
+ "data-measured": E.value ? "true" : "false",
164
196
  style: m({
165
197
  position: "absolute",
166
- left: h.value.left + "px",
167
- top: h.value.top + "px",
198
+ left: g.value.left + "px",
199
+ top: g.value.top + "px",
168
200
  pointerEvents: "none",
169
201
  background: o.value.tooltip.background,
170
202
  backdropFilter: "blur(12px)",
@@ -178,20 +210,20 @@ const ee = {
178
210
  fontVariantNumeric: "tabular-nums",
179
211
  color: o.value.tooltip.textColor,
180
212
  width: "max-content",
181
- maxWidth: p(t).getMediaSize().width - p(t).yAxisWidth + "px",
213
+ maxWidth: d(t).getLayout().chartArea.width + "px",
182
214
  boxSizing: "border-box",
183
215
  zIndex: 10,
184
216
  visibility: b.value !== null ? "visible" : "hidden"
185
217
  })
186
218
  }, [
187
- $(a.$slots, "default", {
188
- snapshots: c.value,
189
- time: z.value
219
+ U(a.$slots, "default", {
220
+ snapshots: v.value,
221
+ time: _.value
190
222
  })
191
- ], 12, ae)) : _("", !0)
223
+ ], 12, ue)) : w("", !0)
192
224
  ], 64));
193
225
  }
194
226
  });
195
227
  export {
196
- ve as default
228
+ ye as default
197
229
  };
@@ -0,0 +1,48 @@
1
+ import { defineComponent as c, ref as p, watch as r, onUnmounted as u, onMounted as f, openBlock as x, createElementBlock as b, normalizeStyle as h, unref as i } from "vue";
2
+ import { mountAxisLabels as y } from "../core/dist/axis/dom-labels.js";
3
+ import { useAxisLayout as A } from "../composables.js";
4
+ import { useChartInstance as g } from "../context.js";
5
+ const v = /* @__PURE__ */ c({
6
+ __name: "XAxis",
7
+ props: {
8
+ labelCount: {},
9
+ minLabelSpacing: {},
10
+ format: { type: Function }
11
+ },
12
+ setup(m) {
13
+ const n = m, e = g(), t = A(e), l = p(null), a = () => {
14
+ e.setTimeAxisLabelDensity({
15
+ labelCount: n.labelCount ?? null,
16
+ minLabelSpacing: n.minLabelSpacing ?? null
17
+ });
18
+ };
19
+ a(), r(() => [n.labelCount, n.minLabelSpacing], a), e.setXAxisFormat(n.format ?? null), r(
20
+ () => n.format,
21
+ (s) => e.setXAxisFormat(s ?? null)
22
+ ), u(() => {
23
+ e.setTimeAxisLabelDensity({ labelCount: null, minLabelSpacing: null }), e.setXAxisFormat(null);
24
+ });
25
+ let o = null;
26
+ return f(() => {
27
+ l.value !== null && (o = y({ chart: e, container: l.value, axis: "x" }));
28
+ }), u(() => {
29
+ o?.(), o = null;
30
+ }), (s, L) => (x(), b("div", {
31
+ ref_key: "containerRef",
32
+ ref: l,
33
+ style: h({
34
+ position: "absolute",
35
+ left: i(t).leftAxisWidth + "px",
36
+ bottom: "0",
37
+ right: i(t).rightAxisWidth + "px",
38
+ height: i(t).xAxisHeight + "px",
39
+ pointerEvents: "none",
40
+ display: "flex",
41
+ alignItems: "center"
42
+ })
43
+ }, null, 4));
44
+ }
45
+ });
46
+ export {
47
+ v as default
48
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./XAxis.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1,43 +1,59 @@
1
- import { defineComponent as p, ref as f, onMounted as u, watch as c, onUnmounted as a, openBlock as y, createElementBlock as b, normalizeStyle as x, unref as i } from "vue";
2
- import { mountAxisLabels as L } from "../core/dist/axis/dom-labels.js";
3
- import { useAxisLayout as A } from "../composables.js";
4
- import { useChartInstance as S } from "../context.js";
5
- const F = /* @__PURE__ */ p({
1
+ import { defineComponent as L, ref as C, computed as x, onMounted as A, watch as c, onUnmounted as i, openBlock as S, createElementBlock as Y, normalizeStyle as _, unref as k, createCommentVNode as w } from "vue";
2
+ import { mountAxisLabels as F } from "../core/dist/axis/dom-labels.js";
3
+ import { useAxisLayout as D, useYRange as R } from "../composables.js";
4
+ import { useChartInstance as B } from "../context.js";
5
+ const M = /* @__PURE__ */ L({
6
6
  __name: "YAxis",
7
7
  props: {
8
8
  format: { type: Function },
9
9
  labelCount: {},
10
- minLabelSpacing: {}
10
+ minLabelSpacing: {},
11
+ scale: {}
11
12
  },
12
- setup(m) {
13
- const n = m, t = S(), e = A(t), l = f(null), s = () => t.yScale.setFormat(n.format ?? null);
14
- u(s), c(() => n.format, s), a(() => t.yScale.setFormat(null));
15
- const r = () => {
16
- t.setYAxisLabelDensity({
17
- labelCount: n.labelCount ?? null,
18
- minLabelSpacing: n.minLabelSpacing ?? null
19
- });
20
- };
21
- r(), c(() => [n.labelCount, n.minLabelSpacing], r), a(() => t.setYAxisLabelDensity({ labelCount: null, minLabelSpacing: null }));
13
+ setup(g) {
14
+ const e = g, l = B(), r = D(l), h = R(l), s = C(null), t = x(() => (h.value, e.scale === void 0 || l.getYScaleIds().includes(e.scale))), u = x(() => {
15
+ const { yAxisPosition: v, yAxisWidth: b } = r.value;
16
+ return e.scale === void 0 ? { position: v, width: b } : t.value ? l.getYScaleColumn(e.scale) : null;
17
+ });
22
18
  let o = null;
23
- return u(() => {
24
- l.value !== null && (o = L({ chart: t, container: l.value, axis: "y" }));
25
- }), a(() => {
26
- o?.(), o = null;
27
- }), (d, h) => (y(), b("div", {
19
+ const m = () => {
20
+ o !== null && (l.setYAxisFormat({ format: null, scale: o.scale }), o = null);
21
+ }, p = () => {
22
+ m(), t.value && (l.setYAxisFormat({ format: e.format ?? null, scale: e.scale }), o = { scale: e.scale });
23
+ };
24
+ A(p), c(() => [e.format, e.scale, t.value], p), i(m);
25
+ let n = null;
26
+ const f = () => {
27
+ n !== null && (l.setYAxisLabelDensity({ labelCount: null, minLabelSpacing: null, scale: n.scale }), n = null);
28
+ }, d = () => {
29
+ n !== null && n.scale !== e.scale && f(), t.value && (l.setYAxisLabelDensity({
30
+ labelCount: e.labelCount ?? null,
31
+ minLabelSpacing: e.minLabelSpacing ?? null,
32
+ scale: e.scale
33
+ }), n = { scale: e.scale });
34
+ };
35
+ d(), c(() => [e.labelCount, e.minLabelSpacing, e.scale, t.value], d), i(f);
36
+ let a = null;
37
+ const y = () => {
38
+ a?.(), a = null, s.value !== null && (a = F({ chart: l, container: s.value, axis: "y", scale: e.scale }));
39
+ };
40
+ return A(y), c([s, () => e.scale], y, { flush: "post" }), i(() => {
41
+ a?.(), a = null;
42
+ }), (v, b) => u.value ? (S(), Y("div", {
43
+ key: 0,
28
44
  ref_key: "containerRef",
29
- ref: l,
30
- style: x({
45
+ ref: s,
46
+ style: _({
31
47
  position: "absolute",
32
- [i(e).yAxisPosition]: "0",
48
+ [u.value.position]: "0",
33
49
  top: "0",
34
- bottom: i(e).xAxisHeight + "px",
35
- width: i(e).yAxisWidth + "px",
50
+ bottom: k(r).xAxisHeight + "px",
51
+ width: u.value.width + "px",
36
52
  pointerEvents: "none"
37
53
  })
38
- }, null, 4));
54
+ }, null, 4)) : w("", !0);
39
55
  }
40
56
  });
41
57
  export {
42
- F as default
58
+ M as default
43
59
  };