Open Navid200 opened 2 years ago
The x-axis scaling is also unpredictable, which I find biases my reading of the chart as well. Can we lock the aspect ratio of the chart so gradients are consistent?
In cases where scaling is warranted, it might be better to scale both axes consistently, so at least the gradient would be preserved.
Personally I would prefer if it stayed constant until manually changed.
@thedewi You can force the x axis range using time buttons.
https://navid200.github.io/xDrip/docs/TimeButtons.html
Thanks! Never knew you could long-press that.
I probably never would have figured out you need to long-press the time, as well, to lock it in
So I liked the discussion in #874, and the time buttons.
But - I think the simple solution for this issue would be instead of the last 24h, for the y-axis scaling we should use 4 hours (or so).
Maybe a time when it's safe to say short-term insulin is out of the body after the peak?
It would keep us focused on what is relevant at the moment (and not what happened hours earlier).
Thanks for your help & discussion
The locking isn't working anymore, in 689d22a-2022.12.24. I'm not sure what version this started but now that I'm using a longer insulin action curve the time axis crunches down significantly every time I look.
@thedewi This issue is about the y axis.
Would you be so kind to open a discussion if you have any questions, tips, concerns, etc. about the time (x) axis?
It is very important for us to know if something is not working. I am very interested to know what's going on with what you are experiencing. Would you please click on new discussion here: https://github.com/NightscoutFoundation/xDrip/discussions
Another issue with the y-axis being scaled to the highest value within the last 24h: it suffices to have a single bad point for the graph being useless for 24 hours. Here is an example after starting a new Libre 2 sensor whose first point is 400 for no reason:
@Hexonium Can you delete the stop flag, shown in the image below?
Thanks, it's much better now! The y-axis still scales up to 400 but it's readable (I don't know if there is a way to remove that point?).
You cannot remove a reading. You can mark it as a bad reading.
I will open a PR to remove bad readings from the view.
The other intent is to pan the screen with very large readings. That is going to take a little more time as it is challenging for me.
What I meant to say is to open a PR that will avoid resizing the vertical axis for a reading that is marked as bad.
It slowly gets old by now, but I still believe the 24h window for y-axis scaling makes no sense at all. IMHO 2-4 hours would be much more practical and usable.
, but I still believe the 24h window for y-axis scaling makes no sense at all. IMHO 2-4 hours would be much more practical and usable. #2144
You can scroll back up to 24 hours to see what happens yesterday. If we make the change you suggest and you have very high readings and in 2 hours your axis goes back to normal, what will happen if you scroll back 2 hours? Addressing that is not easy.
However, if you have a very high reading because of an error, meaning your blood glucose is not really high but for a technical reason, the CGM shows one ore two very high readings, after this PR, you will be able to mark the high reading as a bad reading. https://github.com/NightscoutFoundation/xDrip/pull/2825
Then, the vertical axis will not be adjusted to show the bad reading. You won't even have to wait 2 hours then.
You may have correct readings that are very high one day resulting in the vertical axis being adjusted and kept like that for 24 hours. My intent is to change xDrip such that it would automatically pan to always show the latest readings. If you scroll back, it will also automatically pan. So, the vertical axis will never be adjusted without your choice.
But, that is a very challenging programming exercise for me. I will need time to complete it.
Thanks @Navid200, you're exactly right, and I understand the challenge.
I am not sure however, if the automatic panning is needed or the best option. The y-axis could just snap back to normal scale, once a few hours have passed.
When scrolling back, the curve would not be visible, but e.g., replaced by a big arrow (or more arrows) pointing upwards, where the curve would be. I remember this effect on an app (during my 35 T1-years), but can't which one it was. The larger y-scale could come back by clicking (e.g., on the arrow, see below).
Just an idea - in any case thanks for trying.
Discussed in https://github.com/NightscoutFoundation/xDrip/discussions/2144