sulkaharo / nsfitbit

Nightscout Fitbit watchface
GNU Affero General Public License v3.0
17 stars 11 forks source link

Add multi-colored graphing #3

Closed TwistaTim closed 5 years ago

TwistaTim commented 5 years ago

Adds the option to color up the display a bit more, by switching out the standard threshold graphing colors to multi-colored rainbow styled ones.

Tested on Versa-Lite, Versa via Simulator, Versa 2 in person. Looks like below: multi-color

sulkaharo commented 5 years ago

I like the idea, but should this not be based on thresholds set in targets? As a user I'd expect the green area to be whatever I set as between targets, or possibly green turning orange on the last 10% of the target area bound. Also let's try to avoid code duplication and have methods be shared if needed and preferably have all graph related code in graph.js

TwistaTim commented 5 years ago

OK the above commits fix the above issues and seperate the color threshold function seperated and only inherited when needed. Looks like below: updatemulticolor

sulkaharo commented 5 years ago

Should we check hithreshold is at least 1.2x lowthreshold for this to work as expected?