code: function (legend) {
  
              var options = this.options,
                markerOptions = options.marker,
                radius,
                legendOptions = legend.options,
                legendSymbol,
                symbolWidth = legend.symbolWidth,
                renderer = this.chart.renderer,
                legendItemGroup = this.legendGroup,
                verticalCenter = legend.baseline - mathRound(renderer.fontMetrics(legendOptions.itemStyle.fontSize, this.legendItem).b * 0.3),
                attr;
  
              // Draw the line
              if (options.lineWidth) {
                  attr = {
                      'stroke-width': options.lineWidth
                  };
                  if (options.dashStyle) {
                      attr.dashstyle = options.dashStyle;
                  }
                  this.legendLine = renderer.path([
                        M,
                        0,
                        verticalCenter,
                        L,
                        symbolWidth,
                        verticalCenter
                    ])
                    .attr(attr)
                    .add(legendItemGroup);
              }
  
              // Draw the marker
              if (markerOptions && markerOptions.enabled !== false) {
                  radius = markerOptions.radius;
                  this.legendSymbol = legendSymbol = renderer.symbol(
                    this.symbol,
                      (symbolWidth / 2) - radius,
                      verticalCenter - radius,
                      2 * radius,
                      2 * radius
                    )
                    .add(legendItemGroup);
                  legendSymbol.isMarker = true;
              }
          }
docs: Get the series' symbol in the legend. This method should be overridable to create custom
  symbols through Highcharts.seriesTypes[type].prototype.drawLegendSymbols.
  
  @param {Object} legend The legend object