StackedBarChart<D, T> class

Shows several series of data as stacked bars.

All series must contain data of the same type. It is not necessary for each series to contain the same set of domains, if there is no value for some of domains in some series, the series may not contain the value of this domain.

The width of bars depends on quantity and the entire width of the diagram.

Inheritance

Constructors

StackedBarChart({Key? key, required List<Series<D, T>> data, DomainFormatter<D>? domainFormatter, MeasureFormatter? measureFormatter, Axis valueAxis = Axis.vertical, bool showZeroValues = false, bool inverted = false, TextStyle? mainAxisTextStyle, TextStyle? crossAxisTextStyle, Color? axisColor, double axisThickness = 1.0, Color? guideLinesColor, double guideLinesThickness = 1.0, double mainAxisLabelsOffset = 2.0, double crossAxisLabelsOffset = 2.0, double? mainAxisWidth, double? crossAxisWidth, bool showMainAxisLine = false, bool showCrossAxisLine = true, double minTickSpacing = 64.0, double barSpacing = 0.0, double barPadding = 0.0, EdgeInsets padding = EdgeInsets.zero, Clip clipBehavior = Clip.hardEdge, Radius radius = Radius.zero, Duration animationDuration = Duration.zero, Curve animationCurve = Curves.easeOut})
const

Properties

animationCurve Curve
The curve of the change animation.
final
animationDuration Duration
The duration of the change animation.
final
axisColor Color?
The color of lines of axes (main and cross).
final
axisThickness double
The thickness of lines of axes (main and cross).
final
barPadding double
The padding of bars.
final
barSpacing double
The spacing between bars.
final
clipBehavior Clip
The content will be clipped (or not) according to this option.
final
crossAxisLabelsOffset double
The offset of labels on the cross axis from the line.
final
crossAxisTextStyle TextStyle?
The text style of labels on the measure axis.
final
crossAxisWidth double?
The width of the field of domains scale, including labels on it and the crossAxisLabelsOffset.
final
data List<Series<D, T>>
The list of series to be shown.
final
domainFormatter → DomainFormatter<D>?
Converts domain value to String type to be shown on the domains axis.
final
guideLinesColor Color?
The color of guide lines (minor lines on the diagram).
final
guideLinesThickness double
The thickness of guide lines (minor lines on the diagram).
final
hashCode int
The hash code for this object.
no setterinherited
inverted bool
Whether the diagram is shown inverted.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
mainAxisLabelsOffset double
The offset of labels on the main axis from the line.
final
mainAxisTextStyle TextStyle?
The text style of labels on the domains axis.
final
mainAxisWidth double?
The width of the field of measure scale, including labels on it and the mainAxisLabelsOffset.
final
measureFormatter → MeasureFormatter?
Converts measure value of type double to String type to be shown on the measure axis.
final
minTickSpacing double
The minimal distance between next ticks in pixels.
final
padding EdgeInsets
The padding of the diagram.
final
radius Radius
The radius of each bar.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showCrossAxisLine bool
Whether to show the line of the cross axis (on domains scale).
final
showMainAxisLine bool
Whether to show the line of the main axis (on the measure scale).
final
showZeroValues bool
Whether to show zero segments of bar.
final
valueAxis Axis
The orientation of the diagram.
final

Methods

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