Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

Leave space to the left and right

Last post 07-08-2008 12:07 by Beechwood. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-03-2008 13:11

    Leave space to the left and right

    Hi,

    I am having only one column to display and its occupying the whole graph area (Kind of horizontal graph). Is there a way to leave space to the left and right of the graph and make the graph more vertical than filling up the entire space. Thanks. 

    • Post Points: 20
  • 07-04-2008 3:57 In reply to

    Re: Leave space to the left and right

    Answer

    You can try using ChartDrawItem Event. The code could be something like:

    this.ultraChart1.ChartDrawItem += new Infragistics.UltraChart.Shared.Events.ChartDrawItemEventHandler(ultraChart1_ChartDrawItem);

    ...

    private const int columnWidth = 100;

    ...

    void ultraChart1_ChartDrawItem(object sender, Infragistics.UltraChart.Shared.Events.ChartDrawItemEventArgs e)

    {

    Box box = e.Primitive as Box;

    if (box == null)

    {

    return;

    }

    if (box.DataPoint == null)

    {

    return;

    }

    int dWidth = box.rect.Width - columnWidth;if (dWidth <= 0)

    {

    return;

    }

    box.rect.Width = columnWidth;

    box.rect.X += dWidth / 2;

    }

    Best regards,
    Teodor Taushanov
    • Post Points: 20
  • 07-08-2008 12:07 In reply to

    Re: Leave space to the left and right

    That's exactly what I wanted. Thanks.
    • Post Points: 5
Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems