title: chart.series[id].remove() is not able to refresh legend properties of other series in highcharts/highstock
body: <p>When I remove first series from the chart i.e. chart.series[0].remove();
  the legend properties for other series are not updated. i.e. legend of series 1 does not know that he is at location 0 after I have deleted series 0.</p>
  
  <p>So my basic issue is that i need to update/ all series legends after I have removed a series.</p>
  
  <p>How can I do this?</p>
  
  <p><strong>Update#:
  my scenaro: i have legends with cross icons (using html). if i click on close icon, that series is removed. if i click on legend name, a jQuery Dialog opens giving you functionality to update yAxis , type for that perticular series.</strong></p>
  
  <p>Code for legend formatter:</p>
  
  <pre><code> legend: {
                                  enabled: true,
                                  useHTML: true,
                                  labelFormatter: function test() {
                                      console.log("in label fomatter");
                                          console.log("in test");
                                          console.log(this);
                                      if (this.userOptions.yAxis == 0) {
                                          return "&lt;input type=\"button\"onclick=\"updateSeries('"+this.index+"','"+this.userOptions.yAxis+"','"+this.userOptions.type+"')\" class=\"ui-widget\" value=\"" + this.name + " (RH)\"/&gt; &lt;input type=\"button\" onclick=\"removeSeries(" + this.index + ")\" class=\"ui-widget\" value=\" X \" /&gt;";
                                      } else if (this.userOptions.yAxis == 1) {
                                          return "&lt;input type=\"button\"onclick=\"updateSeries('"+this.index+"','"+this.userOptions.yAxis+"','"+this.userOptions.type+"')\" class=\"ui-widget\" value=\"" + this.name + " (LH)\"/&gt; &lt;input type=\"button\" onclick=\"removeSeries(" + this.index + ")\" class=\"ui-widget\" value=\" X \" /&gt;";
                                      } else if (this.userOptions.yAxis == 2) {
                                          return "&lt;input type=\"button\"onclick=\"updateSeries('"+this.index+"','"+this.userOptions.yAxis+"','"+this.userOptions.type+"')\" class=\"ui-widget\" value=\"" + this.name + " (3rd)\"/&gt; &lt;input type=\"button\" onclick=\"removeSeries(" + this.index + ")\" class=\"ui-widget\" value=\" X \" /&gt;";
                                      }
                                      return "";
                                  }
                              },
  </code></pre>
  
  <p>Code for remove series:</p>
  
  <pre><code>    function removeSeries(id) {
          console.log("in remove series");
          var chart = $('#container')
              .highcharts();
          chart.series[id].remove();
          chart.isDirtyLegend = true;
          chart.isDirtyBox = true;
  
          chart.legend.render();
          return;
      };
  </code></pre>
  
  <p>code for update series (I am creating a dialog box when a legend is clicked):</p>
  
  <pre><code> function updateSeries(index, yAxis, type) {
                  console.log("in update series");
                  //console.log(chart.get())
                  console.log("in update series"+index);
                  var chart = $('#container')
                  .highcharts();
                  chart.isDirtyLegend = true;
                  chart.isDirtyBox = true;
                  chart.legend.render();
                  console.log(chart.get("USSW1Y:3M Carry").index);
                  $("#dialog")
                      .dialog("open");
                  $("#legendTable")
                      .html("");
                  $('#legendTable')
                      .append("&lt;tr&gt;&lt;td&gt;Axis&lt;/td&gt;&lt;td&gt;&lt;select onchange=\"updateSeriesFromDialog(" + index + ")\" id=\"legendAxis\" name=\"legendAxis\"&gt;&lt;option value=\"0\"&gt;1&lt;/option&gt;&lt;option value=\"1\"&gt;2&lt;/option&gt;&lt;option value=\"2\"&gt;3&lt;/option&gt;&lt;/select&gt;&lt;/td&gt;&lt;td&gt;Type&lt;/td&gt;&lt;td&gt;&lt;select onchange=\"updateSeriesFromDialog(" + index + ")\" id=\"legendType\" name=\"legendType\"&gt;&lt;option value=\"line\"&gt;Line&lt;/option&gt;&lt;option value=\"column\"&gt;Column&lt;/option&gt;&lt;option value=\"bar\"&gt;Bar&lt;/option&gt;&lt;option value=\"scatter\"&gt;Scatter&lt;/option&gt;&lt;option value=\"area\"&gt;Area&lt;/option&gt;&lt;option value=\"spline\"&gt;Spline&lt;/option&gt;&lt;option value=\"areaspline\"&gt;Area Spline&lt;/option&gt;&lt;/select&gt;&lt;/td&gt;&lt;/tr&gt;");
                  $("#legendAxis").val(yAxis);
                  $("#legendType").val(type);
                  return;
              };
  
              function updateSeriesFromDialog(id){
                   var chart = $('#container').highcharts();
                   console.log("in update from Dialog series");
                   chart.series[id].update({
                       type: $("#legendType").val(),
                       yAxis: parseInt($("#legendAxis").val())
                  });
              };
  </code></pre>