CsChartSeries<T> class
One series of a line, bar, area or mixed chart (Cloudscape
series[]). Charts compare series by identity: keep the same instances
between builds (declare them final or const) so filtering and
highlighting stay attached.
final cpu = CsChartSeries<DateTime>.line(
title: 'CPU utilization',
data: [CsChartDatum(DateTime(2026, 11, 1), 42), CsChartDatum(DateTime(2026, 11, 2), 57)],
valueFormatter: (y, x) => '$y%',
);
const limit = CsChartSeries<DateTime>.threshold(title: 'Alarm', y: 80);
- Annotations
Constructors
-
CsChartSeries({required CsChartSeriesType type, required String title, List<
CsChartDatum< data = const [], Color? color, CsColor? colorToken, CsChartValueFormatter<T> >T> ? valueFormatter, num? y, T? x, CsChartTickFormatter<num> ? thresholdValueFormatter}) -
A series of any
type. Prefer the named constructors.const -
CsChartSeries.area({required String title, required List<
CsChartDatum< data, Color? color, CsColor? colorToken, CsChartValueFormatter<T> >T> ? valueFormatter}) -
A filled area for CsAreaChart. Every area series must use the same
x values.
const
-
CsChartSeries.bar({required String title, required List<
CsChartDatum< data, Color? color, CsColor? colorToken, CsChartValueFormatter<T> >T> ? valueFormatter}) -
One bar per datum of
data.const -
CsChartSeries.line({required String title, required List<
CsChartDatum< data, Color? color, CsColor? colorToken, CsChartValueFormatter<T> >T> ? valueFormatter}) -
A line through
data.const -
CsChartSeries.threshold({required String title, num? y, T? x, Color? color, CsColor? colorToken, CsChartTickFormatter<
num> ? valueFormatter}) -
A dashed reference line at
y(horizontal) or atx(vertical, line, bar and mixed charts only). Pass exactly one of them.const
Properties
- color → Color?
-
Color override (Cloudscape
color). Takes priority over colorToken and the automatic categorical palette. Prefer colorToken so the color follows light and dark mode.final - colorToken → CsColor?
-
Color override as a theme token, such as
CsColor.chartsStatusHighorCsColor.chartsThresholdNegative.final -
data
→ List<
CsChartDatum< T> > -
Data points of line, bar and area series. Empty for thresholds.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isThreshold → bool
-
no setter
- isXThreshold → bool
-
no setter
- isYThreshold → bool
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
thresholdValueFormatter
→ CsChartTickFormatter<
num> ? -
Formats a threshold's y value in the detail popover.
final
- title → String
-
Name shown in the legend, filter and detail popover.
final
- type → CsChartSeriesType
-
final
-
valueFormatter
→ CsChartValueFormatter<
T> ? -
Formats this series' values in the detail popover and summaries.
final
- x → T?
-
Position of a vertical threshold.
final
- y → num?
-
Value of a horizontal threshold.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited