Fremus.co.za

Demistifying Life and Web Development

using System.Web.UI.DataVisualization.Charting;

Ok so I recently got a request to do a project that uses all kinds of pretty charts, and initially the development team wanted to use Open Flash Charts, but the developer I was working with on the project was on leave for two days and in that time I decided to check out New ASP.NET Charting Control: . First thing you need to do is download the free Microsoft Chart Controls and install that on your machine. Note that once installed it creates a folder under Program Files called Microsoft Chart Controls, with another folder called Assemblies under that, which contains DLL’s for both web and application. Once you have installed Microsoft Chart Controls you can choose to add the VS 2008 add-on if you are going to be doing web-forms development, but if like me you use a lot of web services and AJAX, you may not need it. So how do you get to use it then otherwise? By adding these two lines in your web.config file:



You then have access to a range of classes by typing the fully qualified namespace like this:

System.Web.UI.DataVisualization

Once you have access to the classes you can do all sorts of interesting things. You get to choose from 35 different chart types, that you can format with colours, 3D effects. And you can also use data with it very easily with a datareader, which impressed me. You can also save your charts as images.

  • Share/Bookmark
posted by fr3dr1k in ASP.NET,C#,Web Development and have No Comments
Get Adobe Flash playerPlugin by wpburn.com wordpress themes