Yahoo! UI Library

charts  3.3.0

Yahoo! UI Library > charts > Graph
Search:
 
Filters

Class Graph - extends Widget - uses Renderer

Graph manages and contains series instances for a CartesianChart instance.

Constructor

Graph ( )

Properties

_dispatchers - private object


_seriesCollection - private object

Collection of series to be displayed in the graph.

_seriesDictionary - private object


seriesTypes - private object

Hash of arrays containing series mapped to a series type.

Properties inherited from Plugin.Host:

Properties inherited from Attribute:

Properties inherited from Base:

Properties inherited from Renderer:

Methods

_addSeries

private void _addSeries ( )
Adds a series to the graph.

_createSeries

private void _createSeries ( )

_drawingCompleteHandler

private void _drawingCompleteHandler ( )

_drawSeries

private void _drawSeries ( )

_getDefaultStyles

protected _getDefaultStyles ( )
Gets the default value for the styles attribute. Overrides base implementation.
Returns:
Object

_getSeries

private void _getSeries ( )

_markerEventHandler

private void _markerEventHandler ( )

_parseSeriesCollection

private void _parseSeriesCollection ( )
Parses series instances to be displayed in the graph.

_sizeChangeHandler

private void _sizeChangeHandler ( )

_updateStyles

private void _updateStyles ( )

addDispatcher

protected void addDispatcher ( val )
Adds dispatcher to a _dispatcher used to to ensure all series have redrawn before for firing event.
Parameters:
val <CartesianSeries> series instance to add

getSeriesByIndex

getSeriesByIndex ( val )
Returns a series instance based on an index.
Parameters:
val <Number> index of the series
Returns:
CartesianSeries

getSeriesByKey

getSeriesByKey ( val )
Returns a series instance based on a key value.
Parameters:
val <String> key value of the series
Returns:
CartesianSeries

renderUI

private void renderUI ( )

syncUI

private void syncUI ( )

Events

horizontalGridlinesChange

horizontalGridlinesChange ( event )
Fires when the value for the configuration attribute 'horizontalGridlines' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

seriesCollectionChange

seriesCollectionChange ( event )
Fires when the value for the configuration attribute 'seriesCollection' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

seriesDictionaryChange

seriesDictionaryChange ( event )
Fires when the value for the configuration attribute 'seriesDictionary' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

showBackgroundChange

showBackgroundChange ( event )
Fires when the value for the configuration attribute 'showBackground' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

stylesChange

stylesChange ( event )
Fires when the value for the configuration attribute 'styles' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

verticalGridlinesChange

verticalGridlinesChange ( event )
Fires when the value for the configuration attribute 'verticalGridlines' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

Configuration Attributes

horizontalGridlines - Gridlines

Reference to the horizontal Gridlines instance.
Default Value: null

seriesCollection - CartesianSeries

Collection of series. When setting the seriesCollection the array can contain a combination of either CartesianSeries instances or object literals with properties that will define a series.

seriesDictionary - Object

Read-only hash lookup for all series on in the Graph.

showBackground - Boolean

Indicates whether the Graph has a background.
Default Value: true

styles - Object

Style properties used for drawing a background. Below are the default values:
fill
A hash containing the following values:
color
Color of the fill. The default value is #faf9f2.
alpha
Number from 0 to 1 indicating the opacity of the background fill. The default value is 1.
border
A hash containing the following values:
color
Color of the border. The default value is #dad8c9.
alpha
Number from 0 to 1 indicating the opacity of the background border. The default value is 1.
weight
Number indicating the width of the border. The default value is 1.

verticalGridlines - Gridlines

Reference to the vertical Gridlines instance.
Default Value: null

Configuration attributes inherited from Base:

Configuration attributes inherited from Renderer:


Copyright © 2011 Yahoo! Inc. All rights reserved.