Skip to main content
Question

ChartGenerator: Sorting pieces of pie chart

  • June 10, 2016
  • 5 replies
  • 76 views

Forum|alt.badge.img

Hello,

i want to show the age groups of my town in a pie chart. Is there a possibility to sort the pieces side by side ascending by age. I use a Sorter before the ChartGenerator but it has no influence.

Thanks for help

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

Forum|alt.badge.img+5

OK... sadly the answer is no, not in the way you are doing it.

However, if you supply the data and labels - ie you calculate the percentage rather than having FME do it for you (check the help doc, it tells you how) then it would be in the order of the features.

I'll also file an enhancement request so that it uses feature order in the regular mode that you are using.


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • June 13, 2016

Create your own pie chart for full control.

All a pie chart is, is dividing full cickel by the relative grouped values. So you can sort the values before generating it.

Calculate values. Create vertex where you want centerpoint. Create a line form this point by the size you want your pie to be (radius).

StatisticCaqlculator to count obejcts.

Duplicate line by amount of counted groups.

Calculate rotation angle by something like

(value1/total)*360 , (value2/total()*360 etc. .

Sort and rotate lines by these value.

Create circkel using 2DArcREplacer. Then use LineOnArea.


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • June 13, 2016

pie.fmwt

..there are other ways of course..i found this in my custom set.

some mid school math


Forum|alt.badge.img
  • Author
  • June 22, 2016

Thank you for help. It works when i bring the Features in a sorted order. I created different Charts for the Citys and made worldfiles for each Chart.


Forum|alt.badge.img
  • Author
  • June 22, 2016

chart-with-worldfile.png