No Description

bar_descriptions.py 544B

123456789101112131415161718
  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. plot_dicts = [
  8. {'value': 16101, 'label': 'Description of httpie.'},
  9. {'value': 15028, 'label': 'Description of django.'},
  10. {'value': 14798, 'label': 'Description of flask.'},
  11. ]
  12. chart.add('', plot_dicts)
  13. chart.render_to_file('bar_descriptions.svg')