vlite3 1.4.25 → 1.4.26
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/components/Chart/BarChart.vue.d.ts +1 -1
- package/components/Chart/ChartLegend.vue.d.ts +22 -0
- package/components/Chart/ChartLegend.vue.js +91 -0
- package/components/Chart/ChartLegend.vue2.js +4 -0
- package/components/Chart/GanttChart.vue.d.ts +2 -2
- package/components/Chart/LineChart.vue.d.ts +5 -2
- package/components/Chart/LineChart.vue.js +1 -1
- package/components/Chart/LineChart.vue2.js +40 -39
- package/components/Chart/PieChart.vue.d.ts +11 -4
- package/components/Chart/PieChart.vue.js +118 -114
- package/components/Chart/SegmentBarChart.vue.d.ts +1 -1
- package/components/Chart/TimelineChart.vue.d.ts +2 -2
- package/components/Chart/index.d.ts +2 -1
- package/components/Chart/types.d.ts +25 -0
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Heatmap/Heatmap.vue.d.ts +1 -1
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
- package/components/Stats/StatItem.vue.d.ts +2 -0
- package/components/Stats/StatItem.vue.js +234 -134
- package/components/Stats/Stats.vue.d.ts +1 -0
- package/components/Stats/Stats.vue.js +45 -41
- package/components/Stats/components/StatTrend.vue.js +35 -32
- package/components/Stats/types.d.ts +32 -2
- package/index.js +138 -136
- package/package.json +1 -1
- package/style.css +1 -1
- /package/components/Dropdown/{DropdownMenu.vue3.js → DropdownMenu.vue2.js} +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { CHART_COLORS as
|
|
3
|
-
|
|
1
|
+
import { defineComponent as re, ref as B, onMounted as ue, watch as de, onUnmounted as ce, computed as d, openBlock as i, createElementBlock as s, normalizeClass as W, createElementVNode as u, unref as T, Fragment as D, renderList as N, createCommentVNode as f, toDisplayString as x, renderSlot as ve, createBlock as Z, Teleport as fe, normalizeStyle as _, createTextVNode as he } from "vue";
|
|
2
|
+
import { CHART_COLORS as me, getColor as ge, arcPath as xe, formatNumber as E, animateProgress as ye } from "./utils.js";
|
|
3
|
+
import be from "./ChartLegend.vue.js";
|
|
4
|
+
const Me = ["width", "height"], ke = ["id"], we = ["filter"], pe = ["d", "fill", "transform", "opacity", "onMouseenter"], $e = {
|
|
4
5
|
key: 0,
|
|
5
6
|
style: { "pointer-events": "none" }
|
|
6
|
-
},
|
|
7
|
+
}, Le = ["d", "opacity"], ze = ["x", "y", "text-anchor", "font-size", "font-weight", "fill", "opacity"], Pe = { key: 2 }, Ae = ["x", "y"], Ve = ["x", "y"], Ce = { class: "flex items-center gap-1.5 mb-1" }, Re = { class: "text-xs font-semibold" }, Se = { class: "text-xs text-muted-foreground" }, Be = { class: "font-medium text-foreground ml-1" }, He = /* @__PURE__ */ re({
|
|
7
8
|
__name: "PieChart",
|
|
8
9
|
props: {
|
|
9
10
|
data: {},
|
|
@@ -13,59 +14,72 @@ const ye = { class: "shrink-0" }, ge = ["width", "height"], be = ["id"], Me = ["
|
|
|
13
14
|
startAngle: { default: -90 },
|
|
14
15
|
showLegend: { type: Boolean, default: !0 },
|
|
15
16
|
legendPosition: { default: "right" },
|
|
17
|
+
legendsVariant: { default: "default" },
|
|
16
18
|
labelMode: { default: "percent" },
|
|
17
|
-
colors: { default: () =>
|
|
19
|
+
colors: { default: () => me },
|
|
18
20
|
animate: { type: Boolean, default: !0 },
|
|
19
21
|
showTooltip: { type: Boolean, default: !0 },
|
|
20
22
|
centerLabel: {},
|
|
21
23
|
centerValue: {}
|
|
22
24
|
},
|
|
23
25
|
setup(e) {
|
|
24
|
-
const
|
|
25
|
-
let
|
|
26
|
-
function
|
|
27
|
-
|
|
26
|
+
const t = e, H = Math.random().toString(36).slice(2, 7), w = B(t.animate ? 0 : 1);
|
|
27
|
+
let p = null;
|
|
28
|
+
function I() {
|
|
29
|
+
p?.(), w.value = 0, p = ye(1e3, (l) => w.value = l);
|
|
28
30
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}),
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
ue(() => {
|
|
32
|
+
t.animate && I();
|
|
33
|
+
}), de(
|
|
34
|
+
() => t.data,
|
|
35
|
+
() => {
|
|
36
|
+
t.animate && I();
|
|
37
|
+
},
|
|
38
|
+
{ deep: !0 }
|
|
39
|
+
), ce(() => p?.());
|
|
40
|
+
const O = d(() => t.labelMode === "outside"), h = d(() => t.size / 2), c = d(() => t.size / 2), m = d(() => t.size / 2 - (O.value ? 36 : 4)), X = d(() => t.donut ? m.value * (t.innerRadius / 100) : 0), $ = d(() => t.data.reduce((l, a) => l + a.value, 0) || 1), ee = d(() => t.legendPosition === "bottom" ? t.legendsVariant === "variant2" ? "flex flex-col items-stretch gap-5 w-full" : "inline-flex flex-col items-center gap-4" : "inline-flex flex-row items-center gap-6"), M = d(() => {
|
|
41
|
+
let l = t.startAngle;
|
|
42
|
+
return t.data.map((a, o) => {
|
|
43
|
+
const n = a.value / $.value, g = n * 360 * w.value, L = a.color ?? ge(t.colors, o), y = l, z = l + g;
|
|
44
|
+
l += n * 360;
|
|
45
|
+
const Y = (y + z) / 2 * (Math.PI / 180), k = Math.cos(Y), P = Math.sin(Y), A = k >= 0, j = m.value * 0.65 + X.value * 0.35;
|
|
46
|
+
let F = h.value + j * k, U = c.value + j * P, q = "middle", G = 0, J = 0, V = 0, C = 0, R = 0, S = 0, K = "";
|
|
47
|
+
if (O.value) {
|
|
48
|
+
const Q = m.value + 20, se = 14;
|
|
49
|
+
G = h.value + m.value * k, J = c.value + m.value * P, V = h.value + Q * k, C = c.value + Q * P, R = V + se * (A ? 1 : -1), S = C, K = `M ${G},${J} L ${V},${C} L ${R},${S}`, F = R + 5 * (A ? 1 : -1), U = S, q = A ? "start" : "end";
|
|
44
50
|
}
|
|
45
|
-
const
|
|
51
|
+
const ie = xe(h.value, c.value, m.value, y, z, X.value);
|
|
46
52
|
let b = "";
|
|
47
|
-
return
|
|
53
|
+
return t.labelMode === "percent" ? b = `${Math.round(n * 100)}%` : t.labelMode === "value" ? b = E(a.value) : t.labelMode === "label" ? b = a.label : t.labelMode === "outside" && (b = `${E(a.value)} (${Math.round(n * 100)}%)`), { d: a, path: ie, color: L, lx: F, ly: U, label: b, pct: n, startA: y, endA: z, leaderPath: K, textAnchor: q };
|
|
48
54
|
});
|
|
49
|
-
}),
|
|
50
|
-
function
|
|
51
|
-
|
|
55
|
+
}), v = B(null), r = B(null);
|
|
56
|
+
function te(l, a) {
|
|
57
|
+
v.value = a, t.showTooltip && (r.value = { x: l.clientX, y: l.clientY, item: M.value[a] });
|
|
52
58
|
}
|
|
53
|
-
function
|
|
54
|
-
r.value && (r.value = { ...r.value, x:
|
|
59
|
+
function le(l) {
|
|
60
|
+
r.value && (r.value = { ...r.value, x: l.clientX, y: l.clientY });
|
|
55
61
|
}
|
|
56
|
-
function
|
|
57
|
-
|
|
62
|
+
function oe() {
|
|
63
|
+
v.value = null, r.value = null;
|
|
58
64
|
}
|
|
59
|
-
function
|
|
60
|
-
|
|
61
|
-
const l = (n + t) / 2 * (Math.PI / 180), c = 8, C = Math.cos(l) * c, g = Math.sin(l) * c;
|
|
62
|
-
return `translate(${C}, ${g})`;
|
|
65
|
+
function ne(l) {
|
|
66
|
+
v.value = l;
|
|
63
67
|
}
|
|
64
|
-
|
|
65
|
-
|
|
68
|
+
function ae(l, a, o) {
|
|
69
|
+
if (v.value !== l) return "";
|
|
70
|
+
const n = (a + o) / 2 * (Math.PI / 180), g = 8, L = Math.cos(n) * g, y = Math.sin(n) * g;
|
|
71
|
+
return `translate(${L}, ${y})`;
|
|
72
|
+
}
|
|
73
|
+
return (l, a) => (i(), s("div", {
|
|
74
|
+
class: W(["vlite-pie-chart select-none", ee.value])
|
|
66
75
|
}, [
|
|
67
|
-
u("div",
|
|
68
|
-
|
|
76
|
+
u("div", {
|
|
77
|
+
class: W([
|
|
78
|
+
"shrink-0",
|
|
79
|
+
e.legendPosition === "bottom" && e.legendsVariant === "variant2" ? "self-center" : ""
|
|
80
|
+
])
|
|
81
|
+
}, [
|
|
82
|
+
(i(), s("svg", {
|
|
69
83
|
width: e.size,
|
|
70
84
|
height: e.size,
|
|
71
85
|
role: "img",
|
|
@@ -74,130 +88,120 @@ const ye = { class: "shrink-0" }, ge = ["width", "height"], be = ["id"], Me = ["
|
|
|
74
88
|
}, [
|
|
75
89
|
u("defs", null, [
|
|
76
90
|
u("filter", {
|
|
77
|
-
id: `shadow-${
|
|
91
|
+
id: `shadow-${T(H)}`,
|
|
78
92
|
x: "-20%",
|
|
79
93
|
y: "-20%",
|
|
80
94
|
width: "140%",
|
|
81
95
|
height: "140%"
|
|
82
|
-
}, [...
|
|
96
|
+
}, [...a[0] || (a[0] = [
|
|
83
97
|
u("feDropShadow", {
|
|
84
98
|
dx: "0",
|
|
85
99
|
dy: "2",
|
|
86
100
|
stdDeviation: "3",
|
|
87
101
|
"flood-opacity": "0.12"
|
|
88
102
|
}, null, -1)
|
|
89
|
-
])], 8,
|
|
103
|
+
])], 8, ke)
|
|
90
104
|
]),
|
|
91
105
|
u("g", {
|
|
92
|
-
filter: `url(#shadow-${
|
|
106
|
+
filter: `url(#shadow-${T(H)})`
|
|
93
107
|
}, [
|
|
94
|
-
(
|
|
95
|
-
key:
|
|
96
|
-
d:
|
|
97
|
-
fill:
|
|
98
|
-
transform:
|
|
108
|
+
(i(!0), s(D, null, N(M.value, (o, n) => (i(), s("path", {
|
|
109
|
+
key: n,
|
|
110
|
+
d: o.path,
|
|
111
|
+
fill: o.color,
|
|
112
|
+
transform: ae(n, o.startA, o.endA),
|
|
99
113
|
class: "cursor-pointer transition-transform duration-200",
|
|
114
|
+
opacity: v.value !== null && v.value !== n ? 0.55 : 1,
|
|
100
115
|
stroke: "var(--color-background)",
|
|
101
116
|
"stroke-width": "2",
|
|
102
|
-
onMouseenter: (
|
|
103
|
-
onMousemove:
|
|
104
|
-
onMouseleave:
|
|
105
|
-
}, null, 40,
|
|
106
|
-
], 8,
|
|
107
|
-
e.labelMode === "outside" ? (
|
|
108
|
-
(
|
|
109
|
-
key: `leader-${
|
|
110
|
-
d:
|
|
117
|
+
onMouseenter: (g) => te(g, n),
|
|
118
|
+
onMousemove: le,
|
|
119
|
+
onMouseleave: oe
|
|
120
|
+
}, null, 40, pe))), 128))
|
|
121
|
+
], 8, we),
|
|
122
|
+
e.labelMode === "outside" ? (i(), s("g", $e, [
|
|
123
|
+
(i(!0), s(D, null, N(M.value, (o, n) => (i(), s("path", {
|
|
124
|
+
key: `leader-${n}`,
|
|
125
|
+
d: o.leaderPath,
|
|
111
126
|
fill: "none",
|
|
112
127
|
stroke: "var(--color-muted-foreground)",
|
|
113
128
|
"stroke-width": "1",
|
|
114
129
|
"stroke-linecap": "round",
|
|
115
130
|
"stroke-linejoin": "round",
|
|
116
|
-
opacity:
|
|
117
|
-
}, null, 8,
|
|
118
|
-
])) :
|
|
119
|
-
e.labelMode !== "none" ? (
|
|
120
|
-
key: `lbl-${
|
|
121
|
-
x:
|
|
122
|
-
y:
|
|
123
|
-
"text-anchor": e.labelMode === "outside" ?
|
|
131
|
+
opacity: o.pct > 0.02 ? 0.5 : 0
|
|
132
|
+
}, null, 8, Le))), 128))
|
|
133
|
+
])) : f("", !0),
|
|
134
|
+
e.labelMode !== "none" ? (i(!0), s(D, { key: 1 }, N(M.value, (o, n) => (i(), s("text", {
|
|
135
|
+
key: `lbl-${n}`,
|
|
136
|
+
x: o.lx,
|
|
137
|
+
y: o.ly,
|
|
138
|
+
"text-anchor": e.labelMode === "outside" ? o.textAnchor : "middle",
|
|
124
139
|
"dominant-baseline": "middle",
|
|
125
140
|
"font-size": e.labelMode === "outside" ? 11.5 : 11,
|
|
126
141
|
"font-weight": e.labelMode === "outside" ? "500" : "600",
|
|
127
142
|
fill: e.labelMode === "outside" ? "var(--color-foreground)" : "white",
|
|
128
|
-
opacity:
|
|
129
|
-
},
|
|
130
|
-
e.donut ? (
|
|
131
|
-
|
|
132
|
-
total:
|
|
143
|
+
opacity: o.pct > 0.04 ? 1 : 0
|
|
144
|
+
}, x(o.label), 9, ze))), 128)) : f("", !0),
|
|
145
|
+
e.donut ? (i(), s("g", Pe, [
|
|
146
|
+
ve(l.$slots, "center", {
|
|
147
|
+
total: $.value,
|
|
133
148
|
data: e.data
|
|
134
149
|
}, () => [
|
|
135
|
-
e.centerValue ? (
|
|
150
|
+
e.centerValue ? (i(), s("text", {
|
|
136
151
|
key: 0,
|
|
137
|
-
x:
|
|
138
|
-
y: e.centerLabel ?
|
|
152
|
+
x: h.value,
|
|
153
|
+
y: e.centerLabel ? c.value - 8 : c.value,
|
|
139
154
|
"text-anchor": "middle",
|
|
140
155
|
"dominant-baseline": "central",
|
|
141
156
|
"font-size": "22",
|
|
142
157
|
"font-weight": "700",
|
|
143
158
|
class: "fill-foreground"
|
|
144
|
-
},
|
|
145
|
-
e.centerLabel ? (
|
|
159
|
+
}, x(e.centerValue), 9, Ae)) : f("", !0),
|
|
160
|
+
e.centerLabel ? (i(), s("text", {
|
|
146
161
|
key: 1,
|
|
147
|
-
x:
|
|
148
|
-
y:
|
|
162
|
+
x: h.value,
|
|
163
|
+
y: c.value + (e.centerValue ? 14 : 0),
|
|
149
164
|
"text-anchor": "middle",
|
|
150
165
|
"dominant-baseline": "middle",
|
|
151
166
|
"font-size": "12",
|
|
152
167
|
class: "fill-muted-foreground"
|
|
153
|
-
},
|
|
168
|
+
}, x(e.centerLabel), 9, Ve)) : f("", !0)
|
|
154
169
|
])
|
|
155
|
-
])) :
|
|
156
|
-
], 8,
|
|
157
|
-
]),
|
|
158
|
-
e.showLegend ? (
|
|
170
|
+
])) : f("", !0)
|
|
171
|
+
], 8, Me))
|
|
172
|
+
], 2),
|
|
173
|
+
e.showLegend ? (i(), Z(be, {
|
|
159
174
|
key: 0,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
class: "w-2.5 h-2.5 rounded-sm shrink-0",
|
|
171
|
-
style: I({ backgroundColor: t.color ?? M(_)(e.colors, l) })
|
|
172
|
-
}, null, 4),
|
|
173
|
-
u("div", Ce, [
|
|
174
|
-
u("div", Re, d(t.label), 1),
|
|
175
|
-
u("div", Se, d(M(z)(t.value)) + " (" + d(Math.round(t.value / P.value * 100)) + "%) ", 1)
|
|
176
|
-
])
|
|
177
|
-
], 40, Pe))), 128))
|
|
178
|
-
], 2)) : h("", !0),
|
|
179
|
-
(s(), ce(ve, { to: "body" }, [
|
|
180
|
-
r.value ? (s(), i("div", {
|
|
175
|
+
data: e.data,
|
|
176
|
+
total: $.value,
|
|
177
|
+
colors: e.colors,
|
|
178
|
+
"legends-variant": e.legendsVariant,
|
|
179
|
+
"legend-position": e.legendPosition,
|
|
180
|
+
"hovered-index": v.value,
|
|
181
|
+
onHover: ne
|
|
182
|
+
}, null, 8, ["data", "total", "colors", "legends-variant", "legend-position", "hovered-index"])) : f("", !0),
|
|
183
|
+
(i(), Z(fe, { to: "body" }, [
|
|
184
|
+
r.value ? (i(), s("div", {
|
|
181
185
|
key: 0,
|
|
182
186
|
class: "vlite-chart-tooltip",
|
|
183
|
-
style:
|
|
187
|
+
style: _({ left: `${r.value.x + 12}px`, top: `${r.value.y - 10}px` })
|
|
184
188
|
}, [
|
|
185
|
-
u("div",
|
|
189
|
+
u("div", Ce, [
|
|
186
190
|
u("span", {
|
|
187
191
|
class: "w-2.5 h-2.5 rounded-sm shrink-0",
|
|
188
|
-
style:
|
|
192
|
+
style: _({ backgroundColor: r.value.item.color })
|
|
189
193
|
}, null, 4),
|
|
190
|
-
u("span",
|
|
194
|
+
u("span", Re, x(r.value.item.d.label), 1)
|
|
191
195
|
]),
|
|
192
|
-
u("div",
|
|
193
|
-
|
|
194
|
-
u("span",
|
|
196
|
+
u("div", Se, [
|
|
197
|
+
he(x(T(E)(r.value.item.d.value)) + " ", 1),
|
|
198
|
+
u("span", Be, " (" + x(Math.round(r.value.item.pct * 100)) + "%) ", 1)
|
|
195
199
|
])
|
|
196
|
-
], 4)) :
|
|
200
|
+
], 4)) : f("", !0)
|
|
197
201
|
]))
|
|
198
202
|
], 2));
|
|
199
203
|
}
|
|
200
204
|
});
|
|
201
205
|
export {
|
|
202
|
-
|
|
206
|
+
He as default
|
|
203
207
|
};
|
|
@@ -13,8 +13,8 @@ export interface SegmentBarChartProps {
|
|
|
13
13
|
declare const _default: import('vue').DefineComponent<SegmentBarChartProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SegmentBarChartProps> & Readonly<{}>, {
|
|
14
14
|
animate: boolean;
|
|
15
15
|
colors: string[];
|
|
16
|
-
showLabels: boolean;
|
|
17
16
|
showTooltip: boolean;
|
|
17
|
+
showLabels: boolean;
|
|
18
18
|
barRadius: number;
|
|
19
19
|
showValues: boolean;
|
|
20
20
|
barHeight: number;
|
|
@@ -14,9 +14,9 @@ declare const _default: import('vue').DefineComponent<TimelineChartProps, {}, {}
|
|
|
14
14
|
animate: boolean;
|
|
15
15
|
height: number;
|
|
16
16
|
colors: string[];
|
|
17
|
-
showLabels: boolean;
|
|
18
|
-
showTooltip: boolean;
|
|
19
17
|
showGrid: boolean;
|
|
18
|
+
showTooltip: boolean;
|
|
19
|
+
showLabels: boolean;
|
|
20
20
|
barRadius: number;
|
|
21
21
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
22
22
|
containerRef: HTMLDivElement;
|
|
@@ -9,4 +9,5 @@ export { default as SegmentBarChart } from './SegmentBarChart.vue';
|
|
|
9
9
|
export { default as StatCardChart } from './StatCardChart.vue';
|
|
10
10
|
export { default as WaffleChart } from './WaffleChart.vue';
|
|
11
11
|
export { default as GanttChart } from './GanttChart.vue';
|
|
12
|
-
export type { ChartDataPoint, ChartDataset, LineChartProps, BarChartProps, PieChartProps, CircleChartProps, GaugeChartProps, GaugeVariant, GaugeZone, SpeedometerChartProps, SpeedometerVariant, TimelineChartProps, TimelineTask, SegmentBarChartProps, StatCardChartProps, StatCardItem, WaffleChartProps, GanttChartProps, GanttTask, GanttViewMode, } from './types';
|
|
12
|
+
export type { ChartDataPoint, ChartDataset, ChartLegendsVariant, LegendPosition, LineChartProps, BarChartProps, PieChartProps, CircleChartProps, GaugeChartProps, GaugeVariant, GaugeZone, SpeedometerChartProps, SpeedometerVariant, TimelineChartProps, TimelineTask, SegmentBarChartProps, StatCardChartProps, StatCardItem, WaffleChartProps, GanttChartProps, GanttTask, GanttViewMode, } from './types';
|
|
13
|
+
export { default as ChartLegend } from './ChartLegend.vue';
|
|
@@ -27,6 +27,14 @@ export interface LineChartProps {
|
|
|
27
27
|
showDots?: boolean;
|
|
28
28
|
/** Show background gridlines */
|
|
29
29
|
showGrid?: boolean;
|
|
30
|
+
/** Show X-axis line */
|
|
31
|
+
showXAxis?: boolean;
|
|
32
|
+
/** Show Y-axis line */
|
|
33
|
+
showYAxis?: boolean;
|
|
34
|
+
/** Show X-axis tick labels */
|
|
35
|
+
showXLabels?: boolean;
|
|
36
|
+
/** Show Y-axis tick labels */
|
|
37
|
+
showYLabels?: boolean;
|
|
30
38
|
/** Show legend (multi-series) */
|
|
31
39
|
showLegend?: boolean;
|
|
32
40
|
/** Enable hover tooltip */
|
|
@@ -45,6 +53,14 @@ export interface LineChartProps {
|
|
|
45
53
|
yMin?: number;
|
|
46
54
|
/** Y-axis max override */
|
|
47
55
|
yMax?: number;
|
|
56
|
+
/** Line stroke width */
|
|
57
|
+
lineWidth?: number;
|
|
58
|
+
/** Top stop opacity for the area fill gradient (0–1) */
|
|
59
|
+
fillOpacity?: number;
|
|
60
|
+
/** Gridline opacity 0–1 */
|
|
61
|
+
gridOpacity?: number;
|
|
62
|
+
/** Axis line opacity 0–1 */
|
|
63
|
+
axisOpacity?: number;
|
|
48
64
|
}
|
|
49
65
|
export interface BarChartProps {
|
|
50
66
|
/** Single-series data points */
|
|
@@ -78,6 +94,13 @@ export interface BarChartProps {
|
|
|
78
94
|
}
|
|
79
95
|
export type PieLabelMode = 'percent' | 'value' | 'label' | 'none' | 'outside';
|
|
80
96
|
export type LegendPosition = 'right' | 'bottom';
|
|
97
|
+
/**
|
|
98
|
+
* Pie/donut legend layout presets.
|
|
99
|
+
* - `default` — original two-line items (label + value)
|
|
100
|
+
* - `variant1` — compact horizontal wrap: "Label (value, pct%)"
|
|
101
|
+
* - `variant2` — vertical rows with value/pct aligned right
|
|
102
|
+
*/
|
|
103
|
+
export type ChartLegendsVariant = 'default' | 'variant1' | 'variant2';
|
|
81
104
|
export interface PieChartProps {
|
|
82
105
|
/** Chart data */
|
|
83
106
|
data: ChartDataPoint[];
|
|
@@ -93,6 +116,8 @@ export interface PieChartProps {
|
|
|
93
116
|
showLegend?: boolean;
|
|
94
117
|
/** Legend position */
|
|
95
118
|
legendPosition?: LegendPosition;
|
|
119
|
+
/** Legend layout preset (backward compatible — defaults to `default`) */
|
|
120
|
+
legendsVariant?: ChartLegendsVariant;
|
|
96
121
|
/** What to show on each slice */
|
|
97
122
|
labelMode?: PieLabelMode;
|
|
98
123
|
/** Custom color palette */
|
|
@@ -8,9 +8,9 @@ declare const _default: import('vue').DefineComponent<HeatmapProps, {}, {}, {},
|
|
|
8
8
|
}>, {
|
|
9
9
|
class: string;
|
|
10
10
|
layout: import('./types').HeatmapLayout;
|
|
11
|
+
showLegend: boolean;
|
|
11
12
|
minValue: number;
|
|
12
13
|
maxValue: number;
|
|
13
|
-
showLegend: boolean;
|
|
14
14
|
showLabels: boolean;
|
|
15
15
|
interactive: boolean;
|
|
16
16
|
responsive: boolean;
|
|
@@ -6,6 +6,7 @@ declare const _default: import('vue').DefineComponent<SidebarMenuProps, {}, {},
|
|
|
6
6
|
items: SidebarMenuItemSchema[];
|
|
7
7
|
allowMultiple: boolean;
|
|
8
8
|
iconSize: string;
|
|
9
|
+
showTooltip: boolean;
|
|
9
10
|
mobileBreakpoint: "sm" | "md" | "lg" | "xl" | "none";
|
|
10
11
|
menuOffset: [number, number];
|
|
11
12
|
indentSize: number;
|
|
@@ -19,7 +20,6 @@ declare const _default: import('vue').DefineComponent<SidebarMenuProps, {}, {},
|
|
|
19
20
|
compactItemPadding: string;
|
|
20
21
|
nestedMenuWidth: string;
|
|
21
22
|
nestedMenuMaxHeight: string;
|
|
22
|
-
showTooltip: boolean;
|
|
23
23
|
forceTreeView: boolean;
|
|
24
24
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLElement>;
|
|
25
25
|
export default _default;
|
|
@@ -10,12 +10,14 @@ type __VLS_Props = {
|
|
|
10
10
|
iconSize?: string;
|
|
11
11
|
iconBoxShape?: IconBoxShape;
|
|
12
12
|
iconBoxStyle?: IconBoxStyle;
|
|
13
|
+
sparklineHeight?: number;
|
|
13
14
|
};
|
|
14
15
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
16
|
variant: StatsVariant;
|
|
16
17
|
loading: boolean;
|
|
17
18
|
layout: StatsLayout;
|
|
18
19
|
attached: boolean;
|
|
20
|
+
sparklineHeight: number;
|
|
19
21
|
iconBoxShape: IconBoxShape;
|
|
20
22
|
iconBoxStyle: IconBoxStyle;
|
|
21
23
|
iconSize: string;
|