Using the asp:Chart control

The world of .NET is an exciting and ever changing environment to work in so it’s easy to occasionally miss useful things when they’re released. The asp:Chart control fits into this category – it was released well over a year ago, however I haven’t had any reason to use it until very recently.

Here's a short (possibly the shortest) post with a snippets of information that I found useful about the Control, my 60 second summary if you will.

  • To use the control with version 3.5SP1 of the .NET framework you have to install a small MSI package, however when version 4.0 is released this step will no longer be required.
  • The same MSI also needs to be installed on your server(s).
  • As you can see from the screenshots on Scott Guthrie’s blog, the resultant charts are very professional looking, and..
  • They're easy to work with. I was initially experimenting with Google charts, but found the asp:Chart control to be far superior - URL based APIs can really be a pain to work with, and you realise how fragile they can be when you chew through many badly implemented wrappers. The asp:Chart offering also works really well with some simple LINQ aggregation allowing you to map things like monthly totals very quickly and easily.
  • There’s a few web.config additions required: One to the pages/controls area, the httpHandlers area, one in the system.webserver/handlers and an appSetting. You might not need the appSetting (ChartImageHandler) while you’re developing locally, however you will as soon as you deploy to a server as it needs the temporary location to be defined.
  • As you can imagine hosted environments will have issues with the 3.5SP1 version unless your hosting provider is willing to install the MSI package for you.

There you go. Short, simple, and hopefully of use to anyone looking to get started with the asp:Chart.

Tags:

DotNetKicks Image

Posted on Saturday, December 12, 2009 4:48 PM | ASP.NET Web Development

Like this? Share it!

  • # re: Using the asp:Chart control
    Gravatar
    Commented on 2/2/2010 11:45 PM

    The new Chart Controls for .NET Framework 3.5 enables ASP.NET and Windows Forms developers to easily create rich and professional-looking data visualization solutions. The Chart Controls currently contains 25 different chart types with 3-D support for most of them, and all of these, available for FREE. In this article, we will create a sample chart using the Chart controls.

  • # re: Using the asp:Chart control
    Gravatar
    Commented on 3/29/2010 3:04 AM

    Control charts, also known as Shewhart charts or process-behaviour charts, in statistical process control are tools used to determine whether or not a manufacturing or business process is in a state of statistical control.

Post a comment
Please add 7 and 3 and type the answer here:
Remember me?
Ensure the word in this box says 'orange':