Problem with AddXY function

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
WCordes
Newbie
Newbie
Posts: 1
Joined: Fri Nov 15, 2002 12:00 am

Problem with AddXY function

Post by WCordes » Wed Oct 23, 2013 3:32 pm

I have encountered a problem with the AddXY for the TPointSeries and TLineSeries functions in TeeChart v2013.08.130521. When adding values in normal order (1,2,3,4, etc.) everything works as expected but when I add a number out of this order the point labels are broken. Example:

pos = ps->AddXY( 1, 2, "a", clBlue );
pos = ps->AddXY( 2, 6, "b", clBlue );
pos = ps->AddXY( 3, 8, "c", clBlue );
pos = ps->AddXY( 4, 13, "d", clBlue );
pos = ps->AddXY( 5, 17, "e", clBlue );
pos = ps->AddXY( 6, 23, "f", clBlue );
pos = ps->AddXY( 7, 33, "g", clBlue );

Ok, until now. The problem starts with

pos = ps->AddXY( 1.2, -5, "h", clBlue );

This point is inserted at Position 2 (between <1,2,"a"> and <2,6,"b">) and as a result point 2,6 got the label "c" (was "b") and and all higher points got also a shifted label ("c"=>"d", "d"=>"e", etc.), and the last point <7,33,"g"> has lost its label (was "g").

Added 2013-10-24:
The thread "MAJOR XY Series Marks BUG!!" describes the same problem (I use XE4, too) and the solution with the modified TeEngine.pas shown there also solves the problem I have described.

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

Re: Problem with AddXY function

Post by Yeray » Thu Oct 24, 2013 2:59 pm

Hello,

I'm glad to see you found the solution.
I'll put here the link to it for others to easily find it:
http://www.teechart.net/support/viewtop ... 500#p62500
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