Javascript 在 Highcharts 中隐藏处于默认状态的行
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8755410/
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
Hide line in default state in Highcharts
提问by Egor Sazanovich
How to hide line in default state in Highcharts js-script?
如何在Highcharts js-script中隐藏默认状态下的线?
I have ~7 series on my canvas, 3-4 of them are optional and I want to make them hidden when the page is load, but also show them in legend, to inform user, that he can enable them if wants
我的画布上有 ~7 个系列,其中 3-4 个是可选的,我想让它们在页面加载时隐藏,但也显示在图例中,以通知用户,如果需要,他可以启用它们
回答by Egor Sazanovich
Oh, I found it, hope the solution will save time for someone. Use visible:false
in series defenition
哦,我找到了,希望解决方案可以为某人节省时间。visible:false
在系列防御中使用
series: [{
name: 'MyHiddenLine',
data: [1,2,3],
visible: false
},