-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when toggling a second (opposite) Y-Axis #38
Comments
Hmm interesting, and thanks for the reproducible test case! I'll look into it, in the meantime, I think you could workaround the issue by using a <YAxis id="yAxisSecondary" title={{ text: 'Secondary' }} opposite>
<LineSeries id='secondary' data={[ 5, 4, 3, 2, 1 ]}/>
</YAxis> |
Yes. Your workaround works. Thanks. And I agree that your approach with the Title components is cleaner. Feels more idiomatic. Thanks for all the great work on this, by the way. Very handy library. |
When I make that change I end up with a "double" opposite axis (i.e. the axis title and scale appear twice) and the opposite axis title remains when I disable that series. No console errors. |
Added the modified code as a gist: https://gist.github.com/codingarmadillo/656e4a44b69fe3c48748f23d0fba0fce |
Oh dear, that's a bit rubbish. Seems the axis doesn't receive the remove function when it mounts, so it doesn't call it when it unmounts. I think the Title sub component masked this second bug as it causes an axis update, which then caused the remove prop to be properly populated. I'll investigate this urgently. |
Morning, so I've just published |
Yes, that appears to be working in the actual application too. Looks good. Thanks for your help. |
I have a second Y-Axis that I toggle on and off. After two cycles (on/off/on/off), I get a crash---every time (i.e. perfectly repeatable).
The problem seems to be with the <YAxis.Title/> component in the secondary series. If I remove that, it all works fine.
I've created a minimal App component that recreates the issue.
react-jsx-highcharts@2.0.0
highcharts@6.0.1
Stack trace is:
The text was updated successfully, but these errors were encountered: