diff --git a/nupes-elections-front/src/Elections2024.js b/nupes-elections-front/src/Elections2024.js index 842f1a7..f8196b3 100644 --- a/nupes-elections-front/src/Elections2024.js +++ b/nupes-elections-front/src/Elections2024.js @@ -16,7 +16,7 @@ import {useEffect, useState} from "react" highchartsItem(Highcharts) -function ResultatsTable({listes, resultats, siegesParListe}) { +function ResultatsTable({blocs, nuances, listes, resultats, siegesParListe}) { const voix_listes = resultats.voix_listes const listes_triees = listes.toSorted((l1, l2) => { return (voix_listes[l2.numero] || 0) - (voix_listes[l1.numero] || 0) @@ -29,6 +29,8 @@ function ResultatsTable({listes, resultats, siegesParListe}) { Numéro Liste + Nuance + Bloc Voix % Inscrit⋅es % Exprimé⋅es @@ -40,6 +42,10 @@ function ResultatsTable({listes, resultats, siegesParListe}) { {liste.numero} {liste.nom} + nuance.code === liste.nuance)[0].couleur} sx={{padding: "0.2em"}}> + {liste.nuance} + bloc.nom === liste.bloc)[0].couleur} sx={{padding: "0.2em"}}> + {liste.bloc} {voix_listes[liste.numero] || 0} {(100 * (voix_listes[liste.numero] || 0) / resultats.exprimes).toFixed(2)} % {(100 * (voix_listes[liste.numero] || 0) / resultats.inscrits).toFixed(2)} % @@ -329,7 +335,7 @@ export default function Election2024({typeResultats = "france"}) { highcharts={Highcharts} options={compositonOptions} /> - + }; \ No newline at end of file