Closed kradical closed 5 years ago
@kradical Thanks for the issue and the PR as well. This is related to #346 and #370 as well right?
I believe this would fix #346 but not #370. It is somewhat related though in that re-rendering when props change is a common issue people have with the YAxis component. Thanks for your prompt reply.
PR merged!
🐛Bug report
Hello again! I'm back with another bug for the YAxis component :stuck_out_tongue: . Thanks a ton for this project, we really enjoy it where I work. Thankfully I am here with a fix for the bug as well!
PR: https://github.com/esnet/react-timeseries-charts/pull/372
Describe the bug Basically when the tickCount prop changes on a YAxis component the component doesn't rerender properly. This is because in constructing the axis the generate function uses the old prop values instead of the new "nextProp" values.
To Reproduce Steps to reproduce the behavior:
Expected behavior It should render the axis correctly.
Screenshots On first render:
After changing tickCount/min/max:
![screenshot from 2019-02-12 22-34-52](https://user-images.githubusercontent.com/9980985/52689189-8ba2d080-2f16-11e9-81cd-2f97ba8475e4.png)
See PR for fixed screenshots.
Desktop (please complete the following information):
Additional context https://github.com/esnet/react-timeseries-charts/pull/372