PieSlice

constructor(label: String, value: Double, color: Color? = null)(source)

Parameters

label

The slice label, shown in the legend and while the slice is selected.

value

The slice value. The rendered arc is proportional to this value. Values are Double so callers can mix large totals with tiny contributions without rounding loss. Finite numbers are required; NaN, +Infinity, and -Infinity are rejected by validation.

color

The slice color. When null, a shade is generated from the style's base color.