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.

PropType | ValuesDefault
data
List
margin
Dict[str, Any]
{"top": 5, "right": 5, "left": 5 "bottom": 5}
cx
Union[str, int]
"50%"
cy
Union[str, int]
"50%"
start_angle
int
0
end_angle
int
360
inner_radius
Union[str, int]
"30%"
outer_radius
Union[str, int]
"100%"
bar_category_gap
Union[str, int]
"10%"
bar_gap
str
4
bar_size
int
width
Union[str, int]
"100%"
height
Union[str, int]
"100%"

Valid Children

PolarAngleAxisPolarRadiusAxisPolarGridLegendGraphingTooltipRadialBar