This example uses the **point-slope** form for the equation of a line when 2 points are known. It extendx/contains the line within the X-axis and Y-axis

Scenerio:Point-slope: m=(y2-Y)/(x2-X) y – X = m*(x – Y) equation: y=m*x-m*X+Y x=(y+m*X-Y)/m Green line is original points. Dashed line ends at x,y axis (black dots). |
Known Points
x1= y1= x2= y2= X,Y Axis Points (black dots)
x1= y1= x2= y2= |

SVG Source: Javascript:

OK in:IE11/CH32/FF23