Skip to main content


fires on toggle on/off a series in a legend

toggleSeries: (id: string, pieLike: object | undefined) => void;


  • 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)

Example"toggleSeries", function(id){
console.log("The "+id+" series is toggled");

Related sample: Chart. Events

The pieLike 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