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

Aungbandlab picture Aungbandlab  路  4Comments

shayneptorres picture shayneptorres  路  4Comments

coop44483 picture coop44483  路  3Comments

deepumukundan picture deepumukundan  路  3Comments

Shunshine07 picture Shunshine07  路  3Comments