toggleSeries
fires on toggle on/off a series in a legend
toggleSeries: (id: string, pieLike: object | undefined) => void;
Parameters:
id: string
- the id of a toggled seriespieLike: object | undefined
- an object with the configuration of a series in a legend (only for Pie, Pie 3D and Donut charts). The object can contain the following parameters:color: string
- the color of the legend itemid: string
- the id of the legend itemtext: string
- the text label of the legend item
Example
chart.events.on("toggleSeries", function(id){
console.log("The "+id+" series is toggled");
});
Related sample: Chart. Events