diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-03-31 17:40:44 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-03-31 17:40:44 +0200 |
| commit | 438cde0ab82cf9fdbdcbb45e0ad8e43efc3525bb (patch) | |
| tree | 5b655ddb574c5f7691354159196c8444ae93a37a /client | |
| parent | 5eb849e37e0c902743a8b1178b652a14d9848e74 (diff) | |
hide pdf
Diffstat (limited to 'client')
| -rw-r--r-- | client/chart/pie.charts.js | 5 | ||||
| -rw-r--r-- | client/index.js | 4 | ||||
| -rw-r--r-- | client/map/index.js | 8 |
3 files changed, 10 insertions, 7 deletions
diff --git a/client/chart/pie.charts.js b/client/chart/pie.charts.js index 6e579537..84e85c3a 100644 --- a/client/chart/pie.charts.js +++ b/client/chart/pie.charts.js @@ -17,6 +17,7 @@ class PieCharts extends Component { render() { const { payload } = this.props const { paper, citations } = payload.data + console.log(this.props) if (!citations.length) return null const countries = {} @@ -83,9 +84,10 @@ class PieCharts extends Component { } }} size={{ - height: 336, + height: countryRows.length < 4 ? 316 : 336, }} /> + <span className='chartCaption'>{paper.name}{' dataset citations by country'}</span> </div> <div> <C3Chart @@ -105,6 +107,7 @@ class PieCharts extends Component { height: 316, }} /> + <span className='chartCaption'>{paper.name}{' dataset citations by organization type'}</span> </div> </div> ) diff --git a/client/index.js b/client/index.js index 5c8bc880..5a7315b5 100644 --- a/client/index.js +++ b/client/index.js @@ -87,9 +87,9 @@ function runApplets() { if (dataset === 'index.html') { dataset = path.pop() } - console.log('dataset from path:', dataset) + // console.log('dataset from path:', dataset) } else { - console.log('not on a dataset page') + // console.log('not on a dataset page') return [el, payload] } } diff --git a/client/map/index.js b/client/map/index.js index 9ca43867..475ba3c6 100644 --- a/client/map/index.js +++ b/client/map/index.js @@ -104,10 +104,10 @@ export default function append(el, payload) { let citationsByAddress = {} citations.forEach(citation => { if (!citation.addresses) { - console.log(citation) + // console.log(citation) return } - console.log(citation) + // console.log(citation) citation.addresses.forEach(address => { if (!(address.name in citationsByAddress)) { citationsByAddress[address.name] = { address, citations: []} @@ -118,7 +118,7 @@ export default function append(el, payload) { Object.keys(citationsByAddress).map(name => { const { citations: citationList, address: citationAddress } = citationsByAddress[name] - console.log(name, citationsByAddress[name]) + // console.log(name, citationsByAddress[name]) // console.log(citation) const latlng = [citationAddress.lat, citationAddress.lng].map(n => parseFloat(n)) if (Number.isNaN(latlng[0]) || Number.isNaN(latlng[1])) return @@ -135,7 +135,7 @@ export default function append(el, payload) { addArc(map, source, latlng, style) }) - console.log(paper) + // console.log(paper) const rootMarker = addMarker(map, source, [paper]) rootMarker.openPopup() |
