Update examples to d3.js v4

This commit is contained in:
Frederic Junod
2017-12-07 11:58:16 +01:00
parent 1a2052b2b4
commit 99a5c2d7cb
4 changed files with 10 additions and 11 deletions

View File

@@ -144,13 +144,13 @@ var chart = d3.select('#plot').append('svg')
.attr('width', barWidth * bins)
.attr('height', plotHeight);
var chartRect = chart[0][0].getBoundingClientRect();
var chartRect = chart.node().getBoundingClientRect();
var tip = d3.select(document.body).append('div')
.attr('class', 'tip');
function plot(resolution, counts, threshold) {
var yScale = d3.scale.linear()
var yScale = d3.scaleLinear()
.domain([0, d3.max(counts.values)])
.range([0, plotHeight]);