How can I change the colors of my highcharts piechart?

前端 未结 8 644
不知归路
不知归路 2020-12-13 17:15

I\'m using highcharts to make a piechart but I\'m having trouble loading a custom color set for my chart.

Here is my code:

     

        
8条回答
  •  一向
    一向 (楼主)
    2020-12-13 17:49

    I think what you need to do is set the colors using theme instead of setOptions as follows:

    Highcharts.theme = {colors: ['#50B432', '#ED561B', '#DDDF00', '#24CBE5', 
                                 '#64E572', '#FF9655', '#FFF263', '#6AF9C4']});
    

提交回复
热议问题