vue-chrts 0.1.12-test.0 → 0.2.0-beta.1

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,18 @@
1
- import { defineComponent as x, computed as c, createApp as A, createElementBlock as b, openBlock as t, normalizeClass as L, createVNode as p, createCommentVNode as m, unref as i, withCtx as V, createBlock as l } from "vue";
2
- import { Orientation as s, StackedBar as P, GroupedBar as O } from "@unovis/ts";
3
- import { VisXYContainer as C, VisTooltip as F, VisGroupedBar as G, VisStackedBar as N, VisAxis as T, VisBulletLegend as j } from "@unovis/vue";
4
- import w from "../Tooltip.js";
5
- import { LegendPosition as E } from "../../types.js";
6
- const H = /* @__PURE__ */ x({
1
+ import { defineComponent as $, useSlots as S, useTemplateRef as z, ref as H, computed as u, createElementBlock as y, openBlock as d, normalizeClass as B, createVNode as p, createCommentVNode as g, createElementVNode as W, unref as a, withCtx as X, createBlock as m, Fragment as Y, renderSlot as P } from "vue";
2
+ import { Orientation as l, StackedBar as R, GroupedBar as q } from "@unovis/ts";
3
+ import { getFirstPropertyValue as U } from "../../utils.js";
4
+ import { VisXYContainer as I, VisTooltip as J, VisStackedBar as k, VisGroupedBar as K, VisAxis as V, VisBulletLegend as Q } from "@unovis/vue";
5
+ import Z from "../Tooltip.js";
6
+ import { LegendPosition as _ } from "../../types.js";
7
+ const ee = {
8
+ ref: "slotWrapper",
9
+ class: "hidden"
10
+ }, de = /* @__PURE__ */ $({
7
11
  __name: "BarChart",
8
12
  props: {
9
13
  data: {},
10
14
  stacked: { type: Boolean },
15
+ stackAndGrouped: { type: Boolean },
11
16
  height: {},
12
17
  xLabel: {},
13
18
  yLabel: {},
@@ -20,16 +25,17 @@ const H = /* @__PURE__ */ x({
20
25
  categories: {},
21
26
  xFormatter: {},
22
27
  yFormatter: {},
23
- yNumTicks: { default: (a) => a.data.length > 24 ? 24 / 4 : a.data.length - 1 },
28
+ yNumTicks: { default: (r) => r.data.length > 24 ? 24 / 4 : r.data.length - 1 },
24
29
  minMaxTicksOnly: { type: Boolean },
25
- xNumTicks: { default: (a) => a.data.length > 24 ? 24 / 4 : a.data.length - 1 },
30
+ xNumTicks: { default: (r) => r.data.length > 24 ? 24 / 4 : r.data.length - 1 },
26
31
  xExplicitTicks: {},
27
32
  yAxis: {},
28
33
  groupPadding: {},
29
34
  barPadding: {},
30
35
  radius: {},
31
36
  hideLegend: { type: Boolean },
32
- orientation: { default: s.Vertical },
37
+ hideTooltip: { type: Boolean, default: !1 },
38
+ orientation: { default: l.Vertical },
33
39
  legendPosition: {},
34
40
  xDomainLine: { type: Boolean },
35
41
  yDomainLine: { type: Boolean },
@@ -40,67 +46,103 @@ const H = /* @__PURE__ */ x({
40
46
  hideXAxis: { type: Boolean },
41
47
  hideYAxis: { type: Boolean }
42
48
  },
43
- setup(a) {
44
- const n = a;
45
- if (!n.yAxis || n.yAxis.length === 0)
49
+ emits: ["click"],
50
+ setup(r, { emit: A }) {
51
+ const C = A, o = r, G = S(), f = z("slotWrapper"), s = H();
52
+ if (!o.yAxis || o.yAxis.length === 0)
46
53
  throw new Error("yAxis is required");
47
- const y = c(() => n.yAxis.map((e) => (o) => o[e])), g = (e, o) => Object.values(n.categories)[o].color, k = c(
48
- () => n.legendPosition === E.Top
49
- ), f = c(() => (e, o) => {
50
- if (typeof window > "u" || typeof document > "u")
51
- return "";
52
- const u = Object.keys(n.categories), B = Object.keys(e).find((r) => !u.includes(r));
53
- try {
54
- const r = A(w, {
55
- data: e,
56
- categories: n.categories,
57
- toolTipTitle: e[B],
58
- yFormatter: n.yFormatter
59
- }), h = document.createElement("div");
60
- r.mount(h);
61
- const v = h.innerHTML;
62
- return r.unmount(), v;
63
- } catch {
64
- return "";
65
- }
66
- });
67
- return (e, o) => (t(), b("div", {
68
- class: L(["flex flex-col space-y-4", { "flex-col-reverse": k.value }])
54
+ const b = u(() => o.yAxis.map((e) => (i) => i[e])), h = (e, i) => {
55
+ var t;
56
+ return (t = Object.values(o.categories)[i]) == null ? void 0 : t.color;
57
+ }, D = u(() => Object.values(o.categories).slice(0, 4).map((e) => e.color)), F = u(() => Object.values(o.categories).slice(4, 8).map((e) => e.color)), O = (e, i) => D.value[i] ?? "#ccc", N = (e, i) => F.value[i] ?? "#eee", v = u(
58
+ () => o.legendPosition === _.Top
59
+ );
60
+ function T(e) {
61
+ return s.value = e, j();
62
+ }
63
+ function j(e) {
64
+ return typeof window > "u" ? "" : f.value ? f.value.innerHTML : "";
65
+ }
66
+ const w = u(() => o.stackAndGrouped ? Object.keys(o.data[0]).filter((e) => e !== "month") : []), x = (e) => {
67
+ const i = ["Done", "Pending"];
68
+ return e.map((t) => ({
69
+ month: t.month,
70
+ ...w.value.flatMap(
71
+ (n) => i.map((c) => ({
72
+ [`${n}${c}`]: t[n][c.toLowerCase()]
73
+ }))
74
+ ).reduce((n, c) => ({ ...n, ...c }), {})
75
+ }));
76
+ }, L = u(() => o.stackAndGrouped ? x(o.data) : o.data), M = [
77
+ (e) => e.desktopDone,
78
+ (e) => e.mobileDone,
79
+ (e) => e.androidDone,
80
+ (e) => e.iosDone
81
+ ], E = [
82
+ (e) => e.desktopPending,
83
+ (e) => e.mobilePending,
84
+ (e) => e.androidPending,
85
+ (e) => e.iosPending
86
+ ];
87
+ return (e, i) => (d(), y("div", {
88
+ class: B(["flex flex-col space-y-4", { "flex-col-reverse": v.value }]),
89
+ onClick: i[0] || (i[0] = (t) => C("click", t, s.value))
69
90
  }, [
70
- p(i(C), {
91
+ p(a(I), {
71
92
  padding: e.padding,
72
93
  height: e.height
73
94
  }, {
74
- default: V(() => [
75
- p(i(F), {
95
+ default: X(() => [
96
+ p(a(J), {
76
97
  triggers: {
77
- [i(O).selectors.bar]: f.value,
78
- [i(P).selectors.bar]: f.value
98
+ [a(q).selectors.bar]: T,
99
+ [a(R).selectors.bar]: T
79
100
  }
80
101
  }, null, 8, ["triggers"]),
81
- e.stacked ? (t(), l(i(N), {
82
- key: 1,
102
+ e.stackAndGrouped ? (d(), y(Y, { key: 0 }, [
103
+ p(a(k), {
104
+ data: L.value,
105
+ x: (t, n) => n - 0.2,
106
+ y: M,
107
+ color: O,
108
+ "rounded-corners": e.radius ?? 0,
109
+ "group-padding": e.groupPadding ?? 0,
110
+ "bar-padding": e.barPadding ?? 0.2,
111
+ orientation: e.orientation ?? a(l).Vertical
112
+ }, null, 8, ["data", "x", "rounded-corners", "group-padding", "bar-padding", "orientation"]),
113
+ p(a(k), {
114
+ data: L.value,
115
+ x: (t, n) => n + 0.2,
116
+ y: E,
117
+ color: N,
118
+ "rounded-corners": e.radius ?? 0,
119
+ "group-padding": e.groupPadding ?? 0,
120
+ "bar-padding": e.barPadding ?? 0.2,
121
+ orientation: e.orientation ?? a(l).Vertical
122
+ }, null, 8, ["data", "x", "rounded-corners", "group-padding", "bar-padding", "orientation"])
123
+ ], 64)) : e.stacked ? (d(), m(a(k), {
124
+ key: 2,
83
125
  data: e.data,
84
- x: (u, d) => d,
85
- y: y.value,
86
- color: g,
126
+ x: (t, n) => n,
127
+ y: b.value,
128
+ color: h,
87
129
  "rounded-corners": e.radius ?? 0,
88
130
  "group-padding": e.groupPadding ?? 0,
89
131
  "bar-padding": e.barPadding ?? 0.2,
90
- orientation: e.orientation ?? i(s).Vertical
91
- }, null, 8, ["data", "x", "y", "rounded-corners", "group-padding", "bar-padding", "orientation"])) : (t(), l(i(G), {
92
- key: 0,
132
+ orientation: e.orientation ?? a(l).Vertical
133
+ }, null, 8, ["data", "x", "y", "rounded-corners", "group-padding", "bar-padding", "orientation"])) : (d(), m(a(K), {
134
+ key: 1,
93
135
  data: e.data,
94
- x: (u, d) => d,
95
- y: y.value,
96
- color: g,
136
+ x: (t, n) => n,
137
+ y: b.value,
138
+ color: h,
97
139
  "rounded-corners": e.radius ?? 0,
98
140
  "group-padding": e.groupPadding ?? 0,
99
141
  "bar-padding": e.barPadding ?? 0.2,
100
- orientation: e.orientation ?? i(s).Vertical
142
+ orientation: e.orientation ?? a(l).Vertical
101
143
  }, null, 8, ["data", "x", "y", "rounded-corners", "group-padding", "bar-padding", "orientation"])),
102
- e.hideXAxis ? m("", !0) : (t(), l(i(T), {
103
- key: 2,
144
+ e.hideXAxis ? g("", !0) : (d(), m(a(V), {
145
+ key: 3,
104
146
  type: "x",
105
147
  "tick-format": e.xFormatter,
106
148
  label: e.xLabel,
@@ -111,11 +153,11 @@ const H = /* @__PURE__ */ x({
111
153
  "tick-values": e.xExplicitTicks,
112
154
  minMaxTicksOnly: e.minMaxTicksOnly
113
155
  }, null, 8, ["tick-format", "label", "grid-line", "domain-line", "tick-line", "num-ticks", "tick-values", "minMaxTicksOnly"])),
114
- e.hideYAxis ? m("", !0) : (t(), l(i(T), {
115
- key: 3,
156
+ e.hideYAxis ? g("", !0) : (d(), m(a(V), {
157
+ key: 4,
116
158
  type: "y",
117
159
  label: e.yLabel,
118
- "grid-line": e.orientation !== i(s).Horizontal && e.yGridLine,
160
+ "grid-line": e.orientation !== a(l).Horizontal && e.yGridLine,
119
161
  "domain-line": !!e.yDomainLine,
120
162
  "tick-format": e.yFormatter,
121
163
  "num-ticks": e.yNumTicks,
@@ -124,17 +166,30 @@ const H = /* @__PURE__ */ x({
124
166
  ]),
125
167
  _: 1
126
168
  }, 8, ["padding", "height"]),
127
- e.hideLegend ? m("", !0) : (t(), b("div", {
169
+ e.hideLegend ? g("", !0) : (d(), y("div", {
128
170
  key: 0,
129
- class: L(["flex items center justify-end", { "pb-4": k.value }])
171
+ class: B(["flex items center justify-end", { "pb-4": v.value }])
130
172
  }, [
131
- p(i(j), {
132
- items: Object.values(e.categories)
173
+ p(a(Q), {
174
+ items: Object.values(o.categories)
133
175
  }, null, 8, ["items"])
134
- ], 2))
176
+ ], 2)),
177
+ W("div", ee, [
178
+ a(G).tooltip ? P(e.$slots, "tooltip", {
179
+ key: 0,
180
+ values: s.value
181
+ }) : s.value ? P(e.$slots, "fallback", { key: 1 }, () => [
182
+ p(Z, {
183
+ data: s.value,
184
+ categories: o.categories,
185
+ toolTipTitle: a(U)(s.value) ?? "",
186
+ yFormatter: o.orientation === a(l).Horizontal ? o.xFormatter : o.yFormatter
187
+ }, null, 8, ["data", "categories", "toolTipTitle", "yFormatter"])
188
+ ]) : g("", !0)
189
+ ], 512)
135
190
  ], 2));
136
191
  }
137
192
  });
138
193
  export {
139
- H as default
194
+ de as default
140
195
  };
@@ -1,10 +1,17 @@
1
1
  import { BarChartProps } from './types';
2
2
  declare const _default: <T extends {}>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & BarChartProps<T> & Partial<{}>> & import('vue').PublicProps;
3
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
+ readonly onClick?: ((event: MouseEvent, values?: T | undefined) => any) | undefined;
5
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onClick"> & BarChartProps<T> & Partial<{}>> & import('vue').PublicProps;
4
6
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
5
7
  attrs: any;
6
- slots: {};
7
- emit: {};
8
+ slots: {
9
+ tooltip?(_: {
10
+ values: T | undefined;
11
+ }): any;
12
+ fallback?(_: {}): any;
13
+ };
14
+ emit: (e: "click", event: MouseEvent, values?: T) => void;
8
15
  }>) => import('vue').VNode & {
9
16
  __ctx?: Awaited<typeof __VLS_setup>;
10
17
  };
@@ -1,5 +1,5 @@
1
- import { BulletLegendItemInterface, Orientation, LegendPosition } from '../../types';
2
- export interface BarChartProps<T> {
1
+ import { BulletLegendItemInterface, Orientation, LegendPosition, axisFormatter } from '../../types';
2
+ export type BarChartProps<T> = {
3
3
  /**
4
4
  * The data to be displayed in the bar chart.
5
5
  * Each element of the array represents a data point.
@@ -10,6 +10,10 @@ export interface BarChartProps<T> {
10
10
  * If `true`, creates a stacked bar chart instead of grouped bars.
11
11
  */
12
12
  stacked?: boolean;
13
+ /**
14
+ * If `true`, creates a combination of stacked and grouped bar charts.
15
+ */
16
+ stackAndGrouped?: boolean;
13
17
  /**
14
18
  * The height of the chart in pixels.
15
19
  */
@@ -43,14 +47,14 @@ export interface BarChartProps<T> {
43
47
  * @param {(number[]|Date[])} ticks - An array of all tick values for the x-axis.
44
48
  * @returns {string} The formatted string representation of the tick.
45
49
  */
46
- xFormatter?: ((tick: number, i: number, ticks: number[]) => string) | ((tick: Date, i: number, ticks: Date[]) => string);
50
+ xFormatter?: axisFormatter;
47
51
  /**
48
52
  * @param {number|Date} tick - The value of the tick. This can be a number or a Date object depending on the scale of the y-axis.
49
53
  * @param {number} i - The index of the tick in the `ticks` array.
50
54
  * @param {(number[]|Date[])} ticks - An array of all tick values for the y-axis.
51
55
  * @returns {string} The formatted string representation of the tick.
52
56
  */
53
- yFormatter?: ((tick: number, i: number, ticks: number[]) => string) | ((tick: Date, i: number, ticks: Date[]) => string);
57
+ yFormatter?: axisFormatter;
54
58
  /**
55
59
  * The desired number of ticks on the y-axis.
56
60
  */
@@ -87,6 +91,10 @@ export interface BarChartProps<T> {
87
91
  * If `true`, hides the chart legend.
88
92
  */
89
93
  hideLegend?: boolean;
94
+ /**
95
+ * If `true`, hides the chart tooltip.
96
+ */
97
+ hideTooltip?: boolean;
90
98
  /**
91
99
  * The orientation of the bars (vertical or horizontal).
92
100
  * See `Orientation` for available options.
@@ -129,4 +137,4 @@ export interface BarChartProps<T> {
129
137
  * If `true`, hide the y-axis.
130
138
  */
131
139
  hideYAxis?: boolean;
132
- }
140
+ };
@@ -1,11 +1,14 @@
1
- import { defineComponent as u, createElementBlock as n, openBlock as i, Fragment as m, createElementVNode as f, createCommentVNode as p, createVNode as t, renderSlot as g, unref as o, withCtx as h } from "vue";
2
- import { Donut as v } from "@unovis/ts";
3
- import { VisSingleContainer as y, VisTooltip as V, VisDonut as b, VisBulletLegend as C } from "@unovis/vue";
4
- import { DonutType as _ } from "./types.js";
5
- const k = { class: "flex items-center justify-center" }, B = {
1
+ import { defineComponent as V, useSlots as b, useTemplateRef as D, ref as S, createElementBlock as d, openBlock as c, Fragment as T, createElementVNode as o, createCommentVNode as p, createVNode as r, renderSlot as a, unref as l, withCtx as w, normalizeStyle as B, toDisplayString as L } from "vue";
2
+ import { Donut as $ } from "@unovis/ts";
3
+ import { DonutType as H } from "./types.js";
4
+ import { VisSingleContainer as N, VisTooltip as W, VisDonut as _, VisBulletLegend as j } from "@unovis/vue";
5
+ const z = {
6
+ ref: "slotWrapper",
7
+ class: "hidden"
8
+ }, A = { class: "flex items-center" }, E = {
6
9
  key: 0,
7
10
  class: "flex items-center justify-center mt-4"
8
- }, w = /* @__PURE__ */ u({
11
+ }, q = /* @__PURE__ */ V({
9
12
  __name: "DonutChart",
10
13
  props: {
11
14
  type: {},
@@ -13,46 +16,68 @@ const k = { class: "flex items-center justify-center" }, B = {
13
16
  height: {},
14
17
  radius: {},
15
18
  hideLegend: { type: Boolean },
16
- labels: {}
19
+ labels: {},
20
+ padAngle: {}
17
21
  },
18
- setup(l) {
19
- const r = l, s = (e) => e, a = r.type === _.Half, d = {
20
- [v.selectors.segment]: (e) => `<div class='flex items-center'><div class='w-2 h-2 rounded-full mr-2' style='background-color: ${r.labels[e.index].color} ;'></div>
21
- <div>${e.data}</div>
22
- </vistooltip>
23
- </vissinglecontainer>
24
- </div>`
25
- };
26
- return (e, D) => (i(), n(m, null, [
27
- f("div", k, [
28
- t(o(y), {
22
+ emits: ["click"],
23
+ setup(f, { emit: m }) {
24
+ const g = m, n = f, h = b(), i = D("slotWrapper"), t = S(), v = (e) => e, y = n.type === H.Half;
25
+ function k(e) {
26
+ return t.value = e, C();
27
+ }
28
+ function C(e) {
29
+ return typeof window > "u" ? "" : i.value ? i.value.innerHTML : "";
30
+ }
31
+ return (e, u) => (c(), d(T, null, [
32
+ o("div", {
33
+ class: "flex items-center justify-center",
34
+ onClick: u[0] || (u[0] = (s) => g("click", s, t.value))
35
+ }, [
36
+ r(l(N), {
29
37
  data: e.data,
30
38
  height: e.height,
31
39
  margin: {}
32
40
  }, {
33
- default: h(() => [
34
- t(o(V), {
41
+ default: w(() => [
42
+ r(l(W), {
35
43
  "horizontal-shift": 20,
36
44
  "vertical-shift": 20,
37
- triggers: d
38
- }),
39
- t(o(b), {
40
- value: s,
45
+ triggers: {
46
+ [l($).selectors.segment]: k
47
+ }
48
+ }, null, 8, ["triggers"]),
49
+ r(l(_), {
50
+ value: v,
41
51
  "corner-radius": e.radius,
42
- color: r.labels.map((c) => c.color),
43
- "angle-range": a ? [-1.5707963267948966, 1.5707963267948966] : []
44
- }, null, 8, ["corner-radius", "color", "angle-range"])
52
+ color: n.labels.map((s) => s.color),
53
+ "angle-range": y ? [-1.5707963267948966, 1.5707963267948966] : [],
54
+ "pad-angle": n.padAngle || 0
55
+ }, null, 8, ["corner-radius", "color", "angle-range", "pad-angle"])
45
56
  ]),
46
57
  _: 1
47
58
  }, 8, ["data", "height"]),
48
- g(e.$slots, "default")
59
+ a(e.$slots, "default"),
60
+ o("div", z, [
61
+ l(h).tooltip ? a(e.$slots, "tooltip", {
62
+ key: 0,
63
+ values: t.value
64
+ }) : t.value ? a(e.$slots, "fallback", { key: 1 }, () => [
65
+ o("div", A, [
66
+ o("div", {
67
+ class: "w-2 h-2 rounded-full mr-2",
68
+ style: B(`background-color: ${n.labels[t.value.index].color} ;`)
69
+ }, null, 4),
70
+ o("div", null, L(t.value.data), 1)
71
+ ])
72
+ ]) : p("", !0)
73
+ ], 512)
49
74
  ]),
50
- e.hideLegend ? p("", !0) : (i(), n("div", B, [
51
- t(o(C), { items: e.labels }, null, 8, ["items"])
75
+ e.hideLegend ? p("", !0) : (c(), d("div", E, [
76
+ r(l(j), { items: e.labels }, null, 8, ["items"])
52
77
  ]))
53
78
  ], 64));
54
79
  }
55
80
  });
56
81
  export {
57
- w as default
82
+ q as default
58
83
  };
@@ -1,18 +1,22 @@
1
1
  import { DonutChartProps } from './types';
2
- declare function __VLS_template(): {
3
- attrs: Partial<{}>;
2
+ declare const _default: <T extends {}>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
+ readonly onClick?: ((event: MouseEvent, values?: any) => any) | undefined;
5
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onClick"> & DonutChartProps & Partial<{}>> & import('vue').PublicProps;
6
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
7
+ attrs: any;
4
8
  slots: {
5
9
  default?(_: {}): any;
10
+ tooltip?(_: {
11
+ values: any;
12
+ }): any;
13
+ fallback?(_: {}): any;
6
14
  };
7
- refs: {};
8
- rootEl: any;
15
+ emit: (e: "click", event: MouseEvent, values?: any) => void;
16
+ }>) => import('vue').VNode & {
17
+ __ctx?: Awaited<typeof __VLS_setup>;
9
18
  };
10
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
- declare const __VLS_component: import('vue').DefineComponent<DonutChartProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DonutChartProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
12
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
13
19
  export default _default;
14
- type __VLS_WithTemplateSlots<T, S> = T & {
15
- new (): {
16
- $slots: S;
17
- };
18
- };
20
+ type __VLS_PrettifyLocal<T> = {
21
+ [K in keyof T]: T[K];
22
+ } & {};
@@ -1,4 +1,4 @@
1
- interface DonutChartProps {
1
+ export type DonutChartProps = {
2
2
  /**
3
3
  * The type of donut chart to render.
4
4
  * See `DonutType` for available options.
@@ -28,9 +28,13 @@ interface DonutChartProps {
28
28
  name: string;
29
29
  color: string;
30
30
  }[];
31
- }
31
+ /**
32
+ * Pad angle. Default: 0
33
+ */
34
+ padAngle?: number;
35
+ };
32
36
  declare enum DonutType {
33
37
  Half = "half",
34
38
  Full = "full"
35
39
  }
36
- export { type DonutChartProps, DonutType };
40
+ export { DonutType };