Sign in to follow this  
harini

Resizing Chart Based On Container Resize

Recommended Posts

Hi,

I'm trying to make my chart resizable on a window (or container) resize. The chart width and height are marked as 100% each. I have confirmed that my container is resizing on page resize. (I've added js code to resize the container on window.resize)

But my chart does not resize.

 

I've already looked at this link.

I've posted an example at the end of this message.

 

Can you please help?

 

Thanks,

Harini

 

?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[url="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/url]">
<html xmlns="[url="http://www.w3.org/1999/xhtml"]http://www.w3.org/1999/xhtml[/url]">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>FusionCharts v3 Documentation</title>
<link rel="stylesheet" href="../Contents/Style.css" type="text/css" />
<script language="JavaScript" src="../JSClass/FusionCharts.js"></script>
</head>

<body>
<div style="width:100%;height:100%;">
<div style="width:100%;height:100%;" id="chartdiv" align="center"> 
       FusionCharts. </div>
     <script type="text/javascript">
    var chart = new FusionCharts("../Charts/Area2D.swf", "ChartId", "100%", "100%", "0", "0");
    chart.setDataURL("Data/Area2D.xml");     
    chart.render("chartdiv");
 </script> 
</div>
</body>
</html>

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Welcome to FusionCharts Forum!smile.gif

 

First of all, we would like to thank you for showing interest in FusionCharts.

 

Could you please confirm the FusionCharts version you are using?

 

Starting v3.2, FusionCharts can dynamically resize itself when the parent container resizes. For this you would need to :

 

1. Set the chart's size in percentage, and

2. Set your HTML chart container such that its dimension changes dynamically when the browser resizes or changes, due to some other changes made in a web page (like when an element is added/removed)

 

More details at: http://www.fusioncha...centResize.html

 

Hope this helps.smile.gif

Share this post


Link to post
Share on other sites

Thanks for the reply.

I think I'm still on 3.0. Can I do the resizing with 3.0 or is it only possible in 3.2?

 

Thanks,

Harini

 

Hi,

 

Welcome to FusionCharts Forum!smile.gif

 

First of all, we would like to thank you for showing interest in FusionCharts.

 

Could you please confirm the FusionCharts version you are using?

 

Starting v3.2, FusionCharts can dynamically resize itself when the parent container resizes. For this you would need to :

 

1. Set the chart's size in percentage, and

2. Set your HTML chart container such that its dimension changes dynamically when the browser resizes or changes, due to some other changes made in a web page (like when an element is added/removed)

 

More details at: http://www.fusioncha...centResize.html

 

Hope this helps.smile.gif

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Thanks for your response.

 

I am afraid, this is possible only in FusionCharts v 3.2 onwards.

 

Hope this helps.smile.gif

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