PieEntry<D> class

Entry for a pie chart: one slice with a value and an optional label. A pie entry has no meaningful x; x is always 0 and the slice position is the entry's index in the data set.

D is the type of the payload stored in data. Kotlin's payload-less PieEntry(value, label, icon) factory is this constructor without data. Kotlin's label and icon are positional with defaults; here value is the only positional parameter and the rest are named, like the named parameters of Entry.

Inheritance

Constructors

PieEntry(double value, {String? label, ChartDrawable? icon, D? data})
Creates a slice of size value with an optional label, an optional icon drawn at the slice when icons are enabled and an optional data payload.

Properties

data → D?
Optional payload carried with the entry, for example the object the entry was made from.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
icon ↔ ChartDrawable?
Drawable drawn at the entry's position when the data set has icons enabled, or null for none.
getter/setter pairinherited
label ↔ String?
Text drawn for the slice, or null for none. Also used for the legend.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → double
Size of the slice; the same as y. Assign y to change it.
no setter
x ↔ double
Position on the x axis in value space (not an index).
getter/setter pairinherited
y ↔ double
The y value in value space; for pie and radar entries this is the entry's value.
getter/setter pairinherited

Methods

copy() → PieEntry<D>
Returns a new entry with the same value, label, icon and payload. The icon and payload are shared, not copied.
override
equalTo(Entry? e) → bool
Compares x and y within Utils.FLOAT_EPSILON and requires the same payload instance. Unlike ==, two separately created entries with the same values are considered equal.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited