Geen omschrijving

bar_descriptions.py 578B

12345678910111213141516171819
  1. import pygal
  2. from pygal.style import LightColorizedStyle as LCS, LightenStyle as LS
  3. my_style = LS('#333366', base_style=LCS)
  4. chart = pygal.Bar(style=my_style, x_label_rotation=45, show_legend=False)
  5. chart.title = 'Python Projects'
  6. chart.x_labels = ['httpie', 'django', 'flask']
  7. chart.force_uri_protocol = 'http'
  8. plot_dicts = [
  9. {'value': 16101, 'label': 'Description of httpie.'},
  10. {'value': 15028, 'label': 'Description of django.'},
  11. {'value': 14798, 'label': 'Description of flask.'},
  12. ]
  13. chart.add('', plot_dicts)
  14. chart.render_to_file('bar_descriptions.svg')