Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Y-axis scaling can lead to confusing views #2173

Open
Navid200 opened this issue Jun 10, 2022 Discussed in #2144 · 17 comments
Open

Y-axis scaling can lead to confusing views #2173

Navid200 opened this issue Jun 10, 2022 Discussed in #2144 · 17 comments
Assignees
Labels
ui User interface related

Comments

@Navid200
Copy link
Collaborator

Discussed in #2144

Originally posted by christian-rummey May 25, 2022
Hi - I just posted this in the xDrip FB group, and someone asked me to replicate it here:

The y-axis (BG value) currently is auto-scaled to the highest level within the last 24h - see an example on the screenshot (there was a 20+high the afternoon before). This makes sense during the high, and maybe few hours thereafter, for high insulin loads, or similar issues after the high.

But one day later, the curve can give confusing impressions. As we all know, the slope is actually more important than the actual value, and if the y-axis is scaled up to very high values, really steep slopes (eg, +/- 1.5 or more) apper much flatter than they are.

My suggestion is to let the y-axis scale to a normal range by default (e.g, 0-12 or so?), and only scale it up if higher values are visible on screen. Or at least let the user decide how he wants to scaling to work.

hope that makes sense?
thanks

  • Christian

Screenshot_20220525-092910_xDrip+

@Navid200 Navid200 self-assigned this Jun 10, 2022
@Navid200 Navid200 added the ui User interface related label Jun 12, 2022
@thedewi
Copy link

thedewi commented Aug 3, 2022

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?

@thedewi
Copy link

thedewi commented Aug 3, 2022

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.

@Navid200
Copy link
Collaborator Author

Navid200 commented Aug 3, 2022

@thedewi You can force the x axis range using time buttons.
https://navid200.github.io/xDrip/docs/TimeButtons.html

@thedewi
Copy link

thedewi commented Aug 3, 2022

Thanks! Never knew you could long-press that.

@thedewi
Copy link

thedewi commented Aug 3, 2022

I probably never would have figured out you need to long-press the time, as well, to lock it in

@Navid200 Navid200 mentioned this issue Dec 29, 2022
@christian-rummey
Copy link

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

@thedewi
Copy link

thedewi commented Mar 18, 2023

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.

@Navid200
Copy link
Collaborator Author

@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

@Hexonium
Copy link

Hexonium commented May 9, 2023

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:

Screenshot_20230509-182436

@Navid200
Copy link
Collaborator Author

Navid200 commented May 9, 2023

@Hexonium
Can you delete the stop flag, shown in the image below?
237159266-7e3f703f-115e-43c4-adb2-0e523d1d0698

@Hexonium
Copy link

Hexonium commented May 9, 2023

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?).

@Navid200
Copy link
Collaborator Author

Navid200 commented May 9, 2023

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.

@Navid200
Copy link
Collaborator Author

Navid200 commented May 9, 2023

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.

@christian-rummey
Copy link

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.
#2144

@Navid200
Copy link
Collaborator Author

, 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. #2825
Then, the vertical axis will not be adjusted to show the bad reading. You won't even have to wait 2 hours then.

@Navid200
Copy link
Collaborator Author

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.

@christian-rummey
Copy link

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.

ArrowUp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui User interface related
Projects
None yet
Development

No branches or pull requests

4 participants