Browse Source

Add a dots_size config.

pull/11/head
Simon Sapin 12 years ago
parent
commit
55149680a3
  1. 2
      pygal/config.py
  2. 2
      pygal/graph/line.py

2
pygal/config.py

@ -112,6 +112,8 @@ class Config(object):
show_dots = Key(True, bool, "Look", "Set to false to remove dots") show_dots = Key(True, bool, "Look", "Set to false to remove dots")
dots_size = Key(2.5, float, "Look", "Radius of the dots")
stroke = Key( stroke = Key(
True, bool, "Look", True, bool, "Look",
"Line dots (set it to false to get a scatter plot)") "Line dots (set it to false to get a scatter plot)")

2
pygal/graph/line.py

@ -69,7 +69,7 @@ class Line(Graph):
self.svg.node(serie_node['overlay'], class_="dots"), self.svg.node(serie_node['overlay'], class_="dots"),
metadata) metadata)
val = self._get_value(serie.points, i) val = self._get_value(serie.points, i)
self.svg.node(dots, 'circle', cx=x, cy=y, r=2.5, self.svg.node(dots, 'circle', cx=x, cy=y, r=self.dots_size,
class_='dot reactive tooltip-trigger') class_='dot reactive tooltip-trigger')
self._tooltip_data(dots, val, x, y) self._tooltip_data(dots, val, x, y)
self._static_value( self._static_value(

Loading…
Cancel
Save