projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7e5ddc9
)
fix re-use of loop index
author
Dan Vanderkam
<danvk@google.com>
Tue, 7 Jun 2011 15:04:07 +0000
(11:04 -0400)
committer
Dan Vanderkam
<danvk@google.com>
Tue, 7 Jun 2011 15:04:07 +0000
(11:04 -0400)
dygraph.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph.js
b/dygraph.js
index
eb6b50b
..
83d4e8c
100644
(file)
--- a/
dygraph.js
+++ b/
dygraph.js
@@
-2232,7
+2232,7
@@
Dygraph.prototype.computeYAxisRanges_ = function(extremes) {
// Compute extreme values, a span and tick marks for each axis.
for (var i = 0; i < this.axes_.length; i++) {
var axis = this.axes_[i];
// Compute extreme values, a span and tick marks for each axis.
for (var i = 0; i < this.axes_.length; i++) {
var axis = this.axes_[i];
-
+
if (!seriesForAxis[i]) {
// If no series are defined or visible then use a reasonable default
axis.extremeRange = [0, 1];
if (!seriesForAxis[i]) {
// If no series are defined or visible then use a reasonable default
axis.extremeRange = [0, 1];
@@
-2313,8
+2313,8
@@
Dygraph.prototype.computeYAxisRanges_ = function(extremes) {
var p_scale = p_axis.computedValueRange[1] - p_axis.computedValueRange[0];
var scale = axis.computedValueRange[1] - axis.computedValueRange[0];
var tick_values = [];
var p_scale = p_axis.computedValueRange[1] - p_axis.computedValueRange[0];
var scale = axis.computedValueRange[1] - axis.computedValueRange[0];
var tick_values = [];
- for (var
i = 0; i < p_ticks.length; i
++) {
- var y_frac = (p_ticks[
i
].v - p_axis.computedValueRange[0]) / p_scale;
+ for (var
k = 0; k < p_ticks.length; k
++) {
+ var y_frac = (p_ticks[
k
].v - p_axis.computedValueRange[0]) / p_scale;
var y_val = axis.computedValueRange[0] + y_frac * scale;
tick_values.push(y_val);
}
var y_val = axis.computedValueRange[0] + y_frac * scale;
tick_values.push(y_val);
}
@@
-2326,7
+2326,7
@@
Dygraph.prototype.computeYAxisRanges_ = function(extremes) {
}
}
};
}
}
};
-
+
/**
* @private
* Calculates the rolling average of a data set.
/**
* @private
* Calculates the rolling average of a data set.