Your browser does not support charts

2,374 views
Skip to first unread message

ditman

unread,
Oct 25, 2011, 12:58:17 PM10/25/11
to Google Visualization API
Hey group!

I'm getting this error in all IE versions and I'm not sure why. The
site where I'm trying to embed the API is quite JS intensive so maybe
there's something that is not mixing well with IE and the API, but I'm
not sure what...

Anyone came across this problem and found a way to solve it?

Anyone with 'insider' information could point me in what is causing
this behavior on IE?

Any clues will be greatly appreciated :)

Regards!

asgallant

unread,
Oct 25, 2011, 2:47:11 PM10/25/11
to google-visua...@googlegroups.com
Can you post a link to the page in question?

David Iglesias

unread,
Oct 25, 2011, 2:59:58 PM10/25/11
to google-visua...@googlegroups.com
Hmmm not really, no, it's part of one of our management interfaces and I can't provide an example (that's what makes this extra difficult to diagnose :-/)


On Tue, Oct 25, 2011 at 8:47 PM, asgallant <drew_g...@abtassoc.com> wrote:
Can you post a link to the page in question?

--
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/-/yJ3vkZTINX4J.

To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.

Roni Biran

unread,
Oct 25, 2011, 3:02:08 PM10/25/11
to google-visua...@googlegroups.com
Can you elaborate on the browser type/ version security prefs?


asgallant

unread,
Oct 25, 2011, 3:09:42 PM10/25/11
to google-visua...@googlegroups.com
Ok...what causes the error to be thrown?  Is it the API loading, creating the DataTable object, chart object, drawing the chart, something else?

David Iglesias

unread,
Oct 25, 2011, 3:13:04 PM10/25/11
to google-visua...@googlegroups.com
The browser is stock IE... I've seen it failing (with different error messages, I suppose it's because the API is getting updated from time to time) in all versions (up from 7 to 9) and now the latest error is a white "Your browser does not support charts" on top of a red background.

No special security settings or SSL on our side.

David Iglesias

unread,
Oct 25, 2011, 3:14:01 PM10/25/11
to google-visua...@googlegroups.com
I'll check this out and report back. It seems to me that it's failing when rendering but I could be wrong :)

Thanks for the idea!



On Tue, Oct 25, 2011 at 9:09 PM, asgallant <drew_g...@abtassoc.com> wrote:
Ok...what causes the error to be thrown?  Is it the API loading, creating the DataTable object, chart object, drawing the chart, something else?

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.

NA

unread,
Oct 25, 2011, 4:40:20 PM10/25/11
to Google Visualization API
You can always check the browser compatability by visiting the Chart
Gallery and seeing if you can view the charts:

http://code.google.com/apis/chart/interactive/docs/gallery.html

That's a good way to make sure the API is still working, and a way of
confirming that a browser is capable of displaying the charts.

David Iglesias

unread,
Oct 26, 2011, 9:40:25 AM10/26/11
to google-visua...@googlegroups.com
Hey all! 

The gallery is visible in the problematic browser (ie9) just fine (of course :P)

The problem in our side happens when drawing the chart... API initialization, graph creation and datatable creation work just fine.

I'm currently building a static version of the problematic part of the site and disable scripts one by one to see which one is the offender (we must be doing something weird on our JS, but I'm not sure what, that was why I was wondering if anybody knew the reasons the API would throw the error in the first place :P)

Regards!



--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.

David Iglesias

unread,
Oct 26, 2011, 12:29:30 PM10/26/11
to google-visua...@googlegroups.com
Hey guys!

We managed to isolate the problem and prepared a quick test case for you to look at :)

The problem is that we need to set the document.domain property (to do cross-domain stuff) and that is confusing IE, because the iframe that is used for rendering does not set the same document.domain that we have in our page.

Example:
http://www.ditman.net/charts/ (works with FF, Chrome, fails with IE)

If you feel especially crafty (or a Google engineer sees this) we traced the issue to the line 862 of the minimized file, where it does:

this.Nc=new vs(this.Db,b)

Inside that new vs, a method named "this.At" gets called, (defined as V.At in line 613). That method sets the properties of the iframe and appends it inside the container div with this code: 

this.Db[r](c)

Right after that, it tries to access the contents of the iframe with this:

var d=c.contentDocument;
d||(d=c.contentWindow[gc]);

The second line ends up throwing an "Access denied" exception that finally gets rendered as "Your browser does not support charts".

The solution?

We should be able to pass a document.domain for the iframe so it applies it inside the "V.At" method before it gets injected into the DOM (maybe as a parameter when creating the graph object, or as an additional parameter to the draw() method?)

What do you think? Any workarounds to this issue? :)

Regards!

David Iglesias

unread,
Oct 27, 2011, 6:40:24 AM10/27/11
to google-visua...@googlegroups.com

Roni Biran

unread,
Oct 27, 2011, 6:53:56 AM10/27/11
to google-visua...@googlegroups.com
why are you using the document.domain attribute? is this page displayed as an iframe in another webpage?

David Iglesias

unread,
Oct 27, 2011, 6:58:00 AM10/27/11
to google-visua...@googlegroups.com
No, the page embedding the chart uses iframes that might come from different subdomains of our web app, so we need to make every iframe (and the parent page) have the same document.domain so we can do cross-domain communication through them  :)

Roni Biran

unread,
Oct 27, 2011, 8:00:12 AM10/27/11
to google-visua...@googlegroups.com
well, in that case it seems that it does not work here :-)
i traced the problem and it seems that you're getting "Access Denied". the error you got is the global error for the draw function.

you can always use the image chart to overcome this problem.

David Iglesias

unread,
Oct 27, 2011, 9:09:00 AM10/27/11
to google-visua...@googlegroups.com
Yes but the fix would be pretty easy, wouldn't it? I mean, if the API allowed me to set the document.domain of the iframe that is going to be rendered, we'd be all set :)

asgallant

unread,
Oct 27, 2011, 9:58:26 AM10/27/11
to google-visua...@googlegroups.com
This could possibly work for you, depending on whether or not the domain is preserved in the iframe on a redraw (example uses jQuery to access the iframe's contents):

google.visualization.events.addListener(chart'error'function ({
    $('#visualization').find('iframe').contents()[0].domain 'my.domain.com';
    chart.draw(dataoptions);
});

Reply all
Reply to author
Forward
0 new messages