Google Charts 12 Charts Per Page Limit?

84 views
Skip to first unread message

Baris Sarac

unread,
Jan 5, 2016, 12:10:24 PM1/5/16
to Google Visualization API
I wrote an application to display multiple charts on a page. Charts were not being displayed altogether but if I placed only one of them they were being displayed fine. Then I wrapped my whole code with counter and allowed one cycle through my code and chart displayed fine. I increased the number of charts one by one testing it. Now if I make the limit 13 no charts get displayed, if I make it 12 then all 12 shows up. So I can't help but to think Google Charts limit 12 charts to be displayed per page? Is that the case? Is there anyway of overcoming that limit?

Baris Sarac

unread,
Jan 5, 2016, 12:23:12 PM1/5/16
to Google Visualization API
I found cause of the problem to be a function including comma in it and that was throwing off the whole code. Comma right after a was causing the problem.

function a,_b_c() {}

Sergey Grabkovsky

unread,
Jan 5, 2016, 12:23:53 PM1/5/16
to Google Visualization API
Hi Baris,

Google doesn't set any limits on the number of charts that can show up on a page. Your issue could be due to a number of things, ranging from a bug in our code to not using charts correctly to a very superstitious computer that doesn't like the number 13.

In order to actually help you with the specific problem you're experiencing, I will need the code for the page that you're running or a link to that page. At the very least, it would be helpful to know which charts you're trying to render.

For the sake of a comprehensive example, here's a jsfiddle that generates and displays 50 pie charts (with random data): http://jsfiddle.net/umfLksdz/

On Tue, Jan 5, 2016 at 12:10 PM Baris Sarac <baris...@gmail.com> wrote:
I wrote an application to display multiple charts on a page. Charts were not being displayed altogether but if I placed only one of them they were being displayed fine. Then I wrapped my whole code with counter and allowed one cycle through my code and chart displayed fine. I increased the number of charts one by one testing it. Now if I make the limit 13 no charts get displayed, if I make it 12 then all 12 shows up. So I can't help but to think Google Charts limit 12 charts to be displayed per page? Is that the case? Is there anyway of overcoming that limit?

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/31fae7b2-25fa-4bc1-b605-b4ed2ff3dbc9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

unnamed.gif

Sergey Grabkovsky

Software Engineer

Google, Inc

gra...@google.com

Baris Sarac

unread,
Jan 5, 2016, 12:32:57 PM1/5/16
to Google Visualization API
Thank you Sergey. I found the cause and it was my PHP code was writing in comma into the name function. I added pregmatch to remove all characters including spaces now it works great.

I still can't understand why page prints code below only in inpect element mode not view source mode:

<div style="position: absolute; display: none;"><div style="padding: 1px; border: 1px solid infotext; font-size: 11px; margin: 11px; font-family: Arial; background: infobackground;">internationally</div></div>
<div style="position: absolute; display: none;"><div style="padding: 1px; border: 1px solid infotext; font-size: 11px; margin: 11px; font-family: Arial; background: infobackground;">cancellationbr</div></div>
<div style="position: absolute; display: none;"><div style="padding: 1px; border: 1px solid infotext; font-size: 11px; margin: 11px; font-family: Arial; background: infobackground;">superintendent</div></div>

internationally, cancellationbr and superintendent are 3 choices in various charts. All charts display fine and I checked the code where those each word appear and it looks fine. These words appear in different charts. Do you know why would these show up only in inspect element mode of the browser and not in view sources? and what they are for?


On Tuesday, January 5, 2016 at 11:23:53 AM UTC-6, Sergey wrote:
Hi Baris,

Google doesn't set any limits on the number of charts that can show up on a page. Your issue could be due to a number of things, ranging from a bug in our code to not using charts correctly to a very superstitious computer that doesn't like the number 13.

In order to actually help you with the specific problem you're experiencing, I will need the code for the page that you're running or a link to that page. At the very least, it would be helpful to know which charts you're trying to render.

