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

为什么x轴和柱子之间有空间呢? #4307

Closed
LuDamon opened this issue Mar 13, 2020 · 6 comments
Closed

为什么x轴和柱子之间有空间呢? #4307

LuDamon opened this issue Mar 13, 2020 · 6 comments

Comments

@LuDamon
Copy link

LuDamon commented Mar 13, 2020

截屏2020-03-13下午10 15 40

截屏2020-03-13下午10 21 36

设置的代码和效果如图:求大神指教~
@LuDamon
Copy link
Author

LuDamon commented Mar 13, 2020

    barChart.chartDescription?.enabled = false
    barChart.pinchZoomEnabled = false
    barChart.drawBarShadowEnabled = false
	barChart.drawValueAboveBarEnabled = true
    
    let xAxis = barChart.xAxis
    xAxis.labelPosition = .bottom
	xAxis.drawGridLinesEnabled = false
	xAxis.labelTextColor = __colorWithHex("#7B7C7D", 1)
	xAxis.axisLineColor = __colorWithHex("#E9E9E9", 1)
	xAxis.labelFont = UIFont.systemFont(ofSize: 10)
	xAxis.labelRotationAngle = -40;
	
	barChart.rightAxis.enabled = false
	
	let yAxis = barChart.leftAxis
	yAxis.drawAxisLineEnabled = false
	yAxis.drawGridLinesEnabled = false
	
	barChart.legend.enabled = false

@LuDamon LuDamon closed this as completed Mar 13, 2020
@adao3056
Copy link

这个问题怎么解决的?

@LuDamon
Copy link
Author

LuDamon commented Sep 23, 2021

这个问题怎么解决的?

贴下你的代码

@adao3056
Copy link

adao3056 commented Sep 23, 2021 via email

@LuDamon
Copy link
Author

LuDamon commented Sep 23, 2021

设置下 chartView.extraBottomOffset 试试

@adao3056
Copy link

adao3056 commented Sep 23, 2021 via email

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

2 participants