Automatically display tooltip in Scatter chart

Share RGraph:   To help my Google visibility (it can't get much worse!), if you like and use RGraph I'd appreciate it if you could link to me

« 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 George on 1st February 2014
Hi

I would like to have a scatter graph which automatically shows a specific tooltip.

I have tried something similar with a bar chart and it worked fine, however for a scatter chart the following code gives the error:
TypeError: shape is undefined
var dataset = shape['dataset'];

var scatter = new RGraph.Scatter('cvs', [
                                       [30,15, 'red', 'Red bubble tooltip'],
                                       [60,5, 'blue', 'Blue bubble tooltip'],
                                       [90,8, 'pink', 'Pink bubble tooltip']
                                      ])
                 .Set('xmax', 100)
       .Draw();
RGraph.Tooltip(scatter, 'Red bubble tooltip', 0, 0, 0, null);

Any help to resolve this would be much appreciated.

Many thanks
Posted by Richard on 1st February 2014
Hi there,

Well tooltips were never designed to be shown in this way - though it doesn't take much to 'trick' RGraph into doing it:

www.rgraph.net/fiddle/view/a-scatter-chart-showing-a-tooltip-by-default



Richard, RGraph Support
www.rgraph.net
If RGraph has helped you - please share the website - thanks!
Posted by George on 3rd February 2014
Thanks a million Richard! This is perfect work!

Add a reply




« Back to message list