-
Notifications
You must be signed in to change notification settings - Fork 10
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
xrange类型的图表支持隐藏Y轴段无数据的那行吗? #6
Comments
public class var xrangeData: [Any] {
func getSingleGroupCategoryDataElementArrayWithY(_ y: Int) -> [Any] {
var dataArr = [Any]()
var x = 0
var x2 = x + Int(arc4random()) % 10
for _ in 0 ..< 50 {
var dataElementDic = [String:Any]()
dataElementDic["x"] = x
dataElementDic["x2"] = x2
dataElementDic["y"] = y
dataArr.append(dataElementDic)
x = x2 + Int(arc4random()) % 1000
x2 = x + Int(arc4random()) % 2000
}
return dataArr
}
var dataArr = [Any]()
for y in 0 ..< 20 {
let data = getSingleGroupCategoryDataElementArrayWithY(y)
for dataElement in data {
dataArr.append(dataElement)
}
}
return dataArr
} 参考 demo 中生成
|
试过了,没有用,出现Y轴空档的情况是这样产生的,假设Y为1和3的时候都是有数据的,Y2没有数据就会一直空在那,并不会被隐藏掉 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
红框内的是没数据的,有什么办法隐藏它吗?
The text was updated successfully, but these errors were encountered: