Page 1 of 1

Point3d AddXYZ?

Posted: Thu May 18, 2017 9:07 pm
by 16480970
Our code that worked with previous versions of TeeChart no longer work with the latest version. One problem is that while the documentation lists the call args for AddXYZ as
Description
To see a visual representation of this Series type, go to the TeeChart User Guide.
This Series is very similar to a TPointSeries, adding Z values for each point:

Series1.AddXYZ( 123, 456, 789 , 'Hello', clRed );

Our code that leaves out the 'Hello' and color:
Series7->AddXYZ(0.0,0.0,0.0);
works fine, but code that does not
Series6->AddXYZ(1.0,0.0,0.0,L"N",clRed); // north

Causes an access violation. Does anyone have any ideas?

Windows 7. Rad Studio 10 Seattle. Steema TeeChart Pro VCL FMX 2017.21

Thanks,
Mike

Re: Point3d AddXYZ?

Posted: Fri May 19, 2017 11:51 am
by 10050769
Hello Mike

I'm afraid I can't reproduce the problem you're experiencing here using latest TeeChart Pro/VCL 2017.21 and the code below:

Code: Select all

uses  VCLTee.TeeSurfa, VCLTee.TeePoin3, VCLTee.Series;
var points3d :TPoint3DSeries;
procedure TForm3.FormCreate(Sender: TObject);
begin
      points3d := TPoint3DSeries.Create(Self);
      Chart1.AddSeries(points3d);
      points3d.AddXYZ(1,2,3);
      points3d.AddXYZ(2,3,3);
      points3d.AddXYZ(3,5,4);
end;
Could you modify the code above because we can reproduce the problem here?

Thanks in advance

Re: Point3d AddXYZ?

Posted: Fri May 19, 2017 8:33 pm
by 16480970
I believe the problem is moving from an older version to a newer one.

Re: Point3d AddXYZ?

Posted: Fri May 19, 2017 10:52 pm
by 16480970
OK, I believe I see the problem now. If I turn off "Link with Runtime packages" and turn off "Link with Dynamic RTL" I get the error with this simple code:
1. Drop a TChart on a form.
2. Add this code
Series1 = new TLineSeries( this );
Series1->Title = UnicodeString( "NewSeries" );
Series1->Color = clBlack;
Series1->ParentChart = Chart1;
Series1->Pointer->Style = psRectangle;
Series1->Pointer->Visible = false;
Series1->Stacked = cssNone;
Series1->XValues->Order = loNone;
Series1->LinePen->Style = Graphics::psSolid;

Series1->AddXY( 34, -118, UnicodeString( L"Hello" ), clBlack ); // Error HERE
"Project TeeChartTest.exe raised exception class ChartException with message 'Series Delete: ValueIndex 59524780 out of bounds (0 to -1).'

Could you please take a look at this?
Thanks,
Mike

Re: Point3d AddXYZ?

Posted: Tue May 23, 2017 3:44 pm
by 10050769
Hello Mike,

Many thanks for your indications. I have added the problem to Teechart Pro VCL bugzilla tracker to fix the problem to upcoming versions. Here's the link: http://bugs.teechart.net/show_bug.cgi?id=1871.

Feel free to add your mail to the CC list to be automatically notified when an update arrives

Thanks in advance