0
votes

On one page I have multiple Highcarts called in this manner $(class).highcharts(options). Number of Highcarts can vary depending upon the number of class available in page. Now I want to write a function which will trigger hover effect on pie chart on click of legend. This click event should be specific to each highchart. Due to some reason i cannot change initialization method.

http://jsfiddle.net/shashikant_tripathi/dn5891r8/

point: {
    events: {
        legendItemClick: function (e) {
            //Here i want ot write something like this 
            chart.tooltip.refresh(chart.series[0].data[index]);
            return false; 
        }
    }
}

Similar function to above specified fiddle but in my case, there is multiple charts and initialization is done in different manner which is not possible for me to change right now. Can some one help me with this.

1
Why don't you want to set the common options in options object and call the tooltip.refresh inside legendItemClick event? Example: jsfiddle.net/yy936xug.pawel_d
Thank you ! d_paul this is what I wanted to achieve. Could you please post your fiddle as answer.Shashikant Tripathi
Sorry for my slow response. I posted my comment as an answer.pawel_d

1 Answers

0
votes

Set the common options in options object and call the tooltip.refresh inside legendItemClick event.

API Reference:
http://api.highcharts.com/highcharts/plotOptions.series.events.legendItemClick

Example:
http://jsfiddle.net/yy936xug/