d3.js - D3 - Make Axes Include Origin at (0,0) -
the following scatterplot example has origin @ (2, 4) truncating graph
even though range specifies zero.
.range([0, width]); .range([height, 0]);
http://bl.ocks.org/mbostock/3887118
question ----> how make origin start @ (0,0) regardless of data
similar following example:
http://bl.ocks.org/hunzy/11110940
also same range
.range([0, width]); .range([height, 0]);
y.domain([0, d3.max(data, function (d) { return d.y; })]) .nice(); x.domain([0, d3.max(data, function (d) { return d.x; })]) .nice();
Comments
Post a Comment