如何在Highcharts中删除轴

时间:2013-12-03 10:45:13

标签: javascript highcharts

我想从HighCharts中删除x和y轴,只显示图中的线条。我该怎么做?

这是我的jsFiddle link

这是我的代码

$(function () {
        $('#container').highcharts({
            title: {text: ''},
            tooltip: false,
            legend: false,
            series: [{
                name: 'Tokyo',
                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]
            }, ]
        });
    });

2 个答案:

答案 0 :(得分:5)

您可以在两个轴上将gridLineWidth / tickWidth设置为0并禁用标签。

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

关于highcharts.com它是学分参数:http://api.highcharts.com/highcharts#credits.enabled

答案 1 :(得分:0)

Jsfiddle:http://jsfiddle.net/9S8Xd/1/

    $('#container .highcharts-axis').remove();                      // remove axe
    $('#container .highcharts-axis-labels').remove();               //remove axe label
    $('#container .highcharts-markers.highcharts-tracker').remove();// remove dot