I have a bar chart with ordinal scale for the x-axis. I want to display the y-values on the top of each bar or in the bottom of each bar. It would be also acceptable to disp
If you use a specialized valueAccessor with a chart, you can make the following substitution in dimirc's "D3-ish way" solution.
Change
.text(function(d){ return d3.select(d).data()[0].data.value })
To
.text(function(d){ return chart.valueAccessor()(d3.select(d).data()[0].data) });