i wan create line chart in d3,but want show ticks every 4 months because need show ticks every point have data in chart.
i used this:
// xscale time scale obj d3.time.scale() xaxis = d3.svg.axis() .scale(xscale) .ticks(d3.time.months, 4) .orient('bottom');
ant works, ticks show 2 days after initial date in data:
it show @ 1/january/2015 when first data in 30/december/2014
how can set initial tick in specific point , set 4 months interval?
i believe d3 time scale try space dates evenly (and i'm not sure there way specify specific dates). if know dates want displayed, can use ordinal scale dates inputs.
Comments
Post a Comment