ColorGenerator class abstract
Used to generate colors for charts with no colors set.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
Static Properties
- globalIndex ↔ int
-
getter/setter pair
Static Methods
-
colorForIndex(
int index, {double saturation = 0.55, double lightness = 0.55}) → String - Deterministic, index-stable color: colorForIndex(3) is always the same color, regardless of how many series exist total. Good default when series can be added/removed dynamically, or the total count isn't known.
-
generatePalette(
int n, {double saturation = 0.55, double lightness = 0.55}) → List< String> -
Evenly divides the hue wheel into exactly
nslices — mathematically the most uniform spacing possible, but ONLY for that exact n. Adding a color later means recomputing the whole palette, and every existing series' color shifts. Good default when the count is fixed and known up front (e.g. a static dashboard with a declared set of metrics). -
nextColor(
) → String