Using D3.js version 4, is there a way to get an array of the values for each tick on an axis?
Edit:
From D3 documentation
# axis.tickValue
I found the answer of Mark above was not correct for my case, I changed a bit from his inspiration and it worked
// I am using d3-scale
const yScale = scaleLinear().domain(realYDomain).range([30, 170]);
// I am using d3-axis
const yAxis = axisLeft(yScale); // Not declare axisLeft(scale).ticks(number) here, but below line instead
const tickValues = yAxis.scale().ticks(5);
console.log(tickValues);