mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-25 02:27:43 +01:00
Fixed retain percentage calculation on health tab #652
This commit is contained in:
parent
d1f4b70b8c
commit
0ba447ddf7
@ -77,13 +77,13 @@ public class HealthInformation extends AbstractHealthInfo {
|
||||
long playersRetainedMonth = analysisContainer.getValue(AnalysisKeys.PLAYERS_RETAINED_MONTH).orElse(0);
|
||||
|
||||
if (playersNewMonth != 0) {
|
||||
double retainPercentage = playersRetainedMonth / playersNewMonth;
|
||||
double retainPercentage = playersRetainedMonth * 1.0 / playersNewMonth;
|
||||
if (retainPercentage >= 0.25) {
|
||||
addNote(Icons.GREEN_THUMB + " " + Formatters.percentage().apply(retainPercentage)
|
||||
+ " of new players have stuck around (" + playersRetainedMonth + "/" + playersNewMonth + ")");
|
||||
} else {
|
||||
addNote(Icons.YELLOW_FLAG + " " + Formatters.percentage().apply(retainPercentage)
|
||||
+ "% of new players have stuck around (" + playersRetainedMonth + "/" + playersNewMonth + ")");
|
||||
+ " of new players have stuck around (" + playersRetainedMonth + "/" + playersNewMonth + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user