TPolarSeries incorrect lines

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Stephen Chamberlain
Newbie
Newbie
Posts: 3
Joined: Mon Jun 06, 2011 12:00 am

TPolarSeries incorrect lines

Post by Stephen Chamberlain » Thu Jun 16, 2011 7:24 am

Hi TeeCharters,

I have a problem using the TPolarSeries in a polar plot. We have a graph in the GUI and we also generate a similar graph for inclusing in a crystal reports report. The only real difference are series colours and some font sizes to make the graph easier to read in printed form. The code to add data to polar series for the two charts is the same. We first sort the data in ascending degrees and then add the points to the polar series using AddPolar, so 0 degrees is added, then 15 degrees, 30 degrees and so on. This gives the result below in the GUI:
ok.png
Good series in GUI
ok.png (15.31 KiB) Viewed 2986 times
When we generate the same graph for reporting, we get this result:
ok.png
Good series in GUI
ok.png (15.31 KiB) Viewed 2986 times
I am at a loss to explain why the lines between the points are incorrectly connected. There does not appear to be any duplication in the data being added to the series (I have added logging to our code to print every time a point is added and the same data is being added to both graphs).

I am sure that this is something to do with our code and its use of the series and/or tee chart, but I am not sure what properties would be controlling this behaviour. Any suggestions would be greatly appreciated.

Best Regards,
Steve Chamberlain.
Attachments
nok.png
Incorrect line connections in print
nok.png (50.14 KiB) Viewed 3040 times

Stephen Chamberlain
Newbie
Newbie
Posts: 3
Joined: Mon Jun 06, 2011 12:00 am

Re: TPolarSeries incorrect lines

Post by Stephen Chamberlain » Thu Jun 16, 2011 7:27 am

I dont seem to be able to edit my post, but the 3rd screenshot should be where the 2nd screenshot is.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: TPolarSeries incorrect lines

Post by Narcís » Thu Jun 16, 2011 8:56 am

Hi Steve,
I dont seem to be able to edit my post,


Really? You should be able to do so using the "edit" button.
but the 3rd screenshot should be where the 2nd screenshot is.
Ok, that's enough for now :wink:. Seeing the image I think it could be a problem with series values order. Before populating your series you could make sure that they are not sorted:

Code: Select all

  Series1.XValues.Order:=loNone;
  Series1.YValues.Order:=loNone;
If this doesn't help please attach a simple example project we can run "as-is" to recreate the same chart here.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Stephen Chamberlain
Newbie
Newbie
Posts: 3
Joined: Mon Jun 06, 2011 12:00 am

Re: TPolarSeries incorrect lines

Post by Stephen Chamberlain » Thu Jun 16, 2011 1:48 pm

Hi Narcis,

Thanks very much, that's done the trick! :D

About editing, I only seem to be able to "report this post", I dont see the ability to edit; never mind, maybe it's linked to my account. It's not important :)

Thanks again!

Post Reply