Page 1 of 1

Problem with AddXY function

Posted: Wed Oct 23, 2013 3:32 pm
by 8440816
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.

Re: Problem with AddXY function

Posted: Thu Oct 24, 2013 2:59 pm
by yeray
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