如何关闭点?

我在用 HighCharts。给你是文档。我想关闭这些点,但首先我不知道这是如何称呼。因此我无法关闭它们。你知道我是怎么消灭这些点的吗?

I would like to turn of those points

64276 次浏览

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

Important part:

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

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

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

Take a look at this from the HighCharts API reference:

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/

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!

In Highcharts we have three ways to disable markers:

1) Disable for all series by type:

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

2) Disable for one specific series:

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

3) Disable marker for a certain point:

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