gpt4 book ai didi

ios - 带圆角的 iso-chart 条形图

转载 作者:搜寻专家 更新时间:2023-10-31 19:34:50 25 4
gpt4 key购买 nike

BarChartView 中是否有为条形图启用圆角的设置?

我想实现与其他库类似的效果 iosbarchart enter image description here

最佳答案

我做了一个 ios-charts 的分支来大致完成这个:https://github.com/mcconkiee/ios-charts

var yVals: [BarChartDataEntry] = []
var xVals: [String] = []
var dataCount = sections.count
for i in 0...(dataCount - 1) {
var dataObjectInstance = sections[i] as SomeCustomDataObject
var entry = BarChartDataEntry(value: dataObjectInstance.numeric!, xIndex: i)
entry.rounded = true //make the end caps round!
if let tintClr = dataObjectInstance.tint as String?{
if let clr = UIColor(hexString: tintClr) as UIColor?{
entry.tint = clr
}
}
yVals.append(entry)
var time = i % 12
if(time == 0) {
time = 12
}
if let objVal = dataObjectInstance.objectValue as String?{
xVals.append(objVal)
}

}

关于ios - 带圆角的 iso-chart 条形图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31607900/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com