@wick-charts/vue 0.8.1 → 0.8.2

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 (38) hide show
  1. package/dist/BandSeries.vue.js +25 -24
  2. package/dist/BarSeries.vue.js +27 -26
  3. package/dist/CandlestickSeries.vue.js +25 -24
  4. package/dist/HeatmapSeries.vue.js +21 -20
  5. package/dist/LineSeries.vue.js +24 -23
  6. package/dist/PieSeries.vue.js +25 -24
  7. package/dist/composables.js +63 -36
  8. package/dist/core/dist/axis/dom-labels.js +64 -53
  9. package/dist/core/dist/chart/options.js +1 -1
  10. package/dist/core/dist/chart/y-target.js +38 -32
  11. package/dist/core/dist/chart.js +475 -439
  12. package/dist/core/dist/data/decimation.js +52 -51
  13. package/dist/core/dist/data/store.js +38 -20
  14. package/dist/core/dist/data/sync.js +80 -69
  15. package/dist/core/dist/perf/perf-hud.js +3 -3
  16. package/dist/core/dist/scales/tick-tracker.js +2 -1
  17. package/dist/core/dist/series/band.js +1 -1
  18. package/dist/core/dist/series/bar.js +240 -211
  19. package/dist/core/dist/series/base-multi-layer.js +267 -249
  20. package/dist/core/dist/series/candlestick.js +116 -116
  21. package/dist/core/dist/series/line.js +540 -455
  22. package/dist/core/dist/snapshots.js +96 -77
  23. package/dist/index.d.ts +22 -4
  24. package/dist/ui/InfoBar.vue.js +68 -68
  25. package/dist/ui/NumberFlow.vue.js +36 -27
  26. package/dist/ui/Tooltip.vue.js +127 -130
  27. package/package.json +2 -2
  28. package/src/BandSeries.vue +5 -3
  29. package/src/BarSeries.vue +5 -3
  30. package/src/CandlestickSeries.vue +5 -4
  31. package/src/ChartContainer.vue +1 -1
  32. package/src/HeatmapSeries.vue +5 -4
  33. package/src/LineSeries.vue +5 -3
  34. package/src/PieSeries.vue +6 -5
  35. package/src/composables.ts +64 -1
  36. package/src/ui/InfoBar.vue +11 -3
  37. package/src/ui/NumberFlow.vue +17 -3
  38. package/src/ui/Tooltip.vue +23 -12
@@ -1,8 +1,9 @@
1
- import { defineComponent as d, ref as f, onMounted as m, onUnmounted as v, watch as o, createCommentVNode as S } from "vue";
2
- import { toLayers as c, syncLayers as y, EMPTY_SYNC_STATE as _ } from "./core/dist/data/sync.js";
1
+ import { defineComponent as f, ref as m, onMounted as v, onUnmounted as S, watch as o, createCommentVNode as y } from "vue";
2
+ import { toLayers as c, syncLayers as _, EMPTY_SYNC_STATE as h } from "./core/dist/data/sync.js";
3
3
  import { BandSeriesDef as b } from "./core/dist/series/band.js";
