From 769a5e962ea554c832a5cd6ebb2359c2f47021d6 Mon Sep 17 00:00:00 2001 From: Florian Mounier Date: Wed, 19 Jun 2013 16:49:37 +0200 Subject: [PATCH 1/2] Add parametric styles --- demo/moulinrouge/__init__.py | 27 +++++++++++++++++------ demo/moulinrouge/templates/index.jinja2 | 10 +++++++++ pygal/style.py | 29 +++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 7 deletions(-) diff --git a/demo/moulinrouge/__init__.py b/demo/moulinrouge/__init__.py index be91b69..d893b1a 100644 --- a/demo/moulinrouge/__init__.py +++ b/demo/moulinrouge/__init__.py @@ -21,7 +21,7 @@ import pygal from pygal.config import Config from pygal.util import cut from pygal.graph import CHARTS_NAMES -from pygal.style import styles +from pygal.style import styles, parametric_styles from base64 import ( urlsafe_b64encode as b64encode, urlsafe_b64decode as b64decode) @@ -84,7 +84,9 @@ def create_app(): @app.route("/") def index(): return render_template( - 'index.jinja2', styles=styles, + 'index.jinja2', styles=styles, parametric_styles=parametric_styles, + parametric_colors=( + '#ff5995', '#b6e354', '#feed6c', '#8cedff', '#9e6ffe'), links=links, charts_name=CHARTS_NAMES) @app.route("/svg///") @@ -95,19 +97,30 @@ def create_app(): return graph.render_response() @app.route("/sparkline/