ChartSeries

data class ChartSeries(val label: String, val value: Float, val color: PdfColor)

One datum in a chart: a human-readable label, a numeric value, and the color used to draw it.

The same type backs bars, pie / donut slices, and legend rows so callers can reuse a single data model across every chart flavour.

Constructors

Link copied to clipboard
constructor(label: String, value: Float, color: PdfColor)

Properties

Link copied to clipboard

fill colour for this datum's bar / slice / legend swatch.

Link copied to clipboard

caption shown under a bar or in a legend row.

Link copied to clipboard

magnitude; bars scale to the largest value in the set and pie / donut slices to the share of the total. Negative values are treated as 0 because a negative bar or slice has no meaningful geometry.