arikkan

Fusion Chart Java Script Error With Ie7 (Operation Aborted)

Recommended Posts

We are receiving Operation aborted error to show the Fusion Chart. This error only happens on IE7. Please see error1.png for the screenshot for the error.

 

By doing some research, it is erroring out at document.body.appendChild(k) function in fusionChart.js. Please see screenshot of the code where it is erroring out in fusionChart.js.

 

Following is the code of how we are passing the parameters to call the chart:

 

Please help. Thanks.

 

FusionCharts.SetRenderer("javascript");

 

 

 

 

<!-- Using ASP.NET FusionCharts v3.2.2.1 Wrapper and JavaScript rendering --><!-- START Script Block for Chart Chart2 -->

 

<div id='Chart2Div' >

 

Chart.

 

</div>

 

<script type="text/javascript">

 

if (FusionCharts && FusionCharts("Chart2") ) FusionCharts("Chart2").dispose();

 

var chart_Chart2 = new FusionCharts({"renderer" : "javascript", "dataFormat" : "xml", "scaleMode" : "noScale", "renderAt" : "Chart2Div", "lang" : "EN", "debugMode" : "0", "swfUrl" : "../FusionCharts/Pie3D.swf", "id" : "Chart2", "wMode" : "opaque", "width" : "170", "height" : "370", "registerWithJS" : "1","dataSource" : "<chart caption= 'Candidate Leads Statewide' startingAngle='129' showLegend='1' legendNumColumns ='1' chartTopMargin = '0' enableSmartLabels='1' rotateValues='1' forceDecimals='1' decimals='1' labelDistance='6' smartLineThickness='1' isSmartLineSlanted='1 ' smartLineAlpha='75' animation='1' bgColor='ffffff' showValues='0' showLabels='0' showPercentageValues='0' showPercentInToolTip='0' showNames='1' pieYScale='60' pieBorderAlpha='40' pieFillAlpha='40' pieSliceDepth='12' pieRadius= '75'><set label='CAMPBELL, WILLIAM -{br}No Votes ' value='900' color='#F4BBD5' tooltext ='CAMPBELL, WILLIAM -{br}No Votes '/><set label='THUNDERHAWK, CLAY -{br}No Votes ' value='900' color='#BDF2ED' tooltext ='THUNDERHAWK, CLAY -{br}No Votes '/><set label='NIXON, JEREMIAH -{br}No Votes ' value='900' color='#D3F2BD' tooltext ='NIXON, JEREMIAH -{br}No Votes '/><styles><definition><style name='CaptionFont' type='font' font='Verdana' size='9' color='6d6c66' bold='1' underline='0' /></definition><application><apply toObject='caption' styles='CaptionFont'/></application></styles></chart>"}).render();</script>

 

<!-- END Script Block for Chart Chart2 -->

 

post-28534-0-47462400-1343761086_thumb.png

post-28534-0-08972800-1343761222_thumb.png

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

Are you rendering charts using ASP.NET C# or simple HTML?

 

 

Can you please paste your entire sample code here?

Share this post


Link to post
Share on other sites

We are using Following ASP.Net (C#) code to populate the Fusion Chart. It works fine for the first time when it renders, but for the second time, it crashes.

 

Thanks,

 

 

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Text;

using ENR.ApplicationServer.Common;

using InfoSoftGlobal;

using System.Globalization;

 

 

namespace ENRMobile.UserControls

{

//Created this User Control to generate the Pie chart <User-PGupta>

 

public partial class ElectionChartControl : System.Web.UI.UserControl

{

public static int CChartCount = 1;

public static int ChartCount = 1;//Declared Variable for Chart Id for generating the multiple Charts

protected void Page_Load(object sender, EventArgs e)

{

 

}

 

public void ShowChartValues(List<ChartValue> listValues)

{

int width = 170, height = 400, pieRadius = 70;

String caption = "Precinct Reporting Chart Statewide";

StringBuilder xmlStr = new StringBuilder();

 

foreach (var value1 in listValues)

{

if (value1.Width != 0) { width = value1.Width; }

if (value1.Height != 0) { height = value1.Height; }

if (value1.Caption != null) { caption = value1.Caption; }

if (value1.PieRadius != 0) { pieRadius = value1.PieRadius; }

 

}

 

xmlStr.Append("<chart caption= '" + caption + "' startingAngle='129' showLegend='1' enableSmartLabels='1' rotateValues='1' forceDecimals='1' decimals='1' labelDistance='6' smartLineThickness='1' isSmartLineSlanted='1 ' smartLineAlpha='75' animation='1' bgColor='ffffff' showValues='0' showLabels='0' showPercentageValues='0' showPercentInToolTip='0' showNames='1' pieYScale='60' pieBorderAlpha='40' pieFillAlpha='40' pieSliceDepth='12' pieRadius= '" + pieRadius + "'>");

 

//startingAngle='80'

NumberFormatInfo nfi = (NumberFormatInfo)

CultureInfo.InvariantCulture.NumberFormat.Clone();

nfi.NumberGroupSeparator = ",";

 

foreach (var value in listValues)

{

if ((value.Description != null) || (value.Value != 0) || (value.Color != null))

{

xmlStr.AppendFormat("<set label='{0}' value='{1}' color='{2}' tooltext ='{0}'/>", value.Description, value.Value, value.Color);

}

}

xmlStr.Append("<styles>");

xmlStr.Append("<definition>");

xmlStr.Append("<style name='CaptionFont' type='font' font='Verdana' size='9' color='6d6c66' bold='1' underline='0' />");

xmlStr.Append("</definition>");

xmlStr.Append("<application>");

xmlStr.Append("<apply toObject='caption' styles='CaptionFont'/>");

xmlStr.Append("</application>");

xmlStr.Append("</styles>");

xmlStr.Append("</chart>");

 

FusionCharts.SetRenderer("javascript"); //Pie chart will show using java script

//Here ChartCount Variable is incrementing to generate multiple Chart Id's

ltrlCharts.Text = FusionCharts.RenderChart("../FusionCharts/Pie3D.swf", "", xmlStr.ToString(), "Chart" + ChartCount++, width.ToString(), height.ToString(), false, true);

}

 

public class ChartValue

{

public string Description { get; set; }

 

/// <summary>

/// Value between 1 and 100 to represent in the chart

/// </summary>

public int Value { get; set; }

 

/// <summary>

/// Hex color to be associated with the slice generated in the chart

/// </summary>

public string Color { get; set; }

/// <summary>

///Generating the chart with particular heading

/// </summary>

public string Caption { get; set; }

/// <summary>

///Generating the Chart of different radius

/// </summary>

public int PieRadius { get; set; }

/// <summary>

/// Width of Chart

/// </summary>

public int Width { get; set; }

/// <summary>

/// Height of Chart

/// </summary>

public int Height { get; set; }

}

}

}

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

Can you try using dispose function?

 

You can remove a chart instance from page and memory. using dispose() function.

 

Ref. Code:

FusionCharts("myChartId").dispose();

 

Refer this post: http://forum.fusionc...h__1#entry48136

 

If this doesn't help, please send us the live URL.

Share this post


Link to post
Share on other sites
Guest Sumedh

Hey,

 

We are not able to replicate the issue.

 

This is working fine at our end.

 

Also, you would have to call dispose function on the chart reference ID before rendering the chart in the .aspx page.

 

<script type="text/javascript">

var chartRef = FusionCharts("myChartId");

chartRef.dispose();

</script>

 

Please find attached screen-shot of working sample.

 

Hope this helps!

post-24802-0-59834800-1343977208_thumb.png

post-24802-0-03196700-1343977238_thumb.png

Share this post


Link to post
Share on other sites

Sanjkuta: This is now happening consistently in IE8.

 

http://enr.sos.mo.gov

 

Step 1: Click on Federal Races, US Senator - Pie chart shows up

 

Step 2: Click on State Races - Governor - Pie chart shows

 

 

 

Step 3: Click on Federal Races, US Senator - Pie chart does not show and this error is being populated from jquery which is being used by FusionChart. Therefore, the page does not load completely and menu item shows vertical.

 

This is emergency in production, please provide solution ASAP.

 

 

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