Chart Types
- Annotation chart
- Area chart
- Bar chart
- Bubble chart
- Calendar
- Candlestick chart
- Column chart
- Combo chart
- Gauge
- Geochart
- Histogram
- Line chart
- Org chart
- Pie chart
- Scatter chart
- Stepped area chart
- Table chart
- Timeline
- Tree map
Annotation chart configuration options
The colors to use for the chart elements. An array of strings, where each element is an HTML color string, for example: colors:['red','#004411']
.
Whether to show the zoom range selection area (the area at the bottom of the chart), where false
means no.
The outline in the zoom selector is a log scale version of the first series in the chart, scaled to fit the height of the zoom selector.
boolean
true
Whether to show the zoom buttons ("1d 5d 1m" and so on), where false
means no.
boolean
true
The maximum value to show on the Y axis. If the maximum data point exceeds this value, this
setting is ignored, and the chart is adjusted to show the next major tick mark
above the maximum data point. This takes precedence over the Y axis maximum determined
by scaleType
.
This is similar to maxValue
in core charts.
number
The minimum value to show on the Y axis. If the minimum data point is less than this value,
this setting is ignored, and the chart is adjusted to show the next major tick
mark below the minimum data point. This takes precedence over the Y axis minimum
determined by scaleType
.
This is similar to minValue
in core charts.
number
Area chart configuration options
The default opacity of the colored area under an area chart series, where 0.0
is fully transparent and 1.0
is fully opaque. To specify opacity for
an individual series, set the areaOpacity
value in the series
property.
number
, 0.0- 1.0
0.3
The background color for the main area of the chart. Can be either a simple HTML color string,
for example: 'red'
or '#00cc00'
, or an object with the following
properties.
string
or object
'white'
The chart fill color, as an HTML color string.
string
'white'
An object with members to configure the placement and size of the chart area (where the chart
itself is drawn, excluding axis and legends). Two formats are supported: a number, or a
number followed by %. A simple number is a value in pixels; a number followed by % is a
percentage. Example: chartArea:{left:20,top:0,width:'50%',height:'75%'}
object
null
'#fdc'
) or an English color name. When an object is used, the following properties can
be provided:-
stroke
: The color, provided as a hex string or English color name. -
strokeWidth
: If provided, draws a border around the chart area of the given width (and with the color ofstroke
).
string
or object
'white'
Chart area height.
number
or string
How far to draw the chart from the left border.
number
or string
How far to draw the chart from the top border.
number
or string
Chart area width.
number
or string
The colors to use for the chart elements. An array of strings, where each element is an HTML
color string, for example: colors:['red','#004411']
.
An object with members to configure various horizontal axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{ title: 'Hello', titleTextStyle: { color: '#FF0000' } }
object
null
The direction in which the values along the horizontal axis grow. Specify -1
to
reverse the order of the values.
1
or -1
1
An object with properties to configure the gridlines on the horizontal axis. Note that horizontal axis gridlines are drawn vertically. To specify properties of this object, you can use object literal notation, as shown here:
{color: '#333', minSpacing: 20}
This option is only supported for a continuous
axis.
object
null
The color of the horizontal gridlines inside the chart area. Specify a valid HTML color string.
string
'#CCC'
The approximate number of horizontal gridlines inside the chart area. If you specify a positive number for gridlines.count
,
it will be used to compute the minSpacing
between gridlines.
You can specify a value of 1
to only draw one gridline,
or 0
to draw no gridlines.
Specify -1
, which is the default,
to automatically compute the number of gridlines
based on other options.
number
-1
hAxis
property that makes the horizontal axis a logarithmic scale (requires all
values to be positive). Set to true
for yes.
This option is only supported for a continuous
axis.
boolean
false
Moves the max value of the horizontal axis to the specified value; this will be rightward in
most charts. Ignored if this is set to a value smaller than the maximum x-value of the data. hAxis.viewWindow.max
overrides this property.
number
An object with members to configure the minor gridlines on the horizontal axis, similar to
the hAxis.gridlines
option.
This option is only supported for a continuous
axis.
object
null
The color of the horizontal minor gridlines inside the chart area. Specify a valid HTML color string.
string
The minorGridlines.count
option is mostly deprecated, except for disabling minor gridlines
by setting the count to 0. The number of minor gridlines now depends
entirely on the interval between
major gridlines (see hAxis.gridlines.interval
)
and the minimum required space
(see hAxis.minorGridlines.minSpacing
).
number
1
Moves the min value of the horizontal axis to the specified value; this will be leftward in
most charts. Ignored if this is set to a value greater than the minimum x-value of the data. hAxis.viewWindow.min
overrides this property.
number
Position of the horizontal axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the horizontal axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
hAxis
property that specifies the title of the horizontal axis.
string
null
An object that specifies the horizontal axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the horizontal axis.
object
null
The maximum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
The minimum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
Height of the chart in pixels.
number
Whether to guess the value of missing points. If true
, it will guess the
value of any missing data based on neighboring points. If false
, it will
leave a break in the line at the unknown point.
This is notsupported by Area
charts with the isStacked: true/'percent'/'relative'/'absolute'
option.
boolean
false
If set to true
, stacks the elements for all series at each domain value. Note:In Column
, Area
, and SteppedArea
charts,
Google Charts reverses the order of legend items to better correspond with the stacking of
the series elements (E.g. series 0 will be the bottom-most legend item). This does notapply to Bar
Charts.
The isStacked
option also supports 100% stacking, where the stacks of elements
at each domain value are rescaled to add up to 100%.
The options for isStacked
are:
-
false
— elements will not stack. This is the default option. -
true
— stacks elements for all series at each domain value. -
'percent'
— stacks elements for all series at each domain value and rescales them such that they add up to 100%, with each element's value calculated as a percentage of 100%. -
'relative'
— stacks elements for all series at each domain value and rescales them such that they add up to 1, with each element's value calculated as a fraction of 1. -
'absolute'
— functions the same asisStacked: true
.
For 100% stacking, the calculated value for each element will appear in the tooltip after its actual value.
The target axis will default to tick values based on the relative 0-1 scale as fractions
of 1 for 'relative'
, and 0-100% for 'percent'
( Note:when using the 'percent'
option, the axis/tick values
are displayed as percentages, however the actual values are the relative 0-1 scale values.
This is because the percentage axis ticks are the result of applying a format of "#.##%" to
the relative 0-1 scale values. When using isStacked: 'percent'
, be sure to
specify any ticks/gridlines using the relative 0-1 scale values). You can customize the
gridlines/tick values and formatting using the appropriate hAxis/vAxis
options.
100% stacking only supports data values of type number
, and must
have a baseline of zero.
boolean
/ string
false
An object with members to configure various aspects of the legend. To specify properties of this object, you can use object literal notation, as shown here:
{position: 'top', textStyle: {color: 'blue', fontSize: 16}}
object
null
Position of the legend. Can be one of the following:
-
'bottom'
- Below the chart. -
'left'
- To the left of the chart, provided the left axis has noseries
associated with it. So if you want the legend on the left, use the optiontargetAxisIndex: 1
. -
'in'
- Inside the chart, by the top left corner. -
'none'
- No legend is displayed. -
'right'
- To the right of the chart. Incompatible with thevAxes
option. -
'top'
- Above the chart.
string
'right'
An object that specifies the legend text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Data line width in pixels. Use zero to hide all lines and show only the points. You can
override values for individual series using the series
property.
number
2
The shape of individual data elements: 'circle'
, 'triangle'
, 'square'
, 'diamond'
, 'star'
or 'polygon'
. See the points documentation
for examples.
string
'circle'
Diameter of displayed points in pixels. Use zero to hide all points. You can override values
for individual series using the series
property.
number
0
An array of objects, each describing the format of the corresponding series in the chart. To use default
values for a series, specify an empty object {}
. If a series or a value is not specified, the global value
will be used. Each object supports the following properties:
-
annotations
- An object to be applied to annotations for this series. This can be used to control, for instance, thetextStyle
for the series:series: { 0: { annotations: { textStyle: {fontSize: 12, color: 'red' } } } }
See the various
annotations
options for a more complete list of what can be customized. -
areaOpacity
- Overrides the globalareaOpacity
for this series. -
color
- The color to use for this series. Specify a valid HTML color string. -
labelInLegend
- The description of the series to appear in the chart legend. -
lineDashStyle
- Overrides the globallineDashStyle
value for this series. -
lineWidth
- Overrides the globallineWidth
value for this series. -
pointShape
- Overrides the globalpointShape
value for this series. -
pointSize
- Overrides the globalpointSize
value for this series. -
pointsVisible
- Overrides the globalpointsVisible
value for this series. -
targetAxisIndex
- Which axis to assign this series to, where0
is the default axis, and1
is the opposite axis. Default value is0
; set to1
to define a chart where different series are rendered against different axes. At least one series must be allocated to the default axis. You can define a different scale for different axes. -
visibleInLegend
- Aboolean
value, wheretrue
means that the series should have a legend entry, andfalse
means that it should not. Default istrue
.
You can specify either an array of objects, each of which applies to the series in the order given, or you can specify an object where each child has a numeric key indicating which series it applies to. For example, the following two declarations are identical, and declare the first series as black and absent from the legend, and the fourth as red and absent from the legend:
series: [ {color: 'black', visibleInLegend: false}, {}, {}, {color: 'red', visibleInLegend: false} ] series: { 0:{color: 'black', visibleInLegend: false}, 3:{color: 'red', visibleInLegend: false} }
{}
Text to display below the chart title.
string
An object that specifies the title text style.
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
A theme is a set of predefined option values that work together to achieve a specific chart behavior or visual effect. Currently only one theme is available:
-
'maximized'
- Maximizes the area of the chart, and draws the legend and all of the labels inside the chart area.
string
null
Text to display above the chart.
string
An object that specifies the title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
If set to true
, the chart will treat the column as a text column.
boolean
If set to true
, the chart will treat the column as the domain.
boolean
Specifies properties for individual vertical axes, if the chart has multiple vertical axes.
Each child object is a vAxis
object, and can contain all the properties
supported by vAxis
. These property values override any global settings for the
same property.
To specify a chart with multiple vertical axes, first define a new axis using series.targetAxisIndex
, then configure the axis using vAxes
. The
following example assigns series 2 to the right axis and specifies a custom title and text
style for it:
{ series: { 2: { targetAxisIndex:1 } }, vAxes: { 1: { title:'Losses', textStyle: {color: 'red'} } } }
This property can be either an object or an array: the object is a collection of objects,
each with a numeric label that specifies the axis that it defines--this is the format shown
above; the array is an array of objects, one per axis. For example, the following array-style
notation is identical to the vAxis
object shown above:
vAxes: [ {}, // Nothing specified for axis 0 { title:'Losses', textStyle: {color: 'red'} // Axis 1 } ]
null
An object with members to configure various vertical axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{title: 'Hello', titleTextStyle: {color: '#FF0000'}}
object
null
The direction in which the values along the vertical axis grow. By default, low values
are on the bottom of the chart. Specify -1
to
reverse the order of the values.
1
or -1
1
An object with members to configure the gridlines on the vertical axis. Note that vertical axis gridlines are drawn horizontally. To specify properties of this object, you can use object literal notation, as shown here:
{color: '#333', minSpacing: 20}
This option is only supported for a continuous
axis.
object
null
The color of the vertical gridlines inside the chart area. Specify a valid HTML color string.
string
'#CCC'
The approximate number of horizontal gridlines inside the chart area.
If you specify a positive number for gridlines.count
,
it will be used to compute the minSpacing
between gridlines.
You can specify a value of 1
to only draw one gridline,
or 0
to draw no gridlines.
Specify -1
, which is the default,
to automatically compute the number of gridlines
based on other options.
number
-1
If true
, makes the vertical axis a logarithmic scale. Note:All values must be positive.
boolean
false
Moves the max value of the vertical axis to the specified value; this will be upward in most
charts. Ignored if this is set to a value smaller than the maximum y-value of the data. vAxis.viewWindow.max
overrides this property.
number
An object with members to configure the minor gridlines on the vertical axis, similar to the vAxis.gridlines option.
object
null
The color of the vertical minor gridlines inside the chart area. Specify a valid HTML color string.
string
The minorGridlines.count
option is mostly deprecated, except for disabling minor gridlines
by setting the count to 0
. The number of minor gridlines depends on the interval between
major gridlines and the minimum required space.
number
1
Moves the min value of the vertical axis to the specified value; this will be downward in
most charts. Ignored if this is set to a value greater than the minimum y-value of the data. vAxis.viewWindow.min
overrides this property.
number
null
Position of the vertical axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the vertical axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies a title for the vertical axis.
string
An object that specifies the vertical axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the vertical axis.
object
null
The maximum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
The minimum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
Bar chart configuration options
The background color for the main area of the chart. Can be either a simple HTML color string,
for example: 'red'
or '#00cc00'
, or an object with the following
properties.
string
or object
'white'
The chart fill color, as an HTML color string.
string
'white'
An object with members to configure the placement and size of the chart area (where the chart
itself is drawn, excluding axis and legends). Two formats are supported: a number, or a
number followed by %. A simple number is a value in pixels; a number followed by % is a
percentage. Example: chartArea:{left:20,top:0,width:'50%',height:'75%'}
object
null
'#fdc'
) or an English color name. When an object is used, the following properties can
be provided:-
stroke
: The color, provided as a hex string or English color name. -
strokeWidth
: If provided, draws a border around the chart area of the given width (and with the color ofstroke
).
string
or object
'white'
Chart area height.
number
or string
How far to draw the chart from the left border.
number
or string
How far to draw the chart from the top border.
number
or string
Chart area width.
string
The colors to use for the chart elements. An array of strings, where each element is an HTML
color string, for example: colors:['red','#004411']
.
Specifies properties for individual horizontal axes, if the chart has multiple horizontal
axes. Each child object is a hAxis
object, and can contain all the properties
supported by hAxis
. These property values override any global settings for the
same property.
To specify a chart with multiple horizontal axes, first define a new axis using series.targetAxisIndex
, then configure the axis using hAxes
. The
following example assigns series 1
to the bottom axis and specifies a custom title and text
style for it:
series:{1:{targetAxisIndex:1}}, hAxes:{1:{title:'Losses',
textStyle:{color: 'red'}}}
This property can be either an object or an array: the object is a collection of objects,
each with a numeric label that specifies the axis that it defines--this is the format shown
above; the array is an array of objects, one per axis. For example, the following array-style
notation is identical to the hAxis
object shown above:
hAxes: { {}, // Nothing specified for axis 0 { title:'Losses', textStyle: { color: 'red' } } // Axis 1
null
An object with members to configure various horizontal axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{ title: 'Hello', titleTextStyle: { color: '#FF0000' } }
object
null
The direction in which the values along the horizontal axis grow. Specify -1
to
reverse the order of the values.
1
or -1
1
An object with properties to configure the gridlines on the horizontal axis. Note that horizontal axis gridlines are drawn vertically. To specify properties of this object, you can use object literal notation, as shown here:
{color: '#333', minSpacing: 20}
This option is only supported for a continuous
axis.
object
null
The color of the horizontal gridlines inside the chart area. Specify a valid HTML color string.
string
'#CCC'
The approximate number of horizontal gridlines inside the chart area. If you specify a positive number for gridlines.count
,
it will be used to compute the minSpacing
between gridlines.
You can specify a value of 1
to only draw one gridline,
or 0
to draw no gridlines.
Specify -1
, which is the default,
to automatically compute the number of gridlines
based on other options.
number
-1
hAxis
property that makes the horizontal axis a logarithmic scale (requires all
values to be positive). Set to true
for yes.
This option is only supported for a continuous
axis.
boolean
false
Moves the max value of the horizontal axis to the specified value; this will be rightward in
most charts. Ignored if this is set to a value smaller than the maximum x-value of the data. hAxis.viewWindow.max
overrides this property.
number
An object with members to configure the minor gridlines on the horizontal axis, similar to
the hAxis.gridlines
option.
This option is only supported for a continuous
axis.
object
null
The color of the horizontal minor gridlines inside the chart area. Specify a valid HTML color string.
string
The minorGridlines.count
option is mostly deprecated, except for disabling minor gridlines
by setting the count to 0. The number of minor gridlines now depends
entirely on the interval between
major gridlines (see hAxis.gridlines.interval
)
and the minimum required space
(see hAxis.minorGridlines.minSpacing
).
number
1
Moves the min value of the horizontal axis to the specified value; this will be leftward in
most charts. Ignored if this is set to a value greater than the minimum x-value of the data. hAxis.viewWindow.min
overrides this property.
number
Position of the horizontal axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the horizontal axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
hAxis
property that specifies the title of the horizontal axis.
string
null
An object that specifies the horizontal axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the horizontal axis.
object
null
The maximum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
The minimum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
Height of the chart in pixels.
number
If set to true
, stacks the elements for all series at each domain value. Note:In Column
, Area
, and SteppedArea
charts,
Google Charts reverses the order of legend items to better correspond with the stacking of
the series elements (E.g. series 0 will be the bottom-most legend item). This does notapply to Bar
Charts.
The isStacked
option also supports 100% stacking, where the stacks of elements
at each domain value are rescaled to add up to 100%.
The options for isStacked
are:
-
false
— elements will not stack. This is the default option. -
true
— stacks elements for all series at each domain value. -
'percent'
— stacks elements for all series at each domain value and rescales them such that they add up to 100%, with each element's value calculated as a percentage of 100%. -
'relative'
— stacks elements for all series at each domain value and rescales them such that they add up to 1, with each element's value calculated as a fraction of 1. -
'absolute'
— functions the same asisStacked: true
.
For 100% stacking, the calculated value for each element will appear in the tooltip after its actual value.
The target axis will default to tick values based on the relative 0-1 scale as fractions
of 1 for 'relative'
, and 0-100% for 'percent'
( Note:when using the 'percent'
option, the axis/tick values
are displayed as percentages, however the actual values are the relative 0-1 scale values.
This is because the percentage axis ticks are the result of applying a format of "#.##%" to
the relative 0-1 scale values. When using isStacked: 'percent'
, be sure to
specify any ticks/gridlines using the relative 0-1 scale values). You can customize the
gridlines/tick values and formatting using the appropriate hAxis/vAxis
options.
100% stacking only supports data values of type number
, and must
have a baseline of zero.
boolean
/ string
false
An object with members to configure various aspects of the legend. To specify properties of this object, you can use object literal notation, as shown here:
{position: 'top', textStyle: {color: 'blue', fontSize: 16}}
object
null
Position of the legend. Can be one of the following:
-
'bottom'
- Below the chart. -
'left'
- To the left of the chart, provided the left axis has no series associated with it. So if you want the legend on the left, use the optiontargetAxisIndex: 1
. -
'in'
- Inside the chart, by the top left corner. -
'none'
- No legend is displayed. -
'right'
- To the right of the chart. Incompatible with thevAxes
option. -
'top'
- Above the chart.
string
'right'
An object that specifies the legend text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
An array of objects, each describing the format of the corresponding series in the chart.
To use default values for a series, specify an empty object {}
. If a series
or a value is not specified, the global value will be used. Each object
supports the following properties:
-
annotations
- An object to be applied to annotations for this series. This can be used to control, for instance, thetextStyle
for the series:series: { 0: { annotations: { textStyle: {fontSize: 12, color: 'red' } } } }
See the various
annotations
options for a more complete list of what can be customized. -
color
- The color to use for this series. Specify a valid HTML color string. -
labelInLegend
- The description of the series to appear in the chart legend. -
targetAxisIndex
- Which axis to assign this series to, where0
is the default axis, and1
is the opposite axis. Default value is0
; set to1
to define a chart where different series are rendered against different axes. At least one series must be allocated to the default axis. You can define a different scale for different axes. -
visibleInLegend
- Aboolean
value, wheretrue
means that the series should have a legend entry, andfalse
means that it should not. Default istrue
.
You can specify either an array of objects, each of which applies to the series in the order given, or you can specify an object where each child has a numeric key indicating which series it applies to. For example, the following two declarations are identical, and declare the first series as black and absent from the legend, and the fourth as red and absent from the legend:
series: [ {color: 'black', visibleInLegend: false}, {}, {}, {color: 'red', visibleInLegend: false} ] series: { 0:{color: 'black', visibleInLegend: false}, 3:{color: 'red', visibleInLegend: false} }
{}
Text to display below the chart title.
string
An object that specifies the title text style.
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
A theme is a set of predefined option values that work together to achieve a specific chart behavior or visual effect. Currently only one theme is available:
-
'maximized'
- Maximizes the area of the chart, and draws the legend and all of the labels inside the chart area.
string
null
Text to display above the chart.
string
An object that specifies the title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Displays trendlines
on the charts that support them. By default, linear
trendlines are
used, but this can be customized with the trendlines. n
.type
option.
Trendlines are specified on a per-series basis, so most of the time your options will look like this:
var options = { trendlines: { 0: { type: 'linear', color: 'green', lineWidth: 3, opacity: 0.3, visibleInLegend: true } } }
object
null
The color of the trendline , expressed as either an English color name or a hex string.
string
For trendlines
of type: 'polynomial'
, the degree of the polynomial ( 2
for
quadratic, 3
for cubic, and so on).
number
3
Whether the trendlines
is 'linear'
(the default), 'exponential'
, or 'polynomial'
.
string
linear
Whether the trendline equation appears in the legend. It will appear in the trendline tooltip.
boolean
false
If set to true
, the chart will treat the column as the domain.
boolean
An object with members to configure various vertical axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{title: 'Hello', titleTextStyle: {color: '#FF0000'}}
object
null
The direction in which the values along the vertical axis grow. By default, low values
are on the bottom of the chart. Specify -1
to
reverse the order of the values.
1
or -1
1
An object with members to configure the gridlines on the vertical axis. Note that vertical axis gridlines are drawn horizontally. To specify properties of this object, you can use object literal notation, as shown here:
{color: '#333', minSpacing: 20}
This option is only supported for a continuous
axis.
object
null
The color of the vertical gridlines inside the chart area. Specify a valid HTML color string.
string
'#CCC'
The approximate number of horizontal gridlines inside the chart area.
If you specify a positive number for gridlines.count
,
it will be used to compute the minSpacing
between gridlines.
You can specify a value of 1
to only draw one gridline,
or 0
to draw no gridlines.
Specify -1
, which is the default,
to automatically compute the number of gridlines
based on other options.
number
-1
If true
, makes the vertical axis a logarithmic scale. Note:All values must be positive.
boolean
false
Moves the max value of the vertical axis to the specified value; this will be upward in most
charts. Ignored if this is set to a value smaller than the maximum y-value of the data. vAxis.viewWindow.max
overrides this property.
number
An object with members to configure the minor gridlines on the vertical axis, similar to the vAxis.gridlines option.
object
null
The color of the vertical minor gridlines inside the chart area. Specify a valid HTML color string.
string
The minorGridlines.count
option is mostly deprecated, except for disabling minor gridlines
by setting the count to 0
. The number of minor gridlines depends on the interval between
major gridlines and the minimum required space.
number
1
Moves the min value of the vertical axis to the specified value; this will be downward in
most charts. Ignored if this is set to a value greater than the minimum y-value of the data. vAxis.viewWindow.min
overrides this property.
number
null
Position of the vertical axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the vertical axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies a title for the vertical axis.
string
An object that specifies the vertical axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the vertical axis.
object
null
The maximum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
The minimum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
Bubble chart configuration options
The background color for the main area of the chart. Can be either a simple HTML color string,
for example: 'red'
or '#00cc00'
, or an object with the following
properties.
string
or object
'white'
The chart fill color, as an HTML color string.
string
'white'
An object with members to configure the visual properties of the bubbles.
object
null
The opacity of the bubbles, where 0
is fully transparent and 1
is fully opaque.
The color of the bubbles' stroke.
string
'#ccc'
An object that specifies the bubble text style. The object has this format:
{color: <string>, fontName: <string>, fontSize: <number>}
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
An object with members to configure the placement and size of the chart area (where the chart
itself is drawn, excluding axis and legends). Two formats are supported: a number or a
number followed by %. A simple number is a value in pixels; a number followed by % is a
percentage. Example: chartArea:{left:20,top:0,width:'50%',height:'75%'}
object
null
'#fdc'
) or an English color name. When an object is used, the following properties can
be provided:-
stroke
: The color, provided as a hex string or English color name. -
strokeWidth
: If provided, draws a border around the chart area of the given width (and with the color ofstroke
).
string
or object
'white'
Chart area height.
number
or string
How far to draw the chart from the left border.
number
or string
How far to draw the chart from the top border.
number
or string
Chart area width.
number
or string
The colors to use for the chart elements. An array of strings, where each element is an HTML
color string, for example: colors:['red','#004411']
.
An object with members to configure various horizontal axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{ title: 'Hello', titleTextStyle: { color: '#FF0000' } }
object
null
The direction in which the values along the horizontal axis grow. Specify -1
to
reverse the order of the values.
1
or -1
1
An object with properties to configure the gridlines on the horizontal axis. Note that horizontal axis gridlines are drawn vertically. To specify properties of this object, you can use object literal notation, as shown here:
{color: '#333', minSpacing: 20}
This option is only supported for a continuous
axis.
object
null
The color of the horizontal gridlines inside the chart area. Specify a valid HTML color string.
string
'#CCC'
The approximate number of horizontal gridlines inside the chart area. If you specify a positive number for gridlines.count
,
it will be used to compute the minSpacing
between gridlines.
You can specify a value of 1
to only draw one gridline,
or 0
to draw no gridlines.
Specify -1
, which is the default,
to automatically compute the number of gridlines
based on other options.
number
-1
hAxis
property that makes the horizontal axis a logarithmic scale (requires all
values to be positive). Set to true
for yes.
This option is only supported for a continuous
axis.
boolean
false
Moves the max value of the horizontal axis to the specified value; this will be rightward in
most charts. Ignored if this is set to a value smaller than the maximum x-value of the data. hAxis.viewWindow.max
overrides this property.
number
An object with members to configure the minor gridlines on the horizontal axis, similar to
the hAxis.gridlines
option.
This option is only supported for a continuous
axis.
object
null
The color of the horizontal minor gridlines inside the chart area. Specify a valid HTML color string.
string
The minorGridlines.count
option is mostly deprecated, except for disabling minor gridlines
by setting the count to 0. The number of minor gridlines now depends
entirely on the interval between
major gridlines (see hAxis.gridlines.interval
)
and the minimum required space
(see hAxis.minorGridlines.minSpacing
).
number
1
Moves the min value of the horizontal axis to the specified value; this will be leftward in
most charts. Ignored if this is set to a value greater than the minimum x-value of the data. hAxis.viewWindow.min
overrides this property.
number
Position of the horizontal axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the horizontal axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
hAxis
property that specifies the title of the horizontal axis.
string
null
An object that specifies the horizontal axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the horizontal axis.
object
null
The maximum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
The minimum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
Height of the chart in pixels.
number
An object with members to configure various aspects of the legend. To specify properties of this object, you can use object literal notation, as shown here:
{position: 'top', textStyle: {color: 'blue', fontSize: 16}}
object
null
Position of the legend. Can be one of the following:
-
'bottom'
- Below the chart. -
'left'
- To the left of the chart, provided the left axis has no series associated with it. So if you want the legend on the left, use the optiontargetAxisIndex: 1
. -
'in'
- Inside the chart, by the top left corner. -
'none'
- No legend is displayed. -
'right'
- To the right of the chart. Incompatible with thevAxes
option. -
'top'
- Above the chart.
string
'right'
An object that specifies the legend text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
An object of objects, where the keys are series names (the values in the Color column) and each object describing the format of the corresponding series in the chart. If a series or a value is not specified, the global value will be used. Each object supports the following properties:
-
color
- The color to use for this series. Specify a valid HTML color string. -
visibleInLegend
- Aboolean
value, wheretrue
means that the series should have a legend entry, andfalse
means that it should not. Default istrue
.
series: {'Europe': {color: 'green'}}
{}
An object with members to configure how values are associated with bubble size. To specify properties of this object, you can use object literal notation, as shown here:
{minValue: 0, maxSize: 20}
object
null
Maximum radius of the largest possible bubble, in pixels.
number
Minimum radius of the smallest possible bubble, in pixels.
number
Text to display below the chart title.
string
An object that specifies the title text style.
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
A theme is a set of predefined option values that work together to achieve a specific chart behavior or visual effect. Currently only one theme is available:
-
'maximized'
- Maximizes the area of the chart, and draws the legend and all of the labels inside the chart area.
string
null
Text to display above the chart.
string
An object that specifies the title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
If set to true
, the chart will treat the column as a text column.
boolean
If set to true
, the chart will treat the column as the domain.
boolean
Specifies properties for individual vertical axes, if the chart has multiple vertical axes.
Each child object is a vAxis
object, and can contain all the properties
supported by vAxis
. These property values override any global settings for the
same property.
To specify a chart with multiple vertical axes, first define a new axis using series.targetAxisIndex
, then configure the axis using vAxes
. The
following example assigns series 2 to the right axis and specifies a custom title and text
style for it:
{ series: { 2: { targetAxisIndex:1 } }, vAxes: { 1: { title:'Losses', textStyle: {color: 'red'} } } }
This property can be either an object or an array: the object is a collection of objects,
each with a numeric label that specifies the axis that it defines--this is the format shown
above; the array is an array of objects, one per axis. For example, the following array-style
notation is identical to the vAxis
object shown above:
vAxes: [ {}, // Nothing specified for axis 0 { title:'Losses', textStyle: {color: 'red'} // Axis 1 } ]
null
An object with members to configure various vertical axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{title: 'Hello', titleTextStyle: {color: '#FF0000'}}
object
null
The direction in which the values along the vertical axis grow. By default, low values
are on the bottom of the chart. Specify -1
to
reverse the order of the values.
1
or -1
1
An object with members to configure the gridlines on the vertical axis. Note that vertical axis gridlines are drawn horizontally. To specify properties of this object, you can use object literal notation, as shown here:
{color: '#333', minSpacing: 20}
This option is only supported for a continuous
axis.
object
null
The color of the vertical gridlines inside the chart area. Specify a valid HTML color string.
string
'#CCC'
The approximate number of horizontal gridlines inside the chart area.
If you specify a positive number for gridlines.count
,
it will be used to compute the minSpacing
between gridlines.
You can specify a value of 1
to only draw one gridline,
or 0
to draw no gridlines.
Specify -1
, which is the default,
to automatically compute the number of gridlines
based on other options.
number
-1
If true
, makes the vertical axis a logarithmic scale. Note:All values must be positive.
boolean
false
Moves the max value of the vertical axis to the specified value; this will be upward in most
charts. Ignored if this is set to a value smaller than the maximum y-value of the data. vAxis.viewWindow.max
overrides this property.
number
An object with members to configure the minor gridlines on the vertical axis, similar to the vAxis.gridlines option.
object
null
The color of the vertical minor gridlines inside the chart area. Specify a valid HTML color string.
string
The minorGridlines.count
option is mostly deprecated, except for disabling minor gridlines
by setting the count to 0
. The number of minor gridlines depends on the interval between
major gridlines and the minimum required space.
number
1
Moves the min value of the vertical axis to the specified value; this will be downward in
most charts. Ignored if this is set to a value greater than the minimum y-value of the data. vAxis.viewWindow.min
overrides this property.
number
null
Position of the vertical axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the vertical axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies a title for the vertical axis.
string
An object that specifies the vertical axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the vertical axis.
object
null
The maximum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
The minimum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
Calendar configuration options
Height of the chart in pixels.
number
Width of the chart in pixels.
number
Candlestick chart configuration options
The background color for the main area of the chart. Can be either a simple HTML color string,
for example: 'red'
or '#00cc00'
, or an object with the following
properties.
string
or object
'white'
The chart fill color, as an HTML color string.
string
'white'
An object with members to configure the placement and size of the chart area (where the chart
itself is drawn, excluding axis and legends). Two formats are supported: a number, or a
number followed by %. A simple number is a value in pixels; a number followed by % is a
percentage. Example: chartArea:{left:20,top:0,width:'50%',height:'75%'}
object
null
'#fdc'
) or an English color name. When an object is used, the following properties can
be provided:-
stroke
: The color, provided as a hex string or English color name. -
strokeWidth
: If provided, draws a border around the chart area of the given width (and with the color ofstroke
).
string
or object
'white'
Chart area height.
number
or string
How far to draw the chart from the left border.
number
or string
How far to draw the chart from the top border.
number
or string
Chart area width.
number
or string
The colors to use for the chart elements. An array of strings, where each element is an HTML
color string, for example: colors:['red','#004411']
.
An object with members to configure various horizontal axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{ title: 'Hello', titleTextStyle: { color: '#FF0000' } }
object
null
The direction in which the values along the horizontal axis grow. Specify -1
to
reverse the order of the values.
1
or -1
1
An object with properties to configure the gridlines on the horizontal axis. Note that horizontal axis gridlines are drawn vertically. To specify properties of this object, you can use object literal notation, as shown here:
{color: '#333', minSpacing: 20}
This option is only supported for a continuous
axis.
object
null
The color of the horizontal gridlines inside the chart area. Specify a valid HTML color string.
string
'#CCC'
The approximate number of horizontal gridlines inside the chart area. If you specify a positive number for gridlines.count
,
it will be used to compute the minSpacing
between gridlines.
You can specify a value of 1
to only draw one gridline,
or 0
to draw no gridlines.
Specify -1
, which is the default,
to automatically compute the number of gridlines
based on other options.
number
-1
hAxis
property that makes the horizontal axis a logarithmic scale (requires all
values to be positive). Set to true
for yes.
This option is only supported for a continuous
axis.
boolean
false
Moves the max value of the horizontal axis to the specified value; this will be rightward in
most charts. Ignored if this is set to a value smaller than the maximum x-value of the data. hAxis.viewWindow.max
overrides this property.
number
An object with members to configure the minor gridlines on the horizontal axis, similar to
the hAxis.gridlines
option.
This option is only supported for a continuous
axis.
object
null
The color of the horizontal minor gridlines inside the chart area. Specify a valid HTML color string.
string
The minorGridlines.count
option is mostly deprecated, except for disabling minor gridlines
by setting the count to 0. The number of minor gridlines now depends
entirely on the interval between
major gridlines (see hAxis.gridlines.interval
)
and the minimum required space
(see hAxis.minorGridlines.minSpacing
).
number
1
Moves the min value of the horizontal axis to the specified value; this will be leftward in
most charts. Ignored if this is set to a value greater than the minimum x-value of the data. hAxis.viewWindow.min
overrides this property.
number
Position of the horizontal axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the horizontal axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
hAxis
property that specifies the title of the horizontal axis.
string
null
An object that specifies the horizontal axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the horizontal axis.
object
null
The maximum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
The minimum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
Height of the chart in pixels.
number
An object with members to configure various aspects of the legend. To specify properties of this object, you can use object literal notation, as shown here:
{position: 'top', textStyle: {color: 'blue', fontSize: 16}}
object
null
Position of the legend. Can be one of the following:
-
'bottom'
- Below the chart. -
'left'
- To the left of the chart, provided the left axis has no series associated with it. So if you want the legend on the left, use the optiontargetAxisIndex: 1
. -
'in'
- Inside the chart, by the top left corner. -
'none'
- No legend is displayed. -
'right'
- To the right of the chart. Incompatible with thevAxes
option. -
'top'
- Above the chart.
string
'right'
An object that specifies the legend text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
An array of objects, each describing the format of the corresponding series in the chart.
To use default values for a series, specify an empty object {}
. If a series or a value
is not specified, the global value will be used. Each object supports the following properties:
-
color
- The color to use for this series. Specify a valid HTML color string. -
fallingColor.fill
- Overrides the globalcandlestick.fallingColor.fill
value for this series. -
fallingColor.stroke
- Overrides the globalcandlestick.fallingColor.stroke
value for this series. -
fallingColor.strokeWidth
- Overrides the globalcandlestick.fallingColor.strokeWidth
value for this series. -
labelInLegend
- The description of the series to appear in the chart legend. -
risingColor.fill
- Overrides the globalcandlestick.risingColor.fill
value for this series. -
risingColor.stroke
- Overrides the globalcandlestick.risingColor.stroke
value for this series. -
risingColor.strokeWidth
- Overrides the globalcandlestick.risingColor.strokeWidth
value for this series. -
targetAxisIndex
- Which axis to assign this series to, where0
is the default axis, and1
is the opposite axis. Default value is0
; set to1
to define a chart where different series are rendered against different axes. At least one series must be allocated to the default axis. You can define a different scale for different axes. -
visibleInLegend
- Aboolean
value, wheretrue
means that the series should have a legend entry, andfalse
means that it should not. Default istrue
.
You can specify either an array of objects, each of which applies to the series in the order given, or you can specify an object where each child has a numeric key indicating which series it applies to. For example, the following two declarations are identical, and declare the first series as black and absent from the legend, and the fourth as red and absent from the legend:
series: [ {color: 'black', visibleInLegend: false}, {}, {}, {color: 'red', visibleInLegend: false} ] series: { 0:{color: 'black', visibleInLegend: false}, 3:{color: 'red', visibleInLegend: false} }
{}
Text to display below the chart title.
string
An object that specifies the title text style.
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
A theme is a set of predefined option values that work together to achieve a specific chart behavior or visual effect. Currently only one theme is available:
-
'maximized'
- Maximizes the area of the chart, and draws the legend and all of the labels inside the chart area.
string
null
Text to display above the chart.
string
An object that specifies the title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
If set to true
, the chart will treat the column as the domain.
boolean
Specifies properties for individual vertical axes, if the chart has multiple vertical axes.
Each child object is a vAxis
object, and can contain all the properties
supported by vAxis
. These property values override any global settings for the
same property.
To specify a chart with multiple vertical axes, first define a new axis using series.targetAxisIndex
, then configure the axis using vAxes
. The
following example assigns series 2 to the right axis and specifies a custom title and text
style for it:
{ series: { 2: { targetAxisIndex:1 } }, vAxes: { 1: { title:'Losses', textStyle: {color: 'red'} } } }
This property can be either an object or an array: the object is a collection of objects,
each with a numeric label that specifies the axis that it defines--this is the format shown
above; the array is an array of objects, one per axis. For example, the following array-style
notation is identical to the vAxis
object shown above:
vAxes: [ {}, // Nothing specified for axis 0 { title:'Losses', textStyle: {color: 'red'} // Axis 1 } ]
null
An object with members to configure various vertical axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{title: 'Hello', titleTextStyle: {color: '#FF0000'}}
object
null
The direction in which the values along the vertical axis grow. By default, low values
are on the bottom of the chart. Specify -1
to
reverse the order of the values.
1
or -1
1
An object with members to configure the gridlines on the vertical axis. Note that vertical axis gridlines are drawn horizontally. To specify properties of this object, you can use object literal notation, as shown here:
{color: '#333', minSpacing: 20}
This option is only supported for a continuous
axis.
object
null
The color of the vertical gridlines inside the chart area. Specify a valid HTML color string.
string
'#CCC'
The approximate number of horizontal gridlines inside the chart area.
If you specify a positive number for gridlines.count
,
it will be used to compute the minSpacing
between gridlines.
You can specify a value of 1
to only draw one gridline,
or 0
to draw no gridlines.
Specify -1
, which is the default,
to automatically compute the number of gridlines
based on other options.
number
-1
If true
, makes the vertical axis a logarithmic scale. Note:All values must be positive.
boolean
false
Moves the max value of the vertical axis to the specified value; this will be upward in most
charts. Ignored if this is set to a value smaller than the maximum y-value of the data. vAxis.viewWindow.max
overrides this property.
number
An object with members to configure the minor gridlines on the vertical axis, similar to the vAxis.gridlines option.
object
null
The color of the vertical minor gridlines inside the chart area. Specify a valid HTML color string.
string
The minorGridlines.count
option is mostly deprecated, except for disabling minor gridlines
by setting the count to 0
. The number of minor gridlines depends on the interval between
major gridlines and the minimum required space.
number
1
Moves the min value of the vertical axis to the specified value; this will be downward in
most charts. Ignored if this is set to a value greater than the minimum y-value of the data. vAxis.viewWindow.min
overrides this property.
number
null
Position of the vertical axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the vertical axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies a title for the vertical axis.
string
An object that specifies the vertical axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the vertical axis.
object
null
The maximum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
The minimum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
Column chart configuration options
The background color for the main area of the chart. Can be either a simple HTML color string,
for example: 'red'
or '#00cc00'
, or an object with the following
properties.
string
or object
'white'
The chart fill color, as an HTML color string.
string
'white'
An object with members to configure the placement and size of the chart area (where the chart
itself is drawn, excluding axis and legends). Two formats are supported: a number, or a
number followed by %. A simple number is a value in pixels; a number followed by % is a
percentage. Example: chartArea:{left:20,top:0,width:'50%',height:'75%'}
object
null
'#fdc'
) or an English color name. When an object is used, the following properties can
be provided:-
stroke
: The color, provided as a hex string or English color name. -
strokeWidth
: If provided, draws a border around the chart area of the given width (and with the color ofstroke
).
string
or object
'white'
Chart area height.
number
or string
How far to draw the chart from the left border.
number
or string
How far to draw the chart from the top border.
number
or string
Chart area width.
number
or string
The colors to use for the chart elements. An array of strings, where each element is an HTML
color string, for example: colors:['red','#004411']
.
An object with members to configure various horizontal axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{ title: 'Hello', titleTextStyle: { color: '#FF0000' } }
object
null
The direction in which the values along the horizontal axis grow. Specify -1
to
reverse the order of the values.
1
or -1
1
An object with properties to configure the gridlines on the horizontal axis. Note that horizontal axis gridlines are drawn vertically. To specify properties of this object, you can use object literal notation, as shown here:
{color: '#333', minSpacing: 20}
This option is only supported for a continuous
axis.
object
null
The color of the horizontal gridlines inside the chart area. Specify a valid HTML color string.
string
'#CCC'
The approximate number of horizontal gridlines inside the chart area. If you specify a positive number for gridlines.count
,
it will be used to compute the minSpacing
between gridlines.
You can specify a value of 1
to only draw one gridline,
or 0
to draw no gridlines.
Specify -1
, which is the default,
to automatically compute the number of gridlines
based on other options.
number
-1
hAxis
property that makes the horizontal axis a logarithmic scale (requires all
values to be positive). Set to true
for yes.
This option is only supported for a continuous
axis.
boolean
false
Moves the max value of the horizontal axis to the specified value; this will be rightward in
most charts. Ignored if this is set to a value smaller than the maximum x-value of the data. hAxis.viewWindow.max
overrides this property.
number
An object with members to configure the minor gridlines on the horizontal axis, similar to
the hAxis.gridlines
option.
This option is only supported for a continuous
axis.
object
null
The color of the horizontal minor gridlines inside the chart area. Specify a valid HTML color string.
string
The minorGridlines.count
option is mostly deprecated, except for disabling minor gridlines
by setting the count to 0. The number of minor gridlines now depends
entirely on the interval between
major gridlines (see hAxis.gridlines.interval
)
and the minimum required space
(see hAxis.minorGridlines.minSpacing
).
number
1
Moves the min value of the horizontal axis to the specified value; this will be leftward in
most charts. Ignored if this is set to a value greater than the minimum x-value of the data. hAxis.viewWindow.min
overrides this property.
number
Position of the horizontal axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the horizontal axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
hAxis
property that specifies the title of the horizontal axis.
string
null
An object that specifies the horizontal axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the horizontal axis.
object
null
The maximum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
The minimum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
Height of the chart in pixels.
number
If set to true
, stacks the elements for all series at each domain value. Note:In Column
, Area
, and SteppedArea
charts,
Google Charts reverses the order of legend items to better correspond with the stacking of
the series elements (E.g. series 0 will be the bottom-most legend item). This does notapply to Bar
Charts.
The isStacked
option also supports 100% stacking, where the stacks of elements
at each domain value are rescaled to add up to 100%.
The options for isStacked
are:
-
false
— elements will not stack. This is the default option. -
true
— stacks elements for all series at each domain value. -
'percent'
— stacks elements for all series at each domain value and rescales them such that they add up to 100%, with each element's value calculated as a percentage of 100%. -
'relative'
— stacks elements for all series at each domain value and rescales them such that they add up to 1, with each element's value calculated as a fraction of 1. -
'absolute'
— functions the same asisStacked: true
.
For 100% stacking, the calculated value for each element will appear in the tooltip after its actual value.
The target axis will default to tick values based on the relative 0-1 scale as fractions
of 1 for 'relative'
, and 0-100% for 'percent'
( Note:when using the 'percent'
option, the axis/tick values
are displayed as percentages, however the actual values are the relative 0-1 scale values.
This is because the percentage axis ticks are the result of applying a format of "#.##%" to
the relative 0-1 scale values. When using isStacked: 'percent'
, be sure to
specify any ticks/gridlines using the relative 0-1 scale values). You can customize the
gridlines/tick values and formatting using the appropriate hAxis/vAxis
options.
100% stacking only supports data values of type number
, and must
have a baseline of zero.
boolean
/ string
false
An object with members to configure various aspects of the legend. To specify properties of this object, you can use object literal notation, as shown here:
{position: 'top', textStyle: {color: 'blue', fontSize: 16}}
object
null
Position of the legend. Can be one of the following:
-
'bottom'
- Below the chart. -
'left'
- To the left of the chart, provided the left axis has no series associated with it. So if you want the legend on the left, use the optiontargetAxisIndex: 1
. -
'in'
- Inside the chart, by the top left corner. -
'none'
- No legend is displayed. -
'right'
- To the right of the chart. Incompatible with thevAxes
option. -
'top'
- Above the chart.
string
'right'
An object that specifies the legend text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
An array of objects, each describing the format of the corresponding series in the chart.
To use default values for a series, specify an empty object {}
. If a series or a value is not
specified, the global value will be used. Each object supports the following properties:
-
annotations
- An object to be applied to annotations for this series. This can be used to control, for instance, thetextStyle
for the series:series: { 0: { annotations: { textStyle: {fontSize: 12, color: 'red' } } } }
See the various
annotations
options for a more complete list of what can be customized. -
color
- The color to use for this series. Specify a valid HTML color string. -
labelInLegend
- The description of the series to appear in the chart legend. -
targetAxisIndex
- Which axis to assign this series to, where0
is the default axis, and1
is the opposite axis. Default value is0
; set to1
to define a chart where different series are rendered against different axes. At least one series must be allocated to the default axis. You can define a different scale for different axes.
You can specify either an array of objects, each of which applies to the series in the order given, or you can specify an object where each child has a numeric key indicating which series it applies to. For example, the following two declarations are identical, and declare the first series as black and absent from the legend, and the fourth as red and absent from the legend:
series: [ {color: 'black', visibleInLegend: false}, {}, {}, {color: 'red', visibleInLegend: false} ] series: { 0:{color: 'black', visibleInLegend: false}, 3:{color: 'red', visibleInLegend: false} }
{}
Text to display below the chart title.
string
An object that specifies the title text style.
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
A theme is a set of predefined option values that work together to achieve a specific chart behavior or visual effect. Currently only one theme is available:
-
'maximized'
- Maximizes the area of the chart, and draws the legend and all of the labels inside the chart area.
string
null
Text to display above the chart.
string
An object that specifies the title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Displays trendlines
on the charts that support them. By default, linear
trendlines are
used, but this can be customized with the trendlines. n
.type
option.
Trendlines are specified on a per-series basis, so most of the time your options will look like this:
var options = { trendlines: { 0: { type: 'linear', color: 'green', lineWidth: 3, opacity: 0.3, visibleInLegend: true } } }
object
null
The color of the trendline , expressed as either an English color name or a hex string.
string
For trendlines
of type: 'polynomial'
, the degree of the polynomial ( 2
for
quadratic, 3
for cubic, and so on).
number
3
Whether the trendlines
is 'linear'
(the default), 'exponential'
, or 'polynomial'
.
string
linear
Whether the trendline equation appears in the legend. It will appear in the trendline tooltip.
boolean
false
If set to true
, the chart will treat the column as the domain.
boolean
Specifies properties for individual vertical axes, if the chart has multiple vertical axes.
Each child object is a vAxis
object, and can contain all the properties
supported by vAxis
. These property values override any global settings for the
same property.
To specify a chart with multiple vertical axes, first define a new axis using series.targetAxisIndex
, then configure the axis using vAxes
. The
following example assigns series 2 to the right axis and specifies a custom title and text
style for it:
{ series: { 2: { targetAxisIndex:1 } }, vAxes: { 1: { title:'Losses', textStyle: {color: 'red'} } } }
This property can be either an object or an array: the object is a collection of objects,
each with a numeric label that specifies the axis that it defines--this is the format shown
above; the array is an array of objects, one per axis. For example, the following array-style
notation is identical to the vAxis
object shown above:
vAxes: [ {}, // Nothing specified for axis 0 { title:'Losses', textStyle: {color: 'red'} // Axis 1 } ]
null
An object with members to configure various vertical axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{title: 'Hello', titleTextStyle: {color: '#FF0000'}}
object
null
The direction in which the values along the vertical axis grow. By default, low values
are on the bottom of the chart. Specify -1
to
reverse the order of the values.
1
or -1
1
An object with members to configure the gridlines on the vertical axis. Note that vertical axis gridlines are drawn horizontally. To specify properties of this object, you can use object literal notation, as shown here:
{color: '#333', minSpacing: 20}
This option is only supported for a continuous
axis.
object
null
The color of the vertical gridlines inside the chart area. Specify a valid HTML color string.
string
'#CCC'
The approximate number of horizontal gridlines inside the chart area.
If you specify a positive number for gridlines.count
,
it will be used to compute the minSpacing
between gridlines.
You can specify a value of 1
to only draw one gridline,
or 0
to draw no gridlines.
Specify -1
, which is the default,
to automatically compute the number of gridlines
based on other options.
number
-1
If true
, makes the vertical axis a logarithmic scale. Note:All values must be positive.
boolean
false
Moves the max value of the vertical axis to the specified value; this will be upward in most
charts. Ignored if this is set to a value smaller than the maximum y-value of the data. vAxis.viewWindow.max
overrides this property.
number
An object with members to configure the minor gridlines on the vertical axis, similar to the vAxis.gridlines option.
object
null
The color of the vertical minor gridlines inside the chart area. Specify a valid HTML color string.
string
The minorGridlines.count
option is mostly deprecated, except for disabling minor gridlines
by setting the count to 0
. The number of minor gridlines depends on the interval between
major gridlines and the minimum required space.
number
1
Moves the min value of the vertical axis to the specified value; this will be downward in
most charts. Ignored if this is set to a value greater than the minimum y-value of the data. vAxis.viewWindow.min
overrides this property.
number
null
Position of the vertical axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the vertical axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies a title for the vertical axis.
string
An object that specifies the vertical axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the vertical axis.
object
null
The maximum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
The minimum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
Combo chart configuration options
The default opacity of the colored area under an area chart series, where 0.0
is fully transparent and 1.0
is fully opaque. To specify opacity for
an individual series, set the areaOpacity
value in the series
property.
number
, 0.0- 1.0
0.3
The background color for the main area of the chart. Can be either a simple HTML color string,
for example: 'red'
or '#00cc00'
, or an object with the following
properties.
string
or object
'white'
The chart fill color, as an HTML color string.
string
'white'
An object with members to configure the placement and size of the chart area (where the chart
itself is drawn, excluding axis and legends). Two formats are supported: a number, or a
number followed by %. A simple number is a value in pixels; a number followed by % is a
percentage. Example: chartArea:{left:20,top:0,width:'50%',height:'75%'}
object
null
'#fdc'
) or an English color name. When an object is used, the following properties can
be provided:-
stroke
: The color, provided as a hex string or English color name. -
strokeWidth
: If provided, draws a border around the chart area of the given width (and with the color ofstroke
).
string
or object
'white'
Chart area height.
number
or string
How far to draw the chart from the left border.
number
or string
How far to draw the chart from the top border.
number
or string
Chart area width.
number
or string
The colors to use for the chart elements. An array of strings, where each element is an HTML
color string, for example: colors:['red','#004411']
.
Controls the curve of the lines when the line width is not zero. Can be one of the following:
-
'none'
- Straight lines without curve. -
'function'
- The angles of the line will be smoothed.
string
An object with members to configure various horizontal axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{ title: 'Hello', titleTextStyle: { color: '#FF0000' } }
object
null
The direction in which the values along the horizontal axis grow. Specify -1
to
reverse the order of the values.
1
or -1
1
An object with properties to configure the gridlines on the horizontal axis. Note that horizontal axis gridlines are drawn vertically. To specify properties of this object, you can use object literal notation, as shown here:
{color: '#333', minSpacing: 20}
This option is only supported for a continuous
axis.
object
null
The color of the horizontal gridlines inside the chart area. Specify a valid HTML color string.
string
'#CCC'
The approximate number of horizontal gridlines inside the chart area. If you specify a positive number for gridlines.count
,
it will be used to compute the minSpacing
between gridlines.
You can specify a value of 1
to only draw one gridline,
or 0
to draw no gridlines.
Specify -1
, which is the default,
to automatically compute the number of gridlines
based on other options.
number
-1
hAxis
property that makes the horizontal axis a logarithmic scale (requires all
values to be positive). Set to true
for yes.
This option is only supported for a continuous
axis.
boolean
false
Moves the max value of the horizontal axis to the specified value; this will be rightward in
most charts. Ignored if this is set to a value smaller than the maximum x-value of the data. hAxis.viewWindow.max
overrides this property.
number
An object with members to configure the minor gridlines on the horizontal axis, similar to
the hAxis.gridlines
option.
This option is only supported for a continuous
axis.
object
null
The color of the horizontal minor gridlines inside the chart area. Specify a valid HTML color string.
string
The minorGridlines.count
option is mostly deprecated, except for disabling minor gridlines
by setting the count to 0. The number of minor gridlines now depends
entirely on the interval between
major gridlines (see hAxis.gridlines.interval
)
and the minimum required space
(see hAxis.minorGridlines.minSpacing
).
number
1
Moves the min value of the horizontal axis to the specified value; this will be leftward in
most charts. Ignored if this is set to a value greater than the minimum x-value of the data. hAxis.viewWindow.min
overrides this property.
number
Position of the horizontal axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the horizontal axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
hAxis
property that specifies the title of the horizontal axis.
string
null
An object that specifies the horizontal axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the horizontal axis.
object
null
The maximum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
The minimum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
Height of the chart in pixels.
number
Whether to guess the value of missing points. If true
, it will guess the
value of any missing data based on neighboring points. If false
, it will
leave a break in the line at the unknown point.
This is notsupported by Area
charts with the isStacked: true/'percent'/'relative'/'absolute'
option.
boolean
false
If set to true
, stacks the elements for all series at each domain value. Note:In Column
, Area
, and SteppedArea
charts,
Google Charts reverses the order of legend items to better correspond with the stacking of
the series elements (E.g. series 0 will be the bottom-most legend item). This does notapply to Bar
Charts.
The isStacked
option also supports 100% stacking, where the stacks of elements
at each domain value are rescaled to add up to 100%.
The options for isStacked
are:
-
false
— elements will not stack. This is the default option. -
true
— stacks elements for all series at each domain value. -
'percent'
— stacks elements for all series at each domain value and rescales them such that they add up to 100%, with each element's value calculated as a percentage of 100%. -
'relative'
— stacks elements for all series at each domain value and rescales them such that they add up to 1, with each element's value calculated as a fraction of 1. -
'absolute'
— functions the same asisStacked: true
.
For 100% stacking, the calculated value for each element will appear in the tooltip after its actual value.
The target axis will default to tick values based on the relative 0-1 scale as fractions
of 1 for 'relative'
, and 0-100% for 'percent'
( Note:when using the 'percent'
option, the axis/tick values
are displayed as percentages, however the actual values are the relative 0-1 scale values.
This is because the percentage axis ticks are the result of applying a format of "#.##%" to
the relative 0-1 scale values. When using isStacked: 'percent'
, be sure to
specify any ticks/gridlines using the relative 0-1 scale values). You can customize the
gridlines/tick values and formatting using the appropriate hAxis/vAxis
options.
100% stacking only supports data values of type number
, and must
have a baseline of zero.
boolean
/ string
false
An object with members to configure various aspects of the legend. To specify properties of this object, you can use object literal notation, as shown here:
{position: 'top', textStyle: {color: 'blue', fontSize: 16}}
object
null
Position of the legend. Can be one of the following:
-
'bottom'
- Below the chart. -
'left'
- To the left of the chart, provided the left axis has no series associated with it. So if you want the legend on the left, use the optiontargetAxisIndex: 1
. -
'in'
- Inside the chart, by the top left corner. -
'none'
- No legend is displayed. -
'right'
- To the right of the chart. Incompatible with thevAxes
option. -
'top'
- Above the chart.
string
'right'
An object that specifies the legend text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Data line width in pixels. Use zero to hide all lines and show only the points. You can
override values for individual series using the series
property.
number
2
The shape of individual data elements: 'circle'
, 'triangle'
, 'square'
, 'diamond'
, 'star'
or 'polygon'
. See the points documentation
for examples.
string
'circle'
Diameter of displayed points in pixels. Use zero to hide all points. You can override values
for individual series using the series
property. If you're using a trendline
, the pointSize
option will affect the width of the trendline unless you override
it with the trendlines.n.pointsize
option.
number
0
An array of objects, each describing the format of the corresponding series in the chart. To use default
values for a series, specify an empty object {}
. If a series or a value is not specified, the global value
will be used. Each object supports the following properties:
-
annotations
- An object to be applied to annotations for this series. This can be used to control, for instance, thetextStyle
for the series:series: { 0: { annotations: { textStyle: {fontSize: 12, color: 'red' } } } }
See the various
annotations
options for a more complete list of what can be customized. -
areaOpacity
- Overrides the globalareaOpacity
for this series.. -
color
- The color to use for this series. Specify a valid HTML color string. -
curveType
- Overrides the globalcurveType
value for this series. -
fallingColor.fill
- Overrides the globalcandlestick.fallingColor.fill
value for this series. -
fallingColor.stroke
- Overrides the globalcandlestick.fallingColor.stroke
value for this series. -
fallingColor.strokeWidth
- Overrides the globalcandlestick.fallingColor.strokeWidth
value for this series. -
labelInLegend
- The description of the series to appear in the chart legend. -
lineDashStyle
- Overrides the globallineDashStyle
value for this series. -
lineWidth
- Overrides the globallineWidth
value for this series. -
pointShape
- Overrides the globalpointShape
value for this series. -
pointSize
- Overrides the globalpointSize
value for this series. -
pointsVisible
- Overrides the globalpointsVisible
value for this series. -
risingColor.fill
- Overrides the globalcandlestick.risingColor.fill
value for this series. -
risingColor.stroke
- Overrides the globalcandlestick.risingColor.stroke
value for this series. -
risingColor.strokeWidth
- Overrides the globalcandlestick.risingColor.strokeWidth
value for this series. -
targetAxisIndex
- Which axis to assign this series to, where0
is the default axis, and1
is the opposite axis. Default value is0
; set to1
to define a chart where different series are rendered against different axes. At least one series must be allocated to the default axis. You can define a different scale for different axes. -
type
- The type of marker for this series. Valid values are 'line', 'area', 'bars', and 'steppedArea'. Note that bars are actually vertical bars (columns). The default value is specified by the chart'sseriesType
option. -
visibleInLegend
- Aboolean
value, wheretrue
means that the series should have a legend entry, andfalse
means that it should not. Default istrue
.
You can specify either an array of objects, each of which applies to the series in the order given, or you can specify an object where each child has a numeric key indicating which series it applies to. For example, the following two declarations are identical, and declare the first series as black and absent from the legend, and the fourth as red and absent from the legend:
series: [ {color: 'black', visibleInLegend: false}, {}, {}, {color: 'red', visibleInLegend: false} ] series: { 0:{color: 'black', visibleInLegend: false}, 3:{color: 'red', visibleInLegend: false} }
{}
Text to display below the chart title.
string
An object that specifies the title text style.
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
A theme is a set of predefined option values that work together to achieve a specific chart behavior or visual effect. Currently only one theme is available:
-
'maximized'
- Maximizes the area of the chart, and draws the legend and all of the labels inside the chart area.
string
null
Text to display above the chart.
string
An object that specifies the title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
If set to true
, the chart will treat the column as the domain.
boolean
Specifies properties for individual vertical axes, if the chart has multiple vertical axes.
Each child object is a vAxis
object, and can contain all the properties
supported by vAxis
. These property values override any global settings for the
same property.
To specify a chart with multiple vertical axes, first define a new axis using series.targetAxisIndex
, then configure the axis using vAxes
. The
following example assigns series 2 to the right axis and specifies a custom title and text
style for it:
{ series: { 2: { targetAxisIndex:1 } }, vAxes: { 1: { title:'Losses', textStyle: {color: 'red'} } } }
This property can be either an object or an array: the object is a collection of objects,
each with a numeric label that specifies the axis that it defines--this is the format shown
above; the array is an array of objects, one per axis. For example, the following array-style
notation is identical to the vAxis
object shown above:
vAxes: [ {}, // Nothing specified for axis 0 { title:'Losses', textStyle: {color: 'red'} // Axis 1 } ]
null
An object with members to configure various vertical axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{title: 'Hello', titleTextStyle: {color: '#FF0000'}}
object
null
The direction in which the values along the vertical axis grow. By default, low values
are on the bottom of the chart. Specify -1
to
reverse the order of the values.
1
or -1
1
An object with members to configure the gridlines on the vertical axis. Note that vertical axis gridlines are drawn horizontally. To specify properties of this object, you can use object literal notation, as shown here:
{color: '#333', minSpacing: 20}
This option is only supported for a continuous
axis.
object
null
The color of the vertical gridlines inside the chart area. Specify a valid HTML color string.
string
'#CCC'
The approximate number of horizontal gridlines inside the chart area.
If you specify a positive number for gridlines.count
,
it will be used to compute the minSpacing
between gridlines.
You can specify a value of 1
to only draw one gridline,
or 0
to draw no gridlines.
Specify -1
, which is the default,
to automatically compute the number of gridlines
based on other options.
number
-1
If true
, makes the vertical axis a logarithmic scale. Note:All values must be positive.
boolean
false
Moves the max value of the vertical axis to the specified value; this will be upward in most
charts. Ignored if this is set to a value smaller than the maximum y-value of the data. vAxis.viewWindow.max
overrides this property.
number
An object with members to configure the minor gridlines on the vertical axis, similar to the vAxis.gridlines option.
object
null
The color of the vertical minor gridlines inside the chart area. Specify a valid HTML color string.
string
The minorGridlines.count
option is mostly deprecated, except for disabling minor gridlines
by setting the count to 0
. The number of minor gridlines depends on the interval between
major gridlines and the minimum required space.
number
1
Moves the min value of the vertical axis to the specified value; this will be downward in
most charts. Ignored if this is set to a value greater than the minimum y-value of the data. vAxis.viewWindow.min
overrides this property.
number
null
Position of the vertical axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the vertical axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies a title for the vertical axis.
string
An object that specifies the vertical axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the vertical axis.
object
null
The maximum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
The minimum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
Gauge configuration options
The color to use for the green section in HTML color notation.
string
'#109618'
The lowest value for a range marked by a green color.
number
The highest value for a range marked by a green color.
number
Height of the chart in pixels.
number
The maximum value to show on the Y axis. If the maximum data point exceeds this value, this
setting is ignored, and the chart is adjusted to show the next major tick mark
above the maximum data point. This takes precedence over the Y axis maximum determined
by scaleType
.
This is similar to maxValue
in core charts.
number
The minimum value to show on the Y axis. If the minimum data point is less than this value,
this setting is ignored, and the chart is adjusted to show the next major tick
mark below the minimum data point. This takes precedence over the Y axis minimum
determined by scaleType
.
This is similar to minValue
in core charts.
number
The color to use for the red section in HTML color notation.
string
'#DC3912'
The lowest value for a range marked by a red color.
number
The highest value for a range marked by a red color.
number
Width of the chart in pixels.
number
The color to use for the yellow section in HTML color notation.
string
'#FF9900'
The lowest value for a range marked by a yellow color.
number
The highest value for a range marked by a yellow color.
number
Geochart configuration options
The background color for the main area of the chart. Can be either a simple HTML color string,
for example: 'red'
or '#00cc00'
, or an object with the following
properties.
string
or object
'white'
The chart fill color, as an HTML color string.
string
'white'
Color to assign to regions with no associated data.
string
'#F5F5F5'
The color to use for data points in a geochart when the location
(e.g., 'US'
) is present but the value is either null
or
unspecified. This is distinct from datalessRegionColor
, which is the color
used when data is missing.
string
'#267114'
Which type of geochart this is. The DataTable format must match the value specified. The following values are supported:
-
'auto'
- Choose based on the format of the DataTable. -
'regions'
- Color the regions on the geochart. -
'markers'
- Place markers on the regions. -
'text'
- Label the regions with text from the DataTable.
string
Height of the chart in pixels.
number
An object with members to configure various aspects of the legend. To specify properties of this object, you can use object literal notation, as shown here:
{position: 'top', textStyle: {color: 'blue', fontSize: 16}}
object
null
An object that specifies the legend text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
The area to display on the geochart. Surrounding areas are displayed as well. Can be one of the following:
-
'world'
- A geochart of the entire world. - A continent or a sub-continent, specified by its 3-digit code
, e.g.,
'011'
for Western Africa. - A country, specified by its ISO 3166-1 alpha-2
code,
e.g.,
'AU'
for Australia. - A state in the United States, specified by its ISO 3166-2:US
code, e.g.,
'US-AL'
for Alabama. Note that theresolution
option must be set to either'provinces'
or'metros'
.
string
Width of the chart in pixels.
number
Histogram configuration options
The background color for the main area of the chart. Can be either a simple HTML color string,
for example: 'red'
or '#00cc00'
, or an object with the following
properties.
string
or object
'white'
The chart fill color, as an HTML color string.
string
'white'
An object with members to configure the placement and size of the chart area (where the chart
itself is drawn, excluding axis and legends). Two formats are supported: a number, or a
number followed by %. A simple number is a value in pixels; a number followed by % is a
percentage. Example: chartArea:{left:20,top:0,width:'50%',height:'75%'}
object
null
'#fdc'
) or an English color name. When an object is used, the following properties can
be provided:-
stroke
: The color, provided as a hex string or English color name. -
strokeWidth
: If provided, draws a border around the chart area of the given width (and with the color ofstroke
).
string
or object
/div> 'white'
Chart area height.
number
or string
How far to draw the chart from the left border.
number
or string
How far to draw the chart from the top border.
number
or string
Chart area width.
number
or string
The colors to use for the chart elements. An array of strings, where each element is an HTML
color string, for example: colors:['red','#004411']
.
An object with members to configure various horizontal axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{ title: 'Hello', titleTextStyle: { color: '#FF0000' } }
object
null
An object with properties to configure the gridlines on the horizontal axis. Note that horizontal axis gridlines are drawn vertically. To specify properties of this object, you can use object literal notation, as shown here:
{color: '#333', minSpacing: 20}
This option is only supported for a continuous
axis.
object
null
The color of the horizontal gridlines inside the chart area. Specify a valid HTML color string.
string
'#CCC'
The approximate number of horizontal gridlines inside the chart area. If you specify a positive number for gridlines.count
,
it will be used to compute the minSpacing
between gridlines.
You can specify a value of 1
to only draw one gridline,
or 0
to draw no gridlines.
Specify -1
, which is the default,
to automatically compute the number of gridlines
based on other options.
number
-1
An object with members to configure the minor gridlines on the horizontal axis, similar to
the hAxis.gridlines
option.
This option is only supported for a continuous
axis.
object
null
The color of the horizontal minor gridlines inside the chart area. Specify a valid HTML color string.
string
The minorGridlines.count
option is mostly deprecated, except for disabling minor gridlines
by setting the count to 0. The number of minor gridlines now depends
entirely on the interval between
major gridlines (see hAxis.gridlines.interval
)
and the minimum required space
(see hAxis.minorGridlines.minSpacing
).
number
1
Position of the horizontal axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the horizontal axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
hAxis
property that specifies the title of the horizontal axis.
string
null
An object that specifies the horizontal axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the horizontal axis.
object
null
The maximum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
The minimum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
Height of the chart in pixels.
number
Hardcode the size of each histogram bar, rather than letting it be determined algorithmically.
number
Omit the thin divisions between the blocks of the histogram, making it into a series of solid bars.
boolean
false
When calculating the histogram's bucket size, ignore the top and bottom lastBucketPercentile
percent. The values are
still included in the histogram, but do not affect bucketing.
number
0
Whether to guess the value of missing points. If true
, it will guess the
value of any missing data based on neighboring points. If false
, it will
leave a break in the line at the unknown point.
This is notsupported by Area
charts with the isStacked: true/'percent'/'relative'/'absolute'
option.
boolean
false
If set to true
, stacks the elements for all series at each domain value. Note:In Column
, Area
, and SteppedArea
charts,
Google Charts reverses the order of legend items to better correspond with the stacking of
the series elements (E.g. series 0 will be the bottom-most legend item). This does notapply to Bar
Charts.
The isStacked
option also supports 100% stacking, where the stacks of elements
at each domain value are rescaled to add up to 100%.
The options for isStacked
are:
-
false
— elements will not stack. This is the default option. -
true
— stacks elements for all series at each domain value. -
'percent'
— stacks elements for all series at each domain value and rescales them such that they add up to 100%, with each element's value calculated as a percentage of 100%. -
'relative'
— stacks elements for all series at each domain value and rescales them such that they add up to 1, with each element's value calculated as a fraction of 1. -
'absolute'
— functions the same asisStacked: true
.
For 100% stacking, the calculated value for each element will appear in the tooltip after its actual value.
The target axis will default to tick values based on the relative 0-1 scale as fractions
of 1 for 'relative'
, and 0-100% for 'percent'
( Note:when using the 'percent'
option, the axis/tick values
are displayed as percentages, however the actual values are the relative 0-1 scale values.
This is because the percentage axis ticks are the result of applying a format of "#.##%" to
the relative 0-1 scale values. When using isStacked: 'percent'
, be sure to
specify any ticks/gridlines using the relative 0-1 scale values). You can customize the
gridlines/tick values and formatting using the appropriate hAxis/vAxis
options.
100% stacking only supports data values of type number
, and must
have a baseline of zero.
boolean
/ string
false
An object with members to configure various aspects of the legend. To specify properties of this object, you can use object literal notation, as shown here:
{position: 'top', textStyle: {color: 'blue', fontSize: 16}}
object
null
Position of the legend. Can be one of the following:
-
'bottom'
- Below the chart. -
'left'
- To the left of the chart, provided the left axis has no series associated with it. So if you want the legend on the left, use the optiontargetAxisIndex: 1
. -
'in'
- Inside the chart, by the top left corner. -
'none'
- No legend is displayed. -
'right'
- To the right of the chart. Incompatible with thevAxes
option. -
'top'
- Above the chart.
string
'right'
An object that specifies the legend text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
An array of objects, each describing the format of the corresponding series in the chart. To use
default values for a series, specify an empty object {}
. If a series or a value is not specified,
the global value will be used. Each object supports the following properties:
-
color
- The color to use for this series. Specify a valid HTML color string. -
labelInLegend
- The description of the series to appear in the chart legend. -
targetAxisIndex
- Which axis to assign this series to, where0
is the default axis, and1
is the opposite axis. Default value is0
; set to1
to define a chart where different series are rendered against different axes. At least one series must be allocated to the default axis. You can define a different scale for different axes. -
visibleInLegend
- Aboolean
value, wheretrue
means that the series should have a legend entry, andfalse
means that it should not. Default istrue
.
You can specify either an array of objects, each of which applies to the series in the order given, or you can specify an object where each child has a numeric key indicating which series it applies to. For example, the following two declarations are identical, and declare the first series as black and absent from the legend, and the fourth as red and absent from the legend:
series: [ {color: 'black', visibleInLegend: false}, {}, {}, {color: 'red', visibleInLegend: false} ] series: { 0:{color: 'black', visibleInLegend: false}, 3:{color: 'red', visibleInLegend: false} }
{}
Text to display below the chart title.
string
An object that specifies the title text style.
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
A theme is a set of predefined option values that work together to achieve a specific chart behavior or visual effect. Currently only one theme is available:
-
'maximized'
- Maximizes the area of the chart, and draws the legend and all of the labels inside the chart area.
string
null
Text to display above the chart.
string
An object that specifies the title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
If set to true
, the chart will treat the column as the domain.
boolean
Specifies properties for individual vertical axes, if the chart has multiple vertical axes.
Each child object is a vAxis
object, and can contain all the properties
supported by vAxis
. These property values override any global settings for the
same property.
To specify a chart with multiple vertical axes, first define a new axis using series.targetAxisIndex
, then configure the axis using vAxes
. The
following example assigns series 2 to the right axis and specifies a custom title and text
style for it:
{ series: { 2: { targetAxisIndex:1 } }, vAxes: { 1: { title:'Losses', textStyle: {color: 'red'} } } }
This property can be either an object or an array: the object is a collection of objects,
each with a numeric label that specifies the axis that it defines--this is the format shown
above; the array is an array of objects, one per axis. For example, the following array-style
notation is identical to the vAxis
object shown above:
vAxes: [ {}, // Nothing specified for axis 0 { title:'Losses', textStyle: {color: 'red'} // Axis 1 } ]
null
An object with members to configure various vertical axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{title: 'Hello', titleTextStyle: {color: '#FF0000'}}
object
null
The direction in which the values along the vertical axis grow. By default, low values
are on the bottom of the chart. Specify -1
to
reverse the order of the values.
1
or -1
1
An object with members to configure the gridlines on the vertical axis. Note that vertical axis gridlines are drawn horizontally. To specify properties of this object, you can use object literal notation, as shown here:
{color: '#333', minSpacing: 20}
This option is only supported for a continuous
axis.
object
null
The color of the vertical gridlines inside the chart area. Specify a valid HTML color string.
string
'#CCC'
The approximate number of horizontal gridlines inside the chart area.
If you specify a positive number for gridlines.count
,
it will be used to compute the minSpacing
between gridlines.
You can specify a value of 1
to only draw one gridline,
or 0
to draw no gridlines.
Specify -1
, which is the default,
to automatically compute the number of gridlines
based on other options.
number
-1
If true
, makes the vertical axis a logarithmic scale. Note:All values must be positive.
boolean
false
Moves the max value of the vertical axis to the specified value; this will be upward in most
charts. Ignored if this is set to a value smaller than the maximum y-value of the data. vAxis.viewWindow.max
overrides this property.
number
An object with members to configure the minor gridlines on the vertical axis, similar to the vAxis.gridlines option.
object
null
The color of the vertical minor gridlines inside the chart area. Specify a valid HTML color string.
string
The minorGridlines.count
option is mostly deprecated, except for disabling minor gridlines
by setting the count to 0
. The number of minor gridlines depends on the interval between
major gridlines and the minimum required space.
number
1
Moves the min value of the vertical axis to the specified value; this will be downward in
most charts. Ignored if this is set to a value greater than the minimum y-value of the data. vAxis.viewWindow.min
overrides this property.
number
null
Position of the vertical axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the vertical axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies a title for the vertical axis.
string
An object that specifies the vertical axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the vertical axis.
object
null
The maximum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
The minimum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
Width of the chart in pixels.
number
Line chart configuration options
The background color for the main area of the chart. Can be either a simple HTML color string,
for example: 'red'
or '#00cc00'
, or an object with the following
properties.
string
or object
'white'
The chart fill color, as an HTML color string.
string
'white'
An object with members to configure the placement and size of the chart area (where the chart
itself is drawn, excluding axis and legends). Two formats are supported: a number, or a
number followed by %. A simple number is a value in pixels; a number followed by % is a
percentage. Example: chartArea:{left:20,top:0,width:'50%',height:'75%'}
object
null
'#fdc'
) or an English color name. When an object is used, the following properties can
be provided:-
stroke
: The color, provided as a hex string or English color name. -
strokeWidth
: If provided, draws a border around the chart area of the given width (and with the color ofstroke
).
string
or object
'white'
Chart area height.
number
or string
How far to draw the chart from the left border.
number
or string
How far to draw the chart from the top border.
number
or string
Chart area width.
number
or string
The colors to use for the chart elements. An array of strings, where each element is an HTML
color string, for example: colors:['red','#004411']
.
Controls the curve of the lines when the line width is not zero. Can be one of the following:
-
'none'
- Straight lines without curve. -
'function'
- The angles of the line will be smoothed.
string
An object with members to configure various horizontal axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{ title: 'Hello', titleTextStyle: { color: '#FF0000' } }
object
null
The direction in which the values along the horizontal axis grow. Specify -1
to
reverse the order of the values.
1
or -1
1
An object with properties to configure the gridlines on the horizontal axis. Note that horizontal axis gridlines are drawn vertically. To specify properties of this object, you can use object literal notation, as shown here:
{color: '#333', minSpacing: 20}
This option is only supported for a continuous
axis.
object
null
The color of the horizontal gridlines inside the chart area. Specify a valid HTML color string.
string
'#CCC'
The approximate number of horizontal gridlines inside the chart area. If you specify a positive number for gridlines.count
,
it will be used to compute the minSpacing
between gridlines.
You can specify a value of 1
to only draw one gridline,
or 0
to draw no gridlines.
Specify -1
, which is the default,
to automatically compute the number of gridlines
based on other options.
number
-1
hAxis
property that makes the horizontal axis a logarithmic scale (requires all
values to be positive). Set to true
for yes.
This option is only supported for a continuous
axis.
boolean
false
Moves the max value of the horizontal axis to the specified value; this will be rightward in
most charts. Ignored if this is set to a value smaller than the maximum x-value of the data. hAxis.viewWindow.max
overrides this property.
number
An object with members to configure the minor gridlines on the horizontal axis, similar to
the hAxis.gridlines
option.
This option is only supported for a continuous
axis.
object
null
The color of the horizontal minor gridlines inside the chart area. Specify a valid HTML color string.
string
The minorGridlines.count
option is mostly deprecated, except for disabling minor gridlines
by setting the count to 0. The number of minor gridlines now depends
entirely on the interval between
major gridlines (see hAxis.gridlines.interval
)
and the minimum required space
(see hAxis.minorGridlines.minSpacing
).
number
1
Moves the min value of the horizontal axis to the specified value; this will be leftward in
most charts. Ignored if this is set to a value greater than the minimum x-value of the data. hAxis.viewWindow.min
overrides this property.
number
Position of the horizontal axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the horizontal axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
hAxis
property that specifies the title of the horizontal axis.
string
null
An object that specifies the horizontal axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the horizontal axis.
object
null
The maximum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
The minimum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
Height of the chart in pixels.
number
Whether to guess the value of missing points. If true
, it will guess the
value of any missing data based on neighboring points. If false
, it will
leave a break in the line at the unknown point.
This is notsupported by Area
charts with the isStacked: true/'percent'/'relative'/'absolute'
option.
boolean
false
An object with members to configure various aspects of the legend. To specify properties of this object, you can use object literal notation, as shown here:
{position: 'top', textStyle: {color: 'blue', fontSize: 16}}
object
null
Position of the legend. Can be one of the following:
-
'bottom'
- Below the chart. -
'left'
- To the left of the chart, provided the left axis has no series associated with it. So if you want the legend on the left, use the optiontargetAxisIndex: 1
. -
'in'
- Inside the chart, by the top left corner. -
'none'
- No legend is displayed. -
'right'
- To the right of the chart. Incompatible with thevAxes
option. -
'top'
- Above the chart.
string
'right'
An object that specifies the legend text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Data line width in pixels. Use zero to hide all lines and show only the points. You can
override values for individual series using the series
property.
number
2
The shape of individual data elements: 'circle'
, 'triangle'
, 'square'
, 'diamond'
, 'star'
or 'polygon'
. See the points documentation
for examples.
string
'circle'
Diameter of displayed points in pixels. Use zero to hide all points. You can override values
for individual series using the series
property. If you're using a trendline
, the pointSize
option will affect the width of the trendline unless you override
it with the trendlines.n.pointsize
option.
number
0
An array of objects, each describing the format of the corresponding series in the chart.
To use default values for a series, specify an empty object {}
. If a series or a value is not specified,
the global value will be used. Each object supports the following properties:
-
annotations
- An object to be applied to annotations for this series. This can be used to control, for instance, thetextStyle
for the series:series: { 0: { annotations: { textStyle: {fontSize: 12, color: 'red' } } } }
See the various
annotations
options for a more complete list of what can be customized. -
type
- The type of marker for this series. Valid values are 'line', 'area', 'bars', and 'steppedArea'. Note that bars are actually vertical bars (columns). The default value is specified by the chart'sseriesType
option. -
color
- The color to use for this series. Specify a valid HTML color string. -
curveType
- Overrides the globalcurveType
value for this series. -
labelInLegend
- The description of the series to appear in the chart legend. -
lineDashStyle
- Overrides the globallineDashStyle
value for this series. -
lineWidth
- Overrides the globallineWidth
value for this series. -
pointShape
- Overrides the globalpointShape
value for this series. -
pointSize
- Overrides the globalpointSize
value for this series. -
pointsVisible
- Overrides the globalpointsVisible
value for this series. -
targetAxisIndex
- Which axis to assign this series to, where0
is the default axis, and1
is the opposite axis. Default value is0
; set to1
to define a chart where different series are rendered against different axes. At least one series must be allocated to the default axis. You can define a different scale for different axes. -
visibleInLegend
- Aboolean
value, wheretrue
means that the series should have a legend entry, andfalse
means that it should not. Default istrue
.
You can specify either an array of objects, each of which applies to the series in the order given, or you can specify an object where each child has a numeric key indicating which series it applies to. For example, the following two declarations are identical, and declare the first series as black and absent from the legend, and the fourth as red and absent from the legend:
series: [ {color: 'black', visibleInLegend: false}, {}, {}, {color: 'red', visibleInLegend: false} ] series: { 0:{color: 'black', visibleInLegend: false}, 3:{color: 'red', visibleInLegend: false} }
{}
Text to display below the chart title.
string
An object that specifies the title text style.
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
A theme is a set of predefined option values that work together to achieve a specific chart behavior or visual effect. Currently only one theme is available:
-
'maximized'
- Maximizes the area of the chart, and draws the legend and all of the labels inside the chart area.
string
null
Text to display above the chart.
string
An object that specifies the title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
If set to true
, the chart will treat the column as a text column.
boolean
Displays trendlines
on the charts that support them. By default, linear
trendlines are
used, but this can be customized with the trendlines. n
.type
option.
Trendlines are specified on a per-series basis, so most of the time your options will look like this:
var options = { trendlines: { 0: { type: 'linear', color: 'green', lineWidth: 3, opacity: 0.3, visibleInLegend: true } } }
object
null
The color of the trendline , expressed as either an English color name or a hex string.
string
For trendlines
of type: 'polynomial'
, the degree of the polynomial ( 2
for
quadratic, 3
for cubic, and so on).
number
3
Whether the trendlines
is 'linear'
(the default), 'exponential'
, or 'polynomial'
.
string
linear
Whether the trendline equation appears in the legend. It will appear in the trendline tooltip.
boolean
false
If set to true
, the chart will treat the column as the domain.
boolean
Specifies properties for individual vertical axes, if the chart has multiple vertical axes.
Each child object is a vAxis
object, and can contain all the properties
supported by vAxis
. These property values override any global settings for the
same property.
To specify a chart with multiple vertical axes, first define a new axis using series.targetAxisIndex
, then configure the axis using vAxes
. The
following example assigns series 2 to the right axis and specifies a custom title and text
style for it:
{ series: { 2: { targetAxisIndex:1 } }, vAxes: { 1: { title:'Losses', textStyle: {color: 'red'} } } }
This property can be either an object or an array: the object is a collection of objects,
each with a numeric label that specifies the axis that it defines--this is the format shown
above; the array is an array of objects, one per axis. For example, the following array-style
notation is identical to the vAxis
object shown above:
vAxes: [ {}, // Nothing specified for axis 0 { title:'Losses', textStyle: {color: 'red'} // Axis 1 } ]
null
An object with members to configure various vertical axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{title: 'Hello', titleTextStyle: {color: '#FF0000'}}
object
null
The direction in which the values along the vertical axis grow. By default, low values
are on the bottom of the chart. Specify -1
to
reverse the order of the values.
1
or -1
1
An object with members to configure the gridlines on the vertical axis. Note that vertical axis gridlines are drawn horizontally. To specify properties of this object, you can use object literal notation, as shown here:
{color: '#333', minSpacing: 20}
This option is only supported for a continuous
axis.
object
null
The color of the vertical gridlines inside the chart area. Specify a valid HTML color string.
string
'#CCC'
The approximate number of horizontal gridlines inside the chart area.
If you specify a positive number for gridlines.count
,
it will be used to compute the minSpacing
between gridlines.
You can specify a value of 1
to only draw one gridline,
or 0
to draw no gridlines.
Specify -1
, which is the default,
to automatically compute the number of gridlines
based on other options.
number
-1
If true
, makes the vertical axis a logarithmic scale. Note:All values must be positive.
boolean
false
Moves the max value of the vertical axis to the specified value; this will be upward in most
charts. Ignored if this is set to a value smaller than the maximum y-value of the data. vAxis.viewWindow.max
overrides this property.
number
An object with members to configure the minor gridlines on the vertical axis, similar to the vAxis.gridlines option.
object
null
The color of the vertical minor gridlines inside the chart area. Specify a valid HTML color string.
string
The minorGridlines.count
option is mostly deprecated, except for disabling minor gridlines
by setting the count to 0
. The number of minor gridlines depends on the interval between
major gridlines and the minimum required space.
number
1
Moves the min value of the vertical axis to the specified value; this will be downward in
most charts. Ignored if this is set to a value greater than the minimum y-value of the data. vAxis.viewWindow.min
overrides this property.
number
null
Position of the vertical axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the vertical axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies a title for the vertical axis.
string
An object that specifies the vertical axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the vertical axis.
object
null
The maximum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
The minimum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
Org chart configuration options
The background color of the org chart elements.
string
'#edf7ff'
The background color of selected org chart elements.
string
'#d6e9f8'
The overall size of the chart. Options include 'small'
, 'medium'
, or 'large'
.
string
'medium'
Pie chart configuration options
The background color for the main area of the chart. Can be either a simple HTML color string,
for example: 'red'
or '#00cc00'
, or an object with the following
properties.
string
or object
'white'
The chart fill color, as an HTML color string.
string
'white'
An object with members to configure the placement and size of the chart area (where the chart
itself is drawn, excluding axis and legends). Two formats are supported: a number, or a
number followed by %. A simple number is a value in pixels; a number followed by % is a
percentage. Example: chartArea:{left:20,top:0,width:'50%',height:'75%'}
object
null
'#fdc'
) or an English color name. When an object is used, the following properties can
be provided:-
stroke
: The color, provided as a hex string or English color name. -
strokeWidth
: If provided, draws a border around the chart area of the given width (and with the color ofstroke
).
string
or object
'white'
Chart area height.
number
or string
How far to draw the chart from the left border.
number
or string
How far to draw the chart from the top border.
number
or string
Chart area width.
number
or string
The colors to use for the chart elements. An array of strings, where each element is an HTML
color string, for example: colors:['red','#004411']
.
Height of the chart in pixels.
number
If true
, displays a three-dimensional chart.
boolean
false
An object with members to configure various aspects of the legend. To specify properties of this object, you can use object literal notation, as shown here:
{position: 'top', textStyle: {color: 'blue', fontSize: 16}}
object
null
Position of the legend. Can be one of the following:
-
'bottom'
- Below the chart. -
'left'
- To the left of the chart, provided the left axis has no series associated with it. So if you want the legend on the left, use the optiontargetAxisIndex: 1
. -
'in'
- Inside the chart, by the top left corner. -
'none'
- No legend is displayed. -
'right'
- To the right of the chart. Incompatible with thevAxes
option. -
'top'
- Above the chart.
string
'right'
An object that specifies the legend text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
If between 0
and 1
, displays a donut chart. The hole has a radius equal to number
times the radius of the chart.
number
0
The color of the slice borders. Only applicable when the chart is two-dimensional.
string
'white'
The content of the text displayed on the slice. Can be one of the following:
-
'percentage'
- The percentage of the slice size out of the total. -
'value'
- The quantitative value of the slice. -
'label'
- The name of the slice. -
'none'
- No text is displayed.
string
'percentage'
An object that specifies the slice text style. The object has this format:
{color: <string>, fontName: <string>, fontSize: <number>}
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
The color to use for this slice.
string
Text to display below the chart title.
string
An object that specifies the title text style.
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Text to display above the chart.
string
An object that specifies the title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Scatter chart configuration options
The background color for the main area of the chart. Can be either a simple HTML color string,
for example: 'red'
or '#00cc00'
, or an object with the following
properties.
string
or object
'white'
The chart fill color, as an HTML color string.
string
'white'
An object with members to configure the placement and size of the chart area (where the chart
itself is drawn, excluding axis and legends). Two formats are supported: a number, or a
number followed by %. A simple number is a value in pixels; a number followed by % is a
percentage. Example: chartArea:{left:20,top:0,width:'50%',height:'75%'}
object
null
'#fdc'
) or an English color name. When an object is used, the following properties can
be provided:-
stroke
: The color, provided as a hex string or English color name. -
strokeWidth
: If provided, draws a border around the chart area of the given width (and with the color ofstroke
).
string
or object
'white'
Chart area height.
number
or string
How far to draw the chart from the left border.
number
or string
How far to draw the chart from the top border.
number
or string
Chart area width.
number
or string
The colors to use for the chart elements. An array of strings, where each element is an HTML
color string, for example: colors:['red','#004411']
.
Controls the curve of the lines when the line width is not zero. Can be one of the following:
-
'none'
- Straight lines without curve. -
'function'
- The angles of the line will be smoothed.
string
An object with members to configure various horizontal axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{ title: 'Hello', titleTextStyle: { color: '#FF0000' } }
object
null
The direction in which the values along the horizontal axis grow. Specify -1
to
reverse the order of the values.
1
or -1
1
An object with properties to configure the gridlines on the horizontal axis. Note that horizontal axis gridlines are drawn vertically. To specify properties of this object, you can use object literal notation, as shown here:
{color: '#333', minSpacing: 20}
This option is only supported for a continuous
axis.
object
null
The color of the horizontal gridlines inside the chart area. Specify a valid HTML color string.
string
'#CCC'
The approximate number of horizontal gridlines inside the chart area. If you specify a positive number for gridlines.count
,
it will be used to compute the minSpacing
between gridlines.
You can specify a value of 1
to only draw one gridline,
or 0
to draw no gridlines.
Specify -1
, which is the default,
to automatically compute the number of gridlines
based on other options.
number
-1
hAxis
property that makes the horizontal axis a logarithmic scale (requires all
values to be positive). Set to true
for yes.
This option is only supported for a continuous
axis.
boolean
false
Moves the max value of the horizontal axis to the specified value; this will be rightward in
most charts. Ignored if this is set to a value smaller than the maximum x-value of the data. hAxis.viewWindow.max
overrides this property.
number
An object with members to configure the minor gridlines on the horizontal axis, similar to
the hAxis.gridlines
option.
This option is only supported for a continuous
axis.
object
null
The color of the horizontal minor gridlines inside the chart area. Specify a valid HTML color string.
string
The minorGridlines.count
option is mostly deprecated, except for disabling minor gridlines
by setting the count to 0. The number of minor gridlines now depends
entirely on the interval between
major gridlines (see hAxis.gridlines.interval
)
and the minimum required space
(see hAxis.minorGridlines.minSpacing
).
number
1
Moves the min value of the horizontal axis to the specified value; this will be leftward in
most charts. Ignored if this is set to a value greater than the minimum x-value of the data. hAxis.viewWindow.min
overrides this property.
number
Position of the horizontal axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the horizontal axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
hAxis
property that specifies the title of the horizontal axis.
string
null
An object that specifies the horizontal axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the horizontal axis.
object
null
The maximum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
The minimum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
Height of the chart in pixels.
number
An object with members to configure various aspects of the legend. To specify properties of this object, you can use object literal notation, as shown here:
{position: 'top', textStyle: {color: 'blue', fontSize: 16}}
object
null
Position of the legend. Can be one of the following:
-
'bottom'
- Below the chart. -
'left'
- To the left of the chart, provided the left axis has no series associated with it. So if you want the legend on the left, use the optiontargetAxisIndex: 1
. -
'in'
- Inside the chart, by the top left corner. -
'none'
- No legend is displayed. -
'right'
- To the right of the chart. Incompatible with thevAxes
option. -
'top'
- Above the chart.
string
'right'
An object that specifies the legend text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Data line width in pixels. Use zero to hide all lines and show only the points. You can
override values for individual series using the series
property.
number
2
The shape of individual data elements: 'circle'
, 'triangle'
, 'square'
, 'diamond'
, 'star'
or 'polygon'
. See the points documentation
for examples.
string
'circle'
Diameter of displayed points in pixels. Use zero to hide all points. You can override values
for individual series using the series
property. If you're using a trendline
, the pointSize
option will affect the width of the trendline unless you override
it with the trendlines.n.pointsize
option.
number
0
An array of objects, each describing the format of the corresponding series in the chart. To use
default values for a series, specify an empty object {}
. If a series or a value is not specified,
the global value will be used. Each object supports the following properties:
-
color
- The color to use for this series. Specify a valid HTML color string. -
labelInLegend
- The description of the series to appear in the chart legend. -
lineWidth
- Overrides the globallineWidth
value for this series. -
pointShape
- Overrides the globalpointShape
value for this series. -
pointSize
- Overrides the globalpointSize
value for this series. -
pointsVisible
- Overrides the globalpointsVisible
value for this series. -
visibleInLegend
- Aboolean
value, wheretrue
means that the series should have a legend entry, andfalse
means that it should not. Default istrue
.
You can specify either an array of objects, each of which applies to the series in the order given,or you can specify an object where each child has a numeric key indicating which series it applies to. For example, the following two declarations are identical, and declare the first series as black and absent from the legend, and the fourth as red and absent from the legend:
series: [ {color: 'black', visibleInLegend: false}, {}, {}, {color: 'red', visibleInLegend: false} ] series: { 0:{color: 'black', visibleInLegend: false}, 3:{color: 'red', visibleInLegend: false} }
{}
Text to display below the chart title.
string
An object that specifies the title text style.
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
A theme is a set of predefined option values that work together to achieve a specific chart behavior or visual effect. Currently only one theme is available:
-
'maximized'
- Maximizes the area of the chart, and draws the legend and all of the labels inside the chart area.
string
null
Text to display above the chart.
string
An object that specifies the title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
If set to true
, the chart will treat the column as a text column.
boolean
Displays trendlines
on the charts that support them. By default, linear
trendlines are
used, but this can be customized with the trendlines. n
.type
option.
Trendlines are specified on a per-series basis, so most of the time your options will look like this:
var options = { trendlines: { 0: { type: 'linear', color: 'green', lineWidth: 3, opacity: 0.3, visibleInLegend: true } } }
object
null
The color of the trendline , expressed as either an English color name or a hex string.
string
For trendlines
of type: 'polynomial'
, the degree of the polynomial ( 2
for
quadratic, 3
for cubic, and so on).
number
3
Whether the trendlines
is 'linear'
(the default), 'exponential'
, or 'polynomial'
.
string
linear
Whether the trendline equation appears in the legend. It will appear in the trendline tooltip.
boolean
false
If set to true
, the chart will treat the column as the domain.
boolean
Specifies properties for individual vertical axes, if the chart has multiple vertical axes.
Each child object is a vAxis
object, and can contain all the properties
supported by vAxis
. These property values override any global settings for the
same property.
To specify a chart with multiple vertical axes, first define a new axis using series.targetAxisIndex
, then configure the axis using vAxes
. The
following example assigns series 2 to the right axis and specifies a custom title and text
style for it:
{ series: { 2: { targetAxisIndex:1 } }, vAxes: { 1: { title:'Losses', textStyle: {color: 'red'} } } }
This property can be either an object or an array: the object is a collection of objects,
each with a numeric label that specifies the axis that it defines--this is the format shown
above; the array is an array of objects, one per axis. For example, the following array-style
notation is identical to the vAxis
object shown above:
vAxes: [ {}, // Nothing specified for axis 0 { title:'Losses', textStyle: {color: 'red'} // Axis 1 } ]
null
An object with members to configure various vertical axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{title: 'Hello', titleTextStyle: {color: '#FF0000'}}
object
null
The direction in which the values along the vertical axis grow. By default, low values
are on the bottom of the chart. Specify -1
to
reverse the order of the values.
1
or -1
1
An object with members to configure the gridlines on the vertical axis. Note that vertical axis gridlines are drawn horizontally. To specify properties of this object, you can use object literal notation, as shown here:
{color: '#333', minSpacing: 20}
This option is only supported for a continuous
axis.
object
null
The color of the vertical gridlines inside the chart area. Specify a valid HTML color string.
string
'#CCC'
The approximate number of horizontal gridlines inside the chart area.
If you specify a positive number for gridlines.count
,
it will be used to compute the minSpacing
between gridlines.
You can specify a value of 1
to only draw one gridline,
or 0
to draw no gridlines.
Specify -1
, which is the default,
to automatically compute the number of gridlines
based on other options.
number
-1
If true
, makes the vertical axis a logarithmic scale. Note:All values must be positive.
boolean
false
Moves the max value of the vertical axis to the specified value; this will be upward in most
charts. Ignored if this is set to a value smaller than the maximum y-value of the data. vAxis.viewWindow.max
overrides this property.
number
An object with members to configure the minor gridlines on the vertical axis, similar to the vAxis.gridlines option.
object
null
The color of the vertical minor gridlines inside the chart area. Specify a valid HTML color string.
string
The minorGridlines.count
option is mostly deprecated, except for disabling minor gridlines
by setting the count to 0
. The number of minor gridlines depends on the interval between
major gridlines and the minimum required space.
number
1
Moves the min value of the vertical axis to the specified value; this will be downward in
most charts. Ignored if this is set to a value greater than the minimum y-value of the data. vAxis.viewWindow.min
overrides this property.
number
null
Position of the vertical axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the vertical axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies a title for the vertical axis.
string
An object that specifies the vertical axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the vertical axis.
object
null
The maximum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
The minimum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
Stepped area chart configuration options
The default opacity of the colored area under an area chart series, where 0.0
is fully transparent and 1.0
is fully opaque. To specify opacity for
an individual series, set the areaOpacity
value in the series
property.
number
, 0.0- 1.0
0.3
The background color for the main area of the chart. Can be either a simple HTML color string,
for example: 'red'
or '#00cc00'
, or an object with the following
properties.
string
or object
'white'
The chart fill color, as an HTML color string.
string
'white'
An object with members to configure the placement and size of the chart area (where the chart
itself is drawn, excluding axis and legends). Two formats are supported: a number, or a
number followed by %. A simple number is a value in pixels; a number followed by % is a
percentage. Example: chartArea:{left:20,top:0,width:'50%',height:'75%'}
object
null
'#fdc'
) or an English color name. When an object is used, the following properties can
be provided:-
stroke
: The color, provided as a hex string or English color name. -
strokeWidth
: If provided, draws a border around the chart area of the given width (and with the color ofstroke
).
string
or object
'white'
Chart area height.
number
or string
How far to draw the chart from the left border.
number
or string
How far to draw the chart from the top border.
number
or string
Chart area width.
number
or string
The colors to use for the chart elements. An array of strings, where each element is an HTML
color string, for example: colors:['red','#004411']
.
An object with members to configure various horizontal axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{ title: 'Hello', titleTextStyle: { color: '#FF0000' } }
object
null
The direction in which the values along the horizontal axis grow. Specify -1
to
reverse the order of the values.
1
or -1
1
Position of the horizontal axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the horizontal axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
hAxis
property that specifies the title of the horizontal axis.
string
null
An object that specifies the horizontal axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the horizontal axis.
object
null
The maximum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
The minimum horizontal data value to render.
Ignored when hAxis.viewWindowMode
is 'pretty'
or 'maximized'
.
number
Height of the chart in pixels.
number
If set to true
, stacks the elements for all series at each domain value. Note:In Column
, Area
, and SteppedArea
charts,
Google Charts reverses the order of legend items to better correspond with the stacking of
the series elements (E.g. series 0 will be the bottom-most legend item). This does notapply to Bar
Charts.
The isStacked
option also supports 100% stacking, where the stacks of elements
at each domain value are rescaled to add up to 100%.
The options for isStacked
are:
-
false
— elements will not stack. This is the default option. -
true
— stacks elements for all series at each domain value. -
'percent'
— stacks elements for all series at each domain value and rescales them such that they add up to 100%, with each element's value calculated as a percentage of 100%. -
'relative'
— stacks elements for all series at each domain value and rescales them such that they add up to 1, with each element's value calculated as a fraction of 1. -
'absolute'
— functions the same asisStacked: true
.
For 100% stacking, the calculated value for each element will appear in the tooltip after its actual value.
The target axis will default to tick values based on the relative 0-1 scale as fractions
of 1 for 'relative'
, and 0-100% for 'percent'
( Note:when using the 'percent'
option, the axis/tick values
are displayed as percentages, however the actual values are the relative 0-1 scale values.
This is because the percentage axis ticks are the result of applying a format of "#.##%" to
the relative 0-1 scale values. When using isStacked: 'percent'
, be sure to
specify any ticks/gridlines using the relative 0-1 scale values). You can customize the
gridlines/tick values and formatting using the appropriate hAxis/vAxis
options.
100% stacking only supports data values of type number
, and must
have a baseline of zero.
boolean
/ string
false
An object with members to configure various aspects of the legend. To specify properties of this object, you can use object literal notation, as shown here:
{position: 'top', textStyle: {color: 'blue', fontSize: 16}}
object
null
Position of the legend. Can be one of the following:
-
'bottom'
- Below the chart. -
'left'
- To the left of the chart, provided the left axis has no series associated with it. So if you want the legend on the left, use the optiontargetAxisIndex: 1
. -
'in'
- Inside the chart, by the top left corner. -
'none'
- No legend is displayed. -
'right'
- To the right of the chart. Incompatible with thevAxes
option. -
'top'
- Above the chart.
string
'right'
An object that specifies the legend text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
An array of objects, each describing the format of the corresponding series in the chart.
To use default values for a series, specify an empty object {}
. If a series or a value is not specified,
the global value will be used. Each object supports the following properties:
-
areaOpacity
- Overrides the globalareaOpacity
for this series. -
color
- The color to use for this series. Specify a valid HTML color string. -
type
- The type of marker for this series. Valid values are 'line', 'area', 'bars', and 'steppedArea'. Note that bars are actually vertical bars (columns). The default value is specified by the chart'sseriesType
option. -
labelInLegend
- The description of the series to appear in the chart legend. -
lineDashStyle
- Overrides the globallineDashStyle
value for this series. -
targetAxisIndex
- Which axis to assign this series to, where0
is the default axis, and1
is the opposite axis. Default value is0
; set to1
to define a chart where different series are rendered against different axes. At least one series must be allocated to the default axis. You can define a different scale for different axes. -
visibleInLegend
- Aboolean
value, wheretrue
means that the series should have a legend entry, andfalse
means that it should not. Default istrue
.
You can specify either an array of objects, each of which applies to the series in the order given, or you can specify an object where each child has a numeric key indicating which series it applies to.For example, the following two declarations are identical, and declare the first series as black and absent from the legend, and the fourth as red and absent from the legend:
series: [ {color: 'black', visibleInLegend: false}, {}, {}, {color: 'red', visibleInLegend: false} ] series: { 0:{color: 'black', visibleInLegend: false}, 3:{color: 'red', visibleInLegend: false} }
{}
Text to display below the chart title.
string
An object that specifies the title text style.
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
A theme is a set of predefined option values that work together to achieve a specific chart behavior or visual effect. Currently only one theme is available:
-
'maximized'
- Maximizes the area of the chart, and draws the legend and all of the labels inside the chart area.
string
null
Text to display above the chart.
string
An object that specifies the title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
If set to true
, the chart will treat the column as a text column.
boolean
If set to true
, the chart will treat the column as the domain.
boolean
Specifies properties for individual vertical axes, if the chart has multiple vertical axes.
Each child object is a vAxis
object, and can contain all the properties
supported by vAxis
. These property values override any global settings for the
same property.
To specify a chart with multiple vertical axes, first define a new axis using series.targetAxisIndex
, then configure the axis using vAxes
. The
following example assigns series 2 to the right axis and specifies a custom title and text
style for it:
{ series: { 2: { targetAxisIndex:1 } }, vAxes: { 1: { title:'Losses', textStyle: {color: 'red'} } } }
This property can be either an object or an array: the object is a collection of objects,
each with a numeric label that specifies the axis that it defines--this is the format shown
above; the array is an array of objects, one per axis. For example, the following array-style
notation is identical to the vAxis
object shown above:
vAxes: [ {}, // Nothing specified for axis 0 { title:'Losses', textStyle: {color: 'red'} // Axis 1 } ]
null
An object with members to configure various vertical axis elements. To specify properties of this object, you can use object literal notation, as shown here:
{title: 'Hello', titleTextStyle: {color: '#FF0000'}}
object
null
The direction in which the values along the vertical axis grow. By default, low values
are on the bottom of the chart. Specify -1
to
reverse the order of the values.
1
or -1
1
An object with members to configure the gridlines on the vertical axis. Note that vertical axis gridlines are drawn horizontally. To specify properties of this object, you can use object literal notation, as shown here:
{color: '#333', minSpacing: 20}
This option is only supported for a continuous
axis.
object
null
The color of the vertical gridlines inside the chart area. Specify a valid HTML color string.
string
'#CCC'
The approximate number of horizontal gridlines inside the chart area.
If you specify a positive number for gridlines.count
,
it will be used to compute the minSpacing
between gridlines.
You can specify a value of 1
to only draw one gridline,
or 0
to draw no gridlines.
Specify -1
, which is the default,
to automatically compute the number of gridlines
based on other options.
number
-1
If true
, makes the vertical axis a logarithmic scale. Note:All values must be positive.
boolean
false
Moves the max value of the vertical axis to the specified value; this will be upward in most
charts. Ignored if this is set to a value smaller than the maximum y-value of the data. vAxis.viewWindow.max
overrides this property.
number
An object with members to configure the minor gridlines on the vertical axis, similar to the vAxis.gridlines option.
object
null
The color of the vertical minor gridlines inside the chart area. Specify a valid HTML color string.
string
The minorGridlines.count
option is mostly deprecated, except for disabling minor gridlines
by setting the count to 0
. The number of minor gridlines depends on the interval between
major gridlines and the minimum required space.
number
1
Moves the min value of the vertical axis to the specified value; this will be downward in
most charts. Ignored if this is set to a value greater than the minimum y-value of the data. vAxis.viewWindow.min
overrides this property.
number
null
Position of the vertical axis text, relative to the chart area. Supported values:
, 'out'
'in'
, 'none'
.
string
'out'
An object that specifies the vertical axis text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies a title for the vertical axis.
string
An object that specifies the vertical axis title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
Specifies the cropping range of the vertical axis.
object
null
The maximum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
The minimum vertical data value to render.
Ignored when vAxis.viewWindowMode
is 'pretty' or 'maximized'.
number
Width of the chart in pixels.
number
Table chart configuration options
Determines if an alternating color style will be assigned to odd and even rows.
boolean
true
Height of the chart in pixels.
number
If and how to enable paging through the data. Choose one of the following string
values:
-
'enable'
- The table will include page-forward and page-back buttons. Clicking on these buttons will perform the paging operation and change the displayed page. You might want to also set thepageSize
option. -
'event'
- The table will include page-forward and page-back buttons, but clicking them will trigger a'page'
event and will not change the displayed page. This option should be used when the code implements its own page turning logic. See the TableQueryWrapper example for an example of how to handle paging events manually. -
'disable'
- [ Default ] Paging is not supported.
string
'disable'
The number of rows in each page, when paging is enabled with the page option.
number
10
If set to true
, shows the row number as the first column of the table.
boolean
false
If and how to sort columns when the user clicks a column heading. If sorting is enabled,
consider setting the sortAscending
and sortColumn
properties as well. Choose one of the
following string
values:
-
'enable'
- [ Default ] Users can click on column headers to sort by the clicked column. When users click on the column header, the rows are automatically sorted, and a'sort'
event is triggered. -
'event'
- When users click on the column header, a'sort'
event is triggered, but the rows aren't automatically sorted. This option should be used when the page implements its own sort. See the TableQueryWrapper example for an example of how to handle sorting events manually. -
'disable'
- Clicking a column header has no effect.
string
'enable'
The order in which the initial sort column is sorted. True
for ascending, false
for
descending. Ignored if sortColumn
is not specified.
boolean
true
An index of a column in the data table, by which the table is initially sorted. The column is marked with a small arrow indicating the sort order.
number
-1
Width of the chart in pixels.
number
Timeline configuration options
The background color for the main area of the chart. Can be either a simple HTML color string,
for example: 'red'
or '#00cc00'
, or an object with the following
properties.
string
or object
'white'
The colors to use for the chart elements. An array of strings, where each element is an HTML
color string, for example: colors:['red','#004411']
.
Height of the chart in pixels.
number
Width of the chart in pixels.
number
Tree map configuration options
The color of the header section for each node. Specify an HTML color value.
string
#988f86
The color for a rectangle with a column 3 value of maxColorValue
. Specify an
HTML color value.
string
#00dd00
The maximum number of node levels to show in the current view. Levels are flattened
into the current plane. If your tree has more levels than this, you must go up or
down to see them. You can additionally see maxPostDepth
levels below this as
shaded rectangles within these nodes.
number
1
How many levels of nodes beyond maxDepth
to show in "hinted" fashion.
Hinted nodes are shown as shaded rectangles within a node that is within the maxDepth
limit.
number
0
The color for a rectangle with a column 3 value midway between maxColorValue
and minColorValue
. Specify an HTML color value.
string
#000000
The color for a rectangle with the column 3 value of minColorValue
. Specify an
HTML color value.
string
#dd0000
The color to use for a rectangle when a node has no value for column 3, and that node is a leaf (or contains only leaves). Specify an HTML color value.
string
#000000
Text to display below the chart title.
string
An object that specifies the title text style.
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}
An object that specifies the title text style. The color can be any HTML
color string, for example: 'red'
or '#00cc00'
. Also see fontName and fontSize.
object
Text to display above the chart.
string
An object that specifies the title text style. The object has this format:
{ color: <string>, fontName: <string>, fontSize: <number>, bold: <boolean>, italic: <boolean> }
The color
can be any HTML color string, for example: 'red'
or '#00cc00'
. Also see fontName
and fontSize
.
object
{color: 'black', fontName: <global-font-name>, fontSize: <global-font-size>}