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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-24 07:22:49  来源:igfitidea点击:

Hide line in default state in Highcharts

javascriptchartshighcharts

提问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:falsein series defenition

哦,我找到了,希望解决方案可以为某人节省时间。visible:false在系列防御中使用

series: [{
           name: 'MyHiddenLine',
           data: [1,2,3],
           visible: false
        },