Skip to content

Commit

Permalink
Fix percentage value range from 0 to 100
Browse files Browse the repository at this point in the history
The robot/human ratio percentage should range from 0 to 100 percent, not 0 to 1.
  • Loading branch information
lulunac27a authored and mitya52 committed Nov 26, 2024
1 parent 4f3409a commit 31ed965
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion refact_webgui/dashboards/dash_prime.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def robot_human_ratio(robot: int, human: int) -> float:
# in older versions of refact LSP negative values of human metric existed
if robot + human == 0:
return 0
return round(robot / (robot + human), 2)
return round(100 * robot / (robot + human), 2)


def barplot_rh(
Expand Down

0 comments on commit 31ed965

Please sign in to comment.