Hi guys,
i was working on fusion chart, using c# n fetching data from sql server2008.
creating xml, rendering chart. But getting 'invalid xml data'.
asp.net:
<div id="chartContainerCT" runat="server" style="text-align:center">
<asp:Literal ID="Literal1" runat="server">FusionCharts will load here!</asp:Literal>
</div>
c#:
string xmlcode = CreateChart(fromdt, todt, sec);
Literal1.Text = FusionCharts.RenderChartHTML("chart/FusionChart/Charts/StackedColumn3D.swf", "", xmlcode, chartContainerCT.ClientID, "470", "300", false);
xml:
the above xmlcode will get this xml:
<graph caption='NPS' palette='1' animation='1' formatNumberScale='0' startingAngle='125' baseFontSize='15' baseFontBold='1'' rotateNames='1' >
<categories>
<category label='40-311' UnitID='1' />
<category label='40-312' UnitID='2' />
<category label='40-313' UnitID='3' />
<category label='40-314' UnitID='4' />
<category label='40-315' UnitID='5' />
<category label='40-316' UnitID='6' />
<category label='40-317-SV 607' UnitID='7' />
<category label='40-318' UnitID='8' />
<category label='40-319-SV 609' UnitID='9' />
<category label='40-322' UnitID='12' />
<category label='40-324' UnitID='71' />
<category label='40-325' UnitID='72' />
<category label='45-319' UnitID='10' />
<category label='45-320' UnitID='11' />
</categories>
<dataset seriesName='Active' >
<set value=' ' color='#FF0000' />
<set value='1' color='#00FF00' link='P-detailsPopUp,width=800,height=550,toolbar=no,scrollbars=no,resizable=no-EquipmentInActive.aspx?EquipmentID=2&Section=1&StartDate=05/25/2014&EndDate=05/25/2014&Status=1&label=label' />
<set value=' ' color='#FF0000' />
<set value='1' color='#00FF00' link='P-detailsPopUp,width=800,height=550,toolbar=no,scrollbars=no,resizable=no-EquipmentInActive.aspx?EquipmentID=4&Section=1&StartDate=05/25/2014&EndDate=05/25/2014&Status=1&label=label' />
<set value='1' color='#00FF00' link='P-detailsPopUp,width=800,height=550,toolbar=no,scrollbars=no,resizable=no-EquipmentInActive.aspx?EquipmentID=5&Section=1&StartDate=05/25/2014&EndDate=05/25/2014&Status=1&label=label' />
<set value=' ' color='#FF0000' />
<set value='1' color='#00FF00' link='P-detailsPopUp,width=800,height=550,toolbar=no,scrollbars=no,resizable=no-EquipmentInActive.aspx?EquipmentID=7&Section=1&StartDate=05/25/2014&EndDate=05/25/2014&Status=1&label=label' />
<set value=' ' color='#FF0000' />
<set value='1' color='#00FF00' link='P-detailsPopUp,width=800,height=550,toolbar=no,scrollbars=no,resizable=no-EquipmentInActive.aspx?EquipmentID=9&Section=1&StartDate=05/25/2014&EndDate=05/25/2014&Status=1&label=label' />
<set value='1' color='#00FF00' link='P-detailsPopUp,width=800,height=550,toolbar=no,scrollbars=no,resizable=no-EquipmentInActive.aspx?EquipmentID=12&Section=1&StartDate=05/25/2014&EndDate=05/25/2014&Status=1&label=label' />
<set value='1' color='#00FF00' link='P-detailsPopUp,width=800,height=550,toolbar=no,scrollbars=no,resizable=no-EquipmentInActive.aspx?EquipmentID=71&Section=1&StartDate=05/25/2014&EndDate=05/25/2014&Status=1&label=label' />
<set value='1' color='#00FF00' link='P-detailsPopUp,width=800,height=550,toolbar=no,scrollbars=no,resizable=no-EquipmentInActive.aspx?EquipmentID=72&Section=1&StartDate=05/25/2014&EndDate=05/25/2014&Status=1&label=label' />
<set value='1' color='#00FF00' link='P-detailsPopUp,width=800,height=550,toolbar=no,scrollbars=no,resizable=no-EquipmentInActive.aspx?EquipmentID=10&Section=1&StartDate=05/25/2014&EndDate=05/25/2014&Status=1&label=label' />
<set value='1' color='#00FF00' link='P-detailsPopUp,width=800,height=550,toolbar=no,scrollbars=no,resizable=no-EquipmentInActive.aspx?EquipmentID=11&Section=1&StartDate=05/25/2014&EndDate=05/25/2014&Status=1&label=label' />
<set value=' ' color='#FF0000' />
</dataset>
<dataset seriesName='InActive' >
<set value='1' color='#00FF00' link='P-detailsPopUp,width=800,height=550,toolbar=no,scrollbars=no,resizable=no-EquipmentInActive.aspx?EquipmentID=1&Section=1&StartDate=05/25/2014&EndDate=05/25/2014&Status=2&label=label' />
<set value=' ' color='#FF0000' />
<set value='1' color='#00FF00' link='P-detailsPopUp,width=800,height=550,toolbar=no,scrollbars=no,resizable=no-EquipmentInActive.aspx?EquipmentID=3&Section=1&StartDate=05/25/2014&EndDate=05/25/2014&Status=2&label=label' />
<set value=' ' color='#FF0000' />
<set value=' ' color='#FF0000' />
<set value='1' color='#00FF00' link='P-detailsPopUp,width=800,height=550,toolbar=no,scrollbars=no,resizable=no-EquipmentInActive.aspx?EquipmentID=6&Section=1&StartDate=05/25/2014&EndDate=05/25/2014&Status=2&label=label' />
<set value=' ' color='#FF0000' />
<set value='1' color='#00FF00' link='P-detailsPopUp,width=800,height=550,toolbar=no,scrollbars=no,resizable=no-EquipmentInActive.aspx?EquipmentID=8&Section=1&StartDate=05/25/2014&EndDate=05/25/2014&Status=2&label=label' />
<set value=' ' color='#FF0000' />
<set value=' ' color='#FF0000' />
<set value=' ' color='#FF0000' />
<set value=' ' color='#FF0000' />
<set value=' ' color='#FF0000' />
<set value=' ' color='#FF0000' />
<set value=' ' color='#FF0000' />
</dataset>
</graph>
Can any one plzz....help me.
thanks