【发布时间】:2015-04-13 18:42:35
【问题描述】:
您好,我有一个带有 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 比例并离开第二个动态?
非常感谢
【问题讨论】:
-
像jsfiddle.net 这样的现场演示会很好
标签: javascript graphics highcharts highstock