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))
477 YAHOO.log("FlashAdapter instance destroyed: " + instanceName);
481 * Embeds the SWF in the page and associates it with this instance.
486 _embedSWF: function(swfURL, containerID, swfID, version, backgroundColor, expressInstall, wmode)
488 //standard SWFObject embed
489 var swfObj = new YAHOO.deconcept.SWFObject(swfURL, swfID, "100%", "100%", version, backgroundColor);
493 swfObj.useExpressInstall(expressInstall);
496 //make sure we can communicate with ExternalInterface
497 swfObj.addParam("allowScriptAccess", "always");
501 swfObj.addParam("wmode", wmode);
504 //again, a useful ExternalInterface trick
505 swfObj.addVariable("allowedDomain", document.location.hostname);
507 //tell the SWF which HTML element it is in
508 swfObj.addVariable("elementID", swfID);
510 // set the name of the function to call when the swf has an event
511 swfObj.addVariable("eventHandler", "YAHOO.widget.FlashAdapter.eventHandler");
513 var container = YAHOO.util.Dom.get(containerID);
514 var result = swfObj.write(container);
517 this._swf = YAHOO.util.Dom.get(swfID);
518 //if successful, let's add an owner property to the SWF reference
519 //this will allow the event handler to communicate with a YAHOO.widget.FlashAdapter
520 this._swf.owner = this;
524 YAHOO.log("Unable to load SWF " + swfURL);
529 * Handles or re-dispatches events received from the SWF.
531 * @method _eventHandler
534 _eventHandler: function(event)
536 var type = event.type;
541 this.fireEvent("contentReady");
544 YAHOO.log(event.message, event.category, this.toString());
548 //be sure to return after your case or the event will automatically fire!
549 this.fireEvent(type, event);
553 * Called when the SWF has been initialized.
555 * @method _loadHandler
558 _loadHandler: function()
560 this._initialized = false;
561 this._initAttributes(this._attributes);
562 this.setAttributes(this._attributes, true);
564 this._initialized = true;
567 set: function(name, value)
569 //save all the attributes in case the swf reloads
570 //so that we can pass them in again
571 this._attributes[name] = value;
572 YAHOO.widget.FlashAdapter.superclass.set.call(this, name, value);
576 * Initializes the attributes.
578 * @method _initAttributes
581 _initAttributes: function(attributes)
583 //should be overridden if other attributes need to be set up
587 * @description Sets the window mode of the Flash Player control. May be
588 * "window", "opaque", or "transparent". Only available in the constructor
589 * because it may not be set after Flash Player has been embedded in the page.
594 * @attribute expressInstall
595 * @description URL pointing to a SWF file that handles Flash Player's express
596 * install feature. Only available in the constructor because it may not be
597 * set after Flash Player has been embedded in the page.
603 * @description Minimum required version for the SWF file. Only available in the constructor because it may not be
604 * set after Flash Player has been embedded in the page.
609 * @attribute backgroundColor
610 * @description The background color of the SWF. Only available in the constructor because it may not be
611 * set after Flash Player has been embedded in the page.
617 * @description The alternative text to provide for screen readers and other assistive technology.
620 this.getAttributeConfig("altText",
622 method: this._getAltText
624 this.setAttributeConfig("altText",
626 method: this._setAltText
631 * @description Absolute or relative URL to the SWF displayed by the FlashAdapter. Only available in the constructor because it may not be
632 * set after Flash Player has been embedded in the page.
635 this.getAttributeConfig("swfURL",
637 method: this._getSWFURL
642 * Getter for swfURL attribute.
647 _getSWFURL: function()
653 * Getter for altText attribute.
655 * @method _getAltText
658 _getAltText: function()
660 return this._swf.getAltText();
664 * Setter for altText attribute.
666 * @method _setAltText
669 _setAltText: function(value)
671 return this._swf.setAltText(value);
676 * Receives event messages from SWF and passes them to the correct instance
679 * @method YAHOO.widget.FlashAdapter.eventHandler
683 YAHOO.widget.FlashAdapter.eventHandler = function(elementID, event)
685 var loadedSWF = YAHOO.util.Dom.get(elementID);
688 //fix for ie: if owner doesn't exist yet, try again in a moment
689 setTimeout(function() { YAHOO.widget.FlashAdapter.eventHandler( elementID, event ); }, 0);
693 loadedSWF.owner._eventHandler(event);
698 * The number of proxy functions that have been created.
702 YAHOO.widget.FlashAdapter.proxyFunctionCount = 0;
705 * Creates a globally accessible function that wraps a function reference.
706 * Returns the proxy function's name as a string for use by the SWF through
709 * @method YAHOO.widget.FlashAdapter.createProxyFunction
713 YAHOO.widget.FlashAdapter.createProxyFunction = function(func)
715 var index = YAHOO.widget.FlashAdapter.proxyFunctionCount;
716 YAHOO.widget.FlashAdapter["proxyFunction" + index] = function()
718 return func.apply(null, arguments);
720 YAHOO.widget.FlashAdapter.proxyFunctionCount++;
721 return "YAHOO.widget.FlashAdapter.proxyFunction" + index.toString();
725 * Removes a function created with createProxyFunction()
727 * @method YAHOO.widget.FlashAdapter.removeProxyFunction
731 YAHOO.widget.FlashAdapter.removeProxyFunction = function(funcName)
734 if(!funcName || funcName.indexOf("YAHOO.widget.FlashAdapter.proxyFunction") < 0)
739 funcName = funcName.substr(26);
740 YAHOO.widget.FlashAdapter[funcName] = null;
744 * The Charts widget provides a Flash control for displaying data
745 * graphically by series across A-grade browsers with Flash Player installed.
748 * @requires yahoo, dom, event, datasource
749 * @title Charts Widget
753 /****************************************************************************/
754 /****************************************************************************/
755 /****************************************************************************/
758 * Chart class for the YUI Charts widget.
760 * @namespace YAHOO.widget
762 * @uses YAHOO.widget.FlashAdapter
764 * @param type {String} The char type. May be "line", "column", "bar", or "pie"
765 * @param containerId {HTMLElement} Container element for the Flash Player instance.
766 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
767 * @param attributes {object} (optional) Object literal of configuration values.
769 YAHOO.widget.Chart = function(type, containerId, dataSource, attributes)
771 YAHOO.widget.Chart.superclass.constructor.call(this, YAHOO.widget.Chart.SWFURL, containerId, attributes);
774 this._dataSource = dataSource;
777 * Fires when the user moves the mouse over the bounds of an item renderer in the chart.
779 * @event itemMouseOverEvent
780 * @param event.type {String} The event type
781 * @param event.item {Object} The data displayed by the renderer
782 * @param event.index {Number} The position within the series that the item appears.
783 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
784 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
785 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
787 this.createEvent("itemMouseOverEvent");
790 * Fires when the user moves the mouse out of the bounds of an item renderer in the chart.
792 * @event itemMouseOutEvent
793 * @param event.type {String} The event type
794 * @param event.item {Object} The data displayed by the renderer
795 * @param event.index {Number} The position within the series that the item appears.
796 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
797 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
798 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
800 this.createEvent("itemMouseOutEvent");
803 * Fires when the user clicks an item renderer in the chart with the mouse.
805 * @event itemClickEvent
806 * @param event.type {String} The event type
807 * @param event.item {Object} The data displayed by the renderer
808 * @param event.index {Number} The position within the series that the item appears.
809 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
810 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
811 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
813 this.createEvent("itemClickEvent");
816 * Fires when the user double-clicks an item renderer in the chart with the mouse.
818 * @event itemDoubleClickEvent
819 * @param event.type {String} The event type
820 * @param event.item {Object} The data displayed by the renderer
821 * @param event.index {Number} The position within the series that the item appears.
822 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
823 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
824 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
826 this.createEvent("itemDoubleClickEvent");
829 * Fires when the user presses the mouse down on an item to initiate a drag action.
831 * @event itemDragStartEvent
832 * @param event.type {String} The event type
833 * @param event.item {Object} The data displayed by the renderer
834 * @param event.index {Number} The position within the series that the item appears.
835 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
836 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
837 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
839 this.createEvent("itemDragStartEvent");
842 * Fires when the user moves the mouse during a drag action.
844 * @event itemDragEvent
845 * @param event.type {String} The event type
846 * @param event.item {Object} The data displayed by the renderer
847 * @param event.index {Number} The position within the series that the item appears.
848 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
849 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
850 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
852 this.createEvent("itemDragEvent");
855 * Fires when the user releases the mouse during a drag action.
857 * @event itemDragEndEvent
858 * @param event.type {String} The event type
859 * @param event.item {Object} The data displayed by the renderer
860 * @param event.index {Number} The position within the series that the item appears.
861 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
862 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
863 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
865 this.createEvent("itemDragEndEvent");
868 YAHOO.extend(YAHOO.widget.Chart, YAHOO.widget.FlashAdapter,
871 * The type of this chart instance.
879 * The id returned from the DataSource's setInterval function.
880 * @property _pollingID
887 * The time, in ms, between requests for data.
888 * @property _pollingInterval
892 _pollingInterval: null,
895 * Stores a reference to the dataTipFunction created by
896 * YAHOO.widget.FlashAdapter.createProxyFunction()
897 * @property _dataTipFunction
901 _dataTipFunction: null,
904 * Stores references to series labelFunction values created by
905 * YAHOO.widget.FlashAdapter.createProxyFunction()
906 * @property _seriesLabelFunctions
910 _seriesLabelFunctions: null,
913 * Public accessor to the unique name of the Chart instance.
916 * @return {String} Unique name of the Chart instance.
920 return "Chart " + this._id;
924 * Sets a single style value on the Chart instance.
927 * @param name {String} Name of the Chart style value to change.
928 * @param value {Object} New value to pass to the Chart style.
930 setStyle: function(name, value)
932 //we must jsonify this because Flash Player versions below 9.0.60 don't handle
933 //complex ExternalInterface parsing correctly
934 value = YAHOO.lang.JSON.stringify(value);
935 this._swf.setStyle(name, value);
939 * Resets all styles on the Chart instance.
942 * @param styles {Object} Initializer for all Chart styles.
944 setStyles: function(styles)
946 //we must jsonify this because Flash Player versions below 9.0.60 don't handle
947 //complex ExternalInterface parsing correctly
948 styles = YAHOO.lang.JSON.stringify(styles);
949 this._swf.setStyles(styles);
953 * Sets the styles on all series in the Chart.
955 * @method setSeriesStyles
956 * @param styles {Array} Initializer for all Chart series styles.
958 setSeriesStyles: function(styles)
960 //we must jsonify this because Flash Player versions below 9.0.60 don't handle
961 //complex ExternalInterface parsing correctly
962 for(var i = 0; i < styles.length; i++)
964 styles[i] = YAHOO.lang.JSON.stringify(styles[i]);
966 this._swf.setSeriesStyles(styles);
971 //stop polling if needed
972 if(this._dataSource !== null)
974 if(this._pollingID !== null)
976 this._dataSource.clearInterval(this._pollingID);
977 this._pollingID = null;
981 //remove proxy functions
982 if(this._dataTipFunction)
984 YAHOO.widget.FlashAdapter.removeProxyFunction(this._dataTipFunction);
988 YAHOO.widget.Chart.superclass.destroy.call(this);
992 * Initializes the attributes.
994 * @method _initAttributes
997 _initAttributes: function(attributes)
999 YAHOO.widget.Chart.superclass._initAttributes.call(this, attributes);
1002 * @attribute request
1003 * @description Request to be sent to the Chart's DataSource.
1006 this.getAttributeConfig("request",
1008 method: this._getRequest
1011 this.setAttributeConfig("request",
1013 method: this._setRequest
1017 * @attribute dataSource
1018 * @description The DataSource instance to display in the Chart.
1021 this.getAttributeConfig("dataSource",
1023 method: this._getDataSource
1026 this.setAttributeConfig("dataSource",
1028 method: this._setDataSource
1033 * @description Defines the series to be displayed by the Chart.
1036 this.getAttributeConfig("series",
1038 method: this._getSeriesDefs
1041 this.setAttributeConfig("series",
1043 method: this._setSeriesDefs
1047 * @attribute categoryNames
1048 * @description Defines the names of the categories to be displayed in the Chart..
1051 this.getAttributeConfig("categoryNames",
1053 method: this._getCategoryNames
1056 this.setAttributeConfig("categoryNames",
1058 validator: YAHOO.lang.isArray,
1059 method: this._setCategoryNames
1063 * @attribute dataTipFunction
1064 * @description The string representation of a globally-accessible function
1065 * that may be called by the SWF to generate the datatip text for a Chart's item.
1068 this.getAttributeConfig("dataTipFunction",
1070 method: this._getDataTipFunction
1073 this.setAttributeConfig("dataTipFunction",
1075 method: this._setDataTipFunction
1079 * @attribute polling
1080 * @description A numeric value indicating the number of milliseconds between
1081 * polling requests to the DataSource.
1084 this.getAttributeConfig("polling",
1086 method: this._getPolling
1089 this.setAttributeConfig("polling",
1091 method: this._setPolling
1096 * Called when the SWF is ready for communication. Sets the type, initializes
1097 * the styles, and sets the DataSource.
1099 * @method _loadHandler
1102 _loadHandler: function()
1104 //the type is set separately because it must be first!
1105 this._swf.setType(this._type);
1107 //set initial styles
1108 if(this._attributes.style)
1110 var style = this._attributes.style;
1111 this.setStyles(style);
1114 YAHOO.widget.Chart.superclass._loadHandler.call(this);
1116 if(this._dataSource)
1118 this.set("dataSource", this._dataSource);
1123 * Sends (or resends) the request to the DataSource.
1125 * @method refreshData
1127 refreshData: function()
1129 if(!this._initialized)
1134 if(this._dataSource !== null)
1136 if(this._pollingID !== null)
1138 this._dataSource.clearInterval(this._pollingID);
1139 this._pollingID = null;
1142 if(this._pollingInterval > 0)
1144 this._pollingID = this._dataSource.setInterval(this._pollingInterval, this._request, this._loadDataHandler, this);
1146 this._dataSource.sendRequest(this._request, this._loadDataHandler, this);
1151 * Called when the DataSource receives new data. The series definitions are used
1152 * to build a data provider for the SWF chart.
1154 * @method _loadDataHandler
1157 _loadDataHandler: function(request, response, error)
1163 YAHOO.log("Unable to load data.", "error");
1168 if(this._seriesLabelFunctions)
1170 var count = this._seriesLabelFunctions.length;
1171 for(i = 0; i < count; i++)
1173 YAHOO.widget.FlashAdapter.removeProxyFunction(this._seriesLabelFunctions[i]);
1175 this._seriesLabelFunction = null;
1177 this._seriesLabelFunctions = [];
1179 //make a copy of the series definitions so that we aren't
1180 //editing them directly.
1181 var dataProvider = [];
1182 var seriesCount = 0;
1183 var currentSeries = null;
1184 if(this._seriesDefs !== null)
1186 seriesCount = this._seriesDefs.length;
1187 for(i = 0; i < seriesCount; i++)
1189 currentSeries = this._seriesDefs[i];
1190 var clonedSeries = {};
1191 for(var prop in currentSeries)
1193 if(YAHOO.lang.hasOwnProperty(currentSeries, prop))
1197 if(currentSeries.style !== null)
1199 clonedSeries.style = YAHOO.lang.JSON.stringify(currentSeries.style);
1203 else if(prop == "labelFunction")
1205 if(currentSeries.labelFunction !== null &&
1206 typeof currentSeries.labelFunction == "function")
1208 clonedSeries.labelFunction = YAHOO.widget.FlashAdapter.createProxyFunction(currentSeries.labelFunction);
1209 this._seriesLabelFunctions.push(clonedSeries.labelFunction);
1215 clonedSeries[prop] = currentSeries[prop];
1219 dataProvider.push(clonedSeries);
1225 for(i = 0; i < seriesCount; i++)
1227 currentSeries = dataProvider[i];
1228 if(!currentSeries.type)
1230 currentSeries.type = this._type;
1232 currentSeries.dataProvider = response.results;
1237 var series = {type: this._type, dataProvider: response.results};
1238 dataProvider.push(series);
1240 this._swf.setDataProvider(dataProvider);
1246 * Storage for the request attribute.
1248 * @property _request
1254 * Getter for the request attribute.
1256 * @method _getRequest
1259 _getRequest: function()
1261 return this._request;
1265 * Setter for the request attribute.
1267 * @method _setRequest
1270 _setRequest: function(value)
1272 this._request = value;
1277 * Storage for the dataSource attribute.
1279 * @property _dataSource
1285 * Getter for the dataSource attribute.
1287 * @method _getDataSource
1290 _getDataSource: function()
1292 return this._dataSource;
1296 * Setter for the dataSource attribute.
1298 * @method _setDataSource
1301 _setDataSource: function(value)
1303 this._dataSource = value;
1308 * Storage for the series attribute.
1310 * @property _seriesDefs
1316 * Getter for the series attribute.
1318 * @method _getSeriesDefs
1321 _getSeriesDefs: function()
1323 return this._seriesDefs;
1327 * Setter for the series attribute.
1329 * @method _setSeriesDefs
1332 _setSeriesDefs: function(value)
1334 this._seriesDefs = value;
1339 * Getter for the categoryNames attribute.
1341 * @method _getCategoryNames
1344 _getCategoryNames: function()
1346 this._swf.getCategoryNames();
1350 * Setter for the categoryNames attribute.
1352 * @method _setCategoryNames
1355 _setCategoryNames: function(value)
1357 this._swf.setCategoryNames(value);
1361 * Setter for the dataTipFunction attribute.
1363 * @method _setDataTipFunction
1366 _setDataTipFunction: function(value)
1368 if(this._dataTipFunction)
1370 YAHOO.widget.FlashAdapter.removeProxyFunction(this._dataTipFunction);
1373 if(value && typeof value == "function")
1375 value = YAHOO.widget.FlashAdapter.createProxyFunction(value);
1376 this._dataTipFunction = value;
1378 this._swf.setDataTipFunction(value);
1382 * Getter for the polling attribute.
1384 * @method _getPolling
1387 _getPolling: function()
1389 return this._pollingInterval;
1393 * Setter for the polling attribute.
1395 * @method _setPolling
1398 _setPolling: function(value)
1400 this._pollingInterval = value;
1406 * Storage for the dataTipFunction attribute.
1408 * @property Chart.SWFURL
1412 * @default "assets/charts.swf"
1414 YAHOO.widget.Chart.SWFURL = "assets/charts.swf";
1417 * PieChart class for the YUI Charts widget.
1419 * @namespace YAHOO.widget
1421 * @uses YAHOO.widget.Chart
1423 * @param containerId {HTMLElement} Container element for the Flash Player instance.
1424 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
1425 * @param attributes {object} (optional) Object literal of configuration values.
1427 YAHOO.widget.PieChart = function(containerId, dataSource, attributes)
1429 YAHOO.widget.PieChart.superclass.constructor.call(this, "pie", containerId, dataSource, attributes);
1432 YAHOO.lang.extend(YAHOO.widget.PieChart, YAHOO.widget.Chart,
1435 * Initializes the attributes.
1437 * @method _initAttributes
1440 _initAttributes: function(attributes)
1442 YAHOO.widget.PieChart.superclass._initAttributes.call(this, attributes);
1445 * @attribute dataField
1446 * @description The field in each item that corresponds to the data value.
1449 this.getAttributeConfig("dataField",
1451 method: this._getDataField
1454 this.setAttributeConfig("dataField",
1456 validator: YAHOO.lang.isString,
1457 method: this._setDataField
1461 * @attribute categoryField
1462 * @description The field in each item that corresponds to the category value.
1465 this.getAttributeConfig("categoryField",
1467 method: this._getCategoryField
1470 this.setAttributeConfig("categoryField",
1472 validator: YAHOO.lang.isString,
1473 method: this._setCategoryField
1478 * Getter for the dataField attribute.
1480 * @method _getDataField
1483 _getDataField: function()
1485 return this._swf.getDataField();
1489 * Setter for the dataField attribute.
1491 * @method _setDataField
1494 _setDataField: function(value)
1496 this._swf.setDataField(value);
1500 * Getter for the categoryField attribute.
1502 * @method _getCategoryField
1505 _getCategoryField: function()
1507 return this._swf.getCategoryField();
1511 * Setter for the categoryField attribute.
1513 * @method _setCategoryField
1516 _setCategoryField: function(value)
1518 this._swf.setCategoryField(value);
1523 * CartesianChart class for the YUI Charts widget.
1525 * @namespace YAHOO.widget
1526 * @class CartesianChart
1527 * @uses YAHOO.widget.Chart
1529 * @param type {String} The char type. May be "line", "column", or "bar"
1530 * @param containerId {HTMLElement} Container element for the Flash Player instance.
1531 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
1532 * @param attributes {object} (optional) Object literal of configuration values.
1534 YAHOO.widget.CartesianChart = function(type, containerId, dataSource, attributes)
1536 YAHOO.widget.CartesianChart.superclass.constructor.call(this, type, containerId, dataSource, attributes);
1539 YAHOO.lang.extend(YAHOO.widget.CartesianChart, YAHOO.widget.Chart,
1542 * Stores a reference to the xAxis labelFunction created by
1543 * YAHOO.widget.FlashAdapter.createProxyFunction()
1544 * @property _xAxisLabelFunction
1548 _xAxisLabelFunction: null,
1551 * Stores a reference to the yAxis labelFunction created by
1552 * YAHOO.widget.FlashAdapter.createProxyFunction()
1553 * @property _yAxisLabelFunction
1557 _yAxisLabelFunction: null,
1561 //remove proxy functions
1562 if(this._xAxisLabelFunction)
1564 YAHOO.widget.FlashAdapter.removeProxyFunction(this._xAxisLabelFunction);
1565 this._xAxisLabelFunction = null;
1568 if(this._yAxisLabelFunction)
1570 YAHOO.widget.FlashAdapter.removeProxyFunction(this._yAxisLabelFunction);
1571 this._yAxisLabelFunction = null;
1575 YAHOO.widget.CartesianChart.superclass.destroy.call(this);
1579 * Initializes the attributes.
1581 * @method _initAttributes
1584 _initAttributes: function(attributes)
1586 YAHOO.widget.CartesianChart.superclass._initAttributes.call(this, attributes);
1590 * @description The field in each item that corresponds to a value on the x axis.
1593 this.getAttributeConfig("xField",
1595 method: this._getXField
1598 this.setAttributeConfig("xField",
1600 validator: YAHOO.lang.isString,
1601 method: this._setXField
1606 * @description The field in each item that corresponds to a value on the x axis.
1609 this.getAttributeConfig("yField",
1611 method: this._getYField
1614 this.setAttributeConfig("yField",
1616 validator: YAHOO.lang.isString,
1617 method: this._setYField
1622 * @description A custom configuration for the horizontal x axis.
1625 this.setAttributeConfig("xAxis",
1627 method: this._setXAxis
1632 * @description A custom configuration for the vertical y axis.
1635 this.setAttributeConfig("yAxis",
1637 method: this._setYAxis
1642 * Getter for the xField attribute.
1644 * @method _getXField
1647 _getXField: function()
1649 return this._swf.getHorizontalField();
1653 * Setter for the xField attribute.
1655 * @method _setXField
1658 _setXField: function(value)
1660 this._swf.setHorizontalField(value);
1664 * Getter for the yField attribute.
1666 * @method _getYField
1669 _getYField: function()
1671 return this._swf.getVerticalField();
1675 * Setter for the yField attribute.
1677 * @method _setYField
1680 _setYField: function(value)
1682 this._swf.setVerticalField(value);
1686 * Setter for the xAxis attribute.
1691 _setXAxis: function(value)
1693 if(this._xAxisLabelFunction !== null)
1695 YAHOO.widget.FlashAdapter.removeProxyFunction(this._xAxisLabelFunction);
1696 this._xAxisLabelFunction = null;
1699 var clonedXAxis = {};
1700 for(var prop in value)
1702 if(prop == "labelFunction")
1704 if(value.labelFunction !== null)
1706 if(typeof value.labelFunction == "function")
1708 clonedXAxis.labelFunction = YAHOO.widget.FlashAdapter.createProxyFunction(value.labelFunction);
1712 clonedXAxis.labelFunction = value.labelFunction;
1714 this._xAxisLabelFunction = clonedXAxis.labelFunction;
1719 clonedXAxis[prop] = value[prop];
1722 this._swf.setHorizontalAxis(clonedXAxis);
1726 * Getter for the yAxis attribute.
1731 _setYAxis: function(value)
1733 if(this._yAxisLabelFunction !== null)
1735 YAHOO.widget.FlashAdapter.removeProxyFunction(this._yAxisLabelFunction);
1736 this._yAxisLabelFunction = null;
1739 var clonedYAxis = {};
1740 for(var prop in value)
1742 if(prop == "labelFunction")
1744 if(value.labelFunction !== null)
1746 if(typeof value.labelFunction == "function")
1748 clonedYAxis.labelFunction = YAHOO.widget.FlashAdapter.createProxyFunction(value.labelFunction);
1752 clonedYAxis.labelFunction = value.labelFunction;
1754 this._yAxisLabelFunction = clonedYAxis.labelFunction;
1759 clonedYAxis[prop] = value[prop];
1762 this._swf.setVerticalAxis(clonedYAxis);
1767 * LineChart class for the YUI Charts widget.
1769 * @namespace YAHOO.widget
1771 * @uses YAHOO.widget.CartesianChart
1773 * @param containerId {HTMLElement} Container element for the Flash Player instance.
1774 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
1775 * @param attributes {object} (optional) Object literal of configuration values.
1777 YAHOO.widget.LineChart = function(containerId, dataSource, attributes)
1779 YAHOO.widget.LineChart.superclass.constructor.call(this, "line", containerId, dataSource, attributes);
1782 YAHOO.lang.extend(YAHOO.widget.LineChart, YAHOO.widget.CartesianChart);
1785 * ColumnChart class for the YUI Charts widget.
1787 * @namespace YAHOO.widget
1788 * @class ColumnChart
1789 * @uses YAHOO.widget.CartesianChart
1791 * @param containerId {HTMLElement} Container element for the Flash Player instance.
1792 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
1793 * @param attributes {object} (optional) Object literal of configuration values.
1795 YAHOO.widget.ColumnChart = function(containerId, dataSource, attributes)
1797 YAHOO.widget.ColumnChart.superclass.constructor.call(this, "column", containerId, dataSource, attributes);
1800 YAHOO.lang.extend(YAHOO.widget.ColumnChart, YAHOO.widget.CartesianChart);
1803 * BarChart class for the YUI Charts widget.
1805 * @namespace YAHOO.widget
1807 * @uses YAHOO.widget.CartesianChart
1809 * @param containerId {HTMLElement} Container element for the Flash Player instance.
1810 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
1811 * @param attributes {object} (optional) Object literal of configuration values.
1813 YAHOO.widget.BarChart = function(containerId, dataSource, attributes)
1815 YAHOO.widget.BarChart.superclass.constructor.call(this, "bar", containerId, dataSource, attributes);
1818 YAHOO.lang.extend(YAHOO.widget.BarChart, YAHOO.widget.CartesianChart);
1821 * StackedColumnChart class for the YUI Charts widget.
1823 * @namespace YAHOO.widget
1824 * @class StackedColumnChart
1825 * @uses YAHOO.widget.CartesianChart
1827 * @param containerId {HTMLElement} Container element for the Flash Player instance.
1828 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
1829 * @param attributes {object} (optional) Object literal of configuration values.
1831 YAHOO.widget.StackedColumnChart = function(containerId, dataSource, attributes)
1833 YAHOO.widget.StackedColumnChart.superclass.constructor.call(this, "stackcolumn", containerId, dataSource, attributes);
1836 YAHOO.lang.extend(YAHOO.widget.StackedColumnChart, YAHOO.widget.CartesianChart);
1839 * StackedBarChart class for the YUI Charts widget.
1841 * @namespace YAHOO.widget
1842 * @class StackedBarChart
1843 * @uses YAHOO.widget.CartesianChart
1845 * @param containerId {HTMLElement} Container element for the Flash Player instance.
1846 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
1847 * @param attributes {object} (optional) Object literal of configuration values.
1849 YAHOO.widget.StackedBarChart = function(containerId, dataSource, attributes)
1851 YAHOO.widget.StackedBarChart.superclass.constructor.call(this, "stackbar", containerId, dataSource, attributes);
1854 YAHOO.lang.extend(YAHOO.widget.StackedBarChart, YAHOO.widget.CartesianChart);
1857 * Defines a CartesianChart's vertical or horizontal axis.
1859 * @namespace YAHOO.widget
1863 YAHOO.widget.Axis = function()
1867 YAHOO.widget.Axis.prototype =
1878 * If true, the items on the axis will be drawn in opposite direction.
1886 * A string reference to the globally-accessible function that may be called to
1887 * determine each of the label values for this axis. Also accepts function references.
1889 * @property labelFunction
1892 labelFunction: null,
1895 * The space, in pixels, between labels on an axis.
1897 * @property labelSpacing
1903 * The text that will appear next to the axis to indicate information about the data that it displays.
1912 * A type of axis whose units are measured in numeric values.
1914 * @namespace YAHOO.widget
1915 * @class NumericAxis
1916 * @extends YAHOO.widget.Axis
1919 YAHOO.widget.NumericAxis = function()
1921 YAHOO.widget.NumericAxis.superclass.constructor.call(this);
1924 YAHOO.lang.extend(YAHOO.widget.NumericAxis, YAHOO.widget.Axis,
1929 * The minimum value drawn by the axis. If not set explicitly, the axis minimum
1930 * will be calculated automatically.
1938 * The maximum value drawn by the axis. If not set explicitly, the axis maximum
1939 * will be calculated automatically.
1947 * The spacing between major intervals on this axis.
1949 * @property majorUnit
1955 * The spacing between minor intervals on this axis.
1957 * @property minorUnit
1963 * If true, the labels, ticks, gridlines, and other objects will snap to
1964 * the nearest major or minor unit. If false, their position will be based
1965 * on the minimum value.
1967 * @property snapToUnits
1973 * Series that are stackable will only stack when this value is set to true.
1975 * @property stackingEnabled
1978 stackingEnabled: false,
1981 * If true, and the bounds are calculated automatically, either the minimum or
1982 * maximum will be set to zero.
1984 * @property alwaysShowZero
1987 alwaysShowZero: true,
1990 * The scaling algorithm to use on this axis. May be "linear" or "logarithmic".
1998 * Indicates whether to round the major unit.
2000 * @property roundMajorUnit
2003 roundMajorUnit: true
2007 * A type of axis whose units are measured in time-based values.
2009 * @namespace YAHOO.widget
2013 YAHOO.widget.TimeAxis = function()
2015 YAHOO.widget.TimeAxis.superclass.constructor.call(this);
2018 YAHOO.lang.extend(YAHOO.widget.TimeAxis, YAHOO.widget.Axis,
2023 * The minimum value drawn by the axis. If not set explicitly, the axis minimum
2024 * will be calculated automatically.
2032 * The maximum value drawn by the axis. If not set explicitly, the axis maximum
2033 * will be calculated automatically.
2041 * The spacing between major intervals on this axis.
2043 * @property majorUnit
2049 * The time unit used by the majorUnit.
2051 * @property majorTimeUnit
2054 majorTimeUnit: null,
2057 * The spacing between minor intervals on this axis.
2059 * @property majorUnit
2065 * The time unit used by the minorUnit.
2067 * @property majorTimeUnit
2070 minorTimeUnit: null,
2073 * If true, the labels, ticks, gridlines, and other objects will snap to
2074 * the nearest major or minor unit. If false, their position will be based
2075 * on the minimum value.
2077 * @property snapToUnits
2083 * Series that are stackable will only stack when this value is set to true.
2085 * @property stackingEnabled
2088 stackingEnabled: false
2092 * A type of axis that displays items in categories.
2094 * @namespace YAHOO.widget
2095 * @class CategoryAxis
2098 YAHOO.widget.CategoryAxis = function()
2100 YAHOO.widget.CategoryAxis.superclass.constructor.call(this);
2103 YAHOO.lang.extend(YAHOO.widget.CategoryAxis, YAHOO.widget.Axis,
2108 * A list of category names to display along this axis.
2110 * @property categoryNames
2113 categoryNames: null,
2116 * Indicates whether or not to calculate the number of categories (ticks and labels)
2117 * when there is not enough room to display all labels on the axis. If set to true, the axis
2118 * will determine the number of categories to plot. If not, all categories will be plotted.
2120 * @property calcualateCategoryCount
2123 calculateCategoryCount: false
2127 * Functionality common to most series. Generally, a <code>Series</code>
2128 * object shouldn't be instantiated directly. Instead, a subclass with a
2129 * concrete implementation should be used.
2131 * @namespace YAHOO.widget
2135 YAHOO.widget.Series = function() {};
2137 YAHOO.widget.Series.prototype =
2140 * The type of series.
2148 * The human-readable name of the series.
2150 * @property displayName
2157 * Functionality common to most series appearing in cartesian charts.
2158 * Generally, a <code>CartesianSeries</code> object shouldn't be
2159 * instantiated directly. Instead, a subclass with a concrete implementation
2162 * @namespace YAHOO.widget
2163 * @class CartesianSeries
2164 * @uses YAHOO.widget.Series
2167 YAHOO.widget.CartesianSeries = function()
2169 YAHOO.widget.CartesianSeries.superclass.constructor.call(this);
2172 YAHOO.lang.extend(YAHOO.widget.CartesianSeries, YAHOO.widget.Series,
2175 * The field used to access the x-axis value from the items from the data source.
2183 * The field used to access the y-axis value from the items from the data source.
2192 * ColumnSeries class for the YUI Charts widget.
2194 * @namespace YAHOO.widget
2195 * @class ColumnSeries
2196 * @uses YAHOO.widget.CartesianSeries
2199 YAHOO.widget.ColumnSeries = function()
2201 YAHOO.widget.ColumnSeries.superclass.constructor.call(this);
2204 YAHOO.lang.extend(YAHOO.widget.ColumnSeries, YAHOO.widget.CartesianSeries,
2210 * LineSeries class for the YUI Charts widget.
2212 * @namespace YAHOO.widget
2214 * @uses YAHOO.widget.CartesianSeries
2217 YAHOO.widget.LineSeries = function()
2219 YAHOO.widget.LineSeries.superclass.constructor.call(this);
2222 YAHOO.lang.extend(YAHOO.widget.LineSeries, YAHOO.widget.CartesianSeries,
2229 * BarSeries class for the YUI Charts widget.
2231 * @namespace YAHOO.widget
2233 * @uses YAHOO.widget.CartesianSeries
2236 YAHOO.widget.BarSeries = function()
2238 YAHOO.widget.BarSeries.superclass.constructor.call(this);
2241 YAHOO.lang.extend(YAHOO.widget.BarSeries, YAHOO.widget.CartesianSeries,
2248 * PieSeries class for the YUI Charts widget.
2250 * @namespace YAHOO.widget
2252 * @uses YAHOO.widget.Series
2255 YAHOO.widget.PieSeries = function()
2257 YAHOO.widget.PieSeries.superclass.constructor.call(this);
2260 YAHOO.lang.extend(YAHOO.widget.PieSeries, YAHOO.widget.Series,
2265 * The field used to access the data value from the items from the data source.
2267 * @property dataField
2273 * The field used to access the category value from the items from the data source.
2275 * @property categoryField
2278 categoryField: null,
2281 * A string reference to the globally-accessible function that may be called to
2282 * determine each of the label values for this series. Also accepts function references.
2284 * @property labelFunction
2291 * StackedBarSeries class for the YUI Charts widget.
2293 * @namespace YAHOO.widget
2294 * @class StackedBarSeries
2295 * @uses YAHOO.widget.CartesianSeries
2298 YAHOO.widget.StackedBarSeries = function()
2300 YAHOO.widget.StackedBarSeries.superclass.constructor.call(this);
2303 YAHOO.lang.extend(YAHOO.widget.StackedBarSeries, YAHOO.widget.CartesianSeries,
2309 * StackedColumnSeries class for the YUI Charts widget.
2311 * @namespace YAHOO.widget
2312 * @class StackedColumnSeries
2313 * @uses YAHOO.widget.CartesianSeries
2316 YAHOO.widget.StackedColumnSeries = function()
2318 YAHOO.widget.StackedColumnSeries.superclass.constructor.call(this);
2321 YAHOO.lang.extend(YAHOO.widget.StackedColumnSeries, YAHOO.widget.CartesianSeries,
2326 YAHOO.register("charts", YAHOO.widget.Chart, {version: "2.7.0", build: "1799"});