TPolarSeries: Invisible Point at (0,0)

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
jens.mertelmeyer
Newbie
Newbie
Posts: 60
Joined: Fri Nov 22, 2013 12:00 am

TPolarSeries: Invisible Point at (0,0)

Post by jens.mertelmeyer » Thu Oct 09, 2014 5:13 pm

I'm having trouble with the TPolarSeries.

Consider this simple chart with two TPolarSeries:

Code: Select all

	chart1.Axes.Left.SetMinMax(0.0, 20.0);
	chart1.Axes.Bottom.SetMinMax(0.0, 20.0);

	Series1.AddPolar(0.0, 10.0);
	Series1.AddPolar(90.0, 10.0);
	Series1.AddPolar(180.0, 10.0);
	Series1.AddPolar(270.0, 10.0);
Please have a look at how this chart is displayed in regard to Draw Style:
Draw Style - Curve.png
Draw Style: Curve
Draw Style - Curve.png (36.66 KiB) Viewed 17528 times
Draw Style - All.png
Draw Style: All
Draw Style - All.png (36.4 KiB) Viewed 17515 times
Draw Style - Segments.png
Draw Style: Segments
Draw Style - Segments.png (41.57 KiB) Viewed 17505 times


You can already see that there is something wrong about the "Segments" draw style.
Since I can only post three attachments, please see the next post.

By the way: I never found a way to EDIT my own posts. Is it possible?

jens.mertelmeyer
Newbie
Newbie
Posts: 60
Joined: Fri Nov 22, 2013 12:00 am

Re: TPolarSeries: Invisible Point at (0,0)

Post by jens.mertelmeyer » Thu Oct 09, 2014 5:16 pm

It gets even more interesting when we set "Close Circle" to False:
Draw Style - Segments, Don't close circle.png
Draw Style: Segments. Close Circle: False
Draw Style - Segments, Don't close circle.png (37.36 KiB) Viewed 17488 times

What is that invisible point in the center used for? Can I somehow circumvent having lines to the centre? You might want to say "Sure, just don't use the Segments draw style". The problem is that the TSeriesBand tool somehow uses a segment draw mode of the underlying series so that you're getting weird stuff when using a series band between two polar series:
Derp.png
Derp.png (42.66 KiB) Viewed 17485 times
Is there a suggested workaround for this?

jens.mertelmeyer
Newbie
Newbie
Posts: 60
Joined: Fri Nov 22, 2013 12:00 am

Re: TPolarSeries: Invisible Point at (0,0)

Post by jens.mertelmeyer » Thu Oct 09, 2014 6:04 pm

Holy cow, a triple-post.

I found out that the anomaly shown in the last picture actually hails from a different "RotationAngle" of both series. If both series have the same rotation angle, then everything looks pretty good. I will try to provide a minimal example for tomorrow about what you can easily trip over when using a TSeriesBandTool for two TPolarSeries.

jens.mertelmeyer
Newbie
Newbie
Posts: 60
Joined: Fri Nov 22, 2013 12:00 am

Re: TPolarSeries: Invisible Point at (0,0)

Post by jens.mertelmeyer » Fri Oct 10, 2014 7:26 am

This is more like a reminder to self about caveats when using a TSeriesBandTool on polar series:

When using a TSeriesBandTool on two TPolarSeries objects, make sure both share the same value for the property RotationAngle. When calling Rotate(Integer) on a TPolarSeries, also call Rotate(Integer) for the same value on the other series.
If you want to rotate a TPolarSeries that's used in a series band, you will have to redraw the series yourself.

Hint: If you just want to rotate the "grid" (axis labels) of a polar series, the easiest thing would probably be using an empty polar series and use the RotionAngle-property of that series. Make sure this series is the chart's first series.


Attached you find a small demo of two polar series rotating against each other. Tick the checkbox labelled "crazy" to show what happens if you lazily use the RotationAngle property instead of repainting the series.
How to do it.png
How to do it
How to do it.png (49.38 KiB) Viewed 17470 times
How not to do it.png
How not to do it
How not to do it.png (53.21 KiB) Viewed 17468 times
Hope this might prove helpful in case somebody also stumbles upon this problem.
Attachments
TPolarSeries and TSeriesBandTool.zip
Example demo.
(5.7 KiB) Downloaded 874 times

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

Re: TPolarSeries: Invisible Point at (0,0)

