The goog.ui.ServerChart Class

goog.ui.ServerChart
> goog.ui.Component
> goog.events.EventTarget
> goog.Disposable

goog.ui.ServerChart(type, opt_width, opt_height, opt_domHelper, opt_uri)

Will construct a chart using Google's chartserver.

type {goog.ui.ServerChart.ChartType}
The chart type.
opt_width {number=}
The width of the chart.
opt_height {number=}
The height of the chart.
opt_domHelper {goog.dom.DomHelper=}
Optional DOM Helper.
opt_uri {string=}
Optional uri used to connect to the chart server, if different than goog.ui.ServerChart.CHART_SERVER_SCHEME_INDEPENDENT_URI.

The goog.ui.ServerChart.AxisDisplayType Enum

Enum of line and tick options for an axis. … more

.CHART_SERVER_HTTPS_URI {string}

Base HTTPS URI for the chart renderer.

.CHART_SERVER_HTTP_URI {string}

Base HTTP URI for the chart renderer.

.CHART_SERVER_SCHEME_INDEPENDENT_URI {string}

Base scheme-independent URI for the chart renderer.

.CHART_VALUES {string}

Array of possible ChartServer data values

.CHART_VALUES_EXTENDED {string}

Array of extended ChartServer data values

The goog.ui.ServerChart.ChartType Enum

Enum of chart types with their short names used by the chartserver. … more

.DEFAULT_NORMALIZATION {number}

The 0 - 1.0 ("fraction of the range") value to use when getMinValue() == getMaxValue(). This determines, for example, the vertical position of the line in a flat line-chart.

.EXTENDED_UPPER_BOUND

Upper bound for extended values

The goog.ui.ServerChart.EncodingType Enum

Enum of chart data encoding types … more

The goog.ui.ServerChart.Event Enum

Event types dispatched by the ServerChart object … more

The goog.ui.ServerChart.LegendPosition Enum

Enum of legend positions. … more

The goog.ui.ServerChart.MaximumValue Enum

Enum of chart maximum values in pixels, as listed at: http://code.google.com/apis/chart/basics.html … more

The goog.ui.ServerChart.MultiAxisAlignment Enum

Enum of multi-axis alignments. … more

The goog.ui.ServerChart.MultiAxisType Enum

Enum of multi-axis types. … more

The goog.ui.ServerChart.UriParam Enum

Enum of ChartServer URI parameters. … more

The goog.ui.ServerChart.UriTooLongEvent Class

Class for the event dispatched on the ServerChart when the resulting URI exceeds the URI length limit. … more

.addChild(child, opt_render)

Inherited from goog.ui.Component .

