SfSparkAreaChart class
This class renders an area spark chart. The SfSparkAreaChart is a very small chart, typically drawn without axis ticks and labels. It presents the general shape of data in a simple and highly condensed way.
To render an area spark chart, create the instance of SfSparkAreaChart.
Set the value for data
property which of type List
It provides option to customize its appearance with the properties such as color, borderWidth, borderColor. To highlight the provided data, use either its marker property or its data label property. To highlight the data point, which is tapped, use its trackball property. To highlight the particular region along with the vertical value, use its plotBand property.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SfSparkAreaChart
Constructors
-
SfSparkAreaChart({Key? key, List<
num> ? data, SparkChartPlotBand? plotBand, double borderWidth = 0, Color? borderColor, Color? color, bool isInversed = false, double axisCrossesAt = 0, Color? axisLineColor, double axisLineWidth = 2, List<double> ? axisLineDashArray, Color? highPointColor, Color? lowPointColor, Color? negativePointColor, Color? firstPointColor, Color? lastPointColor, SparkChartMarker? marker, SparkChartLabelDisplayMode? labelDisplayMode, TextStyle? labelStyle, SparkChartTrackball? trackball}) - Creates a spark area chart for the provided set of data with its default view.
-
SfSparkAreaChart.custom({Key? key, int? dataCount, SparkChartIndexedValueMapper? xValueMapper, SparkChartIndexedValueMapper<
num> ? yValueMapper, SparkChartPlotBand? plotBand, double borderWidth = 2, Color? borderColor, Color? color, bool isInversed = false, double axisCrossesAt = 0, Color? axisLineColor, double axisLineWidth = 2, List<double> ? axisLineDashArray, Color? highPointColor, Color? lowPointColor, Color? negativePointColor, Color? firstPointColor, Color? lastPointColor, SparkChartMarker? marker, SparkChartLabelDisplayMode? labelDisplayMode, TextStyle? labelStyle, SparkChartTrackball? trackball}) - Creates the spark area chart for the provided set of data with its default view.
Properties
- axisCrossesAt → double
-
Customize the axis position based on the provided y-value.The axis line is
rendered on the minimum y-value and can be repositioned to required y-value.
final
- axisLineColor → Color?
-
Customizes the color of the axis line.
Colors.transparent can be set to axisLineColor to hide the axis line.
final
-
axisLineDashArray
→ List<
double> ? -
Dashes of the axis line. Any number of values can be provided on the list.
Odd value is considered as rendering size and even value is considered a gap.
final
- axisLineWidth → double
-
Customizes the width of the axis line.
final
- borderColor → Color?
-
Customizes the border color of the spark area chart.
The border will be rendered on the top of the spark area chart.
To render the border, both the borderWidth and borderColor property
needs to be set.
final
- borderWidth → double
-
Customizes the border width of the spark area chart.
The border will be rendered on the top of the spark area chart.
To render the border, both the border width and border color property
needs to be set.
final
- color → Color?
-
Customizes the spark area chart color.
final
- firstPointColor → Color?
-
Customizes the marker color of the first data point.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- highPointColor → Color?
-
Customizes the marker color of the highest data point.
final
- isInversed → bool
-
Inverts the axis from right to left.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- labelDisplayMode → SparkChartLabelDisplayMode?
-
Enables the data labels.
final
- labelStyle → TextStyle?
-
Customizes the data label text style.
final
- lastPointColor → Color?
-
Customizes the marker color of the last data point.
final
- lowPointColor → Color?
-
Customizes the marker color of the lowest data point.
final
- marker → SparkChartMarker?
-
Enables and customizes the markers.
final
- negativePointColor → Color?
-
Customizes the marker color of negative data point and data point value
less than the axisCrossesAt value.
final
- plotBand → SparkChartPlotBand?
-
Render plot band.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- trackball → SparkChartTrackball?
-
Enables and customizes the trackball.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StatefulWidget> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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