如何删除“值"和“系列"从高图? [英] How to remove "Values" and "series" from highcharts?
本文介绍了如何删除“值"和“系列"从高图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在网站上使用高图表,这看起来不错,但现在我想从图表中删除这两个标签:
I'm using highcharts on my website, which looks great, but I now want to remove these two labels from the chart:
我尝试禁用各种标签,例如这样的标签:
I tried disabling all sorts of labels, such as this one:
{
title: {
text: 'X axis labels are disabled'
},
xAxis: {
labels: {
enabled: false
}
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]
}
但是我找不到一种专门删除这些方法的方法.
but I can't find a way to remove these specifically.
有人知道我如何删除这些标签吗?
Does anybody know how I can remove these labels?
推荐答案
The "Values" is the title of the y-axis. It can be disabled like this:
yAxis: {
title: {
text: null
}
}
或
yAxis: {
title: false
}
系列1"是传奇的一部分.可以这样禁用它:
The "Series 1" is part of the legend. It can be disabled like this:
legend: {
enabled: false
}
或者禁止在图例中显示特定系列,例如:
Or alternatively disable a specific series from being shown in the legend, like this:
series: [{
showInLegend: false,
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5]
}]
请参见此更新的JSFiddle 进行现场演示.
这篇关于如何删除“值"和“系列"从高图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文