Builds the chart.
Reverses the drawing of series in the domain axis.
Reverses the drawing of series in the domain axis. For vertical-range charts (such as line, area or column charts), this means the horizontal axis is drawn from right to left. For horizontal-range charts (such as bar charts), this means the vertical axis is drawn from top to bottom. For pie charts, this means the slices are drawn counterclockwise.
Sets the chart to be three-dimensional.
Sets the background color for the chart.
Sets the colors for the lines in the chart.
Sets the data source URL that will be used to pull data in from an external source, such as Google Sheets.
Sets the data source URL that will be used to pull data in from an external source, such as Google Sheets. If a data source URL and a DataTable are provided, the data source URL is ignored. For more information about querying data sources, check out the Google Charts documentation.
Sets the data table which contains the lines for the chart, as well as the X-axis labels.
Sets the data table which contains the lines for the chart, as well as the X-axis labels. The first column should be a string, and contain the horizontal axis labels. Any number of columns can follow, all must be numeric. Each column is displayed as a separate line.
Sets the data table to use for the chart using a DataTableBuilder.
Sets the data table to use for the chart using a DataTableBuilder. This is a convenience method for setting the data table without needing to call build().
Sets the data view definition to use for the chart.
Sets the dimensions for the chart.
Sets the position of the legend with respect to the chart.
Sets the position of the legend with respect to the chart. By default, there will be no legend.
Sets the text style of the chart legend.
Sets the title of the chart.
Sets the title of the chart. The title will be displayed centered above the chart.
Sets the text style of the chart title.
PieChartBuilder A builder for pie charts. For more details, see the Google Charts documentation. Here is an example that shows how to build a pie chart. The data is imported from a Google spreadsheet.
function doGet() { // Get sample data from a spreadsheet. var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=A1%3AB8' + '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=3&headers=-1';
var chartBuilder = Charts.newPieChart() .setTitle('World Population by Continent') .setDimensions(600, 500) .set3D() .setDataSourceUrl(dataSourceUrl);
var chart = chartBuilder.build(); return UiApp.createApplication().add(chart); }