Microsoft releases its most awaited Chart control integrated with .NET Framework3.5 with service pack1. Now you can build your web or windows application with charting features without any third party control. That means you need not to pay extra money to buy third party charting software.
You can download the Charting API from here.
After downloading, Install this API, but make sure you should have .NET Framework 3.5 with service pack 1 installed already.
Once you have installed this ASP.Net Charting API in your system, you can add ASP.Net Chart assembly to your Visual Studio 2008 toolbox as shown below:
Right click on the toolbox ->Choose Items->.NET Framework Component tab Browse Button -> Locate your Chart API(:\Program Files\Microsoft Chart Controls\Assemblies)-> Select "System.Web.DataVisualization.dll" then press "ok" Button.
Now you have added Chart Component in your toolbox
Now you are ready to create your first chart application. Just drag your Chart component from your toolbox into you web page. After adding your chart control to your web page your page should look like this.
Add System.Web.UI.DataVisualization.Charting Namespace like this.
Now you aspx.cs code should look like this in your page_Load event wirte this code. Belo code sample will create 3d Bar chat with sample data.
protected void Page_Load(object sender, EventArgs e)
//Create some dummy Data
Random random = new Random();
for (int pointIndex = 0; pointIndex < 10; pointIndex++)
//Set the chart type
Chart1.Series["Series1"].ChartType = SeriesChartType.Bar;
// Set the bar width
Chart1.Series["Series1"]["PointWidth"] = "0.5";
// Show data points labels
Chart1.Series["Series1"].IsValueShownAsLabel = true;
// Set data points label style
Chart1.Series["Series1"]["BarLabelStyle"] = "Center";
// Show chart as 3D
Chart1.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = true;
// Draw chart as 3D Cylinder
Chart1.Series["Series1"]["DrawingStyle"] = "Cylinder";
Once you run your application, your output browser will look like this:
Reference Site MSDN