function generateFit(axisStart, axisEnd) {
  // address the special case when the slope is infinite
  if (axisStart.x === axisEnd.x) {
    return {
      left: axisStart.y,
      right: axisEnd.y,
      slope: 0,
      offset: axisStart.x
    };
  }
  const slope = (axisStart.y - axisEnd.y) / (axisStart.x - axisEnd.x);
  return {
    left: axisStart.x,
    right: axisEnd.x,
    // generate the linear projection of the axis direction
    slope,
    offset: axisStart.y - slope * axisStart.x
  };
}
Generate a description of a decorative axis in terms of a linear equation
y = slope * x + offset in coordinates
@param {Object} axisStart Object of format {x, y} describing in coordinates
the start position of the decorative axis
@param {Object} axisEnd Object of format {x, y} describing in coordinates
the start position of the decorative axis
@returns {Number} Object describing each the line in coordinates