FusionCharts Free is a FREE flash charting component that can be used to render data-driven animated charts. Made in Macromedia Flash MX, FusionCharts can be used with any web scripting language like PHP, ASP, .NET, JSP, ColdFusion, JavaScript, Ruby on Rails etc., to deliver interactive and powerful charts. Using XML as its data interface, FusionCharts makes full use of fluid beauty of Flash to create compact, interactive and visually-arresting charts. FusionCharts Free edition is available at www.fusioncharts.com/free.
To develop FusionCharts in asp.net you must have some files, which you can get after download the free edition of FusionCharts. Those files are: FusionCharts.dll, FusionCharts.js, & chart file (swf). After collecting all those file you are ready to develop the FusionCharts in asp.net. Now follow the following steps:
Step 1: Create a new project as FusionChart in Visual Studio 2008.
Step 2: Now you have to place those files (FusionCharts.dll, FusionCharts.js, & chart file (swf)) in appropriate place. Otherwise FusionCharts will not work properly. Add the FusionCharts.dll as reference. Create a folder name FusionCharts in project. Then place the FusionCharts.js, & chart file (FCF_Pie3D.swf) into that folder. Now the folder arrangement looks like the image below:

Step 3: Data which I am going to show through FusionCharts is from Northwind Database (MS SQL Server). So now it’s better to do the database related things. I just create a view name CategoryWiseOrder in northwind database. Code for the view is given below:
1: CREATE VIEW [CategoryWiseOrder]
2: AS
3: SELECT Categories.CategoryName, SUM([Order Details].Quantity) AS Quantity
4: FROM Categories
5: INNER JOIN Products ON Categories.CategoryID = Products.CategoryID
6: INNER JOIN [Order Details] ON Products.ProductID = [Order Details].ProductID
7: GROUP BY Categories.CategoryName
Step 4: Copy the following code in web.config file:
1: <connectionStrings>
2: <add name="Northwind" connectionString="Data Source=localhost;Integrated Security=SSPI;
3: Initial Catalog=Northwind;" providerName="System.Data.SqlClient"/>
4: </connectionStrings>
Step 5: add the reference of FusionCharts.js file in Head tag of default.aspx page. Code is given below
1: <script type="text/javascript" language="javascript"
2: src="/FusionCharts/FusionCharts.js"></script>
And add the following code in Body tag of default.aspx page.
Now the default.aspx file’s code will be look like following code:
1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="FusionChart._Default" %>
2:
3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4:
5: <html xmlns="http://www.w3.org/1999/xhtml" >
6: <head runat="server">
7: <title>FusionCharts In ASP.NET</title>
8: <script type="text/javascript" language="javascript" src="/FusionCharts/FusionCharts.js"></script>
9: </head>
10: <body>
11: <form id="form1" runat="server">
12: <div>
13: <%
1: =CreateChart()
%>
14: </div>
15: </form>
16: </body>
17: </html>
Step 6: Now go to the code behind file of default.aspx page. Include the following code into code behind file:
1: public string CreateChart()
2: {
3: string ConnectionString = ConfigurationManager.ConnectionStrings["Northwind"].ConnectionString;
4: SqlConnection con = new SqlConnection(ConnectionString);
5: string sqlStatement = "SELECT CategoryName,Quantity FROM CategoryWiseOrder";
6: SqlCommand cmd = new SqlCommand(sqlStatement, con);
7: con.Open();
8: SqlDataReader reader = cmd.ExecuteReader();
9: string strXML;
10: strXML = "<graph caption='Category Wise Quantity' subCaption='By Quantity' decimalPrecision='0' showNames='1' numberSuffix=' Units' pieSliceDepth='30' formatNumberScale='0'>";
11: while (reader.Read())
12: {
13: strXML += "<set name='" + reader["CategoryName"].ToString() + "' value='" + reader["Quantity"].ToString() + "' />";
14: }
15: strXML += "</graph>";
16: return FusionCharts.RenderChart("/FusionCharts/FCF_Pie3D.swf", "", strXML, "FactorySum", "650", "450", false, false);
17: }
Then the default.aspx.cs file will be look like following code:
1: using System;
2: using System.Collections;
3: using System.Configuration;
4: using System.Data;
5: using System.Linq;
6: using System.Web;
7: using System.Web.Security;
8: using System.Web.UI;
9: using System.Web.UI.HtmlControls;
10: using System.Web.UI.WebControls;
11: using System.Web.UI.WebControls.WebParts;
12: using System.Xml.Linq;
13: using System.Data.SqlClient;
14: using InfoSoftGlobal;
15:
16: namespace FusionChart
17: {
18: public partial class _Default : System.Web.UI.Page
19: {
20: protected void Page_Load(object sender, EventArgs e)
21: {
22: }
23: public string CreateChart()
24: {
25: string ConnectionString = ConfigurationManager.ConnectionStrings["Northwind"].ConnectionString;
26: SqlConnection con = new SqlConnection(ConnectionString);
27: string sqlStatement = "SELECT CategoryName,Quantity FROM CategoryWiseOrder";
28: SqlCommand cmd = new SqlCommand(sqlStatement, con);
29: con.Open();
30: SqlDataReader reader = cmd.ExecuteReader();
31: string strXML;
32: strXML = "<graph caption='Category Wise Quantity' subCaption='By Quantity' decimalPrecision='0' showNames='1' numberSuffix=' Units' pieSliceDepth='30' formatNumberScale='0'>";
33: while (reader.Read())
34: {
35: strXML += "<set name='" + reader["CategoryName"].ToString() + "' value='" + reader["Quantity"].ToString() + "' />";
36: }
37: strXML += "</graph>";
38: return FusionCharts.RenderChart("/FusionCharts/FCF_Pie3D.swf", "", strXML, "FactorySum", "650", "450", false, false);
39: }
40: }
41: }
That’s all. Run the project and see how its looks. It will look like the following image:

If you want the project, just send me a mail at sadeque.sharif@yahoo.com