vue-chrts 0.2.5-test.3 → 1.0.0-test.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.
- package/dist/components/AreaChart/AreaChart.js +49 -48
- package/dist/components/AreaChart/types.d.ts +11 -9
- package/dist/components/BarChart/BarChart.js +62 -57
- package/dist/components/BarChart/stackedGroupedUtils.d.ts +2 -3
- package/dist/components/BarChart/types.d.ts +9 -1
- package/dist/components/BubbleChart/BubbleChart.js +51 -49
- package/dist/components/BubbleChart/BubbleChart.vue.d.ts +1 -1
- package/dist/components/BubbleChart/types.d.ts +11 -17
- package/dist/components/DonutChart/DonutChart.js +53 -43
- package/dist/components/DonutChart/DonutChart.vue.d.ts +1 -1
- package/dist/components/DonutChart/types.d.ts +10 -12
- package/dist/components/LineChart/LineChart.js +11 -9
- package/dist/components/Timeline/Timeline.js +83 -63
- package/dist/components/Timeline/types.d.ts +95 -3
- package/dist/components/Tooltip.js +6 -6
- package/dist/types.d.ts +16 -11
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Scatter as
|
|
3
|
-
import { VisXYContainer as
|
|
4
|
-
import { LegendPosition as
|
|
5
|
-
import { getFirstPropertyValue as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as O, useSlots as S, useTemplateRef as D, ref as R, computed as f, createElementBlock as m, openBlock as l, normalizeStyle as c, createVNode as s, createCommentVNode as r, createElementVNode as w, unref as i, withCtx as K, createBlock as d, mergeProps as g, renderSlot as k } from "vue";
|
|
2
|
+
import { Scatter as M, Position as _ } from "@unovis/ts";
|
|
3
|
+
import { VisXYContainer as E, VisTooltip as G, VisScatter as W, VisAxis as x, VisBulletLegend as $ } from "@unovis/vue";
|
|
4
|
+
import { LegendPosition as j } from "../../types.js";
|
|
5
|
+
import { getFirstPropertyValue as X } from "../../utils.js";
|
|
6
|
+
import Y from "../Tooltip.js";
|
|
7
|
+
const q = {
|
|
8
8
|
ref: "slotWrapper",
|
|
9
9
|
class: "hidden"
|
|
10
|
-
},
|
|
10
|
+
}, ee = /* @__PURE__ */ O({
|
|
11
11
|
__name: "BubbleChart",
|
|
12
12
|
props: {
|
|
13
13
|
xAccessor: {},
|
|
@@ -28,7 +28,7 @@ const Y = {
|
|
|
28
28
|
categoryKey: {},
|
|
29
29
|
xFormatter: {},
|
|
30
30
|
yFormatter: {},
|
|
31
|
-
legendPosition: { default:
|
|
31
|
+
legendPosition: { default: j.BottomCenter },
|
|
32
32
|
legendStyle: { default: void 0 },
|
|
33
33
|
sizeOptions: {},
|
|
34
34
|
xDomainLine: { type: Boolean, default: !0 },
|
|
@@ -44,61 +44,63 @@ const Y = {
|
|
|
44
44
|
hideTooltip: { type: Boolean, default: !1 },
|
|
45
45
|
crosshairConfig: { default: () => ({
|
|
46
46
|
color: "#666"
|
|
47
|
-
}) }
|
|
47
|
+
}) },
|
|
48
|
+
xAxisConfig: {},
|
|
49
|
+
yAxisConfig: {}
|
|
48
50
|
},
|
|
49
51
|
emits: ["click"],
|
|
50
|
-
setup(
|
|
51
|
-
const e =
|
|
52
|
+
setup(L, { emit: T }) {
|
|
53
|
+
const e = L, h = S(), u = D("slotWrapper"), n = R(), v = e.xAccessor, b = e.yAccessor, B = e.sizeAccessor || ((t) => typeof t.comments == "number" ? t.comments : 1), A = (t) => {
|
|
52
54
|
var y, p;
|
|
53
55
|
if (!e.categories || !e.categoryKey)
|
|
54
56
|
return console.warn(
|
|
55
57
|
"BubbleChart: categories and categoryKey are required for color mapping"
|
|
56
58
|
), "#cccccc";
|
|
57
|
-
const
|
|
58
|
-
let o = (y = e.categories[
|
|
59
|
+
const a = String(t[e.categoryKey]);
|
|
60
|
+
let o = (y = e.categories[a]) == null ? void 0 : y.color;
|
|
59
61
|
return Object.keys(e.categories).length === 1 && (o = (p = e.categories[e.categoryKey]) == null ? void 0 : p.color), o || (console.warn(
|
|
60
|
-
`BubbleChart: No color defined for category "${
|
|
62
|
+
`BubbleChart: No color defined for category "${a}"`
|
|
61
63
|
), "#cccccc");
|
|
62
|
-
},
|
|
63
|
-
function
|
|
64
|
-
return
|
|
64
|
+
}, C = T;
|
|
65
|
+
function V(t) {
|
|
66
|
+
return n.value = t, F();
|
|
65
67
|
}
|
|
66
|
-
function
|
|
68
|
+
function F(t) {
|
|
67
69
|
return typeof window > "u" ? "" : u.value ? u.value.innerHTML : "";
|
|
68
70
|
}
|
|
69
|
-
const
|
|
70
|
-
[
|
|
71
|
-
}, z =
|
|
72
|
-
return (
|
|
71
|
+
const P = {
|
|
72
|
+
[M.selectors.point]: V
|
|
73
|
+
}, z = f(() => e.legendPosition.startsWith("top")), N = f(() => e.legendPosition.includes("left") ? "flex-start" : e.legendPosition.includes("right") ? "flex-end" : "center");
|
|
74
|
+
return (t, a) => (l(), m("div", {
|
|
73
75
|
style: c({
|
|
74
76
|
display: "flex",
|
|
75
77
|
flexDirection: z.value ? "column-reverse" : "column",
|
|
76
78
|
gap: "var(--vis-legend-spacing)"
|
|
77
79
|
})
|
|
78
80
|
}, [
|
|
79
|
-
s(
|
|
81
|
+
s(i(E), {
|
|
80
82
|
data: e.data,
|
|
81
83
|
height: e.height || 600,
|
|
82
84
|
padding: e.padding,
|
|
83
85
|
scaleByDomain: !0,
|
|
84
|
-
onClick:
|
|
86
|
+
onClick: a[0] || (a[0] = (o) => C("click", o, n.value))
|
|
85
87
|
}, {
|
|
86
|
-
default:
|
|
87
|
-
e.hideTooltip ? r("", !0) : (l(), d(
|
|
88
|
+
default: K(() => [
|
|
89
|
+
e.hideTooltip ? r("", !0) : (l(), d(i(G), {
|
|
88
90
|
key: 0,
|
|
89
|
-
triggers:
|
|
91
|
+
triggers: P
|
|
90
92
|
})),
|
|
91
|
-
s(
|
|
92
|
-
x:
|
|
93
|
-
y:
|
|
94
|
-
color:
|
|
95
|
-
size:
|
|
96
|
-
labelPosition: e.labelPosition ||
|
|
93
|
+
s(i(W), {
|
|
94
|
+
x: i(v),
|
|
95
|
+
y: i(b),
|
|
96
|
+
color: A,
|
|
97
|
+
size: i(B),
|
|
98
|
+
labelPosition: e.labelPosition || i(_).Bottom,
|
|
97
99
|
sizeRange: e.sizeRange || [1, 20],
|
|
98
100
|
opacity: e.opacity,
|
|
99
101
|
cursor: "pointer"
|
|
100
102
|
}, null, 8, ["x", "y", "size", "labelPosition", "sizeRange", "opacity"]),
|
|
101
|
-
e.hideXAxis ? r("", !0) : (l(), d(
|
|
103
|
+
e.hideXAxis ? r("", !0) : (l(), d(i(x), g({
|
|
102
104
|
key: 1,
|
|
103
105
|
type: "x",
|
|
104
106
|
label: e.xLabel,
|
|
@@ -109,8 +111,8 @@ const Y = {
|
|
|
109
111
|
numTicks: e.xNumTicks,
|
|
110
112
|
tickValues: e.xExplicitTicks,
|
|
111
113
|
minMaxTicksOnly: e.minMaxTicksOnly
|
|
112
|
-
}, null,
|
|
113
|
-
e.hideYAxis ? r("", !0) : (l(), d(
|
|
114
|
+
}, t.xAxisConfig), null, 16, ["label", "tickFormat", "gridLine", "domainLine", "tickLine", "numTicks", "tickValues", "minMaxTicksOnly"])),
|
|
115
|
+
e.hideYAxis ? r("", !0) : (l(), d(i(x), g({
|
|
114
116
|
key: 2,
|
|
115
117
|
type: "y",
|
|
116
118
|
label: e.yLabel,
|
|
@@ -119,18 +121,18 @@ const Y = {
|
|
|
119
121
|
domainLine: !!e.yDomainLine,
|
|
120
122
|
tickLine: e.yTickLine,
|
|
121
123
|
numTicks: e.yNumTicks
|
|
122
|
-
}, null,
|
|
124
|
+
}, t.yAxisConfig), null, 16, ["label", "tickFormat", "gridLine", "domainLine", "tickLine", "numTicks"]))
|
|
123
125
|
]),
|
|
124
126
|
_: 1
|
|
125
127
|
}, 8, ["data", "height", "padding"]),
|
|
126
|
-
e.hideLegend ? r("", !0) : (l(),
|
|
128
|
+
e.hideLegend ? r("", !0) : (l(), m("div", {
|
|
127
129
|
key: 0,
|
|
128
130
|
style: c({
|
|
129
131
|
display: "flex",
|
|
130
|
-
justifyContent:
|
|
132
|
+
justifyContent: N.value
|
|
131
133
|
})
|
|
132
134
|
}, [
|
|
133
|
-
s(
|
|
135
|
+
s(i($), {
|
|
134
136
|
class: "bulletLegendOverrides",
|
|
135
137
|
style: c([
|
|
136
138
|
e.legendStyle,
|
|
@@ -142,15 +144,15 @@ const Y = {
|
|
|
142
144
|
}))
|
|
143
145
|
}, null, 8, ["style", "items"])
|
|
144
146
|
], 4)),
|
|
145
|
-
|
|
146
|
-
|
|
147
|
+
w("div", q, [
|
|
148
|
+
i(h).tooltip ? k(t.$slots, "tooltip", {
|
|
147
149
|
key: 0,
|
|
148
|
-
values:
|
|
149
|
-
}) :
|
|
150
|
-
s(
|
|
151
|
-
data:
|
|
150
|
+
values: n.value
|
|
151
|
+
}) : n.value ? k(t.$slots, "fallback", { key: 1 }, () => [
|
|
152
|
+
s(Y, {
|
|
153
|
+
data: n.value,
|
|
152
154
|
categories: e.categories || {},
|
|
153
|
-
toolTipTitle:
|
|
155
|
+
toolTipTitle: i(X)(n.value) ?? "",
|
|
154
156
|
yFormatter: e.yFormatter
|
|
155
157
|
}, null, 8, ["data", "categories", "toolTipTitle", "yFormatter"])
|
|
156
158
|
]) : r("", !0)
|
|
@@ -159,5 +161,5 @@ const Y = {
|
|
|
159
161
|
}
|
|
160
162
|
});
|
|
161
163
|
export {
|
|
162
|
-
|
|
164
|
+
ee as default
|
|
163
165
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BubbleChartProps } from './types';
|
|
2
|
-
declare const _default: <T
|
|
2
|
+
declare const _default: <T>(__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
3
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
4
4
|
readonly onClick?: ((event: MouseEvent, values?: T | undefined) => any) | undefined;
|
|
5
5
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onClick"> & BubbleChartProps<T> & Partial<{}>> & import('vue').PublicProps;
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
import { axisFormatter, BulletLegendItemInterface, LegendPosition } from '../../types';
|
|
1
|
+
import { axisFormatter, BulletLegendItemInterface, LegendPosition, CrosshairConfig, AxisConfig } from '../../types';
|
|
2
2
|
import { NumericAccessor, Position } from '@unovis/ts';
|
|
3
|
-
export type DataRecord = {
|
|
4
|
-
species: string;
|
|
5
|
-
island: string;
|
|
6
|
-
beakLength: number | undefined;
|
|
7
|
-
beakDepth: number | undefined;
|
|
8
|
-
flipperLength: number | undefined;
|
|
9
|
-
bodyMass: number | undefined;
|
|
10
|
-
sex: string;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Configuration for bubble sizes.
|
|
14
|
-
*/
|
|
15
3
|
export interface SizeOptions {
|
|
16
4
|
minRadius?: number;
|
|
17
5
|
maxRadius?: number;
|
|
@@ -158,9 +146,15 @@ export interface BubbleChartProps<T> {
|
|
|
158
146
|
*/
|
|
159
147
|
hideTooltip?: boolean;
|
|
160
148
|
/**
|
|
161
|
-
*
|
|
149
|
+
* Crosshair configuration object for customizing the appearance of the crosshair line.
|
|
162
150
|
*/
|
|
163
|
-
crosshairConfig?:
|
|
164
|
-
|
|
165
|
-
|
|
151
|
+
crosshairConfig?: CrosshairConfig;
|
|
152
|
+
/**
|
|
153
|
+
* Axis configuration object for customizing the appearance of the axes.
|
|
154
|
+
*/
|
|
155
|
+
xAxisConfig?: AxisConfig;
|
|
156
|
+
/**
|
|
157
|
+
* Axis configuration object for customizing the appearance of the axes.
|
|
158
|
+
*/
|
|
159
|
+
yAxisConfig?: AxisConfig;
|
|
166
160
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Donut as
|
|
3
|
-
import { DonutType as
|
|
4
|
-
import { VisSingleContainer as
|
|
5
|
-
import { LegendPosition as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as L, useSlots as B, useTemplateRef as P, ref as T, computed as i, createElementBlock as g, openBlock as m, normalizeStyle as a, createVNode as s, createCommentVNode as f, renderSlot as u, createElementVNode as d, unref as r, withCtx as W, toDisplayString as w } from "vue";
|
|
2
|
+
import { Donut as R } from "@unovis/ts";
|
|
3
|
+
import { DonutType as j } from "./types.js";
|
|
4
|
+
import { VisSingleContainer as H, VisTooltip as N, VisDonut as $, VisBulletLegend as z } from "@unovis/vue";
|
|
5
|
+
import { LegendPosition as E } from "../../types.js";
|
|
6
|
+
const O = {
|
|
7
7
|
ref: "slotWrapper",
|
|
8
8
|
style: { display: "none" }
|
|
9
|
-
},
|
|
9
|
+
}, _ = { style: { display: "flex", "align-items": "center", padding: "10px 15px" } }, G = /* @__PURE__ */ L({
|
|
10
10
|
__name: "DonutChart",
|
|
11
11
|
props: {
|
|
12
12
|
type: {},
|
|
@@ -15,85 +15,95 @@ const E = {
|
|
|
15
15
|
height: {},
|
|
16
16
|
radius: {},
|
|
17
17
|
hideLegend: { type: Boolean },
|
|
18
|
-
legendPosition: { default:
|
|
18
|
+
legendPosition: { default: E.BottomCenter },
|
|
19
19
|
legendStyle: {},
|
|
20
|
-
|
|
20
|
+
categories: {},
|
|
21
21
|
padAngle: {}
|
|
22
22
|
},
|
|
23
23
|
emits: ["click"],
|
|
24
|
-
setup(
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
setup(v, { emit: y }) {
|
|
25
|
+
const h = y, t = v, k = B(), C = P("slotWrapper"), l = T(), V = (e) => e, b = t.type === j.Half, c = i(
|
|
26
|
+
() => Object.values(t.categories).map((e) => {
|
|
27
|
+
const o = e.color;
|
|
28
|
+
return Array.isArray(o) ? o[0] : o ?? "#3b82f6";
|
|
29
|
+
})
|
|
30
|
+
), x = i(
|
|
31
|
+
() => Object.values(t.categories).map((e) => ({
|
|
32
|
+
...e,
|
|
33
|
+
color: Array.isArray(e.color) ? e.color[0] : e.color ?? "#3b82f6"
|
|
34
|
+
}))
|
|
35
|
+
);
|
|
36
|
+
function A(e) {
|
|
37
|
+
l.value = e;
|
|
28
38
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const S = p(() => t.legendPosition.includes("top")), w = p(() => t.legendPosition.includes("left") ? "flex-start" : t.legendPosition.includes("right") ? "flex-end" : "center");
|
|
33
|
-
return (e, u) => (c(), g("div", {
|
|
34
|
-
style: o({
|
|
39
|
+
const S = i(() => t.legendPosition.includes("top")), D = i(() => t.legendPosition.includes("left") ? "flex-start" : t.legendPosition.includes("right") ? "flex-end" : "center");
|
|
40
|
+
return (e, o) => (m(), g("div", {
|
|
41
|
+
style: a({
|
|
35
42
|
display: "flex",
|
|
36
43
|
flexDirection: S.value ? "column-reverse" : "column",
|
|
37
44
|
gap: "var(--vis-legend-spacing)"
|
|
38
45
|
}),
|
|
39
|
-
onClick:
|
|
46
|
+
onClick: o[0] || (o[0] = (n) => h("click", n, l.value))
|
|
40
47
|
}, [
|
|
41
|
-
|
|
48
|
+
s(r(H), {
|
|
42
49
|
data: e.data,
|
|
43
50
|
height: e.height,
|
|
44
51
|
margin: {}
|
|
45
52
|
}, {
|
|
46
|
-
default:
|
|
47
|
-
|
|
53
|
+
default: W(() => [
|
|
54
|
+
s(r(N), {
|
|
48
55
|
"horizontal-shift": 20,
|
|
49
56
|
"vertical-shift": 20,
|
|
50
57
|
triggers: {
|
|
51
|
-
[
|
|
58
|
+
[r(R).selectors.segment]: (n) => {
|
|
59
|
+
var p;
|
|
60
|
+
return A(n), n ? (p = C.value) == null ? void 0 : p.innerHTML : "";
|
|
61
|
+
}
|
|
52
62
|
}
|
|
53
63
|
}, null, 8, ["triggers"]),
|
|
54
|
-
|
|
55
|
-
value:
|
|
64
|
+
s(r($), {
|
|
65
|
+
value: V,
|
|
56
66
|
"corner-radius": e.radius,
|
|
57
67
|
"arc-width": e.arcWidth ?? 20,
|
|
58
|
-
color:
|
|
59
|
-
"angle-range":
|
|
68
|
+
color: c.value,
|
|
69
|
+
"angle-range": b ? [-1.5707963267948966, 1.5707963267948966] : [],
|
|
60
70
|
"pad-angle": t.padAngle || 0
|
|
61
71
|
}, null, 8, ["corner-radius", "arc-width", "color", "angle-range", "pad-angle"])
|
|
62
72
|
]),
|
|
63
73
|
_: 1
|
|
64
74
|
}, 8, ["data", "height"]),
|
|
65
|
-
t.hideLegend ? f("", !0) : (
|
|
75
|
+
t.hideLegend ? f("", !0) : (m(), g("div", {
|
|
66
76
|
key: 0,
|
|
67
|
-
style:
|
|
77
|
+
style: a({
|
|
68
78
|
display: "flex",
|
|
69
|
-
justifyContent:
|
|
79
|
+
justifyContent: D.value
|
|
70
80
|
})
|
|
71
81
|
}, [
|
|
72
|
-
|
|
73
|
-
style:
|
|
82
|
+
s(r(z), {
|
|
83
|
+
style: a([
|
|
74
84
|
t.legendStyle,
|
|
75
85
|
"display: flex; gap: var(--vis-legend-spacing);"
|
|
76
86
|
]),
|
|
77
|
-
items:
|
|
87
|
+
items: x.value
|
|
78
88
|
}, null, 8, ["style", "items"])
|
|
79
89
|
], 4)),
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
90
|
+
u(e.$slots, "default"),
|
|
91
|
+
d("div", O, [
|
|
92
|
+
r(k).tooltip ? u(e.$slots, "tooltip", {
|
|
83
93
|
key: 0,
|
|
84
94
|
values: l.value
|
|
85
|
-
}) : l.value ?
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
style:
|
|
95
|
+
}) : l.value ? u(e.$slots, "fallback", { key: 1 }, () => [
|
|
96
|
+
d("div", _, [
|
|
97
|
+
d("div", {
|
|
98
|
+
style: a({
|
|
89
99
|
width: "0.5rem",
|
|
90
100
|
height: "0.5rem",
|
|
91
101
|
borderRadius: "9999px",
|
|
92
102
|
marginRight: "0.5rem",
|
|
93
|
-
backgroundColor:
|
|
103
|
+
backgroundColor: c.value[l.value.index]
|
|
94
104
|
})
|
|
95
105
|
}, null, 4),
|
|
96
|
-
|
|
106
|
+
d("div", null, w(l.value.data), 1)
|
|
97
107
|
])
|
|
98
108
|
]) : f("", !0)
|
|
99
109
|
], 512)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DonutChartProps } from './types';
|
|
2
|
-
declare const _default: <T extends
|
|
2
|
+
declare const _default: <T extends Record<string, any> = any>(__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
3
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
4
4
|
readonly onClick?: ((event: MouseEvent, values?: any) => any) | undefined;
|
|
5
5
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onClick"> & DonutChartProps & Partial<{}>> & import('vue').PublicProps;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { LegendPosition } from '../../types';
|
|
1
|
+
import { BulletLegendItemInterface, LegendPosition } from '../../types';
|
|
2
2
|
export type DonutChartProps = {
|
|
3
3
|
/**
|
|
4
4
|
* The type of donut chart to render.
|
|
5
5
|
* See `DonutType` for available options.
|
|
6
6
|
*/
|
|
7
|
-
type?:
|
|
7
|
+
type?: DonutType;
|
|
8
8
|
/**
|
|
9
9
|
* The data to be displayed in the donut chart.
|
|
10
10
|
* Each number in the array represents a segment value.
|
|
@@ -15,8 +15,8 @@ export type DonutChartProps = {
|
|
|
15
15
|
*/
|
|
16
16
|
arcWidth?: number;
|
|
17
17
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
* The height of the chart in pixels.
|
|
19
|
+
*/
|
|
20
20
|
height: number;
|
|
21
21
|
/**
|
|
22
22
|
* The radius of the donut in pixels.
|
|
@@ -27,21 +27,19 @@ export type DonutChartProps = {
|
|
|
27
27
|
*/
|
|
28
28
|
hideLegend?: boolean;
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
* Optional position for the legend, if applicable.
|
|
31
|
+
* See `LegendPosition` for available options.
|
|
32
|
+
*/
|
|
33
33
|
legendPosition?: LegendPosition;
|
|
34
34
|
/**
|
|
35
35
|
* Optional style object for the legend container. Allows custom CSS styling.
|
|
36
36
|
*/
|
|
37
37
|
legendStyle?: string | Record<string, string>;
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* A record mapping category keys to `BulletLegendItemInterface` objects.
|
|
40
|
+
* This defines the visual representation and labels for each category in the chart's legend.
|
|
40
41
|
*/
|
|
41
|
-
|
|
42
|
-
name: string;
|
|
43
|
-
color: string;
|
|
44
|
-
}[];
|
|
42
|
+
categories: Record<string, BulletLegendItemInterface>;
|
|
45
43
|
/**
|
|
46
44
|
* Pad angle. Default: 0
|
|
47
45
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as a, createBlock as r, openBlock as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as a, createBlock as r, openBlock as s, mergeProps as p, createSlots as l, renderList as y, withCtx as c, renderSlot as m, normalizeProps as d, guardReactiveProps as x } from "vue";
|
|
2
|
+
import h from "../AreaChart/AreaChart.js";
|
|
3
|
+
const L = /* @__PURE__ */ a({
|
|
4
4
|
inheritAttrs: !1,
|
|
5
5
|
__name: "LineChart",
|
|
6
6
|
props: {
|
|
@@ -33,21 +33,23 @@ const g = /* @__PURE__ */ a({
|
|
|
33
33
|
hideXAxis: { type: Boolean },
|
|
34
34
|
hideYAxis: { type: Boolean },
|
|
35
35
|
crosshairConfig: {},
|
|
36
|
+
xAxisConfig: {},
|
|
37
|
+
yAxisConfig: {},
|
|
36
38
|
yDomain: {},
|
|
37
39
|
xDomain: {}
|
|
38
40
|
},
|
|
39
|
-
setup(
|
|
40
|
-
const
|
|
41
|
-
return (e,
|
|
42
|
-
y(e.$slots, (
|
|
41
|
+
setup(i) {
|
|
42
|
+
const n = i;
|
|
43
|
+
return (e, B) => (s(), r(h, p(n, { "hide-area": !0 }), l({ _: 2 }, [
|
|
44
|
+
y(e.$slots, (f, o) => ({
|
|
43
45
|
name: o,
|
|
44
46
|
fn: c((t) => [
|
|
45
|
-
m(e.$slots, o, d(
|
|
47
|
+
m(e.$slots, o, d(x(t)))
|
|
46
48
|
])
|
|
47
49
|
}))
|
|
48
50
|
]), 1040));
|
|
49
51
|
}
|
|
50
52
|
});
|
|
51
53
|
export {
|
|
52
|
-
|
|
54
|
+
L as default
|
|
53
55
|
};
|