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

Updating version alters bar chart layout #950

Closed
iamZoltanVaradi opened this issue Apr 14, 2016 · 8 comments
Closed

Updating version alters bar chart layout #950

iamZoltanVaradi opened this issue Apr 14, 2016 · 8 comments

Comments

@iamZoltanVaradi
Copy link

I recently updated from v2.1.6 to v2.2.4
Without changing anything in my code, the layout of bar charts and line charts got changed. I assumed it's the auto scale min max feature being defaulted to true from false, but even after i set

chartView.autoScaleMinMaxEnabled = false

The issue stayed the same. Changing that property didn't effect the layout. See images:

Before (v2.1.6)
before
After (v2.2.4)
after

@liuxuan30
Copy link
Member

To me, looks like it's related to axisMinValue of y axis is not 0 in second screen, while it's 0 for first one. try set to 0. StartAtZero is deprecated. You can turn on displaying y axis value to check if I am correct.

@danielgindi
Copy link
Collaborator

autoScaleMinMaxEnabled is still false by default, and has nothing to do with it.
This probably has to do with the range of your data

@iamZoltanVaradi
Copy link
Author

But it's the same data. How come the layout changes?

@danielgindi
Copy link
Collaborator

I cannot tell without seeing the code before and after.
Try to set the yAxis' axisMinValue to 0

@iamZoltanVaradi
Copy link
Author

That's what i wrote initially. The code is the same.

@danielgindi
Copy link
Collaborator

Are you trying with 2.2.4 or with master?

@iamZoltanVaradi
Copy link
Author

pods said 2.2.4.

@liuxuan30
Copy link
Member

@iamZoltanVaradi 2.1.6 is quite a old release, and not changing your code may have the issues, because recently there are changes, like deprecated startAtZeroEnabled, and move to axisMinValue.

Could you just set your left or right y axis with axisMinValue = 0 and see what's the result?

If you want help, I still suggest you turn on displaying y axis values for debug purpose to see what the y range is.

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

3 participants