08-31-2017 07:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-31-2017 07:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Just wondered if there are examples of how to draw using code for non-static elements?
eg Using lines to draw a graph or drawing arcs to show the seconds around the edge (like Fitbit Blaze Chronograph face).
Thanks,
NiVZ
Answered! Go to the Best Answer.
Accepted Solutions
09-01-2017 00:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-01-2017 00:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Great question.
We don't currently have a drawing or canvas API, but it's something we're definitely aware of the benefits.
You also can't directly modify the innerHTML, or it's equivalent in this case.
You can however dynamically adjust the attributes of the existing svg elements, like <arc>.
https://dev.fitbit.com/guides/user-interface/svg/#arc
I'll try to add an example to the developer website.
08-31-2017 09:53 - edited 08-31-2017 12:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-31-2017 09:53 - edited 08-31-2017 12:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I'm interested in this as well.
I'm wondering if the answer is essentially that you have to modify the document's innerHTML manually to edit "inline" .gui files.
Perhaps with the help of Preact if it can handle the 3kb memory hit it could be accomplished in a React / JSX style way. I could be overthinking things and introducing unneeded complexity, but I'm not seeing an actual drawing library like <canvas> provides.

09-01-2017 00:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-01-2017 00:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Great question.
We don't currently have a drawing or canvas API, but it's something we're definitely aware of the benefits.
You also can't directly modify the innerHTML, or it's equivalent in this case.
You can however dynamically adjust the attributes of the existing svg elements, like <arc>.
https://dev.fitbit.com/guides/user-interface/svg/#arc
I'll try to add an example to the developer website.
09-02-2017 04:22
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-02-2017 04:22
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Examples will really help get us started. The initial ones don't cover all we need, as Paul has highlighted.

09-02-2017 07:35
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-02-2017 07:35
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I know that visibility can't be toggled, but what about access to an element's classList methods?

09-03-2017 10:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-03-2017 10:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
classList isn't available, sorry.

