code: function getLineWidth(itemModel, rawLayout) {
      var lineWidth = itemModel.get(BAR_BORDER_WIDTH_QUERY) || 0;
      return Math.min(lineWidth, Math.abs(rawLayout.width), Math.abs(rawLayout.height));
  }
docs: In case width or height are too small.