Index | OAT homepage | OpenLink Software

piechart.js

piechart.js

Library for drawing Pie charts using SVG.

Objects

OAT.PieChart(div, options)

Creates a Pie Chart inside specified div. You can specify the following options:

Methods

OAT.PieChart::attachData(dataArray)

Adds data to chart.

OAT.PieChart::attachText(textArray)

Adds legend labels.

OAT.PieChart::attachColors(colorArray)

Adds colors.

OAT.PieChart::draw()

Draws the chart.


var chart = new OAT.PieChart("myDiv",{});
chart.attachData([1,3,2]);
chart.attachText(["a","b","c"]);
chart.attachColors(["#f00","#0f0","#00f"]);
chart.draw();
Copyright (C) 2005-2009 OpenLink Software