Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Plot a graph using values entered to a string grid

Status
Not open for further replies.

sanjna000

Programmer
Aug 1, 2003
132
GB
Hi ,

Does anyone know how to plot a graph (in a panel) by using values entered to a string grid?

Thanks for your help in advance

Sanjna...
 
Do you mean to use a TChart on the panel?

If so

then you would do something like this



procedure PopulateGraph;
var Count : integer;
begin
With StringGrid do
begin
for Count := 0 to Rowcount-1 do
begin
Series1.AddXY(strtofloat(Cells[0,Count]),strtofloat(Cells[1,Count]), '' , clTeeColor );
end;
end;
end;


Hope it helps

Andrew
 
Hi Andrew,

Thank you so much for your help........ It did work fine.

Thanks again,
Sanjna...
 
Sanjna000,

If this worked fine for you, why not award Andrew with a star by marking his post as a helpful/expert post?

Click on the link with the red star at the bottom left hand corner of his post.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top