Steps Progress bar coding help

I created a close to 1/4 circle progress circle for 1-5000 steps which works fine
Code: (clamp(#ZSC#, 1, 5000)/30500)
Rotation: 68 to get the start and end position correct.

I can’t figure out how to code the same progress circle for 5000-10000 steps.

Goal is when the first blue progress circle (1-5000) is full the 2nd (5000-10000) starts at the same position as the first one just in another color
Thanks for any help

Screenshot 2024-10-14 at 8.48.58 AM

2 Likes

Ha Ha . I have done a couple of auto ranging step counters . You have several choices . You actually have one of the answers above . You set the clamp from 5000,10000 on a second layer , and dismiss the pervious layer with a conditional it the opacity . A coding master or myself with a bit of time could work it out on one line .
The ones I have done auto range half way . I will post one to show you . See the gauges on this are symmetric . Just ignore the Rotation formulas in your case . If this is confusing to you I Apologise and we can make a more simple test .
I am presuming you know how to inspect an open Face .
.
.

4 Likes

This is a less elegant way of doing it but still workable. Wayne H - Digital 14 - watch face for Apple Watch, Samsung Gear S3, Huawei Watch, and more - Facer

3 Likes

It is not about elegance . Some solutions are presented . It is about how the maker wants it to look . I have a nice Formula given to me by a master for WFS . It looks for the Users Steps Goal and auto ranges round that . But it is of no value here . 5k is a good Average goal . Let us see where @michaeldekort wants to take it .

1 Like

Sorry @michaeldekort I could not help myself . See I have not used Progress bars I don’t like them . I have more control of the background with a shape layer set to ARC . This is a bit scrappy but it works . I have tried to use the descriptive style of Maths . I have made the arc 0.25 we can always change that easily .
.
.

I haven’t tried, but my approach would be to make a second progress bar where the steps are subtracted by 5000.

i.e.:
1st bar: (clamp(#ZSC#,1,5000)/30500)
2nd bar: (clamp(#ZSC#-5000,1,5000)/30500)

in theory this has the advantage that the old 0-5000 bar will remain visible and the second one will appear on top of it.

here is a demo:

1 Like

yes I agree, elegance wasn’t the right adjective. I was trying to say that I have a more brute force approach to coding.

1 Like

Yes . I don’t think mine us as Elegent as Masters . But I try to use the Descriptive Style and putting the formla on one line requires a special effort .

Thanks for your detailed suggestions and I started playing around with it but your suggestion to replace the 2nd layer with 5000-10000 didn’t work at all.
As I wanted to go the values up from bottom to top just like the exercise progress does I had a “reverse fill” for both layers which seemed to be the issue. Not sure if it is a Facer issue or my minimal coding knowledge.
I started to find other solutions without having to use the “reverse fill” and came up with this which seems to work very well (see screenshot)

Layer 1 blue
Fill: (clamp(#ZSC#, 0, 5000)/30500)
Rotation: (65-(clamp(#ZSC#, 0, 5000)/30500)*360)

Layer 2 yellow
Fill: ((clamp(#ZSC#, 5000, 10000)-5000)/30500)
Rotation: (65-(((clamp(#ZSC#, 5001, 10000)-5001)/30500))*360)

I am going to look also in your suggestion to use arc instead which seems easier.
Thanks a lot for helping

1 Like

Cool . As you see i managed to get the revers fill to work . I was thinking active Rotation but I felt it was a step to far . I am a little dyslexic in my old age so this sort of stuff is a bit confusing for me some times . Jolly well done . I realise now you wanted the colour of the 0 to 5 k to stay in place .

1 Like