Sign in to follow this  
ejazmohammed

Operation Aborted

Recommended Posts

Hi

Am using Fusionchartswidgets Hlineargauge.am facing a prblm while using 2 or more same chart.An error message is showing like "Operation aborted".some times it may may wrk correctly.but sometimes not. am fed up with this,hope u wil help me.

ejaz

Share this post


Link to post
Share on other sites

Hi

Thanks for Ur reply.Here is the code

/////////////////////////////////////////////

public string ShowYear()

{

int lowerLimit, upperLimit;

lowerLimit = 0;

string strCR; int thisYear, counter;

thisYear = 0;

string dataXML, strStyles, strAnn;

//OdbcDataReader oRs;

// Retrieve the years from database in recordset

// strSQL = "SELECT DISTINCT YEAR(OrderDate) As Year FROM FC_Orders ORDER BY 1";

// oRs = DbHelper.GetReader(strSQL, DataCon);

int i =0;

strCR =

"";

counter = 0;

thisYear =

DateTime.Now.Year -2;

//iterate through years

for(i=0;i<4;i++)

{

// store the year from recordset

// sets the first year retrieved as linear gauge's lowerlimit

if (counter == 0) { lowerLimit = thisYear; }

// Create annotations texts for linear gauge using retrieved years

strCR +=

"<annotation type='text' x='" + (65 + (90 * counter)) + "' y='30' font='Georgia' size='22' isBold='0' alpha='10' color='FFFFFF' label='" + thisYear + "' />";

thisYear = thisYear + 1;

counter++;

}

//sets upper limit of the linear gauge as the last retrieved year

upperLimit = thisYear;

//open chart element of the linear gauge XML

dataXML =

"<chart borderAlpha='0' animation='0' showToolTip='0' editMode='1' lowerLimit='" + (lowerLimit - 0.8) + "' upperLimit='" + (upperLimit + 0.49) + "' gaugeRoundRadius='0' showTickMarks='0' showGaugeLabels='1' pointerOnTop='1' pointerRadius='9' pointerBgAlpha='80' pointerBorderThickness='1' pointerBorderColor='aa0000' pointerBgColor='cc0000' showToolTip='1' decimals='0' showLimits='1' showValue='0' formatNumber='0' formatNumberScale='0' decimals='0'>";

// create annotation XML element to load year selector background image

// it also adds the years annotattion texts created above

strAnn =

"<annotations><annotationGroup id='Grp1' showBelow='1'><annotation type='image' x='0' y='0' /></annotationGroup><annotationGroup id='AnnYear' showBelow='0'>" + strCR + "</annotationGroup></annotations>";

// create style XML element

strStyles =

"<styles><definition><style name='Font1' type='font' face='arial' size='10' color='FFFFFF' bold='0' /><style name='Shadow1' type='Shadow' color='EFFFFF' alpha='50' Distance='1' /></definition><application><apply toObject='AnnYear' styles='Font1,Shadow1' /></application></styles>";

// set the default year value

// if its beyond lower/upper limits we set it to upper limit

if (intYear < lowerLimit && intYear > upperLimit) { intYear = upperLimit; }

// set the chart pointer value to dafault year & close chart element

dataXML +=

"<value>" + intYear + "</value>" + strAnn + strStyles + "</chart>";

// render linear gauge using the dataXML created above

return FusionCharts.RenderChart("../FusionCharts/HLinearGauge.swf", "FG_YearSelector", dataXML, "", "380", "50", false, true);

}

///////////////////////////////////////////

Rgrds

Ejaz

Share this post


Link to post
Share on other sites

Hi,

"Operation Aborted" is a IE specific error that occurs because a child container HTML element contains script that tries to modify the parent container element of the child container. (c.f. http://support.microsoft.com/kb/927917  )

Could you please try :

1. Add a panel in from design view and set an Id to it (say, Panel1)

2. In code behind - set Panel1.Text  = chart's CODE.

e.g.

in aspx page:

<asp: Panel ID="Panel1" runat="server" Height="350px" Width="440px"></asp: Panel>

In Code Behind: ( in Page_Load event )

string outPut = FusionCharts.RenderChart("../FusionCharts/HLinearGauge.swf", "FG_YearSelector", dataXML, "", "380", "50", false, true);

Panel1.Controls.Clear();

Panel1.Controls.Add(new LiteralControl(outPut));

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this