Post by Yeray » Fri Oct 10, 2014 11:01 am

Hello,
jens.mertelmeyer wrote:By the way: I never found a way to EDIT my own posts. Is it possible?
I see. I'm not sure if that's a general problem in the accounts of all the customers or not. I've checked your user permissions and they look fine to me.
It could be a bug in the modifications we made over the phpBB sources. I'm sorry for the inconvenience
jens.mertelmeyer wrote:This is more like a reminder to self about caveats when using a TSeriesBandTool on polar series
.
Thanks for sharing your experiences. Luckily they ended successfully!
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

jens.mertelmeyer
Newbie
Newbie
Posts: 60
Joined: Fri Nov 22, 2013 12:00 am

Re: TPolarSeries: Invisible Point at (0,0)

Post by jens.mertelmeyer » Fri Oct 10, 2014 11:10 am

I hope I'm not getting on your nerves too much (it's Friday, after all), but I just had a quick look at the generated browser output: The buttons for quoting, editing and private messages are there. It's just that your styles.php outputs CSS information with empty urls and size of zero pixels:

Code: Select all

/* Set profile icon dimensions */
ul.profile-icons li.email-icon		{ width: 20px; height: 20px; }
ul.profile-icons li.aim-icon	{ width: 20px; height: 20px; }
ul.profile-icons li.yahoo-icon	{ width: 20px; height: 20px; }
ul.profile-icons li.web-icon	{ width: 20px; height: 20px; }
ul.profile-icons li.msnm-icon	{ width: 20px; height: 20px; }
ul.profile-icons li.icq-icon	{ width: 20px; height: 20px; }
ul.profile-icons li.jabber-icon	{ width: 20px; height: 20px; }
ul.profile-icons li.pm-icon		{ width: px; height: px; }   <---  LOOK HERE
ul.profile-icons li.quote-icon	{ width: px; height: px; }
ul.profile-icons li.report-icon	{ width: 20px; height: 20px; }
ul.profile-icons li.edit-icon	{ width: px; height: px; }
ul.profile-icons li.delete-icon	{ width: 20px; height: 20px; }
ul.profile-icons li.info-icon	{ width: 20px; height: 20px; }
ul.profile-icons li.warn-icon	{ width: 20px; height: 20px; }




/* Profile & navigation icons */
.email-icon, .email-icon a		{ background-image: url("./styles/prosilver/imageset/icon_contact_email.gif"); }
.aim-icon, .aim-icon a			{ background-image: url("./styles/prosilver/imageset/icon_contact_aim.gif"); }
.yahoo-icon, .yahoo-icon a		{ background-image: url("./styles/prosilver/imageset/icon_contact_yahoo.gif"); }
.web-icon, .web-icon a			{ background-image: url("./styles/prosilver/imageset/icon_contact_www.gif"); }
.msnm-icon, .msnm-icon a			{ background-image: url("./styles/prosilver/imageset/icon_contact_msnm.gif"); }
.icq-icon, .icq-icon a			{ background-image: url("./styles/prosilver/imageset/icon_contact_icq.gif"); }
.jabber-icon, .jabber-icon a		{ background-image: url("./styles/prosilver/imageset/icon_contact_jabber.gif"); }
.pm-icon, .pm-icon a				{ background-image: url(""); }   <-- THIS
.quote-icon, .quote-icon a		{ background-image: url(""); }

/* Moderator icons */
.report-icon, .report-icon a		{ background-image: url("./styles/prosilver/imageset/icon_post_report.gif"); }
.edit-icon, .edit-icon a			{ background-image: url(""); }   <-- EMPTY, OH MY
.delete-icon, .delete-icon a		{ background-image: url("./styles/prosilver/imageset/icon_post_delete.gif"); }
.info-icon, .info-icon a			{ background-image: url("./styles/prosilver/imageset/icon_post_info.gif"); }
.warn-icon, .warn-icon a			{ background-image: url("./styles/prosilver/imageset/icon_user_warn.gif"); } /* Need updated warn icon */

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

Re: TPolarSeries: Invisible Point at (0,0)

Post by Yeray » Fri Oct 10, 2014 1:43 pm

Hello Jens,

Indeed this is what is returning. Since it returns the correct page for me, it makes me think it's more something related to the rights than to the source code in the forum:

Code: Select all

