-
Notifications
You must be signed in to change notification settings - Fork 420
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
Straight lines #94
Comments
@simonbromberg it's likely a rounding "feature" due to the padding that is calculated. The padding is a function of dot radius & can vary. To avoid drawing subviews @ half pixels, the ceiling of positions are taken. It's unlikely that this can be resolved; just something you may have to live with. |
Shouldn't everything just be rounded down? Doesn't look so bad on this vertically condensed graph, but it's a lot more noticeable on other sizes, plus it makes it very difficult to line the chart up with a vertical axis. |
Sorry didn't mean to close it. I'll look into it when I have some time - feel free to do the same. |
It seems to help to set a minValue that is slightly smaller than the real minValue and a maxValue that is slightly bigger than the actual one. |
It appears that the line width /2 is subtracted from both the max Y and min Y. This issue only applies to linear lines that approach the max or min Y values of the chart. It will cause the slope of the line to be modified by a factor of half the line's width. Example:
Delta's are in " [ ] ". Notice the top and bottom deltas are 19.5, while the middle deltas are all 22.5. |
Fixed via commit: 9828034 Screenshot attached. Thanks for patience! |
In the screenshot below the points have been given vertical values that incremented by 5 (e.g. 0,5,10...)
As you can see, the last one is slightly askew and so the line is not straight
I printed out the y-offsets and got the following 0,22,45,68,90,112
Some of these are increments of 22 and some are increments of 23.
The text was updated successfully, but these errors were encountered: