-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
YAxis Labels are clipped with some settings #1233
Comments
are you able to explain? If you are someone else looking at this issue, you won't be able to know what are you trying to ask. |
OK, I just did a quick test, it seems a bug of |
I looked into the code, it seems like it's not really a bug but how you use it. The issue here is that, you set minOffset = 0, later while calculating the _viewPortHandler.restrainViewPort(
offsetLeft: max(self.minOffset, offsetLeft),
offsetTop: max(self.minOffset, offsetTop),
offsetRight: max(self.minOffset, offsetRight),
offsetBottom: max(self.minOffset, offsetBottom)) here offsetTop is 0, and minOffset is 0, so the final value is 0. I don't think it's a bug here, so you should not set minOffset unless you know how it works, or you can change the code to meet your needs, but as the library, this is not much to fix right now |
As I understand, the minOffset is used to set paddings of chart, it's exactly what I want.
The setting In iOS version, if I set minOffset to 0. I can get no padding of the chart which is what I want, but the clip problem comes up. |
if you think Android portion has issue, you can file a issue and refer this one. I know you had your understanding based on the name, but if you take a look at the code: offsetTop += self.extraTopOffset
offsetRight += self.extraRightOffset
offsetBottom += self.extraBottomOffset
offsetLeft += self.extraLeftOffset
_viewPortHandler.restrainViewPort(
offsetLeft: max(self.minOffset, offsetLeft),
offsetTop: max(self.minOffset, offsetTop),
offsetRight: max(self.minOffset, offsetRight),
offsetBottom: max(self.minOffset, offsetBottom)) This is the logic how minOffset and extraOffset works. It basically consider the label space plus extraOffset, and use the bigger one compared to minOffset. Because you don't have top axis labels, so the offsetTop is 0, and minOffset is 0, this leads to the clipped y labels, plus you only show the max value. The max value is used to define the edge of the chart, so, it's clipped. I am seeing you only want to set up the left axis, could you explain what you want to achieve? Like you want to use |
also, please take a look at when considering if left axis So, when you use .InsideDhart, no offset is calculated |
The text was updated successfully, but these errors were encountered: