Dan_A_Dsr
Posts: 3
Joined: Fri Dec 02, 2022 3:47 pm

legendItemClick event to leave only the largest one selected so that it cannot become invisible.

Hi, I am new to highcharts library development.

I have the doubt in legendItemClick how can I put that the first series can not become hide but that the other series can become visible = false

I have seen examples but I can't find anything similar with this logic.

Code: Select all

  series: [{
    name: '2021',
    data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175],
  }, {
    name: '2019',
    data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434],
  }, {
    name: '2018',
    data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387]
  }]
});
thanks in advance
kamil.k
Posts: 458
Joined: Thu Oct 06, 2022 12:49 pm

Re: legendItemClick event to leave only the largest one selected so that it cannot become invisible.

Hello Dan_A_Dsr,

Welcome to our forum and thanks for contacting us with your question.

There is a similar topic on our forum which should be helpful, take a look: viewtopic.php?t=40696

Let me know if you found it helpful for your case,
Kind Regards!
Kamil Kubik
Highcharts Developer

Return to “Highcharts Usage”