Browse Source

Minor fixes

pull/264/head
Florian Mounier 10 years ago
parent
commit
3d4523365e
  1. 1
      docs/changelog.rst
  2. 2
      pygal/graph/dual.py
  3. 2
      pygal/graph/graph.py
  4. 1
      pygal/state.py

1
docs/changelog.rst

@ -14,6 +14,7 @@ Changelog
* Activate element on tooltip hovering. (#106) * Activate element on tooltip hovering. (#106)
* Fix radar axis behaviour (#247) * Fix radar axis behaviour (#247)
* Add tooltip support in metadata to add a title (#249). * Add tooltip support in metadata to add a title (#249).
* Take config class options in account too.
2.0.0 2.0.0

2
pygal/graph/dual.py

@ -39,7 +39,7 @@ class Dual(Graph):
pos = float(x_label.get('value')) pos = float(x_label.get('value'))
title = x_label.get('label', self._format(pos)) title = x_label.get('label', self._format(pos))
elif is_str(x_label): elif is_str(x_label):
pos = x_pos[i] pos = x_pos[i % len(x_pos)]
title = x_label title = x_label
else: else:
pos = self._x_adapt(float(x_label)) pos = self._x_adapt(float(x_label))

2
pygal/graph/graph.py

@ -761,7 +761,7 @@ class Graph(PublicApi):
pos = float(y_label.get('value')) pos = float(y_label.get('value'))
title = y_label.get('label', self._format(pos)) title = y_label.get('label', self._format(pos))
elif is_str(y_label): elif is_str(y_label):
pos = y_pos[i] pos = y_pos[i % len(y_pos)]
title = y_label title = y_label
else: else:
pos = float(y_label) pos = float(y_label)

1
pygal/state.py

@ -30,6 +30,7 @@ class State(object):
def __init__(self, graph, **kwargs): def __init__(self, graph, **kwargs):
"""Create the transient state""" """Create the transient state"""
self.__dict__.update(**graph.config.__class__.__dict__)
self.__dict__.update(**graph.config.__dict__) self.__dict__.update(**graph.config.__dict__)
self.__dict__.update(**graph.__dict__) self.__dict__.update(**graph.__dict__)
self.__dict__.update(**kwargs) self.__dict__.update(**kwargs)

Loading…
Cancel
Save