Commit 797697b7 authored by olau@iola.dk's avatar olau@iola.dk

Fixed a bug with respecting min/max on partially invalid points, added some missing semicolons


git-svn-id: https://flot.googlecode.com/svn/trunk@199 1e0a6537-2640-0410-bfb7-f154510ff394
parent 78630ef9
......@@ -359,8 +359,8 @@
if (!format) {
format = []
// find out how to copy
format.push({ x: true, number: true, required: true })
format.push({ y: true, number: true, required: true })
format.push({ x: true, number: true, required: true });
format.push({ y: true, number: true, required: true });
if (s.bars.show)
format.push({ y: true, number: true, required: false, defaultValue: 0 });
......@@ -397,15 +397,8 @@
}
if (val == null) {
if (f.required) {
// extract min/max info before we whack it
if (f.x)
updateAxis(s.xaxis, val, val)
if (f.y)
updateAxis(s.yaxis, val, val)
val = null;
if (f.required)
nullify = true;
}
if (f.defaultValue != null)
val = f.defaultValue;
......@@ -417,9 +410,19 @@
}
if (nullify) {
for (m = 0; m < ps; ++m)
for (m = 0; m < ps; ++m) {
val = points[k + m];
if (val != null) {
f = format[m];
// extract min/max info
if (f.x)
updateAxis(s.xaxis, val, val);
if (f.y)
updateAxis(s.yaxis, val, val);
}
points[k + m] = null;
}
}
else {
// a little bit of line specific stuff that
// perhaps shouldn't be here, but lacking
......@@ -442,6 +445,7 @@
}
}
// give the hooks a chance to run
for (i = 0; i < series.length; ++i) {
s = series[i];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment