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

Graph Gridlines / Target Range Offset #10

Open
channemann opened this issue Jan 19, 2016 · 2 comments
Open

Graph Gridlines / Target Range Offset #10

channemann opened this issue Jan 19, 2016 · 2 comments

Comments

@channemann
Copy link

It appears as if there is an offset or scaling issue between the gridlines and the target range lines.

My graph boundaries are 40 - 240, and my target range is 80 - 180, with gridlines every 20. The lower and upper target range lines should therefor overlap normal gridlines. As you can see in the photo, it appears as if the upper target range line is offset from where it should be, sitting slightly lower (it's closer to 160 than 200).

img_1789

@mddub
Copy link
Owner

mddub commented Jan 28, 2016

Yeah, this is a result of the target range lines being an even number of pixels tall (4). I chose to make the extra pixel fall on the inside of the range (so the top looks a little low, and the bottom looks a little high). It just happens to be super noticeable on a shorter graph:

https://github.com/mddub/urchin-cgm/blob/ead0c4/src/graph_element.c#L63

They look less wrong if I reduce it from 4 to 3 pixels:


My on-wrist testing suggested 3 pixels was a little too thin, and 5 pixels... well, that just sounds crazy. Maybe you can try building with 3/5 and let me know how it feels. I'll have to think about this a little more.

@channemann
Copy link
Author

3 feels pretty good, actually. Since they are pretty distinct from the
dashed lines, they don't need a lot of thickness to be glanceable. 5 is
definitely overkill. It's pretty minor, so I wouldn't sweat it.

On Thu, Jan 28, 2016 at 1:10 PM, Mark Wilson [email protected]
wrote:

Yeah, this is a result of the target range lines being an even number of
pixels tall (4). I chose to make the extra pixel fall on the inside of the
range (so the top looks a little low, and the bottom looks a little high).
It just happens to be super noticeable on a shorter graph:

https://github.com/mddub/urchin-cgm/blob/ead0c4/src/graph_element.c#L63

They look less wrong if I reduce it from 4 to 3 pixels:

https://camo.githubusercontent.com/5630c5c054b47b2248a38c39893a319860aa4a3a/687474703a2f2f692e696d6775722e636f6d2f6f7951554733432e706e67

https://camo.githubusercontent.com/cb394a2c1bd78539da0fbe2e823572d80eb74189/687474703a2f2f692e696d6775722e636f6d2f634f45416455732e706e67

My on-wrist testing suggested 3 pixels was a little too thin, and 5
pixels... well, that just sounds crazy. Maybe you can try building with 3/5
and let me know how it feels. I'll have to think about this a little more.


Reply to this email directly or view it on GitHub
#10 (comment).

Chris Hannemann
[email protected]

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

No branches or pull requests

2 participants