Commit 1f414005 by Alexander Zobnin

heatmap-tooltip: normalize histogram Y axis

parent 581b9777
......@@ -172,8 +172,10 @@ export class HeatmapTooltip {
}
barWidth = Math.max(barWidth, 1);
// Normalize histogram Y axis
let histogramDomain = _.reduce(_.map(histogramData, d => d[1]), (sum, val) => sum + val, 0);
let histYScale = d3.scaleLinear()
.domain([0, _.max(_.map(histogramData, d => d[1]))])
.domain([0, histogramDomain])
.range([0, HISTOGRAM_HEIGHT]);
let histogram = this.tooltip.select(".heatmap-histogram")
......
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