API: charts YAHOO.widget.PieChart (YUI Library)

# Yahoo! UI Library

### Charts Widget 2.9.0

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

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

PieChart class for the YUI Charts widget.

### Constructor

YAHOO.widget.PieChart `( containerId , dataSource , attributes )`

Parameters:
  `containerId <HTMLElement>` Container element for the Flash Player instance.
  `dataSource <YAHOO.util.DataSource>` DataSource instance.
  `attributes <object>` (optional) Object literal of configuration values.

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

`_attributes, _containerID, _dataSource, _dataTipFunction, _id, _initialized, _legendLabelFunction, _pollingID, _pollingInterval, _request, _seriesDefs, _seriesFunctions, _swf, _swfEmbed, _swfURL, _type`

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

`_configs`

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

`__yui_events, __yui_subscribers`

### Methods

#### _getCategoryField

`private void _getCategoryField ( )`
Getter for the categoryField attribute.

#### _getDataField

`private void _getDataField ( )`
Getter for the dataField attribute.

#### _initAttributes

`private void _initAttributes ( )`
Initializes the attributes.

#### _setCategoryField

`private void _setCategoryField ( )`
Setter for the categoryField attribute.

#### _setDataField

`private void _setDataField ( )`
Setter for the dataField attribute.

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

`_eventHandler, _getAltText, _getCategoryNames, _getDataSource, _getLegendLabelFunction, _getPolling, _getRequest, _getSeriesDefs, _getSWFURL, _initAttributes, _loadDataHandler, _loadHandler, _setAltText, _setCategoryNames, _setDataSource, _setDataTipFunction, _setLegendLabelFunction, _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.util.EventProvider:

`createEvent, fireEvent, hasEvent, subscribe, unsubscribe, unsubscribeAll`

### Events

#### beforeCategoryFieldChange

`beforeCategoryFieldChange ( event )`
Fires before the value for the configuration attribute 'categoryField' 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.

#### beforeDataFieldChange

`beforeDataFieldChange ( event )`
Fires before the value for the configuration attribute 'dataField' 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.

#### categoryFieldChange

`categoryFieldChange ( event )`
Fires when the value for the configuration attribute 'categoryField' changes.

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

#### dataFieldChange

`dataFieldChange ( event )`
Fires when the value for the configuration attribute 'dataField' changes.

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

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

`altTextChange, backgroundColorChange, beforeAltTextChange, beforeBackgroundColorChange, beforeCategoryNamesChange, beforeDataSourceChange, beforeDataTipFunctionChange, beforeExpressInstallChange, beforeLegendLabelFunctionChange, beforePollingChange, beforeRequestChange, beforeSeriesChange, beforeSwfURLChange beforeVersionChange beforeWmodeChange categoryNamesChange contentReady dataSourceChange dataTipFunctionChange expressInstallChange itemClickEvent itemDoubleClickEvent itemDragEndEvent itemDragEvent itemDragStartEvent itemMouseOutEvent itemMouseOverEvent legendLabelFunctionChange pollingChange requestChange seriesChange swfURLChange versionChange wmodeChange`

### Configuration Attributes

#### categoryField `- String`

The field in each item that corresponds to the category value.

#### dataField `- String`

The field in each item that corresponds to the data value.

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

`altText, backgroundColor, categoryNames, dataSource, dataTipFunction, expressInstall, legendLabelFunction polling request series swfURL version wmode`

Copyright © 2011 Yahoo! Inc. All rights reserved.