BarChart class

A bar chart that displays one or more series of data as a set of rectangles.

Each rectangle represents a single data point in the series and has a length proportional to the value of that data point.

Inheritance

Constructors

BarChart(List<Series<dynamic, String>> seriesList, {Key? key, bool? animate, Duration? animationDuration, AxisSpec? domainAxis, NumericAxisSpec? primaryMeasureAxis, NumericAxisSpec? secondaryMeasureAxis, LinkedHashMap<String, NumericAxisSpec>? disjointMeasureAxes, BarGroupingType? barGroupingType, BarRendererConfig<String>? defaultRenderer, List<SeriesRendererConfig<String>>? customSeriesRenderers, List<ChartBehavior<String>>? behaviors, List<SelectionModelConfig<String>>? selectionModels, RTLSpec? rtlSpec, bool vertical = true, bool defaultInteractions = true, LayoutConfig? layoutConfig, UserManagedState<String>? userManagedState, BarRendererDecorator<String>? barRendererDecorator, bool? flipVerticalAxis})
Creates a bar chart with the given series of data.

Properties

animate bool
Animation transitions.
finalinherited
animationDuration Duration
The duration of the animation when data changes.
finalinherited
barRendererDecorator → BarRendererDecorator<String>?
A decorator for the bar renderer that can add extra drawing on top of the bars.
final
behaviors List<ChartBehavior<String>>?
List of chart behaviors to apply to the chart.
finalinherited
customSeriesRenderers List<SeriesRendererConfig<String>>?
finalinherited
defaultInteractions bool
Include the default interactions or not.
finalinherited
defaultRenderer SeriesRendererConfig<String>?
finalinherited
disjointMeasureAxes LinkedHashMap<String, NumericAxisSpec>?
finalinherited
domainAxis AxisSpec?
finalinherited
flipVerticalAxis bool?
finalinherited
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
layoutConfig LayoutConfig?
Used to configure the margin sizes around the drawArea that the axis and other things render into.
finalinherited
primaryMeasureAxis NumericAxisSpec?
finalinherited
rtlSpec RTLSpec?
The spec to use if RTL is enabled.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secondaryMeasureAxis NumericAxisSpec?
finalinherited
selectionModels List<SelectionModelConfig<String>>?
List of selection models to add to the chart.
finalinherited
seriesList List<Series<dynamic, String>>
Series list to draw.
finalinherited
userManagedState UserManagedState<String>?
Optional state that overrides internally kept state, such as selection.
finalinherited
vertical bool
Whether the bars are rendered vertically or horizontally.
final

Methods

addDefaultInteractions(List<ChartBehavior> behaviors) → void
Create the list of default interaction behaviors.
override
createCommonChart(BaseChartState<String> chartState) → BaseChart<String>
Creates and returns a common.BaseChart.
override
createDisjointMeasureAxes() LinkedHashMap<String, NumericAxis>?
inherited
createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → BaseChartState<String>
Creates the mutable state for this widget at a given 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
getDesiredGestures(BaseChartState chartState) Set<GestureType>
Gets distinct set of gestures this chart will subscribe to.
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
updateCommonChart(BaseChart<String> chart, BaseChart<String>? oldWidget, BaseChartState<String> chartState) → void
Updates the common.BaseChart based on changes in the widget properties.
inherited

Operators

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