I have a series that is based on the following:
x (horizontal) axis: 12 months for current year.
y (vertical) axis: inches of rain that fell in that month (units is inch)
Now, I have my series data and all charts well.
The one thing I also have is the starting point (pt A) and end point (pt B) for a simple linear regression line that I need to draw a straight line from pt A to pt B to show the trend over time. Point A will reside in the first column (January) and point B will reside in the last column (December). ( I am using canvas for the charting).
I would prefer to do this with the 2 end points I already have as opposed to determining each point for each month to create a different chart series based on these points where due to rounding et al - which could result in this new curve not being perfectly perfectly straight.
So I guess in short, is it possible to draw a straight line from month 1 to month 12 on a chart knowing only 2 points where the line would be inserted via svg et al at dynamically?