[英]HighCharts:set the value of yAxis
我已经像这样在一张图表中组合了拖曳线和列
我想设置正确的yAxis show {0%,20%,40%60%,80%,100%},
左侧的yAxis显示{0,10k,20k,30k,40k,50k}
您可以使用tickPositions ( http://jsfiddle.net/QzXbg/1/ )完成此操作:
yAxis: [{ // Primary yAxis
labels: {
style: {
color: '#89A54E'
}
},
title: {
text: 'Actual and forecast',
style: {
color: '#89A54E'
}
},
tickPositions: [0, 10000, 20000, 30000, 40000, 50000]
}, { // Secondary yAxis
title: {
text: 'MAPE',
style: {
color: '#4572A7'
}
},
tickPositions: [0, 20, 40, 60, 80, 100],
labels: {
style: {
color: '#4572A7'
}
},
opposite: true
}],
您也可以仅对每个轴使用tickInterval属性,而不必单独指定每个刻度。
即:
yAxis:[{
tickInterval:10000
},{
tickInterval:20
}]
假设您的右轴日期已经在所需的%值中。 如果不是,则需要在格式器中为轴标签计算%。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.