Adds the specified component as the last child of this component. See {@link goog.ui.Component#addChildAt} for detailed semantics.

child {goog.ui.Component}
The new child component.
opt_render {boolean=}
If true, the child component will be rendered into the parent.
@see
goog.ui.Component#addChildAt

.addChildAt(child, index, opt_render)

Inherited from goog.ui.Component .

Adds the specified component as a child of this component at the given 0-based index. Both {@code addChild} and {@code addChildAt} assume the following contract between parent and child components:

In particular, {@code parent.addChild(child)} will throw an error if the child component is already in the document, but the parent isn't. Clients of this API may call {@code addChild} and {@code addChildAt} with {@code opt_render} set to true. If {@code opt_render} is true, calling these methods will automatically render the child component's element into the parent component's element. However, {@code parent.addChild(child, true)} will throw an error if: If {@code opt_render} is true and the parent component is not already in the document, {@code enterDocument} will not be called on this component at this point. Finally, this method also throws an error if the new child already has a different parent, or the given index is out of bounds.
child {goog.ui.Component}
The new child component.
index {number}
0-based index at which the new child component is to be added; must be between 0 and the current child count (inclusive).
opt_render {boolean=}
If true, the child component will be rendered into the parent.
returns {void}
Nada.
@see
goog.ui.Component#addChild

.addDataSet(data, color, opt_legendText)

Adds a data set. NOTE: The color string should NOT have a '#' at the beginning of it.

data {Array.<number|null>}
An array of numbers (values can be NaN or null).
color {string}
The hex value for this data set's color.
opt_legendText {string=}
The legend text, if any, for this data series. NOTE: If specified, all previously added data sets must also have a legend text.

.addEventListener(type, handler, opt_capture, opt_handlerScope)

Inherited from goog.events.EventTarget .

Adds an event listener to the event target. The same handler can only be added once per the type. Even if you add the same handler multiple times using the same type then it will only be called once when the event is dispatched. Supported for legacy but use goog.events.listen(src, type, handler) instead.

type {string}
The type of the event to listen for.
handler {Function|Object}
The function to handle the event. The handler can also be an object that implements the handleEvent method which takes the event object as argument.
opt_capture {boolean=}
In DOM-compliant browsers, this determines whether the listener is fired during the capture or bubble phase of the event.
opt_handlerScope {Object=}
Object in whose scope to call the listener.

.addMultiAxis(axisType)

Adds a multi-axis to the chart, and sets its type. Multiple axes of the same type can be added.

axisType {goog.ui.ServerChart.MultiAxisType}
The desired axis type.
returns {number}
The index of the newly inserted axis, suitable for feeding to the setMultiAxis*() functions.

.addOnDisposeCallback(callback, opt_scope)

Inherited from goog.Disposable .

Invokes a callback function when this object is disposed. Callbacks are invoked in the order in which they were added.

callback {!Function}
The callback function.
opt_scope {Object=}
An optional scope to call the callback in.

.canDecorate(element)

Inherited from goog.ui.Component .

Determines if a given element can be decorated by this type of component. This method should be overridden by inheriting objects.

element {Element}
Element to decorate.
returns {boolean}
True if the element can be decorated, false otherwise.

.clearDataSets()

Clears the data sets from the graph. All data, including the colors and legend text, is cleared.

.createDom()

Creates the DOM node (image) needed for the Chart

.creationStack {string}

Inherited from goog.Disposable .

If monitoring the goog.Disposable instances is enabled, stores the creation stack trace of the Disposable instance.

.decorate(element)

Inherited from goog.ui.Component .

Decorates the element for the UI component.

element {Element}
Element to decorate.

.dispatchEvent(e)

Inherited from goog.events.EventTarget .

Dispatches an event (or event like object) and calls all listeners listening for events of this type. The type of the event is decided by the type property on the event object. If any of the listeners returns false OR calls preventDefault then this function will return false. If one of the capture listeners calls stopPropagation, then the bubble listeners won't fire.

e {string|Object|goog.events.Event}
Event object.
returns {boolean}
If anyone called preventDefault on the event object (or if any of the handlers returns false this will also return false.

.dispose()

Inherited from goog.Disposable .

Disposes of the object. If the object hasn't already been disposed of, calls {@link #disposeInternal}. Classes that extend {@code goog.Disposable} should override {@link #disposeInternal} in order to delete references to COM objects, DOM nodes, and other disposable objects. Reentrant.

returns {void}
Nothing.

.enterDocument()

Inherited from goog.ui.Component .

Called when the component's element is known to be in the document. Anything using document.getElementById etc. should be done at this stage. If the component contains child components, this call is propagated to its children.

.exitDocument()

Inherited from goog.ui.Component .

Called by dispose to clean up the elements and listeners created by a component, or by a parent component/application who has removed the component from the document but wants to reuse it later. If the component contains child components, this call is propagated to its children. It should be possible for the component to be rendered again once this method has been called.

.forEachChild(f, opt_obj)

Inherited from goog.ui.Component .

Calls the given function on each of this component's children in order. If {@code opt_obj} is provided, it will be used as the 'this' object in the function when called. The function should take two arguments: the child component and its 0-based index. The return value is ignored.

f {Function}
The function to call for every child component; should take 2 arguments (the child and its index).
opt_obj {Object=}
Used as the 'this' object in f when called.

.getBackgroundFill()

Returns the background fill.

returns {Array.<Object>}
An array of background fill specifications. If the fill specification string is in an unsupported format, the method returns an empty array.

.getChild(id)

Inherited from goog.ui.Component .

Returns the child with the given ID, or null if no such child exists.

id {string}
Child component ID.
returns {goog.ui.Component?}
The child with the given ID; null if none.

.getChildAt(index)

Inherited from goog.ui.Component .

Returns the child at the given index, or null if the index is out of bounds.

index {number}
0-based index.
returns {goog.ui.Component?}
The child at the given index; null if none.

.getChildCount()

Inherited from goog.ui.Component .

Returns the number of children of this component.

returns {number}
The number of children.

.getChildIds()

Inherited from goog.ui.Component .

Returns an array containing the IDs of the children of this component, or an empty array if the component has no children.

returns {Array.<string>}
Child component IDs.

.getContentElement()

Inherited from goog.ui.Component .

Returns the DOM element into which child components are to be rendered, or null if the component itself hasn't been rendered yet. This default implementation returns the component's root element. Subclasses with complex DOM structures must override this method.

returns {Element}
Element to contain child elements (null if none).

.getData(opt_setNumber)

Returns the given data set or all of them in a two-dimensional array if the set number is not given.

opt_setNumber {number=}
Optional data set number to get.
returns {Array}
The given data set or all of them in a two-dimensional array if the set number is not given.

.getDomHelper()

Inherited from goog.ui.Component .

Returns the dom helper that is being used on this component.

returns {!goog.dom.DomHelper}
The dom helper used on this component.

.getElement()

Inherited from goog.ui.Component .

Gets the component's element.

returns {Element}
The element for the component.

.getElementByClass(className)

Inherited from goog.ui.Component .

Returns the first element in this component's DOM with the provided className.

className {string}
The name of the class to look for.
returns {Element}
The first item with the class name provided.

.getElementByFragment(idFragment)

Inherited from goog.ui.Component .

Helper function for returning an element in the document with a unique id generated using makeId().

idFragment {string}
The partial id.
returns {Element}
The element with the unique id, or null if it cannot be found.

.getElementsByClass(className)

Inherited from goog.ui.Component .

Returns an array of all the elements in this component's DOM with the provided className.

className {string}
The name of the class to look for.
returns {!goog.array.ArrayLike}
The items found with the class name provided.

.getEncodingType()

Gets the encoding type.

returns {goog.ui.ServerChart.EncodingType}
The encoding type.

.getFragmentFromId(id)

Inherited from goog.ui.Component .

Helper function for returning the fragment portion of an id generated using makeId().

id {string}
Id generated with makeId().
returns {string}
Fragment.

.getGridParameter()

Returns the 'chg' parameter of the chart Uri. This is used by various types of charts to specify Grids.

returns {string|undefined}
The 'chg' parameter of the chart Uri.

.getGridX()

returns {number}
The number of gridlines along the X-axis.

.getGridY()

returns {number}
The number of gridlines along the Y-axis.

.getId()

Inherited from goog.ui.Component .

Gets the unique ID for the instance of this component. If the instance doesn't already have an ID, generates one on the fly.

returns {string}
Unique component ID.

.getLeftLabels()

returns {Array.<string>}
The Left Labels for the chart.

.getLegendPosition()

Returns the position relative to the chart where the legend is to be displayed.

returns {goog.ui.ServerChart.LegendPosition}
Legend position.

.getMarkerParameter()

Returns the 'chm' parameter of the chart Uri. This is used by various types of charts to specify Markers.

returns {string|undefined}
The 'chm' parameter of the chart Uri.

.getMaxValue()

returns {number}
The maximum value of the chart.

.getMinValue()

returns {number}
The minimum value of the chart.

.getMiscParameter()

Returns the 'chp' parameter of the chart Uri. This is used by various types of charts to specify certain options. e.g., finance charts use this to designate which line is the 0 axis.

returns {string|undefined}
The 'chp' parameter of the chart Uri.

.getModel()

Inherited from goog.ui.Component .

Returns the model associated with the UI component.

returns {*}
The model.

.getMultiAxisLabelPosition(opt_axisNumber)

Returns the label positions for a given axis number, or all of them in a two-dimensional array if the axis number is not given.

opt_axisNumber {number=}
The axis index, as returned by addMultiAxis.
returns {Object|Array.<number>}
The label positions for a given axis number, or all of them in a two-dimensional array if the axis number is not given.

.getMultiAxisLabelStyle(opt_axisNumber)

Returns the label style for a given axis number as a one- to three-element array, or all of them in a two-dimensional array if the axis number is not given.

opt_axisNumber {number=}
The axis index, as returned by addMultiAxis.
returns {Object|Array.<number>}
The label style for a given axis number as a one- to three-element array, or all of them in a two-dimensional array if the axis number is not given.

.getMultiAxisLabelText(opt_axisNumber)

Returns the label text, or all of them in a two-dimensional array if the axis number is not given.

opt_axisNumber {number=}
The axis index, as returned by addMultiAxis.
returns {Object|Array.<string>}
The label text, or all of them in a two-dimensional array if the axis number is not given.

.getMultiAxisRange(opt_axisNumber)

Returns the label range for a given axis number as a two-element array of (range start, range end), or all of them in a two-dimensional array if the axis number is not given.

opt_axisNumber {number=}
The axis index, as returned by addMultiAxis.
returns {Object|Array.<number>}
The label range for a given axis number as a two-element array of (range start, range end), or all of them in a two-dimensional array if the axis number is not given.

.getMultiAxisType(opt_axisNumber)

Returns the axis type for the given axis, or all of them in an array if the axis number is not given.

opt_axisNumber {number=}
The axis index, as returned by addMultiAxis.
returns {goog.ui.ServerChart.MultiAxisType| Array.<goog.ui.ServerChart.MultiAxisType>}
The axis type for the given axis, or all of them in an array if the axis number is not given.

.getNumVisibleDataSets()

Returns the number of "visible" data sets. All data sets that come after the visible data set are not drawn as part of the chart. Instead, they are available for positioning markers.

returns {?number}
The number of visible data sets, or null if all data sets are visible.

.getParent()

Inherited from goog.ui.Component .

Returns the component's parent, if any.

returns {goog.ui.Component?}
The parent component.

.getParentEventTarget()

Inherited from goog.events.EventTarget .

Returns the parent of this event target to use for bubbling.

returns {goog.events.EventTarget}
The parent EventTarget or null if there is no parent.

.getRightLabels()

returns {Array.<string>}
The Right Labels for the chart.

.getSize()

Returns the chart size.

returns {Array.<string>}
[Width, Height].

.getTitleColor()

returns {string}
color The hex value for the title color.

.getTitleSize()

returns {number}
size The title size, in points.

.getType()

Returns the chart type.

returns {goog.ui.ServerChart.ChartType}
The chart type.

.getUri()

Returns the URI of the chart.

returns {goog.Uri}
The chart URI.

.getUriLengthLimit()

Returns the upper limit on the length of the chart image URI, after encoding. If the URI's length equals or exceeds it, goog.ui.ServerChart.UriTooLongEvent is dispatched on the goog.ui.ServerChart object.

returns {number}
The chart URI length limit.

.getXLabels()

returns {Array.<string>}
The X Labels for the chart.

.hasChildren()

Inherited from goog.ui.Component .

Returns true if the component has children.

returns {boolean}
True if the component has children.

.indexOfChild(child)

Inherited from goog.ui.Component .

Returns the 0-based index of the given child component, or -1 if no such child is found.

child {goog.ui.Component?}
The child component.
returns {number}
0-based index of the child component; -1 if not found.

.isBarChart()

returns {boolean}
Whether the chart is a bar chart.

.isDisposed()

Inherited from goog.Disposable .

returns {boolean}
Whether the object has been disposed of.

.isGroupedBarChart()

returns {boolean}
Whether the chart is a grouped bar chart.

.isHorizontalBarChart()

returns {boolean}
Whether the chart is a horizontal bar chart.

.isInDocument()

Inherited from goog.ui.Component .

Determines whether the component has been added to the document.

returns {boolean}
TRUE if rendered. Otherwise, FALSE.

.isLineChart()

returns {boolean}
Whether the chart is a line chart.

.isMap()

returns {boolean}
Whether the chart is a map.

.isPieChart()

returns {boolean}
Whether the chart is a pie chart.

.isRightToLeft()

Inherited from goog.ui.Component .

Returns true if the component is rendered right-to-left, false otherwise. The first time this function is invoked, the right-to-left rendering property is set if it has not been already.

returns {boolean}
Whether the control is rendered right-to-left.

.isStackedBarChart()

returns {boolean}
Whether the chart is a stacked bar chart.

.isVerticalBarChart()

returns {boolean}
Whether the chart is a vertical bar chart.

.makeId(idFragment)

Inherited from goog.ui.Component .

Helper function for subclasses that gets a unique id for a given fragment, this can be used by components to generate unique string ids for DOM elements.

idFragment {string}
A partial id.
returns {string}
Unique element id.

.makeIds(object)

Inherited from goog.ui.Component .

Makes a collection of ids. This is a convenience method for makeId. The object's values are the id fragments and the new values are the generated ids. The key will remain the same.

object {Object}
The object that will be used to create the ids.
returns {Object}
An object of id keys to generated ids.

.registerDisposable(disposable)

Inherited from goog.Disposable .

Associates a disposable object with this object so that they will be disposed together.

disposable {goog.disposable.IDisposable}
that will be disposed when this object is disposed.

.removeChild(child, opt_unrender)

Inherited from goog.ui.Component .

Removes the given child from this component, and returns it. Throws an error if the argument is invalid or if the specified child isn't found in the parent component. The argument can either be a string (interpreted as the ID of the child component to remove) or the child component itself. If {@code opt_unrender} is true, calls {@link goog.ui.component#exitDocument} on the removed child, and subsequently detaches the child's DOM from the document. Otherwise it is the caller's responsibility to clean up the child component's DOM.

child {string|goog.ui.Component|null}
The ID of the child to remove, or the child component itself.
opt_unrender {boolean=}
If true, calls {@code exitDocument} on the removed child component, and detaches its DOM from the document.
returns {goog.ui.Component}
The removed component, if any.
@see
goog.ui.Component#removeChildAt

.removeChildAt(index, opt_unrender)

Inherited from goog.ui.Component .

Removes the child at the given index from this component, and returns it. Throws an error if the argument is out of bounds, or if the specified child isn't found in the parent. See {@link goog.ui.Component#removeChild} for detailed semantics.

index {number}
0-based index of the child to remove.
opt_unrender {boolean=}
If true, calls {@code exitDocument} on the removed child component, and detaches its DOM from the document.
returns {goog.ui.Component}
The removed component, if any.
@see
goog.ui.Component#removeChild

.removeChildren(opt_unrender)

Inherited from goog.ui.Component .

Removes every child component attached to this one and returns them.

opt_unrender {boolean=}
If true, calls {@link #exitDocument} on the removed child components, and detaches their DOM from the document.
returns {!Array.<goog.ui.Component>|undefined}
The removed components if any.
@see
goog.ui.Component#removeChild

.removeEventListener(type, handler, opt_capture, opt_handlerScope)

Inherited from goog.events.EventTarget .

Removes an event listener from the event target. The handler must be the same object as the one added. If the handler has not been added then nothing is done.

type {string}
The type of the event to listen for.
handler {Function|Object}
The function to handle the event. The handler can also be an object that implements the handleEvent method which takes the event object as argument.
opt_capture {boolean=}
In DOM-compliant browsers, this determines whether the listener is fired during the capture or bubble phase of the event.
opt_handlerScope {Object=}
Object in whose scope to call the listener.

.removeParameter(key)

Removes the given ChartServer parameter.

key {goog.ui.ServerChart.UriParam}
The ChartServer parameter to remove.

.render(opt_parentElement)

Inherited from goog.ui.Component .

Renders the component. If a parent element is supplied, the component's element will be appended to it. If there is no optional parent element and the element doesn't have a parentNode then it will be appended to the document body. If this component has a parent component, and the parent component is not in the document already, then this will not call {@code enterDocument} on this component. Throws an Error if the component is already rendered.

opt_parentElement {Element=}
Optional parent element to render the component into.

.renderBefore(sibling)

Inherited from goog.ui.Component .

Renders the component before another element. The other element should be in the document already. Throws an Error if the component is already rendered.

sibling {Node}
Node to render the component before.

.setAutomaticBarWidth(opt_spaceBars, opt_spaceGroups)

Specifies that the bar width in a bar chart should be calculated automatically given the space available in the chart, while optionally setting the spaces between the bars. NOTE: If the space between groups is specified but the space between bars is left undefined, the space between groups will be interpreted as the space between bars because this is the behavior exposed in the external developers guide.

opt_spaceBars {number=}
The width of the space between bars in a group in pixels.
opt_spaceGroups {number=}
The width of the space between groups.

.setBackgroundFill(fill)

Sets the background fill.

fill {Array.<Object>}
An array of background fill specification objects. Each object may have the following properties: {string} area The area to fill, either 'bg' for background or 'c' for chart area. The default is 'bg'. {string} color (required) The color of the background fill. // TODO(user): Add support for gradient/stripes, which requires // a different object structure.

.setBarSpaceWidths(barWidth, opt_spaceBars, opt_spaceGroups)

Sets the widths of the bars and the spaces between the bars in a bar chart. NOTE: If the space between groups is specified but the space between bars is left undefined, the space between groups will be interpreted as the space between bars because this is the behavior exposed in the external developers guide.

barWidth {number}
The width of a bar in pixels.
opt_spaceBars {number=}
The width of the space between bars in a group in pixels.
opt_spaceGroups {number=}
The width of the space between groups.

.setDataScaling(minimum, maximum)

Sets the data scaling. NOTE: This also changes the encoding type because data scaling will only work with {@code goog.ui.ServerChart.EncodingType.TEXT} encoding.

minimum {number}
The lowest number to apply to the data.
maximum {number}
The highest number to apply to the data.

.setEncodingType(type)

Sets the encoding type.

type {goog.ui.ServerChart.EncodingType}
Desired data encoding type.

.setGridParameter(value)

Sets the 'chg' parameter of the chart Uri. This is used by various types of charts to specify Grids.

value {string}
Value for the 'chg' parameter in the chart Uri.

.setGridX(gridlines)

Sets the number of grid lines along the X-axis.

gridlines {number}
The number of X-axis grid lines.

.setGridY(gridlines)

Sets the number of grid lines along the Y-axis.

gridlines {number}
The number of Y-axis grid lines.

.setId(id)

Inherited from goog.ui.Component .

Assigns an ID to this component instance. It is the caller's responsibility to guarantee that the ID is unique. If the component is a child of a parent component, then the parent component's child index is updated to reflect the new ID; this may throw an error if the parent already has a child with an ID that conflicts with the new ID.

id {string}
Unique component ID.

.setLeftLabels(labels)

Sets the Left Labels for the chart. NOTE: The array should start with the lowest value, and then move progessively up the axis. So if you want labels from 0 to 100 with 0 at bottom of the graph, then you would want to pass something like [0,25,50,75,100].

labels {Array.<string>}
The Left Labels for the chart.

.setLegend(legend)

Adds a legend to the chart.

legend {Array.<string>}
The legend to add.

.setLegendPosition(value)

Sets the position relative to the chart where the legend is to be displayed.

value {goog.ui.ServerChart.LegendPosition}
Legend position.

.setMargins(leftMargin, rightMargin, topMargin, bottomMargin)

Sets the chart margins.

leftMargin {number}
The size in pixels of the left margin.
rightMargin {number}
The size in pixels of the right margin.
topMargin {number}
The size in pixels of the top margin.
bottomMargin {number}
The size in pixels of the bottom margin.

.setMarkerParameter(value)

Sets the 'chm' parameter of the chart Uri. This is used by various types of charts to specify Markers.

value {string}
Value for the 'chm' parameter in the chart Uri.

.setMaxValue(maxValue)

Sets the maximum value of the chart.

maxValue {number}
The maximum value of the chart.

.setMinValue(minValue)

Sets the minimum value of the chart.

minValue {number}
The minimum value of the chart.

.setMiscParameter(value)

Sets the 'chp' parameter of the chart Uri. This is used by various types of charts to specify certain options. e.g., finance charts use this to designate which line is the 0 axis.

value {string|number}
Value for the 'chp' parameter in the chart Uri.

.setModel(obj)

Inherited from goog.ui.Component .

Sets the model associated with the UI component.

obj {*}
The model.

.setMultiAxisLabelPosition(axisNumber, labelPosition)

Sets the label positions for a given axis, overwriting any existing values. The label positions are assumed to be floating-point numbers within the range of the axis.

axisNumber {number}
The axis index, as returned by addMultiAxis.
labelPosition {Array.<number>}
The actual label positions to be added.

.setMultiAxisLabelStyle(axisNumber, color, opt_fontSize, opt_alignment, opt_axisDisplay)

Sets the label style for a given axis, overwriting any existing style. The default style is as follows: Default is x-axis labels are centered, left hand y-axis labels are right aligned, right hand y-axis labels are left aligned. The font size and alignment are optional parameters. NOTE: The color string should NOT have a '#' at the beginning of it.

axisNumber {number}
The axis index, as returned by addMultiAxis.
color {string}
The hex value for this label's color.
opt_fontSize {number=}
The label font size, in pixels.
opt_alignment {goog.ui.ServerChart.MultiAxisAlignment=}
The label alignment.
opt_axisDisplay {goog.ui.ServerChart.AxisDisplayType=}
The axis line and ticks.

.setMultiAxisLabelText(axisNumber, labelText)

Sets the label text (usually multiple values) for a given axis, overwriting any existing values.

axisNumber {number}
The axis index, as returned by addMultiAxis.
labelText {Array.<string>}
The actual label text to be added.

.setMultiAxisRange(axisNumber, rangeStart, rangeEnd, opt_interval)

Sets the label range for a given axis, overwriting any existing range. The default range is from 0 to 100. If the start value is larger than the end value, the axis direction is reversed. rangeStart and rangeEnd must be two different finite numbers.

axisNumber {number}
The axis index, as returned by addMultiAxis.
rangeStart {number}
The new start of the range.
rangeEnd {number}
The new end of the range.
opt_interval {number=}
The interval between axis labels.

.setNumVisibleDataSets(n)

Sets the number of "visible" data sets. All data sets that come after the visible data set are not drawn as part of the chart. Instead, they are available for positioning markers.

n {?number}
The number of visible data sets, or null if all data sets are to be visible.

.setParameterValue(key, value)

Sets the given ChartServer parameter.

key {goog.ui.ServerChart.UriParam}
The ChartServer parameter to set.
value {string}
The value to set for the ChartServer parameter.

.setParent(parent)

Inherited from goog.ui.Component .

Sets the parent of this component to use for event bubbling. Throws an error if the component already has a parent or if an attempt is made to add a component to itself as a child. Callers must use {@code removeChild} or {@code removeChildAt} to remove components from their containers before calling this method.

parent {goog.ui.Component}
The parent component.
@see
goog.ui.Component#removeChild
@see
goog.ui.Component#removeChildAt

.setParentEventTarget(parent)

Inherited from goog.ui.Component .

Overrides {@link goog.events.EventTarget#setParentEventTarget} to throw an error if the parent component is set, and the argument is not the parent.

parent {goog.events.EventTarget?}
Parent EventTarget (null if none).

.setRightLabels(labels)

Sets the Right Labels for the chart. NOTE: The array should start with the lowest value, and then move progessively up the axis. So if you want labels from 0 to 100 with 0 at bottom of the graph, then you would want to pass something like [0,25,50,75,100].

labels {Array.<string>}
The Right Labels for the chart.

.setRightToLeft(rightToLeft)

Inherited from goog.ui.Component .

Set is right-to-left. This function should be used if the component needs to know the rendering direction during dom creation (i.e. before {@link #enterDocument} is called and is right-to-left is set).

rightToLeft {boolean}
Whether the component is rendered right-to-left.

.setSize(opt_width, opt_height)

Sets the chart size.

opt_width {number=}
Optional chart width, defaults to 300.
opt_height {number=}
Optional chart height, defaults to 150.

.setTitle(title)

Sets the title of the chart.

title {string}
The chart title.

.setTitleColor(color)

Sets the color of the chart title. NOTE: The color string should NOT have a '#' at the beginning of it.

color {string}
The hex value for the title color.

.setTitleSize(size)

Sets the size of the chart title.

size {number}
The title size, in points.

.setType(type)

Sets the chart type.

type {goog.ui.ServerChart.ChartType}
The desired chart type.

.setUri(uri)

Sets the URI of the chart.

uri {goog.Uri}
The chart URI.

.setUriLengthLimit(uriLengthLimit)

Sets the upper limit on the length of the chart image URI, after encoding. If the URI's length equals or exceeds it, goog.ui.ServerChart.UriTooLongEvent is dispatched on the goog.ui.ServerChart object.

uriLengthLimit {number}
The chart URI length limit.

.setVennSeries(weights, opt_legendText, opt_colors)

Sets the weight function for a Venn Diagram along with the associated colors and legend text. Weights are assigned as follows: weights[0] is relative area of circle A. weights[1] is relative area of circle B. weights[2] is relative area of circle C. weights[3] is relative area of overlap of circles A and B. weights[4] is relative area of overlap of circles A and C. weights[5] is relative area of overlap of circles B and C. weights[6] is relative area of overlap of circles A, B and C. For a two circle Venn Diagram the weights are assigned as follows: weights[0] is relative area of circle A. weights[1] is relative area of circle B. weights[2] is relative area of overlap of circles A and B.

weights {Array.<number>}
The relative weights of the circles.
opt_legendText {Array.<string>=}
The legend labels for the circles.
opt_colors {Array.<string>=}
The colors for the circles.

.setXLabels(labels)

Sets the X Labels for the chart.

labels {Array.<string>}
The X Labels for the chart.

.updateChart()

Updates the image if any of the data or settings have changed.

.wasDecorated()

Inherited from goog.ui.Component .

returns {boolean}
Whether the component was decorated.