您的位置:首页 > 其它

highcharts设置Y轴范围及根据Y轴范围设置不同颜色

2014-11-13 17:12 357 查看
yAxis : {
title : {
text : '数据'
},

plotLines : [ {
value : 0,
width : 1,
color : '#808080'
} ],
min: 30,  //最小
tickInterval: 10, //步长
max:150,//最大

              // 不同Y轴范围设置不同颜色 begin
plotBands: [{
from: 30,
to: 60,
color: 'rgba(168, 255, 213, 0.3)',
label: {
text: '偏低',
style: {
color: '#606060'
}
}
},  {
from: 60,
to: 100,
color: 'rgba(68, 70, 213, 0.3)',
label: {
text: '正常',
style: {
color: '#606060'
}
}
},  {
from: 100,
to: 150,
color: 'rgba(255, 97, 0, 0.3)',
label: {
text: '偏高',
style: {
color: '#606060'
}
}
}]

             // 不同Y轴范围设置不同颜色 end

},


  
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: