Browse Source

Merge pull request #16 from yobuntu/master

allow  unicode in labels
pull/15/merge
Mounier Florian 12 years ago
parent
commit
fc56b4b8ef
  1. 5
      pygal/util.py

5
pygal/util.py

@ -212,7 +212,10 @@ def decorate(svg, node, metadata):
if key == 'xlink' and isinstance(value, dict):
value = value.get('href', value)
if value:
svg.node(node, 'desc', class_=key).text = str(value)
if isinstance(value, unicode):
svg.node(node, 'desc', class_=key).text = value
else:
svg.node(node, 'desc', class_=key).text = str(value)
return node

Loading…
Cancel
Save