Page 1 of 1

Failed to change the offset of CursorLine Tool

Posted: Mon Mar 03, 2014 9:11 am
by 16566869
Failed to change the offset of CursorLine Tool by following code..

Code: Select all

	cursorLine->Snap = true;
	cursorLine->Series = Series1;
	Series1->Add(1.0);
	Series1->Add(2.0);
	Series1->Add(3.0);

	// Try to change the Y axis offset of Curorline to 2.0,
	// but failed.
	cursorLine->YValue = 2.0;
CursorLine.png
CursorLine.png (42.27 KiB) Viewed 7864 times

Re: Failed to change the offset of CursorLine Tool

Posted: Mon Mar 03, 2014 9:16 am
by 16566869
If I add some code like below...
when I clicked the Button1, it seems working well...

Code: Select all

void __fastcall TForm2::Button1Click(TObject *Sender)
{
	cursorLine->YValue = 2.0;
}

Re: Failed to change the offset of CursorLine Tool

Posted: Mon Mar 03, 2014 10:09 am
by 16566869
BTW, I am using the newest version for Firemonkey (201309)

Re: Failed to change the offset of CursorLine Tool

Posted: Mon Mar 03, 2014 4:07 pm
by yeray
Hello,

This is because the chart needs to be repainted before it can correctly apply the new position.
The easiest way to workaround this is to assign the new position twice at the startup:

Code: Select all

cursorLine->YValue = 2.0;
cursorLine->YValue = 2.0;

Re: Failed to change the offset of CursorLine Tool

Posted: Tue Mar 04, 2014 9:53 am
by 16566869
Thank you !
So is it a bug?

Re: Failed to change the offset of CursorLine Tool

Posted: Tue Mar 04, 2014 2:55 pm
by yeray
Hello,

This was a bug we already fixed here:
http://bugs.teechart.net/show_bug.cgi?id=468

However, this seems to be broken again.
We've done another modification that I hope will fix this definitively.
This will be included in the next maintenance release.