NightscoutFoundation / xDrip

Nightscout version of xDrip+
https://jamorham.github.io/#xdrip-plus
GNU General Public License v3.0
1.41k stars 1.15k forks source link

Miband 4 - Bug Report: Color Artifacts in the BG Graph #1346

Closed Otter3eso57 closed 2 years ago

Otter3eso57 commented 4 years ago

Hi @bigdigital, Your Miband 4 integration in xDrip+ works awesome. But I noticed today that there are color artifacts in the BG graph. Please see the attached pictures. The artifact is between one point of color change were the curve intersects the limit line and the second color change. It looks like only one spline per color is used. But the spline needs to be cut between these points.

Can you have a look at the graph generation?

Thank you very much.

Otto red_blue

blue_red

bigdigital commented 4 years ago

Hi. To render graphs on miband, it was used the same library as for the entire xdrip application. This library draws lines as a collection of dots by specific coordinates. In some cases, due to approximation in the coordinates calculations, the point coordinates can be shifted in one or another direction by one pixel which can lead to such artefacts. Since this is a separate library bundled in the xdrip core i don't think i can change this behaviour.
Regards, Artem

Otter3eso57 commented 4 years ago

Hello @tolot27, Could you please help me find the developer that could address this issue in the xDrip "graphics library".

tolot27 commented 4 years ago

@Otto75so3e I've just started triaging the issues. Later on, we will prioritize them and start working on the most important issues.

tolot27 commented 2 years ago

@Otter3eso57 @bigdigital Is this still an issue or is it fixed over time by some library upgrades?

bigdigital commented 2 years ago

No, i think this issue still happening if use a connected lines for bg graph. For now, I've switched the miband graph to the dots representation instead of the connected lines (like this done for xdrip graph in the application). This makes this bug not so noticeable. Actually, i not sure if this is a chart library issue, or there is something wrong with the chart coordinates filler in the xdrip.

Navid200 commented 2 years ago

Closing this as currently the plan is to address Mi Band by a different app to be developed by bigdigital as explained here: https://github.com/NightscoutFoundation/xDrip/pull/1659#issuecomment-979924823.