4
- import { useChartInstance as h } from "./context.js";
5
- const V = /* @__PURE__ */ d({
4
+ import { rawSeriesData as d, seriesDataSource as C } from "./composables.js";
5
+ import { useChartInstance as w } from "./context.js";
6
+ const g = /* @__PURE__ */ f({
6
7
  __name: "BandSeries",
7
8
  props: {
8
9
  data: {},
@@ -12,32 +13,32 @@ const V = /* @__PURE__ */ d({
12
13
  scale: {}
13
14
  },
14
15
  setup(p) {
15
- const r = p, i = h(), s = f(null);
16
- let a = [], n = 0;
16
+ const r = p, s = w(), a = m(null);
17
+ let n = [], i = 0;
17
18
  function l(e, t) {
18
- a = y({ chart: i, id: e, data: t, prev: a });
19
+ n = _({ chart: s, id: e, data: t, prev: n });
19
20
  }
20
21
  function u(e) {
21
- n = c(e).length;
22
- const t = i.addSeries(b, {
22
+ i = c(e).length;
23
+ const t = s.addSeries(b, {
23
24
  ...r.options,
24
25
  scale: r.scale,
25
- layers: n,
26
+ layers: i,
26
27
  id: r.id
27
28
  });
28
- s.value = t, a = new Array(n).fill(_), l(t, e), i.setSeriesVisible(t, r.visible);
29
+ a.value = t, n = new Array(i).fill(h), l(t, e), s.setSeriesVisible(t, r.visible);
29
30
  }
30
- return m(() => {
31
- u(r.data);
32
- }), v(() => {
33
- s.value && i.removeSeries(s.value);
31
+ return v(() => {
32
+ u(d(r.data));
33
+ }), S(() => {
34
+ a.value && s.removeSeries(a.value);
34
35
  }), o(
35
- () => r.data,
36
- (e) => {
37
- const t = s.value;
36
+ C(() => r.data),
37
+ () => {
38
+ const e = d(r.data), t = a.value;
38
39
  if (t) {
39
- if (c(e).length !== n) {
40
- i.removeSeries(t), u(e);
40
+ if (c(e).length !== i) {
41
+ s.removeSeries(t), u(e);
41
42
  return;
42
43
  }
43
44
  l(t, e);
@@ -46,17 +47,17 @@ const V = /* @__PURE__ */ d({
46
47
  ), o(
47
48
  () => [r.options, r.scale],
48
49
  ([e, t]) => {
49
- s.value && i.updateSeriesOptions(s.value, e ? { ...e, scale: t } : { scale: t });
50
+ a.value && s.updateSeriesOptions(a.value, e ? { ...e, scale: t } : { scale: t });
50
51
  },
51
52
  { deep: !0 }
52
53
  ), o(
53
54
  () => r.visible,
54
55
  (e) => {
55
- s.value && i.setSeriesVisible(s.value, e);
56
+ a.value && s.setSeriesVisible(a.value, e);
56
57
  }
57
- ), (e, t) => S("", !0);
58
+ ), (e, t) => y("", !0);
58
59
  }
59
60
  });
60
61
  export {
61
- V as default
62
+ g as default
62
63
  };
@@ -1,7 +1,8 @@
1
- import { defineComponent as f, ref as d, onMounted as m, onUnmounted as v, watch as o, createCommentVNode as S } from "vue";
2
- import { toLayers as c, syncLayers as y, EMPTY_SYNC_STATE as _ } from "./core/dist/data/sync.js";
1
+ import { defineComponent as f, ref as m, onMounted as v, onUnmounted as S, watch as n, createCommentVNode as y } from "vue";
2
+ import { toLayers as c, syncLayers as _, EMPTY_SYNC_STATE as h } from "./core/dist/data/sync.js";
3
3
  import { BarSeriesDef as b } from "./core/dist/series/bar.js";
4
- import { useChartInstance as h } from "./context.js";
4
+ import { rawSeriesData as p, seriesDataSource as C } from "./composables.js";
5
+ import { useChartInstance as D } from "./context.js";
5
6
  const g = /* @__PURE__ */ f({
6
7
  __name: "BarSeries",
7
8
  props: {
@@ -11,50 +12,50 @@ const g = /* @__PURE__ */ f({
11
12
  visible: { type: Boolean, default: !0 },
12
13
  scale: {}
13
14
  },
14
- setup(p) {
15
- const t = p, i = h(), s = d(null);
16
- let n = [], a = 0;
15
+ setup(d) {
16
+ const t = d, s = D(), a = m(null);
17
+ let o = [], i = 0;
17
18
  function l(e, r) {
18
- n = y({ chart: i, id: e, data: r, prev: n });
19
+ o = _({ chart: s, id: e, data: r, prev: o });
19
20
  }
20
21
  function u(e) {
21
- a = c(e).length;
22
- const r = i.addSeries(b, {
22
+ i = c(e).length;
23
+ const r = s.addSeries(b, {
23
24
  ...t.options,
24
25
  scale: t.scale,
25
- layers: a,
26
+ layers: i,
26
27
  id: t.id
27
28
  });
28
- s.value = r, n = new Array(a).fill(_), l(r, e), i.setSeriesVisible(r, t.visible);
29
+ a.value = r, o = new Array(i).fill(h), l(r, e), s.setSeriesVisible(r, t.visible);
29
30
  }
30
- return m(() => {
31
- u(t.data);
32
- }), v(() => {
33
- s.value && i.removeSeries(s.value);
34
- }), o(
35
- () => t.data,
36
- (e) => {
37
- const r = s.value;
31
+ return v(() => {
32
+ u(p(t.data));
33
+ }), S(() => {
34
+ a.value && s.removeSeries(a.value);
35
+ }), n(
36
+ C(() => t.data),
37
+ () => {
38
+ const e = p(t.data), r = a.value;
38
39
  if (r) {
39
- if (c(e).length !== a) {
40
- i.removeSeries(r), u(e);
40
+ if (c(e).length !== i) {
41
+ s.removeSeries(r), u(e);
41
42
  return;
42
43
  }
43
44
  l(r, e);
44
45
  }
45
46
  }
46
- ), o(
47
+ ), n(
47
48
  () => [t.options, t.scale],
48
49
  ([e, r]) => {
49
- s.value && i.updateSeriesOptions(s.value, e ? { ...e, scale: r } : { scale: r });
50
+ a.value && s.updateSeriesOptions(a.value, e ? { ...e, scale: r } : { scale: r });
50
51
  },
51
52
  { deep: !0 }
52
- ), o(
53
+ ), n(
53
54
  () => t.visible,
54
55
  (e) => {
55
- s.value && i.setSeriesVisible(s.value, e);
56
+ a.value && s.setSeriesVisible(a.value, e);
56
57
  }
57
- ), (e, r) => S("", !0);
58
+ ), (e, r) => y("", !0);
58
59
  }
59
60
  });
60
61
  export {
@@ -1,8 +1,9 @@
1
- import { defineComponent as d, ref as p, onMounted as f, onUnmounted as m, watch as i, createCommentVNode as v } from "vue";
2
- import { toLayers as u, syncSeriesLayer as S, EMPTY_SYNC_STATE as b } from "./core/dist/data/sync.js";
3
- import { CandlestickSeriesDef as _ } from "./core/dist/series/candlestick.js";
4
- import { useChartInstance as y } from "./context.js";
5
- const T = /* @__PURE__ */ d({
1
+ import { defineComponent as p, ref as m, onMounted as f, onUnmounted as v, watch as i, createCommentVNode as S } from "vue";
2
+ import { toLayers as u, syncSeriesLayer as b, EMPTY_SYNC_STATE as _ } from "./core/dist/data/sync.js";
3
+ import { CandlestickSeriesDef as y } from "./core/dist/series/candlestick.js";
4
+ import { rawSeriesData as c, seriesDataSource as C } from "./composables.js";
5
+ import { useChartInstance as h } from "./context.js";
6
+ const V = /* @__PURE__ */ p({
6
7
  __name: "CandlestickSeries",
7
8
  props: {
8
9
  data: {},
@@ -11,43 +12,43 @@ const T = /* @__PURE__ */ d({
11
12
  visible: { type: Boolean, default: !0 },
12
13
  scale: {}
13
14
  },
14
- setup(c) {
15
- const a = c, r = y(), t = p(null);
16
- let o = b;
17
- function n(e, s) {
18
- const l = u(s)[0];
19
- r.setSeriesLabels(e, [l.label]), o = S({ chart: r, id: e, data: l.data, prev: o });
15
+ setup(d) {
16
+ const a = d, s = h(), t = m(null);
17
+ let o = _;
18
+ function n(e, r) {
19
+ const l = u(r)[0];
20
+ s.setSeriesLabels(e, [l.label]), o = b({ chart: s, id: e, data: l.data, prev: o });
20
21
  }
21
22
  return f(() => {
22
- const e = r.addSeries(_, {
23
+ const e = s.addSeries(y, {
23
24
  ...a.options,
24
25
  scale: a.scale,
25
26
  id: a.id,
26
27
  label: u(a.data)[0].label
27
28
  });
28
- t.value = e, n(e, a.data), r.setSeriesVisible(e, a.visible);
29
- }), m(() => {
30
- t.value && r.removeSeries(t.value);
29
+ t.value = e, n(e, c(a.data)), s.setSeriesVisible(e, a.visible);
30
+ }), v(() => {
31
+ t.value && s.removeSeries(t.value);
31
32
  }), i(
32
- () => a.data,
33
- (e) => {
34
- const s = t.value;
35
- s && n(s, e);
33
+ C(() => a.data),
34
+ () => {
35
+ const e = t.value;
36
+ e && n(e, c(a.data));
36
37
  }
37
38
  ), i(
38
39
  () => [a.options, a.scale],
39
- ([e, s]) => {
40
- t.value && r.updateSeriesOptions(t.value, e ? { ...e, scale: s } : { scale: s });
40
+ ([e, r]) => {
41
+ t.value && s.updateSeriesOptions(t.value, e ? { ...e, scale: r } : { scale: r });
41
42
  },
42
43
  { deep: !0 }
43
44
  ), i(
44
45
  () => a.visible,
45
46
  (e) => {
46
- t.value && r.setSeriesVisible(t.value, e);
47
+ t.value && s.setSeriesVisible(t.value, e);
47
48
  }
48
- ), (e, s) => v("", !0);
49
+ ), (e, r) => S("", !0);
49
50
  }
50
51
  });
51
52
  export {
52
- T as default
53
+ V as default
53
54
  };
@@ -1,7 +1,8 @@
1
- import { defineComponent as o, ref as n, onMounted as u, onUnmounted as l, watch as s, createCommentVNode as d } from "vue";
2
- import { HeatmapSeriesDef as p } from "./core/dist/series/heatmap.js";
3
- import { useChartInstance as m } from "./context.js";
4
- const _ = /* @__PURE__ */ o({
1
+ import { defineComponent as n, ref as u, onMounted as d, onUnmounted as l, watch as s, createCommentVNode as p } from "vue";
2
+ import { HeatmapSeriesDef as m } from "./core/dist/series/heatmap.js";
3
+ import { rawSeriesData as r, seriesDataSource as f } from "./composables.js";
4
+ import { useChartInstance as c } from "./context.js";
5
+ const D = /* @__PURE__ */ n({
5
6
  __name: "HeatmapSeries",
6
7
  props: {
7
8
  data: {},
@@ -9,32 +10,32 @@ const _ = /* @__PURE__ */ o({
9
10
  id: {},
10
11
  visible: { type: Boolean, default: !0 }
11
12
  },
12
- setup(r) {
13
- const a = r, i = m(), t = n(null);
14
- return u(() => {
15
- const e = i.addSeries(p, { ...a.options, id: a.id });
16
- t.value = e, a.data.length > 0 && i.setSeriesData(e, a.data), i.setSeriesVisible(e, a.visible);
13
+ setup(o) {
14
+ const e = o, i = c(), t = u(null);
15
+ return d(() => {
16
+ const a = i.addSeries(m, { ...e.options, id: e.id });
17
+ t.value = a, e.data.length > 0 && i.setSeriesData(a, r(e.data)), i.setSeriesVisible(a, e.visible);
17
18
  }), l(() => {
18
19
  t.value && i.removeSeries(t.value);
19
20
  }), s(
20
- () => a.data,
21
- (e) => {
22
- t.value && i.setSeriesData(t.value, e);
21
+ f(() => e.data),
22
+ () => {
23
+ t.value && i.setSeriesData(t.value, r(e.data));
23
24
  }
24
25
  ), s(
25
- () => a.options,
26
- (e) => {
27
- t.value && e && i.updateSeriesOptions(t.value, e);
26
+ () => e.options,
27
+ (a) => {
28
+ t.value && a && i.updateSeriesOptions(t.value, a);
28
29
  },
29
30
  { deep: !0 }
30
31
  ), s(
31
- () => a.visible,
32
- (e) => {
33
- t.value && i.setSeriesVisible(t.value, e);
32
+ () => e.visible,
33
+ (a) => {
34
+ t.value && i.setSeriesVisible(t.value, a);
34
35
  }
35
- ), (e, f) => d("", !0);
36
+ ), (a, v) => p("", !0);
36
37
  }
37
38
  });
38
39
  export {
39
- _ as default
40
+ D as default
40
41
  };
@@ -1,7 +1,8 @@
1
- import { defineComponent as f, ref as d, onMounted as m, onUnmounted as v, watch as o, createCommentVNode as S } from "vue";
2
- import { toLayers as c, syncLayers as y, EMPTY_SYNC_STATE as _ } from "./core/dist/data/sync.js";
1
+ import { defineComponent as f, ref as m, onMounted as v, onUnmounted as S, watch as o, createCommentVNode as y } from "vue";
2
+ import { toLayers as c, syncLayers as _, EMPTY_SYNC_STATE as h } from "./core/dist/data/sync.js";
3
3
  import { LineSeriesDef as b } from "./core/dist/series/line.js";
4
- import { useChartInstance as h } from "./context.js";
4
+ import { rawSeriesData as p, seriesDataSource as C } from "./composables.js";
5
+ import { useChartInstance as D } from "./context.js";
5
6
  const g = /* @__PURE__ */ f({
6
7
  __name: "LineSeries",
7
8
  props: {
@@ -11,33 +12,33 @@ const g = /* @__PURE__ */ f({
11
12
  visible: { type: Boolean, default: !0 },
12
13
  scale: {}
13
14
  },
14
- setup(p) {
15
- const r = p, i = h(), s = d(null);
16
- let a = [], n = 0;
15
+ setup(d) {
16
+ const r = d, s = D(), a = m(null);
17
+ let n = [], i = 0;
17
18
  function l(e, t) {
18
- a = y({ chart: i, id: e, data: t, prev: a });
19
+ n = _({ chart: s, id: e, data: t, prev: n });
19
20
  }
20
21
  function u(e) {
21
- n = c(e).length;
22
- const t = i.addSeries(b, {
22
+ i = c(e).length;
23
+ const t = s.addSeries(b, {
23
24
  ...r.options,
24
25
  scale: r.scale,
25
- layers: n,
26
+ layers: i,
26
27
  id: r.id
27
28
  });
28
- s.value = t, a = new Array(n).fill(_), l(t, e), i.setSeriesVisible(t, r.visible);
29
+ a.value = t, n = new Array(i).fill(h), l(t, e), s.setSeriesVisible(t, r.visible);
29
30
  }
30
- return m(() => {
31
- u(r.data);
32
- }), v(() => {
33
- s.value && i.removeSeries(s.value);
31
+ return v(() => {
32
+ u(p(r.data));
33
+ }), S(() => {
34
+ a.value && s.removeSeries(a.value);
34
35
  }), o(
35
- () => r.data,
36
- (e) => {
37
- const t = s.value;
36
+ C(() => r.data),
37
+ () => {
38
+ const e = p(r.data), t = a.value;
38
39
  if (t) {
39
- if (c(e).length !== n) {
40
- i.removeSeries(t), u(e);
40
+ if (c(e).length !== i) {
41
+ s.removeSeries(t), u(e);
41
42
  return;
42
43
  }
43
44
  l(t, e);
@@ -46,15 +47,15 @@ const g = /* @__PURE__ */ f({
46
47
  ), o(
47
48
  () => [r.options, r.scale],
48
49
  ([e, t]) => {
49
- s.value && i.updateSeriesOptions(s.value, e ? { ...e, scale: t } : { scale: t });
50
+ a.value && s.updateSeriesOptions(a.value, e ? { ...e, scale: t } : { scale: t });
50
51
  },
51
52
  { deep: !0 }
52
53
  ), o(
53
54
  () => r.visible,
54
55
  (e) => {
55
- s.value && i.setSeriesVisible(s.value, e);
56
+ a.value && s.setSeriesVisible(a.value, e);
56
57
  }
57
- ), (e, t) => S("", !0);
58
+ ), (e, t) => y("", !0);
58
59
  }
59
60
  });
60
61
  export {
@@ -1,7 +1,8 @@
1
- import { defineComponent as o, ref as n, onMounted as u, onUnmounted as l, watch as a, createCommentVNode as d } from "vue";
2
- import { PieSeriesDef as p } from "./core/dist/series/pie.js";
3
- import { useChartInstance as f } from "./context.js";
4
- const h = /* @__PURE__ */ o({
1
+ import { defineComponent as n, ref as u, onMounted as d, onUnmounted as l, watch as s, createCommentVNode as p } from "vue";
2
+ import { PieSeriesDef as f } from "./core/dist/series/pie.js";
3
+ import { rawSeriesData as r, seriesDataSource as m } from "./composables.js";
4
+ import { useChartInstance as c } from "./context.js";
5
+ const D = /* @__PURE__ */ n({
5
6
  __name: "PieSeries",
6
7
  props: {
7
8
  data: {},
@@ -9,32 +10,32 @@ const h = /* @__PURE__ */ o({
9
10
  id: {},
10
11
  visible: { type: Boolean, default: !0 }
11
12
  },
12
- setup(r) {
13
- const i = r, s = f(), t = n(null);
14
- return u(() => {
15
- const e = s.addSeries(p, { ...i.options, id: i.id });
16
- t.value = e, i.data.length > 0 && s.setSeriesData(e, i.data), s.setSeriesVisible(e, i.visible);
13
+ setup(o) {
14
+ const e = o, i = c(), t = u(null);
15
+ return d(() => {
16
+ const a = i.addSeries(f, { ...e.options, id: e.id });
17
+ t.value = a, e.data.length > 0 && i.setSeriesData(a, r(e.data)), i.setSeriesVisible(a, e.visible);
17
18
  }), l(() => {
18
- t.value && s.removeSeries(t.value);
19
- }), a(
20
- () => i.data,
21
- (e) => {
22
- t.value && e.length > 0 && s.setSeriesData(t.value, e);
19
+ t.value && i.removeSeries(t.value);
20
+ }), s(
21
+ m(() => e.data),
22
+ () => {
23
+ t.value && e.data.length > 0 && i.setSeriesData(t.value, r(e.data));
23
24
  }
24
- ), a(
25
- () => i.options,
26
- (e) => {
27
- t.value && e && s.updateSeriesOptions(t.value, e);
25
+ ), s(
26
+ () => e.options,
27
+ (a) => {
28
+ t.value && a && i.updateSeriesOptions(t.value, a);
28
29
  },
29
30
  { deep: !0 }
30
- ), a(
31
- () => i.visible,
32
- (e) => {
33
- t.value && s.setSeriesVisible(t.value, e);
31
+ ), s(
32
+ () => e.visible,
33
+ (a) => {
34
+ t.value && i.setSeriesVisible(t.value, a);
34
35
  }
35
- ), (e, c) => d("", !0);
36
+ ), (a, v) => p("", !0);
36
37
  }
37
38
  });
38
39
  export {
39
- h as default
40
+ D as default
40
41
  };
@@ -1,17 +1,42 @@
1
- import { ref as l, onMounted as u, onUnmounted as a } from "vue";
2
- function A(e) {
3
- const n = l(e.getVisibleRange()), i = () => {
1
+ import { toRaw as A, ref as a, onMounted as u, onUnmounted as l } from "vue";
2
+ function f(e) {
3
+ return typeof e == "object" && e !== null && !Array.isArray(e) && Array.isArray(Reflect.get(e, "data"));
4
+ }
5
+ function c(e) {
6
+ return f(e) ? [e.data] : Array.isArray(e) ? Array.isArray(e[0]) || f(e[0]) ? e.map((t) => f(t) ? t.data : t) : [e] : [];
7
+ }
8
+ function v(e) {
9
+ const n = A(e), t = (o) => {
10
+ if (!f(o)) return A(o);
11
+ const s = A(o);
12
+ return { ...s, data: A(s.data) };
13
+ };
14
+ return Array.isArray(n) ? Array.isArray(n[0]) || f(n[0]) ? n.map(t) : n : t(n);
15
+ }
16
+ function p(e) {
17
+ return () => {
18
+ const n = e(), t = [n];
19
+ for (const i of c(n)) {
20
+ t.push(i, i.length);
21
+ const o = i[i.length - 1];
22
+ typeof o == "object" && o !== null && t.push(...Object.values(o));
23
+ }
24
+ return t;
25
+ };
26
+ }
27
+ function h(e) {
28
+ const n = a(e.getVisibleRange()), t = () => {
4
29
  n.value = e.getVisibleRange();
5
30
  };
6
- return u(() => e.on("viewportChange", i)), a(() => e.off("viewportChange", i)), n;
31
+ return u(() => e.on("viewportChange", t)), l(() => e.off("viewportChange", t)), n;
7
32
  }
8
- function d(e) {
9
- const n = l(e.getYRange()), i = () => {
33
+ function C(e) {
34
+ const n = a(e.getYRange()), t = () => {
10
35
  n.value = e.getYRange();
11
36
  };
12
- return u(() => e.on("viewportChange", i)), a(() => e.off("viewportChange", i)), n;
37
+ return u(() => e.on("viewportChange", t)), l(() => e.off("viewportChange", t)), n;
13
38
  }
14
- function r(e) {
39
+ function d(e) {
15
40
  return {
16
41
  yAxisPosition: e.yAxisPosition,
17
42
  yAxisWidth: e.yAxisWidth,
@@ -22,46 +47,48 @@ function r(e) {
22
47
  rightAxisScale: e.getAxisColumnScale("right")
23
48
  };
24
49
  }
25
- function h(e) {
26
- const n = l(r(e)), i = () => {
27
- const t = r(e), o = n.value;
28
- o.yAxisPosition === t.yAxisPosition && o.yAxisWidth === t.yAxisWidth && o.xAxisHeight === t.xAxisHeight && o.leftAxisWidth === t.leftAxisWidth && o.rightAxisWidth === t.rightAxisWidth && o.leftAxisScale === t.leftAxisScale && o.rightAxisScale === t.rightAxisScale || (n.value = t);
50
+ function S(e) {
51
+ const n = a(d(e)), t = () => {
52
+ const i = d(e), o = n.value;
53
+ o.yAxisPosition === i.yAxisPosition && o.yAxisWidth === i.yAxisWidth && o.xAxisHeight === i.xAxisHeight && o.leftAxisWidth === i.leftAxisWidth && o.rightAxisWidth === i.rightAxisWidth && o.leftAxisScale === i.leftAxisScale && o.rightAxisScale === i.rightAxisScale || (n.value = i);
29
54
  };
30
55
  return u(() => {
31
- i(), e.on("viewportChange", i);
32
- }), a(() => e.off("viewportChange", i)), n;
56
+ t(), e.on("viewportChange", t);
57
+ }), l(() => e.off("viewportChange", t)), n;
33
58
  }
34
- function p(e, n) {
35
- let i = e.getLastValue(n);
36
- const t = () => e.getYScale(e.getSeriesScale(n));
37
- let o = i ? t().valueToY(i.value) : null;
38
- const x = l(i), g = () => {
39
- const s = e.getLastValue(n), f = s ? t().valueToY(s.value) : null;
40
- i?.value === s?.value && i?.isLive === s?.isLive && o === f || (i = s, o = f, x.value = s);
59
+ function w(e, n) {
60
+ let t = e.getLastValue(n);
61
+ const i = () => e.getYScale(e.getSeriesScale(n));
62
+ let o = t ? i().valueToY(t.value) : null;
63
+ const s = a(t), g = () => {
64
+ const r = e.getLastValue(n), x = r ? i().valueToY(r.value) : null;
65
+ t?.value === r?.value && t?.isLive === r?.isLive && o === x || (t = r, o = x, s.value = r);
41
66
  };
42
67
  return u(() => {
43
68
  e.on("dataUpdate", g), e.on("viewportChange", g);
44
- }), a(() => {
69
+ }), l(() => {
45
70
  e.off("dataUpdate", g), e.off("viewportChange", g);
46
- }), x;
71
+ }), s;
47
72
  }
48
- function C(e, n) {
49
- const i = l(e.getPreviousClose(n)), t = () => {
50
- i.value = e.getPreviousClose(n);
73
+ function W(e, n) {
74
+ const t = a(e.getPreviousClose(n)), i = () => {
75
+ t.value = e.getPreviousClose(n);
51
76
  };
52
- return u(() => e.on("dataUpdate", t)), a(() => e.off("dataUpdate", t)), i;
77
+ return u(() => e.on("dataUpdate", i)), l(() => e.off("dataUpdate", i)), t;
53
78
  }
54
- function c(e) {
55
- const n = l(e.getCrosshairPosition()), i = () => {
79
+ function P(e) {
80
+ const n = a(e.getCrosshairPosition()), t = () => {
56
81
  n.value = e.getCrosshairPosition();
57
82
  };
58
- return u(() => e.on("crosshairMove", i)), a(() => e.off("crosshairMove", i)), n;
83
+ return u(() => e.on("crosshairMove", t)), l(() => e.off("crosshairMove", t)), n;
59
84
  }
60
85
  export {
61
- h as useAxisLayout,
62
- c as useCrosshairPosition,
63
- p as useLastYValue,
64
- C as usePreviousClose,
65
- A as useVisibleRange,
66
- d as useYRange
86
+ v as rawSeriesData,
87
+ p as seriesDataSource,
88
+ S as useAxisLayout,
89
+ P as useCrosshairPosition,
90
+ w as useLastYValue,
91
+ W as usePreviousClose,
92
+ h as useVisibleRange,
93
+ C as useYRange
67
94
  };