Skip to main content

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 series
  • pieLike: 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 item
    • id: string - the id of the legend item
    • text: 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