StackedBarChart only using rightAxis add extra padding
- Dominant language
- Swift
- Stars
- 28k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
ℹ 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

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`

ℹ 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**
Contributor guide
Research direction
Start with the Charts-Demo-iOS StackedBarChart example and reproduce the two configurations shown in the issue: leftAxis enabled versus rightAxis enabled. Compare the resulting bottom padding and trace the chart layout behavior associated with axis visibility. Done means switching between the axes no longer changes the chart's bottom padding unexpectedly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- data-visualization, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100