Sign in to follow this  
venkatc

How Can We Render Fusion Charts In To Iframe From Parent .

Recommended Posts

Hi ,

 

I have a div id in <iFrame name="my-frame">

<div id="chartContainer"> </div>

</iframe>

I want to render my fusion chart into ifram div id("chartContainer") from parent frame. But i am not getting the fusion chart. I am using below code to render the fusion chart.

 

var chiefExecutiveChart = new FusionCharts(path, "divId", width,height, "0", "1");

chiefExecutiveChart.setDataXML(xml.join(""));

chiefExecutiveChart.render(self.frames["my-frame"].document.getElementById("chartContainer"));

 

 

Please advice am i doing any wrong. How can we render fusion charts in to Iframe from parent .

 

Thanks,

Venkat.

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi ,

 

I have a div id in <iFrame name="my-frame">

<div id="chartContainer"> </div>

</iframe>

I want to render my fusion chart into ifram div id("chartContainer") from parent frame. But i am not getting the fusion chart. I am using below code to render the fusion chart.

 

var chiefExecutiveChart = new FusionCharts(path, "divId", width,height, "0", "1");

chiefExecutiveChart.setDataXML(xml.join(""));

chiefExecutiveChart.render(self.frames["my-frame"].document.getElementById("chartContainer"));

 

 

Please advice am i doing any wrong. How can we render fusion charts in to Iframe from parent .

 

Thanks,

Venkat.

 

Hi,

 

FusionCharts allows you to open links in specified frames. you would need to specify the name of the frame in the link itself.

 

For more information, refer this: http://docs.fusioncharts.com/charts/contents/?DrillDown/Frames.html

 

 

Share this post


Link to post
Share on other sites

Hi,

 

FusionCharts allows you to open links in specified frames. you would need to specify the name of the frame in the link itself.

 

For more information, refer this: http://docs.fusionch...own/Frames.html

 

 

 

It looks like I'm having a similar problem to Venkat above (and from what I can tell, the Frames link immediately above refers to allowing links to appear in other frames, as opposed to rendering the actual charts in iFrames).

I have some HTML that is responsible for responding to clicks, displaying charts, and this HTML is displayed inside another page's iFrame (the iframe's id is "iframeID"), e.g.

 

<body>
<div id="mydiv"> Chart Placement </div>
<div id="mydiviframe" onclick="document.getElementById('iframeID').contentWindow.showChart();"> Click here for chart </div>
<script type='text/javascript'>
function showChart() {
 myChart = new FusionCharts( '/fusioncharts/Charts/Column3D.swf', 'myChartID', '300', '150', '1', '1' );
 myChart.setXMLUrl('/scripts/chart/dashboard/iframeChartTest.xml');
 myChart.render(document.getElementById("mydiv"));
}
</script>

 

If the "showChart()" function above is called when the page is initially rendered (e.g. by calling "showChart()" from an onLoad event), it renders ok. However, if I instead wait to render later (e.g. using the above "onClick" event), the FusionChart code appears to execute ok, but the chart never appears on screen. Any ideas on this?

 

Thanks

Share this post


Link to post
Share on other sites

...

If the "showChart()" function above is called when the page is initially rendered (e.g. by calling "showChart()" from an onLoad event), it renders ok. However, if I instead wait to render later (e.g. using the above "onClick" event), the FusionChart code appears to execute ok, but the chart never appears on screen. Any ideas on this?

It looks like we solved our problem (looks like it was related to a problem inside the iframe's parent window / html).

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
Sign in to follow this