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
-
- Object
- BaseChartData
- AxisChartData
- BarChartData
Constructors
-
BarChartData({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}) -
BarChart draws some
barGroups
and aligns them usingalignment
, ifalignment
is BarChartAlignment.center, you can definegroupsSpace
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.
getter/setter pairinherited
-
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
-
getter/setter pairinherited
- baselineY ↔ double
-
getter/setter pairinherited
- borderData ↔ FlBorderData
-
Holds data to drawing border around the chart.
getter/setter pairinherited
- clipData ↔ FlClipData
-
clip the chart to the border (prevent draw outside the border)
getter/setter pairinherited
- 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
-
getter/setter pairinherited
- maxY ↔ double
-
getter/setter pairinherited
- minX ↔ double
-
getter/setter pairinherited
- minY ↔ double
-
getter/setter pairinherited
-
props
→ List<
Object?> -
Used for equality check, see
EquatableMixin
.no setteroverride - rangeAnnotations → RangeAnnotations
-
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
-
touchData
↔ FlTouchData<
BaseTouchResponse> -
Holds data needed to touch behavior and responses.
getter/setter pairinherited
- 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}) → 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