GithubHelp home page GithubHelp logo

Comments (3)

menasheh avatar menasheh commented on August 16, 2024

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.

from highcharts-react.

KamilKubik avatar KamilKubik commented on August 16, 2024

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!

from highcharts-react.

ppotaczek avatar ppotaczek commented on August 16, 2024

Closed due to inactivity.

from highcharts-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.