# Yahoo! UI Library

### Charts Widget 2.7.0

Yahoo! UI Library > charts > YAHOO.widget.CartesianChart
Search:
Filters Show Private Show Protected Show Deprecated

## Class YAHOO.widget.CartesianChart - uses YAHOO.widget.Chart

CartesianChart class for the YUI Charts widget.

### Constructor

YAHOO.widget.CartesianChart `( type , containerId , dataSource , attributes )`

Parameters:
  `type <String>` The char type. May be "line", "column", or "bar"
  `containerId <HTMLElement>` Container element for the Flash Player instance.
  `dataSource <YAHOO.util.DataSource>` DataSource instance.
  `attributes <object>` (optional) Object literal of configuration values.

### Properties

#### _xAxisLabelFunction - `private String`

Stores a reference to the xAxis labelFunction created by YAHOO.widget.FlashAdapter.createProxyFunction()

#### _yAxisLabelFunction - `private String`

Stores a reference to the yAxis labelFunction created by YAHOO.widget.FlashAdapter.createProxyFunction()

#### Properties inherited from YAHOO.widget.Chart:

`_dataSource, _dataTipFunction, _pollingID, _pollingInterval, _request, _seriesDefs, _seriesLabelFunctions, _type`

#### Properties inherited from YAHOO.util.AttributeProvider:

`_configs`

#### Properties inherited from YAHOO.widget.FlashAdapter:

`_attributes, _containerID, _id, _initialized, _swf, _swfURL`

### Methods

#### _getXField

`private void _getXField ( )`
Getter for the xField attribute.

Returns: `void`

#### _getYField

`private void _getYField ( )`
Getter for the yField attribute.

Returns: `void`

#### _initAttributes

`private void _initAttributes ( )`
Initializes the attributes.

Returns: `void`

#### _setXAxis

`private void _setXAxis ( )`
Setter for the xAxis attribute.

Returns: `void`

#### _setXField

`private void _setXField ( )`
Setter for the xField attribute.

Returns: `void`

#### _setYAxis

`private void _setYAxis ( )`
Getter for the yAxis attribute.

Returns: `void`

#### _setYField

`private void _setYField ( )`
Setter for the yField attribute.

Returns: `void`

#### Methods inherited from YAHOO.widget.Chart:

`_getCategoryNames, _getDataSource, _getPolling, _getRequest, _getSeriesDefs, _initAttributes, _loadDataHandler, _loadHandler, _setCategoryNames, _setDataSource, _setDataTipFunction, _setPolling, _setRequest, _setSeriesDefs, refreshData, setSeriesStyles, setStyle, setStyles, toString`

#### Methods inherited from YAHOO.util.AttributeProvider:

`configureAttribute, fireBeforeChangeEvent, fireChangeEvent, get, getAttributeConfig, getAttributeKeys, refresh, register, resetAttributeConfig, resetValue, set, setAttributeConfig, setAttributes`

#### Methods inherited from YAHOO.widget.FlashAdapter:

`_embedSWF, _eventHandler, _getAltText, _getSWFURL, _initAttributes, _loadHandler, _setAltText, destroy, toString`

### Events

#### beforeXAxisChange

`beforeXAxisChange ( event )`
Fires before the value for the configuration attribute 'xAxis' changes. Return false to cancel the attribute change.

Parameters:
  `event <{oldValue: any, newValue: any}>` An object containing the previous attribute value and the new value.

#### beforeXFieldChange

`beforeXFieldChange ( event )`
Fires before the value for the configuration attribute 'xField' changes. Return false to cancel the attribute change.

Parameters:
  `event <{oldValue: any, newValue: any}>` An object containing the previous attribute value and the new value.

#### beforeYAxisChange

`beforeYAxisChange ( event )`
Fires before the value for the configuration attribute 'yAxis' changes. Return false to cancel the attribute change.

Parameters:
  `event <{oldValue: any, newValue: any}>` An object containing the previous attribute value and the new value.

#### beforeYFieldChange

`beforeYFieldChange ( event )`
Fires before the value for the configuration attribute 'yField' changes. Return false to cancel the attribute change.

Parameters:
  `event <{oldValue: any, newValue: any}>` An object containing the previous attribute value and the new value.

#### xAxisChange

`xAxisChange ( event )`
Fires when the value for the configuration attribute 'xAxis' changes.

Parameters:
  `event <{oldValue: any, newValue: any}>` An object containing the previous attribute value and the new value.

#### xFieldChange

`xFieldChange ( event )`
Fires when the value for the configuration attribute 'xField' changes.

Parameters:
  `event <{oldValue: any, newValue: any}>` An object containing the previous attribute value and the new value.

#### yAxisChange

`yAxisChange ( event )`
Fires when the value for the configuration attribute 'yAxis' changes.

Parameters:
  `event <{oldValue: any, newValue: any}>` An object containing the previous attribute value and the new value.

#### yFieldChange

`yFieldChange ( event )`
Fires when the value for the configuration attribute 'yField' changes.

Parameters:
  `event <{oldValue: any, newValue: any}>` An object containing the previous attribute value and the new value.

#### Events inherited from YAHOO.widget.Chart:

`beforeCategoryNamesChange, beforeDataSourceChange, beforeDataTipFunctionChange, beforePollingChange, beforeRequestChange, beforeSeriesChange, categoryNamesChange, dataSourceChange, dataTipFunctionChange, itemClickEvent itemDoubleClickEvent itemDragEndEvent itemDragEvent itemDragStartEvent itemMouseOutEvent itemMouseOverEvent pollingChange requestChange seriesChange`

#### Events inherited from YAHOO.widget.FlashAdapter:

`altTextChange, backgroundColorChange, beforeAltTextChange, beforeBackgroundColorChange, beforeExpressInstallChange beforeSwfURLChange beforeVersionChange beforeWmodeChange contentReady expressInstallChange swfURLChange versionChange wmodeChange`

### Configuration Attributes

#### xAxis `- Axis`

A custom configuration for the horizontal x axis.

#### xField `- String`

The field in each item that corresponds to a value on the x axis.

#### yAxis `- Axis`

A custom configuration for the vertical y axis.

#### yField `- String`

The field in each item that corresponds to a value on the x axis.

#### Configuration attributes inherited from YAHOO.widget.Chart:

`categoryNames, dataSource, dataTipFunction, polling, request, series,`

#### Configuration attributes inherited from YAHOO.widget.FlashAdapter:

`altText, backgroundColor, expressInstall, swfURL, version wmode`

Copyright © 2009 Yahoo! Inc. All rights reserved.