ChartDataSet class
Represents a collection of data points that form a single series in a chart.
Multiple ChartDataSet instances can be used to create multi-series charts (e.g., comparing sales vs revenue over time).
Example:
ChartDataSet(
label: 'Sales',
color: Colors.blue,
dataPoints: [
ChartDataPoint(x: 0, y: 10),
ChartDataPoint(x: 1, y: 20),
ChartDataPoint(x: 2, y: 15),
],
)
Constructors
-
ChartDataSet({required String label, required List<
ChartDataPoint> dataPoints, required Color color}) - Creates a chart data set.
Properties
- color → Color
-
The color used to render this data series.
final
-
dataPoints
→ List<
ChartDataPoint> -
The list of data points in this series.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- label → String
-
The label for this data series (displayed in legends and tooltips).
final
- 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.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override