-
Notifications
You must be signed in to change notification settings - Fork 420
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
Add bar/line caching for only visible content. #61
Comments
Is the suggestion to move the chart over to a UIScrollView s.t. bars/line segments can be paginated and only requested when on screen? |
If I understand you correctly. jbChartView = [[JBBarChartView alloc] init]; |
Yes, the chart view will ask for every single bar at once; there is no caching or paging of bars that are on/off the screen. Placing the chart on a scroll view has no effect since the chart instance has no idea about the scroll view or that some portion of it is on/off the screen. Making this as an enhancement; it's something to consider in the future. |
The ability to scroll would be great!!! Looking at using this to show live data.. so the concept of scrolling would be nice to have.. What I am doing right now to simulate a scroll is to just remove the first index after X data points are in the array... |
It's unlikely this will become a reality. The chart simply wasn't intended to show a live stream of (scrollable) data. Much of the underlying architecture would need to be changed. We haven't had a lot of requests for this functionality, so until we get more, I'm going to curb this request. |
Table method is called for 'view' (barChartView: barViewAtIndex:) only visible cells. Currently data is loaded completely. Because it requires a lot of memory.
JBBarChartView -> UIView -> UIScrollView
Succinctly:
JBBarChartView *jbChartView = [[JBBarChartView alloc] init];
UIView *chartView = [[UIView alloc] init];
[chartView addSubview:jbChartView];
UIScrollView *chartScrollView = [[UIView alloc] init];
[chartScrollView addSubview:chartView];
The text was updated successfully, but these errors were encountered: