summaryrefslogtreecommitdiff
path: root/client/chart
diff options
context:
space:
mode:
authorAdam Harvey <adam@ahprojects.com>2019-04-03 14:35:41 +0200
committerAdam Harvey <adam@ahprojects.com>2019-04-03 14:35:41 +0200
commit0224090a9dcc79de897871cfa573f99cf8f005a5 (patch)
treeec5967fa3d6ca197af1ac12092fe168fdf499d48 /client/chart
parent04677d60e9e867a6d02fa2c99f07f83dff6e6005 (diff)
parentdf707e4316c79375499974fb2a3443f1c049b93c (diff)
.
Diffstat (limited to 'client/chart')
-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>
)
}