code: function() {
  
      this.selection.fireSelectEvent('selecting');
  
      var s = this.selection.selection,
        octx = this.octx,
        options = this.options,
        plotOffset = this.plotOffset,
        prevSelection = this.selection.prevSelection;
      
      if (prevSelection &&
        s.first.x == prevSelection.first.x &&
        s.first.y == prevSelection.first.y && 
        s.second.x == prevSelection.second.x &&
        s.second.y == prevSelection.second.y) {
        return;
      }
  
      octx.save();
      octx.strokeStyle = this.processColor(options.selection.color, {opacity: 0.8});
      octx.lineWidth = 1;
      octx.lineJoin = 'miter';
      octx.fillStyle = this.processColor(options.selection.color, {opacity: 0.4});
  
      this.selection.prevSelection = {
        first: { x: s.first.x, y: s.first.y },
        second: { x: s.second.x, y: s.second.y }
      };
  
      var x = Math.min(s.first.x, s.second.x),
          y = Math.min(s.first.y, s.second.y),
          w = Math.abs(s.second.x - s.first.x),
          h = Math.abs(s.second.y - s.first.y);
  
      octx.fillRect(x + plotOffset.left+0.5, y + plotOffset.top+0.5, w, h);
      octx.strokeRect(x + plotOffset.left+0.5, y + plotOffset.top+0.5, w, h);
      octx.restore();
    }
docs: Draws the selection box.