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

Left and right slide bar chart only half and remove background grid #1654

Closed
AnChiChang opened this issue Oct 13, 2016 · 7 comments
Closed

Comments

@AnChiChang
Copy link

I am new bar chart view user, and have two questions:

  1. why my left slide and right side bar only half?
  2. can I remove background grid from my BarChartView?

2016-10-13 10 10 05

@liuxuan30
Copy link
Member

search old issue #1446
try fitBars

@pmairoldi
Copy link
Collaborator

I fell like this comes up a lot. Why not have fitBars enabled by default?

@liuxuan30
Copy link
Member

Me too. However I even found a new issue here:
In ChartsDemo Bar chart, fitBars is false, and it does not get cut off but just fewer left and right empty space. Weird.
@danielgindi would you please check this?

@AnChiChang at which commit you find the issue? Able to reproduce with ChartsDemo?

@liuxuan30 liuxuan30 reopened this Oct 14, 2016
@AnChiChang
Copy link
Author

AnChiChang commented Oct 14, 2016

I had download iOS chart yesterday. However, I setup barChartView.fitBar = true at my callback function after load data from backend system, didn't work. After move the code to viewDidLoad then work perfect. That's my situation.

@liuxuan30
Copy link
Member

remember setup your chart properties before you call chartView.data = data or manually call notifyDataSetChanged

@AnChiChang
Copy link
Author

sure, thanks for reminding.

@danielgindi
Copy link
Collaborator

I don't think this is about fitBars, but about axis padding. Since a bar on the x=0 is actually centered on the 0, and half of it is to the left of 0...
So we have the axis padding to come to our help. It is by default 0.5 on both sides for bar charts. So I guess he is not using the release version...

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

4 participants