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
- React - Highcharts Full Screen black bar
- highcharts solidgauge reverse angle direction
- Importing data from HTML table to highcharts
- Change Highmaps map colour
- Highstock Stock Tools Creating Indicator GUI Does Not See Chart Series
- unique legend on multiple charts
- Highcharts addPoint function show nothing
- How to add a label to axis
- Highcharts: Dynamically append a point to Scatterplot permanently
- Place Highstock inside a SVG
- How to get rangeSelector to work with HighCharts
- Highcharts: how to group data points and display the total accordingly?
- How to add a plotline to a bar chart in Highcharts?
- Highcharts : How to use setData with a string obtained by ajax?
- position ticks in par with data - highcharts
- y-axes misaligning in highcharts after zooming in
- highcharts sum up tooltip {point.y} with a specific number
- Disabling highcharts stacked bar's highlight
- How to set an option in Highchart inactive by default
- Highcharts - Grid line height
- highcharts.js how to force x-Axis label to display all months regardless of chart size
- Charts don't fit into <div> (highcharts, MVC) Bug?
- error NG6001: Cannot declare 'Highchar tsChartComponent' in an NgModule as it's not a part of the current compilation
- Lazy_high_chart: why options.xaxis undefined?
- Highcharts histogram merges last and second last column together
- How to find sum of grouping data in highcharts
- Highcharts export chart new window/tab
- Custom hover / tooltip data on highcharts network chart
- Highcharts - Always keep hover state on single slice
- Remove step line points