From 2c5c88cfef643cbc0b977e8558def0eab19e0686 Mon Sep 17 00:00:00 2001 From: Gregory Eremin Date: Sat, 14 Mar 2015 17:13:28 +0700 Subject: [PATCH] Trying to tell what's going on --- app/scripts/src/charts/bar_chart.jsx | 23 +++++++++++++++++++++++ app/styles/charts.css | 17 +++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/app/scripts/src/charts/bar_chart.jsx b/app/scripts/src/charts/bar_chart.jsx index 0d57828..9fa6ba8 100644 --- a/app/scripts/src/charts/bar_chart.jsx +++ b/app/scripts/src/charts/bar_chart.jsx @@ -96,8 +96,31 @@ var BarChart = React.createClass({ }, render: function() { + var words = { + items: { + repo: 'repositories', + team: 'teams', + user: 'contributors' + }, + item: { + repo: 'repository', + team: 'team', + user: 'author' + }, + actions: { + repo: 'which were the most attended by', + team: 'which were the most active working on', + user: 'which were the most active working on' + } + }, + who = this.getParams().repo || this.getParams().team || this.getParams().user || this.getParams().org, + params = Object.keys(this.getParams()); + params.splice(params.indexOf('org'), 1); return (
+
+ This bar chart represents {words.items[this.state.item]} {words.actions[this.state.item]} {who} {words.item[params[0]]} from W11, Mar 9 to W18, Apr 27 +