简体   繁体   中英

Make only one legend active in HighCharts at the start

I got success in getting the data from JSON File in HighCharts. But the only problem is I need only one legend to be active at the start...Any help will be Appreciated....

For getting Data
 for(let i=0;i<datae.dataa.length;i++)
              {
                chart.series[i].setName(datae.dataa[i].name);
                chart.series[i].setData(datae.dataa[i].data);        
              }

Present Output: 在此处输入图片说明 Required Output: 开始时仅突出显示一个图例 I am not good at HighCharts so please help me...

Call Series.setVisible . Eg chart.series[i].setVisible(false) .

Or use visible member of series data when creating a chart.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM