10-11-2017 08:16 - edited 10-11-2017 18:03
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-11-2017 08:16 - edited 10-11-2017 18:03
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
How do I rotate a "g" element in javascript?
document.getElementById('g_element').transform = 'rotate(15)'; ?
I mean, how do I rotate the clock hands in javascript?
Answered! Go to the Best Answer.
Accepted Solutions
10-24-2017 20:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-24-2017 20:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Yup. Thanks to another person in the Discord channel I was able to get a nice analog clock going and now working on customisable faces 🙂

10-12-2017 03:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


10-12-2017 03:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
JavaScript rotation is coming in the next update, we'll have some new documentation for you.
10-20-2017 18:50 - edited 10-20-2017 18:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-20-2017 18:50 - edited 10-20-2017 18:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@JonFitbit any idea when that's coming? From what I can tell, analog faces aren't possible at the moment. I've got a rotation on an SVG but don't seem to have a way to manipulate it based on the current time...

10-21-2017 11:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


10-21-2017 11:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
@Jacques0130 wrote:
@JonFitbit any idea when that's coming? From what I can tell, analog faces aren't possible at the moment. I've got a rotation on an SVG but don't seem to have a way to manipulate it based on the current time...
If you look on the community Discord server, you'll find a pinned example of creating an analogue clock. Search this site for the Discord url.
10-24-2017 20:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-24-2017 20:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Yup. Thanks to another person in the Discord channel I was able to get a nice analog clock going and now working on customisable faces 🙂

01-09-2018 09:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-09-2018 09:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I have searched in discord but can not find anything that helps me.
You don't mind posting an example here?
Thanks in adv.
kmpm

01-09-2018 10:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


01-09-2018 10:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@kmpm wrote:
I have searched in discord but can not find anything that helps me.
You don't mind posting an example here?
Thanks in adv.
kmpm
The clockface guide now contains an example https://dev.fitbit.com/build/guides/clockfaces/
You can also take a look at the Rotation Animation section here https://dev.fitbit.com/build/guides/user-interface/animations/#transformation-animations

09-04-2018 20:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-04-2018 20:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
How do I rotate an item but not always start at 0 degrees? I want to start at 45 degrees and finish at 135 degrees.
function stepsToAngle(steps){ //return Math.Floor((360 / 10000) * steps); return (((90 / 10000) *steps)); if (steps > 10000){ return (((90 / 10) * steps)); } }

