Sign in to follow this  
Tommy Nguyen

Javascript Fallback Does Not Work On Ipad

Recommended Posts

Dear Team,

 

We are looking to buy your product but we tried the below process and the javascript fallback does not work on Ipad. Can you please investigate and let us know ASAP? So we can make a decision on buying your product.

 

http://www.fusioncha...pdatePanel.html

 

 

Our code is as the below:

 


#region Code
IList<Leasing_GetTenancyMixGraphResult> results = _respository.Leasing_GetTenancyMixGraph(
sessionController.UserDetails.UserID
, sessionController.UserDetails.OrganizationID
,(sessionController.SessionRepository.LastSearchType == au.knightfrank.Shared.BusinessEntities.SearchType.Portfolio) ? (int?)sessionController.PortfolioDetails.PortfolioID.Value : null
,(sessionController.SessionRepository.LastSearchType == au.knightfrank.Shared.BusinessEntities.SearchType.Portfolio) ? (char?)sessionController.PortfolioDetails.PortfolioType[0] : null
,(sessionController.SessionRepository.LastSearchType == au.knightfrank.Shared.BusinessEntities.SearchType.Property) ? sessionController.PropertyDetails.ConcatenatedPropertyIDs : null );

string myXMLData = @"<chart caption='Area' xAxisName='Month' yAxisName='Units' animation='1' 
	showValues='0' formatNumberScale='0' showBorder='1' showLegend='1'>";

foreach (Leasing_GetTenancyMixGraphResult result in results)
{
string name = result.category.Substring(result.category.IndexOf(":") + 1).Trim();
name = Regex.Replace(name, "[^0-9a-zA-Z ]+", "");

double value = (result.percentage.HasValue) ? (double)result.percentage.Value : 0.0d;
if (result.RowID.HasValue)
{
	int counter = System.Convert.ToInt32(result.RowID.Value);
	if (this.ExcludedList.Count > 0)
	{
		if (this.ExcludedList.Where(x => x == counter).Count() <= 0)
		{
			myXMLData += @"<set label='" + name + @"' value='" + value.ToString() + @"' link='javascript:Slice_OnClicked(" + counter + @");' />";
		}
	}
	else
	{
		myXMLData += @"<set label='" + name + @"' value='" + value.ToString() + @"' link='javascript:Slice_OnClicked(" + counter + @");' />";
	}
}
else
{
	myXMLData += @"<set label='" + name + @"' value='" + value.ToString() + @"'  />";
}
}

myXMLData += @"</chart>";

litChart.Text = FusionCharts.RenderChartHTML("../js/Charts/Pie3D.swf", "", myXMLData, "tenancyMix", "600", "300", false, true);
#endregion

 

Kind Regards,

 

Tommy

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Welcome to FusionCharts Forum! smile.gif

 

Could you please confirm whether the above process is working other than Ipad or not?

 

Awaiting for your response.

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Thanks for your response.

 

We have come up with a work around where you can use renderChart to update an update panel.

 

Please find the attached sample.

 

Here we did the following changes:

 

1. Added reference to jquery.min.js

 

2. Modified script manager to load a js script reference (JSScript.js) which will handle AJAX Client events (and render chart)

 

3. Modfied cs file to render all charts (when postback) using RenderChart (instead of RenderChartHTML)

 

4. APP_Code has a FusionCharts.cs (the source of the FusionCharts.dll) with a modification which will dispose an earlier built chart of the same id. You can compile the cs to dll.

 

Now you will find that RenderChart would work in AJAX PostBack and hence JavaScript chart would also work fine after Update Panel is updated.

 

Please give us your feedback on this.

 

Please do not hesitate to contact us if you've any queries.

NewUpdatePanel_SampleASPNET4.zip

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