ChartSyncGroup class
Links multiple ChartController instances for dashboard-style sync. Synchronizes: zoom window, pan offset, and data selection.
Typical use-case: a dashboard where a date-range selection on a line chart should also zoom a bar chart showing the same period.
final group = ChartSyncGroup();
final lineCtrl = group.add(ChartController());
final barCtrl = group.add(ChartController());
// Zooming lineCtrl will now also zoom barCtrl.
lineCtrl.zoomTo(start: 10, end: 50);
- Inheritance
-
- Object
- ChangeNotifier
- ChartSyncGroup
Constructors
Properties
- controllerCount → int
-
Number of live controllers currently registered in the group.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isDisposed → bool
-
Whether this sync group has been disposed.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
add(
ChartController ctrl) → ChartController - Add a controller to the group and wire it up for synchronization.
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
dispose(
) → void -
Discards any resources used by the object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
remove(
ChartController ctrl) → void - Remove a controller from the group and stop synchronization.
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited