[solved] Problem with a TChartShape

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Komar
Newbie
Newbie
Posts: 25
Joined: Thu Feb 10, 2005 5:00 am
Location: Savoie - France

[solved] Problem with a TChartShape

Post by Komar » Fri Aug 31, 2007 10:36 am

Hi,

I have a problem in my program with a TChartShape.
First I create this series in my code with these instructions :

Code: Select all

TChartShape *serieTexte;   
serieTexte = new TChartShape(this);
serieTexte->Active = true; 
serieTexte->Visible=true;
serieTexte->Style = chasRectangle;
serieTexte->Transparent=true;
graphDetail->AddSeries(serieTexte);
In run time i can see this my serie.
Then I want to move my serie on my graph with these instructions :

Code: Select all

TChartShape *serieTexte;   
serieTexte = new TChartShape(this);
serieTexte->Active = true; 
serieTexte->Visible=true;
serieTexte->Style = chasRectangle;
serieTexte->Transparent=true;

serieTexte->AddXY(60,60);
serieTexte->AddXY(140,140);

graphDetail->AddSeries(serieTexte);
And here is the problem, i can't see my serie even so my axis scales are correct. the serie has disappear.
Do you know where is my mistake ?
Regards
Last edited by Komar on Fri Aug 31, 2007 12:09 pm, edited 1 time in total.

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

Post by Narcís » Fri Aug 31, 2007 11:36 am

Hi lp,

The problem is on how you populate shape series. You need to use X0, Y0, X1 and Y1 properties as shown here:

Code: Select all

	TChartShape *serieTexte;
	serieTexte = new TChartShape(this);
	serieTexte->Active = true;
	serieTexte->Visible=true;
	serieTexte->Style = chasRectangle;
	serieTexte->Transparent=true;

	//serieTexte->AddXY(60,60);
	//serieTexte->AddXY(140,140);

	serieTexte->X0=60;
	serieTexte->Y0=60;
	serieTexte->X1=140;
	serieTexte->Y1=140;

	graphDetail->AddSeries(serieTexte);
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

Komar
Newbie
Newbie
Posts: 25
Joined: Thu Feb 10, 2005 5:00 am
Location: Savoie - France

Post by Komar » Fri Aug 31, 2007 12:08 pm

Hi Narcis,

Thank you very much, your solution have solve my problem.
Regards.

Post Reply