How to get all the points (x,y) lying on the line connecting two data-points in a chart in jfreechart ?.
In a chart, as we point to the end-points of the line, it shows the x & y coordinates. Can't we get the coordinates at any point on the line (via code)?
As you have two points, use the formulae of a linear equation to obtain the slope and intercept of the line. Once you have the equation, you can evaluate it at any point.
Addendum: The org.jfree.data.statistics.Regression
class offers some built-in support for regression analysis.
来源:https://stackoverflow.com/questions/10086306/points-on-a-line-in-jfreechart