在使用echarts产生的柱状图中,有时候自动产生的颜色大不如人意,可以通过以下参数进行修改。

series : [
                            {
                                name:'天数',
                                type:'bar',
                                stack: '天',
                                data:[30, 45, 15,60,40],
                                barWidth: 30,
                                itemStyle:{
                                    normal:{
                                        color:'#4ad2ff'
                                    }
                                },
                                label:{ 
                                    normal:{ 
                                        show: true, 
                                        position: 'insideTop'} 
                                        }
                            }
                        ]

 

其中,

itemStyle:{
                                    normal:{
                                        color:'#4ad2ff'
                                    }
                                },

 

以上代码块,便可以修改柱状图颜色。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-09
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-28
  • 2022-01-07
  • 2021-10-19
  • 2022-12-23
  • 2021-09-30
相关资源
相似解决方案