Resize Chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
smcmickens
Newbie
Newbie
Posts: 11
Joined: Thu Mar 06, 2003 5:00 am

Resize Chart

Post by smcmickens » Thu May 06, 2004 7:29 pm

Is there a way to autoresize a chart based on the client's screen resolution? I have tried setting the chart width and height property, but it seems to ignore those commands unless I need to put those in a certain subroutine or function to get them to work. I am using TeeChart for .Net version 1.0.1189.31308. Below is code where I define chart in webform which is based on 800x600 resolution. I would like to add code to change the chart width in particular to match the size of the client's screen if at all possible without hardcoding. Is this possible?

<TCHART:WEBCHART id="WebChart1" runat="server" Width="760" Height="500px" TempChart="File" AutoPostback="False"></TCHART:WEBCHART>


Thanks,
Scott

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri May 07, 2004 10:15 am

Ho Scott,

have you tried to change the Width and Height using something like the following code ? :

Code: Select all

WebChart1.Width = Unit.Pixel(700);
WebChart1.Height = Unit.Pixel(700);

smcmickens
Newbie
Newbie
Posts: 11
Joined: Thu Mar 06, 2003 5:00 am

Post by smcmickens » Mon May 10, 2004 2:33 pm

I tried that, but it seems to ignore that piece of code. I put those two lines in every function I have including the Page Load and nothing seems to work. Is there something else I need to do for it to recognize I want to change the chart size from its original dimensions?

smcmickens
Newbie
Newbie
Posts: 11
Joined: Thu Mar 06, 2003 5:00 am

Post by smcmickens » Mon May 10, 2004 2:37 pm

Never mind. That did work. Did not recognize change until I closed IE and opened it back up. I guess I was looking at a cache version of the page. Thanks for your help.

Post Reply