ChartData

data class ChartData(val categories: ImmutableList<String>, val series: ImmutableList<ChartSeries>)(source)

Immutable, indexed data shared by aligned-series charts.

Values at the same index in each series share a category. Categories are labels, not numeric coordinates. Replace data to update a chart rather than mutating input lists. Chart-specific validation determines permitted series counts, lengths, and values. Pie charts use their own slice model instead of this table.

Parameters

categories

The indexed-dimension labels, such as bar labels or radar axes. Empty means no explicit labels; otherwise the count must match each series' value count.

series

The ordered series to render. Series must have aligned value counts.

Constructors

Link copied to clipboard
constructor(categories: ImmutableList<String>, series: ImmutableList<ChartSeries>)
constructor(categories: List<String> = emptyList(), series: List<ChartSeries> = emptyList())

Convenience constructor that defensively copies the supplied lists.

Properties

Link copied to clipboard
val categories: ImmutableList<String>
Link copied to clipboard
val series: ImmutableList<ChartSeries>