Svg size is configurable with width
and height
parameter.
200 400
chart = pygal.Bar(width=200) chart.add('1', 1) chart.add('2', 2)
600 100
chart = pygal.Bar(height=100) chart.add('1', 1) chart.add('2', 2)
Size can be written directly to the svg tag to force display of the requested size using explicit_size
.
Spacing determines the space between all elements:
chart = pygal.Bar(spacing=50) chart.x_labels = u'αβγδ' chart.add('line 1', [5, 15, 10, 8]) chart.add('line 2', [15, 20, 8, 11])
Margin is the external chart margin:
chart = pygal.Bar(margin=50) chart.x_labels = u'αβγδ' chart.add('line 1', [5, 15, 10, 8]) chart.add('line 2', [15, 20, 8, 11])
Individual margins can also be specified
chart = pygal.Bar(margin_top=50) chart.x_labels = u'αβγδ' chart.add('line 1', [5, 15, 10, 8]) chart.add('line 2', [15, 20, 8, 11])
chart = pygal.Bar(margin_right=50) chart.x_labels = u'αβγδ' chart.add('line 1', [5, 15, 10, 8]) chart.add('line 2', [15, 20, 8, 11])
chart = pygal.Bar(margin_bottom=50) chart.x_labels = u'αβγδ' chart.add('line 1', [5, 15, 10, 8]) chart.add('line 2', [15, 20, 8, 11])
chart = pygal.Bar(margin_left=50) chart.x_labels = u'αβγδ' chart.add('line 1', [5, 15, 10, 8]) chart.add('line 2', [15, 20, 8, 11])