Closed mikima closed 2 years ago
nice solution is to use
.tickValues(xScale.ticks(1).concat(xScale.domain()))
a possible solution is to add the ability to override the automatic settings and set manually the amount of ticks. There are few issues (below the video)
https://user-images.githubusercontent.com/907536/115743440-f91dd780-a391-11eb-85ae-23d985e7a0e5.mp4
Issues (@giorgiouboldi feedbacks are welcome):
Very very nice. I understand that in some cases the input and the result are not clear but it's quite difficult to think a different way to do it. There is nothing made especially for dates so that you can select the unit (days,months,years,etc)?
no it's not possible (in a simple way) to define the unit for dates. It's possible to provide the array of values you want to show on the axis, but i think it would become too complex.
Does it make sense to put these options in an "Axes" group as in the video?
We could expose the
ticks
value, see https://observablehq.com/@d3/axis-ticks