Browse Source

Rename Config.value_format to value_formatter

pull/9/head
Simon Sapin 12 years ago
parent
commit
46508dad65
  1. 2
      pygal/config.py
  2. 3
      pygal/graph/base.py

2
pygal/config.py

@ -154,7 +154,7 @@ class Config(object):
False, bool, "Value", "Display values in human readable format",
"(ie: 12.4M)")
value_format = Key(
value_formatter = Key(
None, type(lambda: 1), "Value",
"A function to convert numeric value to strings")

3
pygal/graph/base.py

@ -80,7 +80,8 @@ class BaseGraph(object):
@property
def _format(self):
"""Return the value formatter for this graph"""
return self.value_format or (humanize if self.human_readable else str)
return self.value_formatter or (
humanize if self.human_readable else str)
def _compute(self):
"""Initial computations to draw the graph"""

Loading…
Cancel
Save