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
315
Gantt bars not aligning when containing half-hour increments
posted

This is a composite gantt + line chart.

Note that the first (golden) "gantt bar" is supposed to run from 6:30 to 9:00. However, visually it starts at 6.

The 3rd (green bar) should go from: 3 to 4 AND from 4:30 to 9:30.

Incidentally, when I render data that does NOT contain half hour values, everything appears perfectly.

Thanks in advance.

  • 315
    Verified Answer
    posted

    I think I have found the solution.

    As it turns, in the image above, the XAxis is actually display 6:30 A as the start time. Due to my format string it was not displayed.

    Based on that, I figured that setting the range min/max would give me the desired results. And it did.

    I used the following lines:

                axisX.RangeType = AxisRangeType.Custom;

                axisX.RangeMin = new DateTime(2010, 9, 7, 6, 0, 0).Ticks;

                axisX.RangeMax = new DateTime(2010, 9, 8, 0, 0, 0).Ticks;