ColumnChart class
Introduction
A column chart is a method of displaying data with categories represented by a rectangle—sometimes called vertical bar charts. They allow easy comparisons among a number of items and trends analysis.
Preview
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- DrivenChart
- ColumnChart
Constructors
-
ColumnChart({Key? key, double width = 500, double height = 300, required List<
ChartLabeledData> datas, ChartController<ChartLabeledState> ? controller, ChartAnimation? animation, ChartBehavior<ChartState> ? behavior, Color? backgroundColor, double barRatio = 0.5, double? maxValue, ChartMarkType markType = ChartMarkType.integer, ChartInteractionCallback<ChartState> ? onTap, ChartInteractionCallback<ChartState> ? onDoubleTap, ChartInteractionCallback<ChartState> ? onLongPress, ChartInteractionCallback<ChartState> ? onHoverStart, ChartInteractionCallback<ChartState> ? onHoverEnd, int separatedLineCount = 5, double separatedLineWidth = 2, Color? separatedLineColor, TextStyle? separatedTextStyle, double separatedTextMargin = 15, ChartSeparatedTextAlignment separatedTextAlignment = ChartSeparatedTextAlignment.trailing, ChartSeparatedTextDirection separatedTextDirection = ChartSeparatedTextDirection.leading, Color? separatedBorderColor, double? separatedBorderWidth, StrokeCap separatedLineCap = StrokeCap.butt, double labelTextMargin = 5, TextStyle? labelTextStyle, double barInnerTextMargin = 10, double barOuterTextMargin = 3, ChartTextStyleBuilder<ChartLabeledState> ? barInnerTextStyle, ChartTextStyleBuilder<ChartLabeledState> ? barOuterTextStyle, ChartBarTextAlignment barTextAlignment = ChartBarTextAlignment.outer, BorderRadius barBorderRadius = const BorderRadius.vertical(top: Radius.circular(5)), Color? barColor, bool isVisibleSeparatedText = true, bool isVisibleBarText = false, bool isVisibleLabel = true}) -
const
Properties
- animation → ChartAnimation?
-
The instance that defines current animation setting values of the chart.
final
- backgroundColor → Color?
-
The background color excluding the separated text area and the bottom labels area.
final
- barBorderRadius → BorderRadius
-
final
- barColor → Color?
-
final
- barInnerTextMargin → double
-
final
-
barInnerTextStyle
→ ChartTextStyleBuilder<
ChartLabeledState> ? -
final
- barOuterTextMargin → double
-
final
-
barOuterTextStyle
→ ChartTextStyleBuilder<
ChartLabeledState> ? -
final
- barRatio → double
-
The ratio that is rate of width at which the bar is rendered in the bar area.
final
- barTextAlignment → ChartBarTextAlignment
-
final
-
behavior
→ ChartBehavior<
ChartState> ? -
The instance that defines current behavior of the chart.
final
-
controller
→ ChartController<
ChartLabeledState> ? -
The instance that defines the current controller of the chart.
final
-
datas
→ List<
ChartLabeledData> -
The values that defines the current datas of column chart.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
finalinherited
- isVisibleBarText → bool
-
final
- isVisibleLabel → bool
-
final
- isVisibleSeparatedText → bool
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- labelTextMargin → double
-
final
- labelTextStyle → TextStyle?
-
final
- markType → ChartMarkType
-
The value that defines type of how to display values in a chart.
final
- maxValue → double?
-
The value that defines the maximum value in this chart.
final
-
onDoubleTap
→ ChartInteractionCallback<
ChartState> ? -
The callback that is called when each bar in the column chart is double tapped.
final
-
onHoverEnd
→ ChartInteractionCallback<
ChartState> ? -
The callback that is called when each bar in the column chart is hover ended.
final
-
onHoverStart
→ ChartInteractionCallback<
ChartState> ? -
The callback that is called when each bar in the column chart is hover started.
final
-
onLongPress
→ ChartInteractionCallback<
ChartState> ? -
The callback that is called when each bar in the column chart is long pressed.
final
-
onTap
→ ChartInteractionCallback<
ChartState> ? -
The callback that is called when each bar in the column chart is single tapped.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- separatedBorderColor → Color?
-
final
- separatedBorderWidth → double?
-
final
- separatedLineCap → StrokeCap
-
final
- separatedLineColor → Color?
-
final
- separatedLineCount → int
-
final
- separatedLineWidth → double
-
final
- separatedTextAlignment → ChartSeparatedTextAlignment
-
final
- separatedTextDirection → ChartSeparatedTextDirection
-
final
- separatedTextMargin → double
-
final
- separatedTextStyle → TextStyle?
-
final
- theme → ChartTheme?
-
finalinherited
- width → double
-
finalinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ColumnChart> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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
-
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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited