From 0d9e653222639777129ca75dc1857edd5d2ac225 Mon Sep 17 00:00:00 2001 From: Gregory Eremin Date: Sat, 14 Mar 2015 22:53:57 +0700 Subject: [PATCH] Change stacked area change height 250 -> 350 --- app/scripts/src/charts/stacked_area_chart.jsx | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/app/scripts/src/charts/stacked_area_chart.jsx b/app/scripts/src/charts/stacked_area_chart.jsx index 32b231d..d2fd60c 100644 --- a/app/scripts/src/charts/stacked_area_chart.jsx +++ b/app/scripts/src/charts/stacked_area_chart.jsx @@ -3,7 +3,7 @@ var StackedAreaChart = React.createClass({ numElements: 10, maxWeeks: 20, - height: 250, + height: 350, getInitialState: function() { return { @@ -172,8 +172,34 @@ var StackedAreaChart = React.createClass({ ); }.bind(this)); + 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; + + var params = Object.keys(this.getParams()); + params.splice(params.indexOf('org'), 1); + var subject = params[0]; + return (
+
+ This stacked area chart represents {words.items[this.state.item]} {words.actions[this.state.item]} {who} {words.item[subject]} from W11, Mar 9 to W18, Apr 27 +