[英]Define yAxis value with two different yAxis scale highcharts
您好,我有一個帶有Highcharts的圖表,它是帶有兩個不同yAxis的折線圖。 左一圖形%,右一分鍾。 我想“編碼”左邊的比例尺為“ 0%,20%,40%,60%,80%,100%”
這是我的代碼
var chartTot = {
chart: {
renderTo: 'grafTot',
type: 'line',
marginBottom: 110,
},
legend: {
itemDistance: 20,
itemWidth: 190
},
title: {
text: ''
},
plotOptions: {
series: {
marker: {
enabled: false
}
}
},
xAxis: {
categories: $scope.hours
},
yAxis: [{ //1st yAxis
title: {
text: 'Clients %'
},
min: 0, // I want my graphic 0 to 100 but with this i get
max: 100, // 0- 120 because of the second axis
labels: {
format: '{value} %',
},
},
{ //2nd yAxis
title: {
text: 'Minutes'
},
min: 0,
max: 60,
labels: {
format: '{value} min',
style: {
color: Highcharts.getOptions().colors[6]
}
},
opposite: true
}
]
};
如何定義第一個yAxis比例並保留第二個動態?
非常感謝
您應該將AlignTicks設置為false
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.