self.dateWindow_ = [minDate, maxDate];
- // y-axis scaling is automatic unless a valueRange is defiend or
- // if the user zooms in on the y-axis. If neither is true, valueWindow
+ // y-axis scaling is automatic unless a valueRange is defined or
+ // if the user zooms in on the y-axis. If neither is true, valueWindow_
// will be null.
if (self.valueWindow_) {
var maxValue = draggingValue + (dragEndY / self.height_) * valueRange;
*/
Dygraph.prototype.updateOptions = function(attrs) {
// TODO(danvk): this is a mess. Rethink this function.
- if (attrs.rollPeriod) {
+ if ('rollPeriod' in attrs) {
this.rollPeriod_ = attrs.rollPeriod;
}
- if (attrs.dateWindow) {
+ if ('dateWindow' in attrs) {
this.dateWindow_ = attrs.dateWindow;
}
- if (attrs.valueRange) {
+ if ('valueRange' in attrs) {
this.valueRange_ = attrs.valueRange;
+ this.valueWindow_ = attrs.valueRange;
}
// TODO(danvk): validate per-series options.