Reflex Cloud - Fast, secure & scalable hosting. One command to deploy.

Label

Label is a component used to display a single label at a specific position within a chart or axis, while LabelList is a component that automatically renders a list of labels for each data point in a chart series, providing a convenient way to display multiple labels without manually positioning each one.

Simple Example

Here's a simple example that demonstrates how you can customize the label of your axis using rx.recharts.label. The value prop represents the actual text of the label, the position prop specifies where the label is positioned within the axis component, and the offset prop is used to fine-tune the label's position.

Label List Example

rx.recharts.label_list takes in a data_key where we define the data column to plot.

API Reference

rx.recharts.Label

A Label component in Recharts.

PropType | ValuesDefault
view_box
Dict[str, Any]
value
str
offset
int
position
"top" | "left" | ...

Event Triggers

See the full list of default event triggers

rx.recharts.LabelList

A LabelList component in Recharts.

PropType | ValuesDefault
data_key
Union[str, int]
position
"top" | "left" | ...
offset
int
5
fill
Union[str, Color]
rx.color("gray", 10)
stroke
Union[str, Color]
"none"