LineSeries class

A line (and optionally an area under it) through the rows of a ChartData.

Only the visible part is processed, and when there are far more points than pixels the line is reduced to the min/max of each pixel column, so a million points pan smoothly while looking identical.

Inheritance

Constructors

LineSeries({Key? key, required ChartData data, int column = 0, Object? id, String? label, Color? color, double width = 2, LineCurve curve = LineCurve.linear, List<double>? dash, ChartShaderBuilder? shader, Color? fillColor, Gradient? fillGradient, double? baseline, int? baseColumn, double pointRadius = 0, bool visible = true, Object xScale = kChartX, Object yScale = kChartY, bool decimate = true, bool clip = true, bool isolate = true})
Creates a line series.
const

Properties

baseColumn → int?
A value column holding the lower edge of the area, instead of baseline: the area between two lines. With the layers of ChartData.stacked this draws a stacked area chart.
final
baseline → double?
The data value the fill extends to. Null fills to the bottom of the plot.
final
clip → bool
Whether the line is clipped to the plot area.
final
color → Color?
Stroke colour. Defaults to the colour the palette of the chart theme has for the place of the series in the chart.
final
column → int
Which value column of data to plot.
final
curve → LineCurve
How points are joined.
final
dash → List<double>?
Dash pattern: lengths of alternating dashes and gaps.
final
data → ChartData
The data to plot.
final
decimate → bool
Whether dense data is reduced to per-pixel-column extremes.
final
fillColor → Color?
Fills the area between the line and baseline with a colour.
final
fillGradient → Gradient?
Fills the area between the line and baseline with a gradient spanning the plot.
final
hashCode → int
The hash code for this object.
no setterinherited
id → Object?
Identifier of the series.
final
isolate → bool
Whether the series paints into its own compositing layer.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label → String?
Name of the series, for legends and tooltips.
final
pointRadius → double
Radius of the dots drawn on data points when they are far enough apart. 0 draws none.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shader → ChartShaderBuilder?
Builds a shader for the stroke, replacing color.
final
visible → bool
Whether the series is shown; a hidden series stays listed for legends.
final
width → double
Stroke width in logical pixels. 0 draws no line.
final
xScale → Object
Id of the horizontal scale.
final
yScale → Object
Id of the vertical scale.
final

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited