diff --git a/components/indicators/IndicatorVisualisation.js b/components/indicators/IndicatorVisualisation.js index e702e6a4..53d4fb8d 100644 --- a/components/indicators/IndicatorVisualisation.js +++ b/components/indicators/IndicatorVisualisation.js @@ -214,12 +214,22 @@ function generateCubeFromValues( return generateCube(indicatorGraphSpecification.dimensions, values); } -function getTraces(dimensions, cube, names, hasTimeDimension, i18n) { +function getTraces( + dimensions, + cube, + names, + hasTimeDimension, + i18n, + quantityName +) { + // TODO: We could use quantity name but we can not tell if it's in the correct language + // const name = capitalizeFirstLetter(quantityName ?? i18n.t('value')); + const name = capitalizeFirstLetter(i18n.t('value')); if (dimensions.length === 0) { return [ { xType: cube.length === 1 ? 'category' : 'time', - name: i18n.t('total'), + name: name, dataType: 'total', x: cube.map((val) => { const d = dayjs(val.date); @@ -599,6 +609,7 @@ function IndicatorVisualisation({ indicatorId, indicatorLink }) { plan: { scenarios }, } = data; + console.log('indicator', data); if (!indicator) return {t('indicator-not-found')}; @@ -684,7 +695,8 @@ function IndicatorVisualisation({ indicatorId, indicatorLink }) { cube, null, hasTimeDimension, - i18n + i18n, + indicator.quantity?.name ); const [goalTraces, goalBounds] = normalizeByPopulation ? [[], []] diff --git a/locales/da/common.json b/locales/da/common.json index ab9930ee..93b7aef1 100644 --- a/locales/da/common.json +++ b/locales/da/common.json @@ -120,6 +120,7 @@ "themes": "Temaer", "to-reduce": "Skal reduceres", "total": "I alt", + "value": "værdi", "type": "Type", "under-relative-time": "Under {relativeTime}", "updated": "Opdateret", diff --git a/locales/de/common.json b/locales/de/common.json index fc87baf5..8d153b36 100644 --- a/locales/de/common.json +++ b/locales/de/common.json @@ -121,6 +121,7 @@ "themes": "Themen", "to-reduce": "Noch zu reduzieren", "total": "Gesamtwert", + "value": "Ist-Wert", "type": "Typ", "under-relative-time": "Weniger als {relativeTime}", "updated": "Aktualisiert", diff --git a/locales/el/common.json b/locales/el/common.json index 7f82d899..9a15ccb8 100644 --- a/locales/el/common.json +++ b/locales/el/common.json @@ -121,6 +121,7 @@ "supported-by": "Υποστηρίζεται από", "tactical-indicator": "Τακτικός δείκτης", "total": "σύνολο", + "value": "τιμή", "type": "Τύπος", "updated": "Ενημερωμένο", "see-all-actions": "{context, select, CASE_STUDY {Δείτε όλες τις μελέτες περιπτώσεων} STRATEGY {Δείτε όλες τις στρατηγικές} other {Δείτε όλες τις δράσεις}}", diff --git a/locales/en/common.json b/locales/en/common.json index 3a9982a3..2cd82044 100644 --- a/locales/en/common.json +++ b/locales/en/common.json @@ -125,6 +125,7 @@ "themes": "Themes", "to-reduce": "Left to reduce", "total": "total", + "value": "Value", "type": "Type", "under-relative-time": "Under {relativeTime}", "updated": "Updated", diff --git a/locales/es/common.json b/locales/es/common.json index 15c77088..936646ea 100644 --- a/locales/es/common.json +++ b/locales/es/common.json @@ -120,6 +120,7 @@ "themes": "Temas", "to-reduce": "Izquierda para reducir", "total": "total", + "value": "valor", "type": "Tipo", "under-relative-time": "Menos de {relativeTime}", "updated": "Actualizado", diff --git a/locales/fi/common.json b/locales/fi/common.json index 170bcb1c..a5113a68 100644 --- a/locales/fi/common.json +++ b/locales/fi/common.json @@ -121,6 +121,7 @@ "themes": "Teemat", "to-reduce": "Vähennettävää", "total": "yhteensä", + "value": "arvo", "type": "Tyyppi", "under-relative-time": "Alle {relativeTime}", "updated": "Päivitetty", diff --git a/locales/lv/common.json b/locales/lv/common.json index e8cba9f3..f5b590da 100644 --- a/locales/lv/common.json +++ b/locales/lv/common.json @@ -149,6 +149,7 @@ "themes": "Tēmas", "to-reduce": "Kreisajā pusē, lai samazinātu", "total": "kopā", + "value": "vērtība", "type": "Tips", "with-contact-persons": "Vai ir kontaktpersona", "indicator-compare-source": "Rāda", diff --git a/locales/pt-BR/common.json b/locales/pt-BR/common.json index 9055aca5..1156805e 100644 --- a/locales/pt-BR/common.json +++ b/locales/pt-BR/common.json @@ -125,6 +125,7 @@ "themes": "Temas", "to-reduce": "Esquerda para reduzir", "total": "total", + "value": "valor", "type": "Tipo", "under-relative-time": "Em {relativeTime}", "updated": "Atualizado", diff --git a/locales/sv/common.json b/locales/sv/common.json index 43ee78e7..c665cf41 100644 --- a/locales/sv/common.json +++ b/locales/sv/common.json @@ -109,6 +109,7 @@ "themes": "Teman", "to-reduce": "Kvar för att minska", "total": "totalt", + "value": "värde", "type": "Typ", "under-relative-time": "Lägre som {relativeTime}", "updated": "Uppdaterad",