Question

ChartGenerator: Sorting pieces of pie chart


Badge

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


5 replies

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.

Badge +3

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.

Badge +3

pie.fmwt

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

some mid school math

Badge

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.

Badge

chart-with-worldfile.png

Reply