is there any limit for maximum number of rows in data table??

4,585 views
Skip to first unread message

Murali

unread,
Apr 10, 2009, 5:15:33 AM4/10/09
to Google Visualization API
I get the following error when i try to add about 5000 rows with 15
columns

Webpage Script Errors

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/
4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ;
InfoPath.2)
Timestamp: Fri, 10 Apr 2009 09:09:29 UTC


Message: Expected ')'
Line: 28
Char: 157061
Code: 0
URI: http://localhost:8080/nova/gvizReports.jsp?id=5510d6b3-3a9b-4354-972e-e80d0da52140

The same code will run if i have less data.

VizGuy

unread,
Apr 13, 2009, 3:29:51 PM4/13/09
to google-visua...@googlegroups.com
There is no actual limit on the data table size (when it is created in the client. In a remote data source there is a limit of 10,000 rows).
Your problem looks more like a browser limit of the string you are using to create it, or something similar.

Browser are not that strong animals when it comes to large js code and data, but they are getting better all the time...

Regards,
VizGuy

Murali krishna

unread,
Apr 14, 2009, 12:44:12 AM4/14/09
to google-visua...@googlegroups.com
Do we have an alternate solution to catch such exceptions and redirect users to download the data in form of excel sheets.
--
MK

p00kie

unread,
Apr 14, 2009, 1:47:48 PM4/14/09
to Google Visualization API
Murali,

An alternate solution to catch such exceptions would be to check the
row count. Unless you are hard-coding 10,000 data.addRow calls, I'm
assuming you have an external data source (eg. MySQL). I'm running in
a LAMP (P for Perl) environment and when I run the query, I make a
note of the number of rows returned. I then pass that to the
javascript portion of my code and depending on the number of rows,
I'll have the table showing or a message telling users to download the
data from an excel sheet.

if(rowCount <= 10000) {
<div id="table_div"></div>
}
else {
print p("Too many results returned");
}

On Apr 14, 12:44 am, Murali krishna <iitr.mk...@gmail.com> wrote:
> Do we have an alternate solution to catch such exceptions and redirect users
> to download the data in form of excel sheets.
>
>
>
> On Tue, Apr 14, 2009 at 12:59 AM, VizGuy <viz...@google.com> wrote:
> > There is no actual limit on the data table size (when it is created in the
> > client. In a remote data source there is a limit of 10,000 rows).Your
> > problem looks more like a browser limit of the string you are using to
> > create it, or something similar.
>
> > Browser are not that strong animals when it comes to large js code and
> > data, but they are getting better all the time...
>
> > Regards,
> > VizGuy
>
> > On Fri, Apr 10, 2009 at 12:15 PM, Murali <iitr.mk...@gmail.com> wrote:
>
> >> I get the following error when i try to add about 5000 rows with 15
> >> columns
>
> >> Webpage Script Errors
>
> >> User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/
> >> 4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ;
> >> InfoPath.2)
> >> Timestamp: Fri, 10 Apr 2009 09:09:29 UTC
>
> >> Message: Expected ')'
> >> Line: 28
> >> Char: 157061
> >> Code: 0
> >> URI:
> >>http://localhost:8080/nova/gvizReports.jsp?id=5510d6b3-3a9b-4354-972e...

Murali krishna

unread,
Apr 15, 2009, 12:45:47 AM4/15/09
to google-visua...@googlegroups.com
If only number of rows is a constraint then we can go forward with this method but number of columns may also increase. For 10 columns the limit may be 10000 but if he chooses 20 columns then limit will be somewhere between 2000 to 3000 rows. If we can handle such type of exceptions then we can force an excel export. I even tried using paging feature with page size of 100 rows but no use.

Not only in this present situation, if in any case i get an error how do i handle that in javascript.
--
MK

p00kie

unread,
Apr 15, 2009, 2:10:40 PM4/15/09
to Google Visualization API
So what about a rowCount * colCount < 10000 restraint?

Murali krishna

unread,
Apr 16, 2009, 2:04:03 AM4/16/09
to google-visua...@googlegroups.com
I am working on something similar to that but i want to force excel export even if google is not available due to some reason. How do I include that check???
--
MK

Reply all
Reply to author
Forward
0 new messages