Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
50
Project name on Gantt Chart
posted

I have a Gantt Chart and am having a hard time adding labels to the chart bars and would also like the bar lines thicker.  Each person has multiple projects (multiple gantt lines).  I would like to put the project name as a label on the chart.  I am pulling the data into a datatable from a sql server DB.  How do I accomplish this.

I have set the showOwners property to true but I'm not sure how to point one of the columns within my dataset to show as a label on the chart.  They are showing up correctly on my chart as "subtasks" within my gantt chart.

Thank You!

Jenise

Parents
No Data
Reply
  • 11095
    Verified Answer
    Offline posted

    Hello Marcus,

    1) You can display labels on top of the bars if you set the ShowOwners property to true. You can do it either in the code behind or in the markup:

    this.UltraChart1.GanttChart.ShowOwners = true; // code behind
    // markup

    You can control the appearance of the text with the OwnersLabelStyle settings. You can find them by opening the Quick Design WIzard > Go to Control Setttings on the left > Choose GanttChartt from the objects list > Choose OwnersLabelStyle

    2) You cannot set the thickness of the bars directly. What you can do is set the chart's height greater and the thickness will be adjusted. Also, the smaller the ItemSpacing value is the greater the bars thickness is. You can control the spacing from the ItemSpacing property:

    Quick Design WIzard > Go to Control Setttings on the left > Choose GanttChartt > See ItemSpacing on the list on the right.

    Please review the attached sample.

    You can also check the online sample at http://www.infragistics.com/samples/aspnet/chart/gantt-chart-data where you can change the ItemSpacing, Show Owners and other properties and see the changes over the chart. I hope this helps.

    Gantt Chart.zip
Children