public/javascripts/yui/charts/charts.js
function(request, response, error)
	{
		if(this._swf)
		{
			if(error)
			{
			}
			else
			{
				var i;
				if(this._seriesFunctions)
				{
					var count = this._seriesFunctions.length;
					for(i = 0; i < count; i++)
					{
						YAHOO.widget.Chart.removeProxyFunction(this._seriesFunctions[i]);
					}
					this._seriesFunctions = null;
				}
				this._seriesFunctions = [];

				//make a copy of the series definitions so that we aren't
				//editing them directly.
				var dataProvider = [];	
				var seriesCount = 0;
				var currentSeries = null;
				if(this._seriesDefs !== null)
				{
					seriesCount = this._seriesDefs.length;
					for(i = 0; i < seriesCount; i++)
					{
						currentSeries = this._seriesDefs[i];
						var clonedSeries = {};
						for(var prop in currentSeries)
						{
							if(YAHOO.lang.hasOwnProperty(currentSeries, prop))
							{
								if(prop == "style")
								{
									if(currentSeries.style !== null)
									{
										clonedSeries.style = YAHOO.lang.JSON.stringify(currentSeries.style);
									}
								}

								else if(prop == "labelFunction")
								{
									if(currentSeries.labelFunction !== null)
									{	
										clonedSeries.labelFunction = YAHOO.widget.Chart.getFunctionReference(currentSeries.labelFunction);
										this._seriesFunctions.push(clonedSeries.labelFunction);
									}
								}

								else if(prop == "dataTipFunction")
								{
									if(currentSeries.dataTipFunction !== null)
									{
										clonedSeries.dataTipFunction = YAHOO.widget.Chart.getFunctionReference(currentSeries.dataTipFunction);
										this._seriesFunctions.push(clonedSeries.dataTipFunction);
									}	
								}
								
								else if(prop == "legendLabelFunction")
								{
									if(currentSeries.legendLabelFunction !== null)
									{
										clonedSeries.legendLabelFunction = YAHOO.widget.Chart.getFunctionReference(currentSeries.legendLabelFunction);
										this._seriesFunctions.push(clonedSeries.legendLabelFunction); 
									}	
								}								

								else
								{
									clonedSeries[prop] = currentSeries[prop];
								}
							}
						}
						dataProvider.push(clonedSeries);
					}
				}

				if(seriesCount > 0)
				{
					for(i = 0; i < seriesCount; i++)
					{
						currentSeries = dataProvider[i];
						if(!currentSeries.type)
						{
							currentSeries.type = this._type;
						}
						currentSeries.dataProvider = response.results;
					}
				}
				else
				{
					var series = {type: this._type, dataProvider: response.results};
					dataProvider.push(series);
				}
				try
				{
					if(this._swf.setDataProvider) this._swf.setDataProvider(dataProvider);
				}
				catch(e)
				{
					this._swf.setDataProvider(dataProvider);
				}
			}
		}
	}
function(request, response, error)
	{
		if(this._swf)
		{
			if(error)
			{
			}
			else
			{
				var i;
				if(this._seriesFunctions)
				{
					var count = this._seriesFunctions.length;
					for(i = 0; i < count; i++)
					{
						YAHOO.widget.Chart.removeProxyFunction(this._seriesFunctions[i]);
					}
					this._seriesFunctions = null;
				}
				this._seriesFunctions = [];

				//make a copy of the series definitions so that we aren't
				//editing them directly.
				var dataProvider = [];	
				var seriesCount = 0;
				var currentSeries = null;
				if(this._seriesDefs !== null)
				{
					seriesCount = this._seriesDefs.length;
					for(i = 0; i < seriesCount; i++)
					{
						currentSeries = this._seriesDefs[i];
						var clonedSeries = {};
						for(var prop in currentSeries)
						{
							if(YAHOO.lang.hasOwnProperty(currentSeries, prop))
							{
								if(prop == "style")
								{
									if(currentSeries.style !== null)
									{
										clonedSeries.style = YAHOO.lang.JSON.stringify(currentSeries.style);
									}
								}

								else if(prop == "labelFunction")
								{
									if(currentSeries.labelFunction !== null)
									{	
										clonedSeries.labelFunction = YAHOO.widget.Chart.getFunctionReference(currentSeries.labelFunction);
										this._seriesFunctions.push(clonedSeries.labelFunction);
									}
								}

								else if(prop == "dataTipFunction")
								{
									if(currentSeries.dataTipFunction !== null)
									{
										clonedSeries.dataTipFunction = YAHOO.widget.Chart.getFunctionReference(currentSeries.dataTipFunction);
										this._seriesFunctions.push(clonedSeries.dataTipFunction);
									}	
								}
								
								else if(prop == "legendLabelFunction")
								{
									if(currentSeries.legendLabelFunction !== null)
									{
										clonedSeries.legendLabelFunction = YAHOO.widget.Chart.getFunctionReference(currentSeries.legendLabelFunction);
										this._seriesFunctions.push(clonedSeries.legendLabelFunction); 
									}	
								}								

								else
								{
									clonedSeries[prop] = currentSeries[prop];
								}
							}
						}
						dataProvider.push(clonedSeries);
					}
				}

				if(seriesCount > 0)
				{
					for(i = 0; i < seriesCount; i++)
					{
						currentSeries = dataProvider[i];
						if(!currentSeries.type)
						{
							currentSeries.type = this._type;
						}
						currentSeries.dataProvider = response.results;
					}
				}
				else
				{
					var series = {type: this._type, dataProvider: response.results};
					dataProvider.push(series);
				}
				try
				{
					if(this._swf.setDataProvider) this._swf.setDataProvider(dataProvider);
				}
				catch(e)
				{
					this._swf.setDataProvider(dataProvider);
				}
			}
		}
	}
