TinyColumnChart class

A Widget that paints a simple column chart.

It is ideal for sparkline charts.

The data can be provided by a list of double values by vector_math's Vector2. Then that is the case, the x value in each vector represents the column order and the y represents the value.

The chart renders each column with its respective value. Negative columns are rendered in a specific color with (if specified) an axis line in thee position equal to zero.

If both width and height are passed, the chart will try to keep aspect ratio.

To customize things like column colors and axis line visibility, see options.

See also:

Inheritance

Constructors

TinyColumnChart({Key? key, required Iterable<double> data, TinyColumnChartOptions? options, double? width, double? height})
Creates a TinyColumnChart from a Iterable of double.
factory
TinyColumnChart.fromDataVectors({Key? key, required Iterable<Vector2> dataPoints, TinyColumnChartOptions? options, double? width, double? height})
Creates a TinyLineChart from a Iterable of Vector2.
const

Properties

dataPoints Iterable<Vector2>
The set of vectors that represents the columns data.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
If non-null, require the chart to have this height.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
options TinyColumnChartOptions
A set of options to customize the chart display, defaults to kDefaultColumnChartOptions when null on construction.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width double?
If non-null, require the chart to have this width.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<TinyColumnChart>
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}) 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