-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Line chart in tableview cell #542
Comments
I am a little confused that you only draw one chart when you click the cell, it should not have performance issue, because you can click only one cell at a time; but you said you will draw all the chart.. Will you need to animate every chart in each cell? If true, then maybe performance impacted. You might want to provide some images or video or code samples what you did in cellForItemAtIndexPath and didSelctedRow so we can understand what's going on... I once had 10 UICollectionViewCells to display the chart, and the performance is acceptable thanks to the reusing cell technology. But even you see a drop, there are ways to improve it, like use UIImage cache not to draw every time if no data changed. |
Thanks for the response. I am drawing different chart data in each cell, only to be displayed when user expands the cell. I'm using animation, which I'm sure is slowing it down. I posted some code on S.O. at this link if you want to check it out, thank you! http://stackoverflow.com/questions/33618719/how-to-reset-ios-charts-animation-in-tableview-cell |
OK, let's keep single thread for this. I will answer the SO since you had code there and close this |
How to display pia chart in table view cell swift |
Hello, I am using a line chart in my tableview cells to show different data on each row. The tableview uses expanding cells that only shows the chart once user has tapped the row. I initially had the setChart: method being called in my cellForRowAtIndexPath:, but the performance was bad since it had to draw every chart. I then moved setChart: to didSelectRow: and the tableview performance is better. However the first cell I select, the chart doesn't show any data, although the data array exists. The chart does load the second time through, but the animation is off. It's almost like the setChart: method is being called when I collapse the cell, not when I tap it. Any help would be greatly appreciated!!
The text was updated successfully, but these errors were encountered: