vue-chrts 0.2.5-test.1 → 0.2.5-test.3

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.
@@ -1,13 +1,13 @@
1
- import { defineComponent as M, useSlots as U, useTemplateRef as j, ref as w, computed as d, createElementBlock as m, openBlock as o, normalizeClass as R, normalizeStyle as h, createVNode as u, createCommentVNode as c, createElementVNode as X, unref as i, withCtx as z, createBlock as y, Fragment as x, renderList as Y, mergeProps as p, renderSlot as L } from "vue";
2
- import { Position as C, CurveType as D } from "@unovis/ts";
3
- import { createMarkers as I, getFirstPropertyValue as H } from "../../utils.js";
4
- import K from "../Tooltip.js";
5
- import { VisXYContainer as q, VisTooltip as J, VisArea as Q, VisLine as Z, VisAxis as A, VisCrosshair as _, VisBulletLegend as ee } from "@unovis/vue";
6
- import { LegendPosition as te } from "../../types.js";
7
- const ie = {
1
+ import { defineComponent as W, useSlots as x, useTemplateRef as E, ref as M, computed as u, createElementBlock as c, openBlock as s, normalizeClass as w, normalizeStyle as g, createVNode as m, createCommentVNode as d, createElementVNode as X, unref as a, withCtx as z, createBlock as y, Fragment as v, renderList as R, mergeProps as h, renderSlot as T } from "vue";
2
+ import { Position as L, CurveType as C } from "@unovis/ts";
3
+ import { createMarkers as Y, getFirstPropertyValue as U } from "../../utils.js";
4
+ import H from "../Tooltip.js";
5
+ import { VisXYContainer as q, VisTooltip as J, VisArea as K, VisLine as Q, VisAxis as A, VisCrosshair as Z, VisBulletLegend as I } from "@unovis/vue";
6
+ import { LegendPosition as _ } from "../../types.js";
7
+ const ee = {
8
8
  ref: "slotWrapper",
9
9
  style: { display: "none" }
10
- }, f = 24, b = 4, ne = 0.5, B = "#3b82f6", de = /* @__PURE__ */ M({
10
+ }, ie = 0.5, $ = "#3b82f6", se = /* @__PURE__ */ W({
11
11
  __name: "AreaChart",
12
12
  props: {
13
13
  data: {},
@@ -20,15 +20,20 @@ const ie = {
20
20
  xFormatter: {},
21
21
  yFormatter: {},
22
22
  curveType: {},
23
+ hideArea: { type: Boolean, default: !1 },
24
+ gradientStops: { default: () => [
25
+ { offset: "0%", stopOpacity: 1 },
26
+ { offset: "75%", stopOpacity: 0 }
27
+ ] },
23
28
  lineWidth: { default: 2 },
24
29
  lineDashArray: {},
25
- xNumTicks: { default: (e) => e.data.length > f ? f / b : e.data.length - 1 },
30
+ xNumTicks: {},
26
31
  xExplicitTicks: {},
27
32
  minMaxTicksOnly: { type: Boolean },
28
- yNumTicks: { default: (e) => e.data.length > f ? f / b : e.data.length - 1 },
33
+ yNumTicks: {},
29
34
  hideLegend: { type: Boolean, default: !1 },
30
35
  hideTooltip: { type: Boolean },
31
- legendPosition: { default: te.BottomCenter },
36
+ legendPosition: { default: _.BottomCenter },
32
37
  legendStyle: { default: void 0 },
33
38
  xDomainLine: { type: Boolean },
34
39
  yDomainLine: { type: Boolean },
@@ -45,79 +50,97 @@ const ie = {
45
50
  xDomain: {}
46
51
  },
47
52
  emits: ["click"],
48
- setup(e, { emit: V }) {
49
- const F = V, n = e, $ = U(), T = j("slotWrapper"), s = w(), g = d(
50
- () => Object.values(n.categories).map((l) => l.color)
51
- ), G = d(() => n.markerConfig ? I(n.markerConfig) : ""), O = d(() => n.legendPosition.startsWith("top")), N = d(() => n.legendPosition.includes("left") ? "flex-start" : n.legendPosition.includes("right") ? "flex-end" : "center"), P = d(() => {
52
- const l = (t, a) => `
53
- <linearGradient id="gradient${t}-${a}" gradientTransform="rotate(90)">
54
- <stop offset="0%" stop-color="${a}" stop-opacity="1" />
55
- <stop offset="100%" stop-color="${a}" stop-opacity="0" />
53
+ setup(D, { emit: b }) {
54
+ const B = b, t = D, O = x(), k = E("slotWrapper"), p = M(), f = u(() => {
55
+ const e = Object.values(t.categories).map(
56
+ (n, i) => `var(--vis-color${i})`
57
+ );
58
+ return Object.values(t.categories).map(
59
+ (n, i) => n.color ?? e[i]
60
+ );
61
+ }), V = u(() => t.markerConfig ? Y(t.markerConfig) : ""), F = u(() => t.legendPosition.startsWith("top")), G = u(() => t.legendPosition.includes("left") ? "flex-start" : t.legendPosition.includes("right") ? "flex-end" : "center"), P = u(() => {
62
+ const e = (i, o) => {
63
+ var r;
64
+ return `
65
+ <linearGradient id="gradient${i}-${o}" gradientTransform="rotate(90)">
66
+ ${((r = t.gradientStops) == null ? void 0 : r.map(
67
+ (l) => `<stop offset="${l.offset}" stop-color="${o}" stop-opacity="${l.stopOpacity}" />`
68
+ ).join("")) ?? ""}
69
+ <stop offset="100%" stop-color="${o}" stop-opacity="0" />
56
70
  </linearGradient>
57
- `, r = (t, a) => `
58
- <linearGradient id="gradient${t}-${a}" gradientTransform="rotate(90)">
59
- <stop offset="0%" style="stop-color:var(--vis-color0);stop-opacity:1" />
60
- <stop offset="100%" style="stop-color:var(--vis-color0);stop-opacity:0" />
71
+ `;
72
+ }, n = (i, o) => {
73
+ var r;
74
+ return `
75
+ <linearGradient id="gradient${i}-${o}" gradientTransform="rotate(90)">
76
+
77
+ ${((r = t.gradientStops) == null ? void 0 : r.map(
78
+ (l) => `
79
+ <stop offset="${l.offset}" style="stop-color:var(${o});stop-opacity:${l.stopOpacity}" />
80
+ `
81
+ ).join("")) ?? ""}
61
82
  </linearGradient>
62
83
  `;
63
- return g.value.map(
64
- (t, a) => t != null && t.includes("#") ? l(a, t) : r(a, t ?? B)
84
+ };
85
+ return f.value.map(
86
+ (i, o) => i != null && i.includes("#") ? e(o, i) : n(o, i ?? $)
65
87
  ).join("");
66
88
  });
67
- function E(l) {
68
- var r;
89
+ function S(e) {
90
+ var n;
69
91
  return {
70
- y: (t) => Number(t[l]),
71
- color: ((r = n.categories[l]) == null ? void 0 : r.color) ?? B
92
+ y: (i) => Number(i[e]),
93
+ color: ((n = t.categories[e]) == null ? void 0 : n.color) ?? $
72
94
  };
73
95
  }
74
- function W(l) {
75
- return typeof window > "u" ? "" : T.value ? T.value.innerHTML : "";
96
+ function j(e) {
97
+ return typeof window > "u" ? "" : k.value ? k.value.innerHTML : "";
76
98
  }
77
- function S(l) {
78
- return s.value = l, W();
99
+ function N(e) {
100
+ return p.value = e, j();
79
101
  }
80
- return (l, r) => (o(), m("div", {
81
- style: h({
102
+ return (e, n) => (s(), c("div", {
103
+ style: g({
82
104
  display: "flex",
83
- flexDirection: O.value ? "column-reverse" : "column",
105
+ flexDirection: F.value ? "column-reverse" : "column",
84
106
  gap: "var(--vis-legend-spacing)"
85
107
  }),
86
- class: R({ markers: !!n.markerConfig }),
87
- onClick: r[0] || (r[0] = (t) => F("click", t, s.value))
108
+ class: w({ markers: !!t.markerConfig }),
109
+ onClick: n[0] || (n[0] = (i) => B("click", i, p.value))
88
110
  }, [
89
- u(i(q), {
111
+ m(a(q), {
90
112
  data: e.data,
91
113
  height: e.height,
92
114
  padding: e.padding,
93
- "svg-defs": P.value + G.value,
115
+ "svg-defs": P.value + V.value,
94
116
  "y-domain": e.yDomain,
95
117
  "x-domain": e.xDomain
96
118
  }, {
97
119
  default: z(() => [
98
- e.hideTooltip ? c("", !0) : (o(), y(i(J), {
120
+ e.hideTooltip ? d("", !0) : (s(), y(a(J), {
99
121
  key: 0,
100
- "horizontal-placement": i(C).Right,
101
- "vertical-placement": i(C).Top
122
+ "horizontal-placement": a(L).Right,
123
+ "vertical-placement": a(L).Top
102
124
  }, null, 8, ["horizontal-placement", "vertical-placement"])),
103
- (o(!0), m(x, null, Y(Object.keys(n.categories), (t, a) => (o(), m(x, { key: t }, [
104
- u(i(Q), p({
105
- x: (k, v) => v
106
- }, { ref_for: !0 }, E(t), {
107
- color: `url(#gradient${a}-${g.value[a]})`,
108
- opacity: ne,
109
- "curve-type": e.curveType ?? i(D).MonotoneX
110
- }), null, 16, ["x", "color", "curve-type"]),
111
- u(i(Z), {
112
- x: (k, v) => v,
113
- y: (k) => k[t],
114
- color: g.value[a],
115
- "curve-type": e.curveType ?? i(D).MonotoneX,
125
+ (s(!0), c(v, null, R(Object.keys(t.categories), (i, o) => (s(), c(v, { key: i }, [
126
+ m(a(K), h({
127
+ x: (r, l) => l,
128
+ ref_for: !0
129
+ }, S(i), {
130
+ color: `url(#gradient${o}-${f.value[o]})`,
131
+ opacity: e.hideArea ? 0 : ie,
132
+ "curve-type": e.curveType ?? a(C).MonotoneX
133
+ }), null, 16, ["x", "color", "opacity", "curve-type"]),
134
+ m(a(Q), {
135
+ x: (r, l) => l,
136
+ y: (r) => r[i],
137
+ color: f.value[o],
138
+ "curve-type": e.curveType ?? a(C).MonotoneX,
116
139
  "line-width": e.lineWidth,
117
- lineDashArray: e.lineDashArray ? e.lineDashArray[a] : void 0
140
+ lineDashArray: e.lineDashArray ? e.lineDashArray[o] : void 0
118
141
  }, null, 8, ["x", "y", "color", "curve-type", "line-width", "lineDashArray"])
119
142
  ], 64))), 128)),
120
- e.hideXAxis ? c("", !0) : (o(), y(i(A), {
143
+ e.hideXAxis ? d("", !0) : (s(), y(a(A), {
121
144
  key: 1,
122
145
  type: "x",
123
146
  label: e.xLabel,
@@ -130,7 +153,7 @@ const ie = {
130
153
  "tick-line": e.xTickLine,
131
154
  "min-max-ticks-only": e.minMaxTicksOnly
132
155
  }, null, 8, ["label", "num-ticks", "tick-format", "tick-values", "grid-line", "domain-line", "tick-line", "min-max-ticks-only"])),
133
- e.hideYAxis ? c("", !0) : (o(), y(i(A), {
156
+ e.hideYAxis ? d("", !0) : (s(), y(a(A), {
134
157
  key: 2,
135
158
  type: "y",
136
159
  label: e.yLabel,
@@ -140,41 +163,44 @@ const ie = {
140
163
  "domain-line": e.yDomainLine,
141
164
  "tick-line": e.yTickLine
142
165
  }, null, 8, ["label", "num-ticks", "tick-format", "grid-line", "domain-line", "tick-line"])),
143
- e.hideTooltip ? c("", !0) : (o(), y(i(_), p({ key: 3 }, e.crosshairConfig, { template: S }), null, 16))
166
+ e.hideTooltip ? d("", !0) : (s(), y(a(Z), h({ key: 3 }, e.crosshairConfig, { template: N }), null, 16))
144
167
  ]),
145
168
  _: 1
146
169
  }, 8, ["data", "height", "padding", "svg-defs", "y-domain", "x-domain"]),
147
- n.hideLegend ? c("", !0) : (o(), m("div", {
170
+ t.hideLegend ? d("", !0) : (s(), c("div", {
148
171
  key: 0,
149
- style: h({
172
+ style: g({
150
173
  display: "flex",
151
- justifyContent: N.value
174
+ justifyContent: G.value
152
175
  })
153
176
  }, [
154
- u(i(ee), {
155
- style: h([
156
- n.legendStyle,
177
+ m(a(I), {
178
+ style: g([
179
+ t.legendStyle,
157
180
  "display: flex; gap: var(--vis-legend-spacing);"
158
181
  ]),
159
- items: Object.values(n.categories)
182
+ items: Object.values(t.categories).map((i) => ({
183
+ ...i,
184
+ color: Array.isArray(i.color) ? i.color[0] : i.color
185
+ }))
160
186
  }, null, 8, ["style", "items"])
161
187
  ], 4)),
162
- X("div", ie, [
163
- i($).tooltip ? L(l.$slots, "tooltip", {
188
+ X("div", ee, [
189
+ a(O).tooltip ? T(e.$slots, "tooltip", {
164
190
  key: 0,
165
- values: s.value
166
- }) : s.value ? L(l.$slots, "fallback", { key: 1 }, () => [
167
- u(K, {
168
- data: s.value,
191
+ values: p.value
192
+ }) : p.value ? T(e.$slots, "fallback", { key: 1 }, () => [
193
+ m(H, {
194
+ data: p.value,
169
195
  categories: e.categories,
170
- toolTipTitle: i(H)(s.value) ?? "",
171
- yFormatter: n.yFormatter
196
+ toolTipTitle: a(U)(p.value) ?? "",
197
+ yFormatter: t.yFormatter
172
198
  }, null, 8, ["data", "categories", "toolTipTitle", "yFormatter"])
173
- ]) : c("", !0)
199
+ ]) : d("", !0)
174
200
  ], 512)
175
201
  ], 6));
176
202
  }
177
203
  });
178
204
  export {
179
- de as default
205
+ se as default
180
206
  };
@@ -57,6 +57,17 @@ export interface AreaChartProps<T> {
57
57
  * See `CurveType` for available options.
58
58
  */
59
59
  curveType?: CurveType;
60
+ /**
61
+ * If `true`, hides the area fill, displaying only the line.
62
+ */
63
+ hideArea?: boolean;
64
+ /**
65
+ * Edit the gradient stops for the area fill.
66
+ */
67
+ gradientStops?: Array<{
68
+ offset: string;
69
+ stopOpacity: number;
70
+ }>;
60
71
  /**
61
72
  * The width of the line in pixels. Default is 2px.
62
73
  */
@@ -1,14 +1,14 @@
1
- import { defineComponent as W, useSlots as X, useTemplateRef as Y, ref as j, computed as k, createElementBlock as v, openBlock as l, normalizeStyle as L, createVNode as b, createCommentVNode as f, createElementVNode as H, unref as a, withCtx as $, createBlock as c, Fragment as q, renderList as I, renderSlot as C } from "vue";
2
- import { Orientation as g, StackedBar as U, GroupedBar as J } from "@unovis/ts";
1
+ import { defineComponent as W, useSlots as X, useTemplateRef as Y, ref as j, computed as f, createElementBlock as v, openBlock as n, normalizeStyle as L, createVNode as k, createCommentVNode as y, createElementVNode as H, unref as i, withCtx as $, createBlock as u, Fragment as q, renderList as I, renderSlot as P } from "vue";
2
+ import { Orientation as p, StackedBar as U, GroupedBar as J } from "@unovis/ts";
3
3
  import { getFirstPropertyValue as K } from "../../utils.js";
4
4
  import { useStackedGrouped as Q } from "./stackedGroupedUtils.js";
5
- import { VisXYContainer as Z, VisXYLabels as _, VisTooltip as ee, VisStackedBar as F, VisGroupedBar as te, VisAxis as V, VisBulletLegend as ae } from "@unovis/vue";
6
- import ie from "../Tooltip.js";
7
- import { LegendPosition as ne } from "../../types.js";
8
- const oe = {
5
+ import { VisXYContainer as Z, VisXYLabels as _, VisTooltip as ee, VisStackedBar as C, VisGroupedBar as ae, VisAxis as F, VisBulletLegend as ie } from "@unovis/vue";
6
+ import oe from "../Tooltip.js";
7
+ import { LegendPosition as re } from "../../types.js";
8
+ const te = {
9
9
  ref: "slotWrapper",
10
10
  style: { display: "none" }
11
- }, ye = /* @__PURE__ */ W({
11
+ }, ge = /* @__PURE__ */ W({
12
12
  __name: "BarChart",
13
13
  props: {
14
14
  data: {},
@@ -35,8 +35,8 @@ const oe = {
35
35
  radius: {},
36
36
  hideLegend: { type: Boolean, default: !1 },
37
37
  hideTooltip: { type: Boolean, default: !1 },
38
- orientation: { default: g.Vertical },
39
- legendPosition: { default: ne.BottomCenter },
38
+ orientation: { default: p.Vertical },
39
+ legendPosition: { default: re.BottomCenter },
40
40
  legendStyle: { default: void 0 },
41
41
  xDomainLine: { type: Boolean },
42
42
  yDomainLine: { type: Boolean },
@@ -52,111 +52,111 @@ const oe = {
52
52
  xAxis: {}
53
53
  },
54
54
  emits: ["click"],
55
- setup(e, { emit: G }) {
56
- const S = G, t = e, O = X(), h = Y("slotWrapper"), u = j();
57
- if (t.valueLabel && !t.xAxis)
55
+ setup(V, { emit: G }) {
56
+ const S = G, a = V, O = X(), h = Y("slotWrapper"), s = j();
57
+ if (a.valueLabel && !a.xAxis)
58
58
  throw new Error(
59
59
  "BarChart: 'xAxis' prop is required when 'valueLabel' is enabled. Please provide an 'xAxis' to display value labels."
60
60
  );
61
- if (!t.yAxis || t.yAxis.length === 0)
61
+ if (!a.yAxis || a.yAxis.length === 0)
62
62
  throw new Error("yAxis is required");
63
- const A = k(() => t.yAxis.map((i) => (o) => o[i])), B = (i, o) => {
64
- var n;
65
- return (n = Object.values(t.categories)[o]) == null ? void 0 : n.color;
66
- }, y = k(
63
+ const x = f(() => a.yAxis.map((e) => (r) => r[e])), A = (e, r) => {
64
+ var o;
65
+ return (o = Object.values(a.categories)[r]) == null ? void 0 : o.color;
66
+ }, c = f(
67
67
  () => Q({
68
- data: t.data,
69
- categories: t.categories,
70
- stackAndGrouped: t.stackAndGrouped,
71
- xAxis: t.xAxis,
72
- spacing: t.stackedGroupedSpacing
68
+ data: a.data,
69
+ categories: a.categories,
70
+ stackAndGrouped: a.stackAndGrouped,
71
+ xAxis: a.xAxis,
72
+ spacing: a.stackedGroupedSpacing
73
73
  }).value
74
- ), w = k(() => t.legendPosition.startsWith("top")), D = k(() => t.legendPosition.includes("left") ? "flex-start" : t.legendPosition.includes("right") ? "flex-end" : "center");
75
- function T(i) {
76
- return u.value = i, E();
74
+ ), w = f(() => a.legendPosition.startsWith("top")), D = f(() => a.legendPosition.includes("left") ? "flex-start" : a.legendPosition.includes("right") ? "flex-end" : "center");
75
+ function B(e) {
76
+ return s.value = e, E();
77
77
  }
78
- function E(i) {
78
+ function E(e) {
79
79
  return typeof window > "u" ? "" : h.value ? h.value.innerHTML : "";
80
80
  }
81
- const P = t.yAxis.map((i) => (o) => o[i]), N = P.length, z = t.data.flatMap(
82
- (i, o) => P.map((n, s) => ({
83
- x: o,
84
- y: Number(n(i) ?? 0),
85
- itemIndex: s
81
+ const T = a.yAxis.map((e) => (r) => r[e]), N = T.length, z = a.data.flatMap(
82
+ (e, r) => T.map((o, d) => ({
83
+ x: r,
84
+ y: Number(o(e) ?? 0),
85
+ itemIndex: d
86
86
  }))
87
- ), M = (i) => {
88
- if (t.stacked || t.stackAndGrouped) return i.x;
89
- const o = N;
90
- if (o <= 1) return i.x;
91
- const s = 1 - (t.groupPadding ?? 0), m = s / o, x = -s / 2, r = m * i.itemIndex + m / 2, p = 1 - (t.barPadding ?? 0), R = (x + r) * p;
92
- return i.x + R;
87
+ ), M = (e) => {
88
+ if (a.stacked || a.stackAndGrouped) return e.x;
89
+ const r = N;
90
+ if (r <= 1) return e.x;
91
+ const d = 1 - (a.groupPadding ?? 0), g = d / r, m = -d / 2, t = g * e.itemIndex + g / 2, b = 1 - (a.barPadding ?? 0), R = (m + t) * b;
92
+ return e.x + R;
93
93
  };
94
- return (i, o) => (l(), v("div", {
94
+ return (e, r) => (n(), v("div", {
95
95
  style: L({
96
96
  display: "flex",
97
97
  flexDirection: w.value ? "column-reverse" : "column",
98
98
  gap: "var(--vis-legend-spacing)"
99
99
  }),
100
- onClick: o[0] || (o[0] = (n) => S("click", n, u.value))
100
+ onClick: r[0] || (r[0] = (o) => S("click", o, s.value))
101
101
  }, [
102
- b(a(Z), {
102
+ k(i(Z), {
103
103
  padding: e.padding,
104
104
  height: e.height
105
105
  }, {
106
106
  default: $(() => {
107
- var n, s, m, x;
107
+ var o, d, g, m;
108
108
  return [
109
- e.valueLabel ? (l(), c(a(_), {
109
+ e.valueLabel ? (n(), u(i(_), {
110
110
  key: 0,
111
- data: a(z),
111
+ data: i(z),
112
112
  x: M,
113
- y: (r) => {
114
- var d;
115
- return r.y + (((d = t.valueLabel) == null ? void 0 : d.labelSpacing) ?? 0);
113
+ y: (t) => {
114
+ var l;
115
+ return t.y + (((l = a.valueLabel) == null ? void 0 : l.labelSpacing) ?? 0);
116
116
  },
117
- label: (n = t.valueLabel) == null ? void 0 : n.label,
118
- backgroundColor: ((s = t.valueLabel) == null ? void 0 : s.backgroundColor) ?? "transparent",
119
- color: ((m = t.valueLabel) == null ? void 0 : m.color) ?? "red",
120
- labelFontSize: (x = t.valueLabel) == null ? void 0 : x.labelFontSize
121
- }, null, 8, ["data", "y", "label", "backgroundColor", "color", "labelFontSize"])) : f("", !0),
122
- b(a(ee), {
117
+ label: (o = a.valueLabel) == null ? void 0 : o.label,
118
+ backgroundColor: ((d = a.valueLabel) == null ? void 0 : d.backgroundColor) ?? "transparent",
119
+ color: ((g = a.valueLabel) == null ? void 0 : g.color) ?? "red",
120
+ labelFontSize: (m = a.valueLabel) == null ? void 0 : m.labelFontSize
121
+ }, null, 8, ["data", "y", "label", "backgroundColor", "color", "labelFontSize"])) : y("", !0),
122
+ k(i(ee), {
123
123
  triggers: {
124
- [a(J).selectors.bar]: T,
125
- [a(U).selectors.bar]: T
124
+ [i(J).selectors.bar]: B,
125
+ [i(U).selectors.bar]: B
126
126
  }
127
127
  }, null, 8, ["triggers"]),
128
- e.stackAndGrouped ? (l(!0), v(q, { key: 1 }, I(y.value.states, (r) => (l(), c(a(F), {
129
- key: r,
130
- data: y.value.chartData,
131
- x: (d, p) => p + y.value.positions[r],
132
- y: y.value.bars[r],
133
- color: y.value.colorFunctions[r],
128
+ e.stackAndGrouped ? (n(!0), v(q, { key: 1 }, I(c.value.states, (t) => (n(), u(i(C), {
129
+ key: t,
130
+ data: c.value.chartData,
131
+ x: (l, b) => b + c.value.positions[t],
132
+ y: c.value.bars[t],
133
+ color: c.value.colorFunctions[t],
134
134
  "rounded-corners": e.radius ?? 0,
135
135
  "group-padding": e.groupPadding ?? 0,
136
136
  "bar-padding": e.barPadding,
137
- orientation: e.orientation ?? a(g).Vertical
138
- }, null, 8, ["data", "x", "y", "color", "rounded-corners", "group-padding", "bar-padding", "orientation"]))), 128)) : e.stacked ? (l(), c(a(F), {
137
+ orientation: e.orientation ?? i(p).Vertical
138
+ }, null, 8, ["data", "x", "y", "color", "rounded-corners", "group-padding", "bar-padding", "orientation"]))), 128)) : e.stacked ? (n(), u(i(C), {
139
139
  key: 3,
140
140
  data: e.data,
141
- x: (r, d) => d,
142
- y: A.value,
143
- color: B,
141
+ x: (t, l) => l,
142
+ y: x.value,
143
+ color: A,
144
144
  "rounded-corners": e.radius ?? 0,
145
145
  "group-padding": e.groupPadding ?? 0,
146
146
  "bar-padding": e.barPadding ?? 0.2,
147
- orientation: e.orientation ?? a(g).Vertical
148
- }, null, 8, ["data", "x", "y", "rounded-corners", "group-padding", "bar-padding", "orientation"])) : (l(), c(a(te), {
147
+ orientation: e.orientation ?? i(p).Vertical
148
+ }, null, 8, ["data", "x", "y", "rounded-corners", "group-padding", "bar-padding", "orientation"])) : (n(), u(i(ae), {
149
149
  key: 2,
150
150
  data: e.data,
151
- x: (r, d) => d,
152
- y: A.value,
153
- color: B,
151
+ x: (t, l) => l,
152
+ y: x.value,
153
+ color: A,
154
154
  "rounded-corners": e.radius ?? 0,
155
155
  "group-padding": e.groupPadding ?? 0,
156
156
  "bar-padding": e.barPadding ?? 0.2,
157
- orientation: e.orientation ?? a(g).Vertical
157
+ orientation: e.orientation ?? i(p).Vertical
158
158
  }, null, 8, ["data", "x", "y", "rounded-corners", "group-padding", "bar-padding", "orientation"])),
159
- e.hideXAxis ? f("", !0) : (l(), c(a(V), {
159
+ e.hideXAxis ? y("", !0) : (n(), u(i(F), {
160
160
  key: 4,
161
161
  type: "x",
162
162
  "tick-format": e.xFormatter,
@@ -168,11 +168,11 @@ const oe = {
168
168
  "tick-values": e.xExplicitTicks,
169
169
  minMaxTicksOnly: e.minMaxTicksOnly
170
170
  }, null, 8, ["tick-format", "label", "grid-line", "domain-line", "tick-line", "num-ticks", "tick-values", "minMaxTicksOnly"])),
171
- e.hideYAxis ? f("", !0) : (l(), c(a(V), {
171
+ e.hideYAxis ? y("", !0) : (n(), u(i(F), {
172
172
  key: 5,
173
173
  type: "y",
174
174
  label: e.yLabel,
175
- "grid-line": e.orientation !== a(g).Horizontal && e.yGridLine,
175
+ "grid-line": e.orientation !== i(p).Horizontal && e.yGridLine,
176
176
  "domain-line": !!e.yDomainLine,
177
177
  "tick-format": e.yFormatter,
178
178
  "num-ticks": e.yNumTicks,
@@ -182,40 +182,40 @@ const oe = {
182
182
  }),
183
183
  _: 1
184
184
  }, 8, ["padding", "height"]),
185
- t.hideLegend ? f("", !0) : (l(), v("div", {
185
+ a.hideLegend ? y("", !0) : (n(), v("div", {
186
186
  key: 0,
187
187
  style: L({
188
188
  display: "flex",
189
189
  justifyContent: D.value
190
190
  })
191
191
  }, [
192
- b(a(ae), {
192
+ k(i(ie), {
193
193
  style: L([
194
- t.legendStyle,
194
+ a.legendStyle,
195
195
  "display: flex; gap: var(--vis-legend-spacing);"
196
196
  ]),
197
- items: Object.values(t.categories).map((n) => ({
198
- ...n,
199
- color: Array.isArray(n.color) ? n.color[0] : n.color
197
+ items: Object.values(a.categories).map((o) => ({
198
+ ...o,
199
+ color: Array.isArray(o.color) ? o.color[0] : o.color
200
200
  }))
201
201
  }, null, 8, ["style", "items"])
202
202
  ], 4)),
203
- H("div", oe, [
204
- a(O).tooltip ? C(i.$slots, "tooltip", {
203
+ H("div", te, [
204
+ i(O).tooltip ? P(e.$slots, "tooltip", {
205
205
  key: 0,
206
- values: u.value
207
- }) : u.value ? C(i.$slots, "fallback", { key: 1 }, () => [
208
- b(ie, {
209
- data: u.value,
210
- categories: t.categories,
211
- toolTipTitle: a(K)(u.value) ?? "",
212
- yFormatter: t.orientation === a(g).Horizontal ? t.xFormatter : t.yFormatter
206
+ values: s.value
207
+ }) : s.value ? P(e.$slots, "fallback", { key: 1 }, () => [
208
+ k(oe, {
209
+ data: s.value,
210
+ categories: a.categories,
211
+ toolTipTitle: i(K)(s.value) ?? "",
212
+ yFormatter: a.orientation === i(p).Horizontal ? a.xFormatter : a.yFormatter
213
213
  }, null, 8, ["data", "categories", "toolTipTitle", "yFormatter"])
214
- ]) : f("", !0)
214
+ ]) : y("", !0)
215
215
  ], 512)
216
216
  ], 4));
217
217
  }
218
218
  });
219
219
  export {
220
- ye as default
220
+ ge as default
221
221
  };