09-27-2018 05:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

Jogger
3
0
0
09-27-2018 05:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello all,
i`m new in js and have problems to integrate steps (right) and distance (middle) in my clockdesign for versa.
Zip-File: https://files.fm/u/x94zzmpd
Could somebody help me or build it for me 😞

Labels:
- Labels:
-
App Gallery - Clock
1 REPLY 1
10-01-2018 09:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


Fitbit Developer
2266
575
1162
10-01-2018 09:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
You need to import the user activity module:
import { today } from "user-activity";
Put ID's on your text field labels, and get a handle on them in code:
let myStepsLabel = document.getElementById("myStepsLabel"); let myDistanceLabel = document.getElementById("myDistanceLabel");
Then update your text fields with these values inside the clock tick event:
myStepsLabel.text = today.adjusted.steps; myDistanceLabel.text = today.adjusted.distance;
