 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ben Lambert Guest
|
Posted: Tue May 15, 2007 1:12 am Post subject: Adding TChart series |
|
|
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 |
|
 |
|
|
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
|
|