Google Apps Script

Charts Service

This service allows users to create charts using Google Charts Tools, primarily within Ui Service interfaces.

This example creates a basic data table, populates an area chart with the data, and adds it to a UiApp:

function doGet() {
  var data = Charts.newDataTable()
      .addColumn(Charts.ColumnType.STRING, 'Month')
      .addColumn(Charts.ColumnType.NUMBER, 'In Store')
      .addColumn(Charts.ColumnType.NUMBER, 'Online')
      .addRow(['January', 10, 1])
      .addRow(['February', 12, 1])
      .addRow(['March', 20, 2])
      .addRow(['April', 25, 3])
      .addRow(['May', 30, 4])
      .build();

  var chart = Charts.newAreaChart()
      .setDataTable(data)
      .setStacked()
      .setRange(0, 40)
      .setTitle('Sales per Month')
      .build();

  var uiApp = UiApp.createApplication().setTitle('My Chart');
  uiApp.add(chart);
  return uiApp;
}

Classes

NameBrief description
AreaChartBuilderBuilder for area charts.
BarChartBuilderBuilder for bar charts.
CategoryFilterBuilderA builder for category filter controls.
ChartA Chart object, which can be embedded into documents, UI elements, or used as a static image.
ChartOptionsExposes options currently configured for a Chart, such as height, color, etc.
ChartTypeChart types supported by the Charts service.
ChartsEntry point for creating Charts in scripts.
ColumnChartBuilderBuilder for column charts.
ColumnTypeAn enumeration of the valid data types for columns in a DataTable.
ControlA user interface control object, that drives the data displayed by a DashboardPanel.
CurveStyleAn enumeration of the styles for curves in a chart.
DashboardPanelA dashboard is a visual structure that enables the organization and management of multiple charts that share the same underlying data.
DashboardPanelBuilderA builder for a dashboard panel object.
DataTableA Data Table to be used in charts.
DataTableBuilderBuilder of DataTable objects.
DataTableSourceInterface for objects that can represent their data as a DataTable.
DataViewDefinitionA data view definition for visualizing chart data.
DataViewDefinitionBuilderBuilder for DataViewDefinition objects.
LineChartBuilderBuilder for line charts.
MatchTypeAn enumeration of how a string value should be matched.
NumberRangeFilterBuilderA builder for number range filter controls.
OrientationAn enumeration of the orientation of an object.
PickerValuesLayoutAn enumeration of how to display selected values in picker widget.
PieChartBuilderA builder for pie charts.
PointStyleAn enumeration of the styles of points in a line.
PositionAn enumeration of legend positions within a chart.
ScatterChartBuilderBuilder for scatter charts.
StringFilterBuilderA builder for string filter controls.
TableChartBuilderA builder for table charts.
TextStyleA text style configuration object.
TextStyleBuilderA builder used to create TextStyle objects.

Class AreaChartBuilder

Methods

MethodReturn typeBrief description
build()ChartBuilds the chart.
reverseCategories()AreaChartBuilderReverses the drawing of series in the domain axis.
setBackgroundColor(cssValue)AreaChartBuilderSets the background color for the chart.
setColors(cssValues)AreaChartBuilderSets the colors for the lines in the chart.
setDataSourceUrl(url)AreaChartBuilderSets the data source URL that will be used to pull data in from an external source, such as Google Sheets.
setDataTable(tableBuilder)AreaChartBuilderSets the data table to use for the chart using a DataTableBuilder.
setDataTable(table)AreaChartBuilderSets the data table which contains the lines for the chart, as well as the X-axis labels.
setDataViewDefinition(dataViewDefinition)AreaChartBuilderSets the data view definition to use for the chart.
setDimensions(width, height)AreaChartBuilderSets the dimensions for the chart.
setLegendPosition(position)AreaChartBuilderSets the position of the legend with respect to the chart.
setLegendTextStyle(textStyle)AreaChartBuilderSets the text style of the chart legend.
setOption(option, value)AreaChartBuilder

Sets advanced options for this chart.

