var maxValue = axis.initialTopValue + unitsDragged;
var minValue = maxValue - axis.dragValueRange;
if (axis.logscale) {
- axis.valueWindow = [ Math.pow(10, minValue), Math.pow(10, maxValue) ];
+ axis.valueWindow = [ Math.pow(Dygraph.LOG_SCALE, minValue),
+ Math.pow(Dygraph.LOG_SCALE, maxValue) ];
} else {
axis.valueWindow = [ minValue, maxValue ];
}
idx = i;
}
if (idx >= 0) lastx = points[idx].xval;
- // Check that you can really highlight the last day's data
- var last = points[points.length-1];
- if (last != null && canvasx > last.canvasx)
- lastx = points[points.length-1].xval;
// Extract the points we've selected
this.selPoints_ = [];
// This is a list of human-friendly values at which to show tick marks on a log
// scale. It is k * 10^n, where k=1..9 and n=-39..+39, so:
// ..., 1, 2, 3, 4, 5, ..., 9, 10, 20, 30, ..., 90, 100, 200, 300, ...
+// NOTE: this assumes that Dygraph.LOG_SCALE = 10.
Dygraph.PREFERRED_LOG_TICK_VALUES = function() {
var vals = [];
for (var power = -39; power <= 39; power++) {
}
return Dygraph.binarySearch(val, arry, abs, mid + 1, high);
}
-}
+};
/**
* Add ticks when the x axis has numbers on it (instead of dates)
* number of axes, rolling averages, etc.
*/
Dygraph.prototype.predraw_ = function() {
- // TODO(danvk): movabilitye more computations out of drawGraph_ and into here.
+ // TODO(danvk): move more computations out of drawGraph_ and into here.
this.computeYAxes_();
// Create a new plotter.