I'm wanting to take my Tchart (connected to a database query through a clientdataset) and draw a best fit line onto it. To do this (unless there is a built in method) I'm planning to work out the gradient of the first and the last data entries. How do I grab their coordinates to calculate the gradient for the line equation? This is what i want in psuedocode:
FirstXAxis := Datapoint[0].XAxis;
LastXAxis := Datapoint[LastEntry].XAxis;
I know this isn't strictly a line of best fit but I couldn't think of anything else (I'm new to graphical delphi and databases). How do I find LastEntry?
Please help me out, Toby