BarChartData class

BarChart needs this class to render itself.

It holds data needed to draw a bar chart, including bar lines, colors, spaces, touches, ...

Inheritance

Constructors

BarChartData.new({List<BarChartGroupData>? barGroups, double? groupsSpace, BarChartAlignment? alignment, FlTitlesData? titlesData, BarTouchData? barTouchData, double? maxY, double? minY, double? baselineY, FlGridData? gridData, FlBorderData? borderData, RangeAnnotations? rangeAnnotations, Color? backgroundColor, ExtraLinesData? extraLinesData, int rotationQuarterTurns = 0, FlErrorIndicatorData<BarChartSpotErrorRangeCallbackInput> errorIndicatorData = const FlErrorIndicatorData()})
BarChart draws some barGroups and aligns them using alignment, if alignment is BarChartAlignment.center, you can define groupsSpace to apply space between them.

Properties

alignment BarChartAlignment
Arrange the barGroups, see BarChartAlignment.
final
backgroundColor Color
A background color which is drawn behind the chart.
finalinherited
barGroups List<BarChartGroupData>
BarChart draws barGroups that each of them contains a list of BarChartRodData.
final
barTouchData BarTouchData
Handles touch behaviors and responses.
final
baselineX double
finalinherited
baselineY double
finalinherited
borderData FlBorderData
Holds data to drawing border around the chart.
finalinherited
clipData FlClipData
clip the chart to the border (prevent draw outside the border)
finalinherited
errorIndicatorData FlErrorIndicatorData<BarChartSpotErrorRangeCallbackInput>
Holds data for showing error (threshold) indicators on the spots in the different BarChartGroupData.barRods
final
extraLinesData ExtraLinesData
Extra horizontal or vertical lines to draw on the chart.
finalinherited
gridData FlGridData
finalinherited
groupsSpace double
Apply space between the barGroups.
final
hashCode int
The hash code for this object.
no setterinherited
horizontalDiff double
Difference of maxX and minX
no setterinherited
maxX double
finalinherited
maxY double
finalinherited
minX double
finalinherited
minY double
finalinherited
props List<Object?>
Used for equality check, see EquatableMixin.
no setteroverride
rangeAnnotations RangeAnnotations
finalinherited
rotationQuarterTurns int
Rotates the chart by 90 degrees clockwise in each turn
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
titlesData FlTitlesData
finalinherited
verticalDiff double
Difference of maxY and minY
no setterinherited

Methods

copyWith({List<BarChartGroupData>? barGroups, double? groupsSpace, BarChartAlignment? alignment, FlTitlesData? titlesData, RangeAnnotations? rangeAnnotations, BarTouchData? barTouchData, FlGridData? gridData, FlBorderData? borderData, double? maxY, double? minY, double? baselineY, Color? backgroundColor, ExtraLinesData? extraLinesData, int? rotationQuarterTurns, FlErrorIndicatorData<BarChartSpotErrorRangeCallbackInput>? errorIndicatorData}) BarChartData
Copies current BarChartData to a new BarChartData, and replaces provided values.
lerp(BaseChartData a, BaseChartData b, double t) BarChartData
Lerps a BaseChartData based on t value, check Tween.lerp.
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