function ( request , response , error ) { if ( this . _swf ) { if ( error ) { } else { var i ; if ( this . _seriesFunctions ) { var count = this . _seriesFunctions . length ; for ( i = 0 ; i < count ; i ++ ) { YAHOO . widget . Chart . removeProxyFunction ( this . _seriesFunctions [ i ] ) ; } this . _seriesFunctions = null ; } this . _seriesFunctions = [ ] ; //make a copy of the series definitions so that we aren't //editing them directly. var dataProvider = [ ] ; var seriesCount = 0 ; var currentSeries = null ; if ( this . _seriesDefs !== null ) { seriesCount = this . _seriesDefs . length ; for ( i = 0 ; i < seriesCount ; i ++ ) { currentSeries = this . _seriesDefs [ i ] ; var clonedSeries = { } ; for ( var prop in currentSeries ) { if ( YAHOO . lang . hasOwnProperty ( currentSeries , prop ) ) { if ( prop == "style" ) { if ( currentSeries . style !== null ) { clonedSeries . style = YAHOO . lang . JSON . stringify ( currentSeries . style ) ; } } else if ( prop == "labelFunction" ) { if ( currentSeries . labelFunction !== null ) { clonedSeries . labelFunction = YAHOO . widget . Chart . getFunctionReference ( currentSeries . labelFunction ) ; this . _seriesFunctions . push ( clonedSeries . labelFunction ) ; } } else if ( prop == "dataTipFunction" ) { if ( currentSeries . dataTipFunction !== null ) { clonedSeries . dataTipFunction = YAHOO . widget . Chart . getFunctionReference ( currentSeries . dataTipFunction ) ; this . _seriesFunctions . push ( clonedSeries . dataTipFunction ) ; } } else if ( prop == "legendLabelFunction" ) { if ( currentSeries . legendLabelFunction !== null ) { clonedSeries . legendLabelFunction = YAHOO . widget . Chart . getFunctionReference ( currentSeries . legendLabelFunction ) ; this . _seriesFunctions . push ( clonedSeries . legendLabelFunction ) ; } } else { clonedSeries [ prop ] = currentSeries [ prop ] ; } } } dataProvider . push ( clonedSeries ) ; } } if ( seriesCount > 0 ) { for ( i = 0 ; i < seriesCount ; i ++ ) { currentSeries = dataProvider [ i ] ; if ( ! currentSeries . type ) { currentSeries . type = this . _type ; } currentSeries . dataProvider = response . results ; } } else { var series = { type : this . _type , dataProvider : response . results } ; dataProvider . push ( series ) ; } try { if ( this . _swf . setDataProvider ) this . _swf . setDataProvider ( dataProvider ) ; } catch ( e ) { this . _swf . setDataProvider ( dataProvider ) ; } } } }
Called when the DataSource receives new data. The series definitions are used
to build a data provider for the SWF chart.

@method _loadDataHandler
@private
Called when the DataSource receives new data . The series definitions are used to build a data provider for the SWF chart .