setPointStyle(style)AreaChartBuilderSets the style for points in the line.
setRange(start, end)AreaChartBuilderSets the range for the chart.
setStacked()AreaChartBuilderUses stacked lines, meaning that line and bar values are stacked (accumulated).
setTitle(chartTitle)AreaChartBuilderSets the title of the chart.
setTitleTextStyle(textStyle)AreaChartBuilderSets the text style of the chart title.
setXAxisTextStyle(textStyle)AreaChartBuilderSets the horizontal axis text style.
setXAxisTitle(title)AreaChartBuilderAdds a title to the horizontal axis.
setXAxisTitleTextStyle(textStyle)AreaChartBuilderSets the horizontal axis title text style.
setYAxisTextStyle(textStyle)AreaChartBuilderSets the vertical axis text style.
setYAxisTitle(title)AreaChartBuilderAdds a title to the vertical axis.
setYAxisTitleTextStyle(textStyle)AreaChartBuilderSets the vertical axis title text style.
useLogScale()AreaChartBuilderMakes the range axis into a logarithmic scale (requires all values to be positive).

Class BarChartBuilder

Methods

MethodReturn typeBrief description
build()ChartBuilds the chart.
reverseCategories()BarChartBuilderReverses the drawing of series in the domain axis.
reverseDirection()BarChartBuilderReverses the direction in which the bars grow along the horizontal axis.
setBackgroundColor(cssValue)BarChartBuilderSets the background color for the chart.
setColors(cssValues)BarChartBuilderSets the colors for the lines in the chart.
setDataSourceUrl(url)BarChartBuilderSets the data source URL that will be used to pull data in from an external source, such as Google Sheets.
setDataTable(tableBuilder)BarChartBuilderSets the data table to use for the chart using a DataTableBuilder.
setDataTable(table)BarChartBuilderSets the data table which contains the lines for the chart, as well as the X-axis labels.
setDataViewDefinition(dataViewDefinition)BarChartBuilderSets the data view definition to use for the chart.
setDimensions(width, height)BarChartBuilderSets the dimensions for the chart.
setLegendPosition(position)BarChartBuilderSets the position of the legend with respect to the chart.
setLegendTextStyle(textStyle)BarChartBuilderSets the text style of the chart legend.
setOption(option, value)BarChartBuilder

Sets advanced options for this chart.

setRange(start, end)BarChartBuilderSets the range for the chart.
setStacked()BarChartBuilderUses stacked lines, meaning that line and bar values are stacked (accumulated).
setTitle(chartTitle)BarChartBuilderSets the title of the chart.
setTitleTextStyle(textStyle)BarChartBuilderSets the text style of the chart title.
setXAxisTextStyle(textStyle)BarChartBuilderSets the horizontal axis text style.
setXAxisTitle(title)BarChartBuilderAdds a title to the horizontal axis.
setXAxisTitleTextStyle(textStyle)BarChartBuilderSets the horizontal axis title text style.
setYAxisTextStyle(textStyle)BarChartBuilderSets the vertical axis text style.
setYAxisTitle(title)BarChartBuilderAdds a title to the vertical axis.
setYAxisTitleTextStyle(textStyle)BarChartBuilderSets the vertical axis title text style.
useLogScale()BarChartBuilderMakes the range axis into a logarithmic scale (requires all values to be positive).

Class CategoryFilterBuilder

Methods

MethodReturn typeBrief description
build()ControlBuilds a control.
setAllowMultiple(allowMultiple)CategoryFilterBuilderSets whether multiple values can be selected, rather than just one.
setAllowNone(allowNone)CategoryFilterBuilderSets whether the user is allowed not to choose any value.
setAllowTyping(allowTyping)CategoryFilterBuilderSets whether the user is allowed to type in a text field to narrow down the list of possible choices (via an autocompleter), or not.
setCaption(caption)CategoryFilterBuilderSets the caption to display inside the value picker widget when no item is selected.
setDataTable(tableBuilder)CategoryFilterBuilderSets the data table to use for the control using a DataTableBuilder.
setDataTable(table)CategoryFilterBuilderSets the control data table, which will be the control's underlying data model.
setFilterColumnIndex(columnIndex)CategoryFilterBuilderSets the index of the data table column to filter on.
setFilterColumnLabel(columnLabel)CategoryFilterBuilderSets the label of the data table column to filter on.
setLabel(label)CategoryFilterBuilderSets the label to display next to the slider.
setLabelSeparator(labelSeparator)CategoryFilterBuilderSets a separator string appended to the label, to visually separate the label from the category picker.
setLabelStacking(orientation)CategoryFilterBuilderSets whether the label should display above (vertical stacking) or beside (horizontal stacking) the input field.
setSelectedValuesLayout(layout)CategoryFilterBuilderSets how to display selected values, when multiple selection is allowed.
setSortValues(sortValues)CategoryFilterBuilderSets whether the values to choose from should be sorted.
setValues(values)CategoryFilterBuilderSets the list of values (categories) the user can choose from.

