score:1

Accepted answer

Leave a small gap between the most extreme data point and the axis. In particular, you may want the range of your domain to take the margins into account:

var xScale = d3.scale.linear()
    .domain([0, 1024])
    .range([0, width-margin.right]);

var yScale = d3.scale.linear()
    .domain([1, 768])
    .range([height, margin.bottom]);

Related Query