Line xScale with time type not adding ticks as expected
See original GitHub issueDescribe/explain the bug
When using <Line xScale={{ type: 'time', precision: 'day' }} />
the ticks on the x axis are added in weird positions. I have set the axisBottom tickValues to be the length of my data array which may be an issue but even if I change it to be 10 the ticks are still in strange positions.
In the example below I have 2 values that I want to plot on the graph. Despite being 3 days apart, even if I set the tickValues to be 10 I appear to get duplicate ticks but no tick on the last result in the data.
To Reproduce https://codesandbox.io/embed/mystifying-banzai-hfgie
Expected behavior I would always expect the values provided in my data to have a tick (my array is already pre-filtered so it will only ever deliver one score per day).
In the example provided I would expect there to be a Aug 02
tick.
Desktop (please complete the following information):
- OS: Mac OSX
- Browser: Chrome
- Version: 75
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top GitHub Comments
I always have to add
useUTC: false
to thexScale
and it does seem to fix it in this case as well.Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!