How can I add different colors to bar in Column chart

后端 未结 2 1022
遇见更好的自我
遇见更好的自我 2021-01-19 18:27

How can i add different colors to Bars in Column chart. Adding colors field in option is not working. Please help.

Below is the code snippet:

tdata.a         


        
2条回答
  •  旧时难觅i
    2021-01-19 18:43

    This is answer according to google document, use color property instead of background color.

    var options = {   width: 400,   height: 240,   title: 'Toppings I Like On My Pizza',   colors: ['#e0440e', '#e6693e', '#ec8f6e', '#f3b49f', '#f6c7b6'] };
    
    chart.draw(data, options);
    

    you can find more here

提交回复
热议问题