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.
Answered! Go to the Best Answer.
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Thanks for raising this, I've recreated the issue here and I've logged a ticket for the firmware team. Hopefully will be fixed in an upcoming update!
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Hi Jon,
It look like that this bug has not been fixed in the latest firmware! Any idea, when will it be? Thanks...
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Sorry the fix didn't make it into the release, but will be included in the next update. I can't make any promises, but it will be available by the time the gallery launches.
Best Answer