Giter VIP home page Giter VIP logo

Comments (4)

kirjs avatar kirjs commented on July 19, 2024

Hi Roland,

I actually was able to display the pieChart.
You can see an example in this branch:
https://github.com/kirjs/react-highcharts/blob/issue-17/demo/issue17/app.jsx

Are there any console errors you're getting?

from react-highcharts.

rolandsusans avatar rolandsusans commented on July 19, 2024

Hi, no, no console errors, only difference between your example and mine, is that you have hard encoded config for pie chart, in mine example, i'm getting config from ajax request, so i think that's why something is not working properly. On server side i'm using https://github.com/ghunti/HighchartsPHP.

I tested your example and it works as it's supposed to work. Will let you know about progress.

from react-highcharts.

rolandsusans avatar rolandsusans commented on July 19, 2024

Ohh, my bad. Series should bee an array
I had :

series: {
    name: "Brands",
    colorByPoint: true,
    data: [{
      name: "Microsoft Internet Explorer",
      y: 56.33
    }, {
      name: "Chrome",
      y: 24.03,
      sliced: true,
      selected: true
    }, {
      name: "Firefox",
      y: 10.38
    }, {
      name: "Safari",
      y: 4.77
    }, {
      name: "Opera",
      y: 0.91
    }, {
      name: "Proprietary or Undetectable",
      y: 0.2
    }]
  }

but now, after hard debug, i have :

series: [{
    name: "Brands",
    colorByPoint: true,
    data: [{
      name: "Microsoft Internet Explorer",
      y: 56.33
    }, {
      name: "Chrome",
      y: 24.03,
      sliced: true,
      selected: true
    }, {
      name: "Firefox",
      y: 10.38
    }, {
      name: "Safari",
      y: 4.77
    }, {
      name: "Opera",
      y: 0.91
    }, {
      name: "Proprietary or Undetectable",
      y: 0.2
    }]
  }]

Now i have my pie chart working properly.
Interesting that there was no error in console, about that series should be an array, not object.

from react-highcharts.

kirjs avatar kirjs commented on July 19, 2024

Well, glad you figured it out.

Might be worth checking with the highcharts guys on why no error is shown, but that might be consistent with the way they handle errors.

from react-highcharts.

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.