How To: Create a Dynamic Gantt Chart
One of the many chart types provided in ActiveReports is the Gantt Chart. The Gantt chart is a project management tool used to analyze the progress of individual project tasks. The chart shows a comparison of project task completion to the task schedule. In a Gantt chart the X and Y axes are reversed i.e the X axis is vertical and the Y axis is horizontal. In this blog post I would be discussing about creating a Gantt chart at run time. Before we actually start with the implementation, let us see how our final output will look like: For the ease of understanding the approach, we'll divide and discuss the implementation in two parts.
Creating the DataSource
The first step is to set up a data source in order to provide data to the chart. Since we are creating the chart programmatically, we will use the ReportStart event to assign the datasource.
Plotting Chart Data
When we are creating a chart, we also need to set various properties in order to achieve the desired results. Following code shows the required implementation:
Sample applications implementing the above functionality can be downloaded in both C# and VB.NET from the following links: Download Sample - C# Download Sample - VB