Merge commit 'catalyst/MOODLE_19_STABLE' into mdl19-linuxchix
[moodle-linuxchix.git] / lib / yui / charts / charts-experimental-debug.js
blobe63bd57dc7d464b9693d7eddbe6117a783753242
1 /*
2 Copyright (c) 2008, Yahoo! Inc. All rights reserved.
3 Code licensed under the BSD License:
4 http://developer.yahoo.net/yui/license.txt
5 version: 2.5.2
6 */
7 /*extern ActiveXObject, __flash_unloadHandler, __flash_savedUnloadHandler */
8 /*!
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
14 var deconcept = deconcept || {};
16 if(typeof deconcept.util == "undefined" || !deconcept.util)
18 deconcept.util = {};
21 if(typeof deconcept.SWFObjectUtil == "undefined" || !deconcept.SWFObjectUtil)
23 deconcept.SWFObjectUtil = {};
26 deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey)
28 if(!document.getElementById) { return; }
29 this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
30 this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
31 this.params = {};
32 this.variables = {};
33 this.attributes = [];
34 if(swf) { this.setAttribute('swf', swf); }
35 if(id) { this.setAttribute('id', id); }
36 if(w) { this.setAttribute('width', w); }
37 if(h) { this.setAttribute('height', h); }
38 if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
39 this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
40 if (!window.opera && document.all && this.installedVer.major > 7)
42 // only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
43 deconcept.SWFObject.doPrepUnload = true;
45 if(c)
47 this.addParam('bgcolor', c);
49 var q = quality ? quality : 'high';
50 this.addParam('quality', q);
51 this.setAttribute('useExpressInstall', false);
52 this.setAttribute('doExpressInstall', false);
53 var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
54 this.setAttribute('xiRedirectUrl', xir);
55 this.setAttribute('redirectUrl', '');
56 if(redirectUrl)
58 this.setAttribute('redirectUrl', redirectUrl);
62 deconcept.SWFObject.prototype =
64 useExpressInstall: function(path)
66 this.xiSWFPath = !path ? "expressinstall.swf" : path;
67 this.setAttribute('useExpressInstall', true);
69 setAttribute: function(name, value){
70 this.attributes[name] = value;
72 getAttribute: function(name){
73 return this.attributes[name];
75 addParam: function(name, value){
76 this.params[name] = value;
78 getParams: function(){
79 return this.params;
81 addVariable: function(name, value){
82 this.variables[name] = value;
84 getVariable: function(name){
85 return this.variables[name];
87 getVariables: function(){
88 return this.variables;
90 getVariablePairs: function(){
91 var variablePairs = [];
92 var key;
93 var variables = this.getVariables();
94 for(key in variables){
95 variablePairs[variablePairs.length] = key +"="+ variables[key];
97 return variablePairs;
99 getSWFHTML: function() {
100 var swfNode = "";
101 var params = {};
102 var key = "";
103 var pairs = "";
104 if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
105 if (this.getAttribute("doExpressInstall")) {
106 this.addVariable("MMplayerType", "PlugIn");
107 this.setAttribute('swf', this.xiSWFPath);
109 swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'"';
110 swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
111 params = this.getParams();
112 for(key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
113 pairs = this.getVariablePairs().join("&");
114 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
115 swfNode += '/>';
116 } else { // PC IE
117 if (this.getAttribute("doExpressInstall")) {
118 this.addVariable("MMplayerType", "ActiveX");
119 this.setAttribute('swf', this.xiSWFPath);
121 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') +'">';
122 swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
123 params = this.getParams();
124 for(key in params) {
125 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
127 pairs = this.getVariablePairs().join("&");
128 if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
129 swfNode += "</object>";
131 return swfNode;
133 write: function(elementId)
135 if(this.getAttribute('useExpressInstall')) {
136 // check to see if we need to do an express install
137 var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
138 if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
139 this.setAttribute('doExpressInstall', true);
140 this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
141 document.title = document.title.slice(0, 47) + " - Flash Player Installation";
142 this.addVariable("MMdoctitle", document.title);
145 if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version')))
147 var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
148 n.innerHTML = this.getSWFHTML();
149 return true;
151 else
153 if(this.getAttribute('redirectUrl') !== "")
155 document.location.replace(this.getAttribute('redirectUrl'));
158 return false;
162 /* ---- detection functions ---- */
163 deconcept.SWFObjectUtil.getPlayerVersion = function()
165 var axo = null;
166 var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
167 if(navigator.plugins && navigator.mimeTypes.length)
169 var x = navigator.plugins["Shockwave Flash"];
170 if(x && x.description)
172 PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
175 else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0)
176 { // if Windows CE
177 var counter = 3;
178 while(axo)
182 counter++;
183 axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter);
184 // document.write("player v: "+ counter);
185 PlayerVersion = new deconcept.PlayerVersion([counter,0,0]);
187 catch(e)
189 axo = null;
193 else
194 { // Win IE (non mobile)
195 // do minor version lookup in IE, but avoid fp6 crashing issues
196 // see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
199 axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
201 catch(e)
205 axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
206 PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
207 axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
209 catch(e)
211 if(PlayerVersion.major == 6)
213 return PlayerVersion;
218 axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
220 catch(e) {}
223 if(axo !== null)
225 PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
228 return PlayerVersion;
231 deconcept.PlayerVersion = function(arrVersion)
233 this.major = arrVersion[0] !== null ? parseInt(arrVersion[0], 0) : 0;
234 this.minor = arrVersion[1] !== null ? parseInt(arrVersion[1], 0) : 0;
235 this.rev = arrVersion[2] !== null ? parseInt(arrVersion[2], 0) : 0;
238 deconcept.PlayerVersion.prototype.versionIsValid = function(fv)
240 if(this.major < fv.major)
242 return false;
244 if(this.major > fv.major)
246 return true;
248 if(this.minor < fv.minor)
250 return false;
252 if(this.minor > fv.minor)
254 return true;
256 if(this.rev < fv.rev)
258 return false;
260 return true;
263 /* ---- get value of query string param ---- */
264 deconcept.util =
266 getRequestParameter: function(param)
268 var q = document.location.search || document.location.hash;
269 if(param === null) { return q; }
270 if(q)
272 var pairs = q.substring(1).split("&");
273 for(var i=0; i < pairs.length; i++)
275 if (pairs[i].substring(0, pairs[i].indexOf("=")) == param)
277 return pairs[i].substring((pairs[i].indexOf("=") + 1));
281 return "";
285 /* fix for video streaming bug */
286 deconcept.SWFObjectUtil.cleanupSWFs = function()
288 var objects = document.getElementsByTagName("OBJECT");
289 for(var i = objects.length - 1; i >= 0; i--)
291 objects[i].style.display = 'none';
292 for(var x in objects[i])
294 if(typeof objects[i][x] == 'function')
296 objects[i][x] = function(){};
302 // fixes bug in some fp9 versions see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
303 if(deconcept.SWFObject.doPrepUnload)
305 if(!deconcept.unloadSet)
307 deconcept.SWFObjectUtil.prepUnload = function()
309 __flash_unloadHandler = function(){};
310 __flash_savedUnloadHandler = function(){};
311 window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs);
313 window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
314 deconcept.unloadSet = true;
318 /* add document.getElementById if needed (mobile IE < 5) */
319 if(!document.getElementById && document.all)
321 document.getElementById = function(id) { return document.all[id]; };
324 /* add some aliases for ease of use/backwards compatibility */
325 var getQueryParamValue = deconcept.util.getRequestParameter;
326 var FlashObject = deconcept.SWFObject; // for legacy support
327 var SWFObject = deconcept.SWFObject;
330 * Wraps Flash embedding functionality and allows communication with SWF through
331 * attributes.
333 * @namespace YAHOO.widget
334 * @class FlashAdapter
335 * @uses YAHOO.util.AttributeProvider
337 YAHOO.widget.FlashAdapter = function(swfURL, containerID, attributes)
339 // set up the initial events and attributes stuff
340 this._queue = this._queue || [];
341 this._events = this._events || {};
342 this._configs = this._configs || {};
343 attributes = attributes || {};
345 //the Flash Player external interface code from Adobe doesn't play nicely
346 //with the default value, yui-gen, in IE
347 this._id = attributes.id = attributes.id || YAHOO.util.Dom.generateId(null, "yuigen");
348 attributes.version = attributes.version || "9.0.45";
349 attributes.backgroundColor = attributes.backgroundColor || "#ffffff";
351 //we can't use the initial attributes right away
352 //so save them for once the SWF finishes loading
353 this._attributes = attributes;
355 this._swfURL = swfURL;
356 this._containerID = containerID;
358 //embed the SWF file in the page
359 this._embedSWF(this._swfURL, this._containerID, attributes.id, attributes.version,
360 attributes.backgroundColor, attributes.expressInstall, attributes.wmode);
363 * Fires when the SWF is initialized and communication is possible.
364 * @event contentReady
366 this.createEvent("contentReady");
369 YAHOO.extend(YAHOO.widget.FlashAdapter, YAHOO.util.AttributeProvider,
372 * The URL of the SWF file.
373 * @property _swfURL
374 * @type String
375 * @private
377 _swfURL: null,
380 * The ID of the containing DIV.
381 * @property _containerID
382 * @type String
383 * @private
385 _containerID: null,
388 * A reference to the embedded SWF file.
389 * @property _swf
390 * @private
392 _swf: null,
395 * The id of this instance.
396 * @property _id
397 * @type String
398 * @private
400 _id: null,
403 * The initializing attributes are stored here until the SWF is ready.
404 * @property _attributes
405 * @type Object
406 * @private
408 _attributes: null, //the intializing attributes
411 * Public accessor to the unique name of the FlashAdapter instance.
413 * @method toString
414 * @return {String} Unique name of the FlashAdapter instance.
416 toString: function()
418 return "FlashAdapter " + this._id;
422 * Nulls out the entire FlashAdapter instance and related objects and removes attached
423 * event listeners and clears out DOM elements inside the container. After calling
424 * this method, the instance reference should be expliclitly nulled by implementer,
425 * as in myChart = null. Use with caution!
427 * @method destroy
429 destroy: function()
431 //kill the Flash Player instance
432 if(this._swf)
434 var container = YAHOO.util.Dom.get(this._containerID);
435 container.removeChild(this._swf);
438 var instanceName = this._id;
440 //null out properties
441 for(var prop in this)
443 if(YAHOO.lang.hasOwnProperty(this, prop))
445 this[prop] = null;
449 YAHOO.log("FlashAdapter instance destroyed: " + instanceName);
453 * Embeds the SWF in the page and associates it with this instance.
455 * @method _embedSWF
456 * @private
458 _embedSWF: function(swfURL, containerID, swfID, version, backgroundColor, expressInstall, wmode)
460 //standard SWFObject embed
461 var swfObj = new deconcept.SWFObject(swfURL, swfID, "100%", "100%", version, backgroundColor);
463 if(expressInstall)
465 swfObj.useExpressInstall(expressInstall);
468 //make sure we can communicate with ExternalInterface
469 swfObj.addParam("allowScriptAccess", "always");
471 if(wmode !== null)
473 swfObj.addParam("wmode", wmode);
476 //again, a useful ExternalInterface trick
477 swfObj.addVariable("allowedDomain", document.location.hostname);
479 //tell the SWF which HTML element it is in
480 swfObj.addVariable("elementID", swfID);
482 // set the name of the function to call when the swf has an event
483 swfObj.addVariable("eventHandler", "YAHOO.widget.FlashAdapter.eventHandler");
485 var container = YAHOO.util.Dom.get(containerID);
486 var result = swfObj.write(container);
487 if(result)
489 this._swf = YAHOO.util.Dom.get(swfID);
490 //if successful, let's add an owner property to the SWF reference
491 //this will allow the event handler to communicate with a YAHOO.widget.FlashAdapter
492 this._swf.owner = this;
494 else
496 YAHOO.log("Unable to load SWF " + swfURL);
501 * Handles or re-dispatches events received from the SWF.
503 * @method _eventHandler
504 * @private
506 _eventHandler: function(event)
508 var type = event.type;
509 switch(type)
511 case "swfReady":
512 this._loadHandler();
513 return;
514 case "log":
515 YAHOO.log(event.message, event.category, this.toString());
516 return;
519 //be sure to return after your case or the event will automatically fire!
520 this.fireEvent(type, event);
524 * Called when the SWF has been initialized.
526 * @method _loadHandler
527 * @private
529 _loadHandler: function()
531 this._initAttributes(this._attributes);
532 this.setAttributes(this._attributes, true);
533 this._attributes = null;
535 this.fireEvent("contentReady");
539 * Initializes the attributes.
541 * @method _initAttributes
542 * @private
544 _initAttributes: function(attributes)
546 //should be overridden if other attributes need to be set up
549 * @attribute wmode
550 * @description Sets the window mode of the Flash Player control. May be
551 * "window", "opaque", or "transparent". Only available in the constructor
552 * because it may not be set after Flash Player has been embedded in the page.
553 * @type String
557 * @attribute expressInstall
558 * @description URL pointing to a SWF file that handles Flash Player's express
559 * install feature. Only available in the constructor because it may not be
560 * set after Flash Player has been embedded in the page.
561 * @type String
565 * @attribute version
566 * @description Minimum required version for the SWF file. Only available in the constructor because it may not be
567 * set after Flash Player has been embedded in the page.
568 * @type String
572 * @attribute backgroundColor
573 * @description The background color of the SWF. Only available in the constructor because it may not be
574 * set after Flash Player has been embedded in the page.
575 * @type String
579 * @attribute swfURL
580 * @description Absolute or relative URL to the SWF displayed by the FlashAdapter. Only available in the constructor because it may not be
581 * set after Flash Player has been embedded in the page.
582 * @type String
584 this.getAttributeConfig("swfURL",
586 method: this._getSWFURL
591 * Getter for swfURL attribute.
593 * @method _getSWFURL
594 * @private
596 _getSWFURL: function()
598 return this._swfURL;
603 * Receives event messages from SWF and passes them to the correct instance
604 * of FlashAdapter.
606 * @method YAHOO.widget.FlashAdapter.eventHandler
607 * @static
608 * @private
610 YAHOO.widget.FlashAdapter.eventHandler = function(elementID, event)
612 var loadedSWF = YAHOO.util.Dom.get(elementID);
613 if(!loadedSWF.owner)
615 //fix for ie: if owner doesn't exist yet, try again in a moment
616 setTimeout(function() { YAHOO.widget.FlashAdapter.eventHandler( elementID, event ); }, 0);
618 else
620 loadedSWF.owner._eventHandler(event);
625 * The number of proxy functions that have been created.
626 * @static
627 * @private
629 YAHOO.widget.FlashAdapter.proxyFunctionCount = 0;
632 * Creates a globally accessible function that wraps a function reference.
633 * Returns the proxy function's name as a string for use by the SWF through
634 * ExternalInterface.
636 * @method YAHOO.widget.FlashAdapter.createProxyFunction
637 * @static
638 * @private
640 YAHOO.widget.FlashAdapter.createProxyFunction = function(func)
642 var index = YAHOO.widget.FlashAdapter.proxyFunctionCount;
643 YAHOO.widget.FlashAdapter["proxyFunction" + index] = function()
645 return func.apply(null, arguments);
647 YAHOO.widget.FlashAdapter.proxyFunctionCount++;
648 return "YAHOO.widget.FlashAdapter.proxyFunction" + index.toString();
652 * Removes a function created with createProxyFunction()
654 * @method YAHOO.widget.FlashAdapter.removeProxyFunction
655 * @static
656 * @private
658 YAHOO.widget.FlashAdapter.removeProxyFunction = function(funcName)
660 //quick error check
661 if(!funcName || funcName.indexOf("YAHOO.widget.FlashAdapter.proxyFunction") < 0)
663 return;
666 funcName = funcName.substr(26);
667 YAHOO.widget.FlashAdapter[funcName] = null;
671 * The Charts widget provides a Flash control for displaying data
672 * graphically by series across A-grade browsers with Flash Player installed.
674 * @module charts
675 * @requires yahoo, dom, event, datasource
676 * @title Charts Widget
677 * @beta
681 * Chart class for the YUI Charts widget.
683 * @namespace YAHOO.widget
684 * @class Chart
685 * @uses YAHOO.util.FlashAdapter
686 * @constructor
687 * @param type {String} The char type. May be "line", "column", "bar", or "pie"
688 * @param containerId {HTMLElement} Container element for the Flash Player instance.
689 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
690 * @param attributes {object} (optional) Object literal of configuration values.
692 YAHOO.widget.Chart = function(type, containerId, dataSource, attributes)
694 YAHOO.widget.Chart.superclass.constructor.call(this, YAHOO.widget.Chart.SWFURL, containerId, attributes);
696 this._type = type;
697 this._dataSource = dataSource;
700 * Fires when the user moves the mouse over the bounds of an item renderer in the chart.
702 * @event itemMouseOverEvent
703 * @param event.type {String} The event type
704 * @param event.item {Object} The data displayed by the renderer
705 * @param event.index {Number} The position within the series that the item appears.
706 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
707 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
708 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
710 this.createEvent("itemMouseOverEvent");
713 * Fires when the user moves the mouse out of the bounds of an item renderer in the chart.
715 * @event itemMouseOutEvent
716 * @param event.type {String} The event type
717 * @param event.item {Object} The data displayed by the renderer
718 * @param event.index {Number} The position within the series that the item appears.
719 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
720 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
721 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
723 this.createEvent("itemMouseOutEvent");
726 * Fires when the user clicks an item renderer in the chart with the mouse.
728 * @event itemClickEvent
729 * @param event.type {String} The event type
730 * @param event.item {Object} The data displayed by the renderer
731 * @param event.index {Number} The position within the series that the item appears.
732 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
733 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
734 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
736 this.createEvent("itemClickEvent");
739 * Fires when the user double-clicks an item renderer in the chart with the mouse.
741 * @event itemDoubleClickEvent
742 * @param event.type {String} The event type
743 * @param event.item {Object} The data displayed by the renderer
744 * @param event.index {Number} The position within the series that the item appears.
745 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
746 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
747 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
749 this.createEvent("itemDoubleClickEvent");
752 * Fires when the user presses the mouse down on an item to initiate a drag action.
754 * @event itemDragStartEvent
755 * @param event.type {String} The event type
756 * @param event.item {Object} The data displayed by the renderer
757 * @param event.index {Number} The position within the series that the item appears.
758 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
759 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
760 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
762 this.createEvent("itemDragStartEvent");
765 * Fires when the user moves the mouse during a drag action.
767 * @event itemDragEvent
768 * @param event.type {String} The event type
769 * @param event.item {Object} The data displayed by the renderer
770 * @param event.index {Number} The position within the series that the item appears.
771 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
772 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
773 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
775 this.createEvent("itemDragEvent");
778 * Fires when the user releases the mouse during a drag action.
780 * @event itemDragEndEvent
781 * @param event.type {String} The event type
782 * @param event.item {Object} The data displayed by the renderer
783 * @param event.index {Number} The position within the series that the item appears.
784 * @param event.seriesIndex {Number} The position within the series definition that the series appears.
785 * @param event.x {Number} The horizontal position of the mouse, relative to the SWF.
786 * @param event.y {Number} The vertical position of the mouse, relative to the SWF.
788 this.createEvent("itemDragEndEvent");
791 YAHOO.extend(YAHOO.widget.Chart, YAHOO.widget.FlashAdapter,
794 * The type of this chart instance.
795 * @property _type
796 * @type String
797 * @private
799 _type: null,
802 * The id returned from the DataSource's setInterval function.
803 * @property _pollingID
804 * @type Number
805 * @private
807 _pollingID: null,
810 * The time, in ms, between requests for data.
811 * @property _pollingInterval
812 * @type Number
813 * @private
815 _pollingInterval: null,
818 * Indicates whether all attributes have been set and
819 * the dataSource may be passed to the SWF.
820 * @property _initialized
821 * @type Boolean
822 * @private
824 _initialized: false,
827 * Stores a reference to the dataTipFunction created by
828 * YAHOO.widget.FlashAdapter.createProxyFunction()
829 * @property _dataTipFunction
830 * @type String
831 * @private
833 _dataTipFunction: null,
836 * Public accessor to the unique name of the Chart instance.
838 * @method toString
839 * @return {String} Unique name of the Chart instance.
841 toString: function()
843 return "Chart " + this._id;
847 * Sets a single style value on the Chart instance.
849 * @method setStyle
850 * @param name {String} Name of the Chart style value to change.
851 * @param value {Object} New value to pass to the Chart style.
853 setStyle: function(name, value)
855 //we must jsonify this because Flash Player versions below 9.0.60 don't handle
856 //complex ExternalInterface parsing correctly
857 value = YAHOO.lang.JSON.stringify(value);
858 this._swf.setStyle(name, value);
862 * Resets all styles on the Chart instance.
864 * @method setStyles
865 * @param styles {Object} Initializer for all Chart styles.
867 setStyles: function(styles)
869 //we must jsonify this because Flash Player versions below 9.0.60 don't handle
870 //complex ExternalInterface parsing correctly
871 styles = YAHOO.lang.JSON.stringify(styles);
872 this._swf.setStyles(styles);
876 * Sets the styles on all series in the Chart.
878 * @method setSeriesStyles
879 * @param styles {Array} Initializer for all Chart series styles.
881 setSeriesStyles: function(styles)
883 //we must jsonify this because Flash Player versions below 9.0.60 don't handle
884 //complex ExternalInterface parsing correctly
885 for(var i = 0; i < styles.length; i++)
887 styles[i] = YAHOO.lang.JSON.stringify(styles[i]);
889 this._swf.setSeriesStyles(styles);
892 destroy: function()
894 //stop polling if needed
895 if(this._dataSource !== null)
897 if(this._pollingID !== null)
899 this._dataSource.clearInterval(this._pollingID);
900 this._pollingID = null;
904 //remove proxy functions
905 if(this._dataTipFunction)
907 YAHOO.widget.FlashAdapter.removeProxyFunction(this._dataTipFunction);
910 //call last
911 YAHOO.widget.Chart.superclass.destroy.call(this);
915 * Initializes the attributes.
917 * @method _initAttributes
918 * @private
920 _initAttributes: function(attributes)
922 YAHOO.widget.Chart.superclass._initAttributes.call(this, attributes);
925 * @attribute request
926 * @description Request to be sent to the Chart's DataSource.
927 * @type String
929 this.getAttributeConfig("request",
931 method: this._getRequest
934 this.setAttributeConfig("request",
936 method: this._setRequest
940 * @attribute dataSource
941 * @description The DataSource instance to display in the Chart.
942 * @type DataSource
944 this.getAttributeConfig("dataSource",
946 method: this._getDataSource
949 this.setAttributeConfig("dataSource",
951 method: this._setDataSource
955 * @attribute series
956 * @description Defines the series to be displayed by the Chart.
957 * @type Array
959 this.getAttributeConfig("series",
961 method: this._getSeriesDefs
964 this.setAttributeConfig("series",
966 method: this._setSeriesDefs
970 * @attribute categoryNames
971 * @description Defines the names of the categories to be displayed in the Chart..
972 * @type Array
974 this.getAttributeConfig("categoryNames",
976 method: this._getCategoryNames
979 this.setAttributeConfig("categoryNames",
981 validator: YAHOO.lang.isArray,
982 method: this._setCategoryNames
986 * @attribute dataTipFunction
987 * @description The string representation of a globally-accessible function
988 * that may be called by the SWF to generate the datatip text for a Chart's item.
989 * @type String
991 this.getAttributeConfig("dataTipFunction",
993 method: this._getDataTipFunction
996 this.setAttributeConfig("dataTipFunction",
998 method: this._setDataTipFunction
1002 * @attribute polling
1003 * @description A numeric value indicating the number of milliseconds between
1004 * polling requests to the DataSource.
1005 * @type Number
1007 this.getAttributeConfig("polling",
1009 method: this._getPolling
1012 this.setAttributeConfig("polling",
1014 method: this._setPolling
1019 * Called when the SWF is ready for communication. Sets the type, initializes
1020 * the styles, and sets the DataSource.
1022 * @method _loadHandler
1023 * @private
1025 _loadHandler: function()
1027 this._swf.setType(this._type);
1029 //set initial styles
1030 if(this._attributes.style)
1032 var style = this._attributes.style;
1033 this.setStyles(style);
1036 YAHOO.widget.Chart.superclass._loadHandler.call(this);
1038 this._initialized = true;
1040 if(this._dataSource)
1042 this.set("dataSource", this._dataSource);
1047 * Sends the request to the DataSource.
1049 * @method _refreshData
1050 * @private
1052 _refreshData: function()
1054 if(!this._initialized)
1056 return;
1059 if(this._dataSource !== null)
1061 if(this._pollingID !== null)
1063 this._dataSource.clearInterval(this._pollingID);
1064 this._pollingID = null;
1067 if(this._pollingInterval > 0)
1069 this._pollingID = this._dataSource.setInterval(this._pollingInterval, this._request, this._loadDataHandler, this);
1071 this._dataSource.sendRequest(this._request, this._loadDataHandler, this);
1076 * Called when the DataSource receives new data. The series definitions are used
1077 * to build a data provider for the SWF chart.
1079 * @method _loadDataHandler
1080 * @private
1082 _loadDataHandler: function(request, response, error)
1084 if(error)
1086 YAHOO.log("Unable to load data.", "error");
1088 else
1090 var styleChanged = false;
1092 //make a copy of the series definitions so that we aren't
1093 //editing them directly.
1094 var dataProvider = [];
1095 var seriesCount = 0;
1096 var currentSeries = null;
1097 var i = 0;
1098 if(this._seriesDefs !== null)
1100 seriesCount = this._seriesDefs.length;
1101 for(i = 0; i < seriesCount; i++)
1103 currentSeries = this._seriesDefs[i];
1104 var clonedSeries = {};
1105 for(var prop in currentSeries)
1107 if(YAHOO.lang.hasOwnProperty(currentSeries, prop))
1109 if(prop == "style" && currentSeries.style !== null)
1111 clonedSeries.style = YAHOO.lang.JSON.stringify(currentSeries.style);
1112 styleChanged = true;
1114 //we don't want to modify the styles again next time
1115 //so null out the style property.
1116 currentSeries.style = null;
1118 else
1120 clonedSeries[prop] = currentSeries[prop];
1124 dataProvider.push(clonedSeries);
1128 if(seriesCount > 0)
1130 for(i = 0; i < seriesCount; i++)
1132 currentSeries = dataProvider[i];
1133 if(!currentSeries.type)
1135 currentSeries.type = this._type;
1137 currentSeries.dataProvider = response.results;
1140 else
1142 var series = {type: this._type, dataProvider: response.results};
1143 dataProvider.push(series);
1145 this._swf.setDataProvider(dataProvider, styleChanged);
1150 * Storage for the request attribute.
1152 * @property _request
1153 * @private
1155 _request: "",
1158 * Getter for the request attribute.
1160 * @method _getRequest
1161 * @private
1163 _getRequest: function()
1165 return this._request;
1169 * Setter for the request attribute.
1171 * @method _setRequest
1172 * @private
1174 _setRequest: function(value)
1176 this._request = value;
1177 this._refreshData();
1181 * Storage for the dataSource attribute.
1183 * @property _dataSource
1184 * @private
1186 _dataSource: null,
1189 * Getter for the dataSource attribute.
1191 * @method _getDataSource
1192 * @private
1194 _getDataSource: function()
1196 return this._dataSource;
1200 * Setter for the dataSource attribute.
1202 * @method _setDataSource
1203 * @private
1205 _setDataSource: function(value)
1207 this._dataSource = value;
1208 this._refreshData();
1212 * Storage for the series attribute.
1214 * @property _seriesDefs
1215 * @private
1217 _seriesDefs: null,
1220 * Getter for the series attribute.
1222 * @method _getSeriesDefs
1223 * @private
1225 _getSeriesDefs: function()
1227 return this._seriesDefs;
1231 * Setter for the series attribute.
1233 * @method _setSeriesDefs
1234 * @private
1236 _setSeriesDefs: function(value)
1238 this._seriesDefs = value;
1239 this._refreshData();
1243 * Getter for the categoryNames attribute.
1245 * @method _getCategoryNames
1246 * @private
1248 _getCategoryNames: function()
1250 this._swf.getCategoryNames();
1254 * Setter for the categoryNames attribute.
1256 * @method _setCategoryNames
1257 * @private
1259 _setCategoryNames: function(value)
1261 this._swf.setCategoryNames(value);
1265 * Setter for the dataTipFunction attribute.
1267 * @method _setDataTipFunction
1268 * @private
1270 _setDataTipFunction: function(value)
1272 if(this._dataTipFunction)
1274 YAHOO.widget.FlashAdapter.removeProxyFunction(this._dataTipFunction);
1277 if(value && typeof value == "function")
1279 value = YAHOO.widget.FlashAdapter.createProxyFunction(value);
1280 this._dataTipFunction = value;
1282 this._swf.setDataTipFunction(value);
1286 * Getter for the polling attribute.
1288 * @method _getPolling
1289 * @private
1291 _getPolling: function()
1293 return this._pollingInterval;
1297 * Setter for the polling attribute.
1299 * @method _setPolling
1300 * @private
1302 _setPolling: function(value)
1304 this._pollingInterval = value;
1305 this._refreshData();
1310 * Storage for the dataTipFunction attribute.
1312 * @property Chart.SWFURL
1313 * @private
1314 * @static
1315 * @final
1316 * @default "assets/charts.swf"
1318 YAHOO.widget.Chart.SWFURL = "assets/charts.swf";
1321 * PieChart class for the YUI Charts widget.
1323 * @namespace YAHOO.widget
1324 * @class PieChart
1325 * @uses YAHOO.widget.Chart
1326 * @constructor
1327 * @param containerId {HTMLElement} Container element for the Flash Player instance.
1328 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
1329 * @param attributes {object} (optional) Object literal of configuration values.
1331 YAHOO.widget.PieChart = function(containerId, dataSource, attributes)
1333 YAHOO.widget.PieChart.superclass.constructor.call(this, "pie", containerId, dataSource, attributes);
1336 YAHOO.lang.extend(YAHOO.widget.PieChart, YAHOO.widget.Chart,
1339 * Initializes the attributes.
1341 * @method _initAttributes
1342 * @private
1344 _initAttributes: function(attributes)
1346 YAHOO.widget.PieChart.superclass._initAttributes.call(this, attributes);
1349 * @attribute dataField
1350 * @description The field in each item that corresponds to the data value.
1351 * @type String
1353 this.getAttributeConfig("dataField",
1355 method: this._getDataField
1358 this.setAttributeConfig("dataField",
1360 validator: YAHOO.lang.isString,
1361 method: this._setDataField
1365 * @attribute categoryField
1366 * @description The field in each item that corresponds to the category value.
1367 * @type String
1369 this.getAttributeConfig("categoryField",
1371 method: this._getCategoryField
1374 this.setAttributeConfig("categoryField",
1376 validator: YAHOO.lang.isString,
1377 method: this._setCategoryField
1382 * Getter for the dataField attribute.
1384 * @method _getDataField
1385 * @private
1387 _getDataField: function()
1389 return this._swf.getDataField();
1393 * Setter for the dataField attribute.
1395 * @method _setDataField
1396 * @private
1398 _setDataField: function(value)
1400 this._swf.setDataField(value);
1404 * Getter for the categoryField attribute.
1406 * @method _getCategoryField
1407 * @private
1409 _getCategoryField: function()
1411 return this._swf.getCategoryField();
1415 * Setter for the categoryField attribute.
1417 * @method _setCategoryField
1418 * @private
1420 _setCategoryField: function(value)
1422 this._swf.setCategoryField(value);
1427 * CartesianChart class for the YUI Charts widget.
1429 * @namespace YAHOO.widget
1430 * @class CartesianChart
1431 * @uses YAHOO.widget.Charts
1432 * @constructor
1433 * @param type {String} The char type. May be "line", "column", or "bar"
1434 * @param containerId {HTMLElement} Container element for the Flash Player instance.
1435 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
1436 * @param attributes {object} (optional) Object literal of configuration values.
1438 YAHOO.widget.CartesianChart = function(type, containerId, dataSource, attributes)
1440 YAHOO.widget.CartesianChart.superclass.constructor.call(this, type, containerId, dataSource, attributes);
1443 YAHOO.lang.extend(YAHOO.widget.CartesianChart, YAHOO.widget.Chart,
1446 * Stores a reference to the xAxis labelFunction created by
1447 * YAHOO.widget.FlashAdapter.createProxyFunction()
1448 * @property _xAxisLabelFunction
1449 * @type String
1450 * @private
1452 _xAxisLabelFunction: null,
1455 * Stores a reference to the yAxis labelFunction created by
1456 * YAHOO.widget.FlashAdapter.createProxyFunction()
1457 * @property _yAxisLabelFunction
1458 * @type String
1459 * @private
1461 _yAxisLabelFunction: null,
1463 destroy: function()
1465 //remove proxy functions
1466 if(this._xAxisLabelFunction)
1468 YAHOO.widget.FlashAdapter.removeProxyFunction(this._xAxisLabelFunction);
1469 this._xAxisLabelFunction = null;
1472 if(this._yAxisLabelFunction)
1474 YAHOO.widget.FlashAdapter.removeProxyFunction(this._yAxisLabelFunction);
1475 this._yAxisLabelFunction = null;
1478 //call last
1479 YAHOO.widget.CartesianChart.superclass.destroy.call(this);
1483 * Initializes the attributes.
1485 * @method _initAttributes
1486 * @private
1488 _initAttributes: function(attributes)
1490 YAHOO.widget.CartesianChart.superclass._initAttributes.call(this, attributes);
1493 * @attribute xField
1494 * @description The field in each item that corresponds to a value on the x axis.
1495 * @type String
1497 this.getAttributeConfig("xField",
1499 method: this._getXField
1502 this.setAttributeConfig("xField",
1504 validator: YAHOO.lang.isString,
1505 method: this._setXField
1509 * @attribute yField
1510 * @description The field in each item that corresponds to a value on the x axis.
1511 * @type String
1513 this.getAttributeConfig("yField",
1515 method: this._getYField
1518 this.setAttributeConfig("yField",
1520 validator: YAHOO.lang.isString,
1521 method: this._setYField
1525 * @attribute xAxis
1526 * @description A custom configuration for the horizontal x axis.
1527 * @type Axis
1529 this.setAttributeConfig("xAxis",
1531 method: this._setXAxis
1535 * @attribute yAxis
1536 * @description A custom configuration for the vertical y axis.
1537 * @type Axis
1539 this.setAttributeConfig("yAxis",
1541 method: this._setYAxis
1546 * Getter for the xField attribute.
1548 * @method _getXField
1549 * @private
1551 _getXField: function()
1553 return this._swf.getHorizontalField();
1557 * Setter for the xField attribute.
1559 * @method _setXField
1560 * @private
1562 _setXField: function(value)
1564 this._swf.setHorizontalField(value);
1568 * Getter for the yField attribute.
1570 * @method _getYField
1571 * @private
1573 _getYField: function()
1575 return this._swf.getVerticalField();
1579 * Setter for the yField attribute.
1581 * @method _setYField
1582 * @private
1584 _setYField: function(value)
1586 this._swf.setVerticalField(value);
1590 * Setter for the xAxis attribute.
1592 * @method _setXAxis
1593 * @private
1595 _setXAxis: function(value)
1597 if(this._xAxisLabelFunction)
1599 YAHOO.widget.FlashAdapter.removeProxyFunction(this._xAxisLabelFunction);
1602 if(value.labelFunction && typeof value.labelFunction == "function")
1604 value.labelFunction = YAHOO.widget.FlashAdapter.createProxyFunction(value);
1605 this._xAxisLabelFunction = value.labelFunction;
1607 this._swf.setHorizontalAxis(value);
1611 * Getter for the yAxis attribute.
1613 * @method _setYAxis
1614 * @private
1616 _setYAxis: function(value)
1618 if(this._yAxisLabelFunction)
1620 YAHOO.widget.FlashAdapter.removeProxyFunction(this._yAxisLabelFunction);
1623 if(value.labelFunction && typeof value.labelFunction == "function")
1625 value.labelFunction = YAHOO.widget.FlashAdapter.createProxyFunction(value.labelFunction);
1626 this._yAxisLabelFunction = value.labelFunction;
1628 this._swf.setVerticalAxis(value);
1633 * LineChart class for the YUI Charts widget.
1635 * @namespace YAHOO.widget
1636 * @class LineChart
1637 * @uses YAHOO.widget.CartesianChart
1638 * @constructor
1639 * @param containerId {HTMLElement} Container element for the Flash Player instance.
1640 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
1641 * @param attributes {object} (optional) Object literal of configuration values.
1643 YAHOO.widget.LineChart = function(containerId, dataSource, attributes)
1645 YAHOO.widget.LineChart.superclass.constructor.call(this, "line", containerId, dataSource, attributes);
1648 YAHOO.lang.extend(YAHOO.widget.LineChart, YAHOO.widget.CartesianChart);
1651 * ColumnChart class for the YUI Charts widget.
1653 * @namespace YAHOO.widget
1654 * @class ColumnChart
1655 * @uses YAHOO.widget.CartesianChart
1656 * @constructor
1657 * @param containerId {HTMLElement} Container element for the Flash Player instance.
1658 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
1659 * @param attributes {object} (optional) Object literal of configuration values.
1661 YAHOO.widget.ColumnChart = function(containerId, dataSource, attributes)
1663 YAHOO.widget.ColumnChart.superclass.constructor.call(this, "column", containerId, dataSource, attributes);
1666 YAHOO.lang.extend(YAHOO.widget.ColumnChart, YAHOO.widget.CartesianChart);
1669 * BarChart class for the YUI Charts widget.
1671 * @namespace YAHOO.widget
1672 * @class BarChart
1673 * @uses YAHOO.widget.CartesianChart
1674 * @constructor
1675 * @param containerId {HTMLElement} Container element for the Flash Player instance.
1676 * @param dataSource {YAHOO.util.DataSource} DataSource instance.
1677 * @param attributes {object} (optional) Object literal of configuration values.
1679 YAHOO.widget.BarChart = function(containerId, dataSource, attributes)
1681 YAHOO.widget.BarChart.superclass.constructor.call(this, "bar", containerId, dataSource, attributes);
1684 YAHOO.lang.extend(YAHOO.widget.BarChart, YAHOO.widget.CartesianChart);
1687 * Defines a CartesianChart's vertical or horizontal axis.
1689 * @namespace YAHOO.widget
1690 * @class Axis
1691 * @constructor
1693 YAHOO.widget.Axis = function()
1697 YAHOO.widget.Axis.prototype =
1700 * The type of axis.
1702 * @property type
1703 * @type String
1705 type: null,
1708 * The direction in which the axis is drawn. May be "horizontal" or "vertical".
1710 * @property orientation
1711 * @type String
1713 orientation: "horizontal",
1716 * If true, the items on the axis will be drawn in opposite direction.
1718 * @property reverse
1719 * @type Boolean
1721 reverse: false,
1724 * A string reference to the globally-accessible function that may be called to
1725 * determine each of the label values for this axis.
1727 * @property labelFunction
1728 * @type String
1730 labelFunction: null,
1733 * If true, labels that overlap previously drawn labels on the axis will be hidden.
1735 * @property hideOverlappingLabels
1736 * @type Boolean
1738 hideOverlappingLabels: true
1742 * A type of axis whose units are measured in numeric values.
1744 * @namespace YAHOO.widget
1745 * @class NumericAxis
1746 * @constructor
1748 YAHOO.widget.NumericAxis = function()
1750 YAHOO.widget.NumericAxis.superclass.constructor.call(this);
1753 YAHOO.lang.extend(YAHOO.widget.NumericAxis, YAHOO.widget.Axis,
1755 type: "numeric",
1758 * The minimum value drawn by the axis. If not set explicitly, the axis minimum
1759 * will be calculated automatically.
1761 * @property minimum
1762 * @type Number
1764 minimum: NaN,
1767 * The maximum value drawn by the axis. If not set explicitly, the axis maximum
1768 * will be calculated automatically.
1770 * @property maximum
1771 * @type Number
1773 maximum: NaN,
1776 * The spacing between major intervals on this axis.
1778 * @property majorUnit
1779 * @type Number
1781 majorUnit: NaN,
1784 * The spacing between minor intervals on this axis.
1786 * @property minorUnit
1787 * @type Number
1789 minorUnit: NaN,
1792 * If true, the labels, ticks, gridlines, and other objects will snap to
1793 * the nearest major or minor unit. If false, their position will be based
1794 * on the minimum value.
1796 * @property snapToUnits
1797 * @type Boolean
1799 snapToUnits: true,
1802 * If true, and the bounds are calculated automatically, either the minimum or
1803 * maximum will be set to zero.
1805 * @property alwaysShowZero
1806 * @type Boolean
1808 alwaysShowZero: true,
1811 * The scaling algorithm to use on this axis. May be "linear" or "logarithmic".
1813 * @property scale
1814 * @type String
1816 scale: "linear"
1820 * A type of axis whose units are measured in time-based values.
1822 * @namespace YAHOO.widget
1823 * @class TimeAxis
1824 * @constructor
1826 YAHOO.widget.TimeAxis = function()
1828 YAHOO.widget.TimeAxis.superclass.constructor.call(this);
1831 YAHOO.lang.extend(YAHOO.widget.TimeAxis, YAHOO.widget.Axis,
1833 type: "time",
1836 * The minimum value drawn by the axis. If not set explicitly, the axis minimum
1837 * will be calculated automatically.
1839 * @property minimum
1840 * @type Date
1842 minimum: null,
1845 * The maximum value drawn by the axis. If not set explicitly, the axis maximum
1846 * will be calculated automatically.
1848 * @property maximum
1849 * @type Number
1851 maximum: null,
1854 * The spacing between major intervals on this axis.
1856 * @property majorUnit
1857 * @type Number
1859 majorUnit: NaN,
1862 * The time unit used by the majorUnit.
1864 * @property majorTimeUnit
1865 * @type String
1867 majorTimeUnit: null,
1870 * The spacing between minor intervals on this axis.
1872 * @property majorUnit
1873 * @type Number
1875 minorUnit: NaN,
1878 * The time unit used by the minorUnit.
1880 * @property majorTimeUnit
1881 * @type String
1883 minorTimeUnit: null,
1886 * If true, the labels, ticks, gridlines, and other objects will snap to
1887 * the nearest major or minor unit. If false, their position will be based
1888 * on the minimum value.
1890 * @property snapToUnits
1891 * @type Boolean
1893 snapToUnits: true
1897 * A type of axis that displays items in categories.
1899 * @namespace YAHOO.widget
1900 * @class CategoryAxis
1901 * @constructor
1903 YAHOO.widget.CategoryAxis = function()
1905 YAHOO.widget.CategoryAxis.superclass.constructor.call(this);
1908 YAHOO.lang.extend(YAHOO.widget.CategoryAxis, YAHOO.widget.Axis,
1910 type: "category",
1913 * A list of category names to display along this axis.
1915 * @property categoryNames
1916 * @type Array
1918 categoryNames: null
1922 * Series class for the YUI Charts widget.
1924 * @namespace YAHOO.widget
1925 * @class Series
1926 * @constructor
1928 YAHOO.widget.Series = function() {};
1930 YAHOO.widget.Series.prototype =
1933 * The type of series.
1935 * @property type
1936 * @type String
1938 type: null,
1941 * The human-readable name of the series.
1943 * @property displayName
1944 * @type String
1946 displayName: null
1950 * CartesianSeries class for the YUI Charts widget.
1952 * @namespace YAHOO.widget
1953 * @class CartesianSeries
1954 * @constructor
1956 YAHOO.widget.CartesianSeries = function()
1958 YAHOO.widget.CartesianSeries.superclass.constructor.call(this);
1961 YAHOO.lang.extend(YAHOO.widget.CartesianSeries, YAHOO.widget.Series,
1964 * The field used to access the x-axis value from the items from the data source.
1966 * @property xField
1967 * @type String
1969 xField: null,
1972 * The field used to access the y-axis value from the items from the data source.
1974 * @property yField
1975 * @type String
1977 yField: null
1981 * ColumnSeries class for the YUI Charts widget.
1983 * @namespace YAHOO.widget
1984 * @class ColumnSeries
1985 * @constructor
1987 YAHOO.widget.ColumnSeries = function()
1989 YAHOO.widget.ColumnSeries.superclass.constructor.call(this);
1992 YAHOO.lang.extend(YAHOO.widget.ColumnSeries, YAHOO.widget.CartesianSeries,
1994 type: "column"
1998 * LineSeries class for the YUI Charts widget.
2000 * @namespace YAHOO.widget
2001 * @class LineSeries
2002 * @constructor
2004 YAHOO.widget.LineSeries = function()
2006 YAHOO.widget.LineSeries.superclass.constructor.call(this);
2009 YAHOO.lang.extend(YAHOO.widget.LineSeries, YAHOO.widget.CartesianSeries,
2011 type: "line"
2016 * BarSeries class for the YUI Charts widget.
2018 * @namespace YAHOO.widget
2019 * @class BarSeries
2020 * @constructor
2022 YAHOO.widget.BarSeries = function()
2024 YAHOO.widget.BarSeries.superclass.constructor.call(this);
2027 YAHOO.lang.extend(YAHOO.widget.BarSeries, YAHOO.widget.CartesianSeries,
2029 type: "bar"
2034 * PieSeries class for the YUI Charts widget.
2036 * @namespace YAHOO.widget
2037 * @class PieSeries
2038 * @constructor
2040 YAHOO.widget.PieSeries = function()
2042 YAHOO.widget.PieSeries.superclass.constructor.call(this);
2045 YAHOO.lang.extend(YAHOO.widget.PieSeries, YAHOO.widget.Series,
2047 type: "pie",
2048 dataField: null,
2049 categoryField: null
2052 YAHOO.register("charts", YAHOO.widget.Chart, {version: "2.5.2", build: "1076"});