Legend

A Legendarrow-up-right describes the elements present on a chart. There are two built-in implementations: HorizontalLegendarrow-up-right and VerticalLegendarrow-up-right. These Legends consist of LegendItemarrow-up-rights. Instantiate HorizontalLegend and VerticalLegend via rememberHorizontalLegendarrow-up-right and rememberVerticalLegendarrow-up-right:

rememberCartesianChart(legend = rememberHorizontalLegend(/* ... */), /* ... */)
rememberCartesianChart(legend = rememberVerticalLegend(/* ... */), /* ... */)

Last updated