Multiple tootltips


« 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 Philip W on 1st November 2013
I'm working on a bar graph where I currently have tool tips when the bar is being hovered over. Is there a listener of sorts that when a bar is not being hovered over can get rid of the initial tool tip and show another tool tip when nothing is being hovered over and place the other tooltip somewhere within the gutter of the graph?
Posted by RGraph Support on 2nd November 2013
Hi there,

This example uses the ondraw RGraph event to first check whether a tooltip is being shown (by checking whether it's in the RGraph registry) and if it's not then do an alert. You can of course change the alert to show a div instead.

Also, if a shape isn't being hovered over then the Bar charts .getShape(e) method will return null - so if it does that then you can show your DIV. And you could use that in a mousemove event listener - like this:

www.rgraph.net/fiddle/view/a-bar-chart-using





Richard, RGraph Support
Please remember to link to the RGraph website

Help support RGraph - single site license only £99
    www.rgraph.net/license#single-site
Posted by Philip W on 4th November 2013
Getting example doesn't exist when i click the link
Posted by RGraph Support on 4th November 2013
Hi there,

Try this one:

www.rgraph.net/fiddle/view/a-bar-chart-using-the-canvas-onmousemove-event


Richard, RGraph Support
Please remember to link to the RGraph website

Help support RGraph - single site license only £99
    www.rgraph.net/license#single-site
Posted by Philip W on 4th November 2013
Is it possible to add an additional tooltip with a completely different array and different attributes?
Posted by RGraph support on 4th November 2013
Hi there,

No, but you could use the ontooltip event to create and show your own tooltip.



Richard, RGraph Support
Please remember to link to the RGraph website (or buy an RGraph
license and you don't need to!)

Single developer license just £199:
   www.rgraph.net/license#one-developer

Add a reply

 




« Back to message list
RGraph on social media