Radial Bar Chart
Simple Example
This example demonstrates how to use a radial_bar_chart
with a radial_bar
. The radial_bar_chart
takes in data
and then the radial_bar
takes in a data_key
. A radial bar chart is a circular visualization where data categories are represented by bars extending outward from a central point, with the length of each bar proportional to its value.
Fill color supports rx.color()
, which automatically adapts to dark/light mode changes.
def radial_bar_simple():
return rx.recharts.radial_bar_chart(
rx.recharts.radial_bar(
data_key="x",
min_angle=15,
),
data=data,
width="100%",
height=500,
)
Advanced Example
The start_angle
and end_angle
define the circular arc over which the bars are distributed, while inner_radius
and outer_radius
determine the radial extent of the bars from the center.
def radial_bar_advanced():
return rx.recharts.radial_bar_chart(
rx.recharts.radial_bar(
data_key="uv",
min_angle=90,
background=True,
label={
"fill": "#666",
"position": "insideStart",
},
),
data=data_radial_bar,
inner_radius="10%",
outer_radius="80%",
start_angle=180,
end_angle=0,
width="100%",
height=300,
)
API Reference
rx.recharts.RadialBarChart
A RadialBar chart component in Recharts.
Valid Children
PolarAngleAxis
PolarRadiusAxis
PolarGrid
Legend
GraphingTooltip
RadialBar