francescoNemesi

IE8: problem with hasRendered() and exportChart()

Recommended Posts

Hi there,

 

 

 

I have been on this problem for ages now and I can't find the solution. My GWT application generates dynamically several angular gauges, which I export server side and include in a pdf for printing. Everything works fine in FF, Opera and Chrome, but I have an odd problem with IE8.

 

 

 

Some charts are exported without any problems in IE8, this proves my mechanism for setting div and chart ids and the integration with JS are correct, but I have one chart that can't get exported and it's driving me nuts. The code is exactly the same for generating and exporting the chart as for the other charts, but this on doesn't work. I get the error "

 

Object doesn't support this property or method".

 

 

 

I run the chart in debugMode and I get the following debug info:

 

 

 


Info: Chart loaded and initialized.

Initial Width: 352

Initial Height: 190

Scale Mode: noScale

Debug Mode: Yes

Application Message Language: EN

Version: 3.1.1

Chart Type: Real-time Angular Gauge

Chart Objects: 

BACKGROUND

TICKMARKS

TICKVALUES

LIMITVALUES

VALUE

DIAL

PIVOT

GAUGE

TRENDPOINTS

TRENDVALUES

TRENDMARKERS

TOOLTIP



INFO: Chart registered with external script. DOM Id of chart is agChart_c

INFO: XML Data provided using dataXML method.

XML Data: 



 

 

 

To me this shows the chart is "healthy". When I start the export process (which, by the way, it's shared by ALL charts in my app) I get the problem mentioned above. I have done all sorts of debugging on the html, ids, various rendering orders, but I keep getting the same error only on the same graph only in IE8. My export code is very simple:

 

 

 


public static native void exportChart(String chartId) /*-{		

	var chart = $wnd.getChartFromId(chartId);



	alert("Chart : "+chart.id);



	if (chart.hasRendered()){

		alert("chart has rendered. Exporting...");								

		chart.exportChart();

	}

}-*/;



 

 

 

The chart object and id are even returned correctly by

 

 

 


var chart = $wnd.getChartFromId(chartId);

 

 

 

but as soon as I call chart.hasRendered() I get the error.

 

 

 

I have installed the very latest version of Flash, too.

 

 

 

Please help. Thank You.

 

 

 

Francesco

Share this post


Link to post
Share on other sites

Uhmm..... wierd! Do you have the page live somewhere so that I can see it directly? Otherwise can you send across a scaled-down version of your code.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now