【发布时间】:2013-03-27 02:18:41
【问题描述】:
有什么方法可以在 Highstock 中制作像 Highcharts 上这样的双轴?
【问题讨论】:
标签: highcharts highstock
有什么方法可以在 Highstock 中制作像 Highcharts 上这样的双轴?
【问题讨论】:
标签: highcharts highstock
看起来你可以像在 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}],
【讨论】: