ChartData<K extends LabelData, V extends num> class
Contain Map of type K and V value and optional onPressed function that can be used to call when the individual bar of barchart is pressed
Constructors
-
ChartData({required Map<
K, V> labelWithValue, required String barLabel, Color? barBackGroundColor, VoidCallback? onPressed}) -
const
Properties
- barBackGroundColor → Color?
-
final
- barLabel → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
labelWithValue
→ Map<
K, V> -
final
- maxSize → V
-
Calculate the maximum value that is present in the value of type V
no setter
- onPressed → VoidCallback?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getHeightValueForGivenKey(
K key) → V - Return sum of value with subsuquent value key. This is important to draw a bar in a stack as the subsequent value is smaller than the previous one creating stack of bars
-
getIndexForGivenKey(
K key) → int - Return the index for the given key for thelabelWithValue
-
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