KT.UI C# ASP.NET AJAX Chart Library is developed by integrating web chart APIs and methods together with web UI's toolbar control items to offer developers and end users rich options in drawing and customizing gantt chart. And we will display the complete C# sample codes for creating gantt chart in this page. The most use of gantt chart is to make a planning in business or projects. The schedule drew by the web gantt chart has the start time and end time to each plan, so that people can make good management to their projects. In this online article, we will show you the free tutorials of building an html gantt chart using C# sample codes.
First, please check out the essential steps for using KT.UI C# ASP.NET chart control: drag an "AjaxPanel" control to "aspx" page and a chart control to "AjaxPanel" from Toolbox, after this, we can modify the related chart properties by calling and adding C# codes in "aspx.cs" file. Specific processes will be included in following two parts. Basic SettingsUse C# Codes to Select Gantt Chart Type
Just like the operation described before, after we have added and chart control from Toolbox, we can refer to compliant C# codes to set the chart type. With the rich chart creating options, we can select gantt chart type in two ways:
Use C# Codes to Set Chart Style
To meet variable visualization needs, we still provide rich components to customize gantt chart color and background color and skin to specialize your chart. Following C# code is for changing gantt chart skin.
Use C# Codes to Set Chart Title
We can use KT.UI C# ASP.NET Chart title control to add a suitable title to gantt chart to display the chart theme. And title rotation, position, text font and color are supported. For more information, please link to: set chart title element in c# project.
Use C# Codes to Set Chart Orientation
It depends on your own needs to display gantt chart in vertical or horizontal form. If we want to create a horizontal gantt chart, set the chart series orientation to horizontal, if we need to draw a vertical gantt chart, switch the chart series orientation to vertical.
Gantt SettingsSet Chart Series Using C# Codes
There is no limitation on setting how many sets of data points to a gantt chart; we can add one or more series of data, displaying on a separate gantt. C# sample codes below demonstrate how to add two series of data to gantt chart. For detailed chart series information, check how to set chart series element using c#.
Following C# demo codes are for customizing gantt chart's color to have a better visualization effect. Users can set different color to different data series, so that the gantt chart graph will display in multiple colors. Each color stands for one timeline of your project plan, and make the schedule clear to view.
Set Chart Axis Using C# Codes
X and Y axes are contained in gantt chart to display different values and general trend. And generally speaking, x axis represents categories, and y axis stands for values. We can precisely set the scale and space of two axes to display data series more accurately and clearly. See C# codes below.
If you want to see the online gantt demo image of gantt chart, you can go to: gantt chart online demo. | ![]() ASP.NET AJAX UI Controls ASP.NET AJAX Chart UI Control OverviewGetting StartedChart Element DiagramSeriesAxesLegendCaptionTickData GridChart Type Bar ChartPoint ChartLine ChartPie ChartArea ChartGantt ChartBubble ChartBezier ChartSpline ChartSpline Area ChartCandle Chart Chart With StackedFull Stacked ChartFeatures Automatic LayoutAutomatic Text-wrappingScrollingEmpty ValuesScale BreakMultiline LabelsWise LabelsMarking AreasMultiple TypesInteractiveDrill DownShadowEdtingData Binding Array DataList DataDatabase DataXML DataChart Style Chart SkinASP.NET AJAX Grid UI Control |