I have a pie chart with a legend. When you click a slice, it becomes offset (this is great). I would like this behaviour when you click on a legend item.
Is it possible to achieve an offset slice via legend click?
So if you click on an item in the legend, the relevant slice becomes offset.
It seems that the method to use is legendItemClick, eg:
Code: Select all
options: {
chart: {
type: 'pie'
},
plotOptions: {
//etc
series: {
point: {
events: {
legendItemClick: function () {
//return false; // this cancels the default action.
console.log(this);
//this.findtheSlice.makeItOffset(); //want to do something like this
}
}
}
}
//etc
}
}
}
It seems that there isn't a method available to achieve this so may need to go deep into the api.
Any help would be very appreciated!
Btw, i'm using an angular directive for highcharts (highcharts-ng). There are some subtle differences.