有没有办法在Highstock中制作一个双轴,就像Highcharts上的这个?
http://www.highcharts.com/demo/combo-dual-axes
发布于 2013-03-27 02:18:42
看起来你可以用和highcharts一样的方法来做。每个系列指定yAxis:n,其中n是要绘制它的轴,您需要定义n个yAxis条目。我修改了其中一个示例highstock演示:http://jsfiddle.net/ykfmG/
$.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename='+ name.toLowerCase() +'-c.json&callback=?', function(data) {
seriesOptions[i] = {
name: name,
data: data,
yAxis:i
};
}
yAxis: [{
labels: {
formatter: function() {
return (this.value > 0 ? '+' : '') + this.value + '%';
}
},
plotLines: [{
value: 0,
width: 2,
color: 'silver'
}]
},{opposite:true},{opposite:true},{opposite:true}],https://stackoverflow.com/questions/15644258
复制相似问题