Skip to content

Commit

Permalink
Chart: Increase max value before scientific display to 10e9 (#2222)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Gilles authored Feb 7, 2025
1 parent 3c64cf5 commit f6ad30c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion front/src/components/boxs/chart/yAxisFormatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const yAxisFormatter = value => {
const roundedValue = parseFloat(value.toPrecision(significantDigits));

// For very small or very large numbers, use scientific notation
if (Math.abs(roundedValue) < 0.001 || Math.abs(roundedValue) >= 1e6) {
if (Math.abs(roundedValue) < 0.001 || Math.abs(roundedValue) >= 1e9) {
return roundedValue.toExponential(2); // Scientific notation with 2 decimals
}

Expand Down

0 comments on commit f6ad30c

Please # to comment.