@wick-charts/vue 0.6.4 → 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.
- package/README.md +4 -4
- package/dist/BandSeries.vue.js +20 -18
- package/dist/BarSeries.vue.js +15 -13
- package/dist/CandlestickSeries.vue.js +31 -29
- package/dist/ChartContainer.vue.js +77 -70
- package/dist/LineSeries.vue.js +19 -17
- package/dist/composables.js +46 -36
- package/dist/core/dist/animation/viewport-engine.js +155 -96
- package/dist/core/dist/axis/dom-labels.js +56 -51
- package/dist/core/dist/chart/scale-guards.js +23 -5
- package/dist/core/dist/chart/x-guards.js +37 -0
- package/dist/core/dist/chart.js +1286 -843
- package/dist/core/dist/data/sync.js +37 -31
- package/dist/core/dist/navigator/controller.js +37 -37
- package/dist/core/dist/perf/perf-hud.js +3 -3
- package/dist/core/dist/scales/tick-tracker.js +2 -2
- package/dist/core/dist/scales/x-scale.js +167 -53
- package/dist/core/dist/scales/y-scale.js +36 -34
- package/dist/core/dist/series/band.js +266 -213
- package/dist/core/dist/series/bar.js +297 -291
- package/dist/core/dist/series/base-multi-layer.js +283 -237
- package/dist/core/dist/series/candlestick.js +1 -0
- package/dist/core/dist/series/line.js +21 -20
- package/dist/core/dist/snapshots.js +55 -43
- package/dist/index.d.ts +323 -58
- package/dist/index.js +9 -9
- package/dist/ui/Crosshair.vue.js +51 -27
- package/dist/ui/InfoBar.vue.js +37 -37
- package/dist/ui/Marker.vue.js +14 -11
- package/dist/ui/Navigator.vue.js +23 -23
- package/dist/ui/ReferenceLine.vue.js +19 -16
- package/dist/ui/Tooltip.vue.js +91 -86
- package/dist/ui/XAxis.vue.js +48 -0
- package/dist/ui/XAxis.vue2.js +4 -0
- package/dist/ui/YAxis.vue.js +44 -28
- package/dist/ui/YLabel.vue.js +78 -74
- package/package.json +2 -2
- package/src/BandSeries.vue +11 -6
- package/src/BarSeries.vue +13 -6
- package/src/CandlestickSeries.vue +9 -5
- package/src/ChartContainer.vue +20 -0
- package/src/LineSeries.vue +13 -6
- package/src/composables.ts +23 -4
- package/src/index.ts +8 -1
- package/src/ui/Crosshair.vue +41 -1
- package/src/ui/InfoBar.vue +2 -1
- package/src/ui/Marker.vue +5 -1
- package/src/ui/Navigator.vue +2 -1
- package/src/ui/ReferenceLine.vue +5 -1
- package/src/ui/Tooltip.vue +7 -4
- package/src/ui/{TimeAxis.vue → XAxis.vue} +18 -5
- package/src/ui/YAxis.vue +66 -12
- package/src/ui/YLabel.vue +35 -5
- package/dist/ui/TimeAxis.vue.js +0 -44
- package/dist/ui/TimeAxis.vue2.js +0 -4
package/dist/ui/Tooltip.vue.js
CHANGED
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { buildHoverSnapshots as
|
|
3
|
-
import { resolveCandlestickBodyColor as
|
|
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
4
|
import { computeTooltipPosition as I } from "../core/dist/tooltip-position.js";
|
|
5
|
-
import { formatCompact as
|
|
6
|
-
import { formatDate as
|
|
7
|
-
import { useCrosshairPosition as
|
|
8
|
-
import { useChartInstance as
|
|
9
|
-
const
|
|
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
|
-
},
|
|
12
|
+
}, le = { style: { opacity: 0.5 } }, ie = {
|
|
13
13
|
key: 1,
|
|
14
14
|
style: { display: "flex", alignItems: "center", gap: "8px", padding: "2px 0" }
|
|
15
|
-
},
|
|
15
|
+
}, ne = { style: {
|
|
16
16
|
opacity: 0.6,
|
|
17
17
|
flex: "1",
|
|
18
18
|
minWidth: 0,
|
|
19
19
|
overflow: "hidden",
|
|
20
20
|
textOverflow: "ellipsis",
|
|
21
21
|
whiteSpace: "nowrap"
|
|
22
|
-
} },
|
|
22
|
+
} }, re = {
|
|
23
23
|
key: 2,
|
|
24
24
|
style: { display: "flex", alignItems: "center", gap: "8px", padding: "2px 0" }
|
|
25
|
-
},
|
|
25
|
+
}, se = { style: { opacity: 0.6, flex: "1" } }, ue = ["data-measured"], ye = /* @__PURE__ */ X({
|
|
26
26
|
__name: "Tooltip",
|
|
27
27
|
props: {
|
|
28
28
|
sort: {},
|
|
29
29
|
format: { type: Function }
|
|
30
30
|
},
|
|
31
|
-
setup(
|
|
32
|
-
const
|
|
33
|
-
() =>
|
|
34
|
-
), t =
|
|
35
|
-
|
|
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 = () => {
|
|
35
|
+
C.value++;
|
|
36
36
|
};
|
|
37
|
-
|
|
38
|
-
t.on("overlayChange",
|
|
39
|
-
}),
|
|
40
|
-
t.off("overlayChange",
|
|
37
|
+
Y(() => {
|
|
38
|
+
t.on("overlayChange", W), t.getSeriesIds().length > 0 && C.value++;
|
|
39
|
+
}), Z(() => {
|
|
40
|
+
t.off("overlayChange", W);
|
|
41
41
|
});
|
|
42
|
-
const o =
|
|
42
|
+
const o = h(() => t.getTheme()), V = h(() => t.getDataInterval()), v = h(() => (C.value, u.value ? j(t, {
|
|
43
43
|
time: u.value.time,
|
|
44
44
|
sort: O.value,
|
|
45
45
|
cacheKey: "tooltip"
|
|
46
|
-
}) : [])),
|
|
47
|
-
let
|
|
48
|
-
|
|
46
|
+
}) : [])), _ = h(() => u.value?.time ?? 0), A = $(), y = h(() => typeof A.default == "function"), B = z(null), b = z(null);
|
|
47
|
+
let S = null;
|
|
48
|
+
K((a) => {
|
|
49
49
|
if (!y.value) return;
|
|
50
|
-
const
|
|
51
|
-
!
|
|
50
|
+
const r = B.value;
|
|
51
|
+
!r || typeof ResizeObserver > "u" || (S = new ResizeObserver((e) => {
|
|
52
52
|
const l = e[0]?.contentRect;
|
|
53
53
|
if (!l) return;
|
|
54
|
-
const
|
|
55
|
-
(!
|
|
56
|
-
}),
|
|
57
|
-
|
|
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(() => {
|
|
57
|
+
S?.disconnect(), S = null;
|
|
58
58
|
}));
|
|
59
59
|
});
|
|
60
|
-
const
|
|
61
|
-
if (!u.value ||
|
|
62
|
-
const a = t.getMediaSize(),
|
|
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
63
|
if (y.value) {
|
|
64
64
|
const p = b.value;
|
|
65
65
|
return p ? I({
|
|
66
66
|
x: u.value.mediaX,
|
|
67
67
|
y: u.value.mediaY,
|
|
68
|
-
chartLeft:
|
|
68
|
+
chartLeft: r,
|
|
69
69
|
chartWidth: e,
|
|
70
70
|
chartHeight: l,
|
|
71
71
|
tooltipWidth: p.width,
|
|
72
72
|
tooltipHeight: p.height
|
|
73
|
-
}) : { left:
|
|
73
|
+
}) : { left: r, top: 0 };
|
|
74
74
|
}
|
|
75
|
-
const
|
|
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
76
|
return I({
|
|
77
77
|
x: u.value.mediaX,
|
|
78
78
|
y: u.value.mediaY,
|
|
79
|
-
chartLeft:
|
|
79
|
+
chartLeft: r,
|
|
80
80
|
chartWidth: e,
|
|
81
81
|
chartHeight: l,
|
|
82
|
-
tooltipWidth:
|
|
83
|
-
tooltipHeight:
|
|
82
|
+
tooltipWidth: D,
|
|
83
|
+
tooltipHeight: M
|
|
84
84
|
});
|
|
85
|
-
}),
|
|
86
|
-
function
|
|
85
|
+
}), E = h(() => !y.value || b.value !== null);
|
|
86
|
+
function L(a) {
|
|
87
87
|
return "open" in a;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
return "high" in a && !
|
|
89
|
+
function N(a) {
|
|
90
|
+
return "high" in a && !L(a);
|
|
91
91
|
}
|
|
92
|
-
return (a,
|
|
93
|
-
|
|
92
|
+
return (a, r) => (i(), n(f, null, [
|
|
93
|
+
d(u) && v.value.length > 0 && g.value && !y.value ? (i(), n("div", {
|
|
94
94
|
key: 0,
|
|
95
|
-
style:
|
|
95
|
+
style: m({
|
|
96
96
|
position: "absolute",
|
|
97
|
-
left:
|
|
98
|
-
top:
|
|
97
|
+
left: g.value.left + "px",
|
|
98
|
+
top: g.value.top + "px",
|
|
99
99
|
pointerEvents: "none",
|
|
100
100
|
background: o.value.tooltip.background,
|
|
101
101
|
backdropFilter: "blur(12px)",
|
|
@@ -114,7 +114,7 @@ const te = {
|
|
|
114
114
|
})
|
|
115
115
|
}, [
|
|
116
116
|
s("div", {
|
|
117
|
-
style:
|
|
117
|
+
style: m({
|
|
118
118
|
fontSize: o.value.axis.fontSize + "px",
|
|
119
119
|
color: o.value.axis.textColor,
|
|
120
120
|
marginBottom: "8px",
|
|
@@ -122,39 +122,44 @@ const te = {
|
|
|
122
122
|
borderBottom: "1px solid " + o.value.tooltip.borderColor,
|
|
123
123
|
letterSpacing: "0.02em"
|
|
124
124
|
})
|
|
125
|
-
},
|
|
126
|
-
|
|
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, {
|
|
127
132
|
key: e.id
|
|
128
133
|
}, [
|
|
129
|
-
|
|
130
|
-
(
|
|
134
|
+
L(e.data) ? (i(), n("div", ae, [
|
|
135
|
+
(i(!0), n(f, null, H([
|
|
131
136
|
{ label: "Open", val: e.data.open, field: "open" },
|
|
132
137
|
{ label: "High", val: e.data.high, field: "high" },
|
|
133
138
|
{ label: "Low", val: e.data.low, field: "low" },
|
|
134
139
|
{ label: "Close", val: e.data.close, field: "close" }
|
|
135
|
-
], (l) => (
|
|
140
|
+
], (l) => (i(), n(f, {
|
|
136
141
|
key: l.label
|
|
137
142
|
}, [
|
|
138
|
-
s("span",
|
|
143
|
+
s("span", le, c(l.label), 1),
|
|
139
144
|
s("span", {
|
|
140
|
-
style:
|
|
145
|
+
style: m({
|
|
141
146
|
fontWeight: 600,
|
|
142
|
-
color:
|
|
147
|
+
color: d(G)(
|
|
143
148
|
e.data.close >= e.data.open ? o.value.candlestick.up.body : o.value.candlestick.down.body
|
|
144
149
|
),
|
|
145
150
|
textAlign: "right"
|
|
146
151
|
})
|
|
147
|
-
},
|
|
152
|
+
}, c(x.value(l.val, l.field)), 5)
|
|
148
153
|
], 64))), 128)),
|
|
149
|
-
e.data.volume != null ? (
|
|
150
|
-
|
|
154
|
+
e.data.volume != null ? (i(), n(f, { key: 0 }, [
|
|
155
|
+
r[0] || (r[0] = s("span", { style: { opacity: 0.5 } }, "Volume", -1)),
|
|
151
156
|
s("span", {
|
|
152
|
-
style:
|
|
153
|
-
},
|
|
154
|
-
], 64)) :
|
|
155
|
-
])) :
|
|
157
|
+
style: m({ fontWeight: 600, color: o.value.tooltip.textColor, textAlign: "right" })
|
|
158
|
+
}, c(x.value(e.data.volume, "volume")), 5)
|
|
159
|
+
], 64)) : w("", !0)
|
|
160
|
+
])) : N(e.data) ? (i(), n("div", ie, [
|
|
156
161
|
s("span", {
|
|
157
|
-
style:
|
|
162
|
+
style: m({
|
|
158
163
|
width: "8px",
|
|
159
164
|
height: "8px",
|
|
160
165
|
borderRadius: "2px",
|
|
@@ -162,13 +167,13 @@ const te = {
|
|
|
162
167
|
flexShrink: 0
|
|
163
168
|
})
|
|
164
169
|
}, null, 4),
|
|
165
|
-
s("span",
|
|
170
|
+
s("span", ne, c(e.label ?? "Range"), 1),
|
|
166
171
|
s("span", {
|
|
167
|
-
style:
|
|
168
|
-
},
|
|
169
|
-
])) : (
|
|
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, [
|
|
170
175
|
s("span", {
|
|
171
|
-
style:
|
|
176
|
+
style: m({
|
|
172
177
|
width: "8px",
|
|
173
178
|
height: "8px",
|
|
174
179
|
borderRadius: "50%",
|
|
@@ -176,22 +181,22 @@ const te = {
|
|
|
176
181
|
flexShrink: 0
|
|
177
182
|
})
|
|
178
183
|
}, null, 4),
|
|
179
|
-
s("span",
|
|
184
|
+
s("span", se, c(e.label ?? "Value"), 1),
|
|
180
185
|
s("span", {
|
|
181
|
-
style:
|
|
182
|
-
},
|
|
186
|
+
style: m({ fontWeight: 600, color: e.color })
|
|
187
|
+
}, c(x.value(e.data.value, "value")), 5)
|
|
183
188
|
]))
|
|
184
189
|
], 64))), 128))
|
|
185
|
-
], 4)) :
|
|
186
|
-
|
|
190
|
+
], 4)) : w("", !0),
|
|
191
|
+
d(u) && v.value.length > 0 && g.value && y.value ? (i(), n("div", {
|
|
187
192
|
key: 1,
|
|
188
193
|
ref_key: "containerRef",
|
|
189
194
|
ref: B,
|
|
190
|
-
"data-measured":
|
|
191
|
-
style:
|
|
195
|
+
"data-measured": E.value ? "true" : "false",
|
|
196
|
+
style: m({
|
|
192
197
|
position: "absolute",
|
|
193
|
-
left:
|
|
194
|
-
top:
|
|
198
|
+
left: g.value.left + "px",
|
|
199
|
+
top: g.value.top + "px",
|
|
195
200
|
pointerEvents: "none",
|
|
196
201
|
background: o.value.tooltip.background,
|
|
197
202
|
backdropFilter: "blur(12px)",
|
|
@@ -205,20 +210,20 @@ const te = {
|
|
|
205
210
|
fontVariantNumeric: "tabular-nums",
|
|
206
211
|
color: o.value.tooltip.textColor,
|
|
207
212
|
width: "max-content",
|
|
208
|
-
maxWidth:
|
|
213
|
+
maxWidth: d(t).getLayout().chartArea.width + "px",
|
|
209
214
|
boxSizing: "border-box",
|
|
210
215
|
zIndex: 10,
|
|
211
216
|
visibility: b.value !== null ? "visible" : "hidden"
|
|
212
217
|
})
|
|
213
218
|
}, [
|
|
214
|
-
|
|
215
|
-
snapshots:
|
|
216
|
-
time:
|
|
219
|
+
U(a.$slots, "default", {
|
|
220
|
+
snapshots: v.value,
|
|
221
|
+
time: _.value
|
|
217
222
|
})
|
|
218
|
-
], 12,
|
|
223
|
+
], 12, ue)) : w("", !0)
|
|
219
224
|
], 64));
|
|
220
225
|
}
|
|
221
226
|
});
|
|
222
227
|
export {
|
|
223
|
-
|
|
228
|
+
ye as default
|
|
224
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
|
+
};
|
package/dist/ui/YAxis.vue.js
CHANGED
|
@@ -1,43 +1,59 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { mountAxisLabels as
|
|
3
|
-
import { useAxisLayout as
|
|
4
|
-
import { useChartInstance as
|
|
5
|
-
const
|
|
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(
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
}
|
|
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:
|
|
30
|
-
style:
|
|
45
|
+
ref: s,
|
|
46
|
+
style: _({
|
|
31
47
|
position: "absolute",
|
|
32
|
-
[
|
|
48
|
+
[u.value.position]: "0",
|
|
33
49
|
top: "0",
|
|
34
|
-
bottom:
|
|
35
|
-
width:
|
|
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
|
-
|
|
58
|
+
M as default
|
|
43
59
|
};
|