Skip to content

Commit

Permalink
incorporate pr 846
Browse files Browse the repository at this point in the history
  • Loading branch information
GoFroggyRun committed Mar 19, 2018
1 parent 2b4e2f0 commit 1b43d82
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 28 deletions.
58 changes: 31 additions & 27 deletions static/js/taxbrain-tablebuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,35 +103,39 @@ $(function() {
},

rowLabels: function() {
// TODO: retrieve labels from the context and display them instead of hardcode labels here
if (this.get('grouping') == 'bin') {
return [
'<$10K',
'$10-20K',
'$20-30K',
'$30-40K',
'$40-50K',
'$50-75K',
'$75-100K',
'$100-200K',
'$200-500K',
'$500-1000K',
'>$1000K',
'All'
];
return ['<$0K',
'=$0K',
'$0-10K',
'$10-20K',
'$20-30K',
'$30-40K',
'$40-50K',
'$50-75K',
'$75-100K',
'$100-200K',
'$200-500K',
'$500-1000K',
'>$1000K',
'ALL'];
} else if (this.get('grouping') == 'dec') {
return [
'0-10',
'10-20',
'20-30',
'30-40',
'40-50',
'50-60',
'60-70',
'70-80',
'80-90',
'90-100',
'All'
];
return ['0-10n',
'0-10z',
'0-10p',
'10-20',
'20-30',
'30-40',
'40-50',
'50-60',
'60-70',
'70-80',
'80-90',
'90-100',
'ALL',
'90-95',
'95-99',
'Top 1%'];
}
}
});
Expand Down
3 changes: 2 additions & 1 deletion webapp/apps/taxbrain/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,8 @@ def get_result_context(model, request, url):
tables['cdf_bin'] = tables.pop('diff_comb_xbin')

json_table = json.dumps(tables)

# TODO: Add row labels for decile and income bin tables to the context here
# and display these instead of hardcode in the javascript
context = {
'locals':locals(),
'unique_url':url,
Expand Down

0 comments on commit 1b43d82

Please sign in to comment.