Charting for WinForms Programmer's Guide
Getting Started

1. Select File -> New -> Project -> Windows Forms Application. MindFusion.Charting requires .NET 3.5 or newer versions, make sure selected target framework is at least .NET 3.5.

2. With default settings, Visual Studio should open the project's main form in Form Designer. If using Visual Studio 2010 and newer version, you should now see MindFusion.Charting toolbox palette installed in the toolbox, including Dashboard and controls that derive from it inside.

 Manual toolbox configuration in VS2008
If using VS2008, you can still add the .NET 3.5 components manually to toolbox from its context menu -> Choose Items command. Click the Browse button on Choose Toolbox Items dialog, navigate to CLR2 folder and select MindFusion.Charting.WinForms.dll. Confirm your selection until the dialog clsoes, and you should now see Dashboard and Chart controls in the toolbox.

3. Drag Dashboard ot Chart control to the form. Dashboard lets you display mutiple plots, axes and gauges in dynamic layout. Chart controls display a single plot and type of graphics by default, but new ones can be added to them as well. Expand References in Solution Explorer and confirm MindFusion.Charting.dll, MindFusion.Charting.WinForms.dll and MindFusion.Common.dll are listed. If only the WinForms.dll is listed, you must add references to the other two assemblies manually. To do that, select Add Reference from project's context menu, open Browse tab, and navigate to either CLR2 or CLR4 folder, if building respectively .NET 3.5 or .NET4+ application. From the folder select the missing assemblies and click ok.

4. If you've added a chart, you can now add data to its Series collection. Double click the form to show its Load event handler. In the handler add data series using either ones of the pre-defined series classes (such as SimpleSeries, Series2D, XmlSeries, DataBoundSeries) or by implementing the Series interface in your own model class.

C#  Copy Code

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

5. If you need to build a more complex dashboard, follow Tutorial 1.