Permalink
Browse files

Showing proper figures in graph title according to units. Thnx Jason …

…for the hint
  • Loading branch information...
1 parent e9e725d commit 1dcf5fe6afdafa7b26c35dac2407b63c684c5b2e @dgranda dgranda committed Jan 15, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 pytrainer/gui/drawGraph.py
@@ -188,9 +188,9 @@ def drawActivityGraph(self, activity = None, box = None):
if activity.x_axis == "distance":
if activity.title is None or activity.title == "":
- _title = "%s%s of %s on %s" % (str(activity.distance), activity.distance_unit, activity.sport_name, activity.date)
+ _title = "%s %s of %s on %s" % (str(activity.get_value_f('distance', "%0.2f")), activity.distance_unit, activity.sport_name, activity.date)
else:
- _title = "%s: %s%s of %s on %s" % (activity.title, str(activity.distance), activity.distance_unit, activity.sport_name, activity.date)
+ _title = "%s: %s %s of %s on %s" % (activity.title, str(activity.get_value_f('distance', "%0.2f")), activity.distance_unit, activity.sport_name, activity.date)
#Loop through data items and graph the selected ones
for item in activity.distance_data:

0 comments on commit 1dcf5fe

Please sign in to comment.