Unable to click on Pie segment

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 Arthur on 10th April 2013
www.rgraph.net/demos/pie-explode-when-clicked.html

based on the example above, i tried following the example by adding dollar sign syntax.
however, it doesnt work.

i checked and rechecked that i have included all the js script in head tag.

what could be the problem?
Posted by RGraph support on 11th April 2013
Hi there,

Since you haven't posted a link to an example - I have no idea. Bur that particular example uses dllar-sign syntax so you could just copy it verbatim.



Richard, RGraph Support

5 developer license with Priority support for £299:
   www.rgraph.net/license#five.developer
Posted by Arthur on 11th April 2013
actually i just copy paste the code and put in htdocs in my local machine..
anyway, i found out its perl syntax problem.
i wrote this in perl, when perl compiles and comes to dollar sign, perl read it as variable, so i simply put backslash for perl to disregard the dollar sign as variable and read it as html/javascript syntax...and it works..


btw, is it possible to click the charts only once?
i have
pie.$1.onclick=function(e, shape)
{
bla..bla...bla...
}

i notice that every click, it draws and redraws new graph, Rgraph possible to make it only able to click once?
Posted by RGraph support on 11th April 2013
Hi there,
You could do that if you wanted to. in your onclick listener, at the bottom, you can add the code so that it's not called again. For example:

pie.$1.onclick=function(e, shape)
{
     // bla..bla...bla...

     pie.$1.onclick = null;
}

PS Could you link to the RGraph website - cheers.

Richard, RGraph Support

5 developer license with Priority support for £299:
   www.rgraph.net/license#five.developer

Add a reply




« Back to message list