Closed tj closed 6 years ago
@tj, it's possible for y axes, because they use a linear scale, however if you use dates based axis (quite common) or other kind of linear ones, you won't be able to set the tick count, because for now x axis is forced to scaleBand() which does not support this :/ I've tried to make it more versatile (see this), but I'd like to add it more progressively. In order to support this, the way scales are computed for each charts must be completely changed.
Currently, I use the format method of the axis configuration to achieve this in some cases:
axisBottom={{
format: tick => (isTickWhichShouldBeHidden(tick) ? '' : tick)
...
}}
This avoids that the tick label is rendered at least. Not a real solution but it helps out in some cases.
This now available, see http://nivo.rocks/guides/axes
Hi! I was wondering if setting the tickValues property also sets the domain of the x-axis? I have a scatter plot with data points clustered around large values (all >5k) and the minimum value is stuck at 0, so all the data is getting squished over to the right. If tickValues doesn't set the domain, what option does? I've tried passing in min, minValue, and domain to xScale and bottomAxis. Thanks so much for the help!!!
First of all thanks for the awesome project!
I was wondering is it possible to set the axis tick count? This way unknown series sizes should still scale reasonably well. Right now if you plot say weeks in a year you'll have a ton of overlapping labels.
Happy to send a pull-request as well!
cheers