Skip to content

Commit

Permalink
Chart temps tooltip rounding tweak #1744
Browse files Browse the repository at this point in the history
  • Loading branch information
seerge committed Dec 17, 2023
1 parent bc8084f commit 41e7408
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Fans.cs
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ static string ChartYLabel(int percentage, AsusFan device, string unit = "")
int Max = FanSensorControl.GetFanMax(device);

if (fanRpm)
return (200 * Math.Round((float)(Min * 100 + (Max - Min) * percentage) / 200)).ToString() + unit;
return (200 * Math.Floor((float)(Min * 100 + (Max - Min) * percentage) / 200)).ToString() + unit;
else
return percentage + "%";
}
Expand Down Expand Up @@ -1146,7 +1146,7 @@ private void ChartCPU_MouseMove(object? sender, MouseEventArgs e, AsusFan device
tip = true;
}

labelTip.Text = Math.Round(curPoint.XValue) + "C, " + ChartYLabel((int)curPoint.YValues[0], device, " " + Properties.Strings.RPM);
labelTip.Text = Math.Floor(curPoint.XValue) + "C, " + ChartYLabel((int)curPoint.YValues[0], device, " " + Properties.Strings.RPM);
labelTip.Top = e.Y + ((Control)sender).Top;
labelTip.Left = e.X - 50;

Expand Down

0 comments on commit 41e7408

Please sign in to comment.