Commit e34f85be authored by Marc Duez's avatar Marc Duez
Browse files

graph.js : adjust scale for data normalization not with the expected max value...

graph.js : adjust scale for data normalization not with the expected max value but with the true max_value
parent ca488208
......@@ -759,8 +759,18 @@ Graph.prototype = {
* */
initOrdinateClones : function () {
var max = this.m.precision*this.m.max_size
var max = 0;
//get ready for something really dirty
if (this.m.norm && this.m.normalization.method == "constant"){
for (var i=0; i<this.m.samples.order.length; i++) {
for (var j=0; j<this.m.clones.length; j++){
var size = this.m.precision*100*this.m.clone(j).getSize()
if (size>max) max=size;
}
}
}else{
max = this.m.precision*this.m.max_size
}
this.scale_x = d3.scale.log()
.domain([1, max])
......
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