Here's the Fiddle.
I've created a responsive histogram
.
And I wanted to add the data labels to it.
I tried with this code. But it didn't help me out.
svg.selectAll("text") .data(histogram) .enter() .append("text") .attr("x", function(d) { return x(d.x); }) .attr("y", function(d) { return y(d.y); }) .text(function(d) { return d; })
Please help me in solving this.
I guess I'm doing it all right.
But I don't know why the text elements aren't created yet.
Thanks in advance!!