Python to generate nice looking SVG graph http://pygal.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
494 B

from svg.charts import time_series
def test_field_width():
"""
cking reports in a comment on PyPI that the X-axis labels all
bunch up on the left. This tests confirms the bug and tests for its
correctness.
"""
g = time_series.Plot({})
g.timescale_divisions = '4 hours'
g.stagger_x_labels = True
g.x_label_format = '%d-%b %H:%M'
g.add_data({'data': ['2005-12-21T00:00:00', 20, '2005-12-22T00:00:00', 21], 'title': 'series 1'})
g.burn()
assert g.field_width() > 1