Fetch the value of textboxes and represent it in any of the charts.

Share RGraph:   Share or Like RGraph on Facebook!

« 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 Armand Joseph on 6th December 2012
Hi! I'm a newbie here. I wonder how I can fetch the value of a textbox and represent it in a chart. Any help will be appreciated.
Posted by RGraph support on 6th December 2012
Hi,

You can get the text box value as normal with document.getElementById(), convert it to a number, set the appropriate property, clear the canvas and redraw the chart. There's a HOWTO regarding setting a text box from the chart (so the reverse of what you want) here:

www.rgraph.net/docs/howto-gauge-form.html

And the list of relevant properties is here:

www.rgraph.net/docs/api.html#data
Posted by Armand Joseph on 7th December 2012
Thank you very much! I figured it out a minute later when I posted this. I will study your post Admin! Btw, RGraph is very useful in my thesis. I'm very glad and thankful! :)

Add a reply




« Back to message list