diff --git a/src/components/ActionCertaintyCard.tsx b/src/components/ActionCertaintyCard.tsx index 7292f5911..7b11637bc 100644 --- a/src/components/ActionCertaintyCard.tsx +++ b/src/components/ActionCertaintyCard.tsx @@ -47,7 +47,9 @@ const ActionCertaintyCard = ({ [onThresholdChange] ); const sliderValue = requiredConfidence * 100; - const currentConfidence = predictionResult?.confidences[actionId] ?? 0; + const currentConfidence = Math.round( + (predictionResult?.confidences[actionId] ?? 0) * 100 + ); return ( {`${Math.round(value * 100)}%`} + >{`${value}%`} ); }; diff --git a/src/components/PercentageMeter.tsx b/src/components/PercentageMeter.tsx index aeae6b3a0..f1ba54b8f 100644 --- a/src/components/PercentageMeter.tsx +++ b/src/components/PercentageMeter.tsx @@ -26,7 +26,7 @@ const PercentageMeter = ({ // Use inline style attribute to avoid style tags being // constantly appended to the element. style={{ - width: `${Math.round(value * 100)}%`, + width: `${value}%`, }} h={height} rounded="full"