I am trying to figure out d3.js. While defining the axis, How can I get custom labeling on x-axis. For example, the default labeling I get is:
|------|------|------|------|------|------|
20 30 40 50 60 70 80
Whereas, I want something like:
|------|------|------|------|------|------| ....
20 26 32 38 44 50 56
I am currently learning it and working on code (slightly modified) from official examples supplied:
var xAxis = d3.svg.axis().scale(x).tickPadding(7).orient("bottom");
var yAxis = d3.svg.axis().scale(y).tickPadding(5).orient("left");
See Question&Answers more detail:os