Highchart:如何删除yAxis的路径?

时间:2016-07-04 09:59:30

标签: highcharts

我想知道如何删除下图中红色循环的部分。

enter image description here

以下是图表的代码,我想我只需要一行隐藏它或将其颜色更改为透明,就像我对其他部分所做的那样。

    $(function () {
    $('#testTOPBOX123').highcharts({
        chart: {
            type: 'area',
            width:300,
            height:200
        },
        title: {
            text: false,
        },
        subtitle: {
            text: false,
        },
        xAxis: {
            gridLineColor: 'transparent',
        labels:
            {
              enabled: false
            },
            lineColor: 'transparent',
        },
        yAxis: {
            gridLineColor: 'transparent',
             showEmpty: false,
        labels:
            {
              enabled: false
            },
        title:
        {
              enabled: false
            },
            tickLength: 0,
             minorTickLength: 0,
              minorGridLineWidth: 0,
            lineColor: 'transparent',
        },

        plotOptions: {
            area: {
                pointStart: 0,
                marker: {
                    enabled: false,
                    symbol: 'circle',
                    radius: 2,
                    states: {
                        hover: {
                            enabled: true
                        }
                    }
                }
            }
        },
        legend: {
            enabled:false,
        },
         credits: {
                        enabled: false
                      },
        series: [{
            name: 'USA',
            data: [null, null, null, null, null, 6, 11, 32, 110, 235, 369, 640,
                1005, 1436, 2063, 3057, 4618, 6444, 9822, 15468, 20434, 24126,
                27387, 29459, 31056, 31982, 32040, 31233, 29224, 27342, 26662,
                26956, 27912, 28999, 28965, 27826, 25579, 25722, 24826, 24605,
                24304, 23464, 23708, 24099, 24357, 24237, 24401, 24344, 23586,
                22380, 21004, 17287, 14747, 13076, 12555, 12144, 11009, 10950,
                10871, 10824, 10577, 10527, 10475, 10421, 10358, 10295, 10104]
        },]
    });
});

1 个答案:

答案 0 :(得分:1)

您可以使用xAxis.tickLength来隐藏刻度。在这里您可以找到有关此参数的信息: http://api.highcharts.com/highcharts#xAxis.tickLength

xAxis: {
    gridLineColor: 'transparent',
    tickLength:0,
labels:
    {
      enabled: false
    },
    lineColor: 'transparent',
},

在这里,您可以找到实时示例,它是如何工作的: http://jsfiddle.net/otrss2ou/

致以最诚挚的问候,