title: Charting in ASP.Net MVC 3
body: <p>I'm using Chart web helper in ASP.Net MVC 3. I have seen a range of shiny images online showing capabilities of this API, but there is hardly any documentation on how to style the charts. For example, I need to display labels outside of the chart, I'd like to specify percentage, rather than decimal values, etc. </p>
  
  <p>There is a webforms project for download: <a href="http://weblogs.asp.net/scottgu/archive/2010/02/07/built-in-charting-controls-vs-2010-and-net-4-series.aspx" rel="noreferrer">http://weblogs.asp.net/scottgu/archive/2010/02/07/built-in-charting-controls-vs-2010-and-net-4-series.aspx</a> and very simple class documentation that explains how to assign values and specify basic dimensions.</p>
  
  <p>I understand that no books have been published yet on MVC 3, but surely there should be some sort of documentation explaining how to use the tool?</p>
  
  <p>Thank you</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>From what I have read, ASP.Net MVC 3 either took a step back with charting tool by removing ability to style charts, or it has not been documented at all. Came across this article: <a href="http://forums.asp.net/t/1620783.aspx/1?ASP+NET+MVC+3+Beta+Chart+Helper+Styling+Please+Help+" rel="noreferrer">http://forums.asp.net/t/1620783.aspx/1?ASP+NET+MVC+3+Beta+Chart+Helper+Styling+Please+Help+</a> , a very similar issue is described there. </p>
  
  <p><strong>EDIT 2:</strong>
  It appears that Microsoft have partially implemented MSCharts functionality in MVC 3. In order to use MSCharts, the System.Web.DataVisualization assembly must be imported and registered in web.configuration file. T</p>
  
  <p>This way, requests are sent from view to controllers. Controllers generate image of a graph and pass back an image result. Result is then displayed in the view. This is useful as it provides some sort of seperation. I still don't understand why System.WebHelpers.Chart does not already offer this functionality, but hopefully it will be addressed in near future. </p>
  
  <p><strong>EDIT 3:</strong>
  Few more points to make. Don't construct your graphs in the view - they should be served by a controller. If you do decide to use views for constructing graphs, then make sure you update web.config in Views folder to include  <code>&lt;add namespace="System.Web.UI.DataVisualization"/&gt;</code> in the namespace section. Names of assemblies and namespaces are slightly confusing. Assembly is called: System.Web.DataVisualization when namespace is called System.Web.UI.DataVisualization. Finally I think that charting API is great, it serves images which means that charts will be accessible from all web browsers. Quality of the charts is great. I have looked at alternatives such as Fusion Charts, HighCharts and few other jQuery/JavaScript/Flash powered charts. They all try to take £300-£1000 from you without trying to meet the most basic needs of developers. </p>