For the complete documentation index, see llms.txt. This page is also available as Markdown.

Legend

A legend, represented by Legend, describes the elements present on a chart. There are two built-in implementations: HorizontalLegend and VerticalLegend. These use LegendItem instances. Instantiate HorizontalLegend and VerticalLegend via rememberHorizontalLegend and rememberVerticalLegend:

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

Last updated