diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-04-02 15:52:46 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-04-02 15:52:46 +0200 |
| commit | 892f2e928c05126b48c2dc8b669b31235be62f9b (patch) | |
| tree | 21c0f29629470610e03e15722b8458d5e413ec13 | |
| parent | 9280b2ad356b7f0cda38f9e14eb91b89f076e9c1 (diff) | |
touch up chart
| -rw-r--r-- | client/chart/countriesByYear.chart.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/client/chart/countriesByYear.chart.js b/client/chart/countriesByYear.chart.js index 2284f774..78ab4434 100644 --- a/client/chart/countriesByYear.chart.js +++ b/client/chart/countriesByYear.chart.js @@ -68,11 +68,13 @@ class CountriesByYearChart extends Component { ) ) - citationCountsByYear.push( - [otherCountriesLabel].concat( - yearList.map(year => otherCountries.reduce((a,b) => (a + years[year][b]), 0)) + if (otherCountries.length) { + citationCountsByYear.push( + [otherCountriesLabel].concat( + yearList.map(year => otherCountries.reduce((a,b) => (a + years[year][b]), 0)) + ) ) - ) + } let maxCitationsInAYear = 0 let currentSum = 0 |
