我是靠谱客的博主 欢喜烧鹅,这篇文章主要介绍Echarts 设置legend与数据不同颜色Echarts 设置legend与数据不同颜色,现在分享给大家,希望可以做个参考。

Echarts 设置legend与数据不同颜色

以柱状图为例

options: {
legend: {
data: [
{ name:'bar1',itemStyle: {color: '#000000'} },
{ name:'bar2',itemStyle: {color: '#fc5531'} }
]
},
},
series: [
{
name: 'bar1',
type: 'bar',
data: data1,
itemStyle:{
color: '#5470c6'
}
},
{
name: 'bar2',
type: 'bar',
data: data1,
itemStyle:{
color: '#91cc75'
}
}
]

最后

以上就是欢喜烧鹅最近收集整理的关于Echarts 设置legend与数据不同颜色Echarts 设置legend与数据不同颜色的全部内容,更多相关Echarts内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(88)

评论列表共有 0 条评论

立即
投稿
返回
顶部