Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Negative Bar animation is gone if axis.inverted=true #3666

Open
liuxuan30 opened this issue Sep 29, 2018 · 0 comments
Open

Negative Bar animation is gone if axis.inverted=true #3666

liuxuan30 opened this issue Sep 29, 2018 · 0 comments
Labels

Comments

@liuxuan30
Copy link
Member

liuxuan30 commented Sep 29, 2018

Negative Bar animation is gone if axis.inverted=true

The issue is found while reviewing #3650

What did you expect to happen?

negative bar animation should be fine when inverted is enabled

Charts Environment

Charts version/Branch/Commit Number:
Xcode version: 10
Swift version: 4.2
Platform(s) running Charts: iOS
macOS version running Xcode: 10.14

Demo Project

Just use below data set:

    func setDataCount(_ count: Int, range: Double) {
        let yVals = [
            BarChartDataEntry(x: 0, y: -10),
            BarChartDataEntry(x: 1, y: 20),
            BarChartDataEntry(x: 2, y: -30),
            BarChartDataEntry(x: 3, y: 15)
        ]
        
        var set1: BarChartDataSet! = nil

and add a breakpoint or code

chartView.leftAxis.inverted = true   // false

You will see the animation for pos. bars is fine, but the animation for neg. bars is gone if inverted = true. animation for neg. bars is fine when inverted = false
screen-recording-2018-09-29-at-9 39 52-am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant