summaryrefslogtreecommitdiff
path: root/client/chart/countriesByYear.chart.js
diff options
context:
space:
mode:
authorjules@lens <julescarbon@gmail.com>2019-04-02 20:36:51 +0200
committerjules@lens <julescarbon@gmail.com>2019-04-02 20:36:51 +0200
commit1d238346b5609e9454a4917c75631a550b5b43d1 (patch)
tree8a936e721e78c7b5948b303e6a1686c96b882d51 /client/chart/countriesByYear.chart.js
parentb4b58f2279fb01fa0240006c460c0b5ec95c1126 (diff)
parentf58d41731fc07d94d594d5582aef203564f990ec (diff)
Merge branch 'master' of asdf.us:megapixels_dev
Diffstat (limited to 'client/chart/countriesByYear.chart.js')
-rw-r--r--client/chart/countriesByYear.chart.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/client/chart/countriesByYear.chart.js b/client/chart/countriesByYear.chart.js
index 4257748c..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,6 +160,7 @@ class CountriesByYearChart extends Component {
}
}}
/>
+ <div className='caption'>{paper.name}{' dataset citations per country per year. We verified ' + citations.length + ' papers that used the dataset.'}</div>
</div>
)
}