LineSeries<X, Y extends num> class

A series for line charts.

Example:

LineSeries(
  name: 'Revenue',
  data: [
    DataPoint(x: 0, y: 10),
    DataPoint(x: 1, y: 25),
    DataPoint(x: 2, y: 15),
  ],
  color: Colors.blue,
  strokeWidth: 2.5,
  curved: true,
)
Inheritance
Annotations

Constructors

LineSeries({required List<DataPoint<X, Y>> data, String? name, Color? color, bool visible = true, String? xAxisId, String? yAxisId, double strokeWidth = 2.0, bool curved = false, CurveType curveType = CurveType.monotone, double tension = 0.4, bool showMarkers = false, double markerSize = 6.0, MarkerShape markerShape = MarkerShape.circle, bool fillArea = false, double areaOpacity = 0.3, Gradient? areaGradient, List<double>? dashPattern, StrokeCap strokeCap = StrokeCap.round, StrokeJoin strokeJoin = StrokeJoin.round})
Creates a line series.
const

Properties

areaGradient Gradient?
Optional gradient for the area fill.
final
areaOpacity double
Opacity of the area fill (0.0 to 1.0).
final
color Color?
The color for this series.
finalinherited
curved bool
Whether to draw a curved line.
final
curveType CurveType
The type of curve to use.
final
dashPattern List<double>?
Dash pattern for the line (null = solid).
final
data List<DataPoint<X, Y>>
The data points in this series.
finalinherited
fillArea bool
Whether to fill the area under the line.
final
hashCode int
The hash code for this object.
no setteroverride
isEmpty bool
Returns true if this series has no data points.
no setterinherited
isNotEmpty bool
Returns true if this series has data points.
no setterinherited
length int
The number of data points in this series.
no setterinherited
markerShape MarkerShape
Shape of the markers.
final
markerSize double
Size of the markers.
final
name String?
Optional name for this series (used in legends and tooltips).
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showMarkers bool
Whether to show markers at data points.
final
strokeCap StrokeCap
The stroke cap style.
final
strokeJoin StrokeJoin
The stroke join style.
final
strokeWidth double
The width of the line.
final
tension double
Tension for Bezier curves (0.0 to 1.0).
final
visible bool
Whether this series is visible.
finalinherited
xAxisId String?
The ID of the x-axis to use for this series.
finalinherited
yAxisId String?
The ID of the y-axis to use for this series.
finalinherited

Methods

copyWith({List<DataPoint<X, Y>>? data, String? name, Color? color, bool? visible, String? xAxisId, String? yAxisId, double? strokeWidth, bool? curved, CurveType? curveType, double? tension, bool? showMarkers, double? markerSize, MarkerShape? markerShape, bool? fillArea, double? areaOpacity, Gradient? areaGradient, List<double>? dashPattern, StrokeCap? strokeCap, StrokeJoin? strokeJoin}) LineSeries<X, Y>
Creates a copy of this series with the given values replaced.
override
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.
override