diff --git a/packages/ketcher-react/src/components/MonomerPreview/AmbiguousMonomerPreview/AmbiguousMonomerPreview.tsx b/packages/ketcher-react/src/components/MonomerPreview/AmbiguousMonomerPreview/AmbiguousMonomerPreview.tsx index 8b0b95419f..94ae1c29db 100644 --- a/packages/ketcher-react/src/components/MonomerPreview/AmbiguousMonomerPreview/AmbiguousMonomerPreview.tsx +++ b/packages/ketcher-react/src/components/MonomerPreview/AmbiguousMonomerPreview/AmbiguousMonomerPreview.tsx @@ -78,6 +78,16 @@ const UnstyledAmbiguousMonomerPreview = ({ className, preview }: Props) => { return b.ratio - a.ratio; } }); + if (!isAlternatives) { + const overallRatio = sortedData.reduce( + (acc, item) => acc + (item.ratio || 1), + 0, + ); + + sortedData.forEach((entry) => { + entry.ratio = Math.round(((entry.ratio || 1) / overallRatio) * 100); + }); + } return sortedData.slice(0, 5); }, [previewData, isAlternatives]);