2013-07-18 23 views
1

有沒有辦法去除左邊xAxis gridLine左邊的yAxis gridLine邊緣的像素?如何刪除highchart中的網格線重疊?

grid lines overlapping

見例如:http://jsfiddle.net/48LvK/

$(function() { 
    var chart; 
    $(document).ready(function() { 
     chart = new Highcharts.Chart({ 
      chart: { 
       renderTo: 'container', 
       type: 'area', 
       marginRight: 130, 
       marginBottom: 25 
      }, 
      "xAxis": { 
       "tickWidth": 0, 
       "gridLineWidth": 1, 
       "gridLineDashStyle": "ShortDot", 
       "gridLineColor": "#c1c2c3", 
       "labels": { 
        "enabled": false 
       }, 
      }, 
      "yAxis": { 

      }, 
      "plotOptions": { 
       "area": { 
        "fillColor": "transparent", 
        "marker": { 
         "enabled": false 
        } 
       } 
      }, 
      series: [{ 
       data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6] 
      }] 
     }); 
    }); 
}); 

回答

5

你要startOnTick補充:忠於你的x軸 http://jsfiddle.net/sppRL/

"xAxis": { 
     "tickWidth": 0, 
     "gridLineWidth": 1, 
     "gridLineDashStyle": "ShortDot", 
     "gridLineColor": "#c1c2c3", 
     "labels": { 
      "enabled": false 
     }, 
     "startOnTick": true 
    }, 

你看到的其實不是刻度線標記,它們是y軸向第一個xAxis刻度線左側的延伸。

http://api.highcharts.com/highcharts#xAxis