Class Chart

Methods

MethodReturn typeBrief description
getAs(contentType)BlobReturn the data inside this object as a blob converted to the specified content type.
getBlob()BlobReturn the data inside this object as a blob.
getId()StringReturns the id that has been assigned to this object.
getOptions()ChartOptionsReturns the options for this chart, such as height, colors, axes, etc.
getType()StringGets the type of this object.
setId(id)ChartSets the id of this Chart to be used with UiApp.

Class ChartOptions

Methods

MethodReturn typeBrief description
get(option)ObjectReturns a configured option for this chart.

Class ChartType

Properties

PropertyTypeDescription
AREAEnumArea chart
BAREnumBar chart
COLUMNEnumColumn chart
LINEEnumLine chart
PIEEnumPie chart
SCATTEREnumScatter chart
TABLEEnumTable chart

Class Charts

Properties

PropertyTypeDescription
ChartTypeChartTypeAn enumeration of chart types supported by the Charts service.
ColumnTypeColumnTypeAn enumeration of the valid data types for columns in a DataTable.
CurveStyleCurveStyleAn enumeration of the styles for curves in a chart.
MatchTypeMatchTypeAn enumeration of how a string value should be matched.
OrientationOrientationAn enumeration of the orientation of an object.
PickerValuesLayoutPickerValuesLayoutAn enumeration of how to display selected values in a picker widget.
PointStylePointStyleAn enumeration of the styles of points in a line.
PositionPositionAn enumeration of legend positions within a chart.

Methods

MethodReturn typeBrief description
newAreaChart()AreaChartBuilderStarts building an area chart, as described in the Google Chart Tools documentation.
newBarChart()BarChartBuilderStarts building a bar chart, as described in the Google Chart Tools documentation.
newCategoryFilter()CategoryFilterBuilderStarts building a category filter control, as described in the Google Chart Tools documentation.
newColumnChart()ColumnChartBuilderStarts building a column chart, as described in the Google Chart Tools documentation.
newDashboardPanel()DashboardPanelBuilderStarts building a dashboard panel, as described in the Google Chart Tools documentation.
newDataTable()DataTableBuilderCreates an empty data table, which can have its values set manually.
newDataViewDefinition()DataViewDefinitionBuilderCreates a new data view definition.
newLineChart()LineChartBuilderStarts building a line chart, as described in the Google Chart Tools documentation.
newNumberRangeFilter()NumberRangeFilterBuilderStarts building a number range filter control, as described in the Google Chart Tools documentation.
newPieChart()PieChartBuilderStarts building a pie chart, as described in the Google Chart Tools documentation.
newScatterChart()ScatterChartBuilderStarts building a scatter chart, as described in the Google Chart Tools documentation.
newStringFilter()StringFilterBuilderStarts building a string filter control, as described in the Google Chart Tools documentation.
newTableChart()TableChartBuilderStarts building a table chart, as described in the Google Chart Tools documentation.
newTextStyle()TextStyleBuilderCreates a new text style builder.

Class ColumnChartBuilder

Methods

