Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
  • in reply to: Question: How to toggle series using the legend #4789

    workaround for this could be to add a event handler.. i added a click event to hide data series as below.
    works but there are event collisions and it appears that the tooltip is using a “previousDataPointEventObject” object which gets lost when i ravage the data object. this makes the errors stack up pretty quick but is effective until i figure out how to reset the previousDataPoint

    //appending series
                  type: 'spline',
                  click: seriesToggle,
                  showInLegend: true,
                  toolTipContent: "<b>{name}</b><br>{x}: {y}",
                  name: key,
                  legendText: key
      function seriesToggle(e){
        if( == 1){//restore..
 = data.chart;
          data.chart = [];//clear backup
        } else {
          var series =;
          data.chart =;//backup data
          for(var i in data.chart){
            if(data.chart[i].name == series){
     = [ data.chart[i] ]; //only show clicked series
Viewing 1 post (of 1 total)