问题
Is it possible to draw custom legends. Actually number of series determine number of legends in highcharts. So is it possible to draw customized number of legends which are not dependent on number of series. Suppose I have two series but I want to draw 10 legends and I want customized actions on click on each legend.
回答1:
Disable default legend and create your own by HTML. Further catch click event on items (by i.e jquery) and reconigse if this element should interact with chart. If yes, then call chart.series[0].show/hide
where series[0] is index of available serie and manipulate view.
Docs: - http://api.highcharts.com/highcharts#Series.show
来源:https://stackoverflow.com/questions/32373014/can-we-draw-custom-legends-not-based-on-series-in-highcharts