FusionCharts Forum: Please help me, I am not able to draw Line graph for the xml data - FusionCharts Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Please help me, I am not able to draw Line graph for the xml data Used ASP.net 2.0 C#, Fusion Chart Free

#1 User is offline   murughan 

  • Forum Newbie
  • Group: Members
  • Posts: 2
  • Joined: 17-December 08

Posted 17 December 2008 - 11:06 PM

Following code is written on default.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<title>Untitled Page</title>

<link rel="stylesheet" href="style.css">

<script language="javascript" src="FusionCharts/FusionCharts.js">

function draw()

{

}

</script>

</head>

<body>

<form id="form2" runat="server">

<div>

<table>

<tr>

<td align='center' class="table">

<div id="chart5Div">

This text is replaced by chart.

</div>

<%=CreateChart()

%>

</td >

</tr>

</table>

</ div>

</form>

</body>

</html >

===========================================

This code written in default.aspx.cs

protected void Page_Load(object sender, EventArgs e)

{

}

 

public string CreateChart()

{

string strXML = "<graph numdivlines='4' lineThickness='3' showValues='0' numVDivLines='10' ";

strXML += "formatNumberScale='1' rotateNames='1' decimalPrecision='1' anchorRadius='2'";

strXML += "anchorBgAlpha='0' numberPrefix='$' divLineAlpha='30'";

strXML += "showAlternateHGridColor='1' yAxisMinValue='800000' shadowAlpha='50' >";

strXML += "<categories ><category name='17379' /><category name='17410' /><category name='17440' />";

strXML += "<category name='17471' /><category name='17501' /><category name='17532' />";

strXML += "<category name='17563' /><category name='17592' /><category name='17623' />";

strXML += "<category name='17653' /><category name='17684' /><category name='17714' />";

strXML += "<category name='17745' /></categories>";

strXML += "<dataset seriesName='Current Year' color='A66EDD' anchorBorderColor='A66EDD' anchorRadius='4'>";

strXML += "<set value='301774889' /><set value='316452914' /><set value='323726174' />";

strXML += "<set value='332324660' /><set value='348478820' /><set value='358288941' />";

strXML += "<set value='356143694' /><set value='351111473' /><set value='351486340' />";

strXML += "<set value='352358131' /><set value='355765969' /><set value='359385228' />";

strXML += "<set value='364702230' /></dataset></graph>";

return FusionCharts.RenderChart("../FusionCharts/FCF_MSLine.swf", "", strXML, "ChId1", "600", "350", false, false);

}

Thanks and regards,

Murughan

 


0

Other Replies To This Topic

#2 User is offline   Arindam 

  • Supreme Being
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 730
  • Joined: 14-September 07

Posted 18 December 2008 - 12:02 AM

Hi,

Could you please check relative path of FusionCharts.js and FCF_MSLine.swf are correct and also check FCF_MSLine.swf is present with in swf collection?

Revise this code
<script language="javascript" src="FusionCharts/FusionCharts.js">
function draw()
{
}
</script>
Change it to
 
<script language="javascript" src="FusionCharts/FusionCharts.js"></script>
Also check relative path of FusionCharts.js

Check swf file relative path
return FusionCharts.RenderChart("../FusionCharts/FCF_MSLine.swf", "", strXML, "ChId1", "600", "350", false, false);

Thanks,

Arindam
0

Other Replies To This Topic

#3 User is offline   murughan 

  • Forum Newbie
  • Group: Members
  • Posts: 2
  • Joined: 17-December 08

Posted 26 December 2008 - 04:31 AM

Thanks a lot Arindam.
0

Other Replies To This Topic

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic