From 6256cd742bb98edfeef27abc7f248d31cd13f4b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anne=20L=27H=C3=B4te?= Date: Mon, 16 Oct 2023 15:04:08 +0200 Subject: [PATCH] fix(graph): Add titles --- .../publications/others/retractions/get-data-by-year.js | 8 ++++---- src/translations/en.json | 4 +++- src/translations/fr.json | 4 +++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/components/Charts/publications/others/retractions/get-data-by-year.js b/src/components/Charts/publications/others/retractions/get-data-by-year.js index 1b387a9e..1c5fed7c 100644 --- a/src/components/Charts/publications/others/retractions/get-data-by-year.js +++ b/src/components/Charts/publications/others/retractions/get-data-by-year.js @@ -30,10 +30,10 @@ function useGetData(observationSnaps, domain = '', isPercent = false) { const oaData = []; buckets.forEach((item) => { const retracted = item.by_retraction.buckets.find((i2) => i2.key === 1); - const closedPubs = retracted.by_oa.buckets.find((i2) => i2.key === 0)?.doc_count ?? 0; - closedData.push((closedPubs / item.doc_count) * 100); - const oaPubs = retracted.by_oa.buckets.find((i2) => i2.key === 0)?.doc_count ?? 0; - oaData.push((oaPubs / item.doc_count) * 100); + const closedPublications = retracted.by_oa.buckets.find((i2) => i2.key === 0)?.doc_count ?? 0; + closedData.push((closedPublications / item.doc_count) * 100); + const oaPublications = retracted.by_oa.buckets.find((i2) => i2.key === 1)?.doc_count ?? 0; + oaData.push((oaPublications / item.doc_count) * 100); }); const dataGraph = [ { diff --git a/src/translations/en.json b/src/translations/en.json index b2bdd93d..ab251de9 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -871,6 +871,9 @@ "app.health-publi.data.hosted-documents-pmc": "of the publications in the health field from {publicationYear} are hosted on PubMed Central", "app.national-publi.data.documents-by-types-by-oa": "of the journal articles are open access, compared to {oaBooksRate}% of books", "app.national-publi.others.collaborations.international-collaborations.title": "Top 10 of the international collaborations with France", + "app.national-publi.others.retractions.chart-by-publisher.tooltip": "{point.publisher}
• Share of retracted publications :
{point.y_rel:.1f} ‱ ({point.y_abs} / {point.y_tot})", + "app.national-publi.others.retractions.chart-by-year.title": "Rate of retracted publications by year of publication", + "app.national-publi.others.retractions.chart-by-field.title": "Rate of retracted publications by scientific field", "app.navigation.objet-recherche": "Research object navigation", "app.flyer.presentation": "General presentation leaflet of the French Open Science Monitor", "app.flyer.presentation.description-fr": "General presentation leaflet of the French Open Science Monitor in French (pdf)", @@ -945,7 +948,6 @@ "app.publi.navigation.voies": "The opening routes", "app.publi.nb-publications": "Number of publications", "app.publi.nb-publications-retracted": "Number of retracted publications", - "app.national-publi.others.retractions.chart-by-publisher.tooltip": "{point.publisher}
• Share of retracted publications :
{point.y_rel:.1f} ‱ ({point.y_abs} / {point.y_tot})", "app.publi.percent-publications-retracted": "Percent of retracted publications", "app.publi.pertenthousand-publications-retracted": "Share of retracted publications (per ten thousand)", "app.publi.part-publications-archive": "Share of publications in open access on archive", diff --git a/src/translations/fr.json b/src/translations/fr.json index 7b589e2b..c163311a 100644 --- a/src/translations/fr.json +++ b/src/translations/fr.json @@ -1032,6 +1032,9 @@ "app.health-publi.data.hosted-documents-pmc": "des publications en santé de {publicationYear} sont hébergées sur PubMed Central", "app.national-publi.data.documents-by-types-by-oa": "des articles de revue sont en accès ouvert, contre {oaBooksRate} % des ouvrages", "app.national-publi.others.collaborations.international-collaborations.title": "Top 10 des collaborations internationales avec la France", + "app.national-publi.others.retractions.chart-by-publisher.tooltip": "{point.publisher}
• Part de publications retirées :
{point.y_rel:.1f} ‱ ({point.y_abs} / {point.y_tot})", + "app.national-publi.others.retractions.chart-by-year.title": "Taux de publications retirées par année de publication", + "app.national-publi.others.retractions.chart-by-field.title": "Taux de publications retirées par discipline", "app.navigation.objet-recherche": "Navigation par objet de recherche", "app.navigation.methodologies": "Navigation dans les méthodologies", "app.flyer.presentation": "Plaquette de présentation générale du Baromètre de la Science Ouverte", @@ -1107,7 +1110,6 @@ "app.publi.navigation.voies": "Les voies d'ouverture", "app.publi.nb-publications": "Nombre de publications", "app.publi.nb-publications-retracted": "Nombre de publications retirées", - "app.national-publi.others.retractions.chart-by-publisher.tooltip": "{point.publisher}
• Part de publications retirées :
{point.y_rel:.1f} ‱ ({point.y_abs} / {point.y_tot})", "app.publi.percent-publications-retracted": "Pourcentage de publications retirées", "app.publi.pertenthousand-publications-retracted": "Part des publications retirées (pour dix mille)", "app.publi.part-publications-archive": "Part des publications en accès ouvert sur archive",