-
Notifications
You must be signed in to change notification settings - Fork 108
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
Donut Chart invisible until after HMR #453
Comments
Discovered it can be fixed by adding [] around series in donut chart options. However, why does HMR make it work, if the series was the wrong structure? That's quite odd. Also there is no error message at all about the problem, took about a day to discover. |
Hello menasheh, Thanks for contacting us! In general, defininig series as an array of objects is the only supported way to create a chart, and you should stick to that. The reason for this is that you can create many series. Feel free to explore the series as a definition and in our API. I debugged your code, and it seems the rerender causes the correct chart's load. I think the reason for this behavior is that on the first render, the chart instance is created, and Highcharts handles the incorrect series format, but the chart isn't rendered at some point. Then, having the correctly formatted data, the chart is rendered after the rerender occurs. I agree that if there's any error, the information should be returned to avoid misleading. Therefore, it would be reasonable to add such a statement, and feel free to report it here. Note that the error handling functionality currently exists, and you can test it, e.g., by defining a wrong series type. Kind Regards! |
Closed due to inactivity. |
Highcharts seems to show an empty chart until you edit main.jsx. Saving with an extra space is enough to trigger the chart to load, but by default it won't load.
Minimal repro:
highcharts-issue.zip
The text was updated successfully, but these errors were encountered: