Skip to content

Commit

Permalink
problème d'arrondis sur les infobulles de certains graphiques #78
Browse files Browse the repository at this point in the history
  • Loading branch information
jerem1508 committed Dec 11, 2024
1 parent c790158 commit 85c996f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions client/src/pages/atlas/charts/sectors-histo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,22 @@ export default function SectorsHistoChart({
name: "Secteur privé",
data: data.map(
(item) =>
parseFloat((
(item.effectif_pr * 100) / (item.effectif_pr + item.effectif_pu)
).toFixed(1)
)
),
color: "#755F4D",
},
{
name: "Secteur public",
data: data.map(
(item) =>
(item.effectif_pu * 100) / (item.effectif_pr + item.effectif_pu)
),
parseFloat((
(item.effectif_pu * 100) / (item.effectif_pr + item.effectif_pu)
).toFixed(1)
)
),
color: "#748CC0",
},
];
Expand Down Expand Up @@ -121,7 +127,8 @@ export default function SectorsHistoChart({
},
tooltip: {
headerFormat: "<b>{point.x}</b><br/>",
pointFormat: "{series.name}: {point.y}<br/>Total: {point.stackTotal}",
pointFormat: view === 'basic' ? "{series.name}: {point.y}<br/>Total: {point.stackTotal}" : "{series.name}: {point.y}%",

},
plotOptions: {
column: {
Expand Down

0 comments on commit 85c996f

Please sign in to comment.