Class charts.DonutChart
Extends
charts.PieChart.
Defined in: DonutChart.js.
Constructor Attributes | Constructor Name and Description |
---|---|
charts.DonutChart(container)
DonutChart 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 . |
|
Gets circle area content.
|
- Methods borrowed from class charts.BaseChart:
- drawContent, getDataColumns, getDataRange, getDataRows, getMaxValue, getMinValue, getOptions
Class Detail
charts.DonutChart(container)
DonutChart constructor.
var chart = new charts.DonutChart('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: { 'donut': {'color': '#fff', 'radius': 0.5} }
- Parameters:
-
{!Array.
} data - A chart data.
- {Object=} opt_options
- A optional chart's configuration options.
{string}
getAreaContent()
Gets circle area content.
- Returns:
- {string} Returns circle area content.