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
190
Gantt Chart questions
posted

I am attempting to use Win Chart for a Gantt Chart-style display of personnel schedules. I have one primary issue.

My x-axis labels, formatted as date and time are giving odd values such as 02-26-2009 1:18 PM. I want to only display times that are on the hour. I have no clue how to do this.

Or even if I could control what the start time and end times of the grid as a whole are and then set the number of labels I want to display, that would work.

 

Please help.

 

Thank you.

 

  • 26458
    Offline posted

    The chart typically uses smart axis tickmarks, but they won't be exactly on the hour if the total range is small enough (less than 1 day). Check to see if you're using smart axis:

    ultraChart1.Axis.X.TickmarkStyle = Infragistics.UltraChart.Shared.Styles.AxisTickStyle.Smart;

    You can also set the interval manually along with the start and end dates:
     
    ultraChart1.Axis.X.TickmarkStyle = Infragistics.UltraChart.Shared.Styles.
    AxisTickStyle.DataInterval;
    ultraChart1.Axis.X.RangeMin =
    DateTime.Parse("2/26/2009").Ticks;
    ultraChart1.Axis.X.RangeMax =
    DateTime.Parse("3/1/2009").Ticks;
    ultraChart1.Axis.X.RangeType = Infragistics.UltraChart.Shared.Styles.
    AxisRangeType.Custom;
    ultraChart1.Axis.X.TickmarkIntervalType = Infragistics.UltraChart.Shared.Styles.
    AxisIntervalType.Hours;
    ultraChart1.Axis.X.TickmarkInterval = 12;