JohanDegraeve / xdripswift

xdrip for iOS, written in Swift
GNU General Public License v3.0
317 stars 313 forks source link

AGP Chart View Addition #497

Closed BrightScreenTV closed 2 months ago

BrightScreenTV commented 6 months ago

Hi,

A few months ago I tried to create a PR with multiple updates to it and you'd asked me to do some tidying of my code. Eventually, I came round to feeling that I'd dropped too much in your collective laps in one go.

If it's ok, I'd like to PR my suggested enhancements one at a time.

This is the first one, and I hope you find it as helpful as I do with BG control.

Screenshot 2024-01-11 at 20 35 30

AGP's are described here:

http://www.agpreport.org/agp/about https://diabetes.medicinematters.com/blood-glucose-monitoring/continuous-glucose-monitoring/ambulatory-glucose-profile-what-why-and-how/16063922

The chart is accessed by a long press on the statistics view. There are 4 buttons along the bottom of the AGP view: 7 days, 14 days, 30 days and 90 days. The white chart line is the 50th quartile, the light area surrounding it is the 25th - 75th quartile and the darker area surrounding that, is the 10th - 90th quartile.

If the user touches on the chart, a timebar will appear with the glucose quartile figures for that point in an 'average' day - note there is also a 'm' figure which is the symbol for average (not to be confused with the 50th quartile).

Screenshot 2024-01-11 at 20 38 27

This 'm' is as international a symbol as I can find for the mathematical average. As with the buttons icons, I've sought not to use words which would need to be translated and I'm hoping that a number followed by the calendar symbol will indicate that it's 'x days'. This falls a little bit apart with the Q's for the quartiles and the views labelling.

paulplant commented 3 months ago

@BrightScreenTV , this is a cool idea.

I was planning a complete overhaul of the statistics part of xDrip4iOS in the next months to include report generation within the app.

I'm not sure that your PR fits in cleanly with xDrip4iOS as it is, but I think it would be an amazing addition to the changes I'm planning.

Are you OK if we leave this parked here for a short while and then incorporate it (in a slightly different way) into the new Statistics part of the app and to the reporting? I think it will add huge value.

BrightScreenTV commented 3 months ago

Hi,

Of course. I think there’s a couple of bugs I need to squish anyways. Should I close it?

Is there anything I could be thinking of in terms of how it would fit in better? I realise that I haven’t put any kind of x-axis markings (beside what’s shown when the user clicks on the chart), which would help.? Regards,

Todd.

On 24 Mar 2024, at 09:51, Paul Plant @.***> wrote:

@BrightScreenTV https://github.com/BrightScreenTV , this is a cool idea.

I was planning a complete overhaul of the statistics part of xDrip4iOS in the next months to include report generation within the app.

I'm not sure that your PR fits in cleanly with xDrip4iOS as it is, but I think it would be an amazing addition to the changes I'm planning.

Are you OK if we leave this parked here for a short while and then incorporate it (in a slightly different way) into the new Statistics part of the app and to the reporting? I think it will add huge value.

— Reply to this email directly, view it on GitHub https://github.com/JohanDegraeve/xdripswift/pull/497#issuecomment-2016754386, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQASZ5R63JHJNSUEOGO7SWLYZ2O23AVCNFSM6AAAAABBXDGH22VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWG42TIMZYGY. You are receiving this because you were mentioned.