Browse Source

Merge pull request #12 from Kozea/skip-value-on-thin-slice

Pie graph: Do not show static values on slices with small angles.
pull/15/head
Mounier Florian 12 years ago
parent
commit
8d21746a5d
  1. 3
      pygal/svg.py

3
pygal/svg.py

@ -181,7 +181,8 @@ class Svg(object):
(radius + small_radius) / 2, start_angle + angle / 2))
self.graph._tooltip_data(node, val, x, y, classes="centered")
self.graph._static_value(serie_node, val, x, y)
if angle >= 0.3: # 0.3 radians is about 17 degrees
self.graph._static_value(serie_node, val, x, y)
def pre_render(self):
"""Last things to do before rendering"""

Loading…
Cancel
Save