Charts: barSpace attribute

Created on 4 Feb 2017  Â·  3Comments  Â·  Source: danielgindi/Charts

Could not find barSpace attribute

Most helpful comment

You can find it here:

let data = BarChartData(dataSets: dataSets)

let groupSpace = 0.1                 // space between bar groups
let barSpace = 0.03                  // space between bars within a group

data.barWidth = (1.0 - groupSpace) / 2 - barSpace         // 2 = number of bars within a group
data.groupBars(fromX: 0.0, groupSpace: groupSpace, barSpace: barSpace)

barChart.data = data

All 3 comments

You can find it here:

let data = BarChartData(dataSets: dataSets)

let groupSpace = 0.1                 // space between bar groups
let barSpace = 0.03                  // space between bars within a group

data.barWidth = (1.0 - groupSpace) / 2 - barSpace         // 2 = number of bars within a group
data.groupBars(fromX: 0.0, groupSpace: groupSpace, barSpace: barSpace)

barChart.data = data

Can the bar space be updated dynamically for each bar drawn? (different spacing between each bar on a chart)

not each bar.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sjdevlin picture sjdevlin  Â·  3Comments

coop44483 picture coop44483  Â·  3Comments

guoyutaog picture guoyutaog  Â·  3Comments

cilasgimenez picture cilasgimenez  Â·  4Comments

kirti0525 picture kirti0525  Â·  3Comments