FlSimpleErrorPainter class
The default implementation of FlSpotErrorRangePainter
It draws a simple and common error indicator for the error range of a point in our axis based charts such as LineChart and BarChart
You can see how does it look in the example app
You can customize the lines using lineColor, lineWidth, capLength,
You can customize the text using showErrorTexts, errorTextStyle and errorTextDirection
You can customize the alignment of the error lines using crossAlignment
- Inheritance
-
- Object
- FlSpotErrorRangePainter
- FlSimpleErrorPainter
Constructors
- FlSimpleErrorPainter.new({Color lineColor = Colors.white, double lineWidth = 1.0, double capLength = 8.0, double crossAlignment = 0, bool showErrorTexts = false, TextStyle errorTextStyle = const TextStyle(color: Colors.white, fontSize: 12), TextDirection errorTextDirection = TextDirection.ltr})
Properties
- capLength → double
-
The length of the cap of the error lines
final
- crossAlignment → double
-
The alignment of the error lines,
it should be between -1 (start) and 1 (end)
final
- errorTextDirection → TextDirection
-
The direction of the error texts
final
- errorTextStyle → TextStyle
-
The style of the error texts
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- lineColor → Color
-
The color of the error lines
final
- lineWidth → double
-
The thickness of the error lines
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showErrorTexts → bool
-
Determines showing the error texts or not
final
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited
Methods
-
draw(
Canvas canvas, Offset offsetInCanvas, FlSpot origin, Rect errorRelativeRect, AxisChartData axisChartData) → void -
Draws the error range of a point in our axis based charts
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.
inherited