Tooltips for multiline charts

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 Anus on 15th November 2013
hi,
i want to display tooltips using dynamic values getting from models, for single line and multiline charts too..

is it possible? and is there any functions available for this ?
Posted by RGraph support on 15th November 2013
Hi there,

Not sure what you're asking. If you want to create your own tooltips there's the chart.tooltips.override option that you can use to specify a function which creates your own tooltip.

www.rgraph.net/docs/using-tooltips-in-your-charts.html#override




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 Anus on 15th November 2013
hi,
thanks for immediate reply..

but i dont know how to override the function..

my issue is
  i have values in servlets like
this.dirVal=[[100.0,100.0,100.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[99.0,50.0,50.0,50.0,50.0,50.0,0.0,0.0,0.0,0.0,0.0,0.0]];
which are dynamic

so how do i provide tooltip for this..
Posted by RGraph support on 15th November 2013
Hi there,

There's an example of specifying the function at the link I gave you. Another thing you can do is this (IIRC):

function myFunc ()
{
     return 'Sample tooltip';
}

obj.Set('chart.tooltips', myFunc);


As shown here:


www.rgraph.net/fiddle/view/new-rgraph-example-using-a-dynamic-tooltip





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 Anus on 15th November 2013
hi,

what you said is giving the values straight in the function..

what i need is another method to get multiple arrays from the servlets which values are always changing ..

for that override function idx specifies an array but i m totally got blank how to specify multiple arrays for multiple lines charts..

thanks in advance..
Posted by RGraph support on 15th November 2013
Hi there,

Servlets are a Java thing IIRC - which is server based. If you need to get the tooltip text from the server you'll need to make an AJAX call and then set the tooltip(s) to the results of it.

Or just embed the text in the page as part of the initial Java script and then RGraph can use it for the tooltips.




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