MethodReturn typeBrief description
build()ChartBuilds the chart.
reverseCategories()ColumnChartBuilderReverses the drawing of series in the domain axis.
setBackgroundColor(cssValue)ColumnChartBuilderSets the background color for the chart.
setColors(cssValues)ColumnChartBuilderSets the colors for the lines in the chart.
setDataSourceUrl(url)ColumnChartBuilderSets the data source URL that will be used to pull data in from an external source, such as Google Sheets.
setDataTable(tableBuilder)ColumnChartBuilderSets the data table to use for the chart using a DataTableBuilder.
setDataTable(table)ColumnChartBuilderSets the data table which contains the lines for the chart, as well as the X-axis labels.
setDataViewDefinition(dataViewDefinition)ColumnChartBuilderSets the data view definition to use for the chart.
setDimensions(width, height)ColumnChartBuilderSets the dimensions for the chart.
setLegendPosition(position)ColumnChartBuilderSets the position of the legend with respect to the chart.
setLegendTextStyle(textStyle)ColumnChartBuilderSets the text style of the chart legend.
setOption(option, value)ColumnChartBuilder

Sets advanced options for this chart.

setRange(start, end)ColumnChartBuilderSets the range for the chart.
setStacked()ColumnChartBuilderUses stacked lines, meaning that line and bar values are stacked (accumulated).
setTitle(chartTitle)ColumnChartBuilderSets the title of the chart.
setTitleTextStyle(textStyle)ColumnChartBuilderSets the text style of the chart title.
setXAxisTextStyle(textStyle)ColumnChartBuilderSets the horizontal axis text style.
setXAxisTitle(title)ColumnChartBuilderAdds a title to the horizontal axis.
setXAxisTitleTextStyle(textStyle)ColumnChartBuilderSets the horizontal axis title text style.
setYAxisTextStyle(textStyle)ColumnChartBuilderSets the vertical axis text style.
setYAxisTitle(title)ColumnChartBuilderAdds a title to the vertical axis.
setYAxisTitleTextStyle(textStyle)ColumnChartBuilderSets the vertical axis title text style.
useLogScale()ColumnChartBuilderMakes the range axis into a logarithmic scale (requires all values to be positive).

Class ColumnType

Properties

PropertyTypeDescription
DATEEnumCorresponds to date values.
NUMBEREnumCorresponds to number values.
STRINGEnumCorresponds to string values.

Class Control

Methods

MethodReturn typeBrief description
getId()StringReturns the id that has been assigned to this object.
getType()StringGets the type of this object.
setId(id)ControlSets the id of this Control to be used with UiApp.

Class CurveStyle

Properties

PropertyTypeDescription
NORMALEnumStraight lines without curve
SMOOTHEnumThe angles of the line will be smoothed

Class DashboardPanel

Methods

MethodReturn typeBrief description
add(widget)DashboardPanelAdd a widget to the DashboardPanel.
getId()StringReturns the id that has been assigned to this object.
getType()StringGets the type of this object.
setId(id)DashboardPanelSets the id of this DashboardPanel to be used with UiApp.

Class DashboardPanelBuilder

Methods

MethodReturn typeBrief description
bind(control, chart)DashboardPanelBuilderBinds a control to a chart, so that the chart is redrawn whenever the control collects a user interaction that affects the data managed by the dashboard.
bind(controls, charts)DashboardPanelBuilderBinds multiple controls to multiple charts, so that the charts are redrawn whenever the controls collect a user interaction that affects the data managed by the dashboard.
build()DashboardPanelBuilds a dashboard.
setDataTable(tableBuilder)DashboardPanelBuilderSets the data table to use for the dashboard using a DataTableBuilder.
setDataTable(source)DashboardPanelBuilderSets the dashboard's data table, which will be the control's underlying data model.

Class DataTable

Class DataTableBuilder

Methods

MethodReturn typeBrief description
addColumn(type, label)DataTableBuilderAdds a column to the data table.
addRow(values)DataTableBuilderAdds a row to the data table.
build()DataTableBuilds and returns a data table.
setValue(row, column, value)DataTableBuilderSets a specific value in the table.

Class DataTableSource

Methods

MethodReturn typeBrief description
getDataTable()DataTableReturn the data inside this object as a DataTable.

Class DataViewDefinition

Class DataViewDefinitionBuilder

Methods

MethodReturn typeBrief description
build()DataViewDefinitionBuilds and returns the data view definition object that was built using this builder.
setColumns(columns)DataViewDefinitionBuilderSets the indexes of the column to include in the data view.

Class LineChartBuilder

Methods

