Skip to main content

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

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.


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.


pie.fmwt

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

some mid school math


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.


chart-with-worldfile.png


Reply