Skip to content

Instantly share code, notes, and snippets.

@felipebaltazar
Last active October 15, 2019 17:54
Show Gist options
  • Save felipebaltazar/99c60124202ecc02221f5c81cae9ddec to your computer and use it in GitHub Desktop.
Save felipebaltazar/99c60124202ecc02221f5c81cae9ddec to your computer and use it in GitHub Desktop.
private void RefreshChartValues(float currentValue, float maxValue)
{
if (currentValue >= maxValue)
dataSweepAngle = backgroundSweepAngle;
if (currentValue <= 0)
dataSweepAngle = 1;
var valuePercentage = (currentValue * 100f) / maxValue;
dataSweepAngle = (valuePercentage * backgroundSweepAngle) / 100f;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment