Pie Charts
Pie charts work well in displaying group level data or proportions of contribution to the sum total by individual groups. As an added bonus, pygal pie chart have a select and de-select feature for choosing which group to remove on the pie chart.
This examples, builds a simple Pie chart of fictitious marketing budget across different advertising channels.
channels = ['TV', 'Radio', 'News Paper', 'Online', 'Direct Mail']
budget_proportion = [30, 15, 10 ,40, 5]
budget = list(zip(channels, budget_proportion))
import pygal
pie_chart = pygal.Pie()
pie_chart.title = 'Advertising Budget by Channel (in %)'
for i in budget:
pie_chart.add(i[0], i[1])
pie_chart.render_in_browser()
pie_chart.render_in_browser()