702 lines
36 KiB
HTML
702 lines
36 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<head>
|
|
<title>API: charts YAHOO.widget.PieChart (YUI Library)</title>
|
|
<link rel="stylesheet" type="text/css" href="assets/api.css">
|
|
<script type="text/javascript" src="assets/api-js"></script>
|
|
<script type="text/javascript" src="assets/ac-js"></script>
|
|
</head>
|
|
|
|
<body id="yahoo-com">
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
|
|
<div id="hd">
|
|
<a href="http://developer.yahoo.com/yui/"><h1>Yahoo! UI Library</h1></a>
|
|
<h3>Charts Widget <span class="subtitle">2.5.1</span></h3>
|
|
<p>
|
|
<a href="./index.html">Yahoo! UI Library</a>
|
|
> <a href="./module_charts.html">charts</a>
|
|
> YAHOO.widget.PieChart
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
<form name="yui-classopts-form">
|
|
<span id="classopts"><input type="checkbox" name="showprivate" id="showprivate" /> Show Private</span>
|
|
<span id="classopts"><input type="checkbox" name="showprotected" id="showprotected" /> Show Protected</span>
|
|
</form>
|
|
|
|
<h2>
|
|
|
|
|
|
|
|
|
|
Class <b>YAHOO.widget.PieChart</b>
|
|
<span class="extends">
|
|
</span>
|
|
|
|
<span class="extends">
|
|
- uses
|
|
|
|
<a href="YAHOO.widget.CartesianChart.html">YAHOO.widget.CartesianChart</a>
|
|
|
|
</span>
|
|
|
|
</code>
|
|
</h2>
|
|
<!-- class tree goes here -->
|
|
|
|
|
|
|
|
|
|
<div class="summary description">
|
|
PieChart class for the YUI Charts widget.
|
|
</div>
|
|
|
|
<div class="section constructor details">
|
|
<h3 id="constructor">Constructor</h3>
|
|
<div class="content">
|
|
<div class="detail">
|
|
<strong>YAHOO.widget.PieChart</strong>
|
|
<code>
|
|
(
|
|
|
|
|
|
|
|
containerId
|
|
|
|
,
|
|
dataSource
|
|
|
|
,
|
|
attributes
|
|
)
|
|
</code>
|
|
<div class="description">
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>containerId
|
|
<HTMLElement>
|
|
</code>
|
|
Container element for the Flash Player instance.
|
|
</dd>
|
|
<dd>
|
|
<code>dataSource
|
|
<YAHOO.util.DataSource>
|
|
</code>
|
|
DataSource instance.
|
|
</dd>
|
|
<dd>
|
|
<code>attributes
|
|
<object>
|
|
</code>
|
|
(optional) Object literal of configuration values.
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="section method details">
|
|
<h3 id="methods">Methods</h3>
|
|
<div class="content">
|
|
<div class="private">
|
|
<h4>
|
|
<a name="method__getCategoryField">_getCategoryField</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
private
|
|
|
|
|
|
void
|
|
<strong>_getCategoryField</strong>
|
|
(
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
Getter for the categoryField attribute.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
void
|
|
</code></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="private">
|
|
<h4>
|
|
<a name="method__getDataField">_getDataField</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
private
|
|
|
|
|
|
void
|
|
<strong>_getDataField</strong>
|
|
(
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
Getter for the dataField attribute.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
void
|
|
</code></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="private">
|
|
<h4>
|
|
<a name="method__initAttributes">_initAttributes</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
private
|
|
|
|
|
|
void
|
|
<strong>_initAttributes</strong>
|
|
(
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
Initializes the attributes.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
void
|
|
</code></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="private">
|
|
<h4>
|
|
<a name="method__setCategoryField">_setCategoryField</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
private
|
|
|
|
|
|
void
|
|
<strong>_setCategoryField</strong>
|
|
(
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
Setter for the categoryField attribute.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
void
|
|
</code></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="private">
|
|
<h4>
|
|
<a name="method__setDataField">_setDataField</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
private
|
|
|
|
|
|
void
|
|
<strong>_setDataField</strong>
|
|
(
|
|
)
|
|
</code>
|
|
|
|
<div class="description">
|
|
Setter for the dataField attribute.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code>
|
|
void
|
|
</code></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section field inheritance">
|
|
<h4>Methods inherited from <a href="YAHOO.widget.CartesianChart.html">YAHOO.widget.CartesianChart</a>:</h4>
|
|
<div class="content">
|
|
<code>
|
|
<a class="private" href="YAHOO.widget.CartesianChart.html#method__getXField">_getXField</a><span class="private">,</span> <a class="private" href="YAHOO.widget.CartesianChart.html#method__getYField">_getYField</a><span class="private">,</span> <a class="private" href="YAHOO.widget.CartesianChart.html#method__initAttributes">_initAttributes</a><span class="private">,</span> <a class="private" href="YAHOO.widget.CartesianChart.html#method__setXAxis">_setXAxis</a><span class="private">,</span> <a class="private" href="YAHOO.widget.CartesianChart.html#method__setXField">_setXField</a><span class="private">,</span> <a class="private" href="YAHOO.widget.CartesianChart.html#method__setYAxis">_setYAxis</a><span class="private">,</span> <a class="private" href="YAHOO.widget.CartesianChart.html#method__setYField">_setYField</a>
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section method details">
|
|
<h3 id="events">Events</h3>
|
|
<div class="content">
|
|
<div class="">
|
|
<h4>
|
|
<a name="event_beforeCategoryFieldChange">beforeCategoryFieldChange</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
|
|
|
|
|
|
<strong>beforeCategoryFieldChange</strong>
|
|
|
|
(
|
|
|
|
|
|
eventInfo
|
|
|
|
|
|
)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
Fires before the value for the configuration attribute 'categoryField' changes. Return false to cancel the attribute change.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>eventInfo <{oldValue: any, newValue: any}></code>
|
|
An object containing the current attribute value and the new value.
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="">
|
|
<h4>
|
|
<a name="event_beforeDataFieldChange">beforeDataFieldChange</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
|
|
|
|
|
|
<strong>beforeDataFieldChange</strong>
|
|
|
|
(
|
|
|
|
|
|
eventInfo
|
|
|
|
|
|
)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
Fires before the value for the configuration attribute 'dataField' changes. Return false to cancel the attribute change.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>eventInfo <{oldValue: any, newValue: any}></code>
|
|
An object containing the current attribute value and the new value.
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="">
|
|
<h4>
|
|
<a name="event_categoryFieldChange">categoryFieldChange</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
|
|
|
|
|
|
<strong>categoryFieldChange</strong>
|
|
|
|
(
|
|
|
|
|
|
eventInfo
|
|
|
|
|
|
)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
Fires when the value for the configuration attribute 'categoryField' changes.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>eventInfo <{oldValue: any, newValue: any}></code>
|
|
An object containing the previous attribute value and the new value.
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="">
|
|
<h4>
|
|
<a name="event_dataFieldChange">dataFieldChange</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
|
|
|
|
|
|
<strong>dataFieldChange</strong>
|
|
|
|
(
|
|
|
|
|
|
eventInfo
|
|
|
|
|
|
)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
Fires when the value for the configuration attribute 'dataField' changes.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>
|
|
<code>eventInfo <{oldValue: any, newValue: any}></code>
|
|
An object containing the previous attribute value and the new value.
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="section field inheritance">
|
|
<h4>Events inherited from <a href="YAHOO.widget.CartesianChart.html">YAHOO.widget.CartesianChart</a>:</h4>
|
|
<div class="content">
|
|
<code>
|
|
<a class="" href="YAHOO.widget.CartesianChart.html#event_beforeXAxisChange">beforeXAxisChange</a><span class="">,</span> <a class="" href="YAHOO.widget.CartesianChart.html#event_beforeXFieldChange">beforeXFieldChange</a><span class="">,</span> <a class="" href="YAHOO.widget.CartesianChart.html#event_beforeYAxisChange">beforeYAxisChange</a><span class="">,</span> <a class="" href="YAHOO.widget.CartesianChart.html#event_beforeYFieldChange">beforeYFieldChange</a> <a class="" href="YAHOO.widget.CartesianChart.html#event_xAxisChange">xAxisChange</a> <a class="" href="YAHOO.widget.CartesianChart.html#event_xFieldChange">xFieldChange</a> <a class="" href="YAHOO.widget.CartesianChart.html#event_yAxisChange">yAxisChange</a> <a class="" href="YAHOO.widget.CartesianChart.html#event_yFieldChange">yFieldChange</a>
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section field details">
|
|
<h3 id="configattributes">Configuration Attributes</h3>
|
|
<div class="content">
|
|
<div class="">
|
|
<h4><a name="config_categoryField">categoryField</a>
|
|
<code>- String</code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description">
|
|
The field in each item that corresponds to the category value.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<hr />
|
|
</div>
|
|
<div class="">
|
|
<h4><a name="config_dataField">dataField</a>
|
|
<code>- String</code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description">
|
|
The field in each item that corresponds to the data value.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<hr />
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section field inheritance">
|
|
<h4>Configuration attributes inherited from <a href="YAHOO.widget.CartesianChart.html">YAHOO.widget.CartesianChart</a>:</h4>
|
|
<div class="content">
|
|
<code>
|
|
<a class="" href="YAHOO.widget.CartesianChart.html#config_xAxis">xAxis</a><span class="">,</span> <a class="" href="YAHOO.widget.CartesianChart.html#config_xField">xField</a><span class="">,</span> <a class="" href="YAHOO.widget.CartesianChart.html#config_yAxis">yAxis</a><span class="">,</span> <a class="" href="YAHOO.widget.CartesianChart.html#config_yField">yField</a>
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
<div class="nav">
|
|
|
|
<div class="module">
|
|
<h4>Modules</h4>
|
|
<ul class="content">
|
|
|
|
<li class=""><a href="module_animation.html">animation</a></li>
|
|
|
|
<li class=""><a href="module_autocomplete.html">autocomplete</a></li>
|
|
|
|
<li class=""><a href="module_button.html">button</a></li>
|
|
|
|
<li class=""><a href="module_calendar.html">calendar</a></li>
|
|
|
|
<li class="selected"><a href="module_charts.html">charts</a></li>
|
|
|
|
<li class=""><a href="module_colorpicker.html">colorpicker</a></li>
|
|
|
|
<li class=""><a href="module_connection.html">connection</a></li>
|
|
|
|
<li class=""><a href="module_container.html">container</a></li>
|
|
|
|
<li class=""><a href="module_cookie.html">cookie</a></li>
|
|
|
|
<li class=""><a href="module_datasource.html">datasource</a></li>
|
|
|
|
<li class=""><a href="module_datatable.html">datatable</a></li>
|
|
|
|
<li class=""><a href="module_dom.html">dom</a></li>
|
|
|
|
<li class=""><a href="module_dragdrop.html">dragdrop</a></li>
|
|
|
|
<li class=""><a href="module_editor.html">editor</a></li>
|
|
|
|
<li class=""><a href="module_element.html">element</a></li>
|
|
|
|
<li class=""><a href="module_event.html">event</a></li>
|
|
|
|
<li class=""><a href="module_get.html">get</a></li>
|
|
|
|
<li class=""><a href="module_history.html">history</a></li>
|
|
|
|
<li class=""><a href="module_imagecropper.html">imagecropper</a></li>
|
|
|
|
<li class=""><a href="module_imageloader.html">imageloader</a></li>
|
|
|
|
<li class=""><a href="module_json.html">json</a></li>
|
|
|
|
<li class=""><a href="module_layout.html">layout</a></li>
|
|
|
|
<li class=""><a href="module_logger.html">logger</a></li>
|
|
|
|
<li class=""><a href="module_menu.html">menu</a></li>
|
|
|
|
<li class=""><a href="module_profiler.html">profiler</a></li>
|
|
|
|
<li class=""><a href="module_profilerviewer.html">profilerviewer</a></li>
|
|
|
|
<li class=""><a href="module_resize.html">resize</a></li>
|
|
|
|
<li class=""><a href="module_selector.html">selector</a></li>
|
|
|
|
<li class=""><a href="module_slider.html">slider</a></li>
|
|
|
|
<li class=""><a href="module_tabview.html">tabview</a></li>
|
|
|
|
<li class=""><a href="module_treeview.html">treeview</a></li>
|
|
|
|
<li class=""><a href="module_uploader.html">uploader</a></li>
|
|
|
|
<li class=""><a href="module_yahoo.html">yahoo</a></li>
|
|
|
|
<li class=""><a href="module_yuiloader.html">yuiloader</a></li>
|
|
|
|
<li class=""><a href="module_yuitest.html">yuitest</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="module">
|
|
<h4>Classes</h4>
|
|
<ul class="content">
|
|
<li class=""><a href="YAHOO.widget.Axis.html">YAHOO.widget.Axis</a></li>
|
|
<li class=""><a href="YAHOO.widget.BarChart.html">YAHOO.widget.BarChart</a></li>
|
|
<li class=""><a href="YAHOO.widget.BarSeries.html">YAHOO.widget.BarSeries</a></li>
|
|
<li class=""><a href="YAHOO.widget.CartesianChart.html">YAHOO.widget.CartesianChart</a></li>
|
|
<li class=""><a href="YAHOO.widget.CartesianSeries.html">YAHOO.widget.CartesianSeries</a></li>
|
|
<li class=""><a href="YAHOO.widget.CategoryAxis.html">YAHOO.widget.CategoryAxis</a></li>
|
|
<li class=""><a href="YAHOO.widget.Chart.html">YAHOO.widget.Chart</a></li>
|
|
<li class=""><a href="YAHOO.widget.ColumnChart.html">YAHOO.widget.ColumnChart</a></li>
|
|
<li class=""><a href="YAHOO.widget.ColumnSeries.html">YAHOO.widget.ColumnSeries</a></li>
|
|
<li class=""><a href="YAHOO.widget.FlashAdapter.html">YAHOO.widget.FlashAdapter</a></li>
|
|
<li class=""><a href="YAHOO.widget.LineChart.html">YAHOO.widget.LineChart</a></li>
|
|
<li class=""><a href="YAHOO.widget.LineSeries.html">YAHOO.widget.LineSeries</a></li>
|
|
<li class=""><a href="YAHOO.widget.NumericAxis.html">YAHOO.widget.NumericAxis</a></li>
|
|
<li class="selected"><a href="YAHOO.widget.PieChart.html">YAHOO.widget.PieChart</a></li>
|
|
<li class=""><a href="YAHOO.widget.PieSeries.html">YAHOO.widget.PieSeries</a></li>
|
|
<li class=""><a href="YAHOO.widget.Series.html">YAHOO.widget.Series</a></li>
|
|
<li class=""><a href="YAHOO.widget.TimeAxis.html">YAHOO.widget.TimeAxis</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="module">
|
|
<h4>Files</h4>
|
|
<ul class="content">
|
|
<li class=""><a href="Axis.js.html">Axis.js</a></li>
|
|
<li class=""><a href="CartesianChart.js.html">CartesianChart.js</a></li>
|
|
<li class=""><a href="CategoryAxis.js.html">CategoryAxis.js</a></li>
|
|
<li class=""><a href="Chart.js.html">Chart.js</a></li>
|
|
<li class=""><a href="ChartTypes.js.html">ChartTypes.js</a></li>
|
|
<li class=""><a href="FlashAdapter.js.html">FlashAdapter.js</a></li>
|
|
<li class=""><a href="NumericAxis.js.html">NumericAxis.js</a></li>
|
|
<li class=""><a href="PieChart.js.html">PieChart.js</a></li>
|
|
<li class=""><a href="Series.js.html">Series.js</a></li>
|
|
<li class=""><a href="swfobject.js.html">swfobject.js</a></li>
|
|
<li class=""><a href="TimeAxis.js.html">TimeAxis.js</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
<div class="module">
|
|
<h4>Methods</h4>
|
|
<ul class="content">
|
|
<li class="private"><!--<code>void</code>-->
|
|
<a href="#method__getCategoryField">_getCategoryField</a>
|
|
</li>
|
|
<li class="private"><!--<code>void</code>-->
|
|
<a href="#method__getDataField">_getDataField</a>
|
|
</li>
|
|
<li class="private"><!--<code>void</code>-->
|
|
<a href="#method__initAttributes">_initAttributes</a>
|
|
</li>
|
|
<li class="private"><!--<code>void</code>-->
|
|
<a href="#method__setCategoryField">_setCategoryField</a>
|
|
</li>
|
|
<li class="private"><!--<code>void</code>-->
|
|
<a href="#method__setDataField">_setDataField</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="module">
|
|
<h4>Events</h4>
|
|
<ul class="content">
|
|
<li class="">
|
|
<a href="#event_beforeCategoryFieldChange">beforeCategoryFieldChange</a>
|
|
</li>
|
|
<li class="">
|
|
<a href="#event_beforeDataFieldChange">beforeDataFieldChange</a>
|
|
</li>
|
|
<li class="">
|
|
<a href="#event_categoryFieldChange">categoryFieldChange</a>
|
|
</li>
|
|
<li class="">
|
|
<a href="#event_dataFieldChange">dataFieldChange</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="module">
|
|
<h4>Configuration Attributes</h4>
|
|
<ul class="content">
|
|
<li class="">
|
|
<a href="#config_categoryField">categoryField</a>
|
|
</li>
|
|
<li class="">
|
|
<a href="#config_dataField">dataField</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="ft">
|
|
<hr />
|
|
Copyright © 2007 Yahoo! Inc. All rights reserved.
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|