Class charts.PieChart
Extends
charts.BaseChart.
Defined in: PieChart.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
charts.PieChart(container)
PieChart constructor.
|
- Fields borrowed from class charts.BaseChart:
- container, defaults, tooltip
| Method Attributes | Method Name and Description |
|---|---|
|
draw(data, opt_options)
Draws the chart based on
data and opt_options. |
- Methods borrowed from class charts.BaseChart:
- drawContent, getDataColumns, getDataRange, getDataRows, getMaxValue, getMinValue, getOptions
Class Detail
charts.PieChart(container)
PieChart constructor.
var chart = new charts.PieChart('container_id');
chart.draw([['Work', 'Eat', 'Commute', 'Watch TV', 'Sleep'],
[100, 50, 30, 10, 40], [140, 2, 110, 150, 1300]]);
- Parameters:
- {string|Element} container
- The HTML container.
- Requires:
- formatters.NumberFormatter
Method Detail
draw(data, opt_options)
Draws the chart based on
data and opt_options.
options: {
'animation': {'radius': 0.7}
'font': {'color': '#fff'}
'stroke': {'stroke': 1}
}
- Parameters:
-
{!Array.
} data - A chart data.
- {Object=} opt_options
- A optional chart's configuration options.