2 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
3 Code licensed under the BSD License:
4 http://developer.yahoo.net/yui/license.txt
7 /*extern ActiveXObject, __flash_unloadHandler, __flash_savedUnloadHandler */
9 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
11 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
12 * http://www.opensource.org/licenses/mit-license.php
16 YAHOO.namespace("deconcept");
18 YAHOO.deconcept = YAHOO.deconcept || {};
20 if(typeof YAHOO.deconcept.util == "undefined" || !YAHOO.deconcept.util)
22 YAHOO.deconcept.util = {};
25 if(typeof YAHOO.deconcept.SWFObjectUtil == "undefined" || !YAHOO.deconcept.SWFObjectUtil)
27 YAHOO.deconcept.SWFObjectUtil = {};
30 YAHOO.deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey)
32 if(!document.getElementById) { return; }
33 this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
34 this.skipDetect = YAHOO.deconcept.util.getRequestParameter(this.DETECT_KEY);
38 if(swf) { this.setAttribute('swf', swf); }
39 if(id) { this.setAttribute('id', id); }
40 if(w) { this.setAttribute('width', w); }
41 if(h) { this.setAttribute('height', h); }
42 if(ver) { this.setAttribute('version', new YAHOO.deconcept.PlayerVersion(ver.toString().split("."))); }
43 this.installedVer = YAHOO.deconcept.SWFObjectUtil.getPlayerVersion();
44 if (!window.opera && document.all && this.installedVer.major > 7)
46 // only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
47 YAHOO.deconcept.SWFObject.doPrepUnload = true;
51 this.addParam('bgcolor', c);
53 var q = quality ? quality : 'high';
54 this.addParam('quality', q);
55 this.setAttribute('useExpressInstall', false);
56 this.setAttribute('doExpressInstall', false);
57 var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
58 this.setAttribute('xiRedirectUrl', xir);
59 this.setAttribute('redirectUrl', '');
62 this.setAttribute('redirectUrl', redirectUrl);
66 YAHOO.deconcept.SWFObject.prototype =
68 useExpressInstall: function(path)
70 this.xiSWFPath = !path ? "expressinstall.swf" : path;
71 this.setAttribute('useExpressInstall', true);
73 setAttribute: function(name, value){
74 this.attributes[name] = value;
76 getAttribute: function(name){
77 return this.attributes[name];
79 addParam: function(name, value){
80 this.params[name] = value;
82 getParams: function(){
85 addVariable: function(name, value){
86 this.variables[name] = value;
88 getVariable: function(name){
89 return this.variables[name];
91 getVariables: function(){
92 return this.variables;
94 getVariablePairs: function(){
95 var variablePairs = [];
97 var variables = this.getVariables();
100 if(variables.hasOwnProperty(key))
102 variablePairs[variablePairs.length] = key +"="+ variables[key];
105 return variablePairs;
107 getSWFHTML: function() {
112 if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
113 if (this.getAttribute("doExpressInstall")) {
114 this.addVariable("MMplayerType", "PlugIn");
115 this.setAttribute('swf', this.xiSWFPath);
117 swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'"';
118 swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
119 params = this.getParams();
122 if(params.hasOwnProperty(key))
124 swfNode += [key] +'="'+ params[key] +'" ';
127 pairs = this.getVariablePairs().join("&");
128 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
131 if (this.getAttribute("doExpressInstall")) {
132 this.addVariable("MMplayerType", "ActiveX");
133 this.setAttribute('swf', this.xiSWFPath);
135 swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'">';
136 swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
137 params = this.getParams();
140 if(params.hasOwnProperty(key))
142 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
145 pairs = this.getVariablePairs().join("&");
146 if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
147 swfNode += "</object>";
151 write: function(elementId)
153 if(this.getAttribute('useExpressInstall')) {
154 // check to see if we need to do an express install
155 var expressInstallReqVer = new YAHOO.deconcept.PlayerVersion([6,0,65]);
156 if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
157 this.setAttribute('doExpressInstall', true);
158 this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
159 document.title = document.title.slice(0, 47) + " - Flash Player Installation";
160 this.addVariable("MMdoctitle", document.title);
163 if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version')))
165 var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
166 n.innerHTML = this.getSWFHTML();
171 if(this.getAttribute('redirectUrl') !== "")
173 document.location.replace(this.getAttribute('redirectUrl'));
180 /* ---- detection functions ---- */
181 YAHOO.deconcept.SWFObjectUtil.getPlayerVersion = function()
184 var PlayerVersion = new YAHOO.deconcept.PlayerVersion([0,0,0]);
185 if(navigator.plugins && navigator.mimeTypes.length)
187 var x = navigator.plugins["Shockwave Flash"];
188 if(x && x.description)
190 PlayerVersion = new YAHOO.deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
193 else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0)
201 axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter);
202 // document.write("player v: "+ counter);
203 PlayerVersion = new YAHOO.deconcept.PlayerVersion([counter,0,0]);
212 { // Win IE (non mobile)
213 // do minor version lookup in IE, but avoid fp6 crashing issues
214 // see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
217 axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
223 axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
224 PlayerVersion = new YAHOO.deconcept.PlayerVersion([6,0,21]);
225 axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
229 if(PlayerVersion.major == 6)
231 return PlayerVersion;
236 axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
243 PlayerVersion = new YAHOO.deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
246 return PlayerVersion;
249 YAHOO.deconcept.PlayerVersion = function(arrVersion)
251 this.major = arrVersion[0] !== null ? parseInt(arrVersion[0], 0) : 0;
252 this.minor = arrVersion[1] !== null ? parseInt(arrVersion[1], 0) : 0;
253 this.rev = arrVersion[2] !== null ? parseInt(arrVersion[2], 0) : 0;
256 YAHOO.deconcept.PlayerVersion.prototype.versionIsValid = function(fv)
258 if(this.major < fv.major)
262 if(this.major > fv.major)
266 if(this.minor < fv.minor)
270 if(this.minor > fv.minor)
274 if(this.rev < fv.rev)
281 /* ---- get value of query string param ---- */
282 YAHOO.deconcept.util =
284 getRequestParameter: function(param)
286 var q = document.location.search || document.location.hash;
287 if(param === null) { return q; }
290 var pairs = q.substring(1).split("&");
291 for(var i=0; i < pairs.length; i++)
293 if (pairs[i].substring(0, pairs[i].indexOf("=")) == param)
295 return pairs[i].substring((pairs[i].indexOf("=") + 1));
303 /* fix for video streaming bug */
304 YAHOO.deconcept.SWFObjectUtil.cleanupSWFs = function()
306 var objects = document.getElementsByTagName("OBJECT");
307 for(var i = objects.length - 1; i >= 0; i--)
309 objects[i].style.display = 'none';
310 for(var x in objects[i])
312 if(typeof objects[i][x] == 'function')
314 objects[i][x] = function(){};
320 // fixes bug in some fp9 versions see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
321 if(YAHOO.deconcept.SWFObject.doPrepUnload)
323 if(!YAHOO.deconcept.unloadSet)
325 YAHOO.deconcept.SWFObjectUtil.prepUnload = function()
327 __flash_unloadHandler = function(){};
328 __flash_savedUnloadHandler = function(){};
329 window.attachEvent("onunload", YAHOO.deconcept.SWFObjectUtil.cleanupSWFs);
331 window.attachEvent("onbeforeunload", YAHOO.deconcept.SWFObjectUtil.prepUnload);
332 YAHOO.deconcept.unloadSet = true;
336 /* add document.getElementById if needed (mobile IE < 5) */
337 if(!document.getElementById && document.all)
339 document.getElementById = function(id) { return document.all[id]; };
344 * Wraps Flash embedding functionality and allows communication with SWF through
347 * @namespace YAHOO.widget
348 * @class FlashAdapter
349 * @uses YAHOO.util.AttributeProvider
351 YAHOO.widget.FlashAdapter = function(swfURL, containerID, attributes)
353 // set up the initial events and attributes stuff
354 this._queue = this._queue || [];
355 this._events = this._events || {};
356 this._configs = this._configs || {};
357 attributes = attributes || {};
359 //the Flash Player external interface code from Adobe doesn't play nicely
360 //with the default value, yui-gen, in IE
361 this._id = attributes.id = attributes.id || YAHOO.util.Dom.generateId(null, "yuigen");
362 attributes.version = attributes.version || "9.0.45";
363 attributes.backgroundColor = attributes.backgroundColor || "#ffffff";
365 //we can't use the initial attributes right away
366 //so save them for once the SWF finishes loading
367 this._attributes = attributes;
369 this._swfURL = swfURL;
370 this._containerID = containerID;
372 //embed the SWF file in the page
373 this._embedSWF(this._swfURL, this._containerID, attributes.id, attributes.version,
374 attributes.backgroundColor, attributes.expressInstall, attributes.wmode);
377 * Fires when the SWF is initialized and communication is possible.
378 * @event contentReady
380 //Fix for iframe cross-domain issue with FF2x
383 this.createEvent("contentReady");
388 YAHOO.extend(YAHOO.widget.FlashAdapter, YAHOO.util.AttributeProvider,
391 * The URL of the SWF file.
399 * The ID of the containing DIV.
400 * @property _containerID
407 * A reference to the embedded SWF file.
414 * The id of this instance.
422 * Indicates whether the SWF has been initialized and is ready
423 * to communicate with JavaScript
424 * @property _initialized
431 * The initializing attributes are stored here until the SWF is ready.
432 * @property _attributes
436 _attributes: null, //the intializing attributes
439 * Public accessor to the unique name of the FlashAdapter instance.
442 * @return {String} Unique name of the FlashAdapter instance.
446 return "FlashAdapter " + this._id;
450 * Nulls out the entire FlashAdapter instance and related objects and removes attached
451 * event listeners and clears out DOM elements inside the container. After calling
452 * this method, the instance reference should be expliclitly nulled by implementer,
453 * as in myChart = null. Use with caution!
459 //kill the Flash Player instance
462 var container = YAHOO.util.Dom.get(this._containerID);
463 container.removeChild(this._swf);
466 var instanceName = this._id;
468 //null out properties
469 for(var prop in this)
471 if(YAHOO.lang.hasOwnProperty(this, prop))
480 * Embeds the SWF in the page and associates it with this instance.
485 _embedSWF: function(swfURL, containerID, swfID, version, backgroundColor, expressInstall, wmode)
487 //standard SWFObject embed
488 var swfObj = new YAHOO.deconcept.SWFObject(swfURL, swfID, "100%", "100%", version, backgroundColor);
492 swfObj.useExpressInstall(expressInstall);
495 //make sure we can communicate with ExternalInterface
496 swfObj.addParam("allowScriptAccess", "always");
500 swfObj.addParam("wmode", wmode);
503 //again, a useful ExternalInterface trick
504 swfObj.addVariable("allowedDomain", document.location.hostname);
506 //tell the SWF which HTML element it is in
507 swfObj.addVariable("elementID", swfID);
509 // set the name of the function to call when the swf has an event
510 swfObj.addVariable("eventHandler", "YAHOO.widget.FlashAdapter.eventHandler");
512 var container = YAHOO.util.Dom.get(containerID);
513 var result = swfObj.write(container);
516 this._swf = YAHOO.util.Dom.get(swfID);
517 //if successful, let's add an owner property to the SWF reference
518 //this will allow the event handler to communicate with a YAHOO.widget.FlashAdapter
519 this._swf.owner = this;
527 * Handles or re-dispatches events received from the SWF.
529 * @method _eventHandler
532 _eventHandler: function(event)
534 var type = event.type;
539 this.fireEvent("contentReady");
545 //be sure to return after your case or the event will automatically fire!
546 this.fireEvent(type, event);
550 * Called when the SWF has been initialized.
552 * @method _loadHandler
555 _loadHandler: function()
557 this._initialized = false;
558 this._initAttributes(this._attributes);
559 this.setAttributes(this._attributes, true);
561 this._initialized = true;
564 set: function(name, value)
566 //save all the attributes in case the swf reloads
567 //so that we can pass them in again
568 this._attributes[name] = value;
569 YAHOO.widget.FlashAdapter.superclass.set.call(this, name, value);
573 * Initializes the attributes.
575 * @method _initAttributes
578 _initAttributes: function(attributes)
580 //should be overridden if other attributes need to be set up
584 * @description Sets the window mode of the Flash Player control. May be
585 * "window", "opaque", or "transparent". Only available in the constructor
586 * because it may not be set after Flash Player has been embedded in the page.
591 * @attribute expressInstall
592 * @description URL pointing to a SWF file that handles Flash Player's express
593 * install feature. Only available in the constructor because it may not be
594 * set after Flash Player has been embedded in the page.
600 * @description Minimum required version for the SWF file. Only available in the constructor because it may not be
601 * set after Flash Player has been embedded in the page.
606 * @attribute backgroundColor
607 * @description The background color of the SWF. Only available in the constructor because it may not be
608 * set after Flash Player has been embedded in the page.
614 * @description The alternative text to provide for screen readers and other assistive technology.
617 this.getAttributeConfig("altText",
619 method: this._getAltText
621 this.setAttributeConfig("altText",
623 method: this._setAltText
628 * @description Absolute or relative URL to the SWF displayed by the FlashAdapter. Only available in the constructor because it may not be
629 * set after Flash Player has been embedded in the page.
632 this.getAttributeConfig("swfURL",
634 method: this._getSWFURL
639 * Getter for swfURL attribute.
644 _getSWFURL: function()
650 * Getter for altText attribute.
652 * @method _getAltText
655 _getAltText: function()
657 return this._swf.getAltText();
661 * Setter for altText attribute.
663 * @method _setAltText
666 _setAltText: function(value)
668 return this._swf.setAltText(value);
673 * Receives event messages from SWF and passes them to the correct instance
676 * @method YAHOO.widget.FlashAdapter.eventHandler
680 YAHOO.widget.FlashAdapter.eventHandler = function(elementID, event)
682 var loadedSWF = YAHOO.util.Dom.get(elementID);
685 //fix for ie: if owner doesn't exist yet, try again in a moment
686 setTimeout(function() { YAHOO.widget.FlashAdapter.eventHandler( elementID, event ); }, 0);
690 loadedSWF.owner._eventHandler(event);
695 * The number of proxy functions that have been created.
699 YAHOO.widget.FlashAdapter.proxyFunctionCount = 0;
702 * Creates a globally accessible function that wraps a function reference.
703 * Returns the proxy function's name as a string for use by the SWF through
706 * @method YAHOO.widget.FlashAdapter.createProxyFunction
710 YAHOO.widget.FlashAdapter.createProxyFunction = function(func)
712 var index = YAHOO.widget.FlashAdapter.proxyFunctionCount;
713 YAHOO.widget.FlashAdapter["proxyFunction" + index] = function()
715 return func.apply(null, arguments);
717 YAHOO.widget.FlashAdapter.proxyFunctionCount++;
718 return "YAHOO.widget.FlashAdapter.proxyFunction" + index.toString();
722 * Removes a function created with createProxyFunction()
724 * @method YAHOO.widget.FlashAdapter.removeProxyFunction
728 YAHOO.widget.FlashAdapter.removeProxyFunction = function(funcName)
731 if(!funcName || funcName.indexOf("YAHOO.widget.FlashAdapter.proxyFunction") < 0)
736 funcName = funcName.substr(26);
737 YAHOO.widget.FlashAdapter[funcName] = null;
741 * The Charts widget provides a Flash control for displaying data
742 * graphically by series across A-grade browsers with Flash Player installed.
745 * @requires yahoo, dom, event, datasource
746 * @title Charts Widget
750 /****************************************************************************/
751 /****************************************************************************/
752 /****************************************************************************/
755 * Chart class for the YUI Charts widget.
757 * @namespace YAHOO.widget
759 * @uses YAHOO.widget.FlashAdapter
761 * @param type {String} The char type. May be "line", "column", "bar", or "pie"
762 * @param containerId {HTMLElement} Container element for the Flash Player instance.
763 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
764 * @param attributes {object} (optional) Object literal of configuration values.
766 YAHOO.widget.Chart = function(type, containerId, dataSource, attributes)
768 YAHOO.widget.Chart.superclass.constructor.call(this, YAHOO.widget.Chart.SWFURL, containerId, attributes);
771 this._dataSource = dataSource;
774 * Fires when the user moves the mouse over the bounds of an item renderer in the chart.
776 * @event itemMouseOverEvent
777 * @param event.type {String} The event type
778 * @param event.item {Object} The data displayed by the renderer
779 * @param event.index {Number} The position within the series that the item appears.
780 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
781 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
782 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
784 this.createEvent("itemMouseOverEvent");
787 * Fires when the user moves the mouse out of the bounds of an item renderer in the chart.
789 * @event itemMouseOutEvent
790 * @param event.type {String} The event type
791 * @param event.item {Object} The data displayed by the renderer
792 * @param event.index {Number} The position within the series that the item appears.
793 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
794 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
795 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
797 this.createEvent("itemMouseOutEvent");
800 * Fires when the user clicks an item renderer in the chart with the mouse.
802 * @event itemClickEvent
803 * @param event.type {String} The event type
804 * @param event.item {Object} The data displayed by the renderer
805 * @param event.index {Number} The position within the series that the item appears.
806 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
807 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
808 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
810 this.createEvent("itemClickEvent");
813 * Fires when the user double-clicks an item renderer in the chart with the mouse.
815 * @event itemDoubleClickEvent
816 * @param event.type {String} The event type
817 * @param event.item {Object} The data displayed by the renderer
818 * @param event.index {Number} The position within the series that the item appears.
819 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
820 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
821 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
823 this.createEvent("itemDoubleClickEvent");
826 * Fires when the user presses the mouse down on an item to initiate a drag action.
828 * @event itemDragStartEvent
829 * @param event.type {String} The event type
830 * @param event.item {Object} The data displayed by the renderer
831 * @param event.index {Number} The position within the series that the item appears.
832 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
833 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
834 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
836 this.createEvent("itemDragStartEvent");
839 * Fires when the user moves the mouse during a drag action.
841 * @event itemDragEvent
842 * @param event.type {String} The event type
843 * @param event.item {Object} The data displayed by the renderer
844 * @param event.index {Number} The position within the series that the item appears.
845 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
846 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
847 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
849 this.createEvent("itemDragEvent");
852 * Fires when the user releases the mouse during a drag action.
854 * @event itemDragEndEvent
855 * @param event.type {String} The event type
856 * @param event.item {Object} The data displayed by the renderer
857 * @param event.index {Number} The position within the series that the item appears.
858 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
859 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
860 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
862 this.createEvent("itemDragEndEvent");
865 YAHOO.extend(YAHOO.widget.Chart, YAHOO.widget.FlashAdapter,
868 * The type of this chart instance.
876 * The id returned from the DataSource's setInterval function.
877 * @property _pollingID
884 * The time, in ms, between requests for data.
885 * @property _pollingInterval
889 _pollingInterval: null,
892 * Stores a reference to the dataTipFunction created by
893 * YAHOO.widget.FlashAdapter.createProxyFunction()
894 * @property _dataTipFunction
898 _dataTipFunction: null,
901 * Stores references to series labelFunction values created by
902 * YAHOO.widget.FlashAdapter.createProxyFunction()
903 * @property _seriesLabelFunctions
907 _seriesLabelFunctions: null,
910 * Public accessor to the unique name of the Chart instance.
913 * @return {String} Unique name of the Chart instance.
917 return "Chart " + this._id;
921 * Sets a single style value on the Chart instance.
924 * @param name {String} Name of the Chart style value to change.
925 * @param value {Object} New value to pass to the Chart style.
927 setStyle: function(name, value)
929 //we must jsonify this because Flash Player versions below 9.0.60 don't handle
930 //complex ExternalInterface parsing correctly
931 value = YAHOO.lang.JSON.stringify(value);
932 this._swf.setStyle(name, value);
936 * Resets all styles on the Chart instance.
939 * @param styles {Object} Initializer for all Chart styles.
941 setStyles: function(styles)
943 //we must jsonify this because Flash Player versions below 9.0.60 don't handle
944 //complex ExternalInterface parsing correctly
945 styles = YAHOO.lang.JSON.stringify(styles);
946 this._swf.setStyles(styles);
950 * Sets the styles on all series in the Chart.
952 * @method setSeriesStyles
953 * @param styles {Array} Initializer for all Chart series styles.
955 setSeriesStyles: function(styles)
957 //we must jsonify this because Flash Player versions below 9.0.60 don't handle
958 //complex ExternalInterface parsing correctly
959 for(var i = 0; i < styles.length; i++)
961 styles[i] = YAHOO.lang.JSON.stringify(styles[i]);
963 this._swf.setSeriesStyles(styles);
968 //stop polling if needed
969 if(this._dataSource !== null)
971 if(this._pollingID !== null)
973 this._dataSource.clearInterval(this._pollingID);
974 this._pollingID = null;
978 //remove proxy functions
979 if(this._dataTipFunction)
981 YAHOO.widget.FlashAdapter.removeProxyFunction(this._dataTipFunction);
985 YAHOO.widget.Chart.superclass.destroy.call(this);
989 * Initializes the attributes.
991 * @method _initAttributes
994 _initAttributes: function(attributes)
996 YAHOO.widget.Chart.superclass._initAttributes.call(this, attributes);
1000 * @description Request to be sent to the Chart's DataSource.
1003 this.getAttributeConfig("request",
1005 method: this._getRequest
1008 this.setAttributeConfig("request",
1010 method: this._setRequest
1014 * @attribute dataSource
1015 * @description The DataSource instance to display in the Chart.
1018 this.getAttributeConfig("dataSource",
1020 method: this._getDataSource
1023 this.setAttributeConfig("dataSource",
1025 method: this._setDataSource
1030 * @description Defines the series to be displayed by the Chart.
1033 this.getAttributeConfig("series",
1035 method: this._getSeriesDefs
1038 this.setAttributeConfig("series",
1040 method: this._setSeriesDefs
1044 * @attribute categoryNames
1045 * @description Defines the names of the categories to be displayed in the Chart..
1048 this.getAttributeConfig("categoryNames",
1050 method: this._getCategoryNames
1053 this.setAttributeConfig("categoryNames",
1055 validator: YAHOO.lang.isArray,
1056 method: this._setCategoryNames
1060 * @attribute dataTipFunction
1061 * @description The string representation of a globally-accessible function
1062 * that may be called by the SWF to generate the datatip text for a Chart's item.
1065 this.getAttributeConfig("dataTipFunction",
1067 method: this._getDataTipFunction
1070 this.setAttributeConfig("dataTipFunction",
1072 method: this._setDataTipFunction
1076 * @attribute polling
1077 * @description A numeric value indicating the number of milliseconds between
1078 * polling requests to the DataSource.
1081 this.getAttributeConfig("polling",
1083 method: this._getPolling
1086 this.setAttributeConfig("polling",
1088 method: this._setPolling
1093 * Called when the SWF is ready for communication. Sets the type, initializes
1094 * the styles, and sets the DataSource.
1096 * @method _loadHandler
1099 _loadHandler: function()
1101 //the type is set separately because it must be first!
1102 this._swf.setType(this._type);
1104 //set initial styles
1105 if(this._attributes.style)
1107 var style = this._attributes.style;
1108 this.setStyles(style);
1111 YAHOO.widget.Chart.superclass._loadHandler.call(this);
1113 if(this._dataSource)
1115 this.set("dataSource", this._dataSource);
1120 * Sends (or resends) the request to the DataSource.
1122 * @method refreshData
1124 refreshData: function()
1126 if(!this._initialized)
1131 if(this._dataSource !== null)
1133 if(this._pollingID !== null)
1135 this._dataSource.clearInterval(this._pollingID);
1136 this._pollingID = null;
1139 if(this._pollingInterval > 0)
1141 this._pollingID = this._dataSource.setInterval(this._pollingInterval, this._request, this._loadDataHandler, this);
1143 this._dataSource.sendRequest(this._request, this._loadDataHandler, this);
1148 * Called when the DataSource receives new data. The series definitions are used
1149 * to build a data provider for the SWF chart.
1151 * @method _loadDataHandler
1154 _loadDataHandler: function(request, response, error)
1164 if(this._seriesLabelFunctions)
1166 var count = this._seriesLabelFunctions.length;
1167 for(i = 0; i < count; i++)
1169 YAHOO.widget.FlashAdapter.removeProxyFunction(this._seriesLabelFunctions[i]);
1171 this._seriesLabelFunction = null;
1173 this._seriesLabelFunctions = [];
1175 //make a copy of the series definitions so that we aren't
1176 //editing them directly.
1177 var dataProvider = [];
1178 var seriesCount = 0;
1179 var currentSeries = null;
1180 if(this._seriesDefs !== null)
1182 seriesCount = this._seriesDefs.length;
1183 for(i = 0; i < seriesCount; i++)
1185 currentSeries = this._seriesDefs[i];
1186 var clonedSeries = {};
1187 for(var prop in currentSeries)
1189 if(YAHOO.lang.hasOwnProperty(currentSeries, prop))
1193 if(currentSeries.style !== null)
1195 clonedSeries.style = YAHOO.lang.JSON.stringify(currentSeries.style);
1199 else if(prop == "labelFunction")
1201 if(currentSeries.labelFunction !== null &&
1202 typeof currentSeries.labelFunction == "function")
1204 clonedSeries.labelFunction = YAHOO.widget.FlashAdapter.createProxyFunction(currentSeries.labelFunction);
1205 this._seriesLabelFunctions.push(clonedSeries.labelFunction);
1211 clonedSeries[prop] = currentSeries[prop];
1215 dataProvider.push(clonedSeries);
1221 for(i = 0; i < seriesCount; i++)
1223 currentSeries = dataProvider[i];
1224 if(!currentSeries.type)
1226 currentSeries.type = this._type;
1228 currentSeries.dataProvider = response.results;
1233 var series = {type: this._type, dataProvider: response.results};
1234 dataProvider.push(series);
1236 this._swf.setDataProvider(dataProvider);
1242 * Storage for the request attribute.
1244 * @property _request
1250 * Getter for the request attribute.
1252 * @method _getRequest
1255 _getRequest: function()
1257 return this._request;
1261 * Setter for the request attribute.
1263 * @method _setRequest
1266 _setRequest: function(value)
1268 this._request = value;
1273 * Storage for the dataSource attribute.
1275 * @property _dataSource
1281 * Getter for the dataSource attribute.
1283 * @method _getDataSource
1286 _getDataSource: function()
1288 return this._dataSource;
1292 * Setter for the dataSource attribute.
1294 * @method _setDataSource
1297 _setDataSource: function(value)
1299 this._dataSource = value;
1304 * Storage for the series attribute.
1306 * @property _seriesDefs
1312 * Getter for the series attribute.
1314 * @method _getSeriesDefs
1317 _getSeriesDefs: function()
1319 return this._seriesDefs;
1323 * Setter for the series attribute.
1325 * @method _setSeriesDefs
1328 _setSeriesDefs: function(value)
1330 this._seriesDefs = value;
1335 * Getter for the categoryNames attribute.
1337 * @method _getCategoryNames
1340 _getCategoryNames: function()
1342 this._swf.getCategoryNames();
1346 * Setter for the categoryNames attribute.
1348 * @method _setCategoryNames
1351 _setCategoryNames: function(value)
1353 this._swf.setCategoryNames(value);
1357 * Setter for the dataTipFunction attribute.
1359 * @method _setDataTipFunction
1362 _setDataTipFunction: function(value)
1364 if(this._dataTipFunction)
1366 YAHOO.widget.FlashAdapter.removeProxyFunction(this._dataTipFunction);
1369 if(value && typeof value == "function")
1371 value = YAHOO.widget.FlashAdapter.createProxyFunction(value);
1372 this._dataTipFunction = value;
1374 this._swf.setDataTipFunction(value);
1378 * Getter for the polling attribute.
1380 * @method _getPolling
1383 _getPolling: function()
1385 return this._pollingInterval;
1389 * Setter for the polling attribute.
1391 * @method _setPolling
1394 _setPolling: function(value)
1396 this._pollingInterval = value;
1402 * Storage for the dataTipFunction attribute.
1404 * @property Chart.SWFURL
1408 * @default "assets/charts.swf"
1410 YAHOO.widget.Chart.SWFURL = "assets/charts.swf";
1413 * PieChart class for the YUI Charts widget.
1415 * @namespace YAHOO.widget
1417 * @uses YAHOO.widget.Chart
1419 * @param containerId {HTMLElement} Container element for the Flash Player instance.
1420 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
1421 * @param attributes {object} (optional) Object literal of configuration values.
1423 YAHOO.widget.PieChart = function(containerId, dataSource, attributes)
1425 YAHOO.widget.PieChart.superclass.constructor.call(this, "pie", containerId, dataSource, attributes);
1428 YAHOO.lang.extend(YAHOO.widget.PieChart, YAHOO.widget.Chart,
1431 * Initializes the attributes.
1433 * @method _initAttributes
1436 _initAttributes: function(attributes)
1438 YAHOO.widget.PieChart.superclass._initAttributes.call(this, attributes);
1441 * @attribute dataField
1442 * @description The field in each item that corresponds to the data value.
1445 this.getAttributeConfig("dataField",
1447 method: this._getDataField
1450 this.setAttributeConfig("dataField",
1452 validator: YAHOO.lang.isString,
1453 method: this._setDataField
1457 * @attribute categoryField
1458 * @description The field in each item that corresponds to the category value.
1461 this.getAttributeConfig("categoryField",
1463 method: this._getCategoryField
1466 this.setAttributeConfig("categoryField",
1468 validator: YAHOO.lang.isString,
1469 method: this._setCategoryField
1474 * Getter for the dataField attribute.
1476 * @method _getDataField
1479 _getDataField: function()
1481 return this._swf.getDataField();
1485 * Setter for the dataField attribute.
1487 * @method _setDataField
1490 _setDataField: function(value)
1492 this._swf.setDataField(value);
1496 * Getter for the categoryField attribute.
1498 * @method _getCategoryField
1501 _getCategoryField: function()
1503 return this._swf.getCategoryField();
1507 * Setter for the categoryField attribute.
1509 * @method _setCategoryField
1512 _setCategoryField: function(value)
1514 this._swf.setCategoryField(value);
1519 * CartesianChart class for the YUI Charts widget.
1521 * @namespace YAHOO.widget
1522 * @class CartesianChart
1523 * @uses YAHOO.widget.Chart
1525 * @param type {String} The char type. May be "line", "column", or "bar"
1526 * @param containerId {HTMLElement} Container element for the Flash Player instance.
1527 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
1528 * @param attributes {object} (optional) Object literal of configuration values.
1530 YAHOO.widget.CartesianChart = function(type, containerId, dataSource, attributes)
1532 YAHOO.widget.CartesianChart.superclass.constructor.call(this, type, containerId, dataSource, attributes);
1535 YAHOO.lang.extend(YAHOO.widget.CartesianChart, YAHOO.widget.Chart,
1538 * Stores a reference to the xAxis labelFunction created by
1539 * YAHOO.widget.FlashAdapter.createProxyFunction()
1540 * @property _xAxisLabelFunction
1544 _xAxisLabelFunction: null,
1547 * Stores a reference to the yAxis labelFunction created by
1548 * YAHOO.widget.FlashAdapter.createProxyFunction()
1549 * @property _yAxisLabelFunction
1553 _yAxisLabelFunction: null,
1557 //remove proxy functions
1558 if(this._xAxisLabelFunction)
1560 YAHOO.widget.FlashAdapter.removeProxyFunction(this._xAxisLabelFunction);
1561 this._xAxisLabelFunction = null;
1564 if(this._yAxisLabelFunction)
1566 YAHOO.widget.FlashAdapter.removeProxyFunction(this._yAxisLabelFunction);
1567 this._yAxisLabelFunction = null;
1571 YAHOO.widget.CartesianChart.superclass.destroy.call(this);
1575 * Initializes the attributes.
1577 * @method _initAttributes
1580 _initAttributes: function(attributes)
1582 YAHOO.widget.CartesianChart.superclass._initAttributes.call(this, attributes);
1586 * @description The field in each item that corresponds to a value on the x axis.
1589 this.getAttributeConfig("xField",
1591 method: this._getXField
1594 this.setAttributeConfig("xField",
1596 validator: YAHOO.lang.isString,
1597 method: this._setXField
1602 * @description The field in each item that corresponds to a value on the x axis.
1605 this.getAttributeConfig("yField",
1607 method: this._getYField
1610 this.setAttributeConfig("yField",
1612 validator: YAHOO.lang.isString,
1613 method: this._setYField
1618 * @description A custom configuration for the horizontal x axis.
1621 this.setAttributeConfig("xAxis",
1623 method: this._setXAxis
1628 * @description A custom configuration for the vertical y axis.
1631 this.setAttributeConfig("yAxis",
1633 method: this._setYAxis
1638 * Getter for the xField attribute.
1640 * @method _getXField
1643 _getXField: function()
1645 return this._swf.getHorizontalField();
1649 * Setter for the xField attribute.
1651 * @method _setXField
1654 _setXField: function(value)
1656 this._swf.setHorizontalField(value);
1660 * Getter for the yField attribute.
1662 * @method _getYField
1665 _getYField: function()
1667 return this._swf.getVerticalField();
1671 * Setter for the yField attribute.
1673 * @method _setYField
1676 _setYField: function(value)
1678 this._swf.setVerticalField(value);
1682 * Setter for the xAxis attribute.
1687 _setXAxis: function(value)
1689 if(this._xAxisLabelFunction !== null)
1691 YAHOO.widget.FlashAdapter.removeProxyFunction(this._xAxisLabelFunction);
1692 this._xAxisLabelFunction = null;
1695 var clonedXAxis = {};
1696 for(var prop in value)
1698 if(prop == "labelFunction")
1700 if(value.labelFunction !== null)
1702 if(typeof value.labelFunction == "function")
1704 clonedXAxis.labelFunction = YAHOO.widget.FlashAdapter.createProxyFunction(value.labelFunction);
1708 clonedXAxis.labelFunction = value.labelFunction;
1710 this._xAxisLabelFunction = clonedXAxis.labelFunction;
1715 clonedXAxis[prop] = value[prop];
1718 this._swf.setHorizontalAxis(clonedXAxis);
1722 * Getter for the yAxis attribute.
1727 _setYAxis: function(value)
1729 if(this._yAxisLabelFunction !== null)
1731 YAHOO.widget.FlashAdapter.removeProxyFunction(this._yAxisLabelFunction);
1732 this._yAxisLabelFunction = null;
1735 var clonedYAxis = {};
1736 for(var prop in value)
1738 if(prop == "labelFunction")
1740 if(value.labelFunction !== null)
1742 if(typeof value.labelFunction == "function")
1744 clonedYAxis.labelFunction = YAHOO.widget.FlashAdapter.createProxyFunction(value.labelFunction);
1748 clonedYAxis.labelFunction = value.labelFunction;
1750 this._yAxisLabelFunction = clonedYAxis.labelFunction;
1755 clonedYAxis[prop] = value[prop];
1758 this._swf.setVerticalAxis(clonedYAxis);
1763 * LineChart class for the YUI Charts widget.
1765 * @namespace YAHOO.widget
1767 * @uses YAHOO.widget.CartesianChart
1769 * @param containerId {HTMLElement} Container element for the Flash Player instance.
1770 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
1771 * @param attributes {object} (optional) Object literal of configuration values.
1773 YAHOO.widget.LineChart = function(containerId, dataSource, attributes)
1775 YAHOO.widget.LineChart.superclass.constructor.call(this, "line", containerId, dataSource, attributes);
1778 YAHOO.lang.extend(YAHOO.widget.LineChart, YAHOO.widget.CartesianChart);
1781 * ColumnChart class for the YUI Charts widget.
1783 * @namespace YAHOO.widget
1784 * @class ColumnChart
1785 * @uses YAHOO.widget.CartesianChart
1787 * @param containerId {HTMLElement} Container element for the Flash Player instance.
1788 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
1789 * @param attributes {object} (optional) Object literal of configuration values.
1791 YAHOO.widget.ColumnChart = function(containerId, dataSource, attributes)
1793 YAHOO.widget.ColumnChart.superclass.constructor.call(this, "column", containerId, dataSource, attributes);
1796 YAHOO.lang.extend(YAHOO.widget.ColumnChart, YAHOO.widget.CartesianChart);
1799 * BarChart class for the YUI Charts widget.
1801 * @namespace YAHOO.widget
1803 * @uses YAHOO.widget.CartesianChart
1805 * @param containerId {HTMLElement} Container element for the Flash Player instance.
1806 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
1807 * @param attributes {object} (optional) Object literal of configuration values.
1809 YAHOO.widget.BarChart = function(containerId, dataSource, attributes)
1811 YAHOO.widget.BarChart.superclass.constructor.call(this, "bar", containerId, dataSource, attributes);
1814 YAHOO.lang.extend(YAHOO.widget.BarChart, YAHOO.widget.CartesianChart);
1817 * StackedColumnChart class for the YUI Charts widget.
1819 * @namespace YAHOO.widget
1820 * @class StackedColumnChart
1821 * @uses YAHOO.widget.CartesianChart
1823 * @param containerId {HTMLElement} Container element for the Flash Player instance.
1824 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
1825 * @param attributes {object} (optional) Object literal of configuration values.
1827 YAHOO.widget.StackedColumnChart = function(containerId, dataSource, attributes)
1829 YAHOO.widget.StackedColumnChart.superclass.constructor.call(this, "stackcolumn", containerId, dataSource, attributes);
1832 YAHOO.lang.extend(YAHOO.widget.StackedColumnChart, YAHOO.widget.CartesianChart);
1835 * StackedBarChart class for the YUI Charts widget.
1837 * @namespace YAHOO.widget
1838 * @class StackedBarChart
1839 * @uses YAHOO.widget.CartesianChart
1841 * @param containerId {HTMLElement} Container element for the Flash Player instance.
1842 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
1843 * @param attributes {object} (optional) Object literal of configuration values.
1845 YAHOO.widget.StackedBarChart = function(containerId, dataSource, attributes)
1847 YAHOO.widget.StackedBarChart.superclass.constructor.call(this, "stackbar", containerId, dataSource, attributes);
1850 YAHOO.lang.extend(YAHOO.widget.StackedBarChart, YAHOO.widget.CartesianChart);
1853 * Defines a CartesianChart's vertical or horizontal axis.
1855 * @namespace YAHOO.widget
1859 YAHOO.widget.Axis = function()
1863 YAHOO.widget.Axis.prototype =
1874 * If true, the items on the axis will be drawn in opposite direction.
1882 * A string reference to the globally-accessible function that may be called to
1883 * determine each of the label values for this axis. Also accepts function references.
1885 * @property labelFunction
1888 labelFunction: null,
1891 * The space, in pixels, between labels on an axis.
1893 * @property labelSpacing
1899 * The text that will appear next to the axis to indicate information about the data that it displays.
1908 * A type of axis whose units are measured in numeric values.
1910 * @namespace YAHOO.widget
1911 * @class NumericAxis
1912 * @extends YAHOO.widget.Axis
1915 YAHOO.widget.NumericAxis = function()
1917 YAHOO.widget.NumericAxis.superclass.constructor.call(this);
1920 YAHOO.lang.extend(YAHOO.widget.NumericAxis, YAHOO.widget.Axis,
1925 * The minimum value drawn by the axis. If not set explicitly, the axis minimum
1926 * will be calculated automatically.
1934 * The maximum value drawn by the axis. If not set explicitly, the axis maximum
1935 * will be calculated automatically.
1943 * The spacing between major intervals on this axis.
1945 * @property majorUnit
1951 * The spacing between minor intervals on this axis.
1953 * @property minorUnit
1959 * If true, the labels, ticks, gridlines, and other objects will snap to
1960 * the nearest major or minor unit. If false, their position will be based
1961 * on the minimum value.
1963 * @property snapToUnits
1969 * Series that are stackable will only stack when this value is set to true.
1971 * @property stackingEnabled
1974 stackingEnabled: false,
1977 * If true, and the bounds are calculated automatically, either the minimum or
1978 * maximum will be set to zero.
1980 * @property alwaysShowZero
1983 alwaysShowZero: true,
1986 * The scaling algorithm to use on this axis. May be "linear" or "logarithmic".
1994 * Indicates whether to round the major unit.
1996 * @property roundMajorUnit
1999 roundMajorUnit: true
2003 * A type of axis whose units are measured in time-based values.
2005 * @namespace YAHOO.widget
2009 YAHOO.widget.TimeAxis = function()
2011 YAHOO.widget.TimeAxis.superclass.constructor.call(this);
2014 YAHOO.lang.extend(YAHOO.widget.TimeAxis, YAHOO.widget.Axis,
2019 * The minimum value drawn by the axis. If not set explicitly, the axis minimum
2020 * will be calculated automatically.
2028 * The maximum value drawn by the axis. If not set explicitly, the axis maximum
2029 * will be calculated automatically.
2037 * The spacing between major intervals on this axis.
2039 * @property majorUnit
2045 * The time unit used by the majorUnit.
2047 * @property majorTimeUnit
2050 majorTimeUnit: null,
2053 * The spacing between minor intervals on this axis.
2055 * @property majorUnit
2061 * The time unit used by the minorUnit.
2063 * @property majorTimeUnit
2066 minorTimeUnit: null,
2069 * If true, the labels, ticks, gridlines, and other objects will snap to
2070 * the nearest major or minor unit. If false, their position will be based
2071 * on the minimum value.
2073 * @property snapToUnits
2079 * Series that are stackable will only stack when this value is set to true.
2081 * @property stackingEnabled
2084 stackingEnabled: false
2088 * A type of axis that displays items in categories.
2090 * @namespace YAHOO.widget
2091 * @class CategoryAxis
2094 YAHOO.widget.CategoryAxis = function()
2096 YAHOO.widget.CategoryAxis.superclass.constructor.call(this);
2099 YAHOO.lang.extend(YAHOO.widget.CategoryAxis, YAHOO.widget.Axis,
2104 * A list of category names to display along this axis.
2106 * @property categoryNames
2109 categoryNames: null,
2112 * Indicates whether or not to calculate the number of categories (ticks and labels)
2113 * when there is not enough room to display all labels on the axis. If set to true, the axis
2114 * will determine the number of categories to plot. If not, all categories will be plotted.
2116 * @property calcualateCategoryCount
2119 calculateCategoryCount: false
2123 * Functionality common to most series. Generally, a <code>Series</code>
2124 * object shouldn't be instantiated directly. Instead, a subclass with a
2125 * concrete implementation should be used.
2127 * @namespace YAHOO.widget
2131 YAHOO.widget.Series = function() {};
2133 YAHOO.widget.Series.prototype =
2136 * The type of series.
2144 * The human-readable name of the series.
2146 * @property displayName
2153 * Functionality common to most series appearing in cartesian charts.
2154 * Generally, a <code>CartesianSeries</code> object shouldn't be
2155 * instantiated directly. Instead, a subclass with a concrete implementation
2158 * @namespace YAHOO.widget
2159 * @class CartesianSeries
2160 * @uses YAHOO.widget.Series
2163 YAHOO.widget.CartesianSeries = function()
2165 YAHOO.widget.CartesianSeries.superclass.constructor.call(this);
2168 YAHOO.lang.extend(YAHOO.widget.CartesianSeries, YAHOO.widget.Series,
2171 * The field used to access the x-axis value from the items from the data source.
2179 * The field used to access the y-axis value from the items from the data source.
2188 * ColumnSeries class for the YUI Charts widget.
2190 * @namespace YAHOO.widget
2191 * @class ColumnSeries
2192 * @uses YAHOO.widget.CartesianSeries
2195 YAHOO.widget.ColumnSeries = function()
2197 YAHOO.widget.ColumnSeries.superclass.constructor.call(this);
2200 YAHOO.lang.extend(YAHOO.widget.ColumnSeries, YAHOO.widget.CartesianSeries,
2206 * LineSeries class for the YUI Charts widget.
2208 * @namespace YAHOO.widget
2210 * @uses YAHOO.widget.CartesianSeries
2213 YAHOO.widget.LineSeries = function()
2215 YAHOO.widget.LineSeries.superclass.constructor.call(this);
2218 YAHOO.lang.extend(YAHOO.widget.LineSeries, YAHOO.widget.CartesianSeries,
2225 * BarSeries class for the YUI Charts widget.
2227 * @namespace YAHOO.widget
2229 * @uses YAHOO.widget.CartesianSeries
2232 YAHOO.widget.BarSeries = function()
2234 YAHOO.widget.BarSeries.superclass.constructor.call(this);
2237 YAHOO.lang.extend(YAHOO.widget.BarSeries, YAHOO.widget.CartesianSeries,
2244 * PieSeries class for the YUI Charts widget.
2246 * @namespace YAHOO.widget
2248 * @uses YAHOO.widget.Series
2251 YAHOO.widget.PieSeries = function()
2253 YAHOO.widget.PieSeries.superclass.constructor.call(this);
2256 YAHOO.lang.extend(YAHOO.widget.PieSeries, YAHOO.widget.Series,
2261 * The field used to access the data value from the items from the data source.
2263 * @property dataField
2269 * The field used to access the category value from the items from the data source.
2271 * @property categoryField
2274 categoryField: null,
2277 * A string reference to the globally-accessible function that may be called to
2278 * determine each of the label values for this series. Also accepts function references.
2280 * @property labelFunction
2287 * StackedBarSeries class for the YUI Charts widget.
2289 * @namespace YAHOO.widget
2290 * @class StackedBarSeries
2291 * @uses YAHOO.widget.CartesianSeries
2294 YAHOO.widget.StackedBarSeries = function()
2296 YAHOO.widget.StackedBarSeries.superclass.constructor.call(this);
2299 YAHOO.lang.extend(YAHOO.widget.StackedBarSeries, YAHOO.widget.CartesianSeries,
2305 * StackedColumnSeries class for the YUI Charts widget.
2307 * @namespace YAHOO.widget
2308 * @class StackedColumnSeries
2309 * @uses YAHOO.widget.CartesianSeries
2312 YAHOO.widget.StackedColumnSeries = function()
2314 YAHOO.widget.StackedColumnSeries.superclass.constructor.call(this);
2317 YAHOO.lang.extend(YAHOO.widget.StackedColumnSeries, YAHOO.widget.CartesianSeries,
2322 YAHOO.register("charts", YAHOO.widget.Chart, {version: "2.7.0", build: "1799"});