MS Chart Samples

June 11, 2009 | In Development | No Comments

As a follow up to my previous post on the Microsoft Chart controls for .NET 3.5, Microsoft have a webpage with samples for both ASP.NET and Windows Forms.

They have Visual Studio projects which give demonstrations of the different chart types, and help you with implementation.

Samples Environment for Microsoft Chart Controls

Microsoft .NET Framework 3.5 Chart Controls

June 10, 2009 | In Development | 1 Comment

Microsoft released an add-on to the .NET 3.5 framework last year to provide built-in chart controls for ASP.NET applications. You need to download the chart controls for Microsoft .NET Framework 3.5 and optionally the Add-on for Visual Studio 2008 (this puts the controls in the toolbox for you). There is also an installation guide and API guide.

Microsoft Chart Controls for Microsoft .NET Framework 3.5
Microsoft Chart Controls Add-on for Microsoft Visual Studio 2008
Microsoft Chart Controls for .NET Framework Documentation

By default, the Chart control is found in the Data tab in Visual Studio (if you install the add-on) , and can be dragged onto the page as with any other control; this inserts the default mark-up:

  <asp:Chart ID="Chart1" runat="server">
  <Series>
            <asp:Series Name="Series1">
            </asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>

Which produces a graph that looks like this:

graph.jpg

You change the properties of the graph in the usual way from the Properties editor, items such as legends, display area, appearance etc, and crucial you can databind to the control from code.

« Previous Page

Login | XFN| WP
Powered by WordPress with cmb-web Theme design by Christian Bridge-Harrington.
Blog feed. Valid XHTML and CSS. ^Top^