CartesianChart

Anatomy

CartesianChartarrow-up-right draws a chart based on a Cartesian coordinate plane. The chart includes one or more data layers, drawn by CartesianLayerarrow-up-right instances. Each layer has its own data.

Creation

Instantiate CartesianChart via rememberCartesianChartarrow-up-right.

Ranges

A chart’s x- and y-ranges depend on those reported by its layers. The x-range is the narrowest one that includes all layers’ x-ranges. By default, there’s an analogously determined shared y-range, but two separate y-ranges can also be introduced.

x- and y-range customization is discussed in a later subsection.

Sample charts

Last updated