Struggling with creating a bar chart where the x-axis is a date. The format of my date data is "2017-01-31","2017-02-28" etc..
When I plot my data I get Jan 08, Jan 15, Jan 22..
on my x axis
var countbarChart= dc.barChart("#countbarChart");
countbarChart
.width(768)
.height(480)
.x(d3.time.scale().domain([minDate,maxDate]))
.xUnits(d3.time.months)
.elasticY(true)
.brushOn(true)
.yAxisLabel("Reports called per Month")
.dimension(dateDim)
.group(dhits)
.on('renderlet', function(chart) {
chart.selectAll('rect').on("click", function(d) {
console.log("click!", d);
});
});
Is there a way to have the x axis, and bars broken down like
Jan-17 Feb-17 ..
?