mirror of https://github.com/Kozea/pygal.git
Florian Mounier
12 years ago
15 changed files with 149 additions and 190 deletions
@ -0,0 +1,15 @@
|
||||
{% extends '_layout.jinja2' %} |
||||
|
||||
{% block js %} |
||||
<script type="text/javascript" src="http://l:2343/svg.jquery.js"></script> |
||||
<script type="text/javascript" src="http://l:2343/pygal-tooltips.js"></script> |
||||
{% endblock js %} |
||||
|
||||
{% block section %} |
||||
{% for svg in svgs %} |
||||
<figure> |
||||
{{ svg | safe }} |
||||
<figcaption></figcaption> |
||||
</figure> |
||||
{% endfor %} |
||||
{% endblock section %} |
@ -1,104 +0,0 @@
|
||||
# -*- coding: utf-8 -*- |
||||
# This file is part of pygal |
||||
# |
||||
# A python svg graph plotting library |
||||
# Copyright © 2012-2013 Kozea |
||||
# |
||||
# This library is free software: you can redistribute it and/or modify it under |
||||
# the terms of the GNU Lesser General Public License as published by the Free |
||||
# Software Foundation, either version 3 of the License, or (at your option) any |
||||
# later version. |
||||
# |
||||
# This library is distributed in the hope that it will be useful, but WITHOUT |
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
||||
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
||||
# details. |
||||
# |
||||
# You should have received a copy of the GNU Lesser General Public License |
||||
# along with pygal. If not, see <http://www.gnu.org/licenses/>. |
||||
from pygal.style import Style |
||||
|
||||
|
||||
def test_colors(): |
||||
style = Style(colors=['red', '#231A3b', '#ff0', 'rgb(12, 231, 3)']) |
||||
assert style.colors == '''\ |
||||
.color-0 { |
||||
stroke: red; |
||||
fill: red; |
||||
} |
||||
|
||||
.color-1 { |
||||
stroke: #231A3b; |
||||
fill: #231A3b; |
||||
} |
||||
|
||||
.color-2 { |
||||
stroke: #ff0; |
||||
fill: #ff0; |
||||
} |
||||
|
||||
.color-3 { |
||||
stroke: rgb(12, 231, 3); |
||||
fill: rgb(12, 231, 3); |
||||
} |
||||
|
||||
.color-4 { |
||||
stroke: red; |
||||
fill: red; |
||||
} |
||||
|
||||
.color-5 { |
||||
stroke: #231A3b; |
||||
fill: #231A3b; |
||||
} |
||||
|
||||
.color-6 { |
||||
stroke: #ff0; |
||||
fill: #ff0; |
||||
} |
||||
|
||||
.color-7 { |
||||
stroke: rgb(12, 231, 3); |
||||
fill: rgb(12, 231, 3); |
||||
} |
||||
|
||||
.color-8 { |
||||
stroke: red; |
||||
fill: red; |
||||
} |
||||
|
||||
.color-9 { |
||||
stroke: #231A3b; |
||||
fill: #231A3b; |
||||
} |
||||
|
||||
.color-10 { |
||||
stroke: #ff0; |
||||
fill: #ff0; |
||||
} |
||||
|
||||
.color-11 { |
||||
stroke: rgb(12, 231, 3); |
||||
fill: rgb(12, 231, 3); |
||||
} |
||||
|
||||
.color-12 { |
||||
stroke: red; |
||||
fill: red; |
||||
} |
||||
|
||||
.color-13 { |
||||
stroke: #231A3b; |
||||
fill: #231A3b; |
||||
} |
||||
|
||||
.color-14 { |
||||
stroke: #ff0; |
||||
fill: #ff0; |
||||
} |
||||
|
||||
.color-15 { |
||||
stroke: rgb(12, 231, 3); |
||||
fill: rgb(12, 231, 3); |
||||
} |
||||
''' |
Loading…
Reference in new issue