callagga

fusioncharts periodically renders incorrectly - all scruched up???

Recommended Posts

I'm evaluating fusioncharts, but I'm noting it periodically (say one time out of 5) renders all scrunched up. See the attachment for an example. Seems to happen slightly more if doing a refresh as opposed to hitting the link for the chart on the web page (although perhaps this is no difference functionally).

 

 

 

The code in the web page I use is below (the code IFCode doesn't seem to be working properly]

 

   The chart will appear within this DIV. This text will be replaced by the chart.

   < s c r ipt type="text/javascript">

       var categoriesChart = new FusionCharts("/flash/MSStackedColumn2DLineDY.swf", "categoriesChartId", "100%", "600", "0", "0", "FFFFFF", "noScale");

       categoriesChart.setDataURL("<%=url_str%>");

       categoriesChart.render("<%=div_id%>");

s c r i p t>

post-2145-128441568028_thumb.png

Share this post


Link to post
Share on other sites

Hi,

This happens in IE when you provide dimension in %.

To overcome this you would need to render the chart(s) after the page gets loaded.

Please put all chart rendering code in window.onload event.

e.g.

<s c ript type='text/java script' language='java script'>

window.onload=function(){

  var categoriesChart = new FusionCharts("/flash/MSStackedColumn2DLineDY.swf", "categoriesChartId", "100%", "600", "0", "0", "FFFFFF", "noScale");

 

  categoriesChart.setDataURL("...<%=url_str%>");

 

  categoriesChart.render("...<%=div_id%>");

 

  t p i r c s>

}

</script>

Share this post


Link to post
Share on other sites

oh, I think I have it working, thanks. It does fix things. Haven't tried what happens if there are two graphs on the same page yet.

 

 

 

The chart will appear within this DIV. This text will be replaced by the chart.

< s c r i p t type="text/javascript">

   window.onload = loadgraph

   function loadgraph() {

       var categoriesChart = new FusionCharts("/flash/MSStackedColumn2DLineDY.swf", "categoriesChartId", "100%", "600", "0", "0", "FFFFFF", "noScale");

       var dataUrl=escape("<%=url_str%>");

       categoriesChart.setDataURL(dataUrl);

       categoriesChart.render("<%=div_id%>");

   }

 

 

 

Thanks again

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