Reputation: 27
Hello I have a chart with Highcharts, it's a line chart with two different yAxis. The left one graphics % and the right one minutes. I want to "hardcode" the left to be in this scale "0%, 20%, 40%, 60%, 80%, 100%"
This is my code
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
}
]
};
How can I define the 1st yAxis scale and left the 2nd dynamic?
Thanks a lot
Upvotes: 0
Views: 634