*/
Dygraph.prototype.doZoomXDates_ = function(minDate, maxDate) {
this.dateWindow_ = [minDate, maxDate];
+ this.zoomed_x_ = true;
this.drawGraph_();
if (this.attr_("zoomCallback")) {
- var yRange = this.yAxisRange();
- this.attr_("zoomCallback")(minDate, maxDate, yRange[0], yRange[1]);
+ this.attr_("zoomCallback")(minDate, maxDate, this.yAxisRanges());
}
};
document.getElementById("div_g"),
NoisyData, {
errorBars: true,
- zoomCallback : function(a,b,c,d) {
- showDimensions(a,b,c,d);
+ zoomCallback : function(minDate, maxDate, yRange) {
+ showDimensions(minDate, maxDate, yRange);
+ },
+ drawCallback: function(me, initial) {
+ document.getElementById("zoomed").innerHTML = "" + me.isZoomed();
+ document.getElementById("zoomedX").innerHTML = "" + me.isZoomed("x");
+ document.getElementById("zoomedY").innerHTML = "" + me.isZoomed("y");
}
}
);