Using the same canvas for multiple 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 kiran on 9th September 2013
hi i am trying to use the same canvas for multiple charts but then the previous chart still appears. As mentioned in your document i use the RGraph.Reset(canvas);

please post an example on how to do it.

thank you
Posted by RGraph support on 9th September 2013
Hi there,

Simply use that before you draw the new chart. Like this demo page does:

www.rgraph.net/demos/bar-css3-animations.html


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 Jeffery Wright on 25th September 2013
I'm trying to have multiple vertical charts on a page, since each chart will have different scales, I tried this:

     <canvas id="temp" width="100" height="300">[No canvas support]</canvas>
     <canvas id="ps1" width="100" height="300">[No canvas support]</canvas>
    
     <script>
         window.onload = function ()
         {
         var vprogress = new RGraph.VProgress('temp',0,100,50)
   
                 .Set('tickmarks', 100)
                 .Set('numticks', 20)
                 .Set('gutter.right', 30)
                 .Set('margin', 5)
                 .Draw();
    
  var vprogress = new RGraph.VProgress('psi',0,60,50)
          .Set('tickmarks', 100)
                 .Set('numticks', 20)
                 .Set('gutter.right', 30)
                 .Set('margin', 5)
                 .Draw();
        
   }
     </script>


But it only displays the first chart, is there a way to make this possible? Thanks!
Posted by Jeffery Wright on 25th September 2013
Ignore the post, I see that my sloppy keystrokes are the issue...

Add a reply




« Back to message list