visualMap 如何实现居中实现
配置项如下
option = {
title: {
text: 'Awesome Chart'
},
xAxis: {
data: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
},
yAxis: {},
visualMap: {
orient: 'horizontal',
top: 0,
/*right: 10,*/
pieces: [{
lt: 35,
color: 'green',
label: '优(<35)'
}, {
gte: 35,
lt: 75,
color: '#f1ee25',
label: '良(35-75)'
}, {
gte: 75,
lt: 115,
color: '#ff9933',
label: '轻度污染(75-115)'
}, {
gte: 115,
lt: 150,
color: '#cc0033',
label: '中度污染(115-150)'
}, {
gte: 150,
lt: 250,
color: '#660099',
label: '重度污染(150-250)'
}, {
gte: 250,
lt: 999,
color: '#7e0023',
label: '严重污染(>250)'
}],
outOfRange: {
color: '#999'
}
},
series: [{
type: 'line',
data: [220, 182, 191, 234, 290, 330, 310]
}]
};