MethodReturn typeBrief description
build()ChartBuilds the chart.
reverseCategories()LineChartBuilderReverses the drawing of series in the domain axis.
setBackgroundColor(cssValue)LineChartBuilderSets the background color for the chart.
setColors(cssValues)LineChartBuilderSets the colors for the lines in the chart.
setCurveStyle(style)LineChartBuilderSets the style to use for curves in the chart.
setDataSourceUrl(url)LineChartBuilderSets the data source URL that will be used to pull data in from an external source, such as Google Sheets.
setDataTable(tableBuilder)LineChartBuilderSets the data table to use for the chart using a DataTableBuilder.
setDataTable(table)LineChartBuilderSets the data table which contains the lines for the chart, as well as the X-axis labels.
setDataViewDefinition(dataViewDefinition)LineChartBuilderSets the data view definition to use for the chart.
setDimensions(width, height)LineChartBuilderSets the dimensions for the chart.
setLegendPosition(position)LineChartBuilderSets the position of the legend with respect to the chart.
setLegendTextStyle(textStyle)LineChartBuilderSets the text style of the chart legend.
setOption(option, value)LineChartBuilder

Sets advanced options for this chart.

setPointStyle(style)LineChartBuilderSets the style for points in the line.
setRange(start, end)LineChartBuilderSets the range for the chart.
setTitle(chartTitle)LineChartBuilderSets the title of the chart.
setTitleTextStyle(textStyle)LineChartBuilderSets the text style of the chart title.
setXAxisTextStyle(textStyle)LineChartBuilderSets the horizontal axis text style.
setXAxisTitle(title)LineChartBuilderAdds a title to the horizontal axis.
setXAxisTitleTextStyle(textStyle)LineChartBuilderSets the horizontal axis title text style.
setYAxisTextStyle(textStyle)LineChartBuilderSets the vertical axis text style.
setYAxisTitle(title)LineChartBuilderAdds a title to the vertical axis.
setYAxisTitleTextStyle(textStyle)LineChartBuilderSets the vertical axis title text style.
useLogScale()LineChartBuilderMakes the range axis into a logarithmic scale (requires all values to be positive).

Class MatchType

Properties

PropertyTypeDescription
EXACTEnumMatch exact values only
PREFIXEnumMatch prefixes starting from the beginning of the value
ANYEnumMatch any substring

Methods

MethodReturn typeBrief description
getName()StringReturns the name of the MatchType to be used in the options JSON.

Class NumberRangeFilterBuilder

Methods

MethodReturn typeBrief description
build()ControlBuilds a control.
setDataTable(tableBuilder)NumberRangeFilterBuilderSets the data table to use for the control using a DataTableBuilder.
setDataTable(table)NumberRangeFilterBuilderSets the control data table, which will be the control's underlying data model.
setFilterColumnIndex(columnIndex)NumberRangeFilterBuilderSets the index of the data table column to filter on.
setFilterColumnLabel(columnLabel)NumberRangeFilterBuilderSets the label of the data table column to filter on.
setLabel(label)NumberRangeFilterBuilderSets the label to display next to the slider.
setLabelSeparator(labelSeparator)NumberRangeFilterBuilderSets a separator string appended to the label, to visually separate the label from the category picker.
setLabelStacking(orientation)NumberRangeFilterBuilderSets whether the label should display above (vertical stacking) or beside (horizontal stacking) the input field.
setMaxValue(maxValue)NumberRangeFilterBuilderSets the maximum allowed value for the range lower extent.
setMinValue(minValue)NumberRangeFilterBuilderSets the minimum allowed value for the range lower extent.
setOrientation(orientation)NumberRangeFilterBuilderSets the slider orientation.
setShowRangeValues(showRangeValues)NumberRangeFilterBuilderSets whether to have labels next to the slider displaying extents of the selected range.
setTicks(ticks)NumberRangeFilterBuilderSets the number of ticks (fixed positions in a range bar) a number range filter slider thumbs can fall in.

Class Orientation

Properties

PropertyTypeDescription
HORIZONTALEnumHorizontal orientation
VERTICALEnumVertical orientation

Class PickerValuesLayout

Properties

