def test_datey(): from datetime import datetime datey = DateY(show_dots=False) datey.add("1", [(datetime(2011, 12, 21), 10), (datetime(2014, 4, 8), 12), (datetime(2010, 2, 28), 2)]) datey.add("2", [(12, 4), (219, 8), (928, 6)]) datey.x_label_rotation = 25 return datey.render_response()
def test_datey(): from datetime import datetime datey = DateY(show_dots=False) datey.add('1', [(datetime(2011, 12, 21), 10), (datetime(2014, 4, 8), 12), (datetime(2010, 2, 28), 2)]) datey.add('2', [(12, 4), (219, 8), (928, 6)]) datey.x_label_rotation = 25 return datey.render_response()
def test_datexy(): from datetime import datetime, date, timedelta datey = DateY() datey.add('1', [(datetime(2011, 12, 21), 10), (datetime(2014, 4, 8), 12), (datetime(2010, 2, 28), 2)]) datey.add( '2', map(lambda t: (date.today() + timedelta(days=t[0]), t[1]), [(12, 4), (219, 8), (928, 6)])) datey.x_label_rotation = 25 return datey.render_response()
def test_datexy(): from datetime import datetime, date, timedelta datey = DateY() datey.add('1', [ (datetime(2011, 12, 21), 10), (datetime(2014, 4, 8), 12), (datetime(2010, 2, 28), 2) ]) datey.add('2', map( lambda t: (date.today() + timedelta(days=t[0]), t[1]), [(12, 4), (219, 8), (928, 6)])) datey.x_label_rotation = 25 return datey.render_response()
def test_datey_single(): graph = DateY(interpolate='cubic') graph.add('Single', [(datetime.now(), 1)]) return graph.render_response()