Browse Source

Fix map coloration

pull/264/head 2.0.4
Florian Mounier 9 years ago
parent
commit
ae95223ee8
  1. 33
      demo/moulinrouge/tests.py
  2. 6
      docs/changelog.rst
  3. 2
      pygal/__init__.py
  4. 14
      pygal/css/style.css

33
demo/moulinrouge/tests.py

@ -556,20 +556,21 @@ def get_test_routes(app):
if fr is None:
abort(404)
fmap = fr.Departments(style=choice(list(styles.values())))
for i in range(10):
fmap.add('s%d' % i, [
(choice(list(fr.DEPARTMENTS.keys())), randint(0, 100))
for _ in range(randint(1, 5))])
fmap.add('links', [{
'value': (69, 10),
'label': '\o/',
'xlink': 'http://google.com?q=69'
}, {
'value': ('42', 20),
'label': 'Y',
}])
fmap.add('6th', [3, 5, 34, 12])
fmap.add('', [(69, 2), (42, 7), (38, 3), (26, 0)])
# for i in range(10):
# fmap.add('s%d' % i, [
# (choice(list(fr.DEPARTMENTS.keys())), randint(0, 100))
# for _ in range(randint(1, 5))])
# fmap.add('links', [{
# 'value': (69, 10),
# 'label': '\o/',
# 'xlink': 'http://google.com?q=69'
# }, {
# 'value': ('42', 20),
# 'label': 'Y',
# }])
# fmap.add('6th', [3, 5, 34, 12])
fmap.title = 'French map'
return fmap.render_response()
@ -690,8 +691,8 @@ def get_test_routes(app):
'lolroflmao',
'12345678901234567890'
]
# radar.x_label_rotation = 35
# radar.y_label_rotation = 35
radar.x_label_rotation = 35
radar.y_label_rotation = 35
radar.y_labels = [{
'label': '500',
'value': 10

6
docs/changelog.rst

@ -2,6 +2,12 @@
Changelog
=========
2.0.4
=====
* Fix map coloration
2.0.3
=====

2
pygal/__init__.py

@ -24,7 +24,7 @@ and the maps extensions namespace module.
"""
__version__ = '2.0.3'
__version__ = '2.0.4'
import pkg_resources
import sys

14
pygal/css/style.css

@ -96,7 +96,7 @@
{{ id }}.reactive.active,
{{ id }}.active .reactive {
fill-opacity: {{ style.opacity_hover }};
fill-opacity: {{ style.opacity_hover }};
stroke-width: 4;
}
@ -140,18 +140,12 @@
}
{{ id }}.map-element {
fill: {{ style.foreground }};
fill: {{ style.plot_background }};
stroke: {{ style.foreground_subtle }} !important;
opacity: .9;
stroke-width: 3;
-webkit-transition: opacity {{ style.transition }};
-moz-transition: opacity {{ style.transition }};
transition: opacity {{ style.transition }};
}
{{ id }}.map-element:hover {
opacity: 1;
stroke-width: 10;
{{ id }}.map-element .reactive {
fill-opacity: inherit;
}
{{ colors }}

Loading…
Cancel
Save