echarts
echarts copied to clipboard
map地图省份标色
能不能在map上用颜色区分各个省份(将多个省份划成一个区域,不同的区域用不同的颜色标识)
http://echarts.baidu.com/doc/example/map.html
itemStyle: {
normal: {
borderWidth:2,
borderColor:'lightgreen',
color: 'orange',
label: {
show: false
}
},
emphasis: { // 也是选中样式
borderWidth:2,
borderColor:'#fff',
color: '#32cd32',
label: {
show: true,
textStyle: {
color: '#fff'
}
}
}
},
可以利用dataRange巧妙解决。 给dataRange设置颜色种类和阈值,划分出阈值区域,然后给全国map的data设置省份及阈值即可。 最后把dataRange藏起来,哈哈~~~
恩,这也可以