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 

Adding TChart series

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Ben Lambert
Guest





PostPosted: Tue May 15, 2007 1:12 am    Post subject: Adding TChart series Reply with quote



Hello,

Probably a really basic question, but the Delphi-only helpfiles/example code
for TChart make it very difficult for a C++-only user to understand. I am
trying to add a TLineSeries to a TChart at run time. The Delphi help says
to use:

procedure TForm1.Button2Click(Sender: TObject);
var tmpLineSeries:TLineSeries;
begin
tmpLineSeries:=TLineSeries.Create(self);
Chart1.AddSeries(tmpLineSeries);
tmpLineSeries.FillSampleValues(10);
end;

I tried to implement this as:

TLineSeries *tmpLineSeries = new TLineSeries;
Chart1->AddSeries(tmpLineSeries);

but then using either
tmpLineSeries->Clear();

or
tmpLineSeries->AddXY(1,2);

causes my program to crash! There appears to be no C++ equivalent of
TLineSeries->Create(); used in the Delphi example code.

Anyone able to provide a quick set of C++ example code for adding series to
TCharts?

Thanks,

Ben.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) 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.