Created
June 26, 2013 21:05
-
-
Save tripp/5871675 to your computer and use it in GitHub Desktop.
Temporary hack addressing issue in which a legend tries to redraw without available data.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Y.CartesianChart.prototype._dataProviderChangeHandler = function(e) { | |
var dataProvider = e.newVal, | |
axes, | |
i, | |
axis; | |
this._seriesIndex = -1; | |
this._itemIndex = -1; | |
this._drawing = true; | |
if(this instanceof Y.CartesianChart) | |
{ | |
this.set("axes", this.get("axes")); | |
this.set("seriesCollection", this.get("seriesCollection")); | |
} | |
axes = this.get("axes"); | |
this._drawing = false; | |
this._callLater = false; | |
if(axes) | |
{ | |
for(i in axes) | |
{ | |
if(axes.hasOwnProperty(i)) | |
{ | |
axis = axes[i]; | |
if(axis instanceof Y.Axis) | |
{ | |
if(axis.get("position") !== "none") | |
{ | |
this._addToAxesRenderQueue(axis); | |
} | |
axis.set("dataProvider", dataProvider); | |
} | |
} | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment