I'm making a chart, and I want my y-axis tick labels to display as percentages (instead of decimals). How can I do this?
My current code looks something like
yAxis
.append(text)
.attr(class, ticklabel)
.attr(x, 0)
.attr(y, y)
.attr(dy, .5em)
.attr(text-anchor, middle)
.text(y.tickFormat(5))
.attr(font-size, 10px)
I noticed that d3 has a format specifier, but I'm not sure how to use these in conjunction with tickFormat
.