When I select a legend item my input is hidden from a highcharts-container class with id = highcharts-2:
<input type="hidden" id="Chart1_legend" name="Chart1_legend" value="[{"value":true,"name":"1"}]">
Anyway to default in this attribute? Was trying this:
$(document).ready(function() { $(#Chart1).highcharts().series[1].update({ showInLegend: false }); })
Chart with all elements shown:
All elements shown
Chart with the first element hidden:
First element hidden after legend selection
You need to disable the visible property in the first series object:
visible
series: [{ visible: false, ... }, ...]
Live demo: http://jsfiddle.net/BlackLabel/w10a8tos/
API Reference: https://api.highcharts.com/highcharts/series.column.visible
2.1m questions
2.1m answers
60 comments
57.0k users