PropertyTypeDescription
ASIDEEnumSelected values will display in a single text line next to the value picker widget
BELOWEnumSelected values will display in a single text line below the widget
BELOW_WRAPPINGEnumSimilar to below, but entries that cannot fit in the picker will wrap to a new line
BELOW_STACKEDEnumSelected values will be displayed in a column below the widget

Class PieChartBuilder

Methods

MethodReturn typeBrief description
build()ChartBuilds the chart.
reverseCategories()PieChartBuilderReverses the drawing of series in the domain axis.
set3D()PieChartBuilderSets the chart to be three-dimensional.
setBackgroundColor(cssValue)PieChartBuilderSets the background color for the chart.
setColors(cssValues)PieChartBuilderSets the colors for the lines in the chart.
setDataSourceUrl(url)PieChartBuilderSets the data source URL that will be used to pull data in from an external source, such as Google Sheets.
setDataTable(tableBuilder)PieChartBuilderSets the data table to use for the chart using a DataTableBuilder.
setDataTable(table)PieChartBuilderSets the data table which contains the lines for the chart, as well as the X-axis labels.
setDataViewDefinition(dataViewDefinition)PieChartBuilderSets the data view definition to use for the chart.
setDimensions(width, height)PieChartBuilderSets the dimensions for the chart.
setLegendPosition(position)PieChartBuilderSets the position of the legend with respect to the chart.
setLegendTextStyle(textStyle)PieChartBuilderSets the text style of the chart legend.
setOption(option, value)PieChartBuilder

Sets advanced options for this chart.

setTitle(chartTitle)PieChartBuilderSets the title of the chart.
setTitleTextStyle(textStyle)PieChartBuilderSets the text style of the chart title.

Class PointStyle

Properties

PropertyTypeDescription
NONEEnumDo not display line points
TINYEnumUse tiny line points
MEDIUMEnumUse medium sized line points
LARGEEnumUse large sized line points
HUGEEnumUse largest sized line points

Class Position

Properties

PropertyTypeDescription
TOPEnumAbove the chart.
RIGHTEnumTo the right of the chart.
BOTTOMEnumBelow the chart.
NONEEnumNo legend is displayed.

Class ScatterChartBuilder

Methods

MethodReturn typeBrief description
build()ChartBuilds the chart.
setBackgroundColor(cssValue)ScatterChartBuilderSets the background color for the chart.
setColors(cssValues)ScatterChartBuilderSets the colors for the lines in the chart.
setDataSourceUrl(url)ScatterChartBuilderSets the data source URL that will be used to pull data in from an external source, such as Google Sheets.
setDataTable(tableBuilder)ScatterChartBuilderSets the data table to use for the chart using a DataTableBuilder.
setDataTable(table)ScatterChartBuilderSets the data table which contains the lines for the chart, as well as the X-axis labels.
setDataViewDefinition(dataViewDefinition)ScatterChartBuilderSets the data view definition to use for the chart.
setDimensions(width, height)ScatterChartBuilderSets the dimensions for the chart.
setLegendPosition(position)ScatterChartBuilderSets the position of the legend with respect to the chart.
setLegendTextStyle(textStyle)ScatterChartBuilderSets the text style of the chart legend.
setOption(option, value)ScatterChartBuilder

Sets advanced options for this chart.

setPointStyle(style)ScatterChartBuilderSets the style for points in the line.
setTitle(chartTitle)ScatterChartBuilderSets the title of the chart.
setTitleTextStyle(textStyle)ScatterChartBuilderSets the text style of the chart title.
setXAxisLogScale()ScatterChartBuilderMakes the horizontal axis into a logarithmic scale (requires all values to be positive).
setXAxisRange(start, end)ScatterChartBuilderSets the range for the horizontal axis of the chart.
setXAxisTextStyle(textStyle)ScatterChartBuilderSets the horizontal axis text style.
setXAxisTitle(title)ScatterChartBuilderAdds a title to the horizontal axis.
setXAxisTitleTextStyle(textStyle)ScatterChartBuilderSets the horizontal axis title text style.
setYAxisLogScale()ScatterChartBuilderMakes the vertical axis into a logarithmic scale (requires all values to be positive).
setYAxisRange(start, end)ScatterChartBuilderSets the range for the vertical axis of the chart.
setYAxisTextStyle(textStyle)ScatterChartBuilderSets the vertical axis text style.
setYAxisTitle(title)ScatterChartBuilderAdds a title to the vertical axis.
setYAxisTitleTextStyle(textStyle)ScatterChartBuilderSets the vertical axis title text style.

