model.controlPointNextX = Math.max(Math.min(controlPoints.next.x, chartArea.right), chartArea.left);