Legend placed outside SVG ViewBox
markusgritsch opened this issue · 0 comments
markusgritsch commented
When using legend_at_bottom=True
the legend is placed outside the SVG view box in the example below:
import pygal
chart = pygal.Line(style=pygal.style.DarkStyle,
legend_at_bottom=True, legend_at_bottom_columns=5)
chart.add('Serie 1', [1, 2, 3])
chart.add('Serie 2', [4, 2, 0])
chart.add('Serie 3', [1, 0, 1])
chart.add('Serie 4', [3, 1, 5])
chart.render_to_file('bug.svg', x_title='throttle')
Necessary to reproduce is specifying an x_title
, which seems to not be taken into account for the height, and it also depends on the number used for legend_at_bottom_columns
. 1, 2, and 4 work, but 3, 5, and higher make the legend appear outside the view box.