HTML5 and CSS3, Second Edition

(singke) #1
html5_canvas/javascripts/graph.js
➤ $(document).ready(function(){
varcanvas= document.getElementById('browsers');
if(canvas.getContext){
canvasGraph();

});

}



Now everything works in Internet Explorer 8, as well!


Using the canvas has an additional benefit—it got us to start thinking about
a fallback solution from the beginning, rather than trying to wedge something
in later. That’s really good for accessibility. This is one of the most accessible
and versatile methods available for graphing data. You can easily create the
visual representation as well as a text-based alternative. This way, everyone
can understand the important data you’re sharing.

Now let’s look at a completely different way to draw things in the browser.


report erratum • discuss

Graphing Statistics with RGraph • 125


Download from Wow! eBook <www.wowebook.com>

Free download pdf