All charts / Pie & donut
A monthly budget
A donut shows the total in its middle.
1 The data _data/budget.yaml yaml Copy
# Where the money goes each month, in euros
- post : Housing
amount : 1250
- post : Groceries
amount : 480
- post : Transport
amount : 210
- post : Energy
amount : 165
- post : Leisure
amount : 240
- post : Savings
amount : 400
2 The chart tag pie/budget.pad pad Copy
{ chart 'donut' , data ='budget' , label ='post' , value ='amount' , title ='A monthly budget' , width =560 , height =320 }
3 The result inline SVG · no JavaScript
A monthly budget
Housing: 1,250 (45.5%); Groceries: 480 (17.5%); Transport: 210 (7.7%); Energy: 165 (6%); Leisure: 240 (8.7%); Savings: 400 (14.6%)
Housing: 1,250 (45.5%)
Groceries: 480 (17.5%)
Transport: 210 (7.7%)
Energy: 165 (6%)
Leisure: 240 (8.7%)
Savings: 400 (14.6%)
2,745
Housing 1,250 (45.5%)
Groceries 480 (17.5%)
Transport 210 (7.7%)
Energy 165 (6%)
Leisure 240 (8.7%)
Savings 400 (14.6%)