Chart Interaction
Reference External Link
Namespace:
options.interaction. To configure which events trigger chart interactions, see events.
.Options(o => o
.Interaction(i => i
.Mode(InteractionMode.Index)
.Axis(Axis.X)))"options": {
"interaction": {
"mode": 2,
"axis": "x"
}
}Mode
Sets which elements appear in the interaction. Default 'nearest' External Link
.Mode(InteractionMode.Index)Intersect
if true, the interaction mode only applies when the mouse position intersects an item on the chart. Default true
.Intersect(true)Axis
Can be set to 'x', 'y', 'xy' or 'r' to define which directions are used in calculating distances. Defaults to 'x' for 'index' mode and 'xy' in dataset and 'nearest' modes.
.Axis(Axis.X)IncludeInvisible
if true, the invisible points that are outside of the chart area will also be included when evaluating interactions. Default false
.IncludeInvisible(true)