Page 1 of 1

Only ploting straight line

Posted: Tue Jan 04, 2011 8:08 pm
by 16558319
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

Re: Only ploting straight line

Posted: Mon Jan 10, 2011 3:05 pm
by narcis
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;
	}
}