Skip to content
Snippets Groups Projects
Commit 15862675 authored by srosse's avatar srosse
Browse files

OO-1093: calculate the max value instead of the hard coded one

parent 726ed127
No related branches found
No related tags found
No related merge requests found
...@@ -605,9 +605,12 @@ ...@@ -605,9 +605,12 @@
height = placeholderheight - margin.top - margin.bottom; height = placeholderheight - margin.top - margin.bottom;
var cut = settings.cut; var cut = settings.cut;
var maxScore = d3.max(values, function(d) { return d; });
if(maxScore < 1.0) {
maxScore = 1.0;
}
var x = d3.scale.linear() var x = d3.scale.linear()
.domain([0, 3.0]) .domain([0, maxScore])
.range([0, width]); .range([0, width]);
var data = d3.layout.histogram() var data = d3.layout.histogram()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment