FusionCharts Forum: Fusion charts with update panels are not working in asp.net application - FusionCharts Forum

Jump to content

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

Fusion charts with update panels are not working in asp.net application Fusion charts with update panels are not working in asp.net application

#1 User is offline   DASU 

  • Forum Newbie
  • Group: Members
  • Posts: 3
  • Joined: 15-July 09

Posted 27 July 2009 - 04:20 AM

Hi,

  We have a dropdown control and a fusion chart at bottom of the dropdown .On change of dropdown fusion chart should be updated accordingly these all controls are present in one update panel.

  LayOutLooks like this:

UpdatePanel1

Drop Down List

  Fusion chart which is dynamicall constructed on the basis some input critera following are the steps:

  1)Construct xml file with input critera(This is working fine  I have verified)

2)

if (IsPostBack)

  {
  //when a ajax call is made we use RenderChartHTML method

output = FusionCharts.RenderChartHTML("Charts/ScrollArea2D.swf", FileName,  chartHolder.ID, 350,450, false, false);

}
else
{
//When the page is loaded for the first time, we call RenderChart() method to avoid IE's 'Click here to
output = FusionCharts.RenderChart("Charts/ScrollArea2D.swf", FileName, "", chartHolder.ID, GPIUIConstants.GPI_CONST_FUSIONCHARTS_WIDTH, GPIUIConstants.GPI_CONST_FUSIONCHARTS_HEIGHT, false, false);
//chartHolder.InnerText = cabinetId;

}
chartHolder.Controls.Clear();
//Add Litaral control to Panel which adds the chart from outPut string
chartHolder.Controls.Add(new LiteralControl(output));

Here chartHolder is a dynamically created div element.

  Problem here is when we change dropdown fusion chars are not rendered with latest data every time eventhough the file has got the latest data.

 Please let me know if you need more infomation regarding this.

Thanks

Dasu.G

 

 


Dasu.G
0

Other Replies To This Topic

#2 User is offline   srividya_sharma 

  • Supreme Being
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 943
  • Joined: 01-October 07

Posted 20 August 2009 - 11:09 PM

Hi Dasu,

You would need to update the chart when the ajax response is obtained. Like this:

 <SCRIPT LANGUAGE="JavaScript">
  //updateChart method is called whenever the user clicks the button to
//update the chart. Here, we get a reference to the chart and update it's
//data using setDataURL method.

function updateChart(DOMId){
  //Get reference to chart object using Dom ID
 var chartObj = getChartFromId("chart1Id");
 //Update it's URL
 chartObj.setDataURL("NewData.xml");
 //Disable the button
 this.document.frmUpdate.btnUpdate.disabled = true;
}
 </SCRIPT>

Hope this helps!

Srividya

regards,
Srividya Sharma
0

Other Replies To This Topic

#3 User is offline   Sudipto Choudhury 

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

Posted 21 August 2009 - 12:43 PM

hi,



it might be some caching issue.



The XML file is bein cashed. Please pass a nocache querystring to the XML's URL. The value of this querystring should be something that is unique like miliseconds elapsed sice midnight or a global counter variable so that always a new unique value gets passed on each postback.
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