navbingo
navbingo

Reputation: 223

problem in fusion chart display using stack column2d

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

Upvotes: 0

Views: 1467

Answers (1)

Sanjukta Mukherjee
Sanjukta Mukherjee

Reputation: 424

Could you please state the difference in those fields, i.e, "machinename" and "machine_id" data that you are providing?
Also, please make sure that "machinename" field's data does not contain any special characters that might make the XML data invalid.

Upvotes: 3

Related Questions