Fluent2BarChart class
Vertical bars across categories or days: bars grown from one hairline baseline in their hue (the brand by default), at most 24 wide with a 4 rounded top; the highlighted one in the full hue and the rest at a lighter wash of it, each value printed over its cap in caption1 (the highlighted one in the first ink, strong) and each label under the baseline in caption1. With onHighlight each bar is a button that picks it. Derived: Fluent's charting has a VerticalBarChart; this one is drawn from the tokens to common chart mark specs. Read as label, then every bar and its value.
Fluent2BarChart(label: 'Meeting hours this week', highlight: 2, bars: const [Fluent2Bar('Mon', 3), Fluent2Bar('Tue', 5), Fluent2Bar('Wed', 6)])
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- Fluent2BarChart
Constructors
-
Fluent2BarChart({required List<
Fluent2Bar> bars, int? highlight, ValueChanged<int> ? onHighlight, Fluent2ChartHue hue = Fluent2ChartHue.brand, double height = 160, String? label, Key? key}) -
A bar chart of
bars.const
Properties
-
bars
→ List<
Fluent2Bar> -
The bars, in order.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
The whole chart's height, labels included.
final
- highlight → int?
-
The bar drawn in the full hue; null draws them all full.
final
- hue → Fluent2ChartHue
-
The bars' colour.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String?
-
What it shows ("Meeting hours this week").
final
-
onHighlight
→ ValueChanged<
int> ? -
Told the bar pressed; null leaves the bars still.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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.
override
-
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