如何删除highcharts中的网格线重叠?

Dan*_*man 2 highcharts

有没有办法删除左侧xAxis gridLine左侧yAxis gridLine边缘的像素?

网格线重叠

参见示例: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]
            }]
        });
    });
});
Run Code Online (Sandbox Code Playgroud)

Bar*_*ird 6

您需要将startOnTick:true添加到您的xAxis http://jsfiddle.net/sppRL/

    "xAxis": {
        "tickWidth": 0,
        "gridLineWidth": 1,
        "gridLineDashStyle": "ShortDot",
        "gridLineColor": "#c1c2c3",
        "labels": {
            "enabled": false
        },
        "startOnTick": true
    },
Run Code Online (Sandbox Code Playgroud)

您所看到的实际上并不是刻度线,它们是第一个xAxis刻度左侧的y轴的延伸.

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