Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 7328 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi all:

I'm working on a solution using xmChart, which I've used a number of times before. However, I am trying to force xmChart to produce pie charts where the pie is always the same size. What normally happens is that the chart as a whole is a set size and, depending on the length of the labels, the pie in the middle is smaller or larger. I am currently working an a very elaborate algorithm to calculate the lengths and positions of all the labels, in order to set the chart to the right size. Has anyone done anything like this before?

Really, I'm just trying to save myself some work.

-Stanley

Posted

Hey stanley,

I made an interface file to give the user control of most of the different options, like size, colors, PieChartOptions, what the labels are and how they are displayed. The data string is sent to the interface file by whichever database groups the data, then the interface file lets the user customize the chart.

But I think your algorithm for scaling by length of the labels is a reasonable approach. I do a similar thing (setting the default chart dimensions) based on the number of series in bar charts.

Posted

Ender:

Thanks for the input. Unfortunately, the solution I'm working on involves batch-processing hundreds of reports at once and printing them out, so there's no point giving the user control over the appearance of the chart.

Back to the crazy mathematics.

-Stanley

Posted

Thanks Ender - I can't tell you how happy I am to be an "old hand" rather than an "addict."

  • 2 months later...
Posted

I'm quite new with xmChart, but... would it make any difference if you were to draw the graphic pie portion in one chart and the labels separately, in another, overlaying them?

Chris

Posted

Overlaying doesn't work for a number of reasons. The solution I came up with was to concatenate the labels to a specific length and also to put a carriage return into them, in order to control the width of the labels. This gave me a result where all the pies (in a system with about 5000 records) were within 5% of each other in size, which was good enough.

-Stanley

This topic is 7328 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.