AddXY() Method in TChartSeries Class

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
victoria
Newbie
Newbie
Posts: 6
Joined: Thu Dec 14, 2006 12:00 am

AddXY() Method in TChartSeries Class

Post by victoria » Thu Mar 24, 2011 1:47 pm

The AddXY() method returns -1 (error) on some machines I have installed my software on.
The exact same same software runs perfectly on other machines.
Maybe it's dependant on Window's version - not sure. Any suggestions?

Yeray
Site Admin
Site Admin
Posts: 9533
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: AddXY() Method in TChartSeries Class

Post by Yeray » Mon Mar 28, 2011 10:20 am

Hello victoria,

Could you please explain us more details more? What TeeChart version are you using, IDE, Windows version, series,...
It would be helpful if you could arrange a simple example project we can run as-is to reproduce the problem here.
Thanks in advance.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

victoria
Newbie
Newbie
Posts: 6
Joined: Thu Dec 14, 2006 12:00 am

Re: AddXY() Method in TChartSeries Class

Post by victoria » Mon Mar 28, 2011 12:01 pm

Yeray wrote:Hello victoria,

Could you please explain us more details more? What TeeChart version are you using, IDE, Windows version, series,...
It would be helpful if you could arrange a simple example project we can run as-is to reproduce the problem here.
Thanks in advance.
Thanks for the reply
C++ Builder Version 5 IDE
TeeChart Version 7
Normally running Windows 7 - but application should run on older versions also
Software runs perfectly on some Windows XP machines.
My application is as follow:
It is a post processor for some flow simulation model which we use widely.
I defined a scatter plot chart at design time with say 10 potential data series (empty at initialization) which is used for visualization of selected data sets.
During run time, data is loaded into the chart using *Series ->AddXY() or removed using *Series->Clear().

Code snippet Illustration below:
// Now Load data into graphs
Offset = atof(Edit5->Text.c_str());
for(i=0;i<NoPoints;i++)
{
pointno = ChartSeries[CurIBSet]->AddXY((double)(CurIBSet*Offset + IBData[CurIBSet]->Time),(double)IBData[CurIBSet]->P1,'Pb',clTeeColor);
ChartSeries[CurIBSet+8]->AddXY((double)(CurIBSet*Offset + IBData[CurIBSet]->Time),IBData[CurIBSet]->P2,'Pf',clTeeColor);
ChartSeries[CurIBSet+16]->AddXY((double)(CurIBSet*Offset + IBData[CurIBSet]->Time),IBData[CurIBSet]->P1-IBData[CurIBSet]->P2,'Pd',clTeeColor);
}
if(pointno > 1)
{
itoa(pointno-1,txt,10);
strcat(txt," data points loaded successfully.");
MessageBox(NULL,txt,"Message",MB_OK);
ChartSeries[CurIBSet]->Active = true;
ChartSeries[CurIBSet+16]->Active = true;
}
else
MessageBox(NULL,"","Data Load Error",MB_OK);


Now, on some machines the AddXY returns an error (-1) for some reason that I cannot grasp - it seems to be specifically some (not all) Windows XP machines.
I thought of installing the IDE on this machine and running the debugger....?
??

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: AddXY() Method in TChartSeries Class

Post by Narcís » Fri Apr 01, 2011 10:12 am

Hello Victoria,

Code snippet below works fine for me here using Windows 7, BCB 5 + Update1 and latest TeeChart Pro v7 VCL available at the client download area. Do you have BCB5 update 1 installed? Are you using latest v7 release? If the problem persists please attach a simple example project we can run "as-is" to reproduce the problem here.

Code: Select all

void __fastcall TForm1::FormCreate(TObject *Sender)
{
        for (int i=0; i<10; i++)
        {
                int tmp = Series1->AddXY(i, i, "", clTeeColor);
                Memo1->Lines->Add(IntToStr(tmp));
        }
}
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

victoria
Newbie
Newbie
Posts: 6
Joined: Thu Dec 14, 2006 12:00 am

Re: AddXY() Method in TChartSeries Class

Post by victoria » Thu Sep 15, 2011 8:37 pm

I think I have solved the problem. As far as I can figure it is probably a combination of the following:
1. Not all the required BPL's were installed on the target machine (Windows/System32/...) or
2. Not all the TeeChart runtime packages were included in the Build (Project/Options/Packages ...) or
3. The TeEngine.obj file has not been included in the linking step (#pragma link "TeEngine")
But I am not sure how the undefined AddXY() method could be called without generating an exception...?
Whatever - it seem everything works now.
Maybe someone can comment...?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: AddXY() Method in TChartSeries Class

Post by Narcís » Fri Sep 16, 2011 7:48 am

Hi victoria,

Thanks for your feedback. The only reason I can think of is TeeChart not being correctly installed/referenced in that machine and it used older or default TeeChart libraries which may have a bug in that method.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply