ChartsOrg / Charts

Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

StackedBarChart only using rightAxis add extra padding

mikewalkerjr opened this issue · 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