[Fixed]-HighChart pie does not display any data

1πŸ‘

βœ…

The data array has incorrect format. y values must be numbers, you set them as an array.

Change series variable to:

 var series= [{
           type: 'pie',
           name: 'Group share',
           data: [{ 
       name: 'Board',   
       y: defaultData[0] },
              {
                 name: 'Member',
                 y: defaultData2[0],
                 sliced: true,
                 selected: true
              }
           ]
        }];

Or send those values as a single number instead of an array.

πŸ‘€morganfree

0πŸ‘

You look to be missing in your chart section a declaration of a pie chart.

           var chart = {
                 plotBackgroundColor: null,
                 plotBorderWidth: null,
                 plotShadow: false,
                 type: 'pie' // this is missing.
            };

Have not been able to run your code to test but fingers crossed this sorts it for you.

πŸ‘€Andy Donegan

Leave a comment