ui.Chart

  • The ui.Chart widget displays a chart and takes dataTable , chartType , options , view , and downloadable as optional arguments.

  • The dataTable argument can be a 2-D array of data or a Google Visualization DataTable literal.

  • The chartType argument specifies the type of chart, such as 'ScatterChart', 'LineChart', or 'ColumnChart'.

  • The options argument is an object for defining chart style options like title and colors.

  • The downloadable argument determines if the chart can be downloaded as CSV, SVG, and PNG and defaults to true.

A chart widget.
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:
title (string) The title of the chart.
colors (Array) An array of colors used to draw the chart.
Its format should follow the Google Visualization API's options: https://developers.google.com/chart/interactive/docs/customizing_charts
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.
Create a Mobile Website
View Site in Mobile | Classic
Share by: