summaryrefslogtreecommitdiff
path: root/client/chart/countriesByYear.chart.js
diff options
context:
space:
mode:
authoradamhrv <adam@ahprojects.com>2019-04-03 23:24:12 +0200
committeradamhrv <adam@ahprojects.com>2019-04-03 23:24:12 +0200
commit7d2043eb24cd171e809d83219e543ce9541ba821 (patch)
treec415aae6c682093b18052d622fd201e983e18fd1 /client/chart/countriesByYear.chart.js
parent2db426422eedc4847618f972b02189f3d49fe03a (diff)
parent24e4f4af71f1e146f33688822ac3e4242339faa4 (diff)
Merge branch 'master' of github.com:adamhrv/megapixels_dev
Diffstat (limited to 'client/chart/countriesByYear.chart.js')
-rw-r--r--client/chart/countriesByYear.chart.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/client/chart/countriesByYear.chart.js b/client/chart/countriesByYear.chart.js
index 2284f774..df7a4530 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
@@ -158,7 +160,7 @@ class CountriesByYearChart extends Component {
}
}}
/>
- <div className='caption'>{paper.name}{' dataset citations by country per year'}</div>
+ <div className='caption'>{paper.name}{' dataset citations per country per year. We verified ' + citations.length + ' papers that used the dataset.'}</div>
</div>
)
}