ScatterChart class
Shows a scatter chart backed by a core ScatterChart (ScatterChartView in
package:mp_flutter_chart/mp_flutter_chart.dart). Configure the chart once in setup and put anything derived from
the theme or other widget state into update.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ScatterChart
Constructors
- ScatterChart({Key? key, required ScatterData? data, ChartController? controller, String? contentDescription, Widget marker(Entry entry, Highlight highlight)?, bool animateChanges = false, void setup(ScatterChart chart)?, void update(ScatterChart chart)?})
-
Creates a scatter chart widget that shows
data.const
Properties
- animateChanges → bool
-
Whether a new data instance animates in from the values shown before, over 300 ms, instead of replacing them at
once; see ChartController.animateDataChange. Charts without data and data of another shape are set without
animation.
final
- contentDescription → String?
-
Text read by screen readers, null for none.
final
- controller → ChartController?
-
Reports selection and viewport back to widgets and drives the chart. Use one controller per chart; passing it to
another chart moves it there.
final
- data → ScatterData?
-
ScatterData to show. A new instance is applied to the chart, the same instance is left alone; call
ChartController.notifyDataChanged after changing it in place. Null clears the chart.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- marker → Widget Function(Entry entry, Highlight highlight)?
-
Builds the widget shown at the highlighted entry, null for no marker.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- setup → void Function(ScatterChart chart)?
-
Runs once, after the chart is created and before any data is set, so values it reads are frozen.
final
- update → void Function(ScatterChart chart)?
-
Runs on every build of this widget, right before the chart redraws.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ScatterChart> -
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