There's no built in way to do this, but you can accomplish the same thing
using the following bit of code:
function dataReceived(data) {
datatable.addRows(data);
var sizediff = datatable.getNumberOfRows() - MAX_NUMBER_OF_ROWS;
if (sizediff > 0) {
datatable.removeRows(0, sizediff);
}
}
You can find more information about which methods DataTables have on
its reference
page<https://developers.google.com/chart/interactive/docs/reference#DataTable>
.
- Sergey
On Mon, Dec 17, 2012 at 4:33 PM, diferdin <[email protected]> wrote:
> Hi Sergey,
> sorry for the confusion, and thanks for your interest.
>
> Long story short: I am building a graph representing the top 10 clients by
> connection age for my server. As I receive this data in real-time from a
> push engine, and hence I need to handle additions, removals and cut shifts
> when the size of the data table exceeds my x, it'd be great if I could
> specify the size of my data table (i.e. the x) to the size of my rank.
>
> Instead of using data views, I'd rather ensure I keep the data table to a
> configurable size I want to enforce rather than allow arbitrary length
> showing parts of it.
>
> Hope this clarifies.
>
>
> Regards.
>
> --
> 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/-/9nPsJeyZgS0J.
>
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-visualization-api?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.