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

Chart is sometimes not showing data on Plus devices #2521

Closed
tomkastek opened this issue Jun 14, 2017 · 1 comment
Closed

Chart is sometimes not showing data on Plus devices #2521

tomkastek opened this issue Jun 14, 2017 · 1 comment

Comments

@tomkastek
Copy link

Hello,
I have a issue and didnt know why this could happen. I have a Chart and I put data in it. It works totally fine for me on devices like Iphone 6.

But if I am changing to a IPhone 6 Plus or another plus device, then it shows not all the time my data. Normally I have up to 31 values in my chart. If I am decreasing my values to 5 my chart shows the values again.

Also if I load my values into the chart the yLabels are all the time correct. I put in 30 values with 500. Now my chart ylabel is at 500.

Just the bars didnt show up. Also if my values are getting really high the bars dissapear again if I have just 5 values in my bar chart. When I try it again with 2 high values and it works again.

Dont know there the issue could be.

@tomkastek
Copy link
Author

Problem solved. For anyone who wants to know:

I did a subclass of BarChartRender cause I wanted to change something on it. Then changing the renderer on my chartview I created a new ViewPortHandler and passed it into the creation. This is wrong. The solution is to take the old viewportHandler and pass it into the new one:

let viewportHandler = chartView.viewPortHandler
let oldAnimator = chartView.renderer?.animator
chartView.renderer = BarChartRendererSubclass(dataProvider: chartView.self, animator: oldAnimator, viewPortHandler: viewportHandler)

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

1 participant