Tooltips not showing on Pie chart with 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.



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,
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.



If RGraph has helped you please give your feedback - thanks! You can give your feedback or leave a testimonial by adding a forum post or clicking on the speech bubble icon at the very top right.

But most of all: Please link to the RGraph website! (get information by clicking on the chain icon at the top right of the page)
Posted by Todd R. on 16th June 2016



Add a reply


« Back to message list
RGraph on social media