I have a table Stringgrid1 , consisting of 2 columns X and Y, also have combobox1 , which shows how many rowcount in stringgrid1 . How to draw a graph by coordinates (for example, x=30, 45, 63, 55; y=35, 58, 84, 89; )?
Those. with combobox1 (1) a point is drawn with coordinates (30,35) , when in combobox1 value (2), a line is drawn from a point with coordinates (30,35) to a point (45,58) , etc. Sample code:
 for i:=1 to StringGrid1.RowCount-1 do begin image1.Canvas.MoveTo(trunc(x),trunc(y)); x:=strtoint(stringgrid1.cells[2,i]); y:=strtoint(stringgrid1.cells[1,i]); end 