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

Increasing bar width in grouped sets of BarChartView #2263

Closed
Mourad-Khalfallaoui opened this issue Mar 21, 2017 · 3 comments
Closed

Increasing bar width in grouped sets of BarChartView #2263

Mourad-Khalfallaoui opened this issue Mar 21, 2017 · 3 comments

Comments

@Mourad-Khalfallaoui
Copy link

I'm trying to increase the bar width in chartBarView . there is my code :
`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)
`
I want to double the width of the individual bars than this result :

fullsizerender

@liuxuan30
Copy link
Member

Try other numbers.. as you already know how to calculate it

@Mourad-Khalfallaoui
Copy link
Author

Whuy have you close my question ? 0.32 for barWidth is the maximum that I can put , if I try with 0.329 and 0.001 for barSpace and groupSpace, the frame vue outside the frame and the grouped set outside group frame

@liuxuan30
Copy link
Member

closing does not mean we will not update any more.
You already know the properties and values and I think you are good to go.
BarWidth default is 0.85, but you ask how to 'increase bar width' while you said 0.32 is your max input, what could I say..

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