In an attempt to build a responsive scatter graph with d3.js, I'm using %-based coordinates in a 100% x 100%
How can I
.call(axis) and get it to layout the axis using
% and not
px values, so that they always fit the svg and the plotted data?
Do I need to manually draw the axes in this case? If so how would I get the regular tick values for each axis?
<svg width="100%" height="100%"> <g class='data'> <circle cx='1%' cy='2%' /> <circle cx='3%' cy='12%' /> <circle cx='10%' cy='24%' /> </g> <g class='axis'> <!-- is there a way to generate the axis ticks with x=% y=% ? --> </g> </svg>