KeyboardDomainNavigator<D> class abstract

Enable keyboard navigation of the chart when focused using the directional keys.

This behavior enables keyboard navigation over the domains of the chart when focused using the following keys:

  • Arrow left/right keys will move the hover selection over the chart domains.
  • Escape will clear both hover and click selections.
  • Enter/space will update the click selection to the hover selection.

This behavior does not add any visual cues or accessibility text, so it is ideally used along with other behaviors that handle hover/click selections and add these types of visual and/or accessibility cues.

Note that using this behavior requires configuring the tabIndex of your chart component. Using the default value of 0 makes the chart focusable in the natural order of the page, but you have the option to use whatever fine-tuned order works best.

Implemented types

Constructors

KeyboardDomainNavigator()

Properties

hashCode int
The hash code for this object.
no setterinherited
role String
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

attachTo(BaseChart<D> chart) → void
Injects the behavior into a chart.
override
clearSelection() → void
Triggers when the Escape key is pressed or the chart loses focus.
handleEnter() bool
handleEscape() bool
handleNextDomain() bool
handlePreviousDomain() bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onData(List<MutableSeries<D>> _) → void
Resets any hidden series data when new data is drawn on the chart.
removeFrom(BaseChart<D> chart) → void
Removes the behavior from a chart.
override
selectDomain(int domainIndex) → void
Triggers when the Enter or Space key is pressed.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited