原先在好多地方都用到了echart地图这个插件,今天记录一下一些图例和数据配置,效果如下:
类似这种图例,直接上配置文件:
var option = {
backgroundColor: 'rgba(255,255,255,0)',
tooltip: {
trigger: 'item'
},
//这里是另外一种图例方式,可以试试
// visualMap: {
// show: false,
// x: 'left',
// y: 'bottom',
// //layoutCenter:['30%','30%'],
// splitList: [{start: 0, end: 100}, {start: 100, end: 200}, {start: 200}],
// color: ['#eb2f0b', '#ffb329', '#28c01a',]
// },
visualMap: {
min: 0,
max: 10000,
left: 26,
bottom: 40,
showLabel: !0,
// text: ["高", "低"],
piece