Highchart在多个y轴上的高压tickPositions

时间:2014-01-23 08:04:43

标签: highcharts

我正在尝试使用tickPositions来处理2 y轴的图形。

问题是第二个y轴的tickPosition是关闭的:

http://jsfiddle.net/gn393/12/

yAxis: [{
    height: 420,
    lineWidth: 2,
}, {
    top: 500,
    height: 210,
    lineWidth: 2,
},{
    opposite:true,
    linkedTo:0,
    tickPositions:[26.79] ,
    gridLineWidth:0
},{
    opposite:true,
    linkedTo:0,
    tickPositions:[34.87] ,
    gridLineWidth:0
},{
    opposite:true,
    linkedTo:1,
    tickPositions:[-8.09],
    gridLineWidth:0
}],

我做错了什么?

1 个答案:

答案 0 :(得分:1)

您没有设置上一个yAxis的顶部和高度,请参见固定示例:http://jsfiddle.net/gn393/14/

                yAxis: [{
                    height: 420,
                    lineWidth: 2,
                }, {
                    top: 500,
                    height: 210,
                    lineWidth: 2,
                },{
                    opposite:true,
                    linkedTo:0,
                    tickPositions:[26.79] ,
                    gridLineWidth:0
                },{
                    opposite:true,
                    linkedTo:0,
                    tickPositions:[34.87] ,
                    gridLineWidth:0
                },{
                    top: 500,    // here
                    height: 210, // here
                    opposite:true,
                    linkedTo:1,
                    tickPositions:[-8.09],
                    gridLineWidth:0
                }]