Class charts.LineChart
Extends
charts.BaseChart.
Defined in: LineChart.js.
Constructor Attributes | Constructor Name and Description |
---|---|
charts.LineChart(container)
LineChart 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.LineChart(container)
LineChart constructor.
var chart = new charts.LineChart('container_id'); chart.draw([['Year', 'Sales', 'Expenses', 'Profit'], [2008, 10, 65, 90], [2009, 165, 30, 60], [2010, 85, 150, 20], [2011, 80, 60, 45], [2012, 65, 130, 90], [2013, 45, 100, 60]]);
- Parameters:
- {string|Element} container
- The HTML container.
- Requires:
- charts.Grid
- formatters.NumberFormatter
Method Detail
draw(data, opt_options)
Draws the chart based on
data
and opt_options
.
options: { 'stroke': 2, 'radius': 4, 'opacity': 0.4, 'font': {'size': 11} }
- Parameters:
-
{!Array.
} data - A chart data.
- {Object=} opt_options
- A optional chart's configuration options.