Sign in to follow this  
eyalc

Resizing pie charts

Recommended Posts

Hi

I am trying to resize my charts whenever the browser is resized but with no luck.

I call the following JS function whenever the page is resized but nothing happens. I tries calling the render() method on the chart object but got an error that property or method is not supported.

In the jsp, I declared the chart size in pixels.

Any help wil be appreciated.

[b]
function[/b] setFCNewData() {
[b]var[/b] chartObj = getChartFromId('summaryChartId');
chartObj.setVariable('chartWidth','100');
}

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

As of now FusionCharts does not support dynamic re-sizing of the chart and you need to re-render the chart each time it is re-sized.

However, the forthcoming release(version 3.2) of the House will support this feature.

We hope to come up with the release by this month.

Happy FusionCharting. :(

Share this post


Link to post
Share on other sites

Does this mean that the updateChart() I am trying to implement will never work?

Do you have some kind of a workaround?

In general, why can't I rerender the chart after modifying some variables?

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

To update your chart you need to use updatechart() but in that case you need to re-render the chart each time it gets updated.

Ref.-  

function updateChart(domId){

   //Update only if chart has loaded

   if (chartLoaded){

 //Get reference to chart object using Dom ID

var chartObj = getChartFromId(domId);

//Update it's XML - set animate Flag from AnimateChart checkbox in form

   chartObj.setDataXML(generateXML(this.document.productSelector.AnimateChart.checked));

  }

   }

Ref.- http://www.fusioncharts.com/docs?/JS_Example.html

Hope this helps. :(

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