code: function (newOptions, redraw) {
              var series = this,
                chart = this.chart,
              // must use user options when changing type because this.options is merged
              // in with type specific plotOptions
                oldOptions = this.userOptions,
                oldType = this.type,
                proto = seriesTypes[oldType].prototype,
                preserve = ['group', 'markerGroup', 'dataLabelsGroup'],
                n;
  
              // Make sure groups are not destroyed (#3094)
              each(preserve, function (prop) {
                  preserve[prop] = series[prop];
                  delete series[prop];
              });
  
              // Do the merge, with some forced options
              newOptions = merge(oldOptions, {
                  animation: false,
                  index: this.index,
                  pointStart: this.xData[0] // when updating after addPoint
              }, { data: this.options.data }, newOptions);
  
              // Destroy the series and reinsert methods from the type prototype
              this.remove(false);
              for (n in proto) { // Overwrite series-type specific methods (#2270)
                  if (proto.hasOwnProperty(n)) {
                      this[n] = UNDEFINED;
                  }
              }
              extend(this, seriesTypes[newOptions.type || oldType].prototype);
  
              // Re-register groups (#3094)
              each(preserve, function (prop) {
                  series[prop] = preserve[prop];
              });
  
  
              this.init(chart, newOptions);
              chart.linkSeries(); // Links are lost in this.remove (#3028)
              if (pick(redraw, true)) {
                  chart.redraw(false);
              }
          }
docs: Update the series with a new set of options