Charts icon indicating copy to clipboard operation
Charts copied to clipboard

StackedBarChart only using rightAxis add extra padding

Open mikewalkerjr opened this issue 2 years ago • 0 comments

ℹ When using the Charts-Demo-iOS code for the StackedBarChart when changing the enabling of the leftAxis and rightAxis adds extra padding to the bottom of the chart.

With the default

 let leftAxis = chartView.leftAxis
 leftAxis.valueFormatter = DefaultAxisValueFormatter(formatter: formatter)
 leftAxis.axisMinimum = 0
        
 chartView.rightAxis.enabled = false

StackedBarChart appears as expected

Simulator Screen Shot - iPhone 13 Pro Max - 2022-03-24 at 14 53 08

However when revering which axis to display:

let rightAxis = chartView.rightAxis
rightAxis.valueFormatter = DefaultAxisValueFormatter(formatter: formatter)
rightAxis.axisMinimum = 0
        
chartView.leftAxis.enabled = false

There is extra padding on the bottom of the StackedBarChart

Simulator Screen Shot - iPhone 13 Pro Max - 2022-03-24 at 14 52 47

ℹ Changing between using the leftAxis and the rightAxis should not have the shown effect.

Charts (3.6.0) Xcode version: 13.3 Swift version: 5 macOS version running Xcode: 12.3

mikewalkerjr avatar Mar 24 '22 19:03 mikewalkerjr