Resize Image Depending on the Gantt elements.

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
THoMaSiN
Newbie
Newbie
Posts: 36
Joined: Mon Apr 14, 2008 12:00 am

Resize Image Depending on the Gantt elements.

Post by THoMaSiN » Sat Jun 21, 2008 9:53 am

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.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Jun 23, 2008 9:19 am

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!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply