There was a thread recently where a quick pagination example was 
demonstrated<https://groups.google.com/forum/#!topic/google-visualization-api/dxNifFZNJbQ>
.

The example works by slicing the input DataTable in response to the user 
pressing 'next' and 'previous' buttons and redrawing the chart. I took the 
opportunity to rewrite the above example in a somewhat more self-contained 
and optimized fashion.
Have a look at this example: http://jsfiddle.net/6FQSJ/1/

What you care about is the 'EnablePagination' function which takes as input 
a ChartWrapper, a pageSize and references to the pagination buttons. It uses 
DataViews (chart.setView()) to limit the part of the chart that is currently 
displayed based on the current page. 

I wrote the example quite quickly and I probably missed some corner cases, 
so pay attention if you use it.

/R.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/BDHfbFul07QJ.
To post to this group, send email to google-visualization-api@googlegroups.com.
To unsubscribe from this group, send email to 
google-visualization-api+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to