echarts地图,需要省份颜色显示五种颜色,同一色系深浅不同。不是太懂echarts。。
楼主是要 http://gallery.echartsjs.com/editor.html?c=christmas-world-celebrating 类似这样的?还是类似http://echarts.baidu.com/demo.html#map-china-dataRange 这样的?还是楼上说的那种? 自定义的基本思路就是该series里的 itemStyle---normal---color,而color可以用设定有很多种,稍微复杂一点可以这样:
new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(178, 34,34, 1)'
}, {
offset: 1,
color: 'rgba(178, 34,34, 0.1)'
}]);
http://www.cnblogs.com/wwlhome/p/4607905.html
dataRange 里面有一个Color 数组直接把颜色配置上就可以了
如果 是echarts3 option 中 增加
visualMap: {
min: 100,
max: 1500,
left:'left',
top:'bottom',
calculable : true,
text: ['高','低'],
inRange: {
color: ['#E0022B', '#E09107', '#A3E00B']
},
},
series中保证value有值就行的。