Commit 53d914d6 authored by Mikaël Salson's avatar Mikaël Salson
Browse files

scatterPlot.js: Round plotted values

If floats are not rounded, the bar plot is awful.
parent 3b0c7af6
......@@ -754,6 +754,8 @@ ScatterPlot.prototype = {
}
}
}
min = Math.floor(min)
max = Math.ceil(max)
console.log("min : " + min)
console.log("max : " + max)
for (var i=min; i<=max; i++){
......@@ -775,6 +777,8 @@ ScatterPlot.prototype = {
var v;
try{
var v = fct(i);
if (typeof v == 'number')
v = Math.round(v)
}catch(e){}
if (typeof v == "undefined" || typeof this.barTab[v] == "undefined" ) {
this.barTab["?"].push(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