title: highcharts series remove function deletes all original series data (even after stored in new variable)
body: <p>Whenever I call series.remove() in my highcharts drilldown function the chart series is removed and unset as expected. However, I need to store that original chart data in order to "drill back up."</p>
  
  <p>I've saved the data into another variable, but calling remove also unsets the data that I stored in that variable. I'm guessing it is being stored by reference somehow?</p>
  
  <p>I've tried to copy the data using a jquery function but the data is still being wiped by the highcharts series.remove() function.</p>
  
  <p>Here's my onclick code:</p>
  
  <pre><code>function() {
  
      var drilldown = this.series.options.drilldownSeries;
  
      if (drilldown) {
          setChart(drilldown[this.category]);
      }
      else {
          setChart('drillUp');
      }
  }
  </code></pre>
  
  <p>And here's my setChart code:</p>
  
  <pre><code>window.rhChartDataBank = {};
  
  function setChart(data) {
  
      if (data !== 'drillUp'){
  
          //HERE'S WHERE i TRY TO COPY THE DATA TO ANOTHER PLACE
          if (window.rhChartDataBank._originalData === undefined || window.rhChartDataBank._originalCategories === undefined){
  
              var series0 = jQuery.extend(true, {}, hChart.series[0].data),
              series1 = jQuery.extend(true, {}, hChart.series[1].data);
  
              window.rhChartDataBank._originalData = [];
              window.rhChartDataBank._originalCategories = [];
  
              window.rhChartDataBank._originalData.push(series0);
              window.rhChartDataBank._originalData.push(series1);
              window.rhChartDataBank._originalCategories = hChart.series[0].xAxis.categories;
          }
  
          //Remove current series
          while(hChart.series.length &gt; 0){
              hChart.series[0].remove(false);
          }
  
          //Set new categories
          var newCategories = [];
          for (var i = 0; i &lt; data.length; i++) {
              newCategories.push(data[i].data.x);
          }
  
          //Set new data
          var newData = [];
          for (var i = 0; i &lt; data.length; i++) {
              newData.push(data[i].data.y);
          }
  
          hChart.xAxis[0].setCategories(newCategories, false);
  
          hChart.addSeries({
              type: 'column',  
              data: newData,
          }, false);
  
          hChart.redraw();
      }
      else{
          //Remove current series
          while(hChart.series.length &gt; 0){
              hChart.series[0].remove(false);
          }
  
          //BY THE TIME THIS RUNS window.rhChartDataBank._originalData is full of only null values.
  
          //Set old categories
          var oldCategories = [];
          for (var i = 0; i &lt; window.rhChartDataBank._originalCategories.length; i++) {
              oldCategories.push(window.rhChartDataBank._originalCategories[i]);
          }
  
          //Set old data
          var oldData = [];
          for (var i = 0; i &lt; window.rhChartDataBank._originalData[0].length; i++) {
              oldData.push(window.rhChartDataBank._originalData[0][i]['y']);
          }
  
          hChart.xAxis[0].setCategories(window.rhChartDataBank._originalCategories, false);
  
          //ADDING IN DUMMY DATA FOR NOW SINCE I CAN'T GET DATA FROM ORIGINAL CHART...
          var ddddata = [45,20,70];
  
          hChart.addSeries({
              type: 'column',  
              data: ddddata,
          }, false);
  
          hChart.redraw();
      }
  }
  </code></pre>