The row property of the event returns the row in the DataView used to draw 
the chart, which you can get by calling the chart wrapper's #getDataTable 
method.   The view then has a method #getTableRowIndex which translates the 
row index into the index of the DataTable/DataView that was used to draw 
the dashboard (typically this is your DataTable, but you could have a 
different setup).

google.visualization.events.addListener(chart.getChart(), 'onmouseover', 
function (e) {
    var view = chart.getDataTable();
    var tableRow = view.getTableRowIndex(e.row);
    // do something with tableRow
});

On Monday, August 13, 2012 1:05:07 PM UTC-4, Luca Bulegato wrote:
>
> Hi all,
> I have some problem with changerangefilter and linechart or probably I am 
> missing something,.
> I am drawing a linechart with a ChartRangeFilter control.
> I have a listner for onmouseover on the chart and when I pass the mouse 
> over the chart i get the events with the overHandler(e) function.
> Then I get the e.row element in order to get the row in the datatable 
> "under" the chart.
> This works great but when I change the range of the ChartRangeFilter the 
> e.row value is about the point in the graph ..not in the datatable...
>
> So in general How can i Get the right row in the datatable after a 
> mouseover event in the chart ?
>
> thanks a lot
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/PRJu539BDzwJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to