navbingo

Problem In Displaying Stackedcolumn2D.swf

Recommended Posts

hi,

i am using fusion chart for the first time..i am facing some problem in displaying data using StackedColumn2D.swf..

using c# in vs2005

code:

strXML += ("<chart palette='2' caption='Product Comparison' defaultNumberScale='s' numberScaleValue='60,60,24,7' numberScaleUnit='min,hr,day,wk' ");

strXML += (" showLabels='1' showvalues='1' numberPrefix='' showSum='0' decimals='0' useRoundEdges='1' legendBorderAlpha='0'>");

strXML_category += "<categories> ";

strXML_run += ("<dataset seriesname='RUN' color='8D38C9' showValues='0' >");

strXML_idle += ("<dataset seriesname='IDLE' color='4AA02C' showValues='0' >");

strXML_ec += ("<dataset seriesname='EC' color='FBB917' showValues='0' >");

strXML_rw += ("<dataset seriesname='RW' color='F87431' showValues='0' >");

strXML_down += ("<dataset seriesname='DOWN_TIME' color='736AFF' showValues='0' >");

 

while (ddDR.Read())

{

strXML_category += " <category label='" + ddDR["machinename"].ToString() + "' /> ";

strXML_run += ("<set value='" + ddDR["RunMinutes"].ToString() + "' />");

strXML_idle += ("<set value='" + ddDR["IdleMinutes"].ToString() + "'/>");

strXML_ec += ("<set value='" + ddDR["EcMinutes"].ToString() + "' />");

strXML_rw += ("<set value='" + ddDR["ReworkMinutes"].ToString() + "'/>");

strXML_down += ("<set value='" + ddDR["DownMinutes"].ToString() + "'/>");

 

// strXML += "<set name='" + ddDR["dept_name"].ToString() + "' value='" + ddDR["dept_id"].ToString() + "' />";

}

 

strXML_category += " </categories>";

strXML_run += " </dataset>";

strXML_idle += " </dataset>";

strXML_ec += " </dataset>";

strXML_rw += " </dataset>";

strXML_down += " </dataset>";

strXML += strXML_category;

strXML += strXML_run;

strXML += strXML_idle;

strXML += strXML_ec;

strXML += strXML_rw;

strXML += strXML_down;

strXML += "</chart>";

return RenderChart("swf/StackedColumn2D.swf", "", strXML, "FactorySum", "650", "450", false, false);

 

the datareader contains machine name and all other values in seconds....

output : it shows invalid XML data ...

 

when i change this line, strXML_category += " <category label='" + ddDR["machinename"].ToString() + "' /> ";

to

strXML_category += " <category label='" + ddDR["machine_id"].ToString() + "' /> ";

 

output : i am getting the output ...

 

please help me out to solve this issue.. i need only machine name to be displayed

 

thanks and regards

T.Navin

Share this post


Link to post
Share on other sites

Hi,

Also, in the below code:

 

 

when i change this line, strXML_category += " <category label='" + ddDR["machinename"].ToString() + "' /> ";

to

strXML_category += " <category label='" + ddDR["machine_id"].ToString() + "' /> ";

 

Could you please let us know what difference is there in those fields mainly in data, and please make sure that 'machinename' field's data does not contains any special characters which is making the XML invalid?

Share this post


Link to post
Share on other sites

hi,

the machinename is an alphanumeric , it doesnt contain any special characters..

the machine_id is purely numeric...

 

Hi,

Also, in the below code:

 

 

when i change this line, strXML_category += " <category label='" + ddDR["machinename"].ToString() + "' /> ";

to

strXML_category += " <category label='" + ddDR["machine_id"].ToString() + "' /> ";

 

Could you please let us know what difference is there in those fields mainly in data, and please make sure that 'machinename' field's data does not contains any special characters which is making the XML invalid?

 

Share this post


Link to post
Share on other sites

hi,

 

i am just sending an empty string in the numberPrefix attribute....

Hi Navin,

Could you please let us know which character you are using in numberPrefix attribute because it did not appear in the above XML?

Share this post


Link to post
Share on other sites

now its working dude..

hi,

the machinename is an alphanumeric , it doesnt contain any special characters..

the machine_id is purely numeric...

 

 

Share this post


Link to post
Share on other sites

k..

i have another issue...

i am using time in the y axis...

in the tool tip and y-axis its showing like 3.8 hours , 4.5 hours instead of 3 hrs 45 mins , 4 hrs 30 mins

i have enabled decimals= '1'

how to solve this issue ...

 

 

strXML += ("<chart palette='2' caption='Machine Vs Description' defaultNumberScale='s' numberScaleValue='60,60,24,7' numberScaleUnit='min,hr,day,wk' ");

strXML += (" showLabels='1' showvalues='1' numberPrefix='' showSum='0' decimals='1' useRoundEdges='1' legendBorderAlpha='0'>");

 

Hi,

 

Glad that your issue is resolved.

 

Happy FusionCharting! :(

Edited by navbingo

Share this post


Link to post
Share on other sites

Hi,

 

I am afraid, FusionCharts does not support time/date format on the charts, as of now.

 

Please note that the Y-axis only accepts numerical values.

 

As the number scale id mentioned according to the set up of the time scale, it's showing the data in decimals accordingly. But I am afraid, currently hours and minutes cannot be displayed in such way. Instead it would show the actual calculated fractional values as done by the number scale.

 

Hope this helps. :(

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