Skip to content

Commit

Permalink
fix(graph): Set precision to one digit after the comma for the main g…
Browse files Browse the repository at this point in the history
…raph /2
  • Loading branch information
annelhote committed Dec 19, 2024
1 parent c646946 commit 1525a54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
14 changes: 5 additions & 9 deletions src/components/ProgressionCard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,12 @@ export default function ProgressionCard({ domain }) {
const rhesus = progression[lastObservationSnap] >= progression[previousObservationSnap]
? '+'
: '';
let lastOaRate = progression[lastObservationSnap]
? progression[lastObservationSnap]
: null;
lastOaRate = Math.round(lastOaRate);
let previousOaRate = progression[previousObservationSnap]
? progression[previousObservationSnap]
: null;
previousOaRate = Math.round(previousOaRate);
const lastOaRate = progression?.[lastObservationSnap];
const previousOaRate = progression?.[previousObservationSnap];
if (previousOaRate && lastOaRate) {
const evolution = Math.round(lastOaRate - previousOaRate);
const evolution = (
lastOaRate.toFixed(1) - previousOaRate.toFixed(1)
).toFixed(1);
progPoints = `${rhesus}${evolution}`;
}
}
Expand Down
1 change: 0 additions & 1 deletion src/components/Studio/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ const Studio = () => {
value: item + Number(observationYearFirst),
}));
observationYearsTmp.push({ label: 'La plus récente', value: 'latest' });
console.log(observationYearsTmp);
setObservationYears(observationYearsTmp);
const publicationYearsTmp = [
// ...Array(Number(lastObservationYearTmp) - Number(startYear)).keys(),
Expand Down

0 comments on commit 1525a54

Please sign in to comment.