My tooltips aren't showing on a Pie chart with the mousemove event


« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Todd R. on 16th June 2016
First, love the library, very easy to use and extremely functional. Second, I'm trying to have tooltips work when I move the mouse over the pie chart and it is not working. It shows up when I click, but not when the mouse moves over the chart. I'm using IE11.

Thanks,

Todd

Code is:
     var pie = new RGraph.Pie({
       id: 'pie0',
       data: {txtTotData},
       options: {
       strokestyle: 'rgba(0,0,0,255)',
       linewidth: 2,
       radius: 80,
       colors: {txtColor},
       title: 'COS All Units',
       labels: {txtTotData},
       tooltips: ['City: ' + aCTotData[0] + '<br>CSU: ' + aUTotData[0],
                  'City: ' + aCTotData[1] + '<br>CSU: ' + aUTotData[1],
                  'City: ' + aCTotData[2] + '<br>CSU: ' + aUTotData[2],
                  'City: ' + aCTotData[3] + '<br>CSU: ' + aUTotData[3],
                  'City: ' + aCTotData[4] + '<br>CSU: ' + aUTotData[4],
                  'City: ' + aCTotData[5] + '<br>CSU: ' + aUTotData[5]],
       tooltipsEvent: onmousemove,
       }
     }).draw();
Posted by Richard on 16th June 2016
Hi there,

You need quotes around the onmousemove (because it's a string). So the line looks like this:

tooltipsEvent: 'onmousemove'


As it's the final option you don't need a trailing comma either.




Richard
Posted by Todd R. on 16th June 2016
Perfect!!!

Thanks,

Todd

Add a reply




« Back to message list