10-23-2017 13:02
10-23-2017 13:02
Hello,
I wonder if someone can help me or confirm that there is a reported bug here. But it seems that I can not get correct goal data from "elevationGoal" and "caloriesGoal".As you can see, I am getting different values for "Progress Arcs" for both. Code is as below...
const elevationGoal = userActivity.goals.elevationGain;
and then..
const metricElevation = "elevationGain"; const amountElevation = userActivity.today.adjusted[metricElevation] || 0;
and finally...
dailystairs.innerText = amountElevation; let elevationAngle = Math.floor(360*(amountElevation/elevationGoal)); if ( elevationAngle > 360 ) { elevationAngle = 360; elevationRing.fill="#58e078"; } elevationRing.sweepAngle = elevationAngle;
Similar code for Calories as well.. Any help is greatly appreciated.
10-23-2017 13:04
10-23-2017 13:13
10-23-2017 13:13
Apologies...wrong forum.