AI-generated Key Takeaways
-
The
ui.Chartwidget displays a chart and takesdataTable,chartType,options,view, anddownloadableas optional arguments. -
The
dataTableargument can be a 2-D array of data or a Google Visualization DataTable literal. -
The
chartTypeargument specifies the type of chart, such as 'ScatterChart', 'LineChart', or 'ColumnChart'. -
The
optionsargument is an object for defining chart style options like title and colors. -
The
downloadableargument determines if the chart can be downloaded as CSV, SVG, and PNG and defaults to true.
| Usage | Returns |
|---|---|
ui.Chart(dataTable, chartType, options, view, downloadable) | ui.Chart |
| Argument | Type | Details | ||
|---|---|---|---|---|
dataTable | List<List<Object>>|Object|String, optional | A 2-D array of data or a Google Visualization DataTable literal. See: http://developers.google.com/chart/interactive/docs/reference#DataTable | ||
chartType | String, optional | The chart type; e.g 'ScatterChart', 'LineChart', and 'ColumnChart'. For the complete list of charts, see: https://developers.google.com/chart/interactive/docs/gallery | ||
options | Object, optional | An object defining chart style options such as:
| ||
view | Object, optional | Sets a DataView initializer object, which acts as a filter over the underlying data. See: https://developers.google.com/chart/interactive/docs/reference#DataView | ||
downloadable | Boolean, optional | Whether the chart can be downloaded as CSV, SVG, and PNG. Defaults to true. |