本文介绍了隐藏第一个yaxis标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在yaxis中隐藏标签-200,有什么方法可以隐藏第一个yaxis标签?因此yaxis标签的结果为[empty],0,200,400,600,800
I need to hide the label -200 in yaxis, is there any way to hide the first yaxis label?So the yaxis label result will be [empty] ,0, 200, 400, 600, 800
推荐答案
我所做的是为负值返回一个空字符串.
What i did is return an empty string for negative value.
tickOptions: {
formatter: function (format, value) {
if (value < 0) {
return ' ';
}
else {
return value
}
}
}
这篇关于隐藏第一个yaxis标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!