From aa344741e3cac987b1be5501dc08df07dcdc419b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Plasse?= Date: Wed, 2 Apr 2014 15:49:20 +0200 Subject: [PATCH] simple graph with 'show_only_major_dots' option --- demo/moulinrouge/tests.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/demo/moulinrouge/tests.py b/demo/moulinrouge/tests.py index 7bd6084..813a4f6 100644 --- a/demo/moulinrouge/tests.py +++ b/demo/moulinrouge/tests.py @@ -419,4 +419,14 @@ def get_test_routes(app): line.x_labels = map(str, range(11)) return line.render_response() + @app.route('/test/major_dots') + def test_major_dots(): + line = Line(x_labels_major_every=3, show_only_major_dots=True) + line.add('test', range(12)) + line.x_labels = [ + 'lol', 'lol1', 'lol2', 'lol3', 'lol4', 'lol5', + 'lol6', 'lol7', 'lol8', 'lol9', 'lol10', 'lol11'] + line.x_labels_major = ['lol3'] + return line.render_response() + return filter(lambda x: x.startswith('test'), locals())