You're welcome.

On Thursday, August 16, 2012 3:23:43 AM UTC-4, Luca Bulegato wrote:
>
> Thanks a lot 
> your help is veru useful !!
>
> Il giorno martedì 14 agosto 2012 18:09:08 UTC+2, asgallant ha scritto:
>>
>> There is the #getViewRowIndex method, which translates the row index from 
>> the underlying DataTable into the row's index in the view. 
>>
>> On Tuesday, August 14, 2012 5:13:41 AM UTC-4, Luca Bulegato wrote:
>>>
>>> Thanks a lot this is what  I need !!
>>>
>>> Is there a mirror method of view.getTableRowIndex which return the 
>>> position in the graph from the tablerow index ?
>>> This could be done in this way but I am wondering if there is a more 
>>> beutiful way:
>>>
>>>          var rows =   view.getViewRows();   
>>>         for(var i =0 ;i< rows.length;i++)
>>>         {
>>>             if(tablerow_index == rows[i])
>>>                 {
>>>                     chart_position = i;
>>>                     break;
>>>                 } 
>>>         }
>>>
>>> Thanka again
>>>
>>> Il giorno lunedì 13 agosto 2012 23:18:05 UTC+2, asgallant ha scritto:
>>>>
>>>> Incidentally, if you are just fetching data, you can use the view 
>>>> rather than translating back to the original DataTable, as long as the 
>>>> view 
>>>> has the columns you need.
>>>>
>>>> On Monday, August 13, 2012 4:35:34 PM UTC-4, asgallant wrote:
>>>>>
>>>>> 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/-/VVU5fqLz7I0J.
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