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]);

does help?

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

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -