DailyJS

gRaphaël: A Javascript Charting Library

Ric Roberts

Subscribe

@dailyjs

Facebook

Google+

libraries graphics

gRaphaël: A Javascript Charting Library

Posted by Ric Roberts on .
Featured

libraries graphics

gRaphaël: A Javascript Charting Library

Posted by Ric Roberts on .

Raphaël is a great little JavaScript library that helps to simplify working with vector graphics on the web. It uses
SVG where possible (or VML for IE6+).

gRaphaël is a graphing library based on Raphaël, providing a way to draw pie, bar, line and dot charts,
including support for interactive features such as dynamic labels and
highlighting.

To draw a chart with gRaphaël you need to include on your page
raphael.js, g.raphael.js and the script for the particular chart(s) you
need (e.g. g.pie.js).

Then you can just create a raphael canvas, and draw your chart on it.

  var r = Raphael("holder");                                                
  r.g.piechart(320, 240, 150, [55, 20, 13, 32, 5, 1, 2, 10]);

The documentation is a bit thin on the ground at the moment, but Raphaël
is quite nice to work with and there are a few examples on the
website to get you started.