Hi i am getting graph as above attcahment. But i want only max value of bar in d3 js
pls help...
state.selectAll("rect.text")
.data(function (d) {
return d.ages;
})
.enter().append("text")
.attr("class", "rect")
.attr("fill","blue")
.attr("text-anchor", "left")
.attr("x", function(d) { return x1(
d.name); })
.attr("y", function(d) { return y(d.value); })
.text(function(d) {
if((height -y(d.value))>0){
return ((d.value)/1000).toFixed(0);}
else { return "";};
});