Circular progres bar

Hi, i want to do 2 circulars progress bar for bpm and kcal. I found a tutorial for facer , could someone help me with the tag expression?

Hi, I think progress bars are more suitable for variables that have actual goal or limit like steps or battery. BPM nor calories have goal tag in GWD. So you would have to decide values for when full circle should be displayed.
Lets use the terms and method from the tutorial you provided.
(for the case you want to have fixed goal of 10000kcal. Actual number is up to you, but will remain fixed, no matter what has customer set in, or determined by, his s-health app)
untitled
Top layer: The dark cover half circle will be visible for the first half of movement, so it would need expression in opacity like ([kcal]<5000)*100. It will make the cover invisible once 5000kcal was reached
Middle layer: It actually does not need to rotate, just make it appear once the half of movement was reached, using expression in opacity like ([kcal]>=5000)100. The switch Kcal number equals the previous layer. Just make it rotated, put 180 into the angle field.
Bottom layer: This half circle will rotate one revolution and no further after the goal was reached.
For that you can try to put expression like ([kcal]<10000)
([kcal]*360/10000) in angle field.
Sorry I have to figure how to put there multiplication sign without triggering italic style. This is really unexpected method of text formatting used by this new forum.

2 Likes

Thanks a lot, just to help other people, based on a 3000kcal day :

Top layer: The dark cover half circle will be visible for the first half of movement, so it would need expression in opacity like ([kcal]<1500)*100. It will make the cover invisible once 1500kcal was reached
Middle layer: It actually does not need to rotate, just make it appear once the half of movement was reached, using expression in opacity like ([kcal]>=1500)*100. The switch Kcal number equals the previous layer. Just make it rotated, put 180 into the angle field.
Bottom layer: This half circle will rotate one revolution and no further after the goal was reached.
For that you can try to put expression like ([kcal]<3000)*([kcal]*360/3000) in angle field.

1 Like

Nice, how did you trick the text not to change into italic between * symbols?

I just use bold symbolz

You can also use preformatted text. ([kcal]<1500)*100*10

Ron
Samsung Developer Program

1 Like