Hacker News new | past | comments | ask | show | jobs | submit | more Tutorialzine's comments login

Hello Nathan, and thank you for the comment.

Actually the “off by one” bug is by design – it looks empty when the value of the dial is zero and the colorful ring around it is completely gone (and given it is midnight it would stay like this for an hour).

However you are free to change it – you’ll just need to change the line above from:

    var angle = (360/total)*(current+1); 
To something like this:

    var angle = (360/(total-1))*current;


Hmm, that is a good point about the "empty ring" but it looks bad when the ring is off by one for the entire rest of the day.


Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: