Web chart Width and Height

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Hermes
Newbie
Newbie
Posts: 54
Joined: Tue Feb 04, 2003 5:00 am
Location: Montevideo, Uruguay

Web chart Width and Height

Post by Hermes » Thu Dec 23, 2004 12:43 pm

Is there any way to set the width and height in percentages of the page or the html table cell?

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

Post by Pep » Fri Dec 24, 2004 10:53 am

Hi Hermes,

you can do :

Code: Select all

<form id="Form1" method="post" runat="server">
tchart:WebChart id="WebChart1" style="Z-INDEX: 101; LEFT: 0px; 
POSITION: absolute; TOP: 0px" runat="server"
Width="100%" Height="50%" TempChart="File" AutoPostback="False"></tchart:WebChart>
</form>

Hermes
Newbie
Newbie
Posts: 54
Joined: Tue Feb 04, 2003 5:00 am
Location: Montevideo, Uruguay

Post by Hermes » Mon Dec 27, 2004 1:25 pm

hi pep, your suggestion didn't work in my app. Here is my HTML tag, notice that the chart is in a table cell and is there where i want the chart was maximized.
<TR>
<TD align="left" width="100%" colSpan="3" height="40%">
<tchart:WebChart id="WebChart1" runat="server" Height="100%" Width="100%" TempChart="Session" AutoPostback="True">
</tchart:WebChart>
</TD>
</TR>
with this tag the width and height are assumed in pixels and if the style option is added the picture is stretched to the cell size.
I test in a separated app with no table and the result is the same.

Hermes
Newbie
Newbie
Posts: 54
Joined: Tue Feb 04, 2003 5:00 am
Location: Montevideo, Uruguay

Post by Hermes » Tue Jan 04, 2005 6:04 pm

any sugestion?????

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

Post by Pep » Tue Jan 11, 2005 12:23 pm

Hi Hermes,

Percentage for a WebForm placed Chart is not difficult to implement at a basic level, the actual sizing of a Chart on the browser (eg. set to 80% or 100%), however there is a sticking point from a design point of view with the use of percentages to define Chart dimensions on a WebForm page:
- The actual pixel dimension of the Chart according to the actual browser page or frame size is not known until the Chart is rendered, that means that the aspect ratio of the Chart is unknown at Chart creation time with the result that it is created serverside with only partial dimensional information and will need to be 'stretched' to fit the percentage adjusted page location. The effect of the stretch on the Chart, that may contain text, may be an impairing of the precision and clarity of the original Chart. Also if the browser is subsequently drag resized by the user the Chart will continuously adjust its size and shape, the result of which is a further re-stretching of Chart contents.
- With the previous point in mind, Chart click events from the client would not be useable as the actual location of components within the Chart will not represent their 'intended' location.

The above are limitations due to the fact that the Chart is rendered as an image on the Web Form. The limitation does not exist for the current TeeChart ActiveX version when rendered on the page as an <object> as all calculation and processing occurs at the client (ie. where all the rendering information is available). It is possible that in a later version of
TeeChart for .NET, by embedding the TeeChart.dll on the page, similar funcionality may be achieved but that is not expected to be a feature of TeeChart for .NET v1.

Hermes
Newbie
Newbie
Posts: 54
Joined: Tue Feb 04, 2003 5:00 am
Location: Montevideo, Uruguay

Post by Hermes » Wed Jan 12, 2005 12:54 pm

And for the next version?

Post Reply