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

BarChartRenderer FatalError: Index out of range #4146

Closed
mangireddy58 opened this issue Sep 16, 2019 · 6 comments
Closed

BarChartRenderer FatalError: Index out of range #4146

mangireddy58 opened this issue Sep 16, 2019 · 6 comments

Comments

@mangireddy58
Copy link

mangireddy58 commented Sep 16, 2019

What did you do?

I have updated my pods to the
recent one and changed to target swift 5.0 and everything is working fine except about error.

What did you expect to happen?

ℹ Please replace this with what you expected to happen.

What happened instead?

         I am getting an error on 
         //Handles empty array of yValues
        let yValue = vals.isEmpty ? 0.0 : vals[idx % stackSize]

        elementValueText = dataSet.valueFormatter?.stringForValue(
            yValue,
            entry: e,
            dataSetIndex: dataSetIndex,
            viewPortHandler: viewPortHandler) ?? "\(e.y)"

Charts Environment

Charts version/Branch/Commit Number: 3.3.0
Xcode version: 10.3
Swift version: 5
Platform(s) running Charts: iPhone/iPad
macOS version running Xcode: Mojave 10.14.6

Demo Project

I am attaching a screenshot, please find it.

Screenshot 2019-09-16 at 4 58 38 PM

@laiminhlai1110
Copy link

I get the bug same to you

@matt-alltrails
Copy link

I ran into the same crash:

image

@liuxuan30
Copy link
Member

what's causing the crash? Have you identified?

@mangireddy58
Copy link
Author

@liuxuan30 Yes. in my point of view mismatching stack size.

@liuxuan30
Copy link
Member

so should be fine now?

@mangireddy58
Copy link
Author

@liuxuan30 yes it's working fine.

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

No branches or pull requests

4 participants