-
-
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
spaceMin and spaceMax are not percentages #2314
Comments
Below can be used as a workaround for achieving the behavior specified in the docs (note that the suggested code must be re-executed whenever chart data changes):
|
Seems you looked at different properties.
They are different |
@liuxuan30 Aha, what tricked me is that I tried to use these properties on the xAxis. Apparently they are only defined for the yAxis (this is also the case for MPAndroidChart, so it is indeed consistent). Any idea why this is not defined for the xAxis? |
good question, x axis first is an index based axis, different from y axis. Then in chart 3.0, x axis is redesigned to behave like y axis, and I guess this is left behind. However, spaceTop and bottom is definitely for y axis, if you want this, it should be spaceLeft and right? @danielgindi what you think? Should we add spaceLeft and spaceRight for x axis? |
@liuxuan30 thank you for the explanation! I don't know about the naming -- one could also argue that spaceBottom and spaceTop are fine names if they match with how values ascend/descend on the x-axis. As this can be reversed (afaik), the implementation would obviously be more complex as these two properties would have to take into account whether or not the x-axis is reversed. Off-topic: I would like to rotate the labels of my ChartLimitLines (please see this Stack Overflow question). Any chance you could provide me with some hints on how to achieve this, please? |
answered in SO. Just remember, it's all about calculating the anchor point. |
Hi,
Thank you for a fantastic library!
According to the Wiki for MPAndroidChart,
spaceMin
andspaceMax
should accept a percentage (assuming these are the iOS counterparts ofsetSpaceBottom
andsetSpaceTop
). However, the provided values are simply subtracted/added from/to the calculated min/max:The text was updated successfully, but these errors were encountered: