|
|
@ -50,7 +50,7 @@ class Gauge(Graph): |
|
|
|
def needle(self, serie_node, serie,): |
|
|
|
def needle(self, serie_node, serie,): |
|
|
|
thickness = .05 |
|
|
|
thickness = .05 |
|
|
|
for i, value in enumerate(serie.values): |
|
|
|
for i, value in enumerate(serie.values): |
|
|
|
if not value: |
|
|
|
if value is None: |
|
|
|
continue |
|
|
|
continue |
|
|
|
theta = self.arc_pos(value) |
|
|
|
theta = self.arc_pos(value) |
|
|
|
fmt = lambda x: '%f %f' % x |
|
|
|
fmt = lambda x: '%f %f' % x |
|
|
@ -90,8 +90,9 @@ class Gauge(Graph): |
|
|
|
self.svg.line( |
|
|
|
self.svg.line( |
|
|
|
guides, [self.view((0, theta)), self.view((.95, theta))], |
|
|
|
guides, [self.view((0, theta)), self.view((.95, theta))], |
|
|
|
close=True, |
|
|
|
close=True, |
|
|
|
class_='guide line %s' % ('major' |
|
|
|
class_='guide line %s' % ( |
|
|
|
if i in (0, len(self._x_labels) - 1) else '')) |
|
|
|
'major' if i in (0, len(self._x_labels) - 1) |
|
|
|
|
|
|
|
else '')) |
|
|
|
|
|
|
|
|
|
|
|
x, y = self.view((.9, theta)) |
|
|
|
x, y = self.view((.9, theta)) |
|
|
|
self.svg.node(guides, 'text', |
|
|
|
self.svg.node(guides, 'text', |
|
|
|