/* Set profile icon dimensions */
ul.profile-icons li.email-icon		{ width: 20px; height: 20px; }
ul.profile-icons li.aim-icon	{ width: 20px; height: 20px; }
ul.profile-icons li.yahoo-icon	{ width: 20px; height: 20px; }
ul.profile-icons li.web-icon	{ width: 20px; height: 20px; }
ul.profile-icons li.msnm-icon	{ width: 20px; height: 20px; }
ul.profile-icons li.icq-icon	{ width: 20px; height: 20px; }
ul.profile-icons li.jabber-icon	{ width: 20px; height: 20px; }
ul.profile-icons li.pm-icon		{ width: 28px; height: 20px; }
ul.profile-icons li.quote-icon	{ width: 54px; height: 20px; }
ul.profile-icons li.report-icon	{ width: 20px; height: 20px; }
ul.profile-icons li.edit-icon	{ width: 42px; height: 20px; }
ul.profile-icons li.delete-icon	{ width: 20px; height: 20px; }
ul.profile-icons li.info-icon	{ width: 20px; height: 20px; }
ul.profile-icons li.warn-icon	{ width: 20px; height: 20px; }

Code: Select all

/* Profile & navigation icons */
.email-icon, .email-icon a		{ background-image: url("./styles/prosilver/imageset/icon_contact_email.gif"); }
.aim-icon, .aim-icon a			{ background-image: url("./styles/prosilver/imageset/icon_contact_aim.gif"); }
.yahoo-icon, .yahoo-icon a		{ background-image: url("./styles/prosilver/imageset/icon_contact_yahoo.gif"); }
.web-icon, .web-icon a			{ background-image: url("./styles/prosilver/imageset/icon_contact_www.gif"); }
.msnm-icon, .msnm-icon a			{ background-image: url("./styles/prosilver/imageset/icon_contact_msnm.gif"); }
.icq-icon, .icq-icon a			{ background-image: url("./styles/prosilver/imageset/icon_contact_icq.gif"); }
.jabber-icon, .jabber-icon a		{ background-image: url("./styles/prosilver/imageset/icon_contact_jabber.gif"); }
.pm-icon, .pm-icon a				{ background-image: url("./styles/prosilver/imageset/en/icon_contact_pm.gif"); }
.quote-icon, .quote-icon a		{ background-image: url("./styles/prosilver/imageset/en/icon_post_quote.gif"); }

/* Moderator icons */
.report-icon, .report-icon a		{ background-image: url("./styles/prosilver/imageset/icon_post_report.gif"); }
.edit-icon, .edit-icon a			{ background-image: url("./styles/prosilver/imageset/en/icon_post_edit.gif"); }
.delete-icon, .delete-icon a		{ background-image: url("./styles/prosilver/imageset/icon_post_delete.gif"); }
.info-icon, .info-icon a			{ background-image: url("./styles/prosilver/imageset/icon_post_info.gif"); }
.warn-icon, .warn-icon a			{ background-image: url("./styles/prosilver/imageset/icon_user_warn.gif"); } /* Need updated warn icon */
But I haven't been able to find the root of the problem (yet)
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

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

Re: TPolarSeries: Invisible Point at (0,0)

Post by Yeray » Mon Oct 13, 2014 12:35 pm

Hello Jens,
Yeray wrote:But I haven't been able to find the root of the problem (yet)
Just found it!
It was a problem in our database: the user_lang field in the users table was empty for some rows. Setting it to 'en' solved the problem.
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

jens.mertelmeyer
Newbie
Newbie
Posts: 31
Joined: Fri Nov 21, 2014 12:00 am

Re: TPolarSeries: Invisible Point at (0,0)

Post by jens.mertelmeyer » Wed Dec 03, 2014 9:07 am

The default setting still seems to be wrong/empty: Since my subscription was renewed, I had to register a new forum account. Once again, I was unable to edit or delete my own posts or quote others. After visiting User Control Panel -> Board Preferences -> Edit Global Settings, changing my timezone and hitting Submit, the buttons are back again.

Just wanted to let you know.

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

Re: TPolarSeries: Invisible Point at (0,0)

Post by Yeray » Thu Dec 04, 2014 8:50 am

Hi Jens,

Thanks for sharing the workaround.
I've set the 'en' user_lang in the users table for those rows where it was empty.
I'll check if we can fix this in the program that creates the accounts in the forums.
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