Javascript HighCharts - 如何关闭积分?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14642779/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-24 17:28:31  来源:igfitidea点击:

HighCharts - How can I turn off the points?

javascripthighcharts

提问by Lajos

I'm using HighCharts. Hereis the documentation. I would like to turn off those points but at first I do not know how is that called. Therefore I can not turn them off. Do you know how am I able to kill those points?

我正在使用 HighCharts。是文档。我想关闭这些点,但一开始我不知道怎么称呼。因此我无法关闭它们。你知道我怎样才能杀死这些点吗?

I would like to turn of those points

我想转这些点

回答by Tim Medora

Here's an example with a line chart: http://jsfiddle.net/aeZ6P/1/

这是一个带有折线图的示例:http: //jsfiddle.net/aeZ6P/1/

Important part:

重要部分:

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

See also: https://api.highcharts.com/highcharts/plotOptions.line.marker.enabled

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

Same effect with spline: http://jsfiddle.net/aeZ6P/

与样条相同的效果:http: //jsfiddle.net/aeZ6P/

回答by Pawe? Fus

In Highcharts we have three ways to disable markers:

在 Highcharts 中,我们提供了三种禁用标记的方法:

1) Disable for all series by type:

1) 按类型禁用所有系列:

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

2) Disable for one specific series:

2)禁用一个特定的系列:

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

3) Disable marker for a certain point:

3)禁用某个点的标记:

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

回答by Seer

Take a look at this from the HighCharts API reference:

从 HighCharts API 参考中看一下:

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

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/

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

The options you need to add are this:

您需要添加的选项是:

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

This method is nice as it will work with all charts with the point markers. If you want a specific chart type, check this out:

这种方法很好,因为它适用于所有带有点标记的图表。如果您想要特定的图表类型,请查看:

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

Enjoy!

享受!