-
-
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
BUG::: leftAxis.axisMinValue !!!=== 0.0 #1101
Comments
Please be more specific how this happens in your first three charts. Usually you should see it's fine. Have you call notifyDataSetChanged after you set leftAxis.axisMinValue? |
@liuxuan30 可以中文描述么? 在BarChartViewController.m 75行 注释掉leftAxis.axisMinValue = 0.0,然后运行,不停的push和pop操作,每次出现的底部高度不一样。预期的是一直在X轴上。 Translated by @liuxuan30: |
@dsencheng I encourage you use English, because more people can help you. I have added a translation. Now back to the topic: I'm not sure if this is a bug or not. By default, if you do nothing, the y axis range is calculated via y axis renderer's Now in your case, you let the library calculate y axis range for you, so it will go to: // bottom-space only effects non-custom min
if !_customAxisMin
{
let bottomSpace = range * Double(spaceBottom)
_axisMinimum = min - bottomSpace
} and axisMinimum is a small negative now. So, if you want to always start from zero, you should explicitly call |
@liuxuan30 抱歉,英文实在不好。我还是用中文描述下好了。这个问题是柱状图底部不在X轴上,它偏移了。我希望柱状图固定在X轴上,并且我不需要设置axisMinValue = 0.0 |
if you want to make bar stay right on x axis, you have to set axisMinValue = 0.0 |
The text was updated successfully, but these errors were encountered: