Hide line in default state in Highcharts

Egor Sazanovich picture Egor Sazanovich · Jan 6, 2012 · Viewed 23.7k times · Source

How to hide line in default state in 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

Answer

Egor Sazanovich picture Egor Sazanovich · Jan 6, 2012

Oh, I found it, hope the solution will save time for someone. Use visible:false in series defenition

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