I have some data coming from a custom dataset that look like the following example
Person Age
P1 20
P2 21
P3 30
P4 31
P5 40
And I want to develop a pie showing the age distribution against the age.
The point is that I want this Age to be shown in ranges. (20-29, 30-39, etc for example So we have: Slice with total number =2 (P1 + P2) as age is 20-29 (one at 20 and another at 21)
Slice with total number =3 (P3 + P4) as age is 30-39 (one at 30 and another at 31)
Slice with total number =1 (P5) as age is 40 (one at 40).
How can i customize the pie chart to aggregate values by ranges that I can define?