Class StringFilterBuilder

Methods

MethodReturn typeBrief description
build()ControlBuilds a control.
setCaseSensitive(caseSensitive)StringFilterBuilderSets whether matching should be case sensitive or not.
setDataTable(tableBuilder)StringFilterBuilderSets the data table to use for the control using a DataTableBuilder.
setDataTable(table)StringFilterBuilderSets the control data table, which will be the control's underlying data model.
setFilterColumnIndex(columnIndex)StringFilterBuilderSets the index of the data table column to filter on.
setFilterColumnLabel(columnLabel)StringFilterBuilderSets the label of the data table column to filter on.
setLabel(label)StringFilterBuilderSets the label to display next to the slider.
setLabelSeparator(labelSeparator)StringFilterBuilderSets a separator string appended to the label, to visually separate the label from the category picker.
setLabelStacking(orientation)StringFilterBuilderSets whether the label should display above (vertical stacking) or beside (horizontal stacking) the input field.
setMatchType(matchType)StringFilterBuilderSets whether the control should match exact values only (MatchType.EXACT), prefixes starting from the beginning of the value (MatchType.PREFIX), or any substring (MatchType.ANY).
setRealtimeTrigger(realtimeTrigger)StringFilterBuilderSets whether the control should match any time a key is pressed or only when the input field 'changes' (loss of focus or pressing the Enter key).

Class TableChartBuilder

Methods

MethodReturn typeBrief description
build()ChartBuilds the chart.
enablePaging(enablePaging)TableChartBuilderSets whether to enable paging through the data.
enablePaging(pageSize)TableChartBuilderEnables paging and sets the number of rows in each page.
enablePaging(pageSize, startPage)TableChartBuilderEnables paging, sets the number of rows in each page and the first table page to display (page numbers are zero based).
enableRtlTable(rtlEnabled)TableChartBuilderAdds basic support for right-to-left languages (such as Arabic or Hebrew) by reversing the column order of the table, so that column zero is the right-most column, and the last column is the left-most column.
enableSorting(enableSorting)TableChartBuilderSets whether to sort columns when the user clicks a column heading.
setDataSourceUrl(url)TableChartBuilderSets the data source URL that will be used to pull data in from an external source, such as Google Sheets.
setDataTable(tableBuilder)TableChartBuilderSets the data table to use for the chart using a DataTableBuilder.
setDataTable(table)TableChartBuilderSets the data table which contains the lines for the chart, as well as the X-axis labels.
setDataViewDefinition(dataViewDefinition)TableChartBuilderSets the data view definition to use for the chart.
setDimensions(width, height)TableChartBuilderSets the dimensions for the chart.
setFirstRowNumber(number)TableChartBuilderSets the row number for the first row in the data table.
setInitialSortingAscending(column)TableChartBuilderSets the index of the column according to which the table should be initially sorted (ascending).
setInitialSortingDescending(column)TableChartBuilderSets the index of the column according to which the table should be initially sorted (descending).
setOption(option, value)TableChartBuilder

Sets advanced options for this chart.

showRowNumberColumn(showRowNumber)TableChartBuilderSets whether to show the row number as the first column of the table.
useAlternatingRowStyle(alternate)TableChartBuilderSets whether alternating color style will be assigned to odd and even rows of a table chart.

Class TextStyle

Methods

MethodReturn typeBrief description
getColor()StringGets the color of the text style.
getFontName()StringGets the font name of the text style.
getFontSize()NumberGets the font size of the text style.

Class TextStyleBuilder

Methods

MethodReturn typeBrief description
build()TextStyleBuilds and returns a text style configuration object that was built using this builder.
setColor(cssValue)TextStyleBuilderSets the color of the text style.
setFontName(fontName)TextStyleBuilderSets the font name of the text style
setFontSize(fontSize)TextStyleBuilderSets the font size of the text style.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.