サンプルコード
# coding=UTF-8 import pygal chart = pygal.Bar(title=u'部門別売上', x_title=u'年度', y_title=u'百万') chart.x_labels = map(str, range(2013, 2016)) chart.add(u'サンプル1', [100, 200, 300]) chart.add(u'サンプル2', [150, 170, 320]) chart.render_to_file('chart3.svg') chart.render_to_png(filename='chart3.png')
出力画像

No comments:
Post a Comment