【问题标题】:Dual Axis in Highstock?Highstock 中的双轴?
【发布时间】:2013-03-27 02:18:41
【问题描述】:

有什么方法可以在 Highstock 中制作像 Highcharts 上这样的双轴?

http://www.highcharts.com/demo/combo-dual-axes

【问题讨论】:

    标签: highcharts highstock


    【解决方案1】:

    看起来你可以像在 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}],
    

    【讨论】:

      猜你喜欢
      • 2018-09-28
      • 1970-01-01
      • 1970-01-01
      • 2014-12-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-10
      • 1970-01-01
      相关资源
      最近更新 更多