Page 1 of 1

Marks on pie overlap with title

Posted: Thu Jul 25, 2019 10:00 pm
by 16585021
I have a pie chart where the marks from the series overlap with the chart's title.

My thought was to reduce the size of the pie circle by a little bit, but I can't find a property for that. How can I do that?

If you have a different or preferred method for reducing the likelihood of the marks from overlapping with the title, I would be interested.

Ed Dressel

Re: Marks on pie overlap with title

Posted: Fri Jul 26, 2019 4:26 pm
by Marc
Hello Ed,

The easiest way may be to reduce the Mark Callout distance. You can do that via the Editor under the Marks Arrow tab or by code:

eg.

Code: Select all

Series5.Marks.Callout.Distance := 5;
Regards,
Marc

Re: Marks on pie overlap with title

Posted: Wed Jul 31, 2019 3:10 pm
by 16585021
Marc:

Thank you for your reply. My Callout.Distance is zero.

Is there a way to reduce the diameter/radius of the pie?

Ed Dressel

Re: Marks on pie overlap with title

Posted: Mon Aug 05, 2019 10:22 am
by Pep
Sure, you mean:

Code: Select all

Series1.CustomXRadius := 50;
Series1.CustomYRadius := 50;

Re: Marks on pie overlap with title

Posted: Mon Aug 05, 2019 3:41 pm
by 16585021
Pep:

Thanks for the reply, but I am not sure that solves my problem--how do you know "50" will reduce the size? Am I right to say it is a guess? And it could make the pie not have an appropriate size.

I'm getting frustrated here. This question is a week and a half old and I don't' feel like I am even getting close to the right answer. (I pay good money for my annual subscriptions and don't see a lot of features being developed so I anticipate good support, but maybe I am wrong to anticipate that).

Is there a way to increase the pie outside margin, i.e. reduce it by 20 pts, or set it to 90%?

If not, what options do I have to make it so that the pie chart takes up as much room as possible but the marks don't overlap the caption?

Re: Marks on pie overlap with title

Posted: Tue Aug 06, 2019 8:10 am
by Marc
Hello Ed,

Re.
how do you know "50" will reduce the size? Am I right to say it is a guess? And it could make the pie not have an appropriate size.
It was an example, not a guess; we didn't wish to suggest that you use those exact values. if you set width/height to 50/50 you are setting the Pie radius to 50 pixels (vertical) x 50 pixels (horizontal).

Re.
I'm getting frustrated here. This question is a week and a half old and I don't' feel like I am even getting close to the right answer. (I pay good money for my annual subscriptions and don't see a lot of features being developed so I anticipate good support, but maybe I am wrong to anticipate that).
I'm sorry that we haven't interpreted correctly what you require. In answer to your first question, between the suggestion to use Callout and alternatively CustomRadius we thought we'd offered two workable approaches. Of course we're happy to look at other options. I'm sorry that you feel we're not getting close or that there are deficiencies in the quality of our support.

Re.
Is there a way to increase the pie outside margin, i.e. reduce it by 20 pts, or set it to 90%?
The outside margin is controlled by these properties (I have added the default values):

Code: Select all

  Chart1.MarginLeft := 3;
  Chart1.MarginTop := 4;
  Chart1.MarginRight := 3;
  Chart1.MarginBottom := 4;
Those are, as default, percentage settings, but can be changed to pixel settings.

To change between percentage and pixels for the Margin settings use:

Code: Select all

Chart1.MarginUnits := muPercent; //(default)
or
Chart1.MarginUnits := muPixels;
As you can see, with default % in place, the margins are permitting 94% usage space horizontally and 92% usage space vertically. You could increase the margins to, (as an example only) 10, effectively reducing plottable area, to see whether the value gives you the reduced Pie size you require. Please note though, the CustomRadius value suggested by Pep gives more precise control.

Please note too, that the Callout value can be negative, bringing the Marks onto the Pie. If you are using the Chart Editor to set it use the Series Marks tab, not the Pie Format:Marks tab as the updown in the Series:Marks tab allows you to move the value to a negative. Mark Arrows also offer another variant to fine tune the relationship between overall Pie size and Mark distance. Changing Arrow size shortens the leg to the Mark whilst Callout shortens/lengthens the position of the Mark to the Pie .. the effect can be quite similar.

eg, Arrow.

Code: Select all

Series1.Marks.ArrowLength := 3; //example value only
//the default value is 8 so this will have the effect of increasing Pie size towards the Mark.
There are several ways to change the Pie size using the properties described in this thread. Bear in mind that between Marks and Pie TeeChart automatically optimises (maximises) to fit within the plottable area .. that is, the area bounded inside the Margins. So changing any of the selection of properties re-moves the different elements to maintain that fit. That is not true of CustomRadius, that fixes the size according to the pixel value you set.

I hope that may be of help. If we have still missed the precise objective please let us know with a specific goal and we'll try and put a code sample together as an example.

Regards,
Marc

Re: Marks on pie overlap with title

Posted: Tue Aug 06, 2019 2:21 pm
by 16585021
Marc:

Thank you for the response. I am under pressure to get a release out and this is one of two items holding it up.

The margin values do not solve the problem as they move the title down.

I also created a demo (attached) and it seems the problem is more prevalent when I create an image is created of the chart.

In the attached ZIP file there is also an image of how I am seeing the overlap.

How can I get this not to overlap?

Thank you for your help.

Ed Dressel

Re: Marks on pie overlap with title

Posted: Wed Aug 07, 2019 8:59 am
by Marc
Hello Ed,

In this case I think the simplest solution would be to add an empty subTitle.

Code in ConfigChart:

Code: Select all

  aChart.SubTitle.Text.Add(' ');
  aChart.SubTitle.Visible := True;
  aChart.MarginBottom := 10;  //<- + small aesthetic mode
I hope that looks ok for you.

Regards,
Marc

Re: Marks on pie overlap with title

Posted: Wed Aug 07, 2019 3:58 pm
by 16585021
Perfect. Thank you. I guess you having a demo helped.