Round progress for distance, miles, kilometers

Can’t figure out how to get a round progress for distance, miles, kilometers. Any help will be greatly appreciated!

This is what I am working on:

3 Likes

Looks good and I seem to remember Arcs are good instead of Progress circles/bars. Can’t assist you though sorry, not on my laptop today, but I’m sure you’ll have experts here soon :+1:

3 Likes

You already have the formulas for miles and Km, so I think you can put those in a progress circle. But to differentiate between miles an km I would make 2 progress circles, and move them off the screen depending on UNITSYS.

So the progress fill ratio formula for Km would be (for miles just replace 32.8 by 52.8):
(clamp(((floor(((((#ZSC#*2.34)/32.8))/100)*100))/100), 0, 10)/10)

You can play with the “10)/10” at the end. These values will give you approximately 10km or 10 miles to fill the progress circle.

4 Likes

Ok, can you check the face and see if it’s right/looks ok? TIA

3 Likes

Just to chip in, looks good to me too. I don’t personally use progress for steps/distance as everyone has different daily goals, but I guess you can just judge on a part of 10k.

I thought the moving off screen was only needed due to opacity not working dynamically on sequences. For all else I just use opacity. I’d love to know if I am missing other reasons to move over invisiblize.

In my experience progress elements can be easier if you have a full circle with a semi opaque back as you don’t need a second backing arc.
Only where a partial circle is needed to arcs become essential as the background of a progress element is always fill 1 of a full circle.
There may well be other reasons hand I have mixed and matched.

4 Likes

You can actually use the opacity to hide one or the other depending on UNITSYS in this case, but you still need 2 progress circles.

So overlaying 2 progress circles with:

circular progress 1:

  • Opacity: $#UNITSYS#=IMPERIAL?0:100$
  • Fill Ratio: km formula

circular progress 2:

  • Opacity: $#UNITSYS#=IMPERIAL?100:0$
  • Fill Ratio: miles formula
2 Likes

on second thought, I have not tried to put a condition in the fill ratio, have try that…

2 Likes

I suppose you could also put that in one progress:
Fill Ratio: (#UNITSYS#=IMPERIAL?[Miles Formula]:[KM Formula])
Gets even more clunky so you’ll want a decent notepad for maintenance but the formula is long enough to want one to modify anyway.
$#UNITSYS#=IMPERIAL?clamp(((floor(((((#ZSC#*2.34)/52.8))/100)*100))/100), 0, 10)/10:clamp(((floor(((((#ZSC#*2.34)/32.8))/100)*100))/100), 0, 10)/10$

During testing I discovered you cannot use () for the condition bound instead of $$ here then I realised the equality test is string based and the expanded functionality you get with () conditions is for numbers only, in all parts I assume.
I think, if it were fully numeric you could put the condition just around the miles/km multiplier, which is what I tried first.

Saw this just as I posted ;-)

2 Likes

I think these are actually all the same depending on your steps count goal. Or do you plan to set different goals in each unit system? Like 10k steps, 10k meters, 10 miles? Those are still related (computed) with common source number, aka step count.

2 Likes