您的位置:首页 > 其它

ECharts地图颜色-选中颜色设置

2017-08-15 15:29 477 查看
1.

echarts版本

areaColor:3.0

color:2.0

option = {
tooltip: {
trigger: 'item',
formatter: '{b}'
},
series: [
{
name: '中国',
type: 'map',
mapType: 'china',
selectedMode : 'multiple',

itemStyle: {
normal: {//未选中状态
borderWidth:2,//边框大小
borderColor:'lightgreen',
areaColor: 'orange',//背景颜色
label: {
show: true//显示名称
}
},
emphasis: {// 也是选中样式
borderWidth:2,
borderColor:'#fff',
areaColor: 'red',
label: {
show: true,
textStyle: {
color: '#fff'
}
}
}
},
data:[
// {name:'广东', selected:true}
{
name:'广东',
itemStyle: {
normal: {
color: 'red',
label: {
show: true,
textStyle: {
color: '#fff',
fontSize: 15
}
}
},
emphasis: {// 也是选中样式
borderWidth:5,
borderColor:'yellow',
areaColor: '#cd5c5c',
label: {
show: true,
textStyle: {
color: 'blue'
}
}
}
},

}
]
}
]
};


1.效果图



参考网址:http://echarts.baidu.com/echarts2/doc/example/map.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  echarts3-0