Question

I am displaying a simple bar chart using RGraph. Found here:RGraph

Here is my code: var vprogress = new RGRAPH.VProgress('vc',200,500); vprogress.draw()

I also have the following line in my index.hmtl :

<!--[if IE]><script src="/excanvas/excanvas.js"></script><![endif]-->

I also have this in my index.html

<canvas id="vc" width="100px" height="800px">[No Canvas Support]</canvas>

I am unable to view the graph in either IE 6 and 8, I haven't been able to test in 7.

I am getting line errors in excanvas.js and nothing displays.

The graphs work perfectly in Chrome and Firefox.

I must also mention that my javascript is done in a Jquery Ajax function.

Any help would be appreciated.

Was it helpful?

Solution

To anyone interested.

I found that the problem was that I included 'px' in the height and the width. Remove these for it to function correctly.

OTHER TIPS

For IE, I would also add that you must wrap your Graph code in a window.onload function:

window.onload = function() {
  var vprogress = new RGRAPH.VProgress('vc',200,500); 
  vprogress.draw();
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top