I have successfully created a chart, but I am struggling to add numbers to the columns. Currently, the numbers only appear when I hover over the columns. I have tried various approaches:
svg.selectAll("text").
data(data).
enter().
append("svg:text").
attr("x", function(datum, index) { return x(index) + barWidth; }).
attr("y", function(datum) { return height - y(datum.days); }).
attr("dx", -barWidth/2).
attr("dy", "1.2em").
attr("text-anchor", "middle").
text(function(datum) { return datum.days;}).
attr("fill", "white");
Here is the link to my example: https://jsfiddle.net/rinatoptimus/db98bzyk/5/