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
155
Change position of X Axis in Gantt Chart
posted

'm using UltraWebCharts to plot Gantt chart in my Web form.

I have few queries regarding this controls:

1. Is it possible to move X-Axis position? Currently its at bottom of the chart, I need to move it to the top.

2. Bottom Title and X-axis labels are overlaping. Ho to resolve it?

Thanks

  • 155
    Offline posted in reply to Monika Kirkova

    Thanks .

    It is working

  • 1320
    Verified Answer
    Offline posted

    Hello Harjot,

    After investigating this further, I determined that the x-axis could be positioned to the top of the chart by hiding the x-axis and displaying x2-axis. This could be achieved from the quick design of the Gantt chart in the Axis group of the explorer bar:

     

    The code in the Default.aspx would look as follows:

    <igchart:UltraChart ID="UltraChart1" runat="server" ChartType="GanttChart" . . . >

         <Axis>

              <X Visible="false" TickmarkInterval="0">

                . . .

                  <Labels ItemFormatString="&lt;ITEM_LABEL:MM-dd-yy&gt;oooooooooooooo" Visible="True" FontColor="" HorizontalAlign="Near" VerticalAlign="Center" Orientation="VerticalLeftFacing">

                  </Labels>

              </X>

              <X2 Visible="true" TickmarkInterval="0">

                . . . 

                  <Labels ItemFormatString="&lt;ITEM_LABEL:MM-dd-yy&gt;oooooooooooooo" Visible="True" FontColor="" HorizontalAlign="Near" VerticalAlign="Center" Orientation="VerticalLeftFacing">

                  </Labels>

              </X2>

                </Axis>

    Regarding your second requirement, the margins of the x axis and x2 axis could be modified, in order to change the horizontal position of the chart.

    <X Visible="false" TickmarkInterval="0">

        <Margin>

             <Far Value="25.362318840579711" />

        </Margin>

     . . .

    </X>

    Below I am attaching a sample, demonstrating the described behavior. Please test it on your side and let me if you need any further information regarding this matter.

    Regards,
    Monika Kirkova,
    Infragistics

    WebChartGanttChart.zip