Updating polar plot from TeeChart 7.08 to v2010

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Steve Chamberlain
Newbie
Newbie
Posts: 11
Joined: Tue Jun 15, 2010 12:00 am

Updating polar plot from TeeChart 7.08 to v2010

Post by Steve Chamberlain » Fri May 13, 2011 1:50 pm

Hi All,

I have a migration issue which I hope you can help with. We have a legacy BDS 2006 C++ builder project which also used TeeChart 7.08 components to create a polar plot graph. We have migrated the project to RAD Studio 2010 and TeeChart v2010 VCL.

Below is the good polar plot from BDS 2006/TeeChart 7.08 (ignore the squashed effect, this is due to a remote connection)
good - bds2006-teechart708.png
good - bds2006-teechart708.png (21.69 KiB) Viewed 11528 times
The problem I now have is that all points on our polar plot now appear on the zero degree line, that is they are scattered between the origin and the top of the polar plot. Are there any changes to the components in the intervening versions that could account for this behaviour, or is there something I could check for in our code that may be causing this effect?

Below is the incorrect result in RAD Studio 2010/TeeChart v2010 VCL
bad - radStudio2010-teechartv2010.png
bad - radStudio2010-teechartv2010.png (19.1 KiB) Viewed 11594 times
Additionally, the colours of the series have changed, even though we have not changed any code to do this.

Steve Chamberlain.

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

Re: Updating polar plot from TeeChart 7.08 to v2010

Post by Narcís » Fri May 13, 2011 2:55 pm

Hi Steve,

Which is the exact TeeChart 2010 release you are using? At the version info page you can see several issues regarding polar series have been fixed in recent updates. Can you please check if latest TeeChart 2010 VCL release solves the problem at your end? If it doesn't, could you please attach a simple example project we can run "as-is" to reproduce the problem 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

Steve Chamberlain
Newbie
Newbie
Posts: 11
Joined: Tue Jun 15, 2010 12:00 am

Re: Updating polar plot from TeeChart 7.08 to v2010

Post by Steve Chamberlain » Mon May 16, 2011 6:29 am

Thanks for the feedback. I just downloaded v2011, so I should have the very latest and greatest. My project is now rebuilding, I will let you know if this solves the problems :)

Steve

Steve Chamberlain
Newbie
Newbie
Posts: 11
Joined: Tue Jun 15, 2010 12:00 am

Re: Updating polar plot from TeeChart 7.08 to v2010

Post by Steve Chamberlain » Mon May 16, 2011 8:53 am

Ok, it seems updating to the new version did not help, so I am assuming it is something to do with our code. We have been using the AddXY method to add points to our polar series and I have now been experimenting with AddPolar with differing results. Is this the correct way to be adding points to the polar series?

Steve Chamberlain
Newbie
Newbie
Posts: 11
Joined: Tue Jun 15, 2010 12:00 am

Re: Updating polar plot from TeeChart 7.08 to v2010

Post by Steve Chamberlain » Mon May 16, 2011 9:47 am

Hi Narcis,

I am still having trouble with this. I have created a small project to demonstrate the issue.

In the code, I add some values to two series:

Series1->AddPolar(0, 0.1);
Series1->AddPolar(90, 0.1);
Series1->AddPolar(180, 0.1);
Series1->AddPolar(270, 0.1);

Series2->AddPolar(0, 0.3);
Series2->AddPolar(90, 0.3);
Series2->AddPolar(180, 0.3);
Series2->AddPolar(270, 0.3);

Neither of the resulting series give me what I expect:
polar series.jpg
polar series.jpg (31.37 KiB) Viewed 11515 times
I have (admittedly crudely) photoshopped my expected result over this screenshot (I just used black lines for illustration, they should be in the same colour as the series of course):
polar series - expected.jpg
polar series - expected.jpg (97.53 KiB) Viewed 11514 times
I hope this helps, I really need to solve this soon.

Steve.
Attachments
ProjectTest.zip
Contains source code for demo project
(7.58 KiB) Downloaded 419 times

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

Re: Updating polar plot from TeeChart 7.08 to v2010

Post by Yeray » Tue May 17, 2011 9:04 am

Hello Steve,

It only seems to me a question of axis setup. If I add the following to your code I think it looks as you want:

Code: Select all

	Chart1->Axes->Bottom->SetMinMax(0, 0.4);
Note that at design time you've forced Left axis (vertical axis in TPolarSeries) to automatic=false, minimum=0 and maximum=0.4. With the code above I force the same for the Bottom axis (horizontal axis in TPolarSeries).
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

