score:0
Accepted answer
you can use css class and add to item.
$(chart.series).each(function (i, serie) {
$('<li style="color: ' + serie.color + '">' + serie.name + '</li>').click(function () {
if(serie.visible) {
$(this).addclass('inactive');
serie.hide();
} else { $(this).removeclass('inactive');
serie.show();
}
}).appendto('#legend');
});
Source: stackoverflow.com
Related Query
- Highcharts: How can I find out which which legend items are disabled?
- Highcharts - How to programmatically toggle legend items and determine which items are selected
- Highcharts Pie Chart: How to ignore disabled legend items
- How can i force Highcharts to use same symbols in Legend and Series?
- How to suppress items with NULL value from HighCharts legend
- How can I add a text link just below the legend box in highcharts
- Highcharts How to find legend co-ordinates
- How do you change the height value when more items are added to highcharts dynamically?
- How can I put xAxis in highcharts starting in the horizontal line when all values are in 0?
- How can I control legend items through a custom button in Highcharts?
- Highcharts - How to combine unique legend for multi-series pie chart which perform same action for both series? (like onclick: show/hide)
- How can highcharts linear scale or log scale button enabel and zoom in or out full page
- 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
- How can i change the color of a tile which was clicked of a treemap in highcharts using react
- How can I show colorAxis color in Highcharts legend as series color?
- how can I use rangeselector and navigation in highcharts in the given code
- how to find out the Height dynamically in highcharts
- How can I get access to a Highcharts chart through a DOM-Container?
- HighCharts - How can I turn off the points?
- How to modify highcharts legend item click event?
- How can I change the colors of my highcharts piechart?
- How can I hide series from a HighCharts legend?
- How can I move legend in Highcharts?
- How can I hide a series from initially being displayed in Highcharts
- How to wrap legend items in highcharts?
- How can I force multiple y-axis in Highcharts to have a common zero
- How can I fix Highcharts error #13?
- How can i hide all the Series in highcharts at a time
- How can I remove the white border from HighCharts pie chart?
- Highcharts - How to display legend symbol inside the tooltip
More Query from same tag
- Drilldown With Linked Series
- Highcharts polar chart wind rose data from JSON
- Passing null in Highcharts line graphs
- High Charts export image on the server
- Issue in multiple exporting for HighChart with scrollbar
- Jquery & Ajax for data retrieval used for highcharts implementation + HTML
- how to format flot char yaxis by value seconds in highcharts?
- Get all series values when click on single line chart
- Why is this Highcharts xAxis actual max greater than the xAxis.max I have set?
- how can Click on small figures in highcharts
- Remove Highchart series in shiny
- How to change the radius of the data point dots depending on the value/count in the data-yaxis-HIGHCHARTS
- Highcharts - colorByPoint does not work
- Having only one yaxis but at the right side on Highcharts.js
- Add additional data in tooltip of Highcharts with dynamic x-axis category
- How to add an icon beside all the series in an legend
- Loading multile php Files with Ajax
- How do I target a Highcharts path?
- DOM Node count increase when loading Highcharts documents (Chrome)
- Dynamic Highcharts is not updating
- JSF, HighCharts and JS
- How to add a border to the title in highcharts
- Change chart type and redraw with multiple series in Highcharts
- is it possible to add a legend for bubble size in high charts?
- Calculate Y-axis breaks
- Gantt Highcharts layout cutoff
- How to set a 24h range on the y-axis of a column highchart
- Pie chart taking more load time than line chart in highchart
- Double donut-like chart with negative values
- Responsive highchart gauge