diff --git a/src/components/tools/colorize/colorize.component.js b/src/components/tools/colorize/colorize.component.js index 619756615cf7287b493923ae4d20d05dda7b7d3e..0ea889f851ac3cbb7c13db4fe705a63d9fb07b91 100644 --- a/src/components/tools/colorize/colorize.component.js +++ b/src/components/tools/colorize/colorize.component.js @@ -59,10 +59,10 @@ const ColorizeComponent = ({ selectedLayer, layoutProperties, selectLayer, lay {displayedColorBar.map(mapColors)} - <span className="domain-min smallest-text">{rasterMin.toFixed(2)}</span> + <span className="domain-min smallest-text">{rasterMin.toPrecision(2)}</span> <span - className="domain-med smallest-text">{((rasterMin + rasterMax) * 0.5).toFixed(2)}</span> - <span className="domain-max smallest-text">{rasterMax.toFixed(2)}</span> + className="domain-med smallest-text">{((rasterMin + rasterMax) * 0.5).toPrecision(2)}</span> + <span className="domain-max smallest-text">{rasterMax.toPrecision(2)}</span> </div> } @@ -86,11 +86,11 @@ const ColorizeComponent = ({ selectedLayer, layoutProperties, selectLayer, lay <TableBody> <TableRow> <TableCell className="smaller-text"><strong>Minimum pixel value:</strong></TableCell> - <TableCell className="smaller-text">{rasterMin.toFixed(2)}</TableCell> + <TableCell className="smaller-text">{rasterMin.toPrecision(2)}</TableCell> </TableRow> <TableRow> <TableCell className="smaller-text"><strong>Maximum pixel value:</strong></TableCell> - <TableCell className="smaller-text">{rasterMax.toFixed(2)}</TableCell> + <TableCell className="smaller-text">{rasterMax.toPrecision(2)}</TableCell> </TableRow> <TableRow> <TableCell className="smaller-text"><strong>No Data value:</strong></TableCell>