ChartsOrg / ChartsOrg/Charts

How to force the number of X-axis

Open
#4,244 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
28k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

let xAxis = chatView.xAxis
xAxis.axisLineWidth = 0//UIScreen.main.scale //设置X轴线宽
xAxis.axisLineColor = UIColor.clear
xAxis.labelPosition = .bottom //X轴的显示位置,默认是显示在上面的
xAxis.drawGridLinesEnabled = false;//不绘制网格线
xAxis.labelTextColor = ColorFromRGBA(VISColor.shareInstance.c858B9C)//label文字颜色
xAxis.labelFont = Font(size: 20*UI_SCALE)
xAxis.granularityEnabled = true
chatView.xAxis.setLabelCount(7, force: true)
![image](https://user-images.githubusercontent.com/12269355/70786000-917f7180-1dc6-11ea-84e9-cb86b0ded2ec.png)

I set the x axis as above, but it has no effect

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.