This is from a SM clustered bar chart today. I found specifying the number of ticks I wanted on the x axis frustrating, as D3 rounds a bit too nicely at times. I tweaked my config to accept the following options, and the script accordingly:
// Specify tick values myself, or automate with d3
"xTicksMethod": "specified", // either "specified" for actualXTicks, or "auto" for "xAxisTicks", which d3 calculates.
// set the specific ticks I want to show
"actualXTicks": {
"sm": [-25, 0, 25, 50],
"md": [-25, 0, 25, 50],
"lg": [-25, 0, 25, 50],
},
// or D3 generates this number of ticks:
"xAxisTicks": {
"sm": 4,
"md": 4,
"lg": 4
},
This is from a SM clustered bar chart today. I found specifying the number of ticks I wanted on the x axis frustrating, as D3 rounds a bit too nicely at times. I tweaked my config to accept the following options, and the script accordingly:
Would we want to adopt this more broadly for band / numeric axes?