Failed to change the offset of CursorLine Tool

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
elmec
Advanced
Posts: 129
Joined: Mon Aug 26, 2013 12:00 am

Failed to change the offset of CursorLine Tool

Post by elmec » Mon Mar 03, 2014 9:11 am

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 7599 times
Attachments
CursorLine.zip
Example project
(74.68 KiB) Downloaded 438 times

elmec
Advanced
Posts: 129
Joined: Mon Aug 26, 2013 12:00 am

Re: Failed to change the offset of CursorLine Tool

Post by elmec » Mon Mar 03, 2014 9:16 am

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;
}

elmec
Advanced
Posts: 129
Joined: Mon Aug 26, 2013 12:00 am

Re: Failed to change the offset of CursorLine Tool

Post by elmec » Mon Mar 03, 2014 10:09 am

BTW, I am using the newest version for Firemonkey (201309)

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

Re: Failed to change the offset of CursorLine Tool

Post by Yeray » Mon Mar 03, 2014 4:07 pm

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;
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

elmec
Advanced
Posts: 129
Joined: Mon Aug 26, 2013 12:00 am

Re: Failed to change the offset of CursorLine Tool

Post by elmec » Tue Mar 04, 2014 9:53 am

Thank you !
So is it a bug?

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

Re: Failed to change the offset of CursorLine Tool

Post by Yeray » Tue Mar 04, 2014 2:55 pm

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.
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

Post Reply