GeekArticles
Database
SQL Server
Database
SQL ServerUsing Microsoft's Chart Controls In An ASP.NET Application: Using the Chart Controls with ASP.NET M
<p>
The Microsoft Chart controls are a series of classes in the <a that allow web developers to ability to add charts to their ASP.NET applications. The most pertinent charting-related class is the
<a class</a>, which contains information about
the appearance, series, charting areas, and so forth. In most of the demos and code samples explored thus far, used the <code>Chart</code> class
as a Web control, adding the <code><asp:Chart></code> declarative markup to our ASP.NET page, setting a few properties and, occasionally, writing a few lines
of code. When used as a Web control, the <code>Chart</code> class both creates the chart (as an image) and then renders an <code><img></code> element that points
to the generated chart image.
</p><p>
Using the Chart Web control is a standard practice in a WebForms application, but it is not suggested when building an
<a MVC</a> application. (While it is possible to add Web controls - including the Chat Web control - to the views of an
ASP.NET MVC application, it is generally frowned upon.) So, if we use the Chart Web control in an ASP.NET MVC application, how do we display a chart?
In addition to being used as a Web control, the <code>Chart</code> class can also be used programmatically. It is quite possible to create a new <code>Chart</code> object,
set some properties, plot the data points, and then generate the chart image. In fact, we looked at using this technique in an earlier installment,
<a Generating Chart Images</a>, in which we saw (among other things) how to generate chart
images programmatically and add them as attachments in an email message.
</p><p>
This article explores how to display charts in an ASP.NET MVC application. Read on to learn more!
<br /><a More ></a></p>
Sponsored Links
Read Next: Create ZIP Files From An ASP.NET Application
Related Topics
Subscribe via RSS
SQL Server
- Naming Database Objects: Part II
- Trace Messages Part V: Trace Cleanup
- Naming Database Objects: Part I
- Multiple-Child Aggregation
- Creating SQL Tables for an Integrating Application Using Dexterity
- SQL Server 2005 Beta 2 Transact-SQL Enhancements
- .NET Rocks! - Brian Larson on SQL Server Reporting Services
- Computing the Trimmed Mean in SQL
- SQL Server 2000 Gains on Oracle
- Separator First Formatting (SFF)
