Page 1 of 1

Resize Image Depending on the Gantt elements.

Posted: Sat Jun 21, 2008 9:53 am
by 13048857
Hello,

I'm running into the problem of having too many entries to elegantly show them inside a fixed size image, and some times the problem is that the entries are too few, so there is a big empty space.

I was wondering if the size of the image can be variable, and if it doesn't; I would need to adjust the size of the boxes as well as the size of the image depending on how many gantt elements I have.

How do you recommend doing that? Is there a way you can report a direct relationship between the size of the objects around the chart?. We can assume there is no title and there is no legend inside the Chart. so basically, there is a WebChart with a Chart inside, I guess the next object is the panel, and that's how deep I should get, just taking into account the margings of the panel?

Any help is appreciated, thank you.

Posted: Mon Jun 23, 2008 9:19 am
by narcis
Hi THoMaSiN,

Yes, you can change object's dimensions:

Code: Select all

        resourceGantt.Width = 500
        resourceGantt.Height = 500
You could do that related to the number of values in the chart. Another option would also be changing chart's margins, for example:

Code: Select all

            resourceGantt.Chart.Panel.MarginUnits = TeeChart.PanelMarginUnits.Percent
            resourceGantt.Chart.Panel.MarginTop = 5
Or another option would be changing gantt bar's size according to the number of values in the series:

Code: Select all

        gc.Pointer.VertSize = 10
Hope this helps!