diff --git a/packages/react-mutation-mapper/src/component/gnomad/GnomadFrequency.tsx b/packages/react-mutation-mapper/src/component/gnomad/GnomadFrequency.tsx index c0478b1d93e..d7d1aaf1bdf 100644 --- a/packages/react-mutation-mapper/src/component/gnomad/GnomadFrequency.tsx +++ b/packages/react-mutation-mapper/src/component/gnomad/GnomadFrequency.tsx @@ -145,11 +145,14 @@ export default class GnomadFrequency extends React.Component0; } else { // show frequency as number with 4 significant digits - var significantDigitsFormatter = new Intl.NumberFormat("en", { - minimumSignificantDigits: 1, - maximumSignificantDigits:4 - }); - display = {significantDigitsFormatter.format(result['Total'].alleleFrequency)}; + display = ( + + {result['Total'].alleleFrequency.toLocaleString(undefined, { + maximumSignificantDigits: 4, + minimumSignificantDigits: 1, + })} + + ); } overlay = () => ; diff --git a/packages/react-mutation-mapper/src/component/gnomad/GnomadFrequencyTable.tsx b/packages/react-mutation-mapper/src/component/gnomad/GnomadFrequencyTable.tsx index c2f5a37ed85..d1bd665a170 100644 --- a/packages/react-mutation-mapper/src/component/gnomad/GnomadFrequencyTable.tsx +++ b/packages/react-mutation-mapper/src/component/gnomad/GnomadFrequencyTable.tsx @@ -6,7 +6,6 @@ import {GnomadSummary} from "../../model/GnomadSummary"; import ColumnHeader from "../column/ColumnHeader"; import "./gnomadFrequencyTable.scss"; -import { significantDigits } from "../../util/FormatUtils"; export interface IGnomadFrequencyTableProps { @@ -21,7 +20,14 @@ export function frequencyOutput(frequency: number) { } else { // show frequency as number with 4 significant digits - return {significantDigits(frequency, 4)}; + return ( + + {frequency.toLocaleString(undefined, { + maximumSignificantDigits: 4, + minimumSignificantDigits: 1, + })} + + ); } }