Permalink
Browse files

[Bug 793710] Fix colors of graph in other locales.

  • Loading branch information...
1 parent ac48fcc commit 2b46d7c07869a84c63e8987cf87d64aac2646fd2 @mythmon committed Sep 24, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 fjord/analytics/static/js/dashboard.js
  2. +2 −2 fjord/analytics/views.py
@@ -51,8 +51,8 @@ $(function() {
'sad': '#AA4643'
};
for (var i = 0; i < data.length; i++) {
- var label = data[i]['label'].toLowerCase();
- var color = colors[label];
+ var name = data[i]['name'];
+ var color = colors[name];
if (color === undefined) {
color = '#000000';
}
@@ -148,8 +148,8 @@ def dashboard(request, template):
sad_data = [(p['time'], int(p['count'])) for p in histograms['sad']]
histogram = [
- {'label': _('Happy'), 'data': happy_data},
- {'label': _('Sad'), 'data': sad_data},
+ {'label': _('Happy'), 'name': 'happy', 'data': happy_data},
+ {'label': _('Sad'), 'name': 'sad', 'data': sad_data},
]
# Pagination

0 comments on commit 2b46d7c

Please sign in to comment.