Series<T> class
sealed
A dataset drawn on a chart.
The hierarchy is sealed: donut and future series types join in later
milestones without breaking changes. Series accept any element type
T; for the built-in DataPoint, TimePoint and CategoryPoint
types the accessors are inferred, and for domain models you pass them
explicitly:
LineSeries(
data: signups,
xAccessor: (s) => s.day.toDouble(),
yAccessor: (s) => s.count.toDouble(),
)
BarSeries(
data: sales,
categoryAccessor: (s) => s.region,
yAccessor: (s) => s.revenue,
)
- Implementers
Properties
-
categoryAccessor
→ CategoryAccessor<
T> ? -
Maps a datum to its category, for categorical (band) x axes.
Inferred for CategoryPoint; null otherwise unless provided.
final
- color → Color?
-
Explicit series color. When null the theme palette assigns one by
position, in fixed order.
final
-
data
→ List<
T> -
The data to draw, in x order for line-like series.
final
- downsampling → Downsampling
-
LTTB downsampling policy for line/area painting. Automatic by
default: series beyond ~2× the plot width in points are reduced
before painting, while hover/tooltips keep seeing the raw data.
final
- hasCategoryAccessor → bool
-
Whether this series can resolve category labels.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasXAccessor → bool
-
Whether this series can resolve numeric x values.
no setter
- id → String?
-
Stable identity for animation matching, emphasis targeting and color
assignment across rebuilds. Defaults to the series' position in the
serieslist.final - interactive → bool
-
Whether this series participates in hover: crosshair snapping,
hover markers and tooltips. Set false for purely decorative series
(visual overlays, guides) so they never steal the crosshair or add
tooltip rows. Painting is unaffected.
final
- label → String?
-
Human-readable name, used by legends and tooltips.
final
-
pointIdAccessor
→ CategoryAccessor<
T> ? -
Optional stable per-point identity for data-change morphing.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
xAccessor
→ ChartAccessor<
T> ? -
Maps a datum to its numeric x (domain) value. Null for purely
categorical data — such series render on a CategoryAxis
(substituted automatically for default axes).
final
-
yAccessor
→ ChartAccessor<
T> -
Maps a datum to its y (measure) value.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveCategoryPoints(
) → List< (String, double)> - Resolves data into (category, y) pairs for categorical x axes.
-
resolvePointIds(
) → List< String> ? - Resolves per-point morph identities, or null when pointIdAccessor is not set.
-
resolvePoints(
) → List< Offset> -
Resolves data through the numeric accessors into domain-space
points (
dx= x value,dy= y value). -
resolveValues(
) → List< double> - Resolves data through yAccessor into plain magnitudes (used by radial series, where there is no x).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited