Permalink
Browse files

Bump 1.13.0

  • Loading branch information...
1 parent 8d85ad3 commit 8676150aac2fae79f7e5e004ca95a47900dfcb98 @paradoxxxzero paradoxxxzero committed Oct 5, 2012
Showing with 10 additions and 4 deletions.
  1. +1 −1 pygal/__init__.py
  2. +2 −3 pygal/graph/graph.py
  3. +7 −0 pygal/graph/xy.py
View
@@ -21,7 +21,7 @@
"""
-__version__ = '0.12.2'
+__version__ = '0.13.0'
import sys
from pygal.config import Config
from pygal.ghost import Ghost
View
@@ -101,8 +101,7 @@ def _make_graph(self):
a = self.svg.node(self.nodes['tooltip'], 'a')
self.svg.node(a, 'rect',
id="tooltip-box",
- rx=5, ry=5, width=0, height=0
- )
+ rx=5, ry=5, width=0, height=0)
text = self.svg.node(a, 'text', class_='text')
self.svg.node(text, 'tspan', class_='label')
self.svg.node(text, 'tspan', class_='value')
@@ -207,7 +206,7 @@ def _legend(self):
if not truncation:
available_space = self.view.width / cols - (
self.legend_box_size + 5)
- truncation = revesre_text_len(
+ truncation = reverse_text_len(
available_space, self.legend_font_size)
else:
x = self.margin.left + self.view.width + 10
View
@@ -64,6 +64,13 @@ def _compute(self):
yvals = [val[1]
for serie in self.series
for val in serie.interpolated]
+ if xvals:
+ xmin = min(xvals)
+ xmax = max(xvals)
+ rng = (xmax - xmin)
+ else:
+ rng = None
+
if rng:
self._box.xmin, self._box.xmax = min(xvals), max(xvals)
self._box.ymin, self._box.ymax = min(yvals), max(yvals)

0 comments on commit 8676150

Please sign in to comment.