docs: function drawSeriesBars(series, ctx, plotOffset, plotWidth, plotHeight, drawSymbol, getColorOrGradient) {
              function plotBars(datapoints, barLeft, barRight, fillStyleCallback, axisx, axisy) {
                  var points = datapoints.points,
                      ps = datapoints.pointsize,
                      fillTowards = series.bars.fillTowards || 0,
                      calculatedBottom = fillTowards > axisy.min ? Math.min(axisy.max, fillTowards) : axisy.min;
  
                  for (var i = 0; i < points.length; i += ps) {
                      if (points[i] == null) {
                          continue;
                      }
  
                      // Use third point as bottom if pointsize is 3
                      var bottom = ps === 3 ? points[i + 2] : calculatedBottom;
                      drawBar(points[i], points[i + 1], bottom, barLeft, barRight, fillStyleCallback, axisx, axisy, ctx, series.bars.horizontal, series.bars.lineWidth);
                  }
              }
  
              ctx.save();
              ctx.translate(plotOffset.left, plotOffset.top);
  
              var datapoints = {
                  format: series.datapoints.format,
                  points: series.datapoints.points,
                  pointsize: series.datapoints.pointsize
              };
  
              if (series.decimate) {
                  datapoints.points = series.decimate(series, series.xaxis.min, series.xaxis.max, plotWidth);
              }
  
              ctx.lineWidth = series.bars.lineWidth;
              ctx.strokeStyle = series.color;
  
              var barLeft;
              var barWidth = series.bars.barWidth[0] || series.bars.barWidth;
              switch (series.bars.align) {
                  case "left":
                      barLeft = 0;
                      break;
                  case "right":
                      barLeft = -barWidth;
                      break;
                  default:
                      barLeft = -barWidth / 2;
              }
  
              var fillStyleCallback = series.bars.fill ? function(bottom, top) {
                  return getFillStyle(series.bars, series.color, bottom, top, getColorOrGradient);
              } : null;
  
              plotBars(datapoints, barLeft, barLeft + barWidth, fillStyleCallback, series.xaxis, series.yaxis);
              ctx.restore();
          }