BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with a series created at runtime.

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Using
View previous topic :: View next topic  
Author Message
m610
Guest





PostPosted: Tue May 22, 2007 8:13 am    Post subject: Problem with a series created at runtime. Reply with quote



It seems simple enough, but I just can't figure out what I'm doing
wrong. I'm hoping that if I do, with help obviously, I'll be able to
figure out why me legends are messes up when I print the chart
(created at runtime, properties and values assigned, etc.)

When I create a series in the editor, this code works fine:

var Series1.TBarSeries;
..
with Series1 do
begin
Name:='Series1';
HorizAxis:=aBottomAxis;
VertAxis:=aLeftAxis;
Marks.Visible:=false;
Dark3D:=true;
BarStyle:=bsRectGradient;
BarWidthPercent:=80;
RefreshSeries;
end;

But the progam will not complie with this code:

Chart1.AddSeries(TBarSeries.Create(Form1));
with Chart1.Series[LapsChart.SeriesCount-1] do
begin
Name:='Series'+IntToStr(LapsChart.SeriesCount-1);
HorizAxis:=aBottomAxis;
VertAxis:=aLeftAxis;
Marks.Visible:=false;

//OK so far, but for the following lines:

Dark3D:=true;
BarStyle:=bsRectGradient;
BarWidthPercent:=80;

//I get "undeclared identifier" errors. Then the rest is OK.

RefreshSeries;
end;
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Using All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.