BarChartRodData class

Holds data about rendering each rod (or bar) in the BarChart.

Constructors

BarChartRodData({double? fromY, required double toY, Color? color, Gradient? gradient, double? width, BorderRadius? borderRadius, BorderSide? borderSide, BackgroundBarChartRodData? backDrawRodData, List<BarChartRodStackItem>? rodStackItems})
BarChart renders rods vertically from zero to toY, and the x is equivalent to the BarChartGroupData.x value.

Properties

backDrawRodData BackgroundBarChartRodData
If you want to have a bar drawn in rear of this rod, use backDrawRodData, it uses to have a bar with a passive color in rear of the rod, for example you can use it as the maximum value place holder.
final
borderRadius BorderRadius?
If you want to have a rounded rod, set this value.
final
borderSide BorderSide
If you want to have a border for rod, set this value.
final
color Color?
If provided, this BarChartRodData draws with this color Otherwise we use gradient to draw the background. It throws an exception if you provide both color and gradient
final
fromY double
BarChart renders rods vertically from fromY.
final
gradient Gradient?
If provided, this BarChartRodData draws with this gradient. Otherwise we use color to draw the background. It throws an exception if you provide both color and gradient
final
hashCode int
The hash code for this object.
no setterinherited
props List<Object?>
Used for equality check, see EquatableMixin.
no setter
rodStackItems List<BarChartRodStackItem>
If you are a fan of stacked charts (If you don't know what is it, google it), you can fill up the rodStackItems to have a Stacked Chart.
final
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
toY double
BarChart renders rods vertically from fromY to toY.
final
width double
BarChart renders each rods with this value.
final

Methods

copyWith({double? fromY, double? toY, Color? color, Gradient? gradient, double? width, BorderRadius? borderRadius, BorderSide? borderSide, BackgroundBarChartRodData? backDrawRodData, List<BarChartRodStackItem>? rodStackItems}) BarChartRodData
Copies current BarChartRodData to a new BarChartRodData, and replaces provided values.
isUpward() bool
Determines the upward or downward direction
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

Static Methods

lerp(BarChartRodData a, BarChartRodData b, double t) BarChartRodData
Lerps a BarChartRodData based on t value, check Tween.lerp.