I have the same question with it
When use the same value in yAxis
,the plots line at the bottom
This is my code:
var data = [
The problem is that you're setting the input domain of your ranges using d3.extent
. If all the values are the same, everything is going to map to a 0 y coordinate. To start the y scale at 0, replace
y.domain(d3.extent(data, function (d) {
return d.roundTripTime;
}));
with
y.domain([0, d3.max(data, function (d) {
return d.roundTripTime;
})]);