[英]HighCharts - How can I turn off the points?
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/
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
}]
}]
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! 请享用!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.