Skip to content
This repository has been archived by the owner on Jan 31, 2018. It is now read-only.

Commit

Permalink
[Bug 793710] Fix colors of graph in other locales.
Browse files Browse the repository at this point in the history
  • Loading branch information
mythmon committed Sep 24, 2012
1 parent ac48fcc commit 2b46d7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions fjord/analytics/static/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down
4 changes: 2 additions & 2 deletions fjord/analytics/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2b46d7c

Please sign in to comment.