2013-03-20 95 views

回答

5

看一看在Y軸的的plotlines API ...

http://api.highcharts.com/highcharts#yAxis.plotLines

實施例... http://jsfiddle.net/48dUL/

$(function() { 
var chart = new Highcharts.Chart({ 
    chart: { 
     renderTo: 'container' 
    }, 
    xAxis: { 
     categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], 
    }, 
      yAxis: { 
     plotLines: [{ 
      color: '#C0C0C0', 
      width: 5, 
      value: 0 
     }] 
    }, 

    series: [{ 
     data: [-29.9, -71.5, -106.4, -129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] 
    }] 
}); 

});

+0

非常感謝。我從引用中得到了它們僅在x軸上可用的印象。 – user2182620 2013-03-20 18:22:13