react-linechart
react-linechart copied to clipboard
Restrict yScale to integer values
I'm using react-linechart to plot the history of how many times an app was installed. It would be nice if I could restrict the yScale to only show ticks with integer values as opposed to ticks at 0.5 or 1.5.
That would be nice indeed. Probably you want to chain a tickFormat
method here and have something like:
const yAxisGen = d3.svg.axis().scale(yScale).orient("left").tickFormat(d3.format("d"));
Better still let the user choose a tickFormat
function prop that will give him the ability to format in whatever crazy way he wants.
PR is welcome! :)