For AI agents: the complete documentation index is at llms.txt. Markdown versions are available by appending .md or sending Accept: text/markdown.
Reflex Logo
Docs Logo
Library

/

Graphing

/

Charts

/

Radarchart

Radar Chart

A radar chart shows multivariate data of three or more quantitative variables mapped onto an axis.

Simple Example

For a radar chart we must define an rx.recharts.radar() component for each set of values we wish to plot. Each rx.recharts.radar() component has a data_key which clearly states which variable in our data we are plotting. In this simple example we plot the A column of our data against the subject column which we set as the data_key in rx.recharts.polar_angle_axis.

Multiple Radars

We can also add two radars on one chart by using two rx.recharts.radar components.

In this plot an inner_radius and an outer_radius are set which determine the chart's size and shape. The inner_radius sets the distance from the center to the innermost part of the chart (creating a hollow center if greater than zero), while the outer_radius defines the chart's overall size by setting the distance from the center to the outermost edge of the radar plot.

Expand

Using More Props

The dot prop shows points at each data vertex when true. legend_type="line" displays a line in the chart legend. animation_begin=0 starts the animation immediately, animation_duration=8000 sets an 8-second animation, and animation_easing="ease-in" makes the animation start slowly and speed up. These props control the chart's appearance and animation behavior.

Expand

Dynamic Data

Chart data tied to a State var causes the chart to automatically update when the state changes, providing a nice way to visualize data in response to user interface elements. View the "Data" tab to see the substate driving this radar chart of character traits.

Strength

15

Dexterity

15

Constitution

15

Intelligence

15

Wisdom

15

Charisma

15

Remaining points: 10

Expand

API Reference

rx.recharts.RadarChart

A Radar chart component in Recharts.

Props

PropTypeDescription
width
Union[int, str]

The width of chart container. String or Integer.

height
Union[int, str]

The height of chart container.

data
Sequence

The source data, in which each element is an object.

margin
Dict[str, Any]

The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.

cx
Union[int, str]

The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage.

cy
Union[int, str]

The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage.

start_angle
int

The angle of first radial direction line.

end_angle
int

The angle of last point in the circle which should be startAngle - 360 or startAngle + 360. We'll calculate the direction of chart by 'startAngle' and 'endAngle'.

inner_radius
Union[int, str]

The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage.

outer_radius
Union[int, str]

The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage.

Valid Children

PolarAngleAxisPolarRadiusAxisPolarGridLegendGraphingTooltipRadarDefs

rx.recharts.Radar

A Radar chart component in Recharts.

Props

PropTypeDescription
data_key
Union[int, str]

The key of a group of data which should be unique in a radar chart.

points
Sequence

The coordinates of all the vertices of the radar shape, like [{ x, y }].

dot
Union[dict, bool]

If false set, dots will not be drawn.

stroke
Union[str, Color]

Stoke color.

fill
Union[str, Color]

Fill color.

fill_opacity
float

The opacity to fill the chart.

legend_type
"circle""cross""diamond""line""plainline""rect""square""star""triangle""wye""none"

The type of icon in legend. If set to 'none', no legend item will be rendered.

label
Union[dict, bool]

If false set, labels will not be drawn.

is_animation_active
bool

If set false, animation of polygon will be disabled.

animation_begin
int

Specifies when the animation should begin, the unit of this option is ms.

animation_duration
int

Specifies the duration of animation, the unit of this option is ms.

animation_easing
"ease""ease-in""ease-out""ease-in-out""linear"

The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'.

Valid Children

LabelList

Event Triggers

See the full list of default event triggers
TriggerDescription
on_animation_start
on_animation_end
Built with Reflex