How can i change sweep-angle on runtime?
GUI:
<arc id="steps" x="30" y="20" width="100" height="100" fill="fb-lime"
arc-width="10" start-angle="0" sweep-angle="90" />
JS:
var arcSteps = document.getElementById("steps");
arcSteps.sweep-angle = "120"; <--- it doesnt work, build failed
arcSteps.sweepAngle = "120"; <--- it has no impact
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.
Some of our SVG are lacking in this release. sweepAngle should be in the next update though!
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.
Will start-angle be in it as well? I am going through the same issue.
Ps how do you guys do the circles in the watch faces without this function? Do you have an alternative idea/coding you are using?
Best AnswerSorry for the bump, but this is something Im working on as well. Wondering how this is currently implemented in the gauges clock face.
Best Answerwhen is the next release that would have start-angle & sweep-angle that can be changed during run-time?
Best Answerxxxxx.sweepAngle started working for me.
I am not sure if there have been changes, but it does work now.
Best Answer
Best AnswerMy code for sweepAngle is basically:
import document from "document";
let tideArc = document.getElementById("tideArc");
function processTideData(data) {
var time = data[1].date;
var epoch = data[1].dt;
var orario = new Date(epoch * 1000);
let now = Date.now();
var timeDiff = Math.round((orario-now)/120000);
tideArc.sweepAngle = Math.abs(180-timeDiff)
}