Only ploting straight line

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Bill
Newbie
Newbie
Posts: 21
Joined: Mon Jan 03, 2011 12:00 am

Only ploting straight line

Post by Bill » Tue Jan 04, 2011 8:08 pm

Hi,

I've just upgraded to TeeChart Pro 2010.v2010.01.11004. Installed it under BCB Pro XE, and tried the following.

Create an New Form. Drag a TChart to the form. Add a TFastLineSeries to TChart1. Add the following


//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
for(int i = 0; i < 101; i++)
Series1->AddXY(i, i * i, "", clRed);
}

When I run this, this only gives me a straight line centered at Y = 0.0 for some reason. Apparently all the Y values are 0.0. I've tried the same code under BCB 2010 and TChart 8, I get the correct result.

Where is the problem?

Thanks

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

Re: Only ploting straight line

Post by Narcís » Mon Jan 10, 2011 3:05 pm

Hi Bill,

Thanks for reporting. This is a bug which I have added to the defect list (TV52015353) to be fixed for next releases. That's weird because it works fine in Delphi. In the meantime a workaround is this:

Code: Select all

void __fastcall TForm1::FormCreate(TObject *Sender)
{
	for(int i = 0; i < 101; i++)
	{
		double tmp = i * i;
		Series1->AddXY(i, tmp, "", clRed);
		Series1->YValues->Value[i] = tmp;
	}
}
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