Plots not shown

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 J Likonen on 26th December 2013
HI,

I have ben trying to use Rgraph without any success with IE11 (under Win7). My code is really simple:

<html>
  <head>
   <title> Testi </title>

<script type="text/javascript" src="/javascript/rgraph/RGraph.common.core.js"></script>
<script type="text/javascript" src="/javascript/rgraph/RGraph.line.js"></script>
 
  </head>

  <body>

<canvas id="myCanvas" width="600" height="250">[No canvas support]</canvas>
  
  <script>
     window.onload = function ()
     {
         var data = [280, 45, 133, 166, 84, 259, 266, 960, 219, 311, 67, 89];

         var bar = new RGraph.Bar('myCanvas', data)
             .Set('labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'])
             .Set('gutter.left', 35)
             .Draw();
     }
</script>


  </body>
</html>

Any ideas why the plot is not shown on my aspx-page?

Best regards,
Jari
Posted by RGraph support on 26th December 2013
Hi there,

You haven't included the Bar chart library - but the Line chart library instead.

If you're using IE11 you can press F12 to bring up the webdev tools and then view the console which will give you helpful error messages.






Richard
Posted by J Likonen on 27th December 2013
Hi Richard,

OK, thanks. That was my mistake. I was trying so many different things yesterday that I forgot to include the bar chart library. I added a line <script src="RGraph.bar.js"></script> (and checked that the js-file is on html root). I still don't get the plot.

Best regards,
Jari
Posted by RGraph support on 27th December 2013
Hi there,

Check your console for an error message - and try the modifying one of the demos that come with RGraph.



Richard

Add a reply




« Back to message list