I'm using the Google Chart API to display my data with a line chart.
Because I have some specials needs for the legend, I set the original legend of the chart to none
then I displayed my own like I wanted it to be.
Everything works fine except one thing, I want to implement the legend hovering function
which when you hover a specific line of the original legend of the chart, the associated line is selected and displayed thicker.
My problem is similar to this question : Google charts invoke onmouseover event
And I'm actually trying to adapt the code from the selected answer to my case. But I'm not able to.
Here is a fiddle with the code of my html page.
The $('#legend tr').hover
is correctly fired when I hover the legend, because if I add an alert($(this).data('row'))
I get the correct data-row
value displayed in the alert box. But nothing happens on the chart. It seems like the chart.setSelection()
isn't working or something.
How can I modify my code to handle the hover event ?