This topic explains using a code example how to add the UltraCategoryChart control to Windows Forms applications.
This topic contains the following sections:
The following procedure demonstrates adding the UltraCategoryChart to Windows Forms applications.
The following is a screenshot of the UltraCategoryChart
Following are the general requirements for adding the UltraCategoryChart control.
Add the following Infragistics assemblies to your main project:
Infragistics.Win.DataVisualization.UltraDataChart.dll
Infragistics.Win.DataVisualization.Shared.dll
Infragistics.Win.Portable.Core.dll
In C#:
using Infragistics.Win.DataVisualization;
In VB:
Imports Infragistics.Win.DataVisualization
Following is a conceptual overview of the process:
1. Adding the UltraCategoryChart control to Windows Forms applications
2. Verifying the results
The following procedure takes you through the steps necessary for adding the UltraCategoryChart control to a page.
The following code demonstrates adding the UltraCategoryChart control with the minimum code and property settings required for display. The below code sample uses the Sample Energy Data resource.
In Visual Basic:
Dim categoryChart As New UltraCategoryChart()
categoryChart.DataSource = data
Me.Controls.Add(categoryChart)
In C#:
var categoryChart = new UltraCategoryChart();
categoryChart.DataSource = data;
this.Controls.Add(categoryChart);
Build and run your project to verify the result. If you have implemented the steps correctly, the displayed UltraCategoryChart should look like the one in the Preview section above.
The following topics provide additional information related to this topic: