Yahoo! UI Library

charts  3.3.0

Yahoo! UI Library > charts > CartesianChart
Search:
 
Filters

Class CartesianChart - extends ChartBase

The CartesianChart class creates a chart with horizontal and vertical axes.

Constructor

CartesianChart ( )

Properties

_axesRenderQueue - private object


_type - private object


Methods

_addAxes

private void _addAxes ( )

_addGridlines

private void _addGridlines ( )
Adds gridlines to the chart.

_addSeries

private void _addSeries ( )

_addToAxesRenderQueue

private void _addToAxesRenderQueue ( )

_axisRendered

private void _axisRendered ( )
Listender for axisRendered event.

_getBaseAttribute

private void _getBaseAttribute ( )
Gets an attribute from an object, using a getter for Base objects and a property for object literals. Used for determining attributes from series/axis references which can be an actual class instance or a hash of properties that will be used to create a class instance.

_getCategoryAxis

private void _getCategoryAxis ( )

_getDefaultAxes

private void _getDefaultAxes ( )

_getDefaultAxisPosition

private void _getDefaultAxisPosition ( )
Determines the position of an axis when one is not specified.

_getDefaultSeriesCollection

private void _getDefaultSeriesCollection ( )

_getSeriesAxis

private void _getSeriesAxis ( )

_parseAxes

private void _parseAxes ( )
Creates Axis and Axis data classes based on hashes of properties.

_parseSeriesAxes

private void _parseSeriesAxes ( )

_planarEventDispatcher

private void _planarEventDispatcher ( )

_redraw

private void _redraw ( )

_setBaseAttribute

private void _setBaseAttribute ( )
Sets an attribute on an object, using a setter of Base objects and a property for object literals. Used for setting attributes on a Base class, either directly or to be stored in an object literal for use at instantiation.

_sizeChanged

private void _sizeChanged ( )

getSeriesItem

getSeriesItem ( series , index )
Returns an object literal containing a categoryItem and a valueItem for a given series index.
Parameters:
series <CartesianSeries> Reference to a series.
index <Number> Index of the specified item within a series.
Returns:
Object

renderUI

private void renderUI ( )

Events

axesChange

axesChange ( event )
Fires when the value for the configuration attribute 'axes' 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

axesStylesChange

axesStylesChange ( event )
Fires when the value for the configuration attribute 'axesStyles' 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

bottomAxesCollectionChange

bottomAxesCollectionChange ( event )
Fires when the value for the configuration attribute 'bottomAxesCollection' 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

categoryAxisChange

categoryAxisChange ( event )
Fires when the value for the configuration attribute 'categoryAxis' 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

categoryAxisNameChange

categoryAxisNameChange ( event )
Fires when the value for the configuration attribute 'categoryAxisName' 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

directionChange

directionChange ( event )
Fires when the value for the configuration attribute 'direction' 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

graphStylesChange

graphStylesChange ( event )
Fires when the value for the configuration attribute 'graphStyles' 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

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

leftAxesCollectionChange

leftAxesCollectionChange ( event )
Fires when the value for the configuration attribute 'leftAxesCollection' 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

planarEvent:mouseout

planarEvent:mouseout ( e )
Broadcasts when interactionType is set to planar and a series' marker plane has received a mouseout event.
Parameters:
e <EventFacade>
Preventable: This event is preventable by method e.preventDefault(). The default function executed by this event is false.

planarEvent:mouseover

planarEvent:mouseover ( e )
Broadcasts when interactionType is set to planar and a series' marker plane has received a mouseover event.
Parameters:
e <EventFacade> Event facade with the following additional properties:
categoryItem
An array of hashes, each containing information about the category Axis of each marker whose plane has been intersected.
valueItem
An array of hashes, each containing information about the value Axis of each marker whose plane has been intersected.
x
The x-coordinate of the mouse in relation to the Chart.
y
The y-coordinate of the mouse in relation to the Chart.
items
An array including all the series which contain a marker whose plane has been intersected.
index
Index of the markers in their respective series.
Preventable: This event is preventable by method e.preventDefault(). The default function executed by this event is false.

rightAxesCollectionChange

rightAxesCollectionChange ( event )
Fires when the value for the configuration attribute 'rightAxesCollection' 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

seriesStylesChange

seriesStylesChange ( event )
Fires when the value for the configuration attribute 'seriesStyles' 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

showAreaFillChange

showAreaFillChange ( event )
Fires when the value for the configuration attribute 'showAreaFill' 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

showLinesChange

showLinesChange ( event )
Fires when the value for the configuration attribute 'showLines' 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

showMarkersChange

showMarkersChange ( event )
Fires when the value for the configuration attribute 'showMarkers' 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

stackedChange

stackedChange ( event )
Fires when the value for the configuration attribute 'stacked' 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

topAxesCollectionChange

topAxesCollectionChange ( event )
Fires when the value for the configuration attribute 'topAxesCollection' 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

typeChange

typeChange ( event )
Fires when the value for the configuration attribute 'type' 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

valueAxisNameChange

valueAxisNameChange ( event )
Fires when the value for the configuration attribute 'valueAxisName' 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

axes - Object

Axes to appear in the chart. This can be a key indexed hash of axis instances or object literals used to construct the appropriate axes.

axesStyles - private Object

Style object for the axes.

bottomAxesCollection - private Array

Reference to the bottom-aligned axes for the chart.

categoryAxis - Axis

Reference to the category axis used by the chart.

categoryAxisName - String

Indicates the key value used to identify a category axis in the axes hash. If not specified, the categoryKey attribute value will be used.

direction - String

Direction of chart's category axis when there is no series collection specified. Charts can be horizontal or vertical. When the chart type is column, the chart is horizontal. When the chart type is bar, the chart is vertical.

graphStyles - private Object

Styles for the graph.

horizontalGridlines - Gridlines

Reference to the horizontalGridlines for the chart.

leftAxesCollection - private Array

Reference to the left-aligned axes for the chart.

rightAxesCollection - private Array

Reference to the right-aligned axes for the chart.

seriesCollection - Array

Collection of series to appear on the chart. This can be an array of Series instances or object literals used to construct the appropriate series.

seriesStyles - private Object

Style object for the series

showAreaFill - Boolean

Indicates whether or not an area is filled in a combo chart.

showLines - Boolean

Indicates whether to display lines in a combo chart.

showMarkers - Boolean

Indicates whether to display markers in a combo chart.

stacked - Boolean

Indicates whether or not the chart is stacked.

styles - Object

Style properties for the chart. Contains a key indexed hash of the following:
series
A key indexed hash containing references to the styles attribute for each series in the chart. Specific style attributes vary depending on the series:
axes
A key indexed hash containing references to the styles attribute for each axes in the chart. Specific style attributes can be found in the Axis class.
graph
A reference to the styles attribute in the chart. Specific style attributes can be found in the Graph class.

topAxesCollection - private Array

Reference to the top-aligned axes for the chart.

type - String

Type of chart when there is no series collection specified.

valueAxisName - String

Indicates the key value used to identify a the series axis when an axis not generated.

verticalGridlines - Gridlines

Reference to the verticalGridlines for the chart.


Copyright © 2011 Yahoo! Inc. All rights reserved.