score:0

You can do that with the series.events.legend.itemClick - Api Documentation

  series: [{
    name: 'Point 1',
    color: '#00FF00',
    data: [1, 2.5, 3, 4, 3.2],
    visible: false,
    showInLegend: true,
    events: {
      legendItemClick: function() {
        return false;
      }
    }
  }

edit : Completly invisible legend Updated Fiddle

score:0

You can do a little trick to achieve it: create a "phantom" series that has no data and link the hidden series to it. Legend item will be generated for the phantom series and will serve for the hidden series too. Then disable the default action for this item in events.legendItemClick:

  series: [{
    // Phantom series - created just to generate legend item
    name: 'Series 1',
    events: {
      legendItemClick: function(e) {
        e.preventDefault();
      }
    }
  }, {
    data: [3, 0],
    visible: false,
    name: 'Series 1',
    linkedTo: ':previous',
  }, {
    data: [1, 2],
    name: 'Series 2'
  }]

Live demo: http://jsfiddle.net/BlackLabel/dc4L30zv/

API references:


Related Query

More Query from same tag