-
-
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
BarChart xAxis label offsets #1874
Comments
Here is the entire function I call to setup the graph `func setUpChart(delegate: IAxisValueFormatter){
|
Disable |
Had a similar problem with line charts, the first label on the xAxis is off. The only way I found to fix it is to use Here is my xAxis code. Any help is welcome.
|
@Rnorback I don't think it's the same issue for "the first label on the xAxis is off"? turn off avoidFirstLastClippingEnabled should move '11/23' to left by some space. |
Hello again, first off I want to say thank you for responding to my last issue so quickly. I do have another question though. When creating a bar charts, with labels on the bottom, the very first label is offset and not directly under the respective bar.
I took a look at the demo and I matched all my settings accordingly:
chartView.isUserInteractionEnabled = false chartView.chartDescription?.text = "" chartView.drawBarShadowEnabled = false chartView.rightAxis.drawGridLinesEnabled = false chartView.rightAxis.drawAxisLineEnabled = false chartView.rightAxis.drawLabelsEnabled = false chartView.xAxis.avoidFirstLastClippingEnabled = true chartView.xAxis.centerAxisLabelsEnabled = false chartView.xAxis.drawLimitLinesBehindDataEnabled = false chartView.xAxis.labelPosition = .bottom chartView.xAxis.labelCount = 3 chartView.xAxis.axisMinimum = -0.5 chartView.xAxis.axisMaximum = 3 chartView.xAxis.drawGridLinesEnabled = false chartView.fitBars = true chartView.xAxis.granularity = 1
Im not sure what other properties to try. I would appreciate the guidance. Thanks againThe text was updated successfully, but these errors were encountered: