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

Brush

Simple Example

The brush component allows us to view charts that have a large number of data points. To view and analyze them efficiently, the brush provides a slider with two handles that helps the viewer to select some range of data points to be displayed.

Position, Size, and Range

This example showcases ways to set the Position, Size, and Range. The gap prop provides the spacing between stops on the brush when the graph will refresh. The start_index and end_index props defines the default range of the brush. traveller_width prop specifies the width of each handle ("traveller" in recharts lingo).

API Reference

rx.recharts.Brush

A Brush component in Recharts.

PropType | ValuesDefault
stroke
Union[str, Color]
rx.color("gray", 9)
fill
Union[str, Color]
rx.color("gray", 2)
data_key
Union[str, int]
x
int
0
y
int
0
width
int
0
height
int
40
data
List
traveller_width
int
5
gap
int
1
start_index
int
0
end_index
int
fill
Union[str, Color]
stroke
Union[str, Color]

Event Triggers

See the full list of default event triggers
TriggerDescription
on_changeThe on_change event handler is called when the value or checked state of the component changes.