Skip to main content

Legends

Legends can be added to any chart by nesting a VictoryLegend component within VictoryChart. The legend can be styled and positioned using props.

Basic

See the full API here.

Live View
Loading...
Live Editor

Legend - Titles

The legend can include multiline title by setting the title prop to an array.

Live View
Loading...
Live Editor

Legend - Symbols

Victory includes basic symbols for legend items. The symbol prop can be used to specify the symbol type and fill color.

Live View
Loading...
Live Editor

Legend - Custom Icons

Victory supports custom icons for legend items such as React components from SVG libraries like react-icons.

Live View
Loading...
Live Editor

Legend - Orientation

The legend also supports vertical orientations.

Live View
Loading...
Live Editor

Legend - Columns

The legend can be displayed in multiple rows by setting the itemsPerRow prop.

Live View
Loading...
Live Editor

Like this project? You'll love working with us.

Contact us to learn more about our full range of services and offerings.

Learn More