min: 0,
max: 100,
interval: 25,
splitLine: {
show: true,
lineStyle: {
color: "#fff000"
}
},
如图,黄色的分割线,是每隔25有一个分割。我想对第四条线进行特殊处理,比如说,我想让第四条是红色的,该怎么设置呀
配置项如下
app.title = '世界人口总量 - 条形图';
option = {
title: {
text: '世界人口总量',
subtext: '数据来自网络'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
legend: {
data: ['2011年', '2012年']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'value',
min: 0,
max: 100,
interval: 25,
splitLine: {
show: true,
lineStyle: {
// color: "#fff000"
color:['#fff000', '#fff000','#fff000','#fff000','black']
}
},
},
yAxis: {
type: 'category',
data: ['巴西','印尼','美国','印度','中国','世界人口(万)']
},
series: [
{
name: '2011年',
type: 'bar',
data: [12, 28, 29, 10, 17, 60]
},
{
name: '2012年',
type: 'bar',
data: [12, 28, 30, 14, 11, 67]
}
]
};