FusionCharts Forum: Javascript problem with exporting charts - FusionCharts Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Javascript problem with exporting charts In IE I get Object doesn't support this property or method

#1 User is offline   sowtus 

  • Forum Newbie
  • Group: Members
  • Posts: 4
  • Joined: 10-March 09

Posted 10 March 2009 - 04:17 AM

Hello,

I'm working on export functionality, but I get 'Object doesn't support this property or method error' in IE. Of course it is working fine in FF.



Here is sample of my code:



var inside = document.createElement("div");

var id = 'id';

inside.id = id;

var chart = new FusionCharts("Charts/MSColumn3D.swf", id+ "1", width, height, "0", "1");

chart.setDataXML(...);

chart.setTransparent(true);

chart.render(inside);



After that chart is rendered correctly and in both browsers I get event FC_Rendered. Function for this event now looks like this:



function FC_Rendered(domId){

alert(domId);

var chartObject = getChartFromId(domId);

if (chartObject != null) {

if( chartObject.hasRendered() ) {

chartObject.exportChart();

}

}

return true;

}



In IE methods hasRendered and exportChart are not supported by this object.



Does somebody know how to solve this issue?



Regards
0

Other Replies To This Topic

#2 User is offline   Rahul Kumar 

  • Supreme Being
  • Group: Moderators
  • Posts: 1034
  • Joined: 18-March 08

Posted 10 March 2009 - 08:27 AM

Hi,
 
Could you please update your chart to V3.1 and try again?
 
Also, This feature is not supported in FusionCharts Free

Regards,
Rahul Kumar
Software Engineer

A byte of magic.

 
0

Other Replies To This Topic

#3 User is offline   sowtus 

  • Forum Newbie
  • Group: Members
  • Posts: 4
  • Joined: 10-March 09

Posted 16 March 2009 - 08:29 AM

I already have version 3.1 of FusionCharts and I'm not using Free version.
0

Other Replies To This Topic

#4 User is offline   Rahul Kumar 

  • Supreme Being
  • Group: Moderators
  • Posts: 1034
  • Joined: 18-March 08

Posted 17 March 2009 - 09:59 AM

Hi,
 
Could you please use div id (id) instead passing element (inside) to it and try again?
 
var inside = document.createElement("div");
var id = 'id';
inside.id = id;
var chart = new FusionCharts("Charts/MSColumn3D.swf", id+ "1", width, height, "0", "1");
chart.setDataXML(...);
chart.setTransparent(true);
chart.render(inside);
chart.render('id');


Regards,
Rahul Kumar
Software Engineer

A byte of magic.

 
0

Other Replies To This Topic

#5 User is offline   sowtus 

  • Forum Newbie
  • Group: Members
  • Posts: 4
  • Joined: 10-March 09

Posted 18 March 2009 - 03:19 AM

Approach with id instead of div object is changing some things in my application, but it works. Do you know why is that happening?



Thanks for help!
0

Other Replies To This Topic

#6 User is offline   Rahul Kumar 

  • Supreme Being
  • Group: Moderators
  • Posts: 1034
  • Joined: 18-March 08

Posted 18 March 2009 - 05:42 AM

Hi,
 
OK, we figured out the problem, and that is, you are creating the div element but you are not attaching/appending it to the document DOM.
 

Regards,
Rahul Kumar
Software Engineer

A byte of magic.

 
0

Other Replies To This Topic

#7 User is offline   sowtus 

  • Forum Newbie
  • Group: Members
  • Posts: 4
  • Joined: 10-March 09

Posted 18 March 2009 - 05:47 AM

Div has been appended to DOM document later, after creating chart object. And basically charts were rendered correctly.
0

Other Replies To This Topic

#8 User is offline   Rahul Kumar 

  • Supreme Being
  • Group: Moderators
  • Posts: 1034
  • Joined: 18-March 08

Posted 18 March 2009 - 06:18 AM

Hi,
 
Could you please append the div first and then render the chart into it and see the result?

Regards,
Rahul Kumar
Software Engineer

A byte of magic.

 
0

Other Replies To This Topic

#9 User is offline   delias 

  • Forum Newbie
  • Group: Members
  • Posts: 2
  • Joined: 13-May 09

Posted 13 May 2009 - 09:12 AM

Hi,

I'm having exactly the same problem. I'm using fusion charts full version 3.1.1 . In my code I generate the div and then pass it's ID to the render function, after that I call the FC_Rendered(DOMId) with a ExportChart(). Works just fine on Firefox but it won't export on IE. Anything else I could try to solve this?

Thanks,



Davi Elias
0

Other Replies To This Topic

#10 User is offline   Dhruva 

  • Supreme Being
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 449
  • Joined: 23-March 09

Posted 14 May 2009 - 03:05 AM

Hello could you please check http://www.fusioncharts.com/forum/Topic14049-35-1.aspx and see if it helps?


Regards,

Dhruva Ghosh
0

Other Replies To This Topic

#11 User is offline   delias 

  • Forum Newbie
  • Group: Members
  • Posts: 2
  • Joined: 13-May 09

Posted 15 May 2009 - 10:00 AM

Hi,

I actually managed to get it working under IE using a very inelegant way. But now when I export images under Firefox the labels won't show, apparently the FC_Rendered(DOMId) starts the graphic export before it is fully rendered. Any ideas on how to make this work? I already tried a lot of way to delay the export function start but none worked. Also I have no idea what the .js on the thread posted above does and why should it affect the image exporting process under my .js, could you please explain that to me?



Thanks,
0

Other Replies To This Topic

#12 User is offline   Sudipto Choudhury 

  • Supreme Being
  • Group: Administrators
  • Posts: 1886
  • Joined: 19-March 07

Posted 18 May 2009 - 11:39 PM

hi,



Could you please thy with animation='0' in chart element?
Regards,

Sudipto Choudhury
FusionCharts Team

Follow us on Twitter

I code, therefore I am.

0

Other Replies To This Topic

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic