Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

SelectNearest behavior doesn't work with SelectionTrigger.hover #410

Open
markathomas opened this issue Mar 2, 2020 · 5 comments
Open

Comments

@markathomas
Copy link

Trying to show the value of a graph on hover but the SelectNearest behavior doesn't work with SelectionTrigger.hover. It works with tap but business wants hover. Please advise.

@Maxwell-Thom
Copy link

+1

@huffSamuel
Copy link

I'm facing the same problem. Within my chart behaviors I'm using the following code:

charts.TimeSeriesChart(
...
  behaviors: <charts.Behaviors> [
    charts.PanAndZoomBehavior(),
    charts.SlidingViewport(
      charts.SelectionModelType.action
    ),
    charts.SelectNearest(
      eventTrigger: charts.SelectionTrigger.tap,
      selectionModelType: charts.SelectionModelType.action,
    ),
    charts.SelectNearest(
      eventTrigger: charts.SelectionTrigger.hover,
      selectionModelType: charts.SelectionModelType.info
    ),
  ]
...
);

In this case I get nothing when hovering over elements in the chart, my viewport jumps to wherever I tap, when I tap it does not draw a vertical line or highlight points on the chart, and hold+drag does not move the viewport.

However, if I remove the SelectNearest for charts.SelectionTrigger.hover tapping on the chart draws a vertical line and highlights points on the chart, does not move the viewport, and hold+drag moves the viewport with the mouse movement. This is the behavior I would expect with the exception of not getting data when hovering over the elements in the chart.

@cgowthamanmca
Copy link

@huffSamuel any answer

@huffSamuel
Copy link

I am still unable to get this to behave as expected.

@soluchok
Copy link

soluchok commented Feb 7, 2021

@kevmoo can you help with this issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants