gpt4 book ai didi

iOS-图表 : Increasing bar width in grouped sets of BarChartView

转载 作者:行者123 更新时间:2023-11-30 12:35:42 25 4
gpt4 key购买 nike

我正在尝试增加 ChartBarView 中的条形宽度。这是我的代码:

let groupSpace = 0.01
let barSpace = 0.01
let barWidth = 0.32
// (0.32 + 0.01) * 3 + 0.01 = 1.00

let groupCount = 9
let startMonth = 0


chartData.barWidth = barWidth;
barChartView.xAxis.axisMinimum = Double(startMonth)
let spaceIndividualBar = chartData.groupWidth(groupSpace: groupSpace, barSpace: barSpace)
print("spaceIndividualBar must be equan to 1 : \(spaceIndividualBar)")
barChartView.xAxis.axisMaximum = Double(startMonth) + spaceIndividualBar * Double(groupCount)

chartData.groupBars(fromX: Double(startMonth), groupSpace: groupSpace, barSpace: barSpace)

我想将各个条形的宽度加倍于这个结果:

enter image description here

最佳答案

减少两个栏之间的间距,增加栏的宽度。

关于iOS-图表 : Increasing bar width in grouped sets of BarChartView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42899203/

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