display only the month in d3 code example
Example: display only the month in d3
var svg = d3.select("body")
.append("svg")
.attr("width", 500)
.attr("height", 100)
var xScale = d3.scaleTime()
.domain([new Date("2014-01-01"), new Date("2016-01-01")])
.range([0, 450]);
var xAxis = d3.axisBottom(xScale)
.tickFormat(d3.timeFormat("%b"));
svg.append("g")
.call(xAxis);