For the sake of a comprehensive example, here's a jsfiddle that generates and displays 50 pie charts (with random data): http://jsfiddle.net/umfLksdz/

On Tue, Jan 5, 2016 at 12:10 PM Baris Sarac <baris...@gmail.com> wrote:
I wrote an application to display multiple charts on a page. Charts were not being displayed altogether but if I placed only one of them they were being displayed fine. Then I wrapped my whole code with counter and allowed one cycle through my code and chart displayed fine. I increased the number of charts one by one testing it. Now if I make the limit 13 no charts get displayed, if I make it 12 then all 12 shows up. So I can't help but to think Google Charts limit 12 charts to be displayed per page? Is that the case? Is there anyway of overcoming that limit?

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.

Sergey Grabkovsky

unread,
Jan 5, 2016, 1:15:52 PM1/5/16
to Google Visualization API
The view source functionality looks at the code served by the server, and does not take into account the executed JavaScript. The divs you pointed out are added by Google Charts for various purposes. Since Google Charts is a JavaScript library, those will only be added when the JavaScript is executed, and won't show up in view source.

Conversely, the 'inspect element mode' shows the live, current view of the elements on the page, and so will also reflect any elements added or modified by the JavaScript.

On Tue, Jan 5, 2016 at 12:32 PM Baris Sarac <baris...@gmail.com> wrote:
Thank you Sergey. I found the cause and it was my PHP code was writing in comma into the name function. I added pregmatch to remove all characters including spaces now it works great.

I still can't understand why page prints code below only in inpect element mode not view source mode:

<div style="position: absolute; display: none;"><div style="padding: 1px; border: 1px solid infotext; font-size: 11px; margin: 11px; font-family: Arial; background: infobackground;">internationally</div></div>
<div style="position: absolute; display: none;"><div style="padding: 1px; border: 1px solid infotext; font-size: 11px; margin: 11px; font-family: Arial; background: infobackground;">cancellationbr</div></div>
<div style="position: absolute; display: none;"><div style="padding: 1px; border: 1px solid infotext; font-size: 11px; margin: 11px; font-family: Arial; background: infobackground;">superintendent</div></div>

internationally, cancellationbr and superintendent are 3 choices in various charts. All charts display fine and I checked the code where those each word appear and it looks fine. These words appear in different charts. Do you know why would these show up only in inspect element mode of the browser and not in view sources? and what they are for?


On Tuesday, January 5, 2016 at 11:23:53 AM UTC-6, Sergey wrote:
Hi Baris,

Google doesn't set any limits on the number of charts that can show up on a page. Your issue could be due to a number of things, ranging from a bug in our code to not using charts correctly to a very superstitious computer that doesn't like the number 13.

In order to actually help you with the specific problem you're experiencing, I will need the code for the page that you're running or a link to that page. At the very least, it would be helpful to know which charts you're trying to render.

For the sake of a comprehensive example, here's a jsfiddle that generates and displays 50 pie charts (with random data): http://jsfiddle.net/umfLksdz/

On Tue, Jan 5, 2016 at 12:10 PM Baris Sarac <baris...@gmail.com> wrote:
I wrote an application to display multiple charts on a page. Charts were not being displayed altogether but if I placed only one of them they were being displayed fine. Then I wrapped my whole code with counter and allowed one cycle through my code and chart displayed fine. I increased the number of charts one by one testing it. Now if I make the limit 13 no charts get displayed, if I make it 12 then all 12 shows up. So I can't help but to think Google Charts limit 12 charts to be displayed per page? Is that the case? Is there anyway of overcoming that limit?

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
--

unnamed.gif

Sergey Grabkovsky

Software Engineer

Google, Inc

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.

For more options, visit https://groups.google.com/d/optout.

Baris Sarac

unread,
Jan 5, 2016, 1:18:43 PM1/5/16
to google-visua...@googlegroups.com

Totally makes sense! Thank you very much!!

You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/J1dxi09nmcc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
Reply all
Reply to author
Forward
0 new messages