Hello, I recently start to making watch faces with fitbitStudio and some important programming rules I don't know yet, so I decided to ask the community.
index.js code:
let floorsValue = (userActivity.today.adjusted["elevationGain"] || 0);
txtFloors.text = floorsValue;
Elevation = ((floorsValue * 167)/8000);
index.gui code:
<circle cx="30" cy="202-Elevation" r="7" fill="#444444"/>
I would like move this circumference only on the y axis as a function of the Elevation value. How can I do it?
Thanks for your attention
Answered! Go to the Best Answer.
Best Answer
Best Answerlet Elevation= document.getElementById("Elevation");
let floorsValue = (userActivity.today.adjusted["elevationGain"] || 0);
txtFloors.text = floorsValue;
Elevation = ((floorsValue * 167)/8000);
<circle cx="30" myCircle.cy = "202-Elevation" r="7" fill="#444444"/>
In this way?
Best Answer
Best AnswerI managed to do the variable pass, but send me this error: Error 22 Invalid length value 'myCircle'. It is possible becouse is a number with a comma ?
Best Answer