PieChartData

data class PieChartData(val label: String, val value: Float, val color: Color)

A single slice of a pie or donut chart, pairing a categorical label with its numeric magnitude and display color.

Instances are consumed by SimplePieChart which computes each slice's angular sweep proportionally from the sum of all values.

See also

Constructors

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

Properties

Link copied to clipboard

Fill color of the arc segment. Typically obtained from stylishChartColor to stay consistent with the theme's categorical palette.

Link copied to clipboard

Human-readable category name used in accessibility descriptions and legends.

Link copied to clipboard

Numeric magnitude of this slice. The arc angle is derived as value / totalSum * 360°. Negative or non-finite values (NaN, ±Infinity) are treated as zero and contribute no arc.