Chart<D> class
A widget to display the chart.
Specifications details of data visualization are seen in this class properties. The are set in the constructornew Chart.
Usually, if any specification or data is changed, the chart will rebuild or reevaluate automatically. Some subtle setting is controlled by rebuild and changeData. Note that function properties will always be regarded unchanged.
The generic D
is the type of datum in data list.
The properties of this chart sepcification are final because it is also an immutable StatefulWidget, but other specifications can be modified.
- Inheritance
Constructors
-
Chart({Key? key, required List<
D> data, bool? changeData, required Map<String, Variable< variables, List<D, dynamic> >VariableTransform> ? transforms, required List<Mark< marks, Coord? coord, EdgeInsets padding(Size)?, List<Shape> >AxisGuide> ? axes, TooltipGuide? tooltip, CrosshairGuide? crosshair, List<Annotation> ? annotations, Map<String, Selection> ? selections, bool? rebuild, StreamController<GestureEvent> ? gestureStream, StreamController<ResizeEvent> ? resizeStream, StreamController<ChangeDataEvent< ? changeDataStream})D> > -
Creates a chart widget.
const
Properties
-
annotations
→ List<
Annotation> ? -
Specifications of annotations.
final
-
axes
→ List<
AxisGuide> ? -
Specifications of axes.
final
- changeData → bool?
-
The behavior of data reevaluation when widget is updated.
final
-
changeDataStream
→ StreamController<
ChangeDataEvent< ?D> > -
The interaction stream of change data events.
final
- coord → Coord?
-
Specification of the coordinate.
final
- crosshair → CrosshairGuide?
-
Specification of pointer crosshair on selections.
final
-
data
→ List<
D> -
The data list to visualize.
final
-
gestureStream
→ StreamController<
GestureEvent> ? -
The interaction stream of gesture events.
final
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
marks
→ List<
Mark< Shape> > -
Specifications of geometry marks.
final
- padding → (EdgeInsets Function(Size)?)
-
The padding from coordinate region to the widget border.
final
- rebuild → bool?
-
The behavior of chart rebuilding when widget is updated.
final
-
resizeStream
→ StreamController<
ResizeEvent> ? -
The interaction stream of resize events.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
-
selections
→ Map<
String, Selection> ? -
Name identifiers and specifications of selection definitions.
final
- tooltip → TooltipGuide?
-
Specification of tooltip on selections.
final
-
transforms
→ List<
VariableTransform> ? -
Specifications of transforms applied to variable data.
final
-
variables
→ Map<
String, Variable< D, dynamic> > -
Name identifiers and specifications of variables.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → ChartState< D> -
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
-
equalSpecTo(
Object other) → bool - Checks the equlity of two chart specifications.
-
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}) → 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