Leave Yamada UI a star

Star
Yamada UIYamada UIv1.5.1

PieChart

PieChart is a component for drawing pie charts to compare multiple sets of data.

Source@yamada-ui/charts

Theming

The PieChart is a multi part component.

export const PieChart: ComponentMultiStyle<"PieChart"> = mergeMultiStyle(
LineChart,
{
baseStyle: {
pie: {},
activeShape: {},
inactiveShape: {},
label: { fillOpacity: 1, fill: "currentColor" },
labelLine: { stroke: "currentColor" },
cell: {},
},
sizes: {
sm: ({ theme: t, withLegend, withLabels }) => ({
container: {
w: withLegend
? "full"
: calc.add(
get(t, "sizes.3xs"),
withLabels ? get(t, "sizes.16") : "0px",
),
h: calc.add(get(t, "sizes.3xs"), get(t, "sizes.1")),
},
label: {
fontSize: "xs",
},
}),
md: ({ theme: t, withLegend, withLabels }) => ({
container: {
w: withLegend
? "full"
: calc.add(
get(t, "sizes.2xs"),
withLabels ? get(t, "sizes.16") : "0px",
),
h: "2xs",
},
label: {
fontSize: "sm",
},
}),
lg: ({ theme: t, withLegend, withLabels }) => ({
container: {
w: withLegend
? "full"
: calc.add(
get(t, "sizes.xs"),
withLabels ? get(t, "sizes.16") : "0px",
),
h: "xs",
},
label: {
fontSize: "md",
},
}),
},
defaultProps: {
size: "md",
},
},
)({ omit: ["line", "grid", "sizes.full"] })
Copied!

Edit this page on GitHub

PreviousBarChartNextDonutChart