MindFusion.Charting for WebForms Programmer's Guide
Getting Started

To add MindFusion.Charting for WebForms to your ASP.NET Web application, perform the following steps:

  1. Create a new Web Site in Visual Studio

Select File -> New -> Project -> ASP.NET Web Application from the Visual Studio menu. MindFusion.Charting requires .NET 4.0 or newer versions, make sure selected target framework is at least .NET 4.0.

In the New Project dialog box, select language and location:

The MyWebApplicationsolution tree is created and displayed in the Solution Explorer.

The source file Default.aspx is created automatically.

  1. Add the MindFusion.Charting controls to the Visual Studio Toolbox

  1. Add references to the required assemblies to your project

  1. Place the Dashboard control in the Web page

Now, you can see icons for the MindFusion.Charting components in your toolbox. Follow these steps to add a Dashboard control on the page:

5. Add data to the chart

After adding a chart control to the page, you can now add data to its Series collection. Select the web form's code-behind file and modify the Page_Load handler. In the handler add data series using either ones of the pre-defined series classes (such as SimpleSeries, Series2DDataBoundSeries) or by implementing the Series interface in your own model class.

C#  Copy Code

using MindFusion.Charting;

//...

if (!IsPostBack)
{
    barChart.Series = new ObservableCollection<Series>
    {
        new BarSeries(
            new List<double> { 1, 2, 3, 4, 5, 6, 7, 8, 910, 11, 12 },
            new List<string> { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve" },
            null)
        { Title = "Series 1" }
    };
}

Check the Tutorials section for information on how to customize your charts and building more complex dashboards.