code: function () {
                  var _this = this;
                  /** @type {?} */
                  var canvas = this.canvas.nativeElement;
                  /** @type {?} */
                  var ctx = canvas.getContext('2d');
                  ctx.lineWidth = this.weight;
                  ctx.strokeStyle = this.color;
                  ctx.beginPath();
                  this._sortedPoints.forEach(function (point, index) {
                      if (index === 0) {
                          ctx.moveTo(point.x, point.y);
                      }
                      if (index !== _this._sortedPoints.length - 1) {
                          /** @type {?} */
                          var nextPoint = _this._sortedPoints[index + 1];
                          ctx.lineTo(nextPoint.x, nextPoint.y);
                      }
                      else {
                          ctx.closePath();
                      }
                  });
                  ctx.stroke();
              }
docs: draws a line between the points according to their order
  @private
  @return {?}