Sign in to follow this  
FusionCharts Support

ASP.NET.AJAX UpdatePanel Sample #1

Recommended Posts

HI all,

Here goes a simple example using FusionCharts in ASP.NET AJAX UpdatePanel.

Please try this and shoot us your valuable feedback.

 

Read Post :

http://www.fusioncharts.com/forum/FindPost2949.aspx

 

Here is the link to downlod :

http://www.fusioncharts.com/forum/Attachment147.aspx

Edited by Guest

Share this post


Link to post
Share on other sites

The interesting thing is the last reply to thread you referenced.

 

 

 

steve65 (11/16/2007)
Hi,

 

sorry its took so long to reply been busy!

 

Anyway thanks for your ajax example code it worked great for generating charts on 'postback' after the page has loaded.

 

 

 

However I wanted to generate the chart on 'Page Load' and then on 'Postbacks'

 

 

 

If you use RenderChartHTML on page load then you get the 'click to activate' message in IE.

 

 

 

If you use RenderChart on page load and then RenderChart on postbacks then the postback charts don't display.

 

 

 

However! If you use RenderChart on page load then RenderChartHTML on any postback then all problems are solved.

 

 

 

Not sure if there's an easier way around this but at least it works and I'm happy.

 

 

 

 

 

 

 

 

I have attempted to use this same method and while it does work there remains the issue of the "non-secure items" warning in IE. I am not sure whether the person who posted the quote above regarded that as an issue or not, or even experienced the same behavior I have.

 

 

 

Just my 2 cents.

Share this post


Link to post
Share on other sites

In the renderChartHTML method code, if you change all http references to https, the security dialog wouldn't appear any more.

Share this post


Link to post
Share on other sites

When I use the sample code provided with my own charts, it works fine, as long as I am using an XML FILE as the source.  When I try to use and XML STRING, it always gives me the "invalid XML" message.

I've looked for hours at the outputted XML and can find no special characters, missing tags, etc.  When I bring the XML up in an XML editor, there are no problems.

Has anyone else encountered this?  I can provide source code and XML files if necessary.

Thanks.

Share this post


Link to post
Share on other sites

I'm trying to use one of the charts in my asp.net page and I have this simple code:

 

 

 

 

...

 

using InfoSoftGlobal;

 

 

 

protected void Page_Load(object sender, EventArgs e)

 

{

 

 

 

}

 

 

 

protected string renderChart()

 

{

 

string output = FusionCharts.RenderChart("FusionCharts/FCF_Column3D.swf", "", "Data/Data.xml", "chart1", "350", "440", false, false);

 

 

 

return output;

 

}

 

 

 

protected void btnVisible_Click(object sender, EventArgs e)

 

{

 

string chart;

 

 

 

chart = renderChart();

 

 

 

pollDiv.Visible = true;

 

 

 

panPoll.Controls.Clear();

 

panPoll.Controls.Add(new LiteralControl(chart));

 

}

 

 

 

protected void btnInvisible_Click(object sender, EventArgs e)

 

{

 

pollDiv.Visible = false;

 

}

 

 

 

 

Whenever I load up the page and toggle the visibility all I get is the word "Chart". Any idea why? Also, if I use RenderChartHTML I get "No data to display".

 

Also it doesn't even work if I use the default Data.xml that comes with the charts...so I know it's not that.

 

 

 

EDIT: I got it working.

 

 

 

This line:

 

 

 

string output = FusionCharts.RenderChart("FusionCharts/FCF_Column3D.swf", "", "Data/Data.xml", "chart1", "350", "440", false, false);

 

 

 

Should read:

 

 

 

 

 

string output = FusionCharts.RenderChart("FusionCharts/FCF_Column3D.swf", "Data/Data.xml", "", "chart1", "350", "440", false, false);

 

 

 

As Data.xml is a url not a direct xml string.

Edited by Guest

Share this post


Link to post
Share on other sites

Hi,

Could you please use renderChartHTML in Ajax mode?

string output = FusionCharts.RenderChartHTML("FusionCharts/FCF_Column3D.swf", "", "Data/Data.xml", "chart1", "350", "440", false);

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