Page 1 of 1

Resize Chart

Posted: Thu May 06, 2004 7:29 pm
by 8120653
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

Posted: Fri May 07, 2004 10:15 am
by Pep
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);

Posted: Mon May 10, 2004 2:33 pm
by 8120653
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?

Posted: Mon May 10, 2004 2:37 pm
by 8120653
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.