GeekArticles
Database
SQL Server
Database
SQL ServerUsing Microsoft's Chart Controls In An ASP.NET Application: Serializing Chart Data
<p>
In most usage scenarios, the data displayed in a Microsoft Chart control comes from some dynamic source, such as from a database query. The appearance of the
chart can be modified dynamically, as well; past installments in this article series showed how to programmatically customize the axes, labels, and other appearance-related
settings. However, it is possible to statically define the data and appearance strictly through the declarative markup. One of the demos examined in
the <a Started</a> article rendered a column chart with seven columns whose labels and values were
defined statically in the <code><asp:Series></code> <code><Points></code> collection.
</p><p>
Given this functionality, it should come as no surprise that the Microsoft Chart Controls also support <i>serialization</i>. Serialization is the process of persisting the
state of a control or an object to some other medium, such as to disk. <i>Deserialization</i> is the inverse process, and involves taking the persisted data and recreating the
control or object. With just a few lines of code you can persist the appearance settings, the data, or both to a file on disk or to any stream. Likewise, it takes just a few
lines of codes to reconstitute a chart from the persisted information.
</p><p>
This article shows how to use the Microsoft Chart serialization functionality by examining a demo application that allows users to create custom charts, specifying
the data to plot and some appearance-related settings. The user can then save a of this chart, which persists its appearance and data to a record in a database.
From another page, users can view these saved chart snapshots. Read on to learn more!
<br /><a More ></a></p>
Sponsored Links
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)
