How to convert HTML hidden values to CSV format


« 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 Madhu on 27th April 2013
my code is below.

<script>
         window.onload = function ()
         {
   var data = (document.getElementById("hiddenid").value).split("!");
   alert(data[0]+" "+data[1]);
             var radar3 = new RGraph.Radar('cvs', [data[0],data[1]])
                 .Set('chart.labels', ['', 'Barry', 'Gary','Dave','Paul','Rich'])
                 .Set('chart.tooltips', [
                                         'Mal', 'Barry', 'Gary','Dave','Paul', 'Rich',
                                         'Mal', 'Barry', 'Gary','Dave','Paul', 'Rich'
                                        ])
                 .Set('chart.background.circles.poly', true)
                 .Set('chart.background.circles.spacing', 30)
                 .Set('chart.colors', ['transparent'])
                 .Set('chart.axes.color', 'transparent')
                 .Set('chart.highlights', true)
                 .Set('chart.strokestyle', ['red', 'black'])
                 .Set('chart.linewidth', 2)
                 .Set('chart.linewidth', 2)
                 .Set('chart.labels.axes', 'n')
                 .Set('chart.text.size', 16)
                 .Draw();
         }
     </script>

     <p>
         <a href="./">« Back</a>
     </p>
<input type="hidden" id="hiddenid" value="[8,7,6,7,8,6]! [8,9,4,6,6,8]" />

Please help me on this. this is very urgent for me.

Thanks,
Madhu.
Posted by RGraph support on 29th April 2013
Hi there,

Hi,

You can split data from form fields like this:

dev.rgraph.net/fiddle/view/12aabfcd31146d849a2514c0c62a5895

PS Please remember to 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
RGraph on social media