score:22
Highcharts does allow us to toggle the legend states from outside.
series[0].hide(); series[0].show();
are provided by highcharts which we can use to implement the functionality you asked for.
here is a fiddle for your reference http://jsfiddle.net/gfNYk/1/
score:3
series[i].visible is the property
score:3
If you have a lot of series, hide() and show() can result in very bad performance. Alternatively you can use setVisible() on each series and redraw() at the end.
$('#uncheckAll').click(function(){
var chart = $('#container').highcharts();
var series = chart.series;
for(i=0; i < chart.series.length; i++) {
series[i].setVisible(false, false);
}
chart.redraw();
});
$('#checkAll').click(function(){
var chart = $('#container').highcharts();
var series = chart.series;
for(i=0; i < chart.series.length; i++) {
series[i].setVisible(true, true);
}
chart.redraw();
});
to determine if a series is selected you can use the series.visible property
Source: stackoverflow.com
Related Query
- Highcharts - How to programmatically toggle legend items and determine which items are selected
- How to modify highcharts legend item click event?
- How to Check and Uncheck all the Legend elements in HighCharts Linechart?
- How can i force Highcharts to use same symbols in Legend and Series?
- how to pass values to tooltip which not in x and y axis in highcharts
- How to center highcharts pie chart and legend on a page?
- How to suppress items with NULL value from HighCharts legend
- Highcharts -- how to change line width programmatically and prevent resetting line width?
- How to add dots to Highcharts legend and bars?
- Highcharts Pie Chart: How to ignore disabled legend items
- canvg and highcharts how to include chart legend and keep the chart size?
- How to represent a point which is outside range of x and y axis in highcharts
- Highcharts - How to combine unique legend for multi-series pie chart which perform same action for both series? (like onclick: show/hide)
- Highcharts how to use column title as X axis and not as Legend
- Highcharts Pie chart how to reduce space between chart and legend caused by plot width
- how to enable only 1 out of 2 column column graph by default when page loads in highcharts and the 2nd one gets visible when toggled in the legend
- Highcharts - How to Make the legend item width half of the contianer?
- how can I use rangeselector and navigation in highcharts in the given code
- How to customize a legend in highcharts as the image and while clicking on the leg end appears lines inside linechart
- How to display legend in Highcharts Waterfall Chart and make the sum column of waterfall appear in multiple colors?
- how to update bar graph and also its legend without re-drawing it in highcharts
- Highcharts legend items on one line and overlapping
- Highcharts: How can I find out which which legend items are disabled?
- How to create a column range chart in Highcharts using range and navigator functions?
- How to wrap legend items in highcharts?
- Hiding _groups_ of series in Highcharts and jQuery: how to get acceptable performance?
- how to import highcharts with webpack and babel
- How do you increase the performance of highcharts chart creation and rendering
- Highcharts - How to display legend symbol inside the tooltip
- How to change graph colour above and below plotline in Highcharts
More Query from same tag
- 3 layer donut chart in Highcharts
- Highcharts: Is it possible to have a single series exist in multiple stacks in a grouping
- trying to dynamically update Highchart column chart but series undefined
- Highchart not rendering in shiny using 'Highcharter' package
- Highcharts not displaying data at some zoom levels
- How to change label double number in highchart
- "Highcarts is not defined error" after installing highcharts
- Adding HTML tables dynamically in Highcharts
- HighCharts OHLC - Can I provide color-information for each point with JSON-Data?
- Get time from Psql to Highstock
- How to show specific point to show specific information in HighCharts
- Dual axes line vs column and zoom tooltip broke
- Wrong date in tooltip in charts with daylight savings time in highcharts
- Highcharts stacked bar chart hide data labels not to overlap
- how to set the interval of points if I have 2 Y axes
- HighCharts XAxis logarithmic type
- Highcharts Renderer Button ID
- Adding thousands separator for custom formatted highcharts tooltip
- Highcharts: Updating a Pie Chart with setData()
- Using Highcharts with FastAPI
- HTML5 Chart library that supports pinch zooming
- Highcharts not plotting datetime series
- Highcharts bar grouping while maintaining transparent overlay?
- How to get Yaxis values from highchart
- Include export csv in highcharter
- Highcharts - Dealing with small values in Funnel chart
- How to create more gap between axis labels on a stacked bar chart?
- How do I force HighCharts to label every column?
- How could i put a highcharts funnel to rotate 90deg
- Highcharts Heatmap - How to get blocks next to each other when separated by more then '1' in value