Legend
A legend tells what each plot represents. Just like on a map, the legend helps the reader understand what they are looking at. For a line graph for example it tells us what each line represents.
Simple Example
Example with Props
The style and layout of the legend can be customized using a set of props. width
and height
set the dimensions of the container that wraps the legend, and layout
can set the legend to display vertically or horizontally. align
and vertical_align
set the position relative to the chart container. The type and size of icons can be set using icon_size
and icon_type
.
API Reference
rx.recharts.Legend
A Legend component in Recharts.