Steve Chamberlain
Newbie
Newbie
Posts: 11
Joined: Tue Jun 15, 2010 12:00 am

Re: Updating polar plot from TeeChart 7.08 to v2010

Post by Steve Chamberlain » Tue May 17, 2011 10:01 am

Hi Yeray,

Thanks for the tip! I can now produce a good test chart as you observed.

However, when I apply this technique to my main chart, it is improved, but still not correct:
polar plot - better.jpg
polar plot - better.jpg (72.92 KiB) Viewed 11409 times
It looks like the lines are joined incorrectly; do you maybe have any theories about what could be incorrect here? I can't send you the code for this production chart unfortunately, but all suggestions are most welcome!

Thanks again!
Steve

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

Re: Updating polar plot from TeeChart 7.08 to v2010

Post by Yeray » Wed May 18, 2011 8:16 am

Hello Steve,

I'd suggest you to set Bottom and Left axes to be automatic so they'll take the minimum and maximum to fit the visible series. In the testing example above where all the values where 0.1 or 0.3, the axes would be set to minimum=0.1 and maximum=0.3 and the Series1 doesn't look very well because all its values are 0.1 so they are drawn in the center. In that case, where you might want to set a minimum lower than the minimum visible value (0 instead of 0.1), you should force it (to both Left and Bottom axes).
So, ensuring that both axes have the same minimum and maximum should mean to have a proportional looking Polar series.
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

Steve Chamberlain
Newbie
Newbie
Posts: 11
Joined: Tue Jun 15, 2010 12:00 am

Re: Updating polar plot from TeeChart 7.08 to v2010

Post by Steve Chamberlain » Thu May 19, 2011 10:53 am

Hi Yeray,

Thanks for the tip, changing the axes have definately helped (all points are at least inside the polar plot and not outside). However, it still hasn't solved the issue (see the previous post's screenshot, or the coloured series in the following screenshots).

I added a simple black ring to the graph using another polar series. The radius value can be changed dynamically in the application.

When this ring is drawn, the point coordinates seem to be adjusted proportionally somehow. The series is set to circled and each point is added at the same radius value, so I expect to see circles, instead I see ovals when the radius value is 0.1 or 0.3 and an approximate circle at radius 0.2:
black ring - 0.1.jpg
Radius value = 0.1
black ring - 0.1.jpg (56.58 KiB) Viewed 11395 times
black ring - 0.2.jpg
Radius value = 0.2
black ring - 0.2.jpg (56.86 KiB) Viewed 11355 times
black ring - 0.3.jpg
Radius value = 0.3
black ring - 0.3.jpg (56.56 KiB) Viewed 11386 times
Is there some way to disable this proportional effect and just draw the points exactly as I specify them?

Steve

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

Re: Updating polar plot from TeeChart 7.08 to v2010

Post by Yeray » Fri May 20, 2011 1:14 pm

Hello Steve,

I'm trying to reproduce it with the attached testing application but it seems to respond as expected.
Could you please take a look at it to try to find out what are you doing different than me?
PolarRadius.zip
(1.8 KiB) Downloaded 450 times
Please, try to modify it so we can reproduce the problem here or please, try to arrange a simple example project we can run as-is to reproduce the problem here.
Thanks in advance.
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

Steve Chamberlain
Newbie
Newbie
Posts: 11
Joined: Tue Jun 15, 2010 12:00 am

Re: Updating polar plot from TeeChart 7.08 to v2010

Post by Steve Chamberlain » Mon May 23, 2011 6:07 am

Hi Yeray,

Your example works and I cannot reproduce it in a simple example. I will try to examine the differences to try to work out what the problem is.

Steve.

Steve Chamberlain
Newbie
Newbie
Posts: 11
Joined: Tue Jun 15, 2010 12:00 am

Re: Updating polar plot from TeeChart 7.08 to v2010

Post by Steve Chamberlain » Wed May 25, 2011 7:20 am

Hi Yeray,

Finally solved! I had to make several changes to get it to work, but my polar plots now look as they should. Setting the left and bottom axes to automatic did the trick. The other problems I had drawing the series were to do with a change in our code, so now everything is behaving as it should.

Many thanks for all the help!

Steve

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

Re: Updating polar plot from TeeChart 7.08 to v2010

Post by Yeray » Wed May 25, 2011 7:43 am

Hello Steve,

I'm glad to have been helpful and happy to see you've found it! :D
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