HighCharts - 我怎样才能关掉点?(HighCharts - How can I tur

2019-07-19 03:17发布

我使用HighCharts。 这里是文档。 我想关闭这些点,但在第一次我不知道如何被调用。 因此,我无法将其关闭。 你知道我怎么能杀那些点?

Answer 1:

下面是用线图的一个示例: http://jsfiddle.net/aeZ6P/1/

重要部分:

plotOptions: {
    line: {
        marker: {
            enabled: false
        }
    }
}

参见: https://api.highcharts.com/highcharts/plotOptions.line.marker.enabled

同花同样的效果: http://jsfiddle.net/aeZ6P/



Answer 2:

在Highcharts我们有三种方法来禁用标记:

1)禁用所有系列类型:

plotOptions: {
    line: { /* or spline, area, series, areaspline etc.*/
        marker: {
           enabled: false
        }
    }
}

2)停用一个特定系列:

series: [{
    data: [14,17,21],
    marker: {
       enabled: false
    }
}]

3)对于某一点禁用标记:

series: [{
    data: [{
        y: 14,
        marker: {
            enabled: false
        }
    },{
        y: 17
    },{
        y: 21
    }]
}]


Answer 3:

就拿从HighCharts API参考看看这个:

http://api.highcharts.com/highcharts#plotOptions.series.marker.enabled

http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/series-marker-enabled/

您需要添加的选项是这样的:

    plotOptions: {
        series: {
            marker: {
                enabled: false
            }
        }
    },

这种方法是很好的,因为它会与点标记所有图表工作。 如果你想要一个特定的图表类型,检查了这一点:

    plotOptions: {
        line: { // <--- Chart type here, check the API reference first!
            marker: {
                enabled: false
            }
        }
    },

请享用!



文章来源: HighCharts - How can I turn off the points?