How to convert the full month name to an abbreviated name using this function
axis.ticks(d3.time.months, 1)
this function prints the name of the month in full January February
What should I use to change it to abbreviated names.
You can add timeFormat , for example:
axis.ticks(d3.time.months, 1) .tickFormat(d3.time.format("%b"));
The accepted answer was given before the release of version d3 version 4. If you want to do the same with d3 version 4, do it like this:
axis.ticks(d3.timeMonth, 1) .tickFormat(d3.timeFormat('%b'));