Chart Width and height 100%

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Rock
Newbie
Newbie
Posts: 16
Joined: Tue Sep 04, 2007 12:00 am
Contact:

Chart Width and height 100%

Post by Rock » Mon Oct 15, 2007 4:17 am

I' ve set my Chart width and Height to 100%. In aspx and via properties in Visual Studio 2005.

But my Chart width and height is always 100px. Is it possible that the percents are interpreted as pixels.

How can I set my Chart width to real 100%

i am use Teechart 3.2.2796.22187
is this edition update this function?

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 Oct 15, 2007 8:33 am

Hi Rock,

The same issue is discussed here. Could you please read the message I posted there?

Thanks in advance!
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

Rock
Newbie
Newbie
Posts: 16
Joined: Tue Sep 04, 2007 12:00 am
Contact:

Post by Rock » Mon Oct 15, 2007 9:09 am

>
narcis wrote:Hi Rock,

>The same issue is discussed here. Could you please read the message I posted there?

>Thanks in advance!
i placing the below code in inside the <head></head> tag of a test webform,but the webchart still not fill 100% width of my client browser ,
the chart is not change size.
code:
<script language="jscript" >
window.onload=windowload;
window.onresize=windowResize;

function windowload()
{
var obj=document.getElementById('WebChart1');
obj.style.posWidth=document.body.clientWidth*0.8;
}

function windowResize()
{
var obj=document.getElementById('WebChart1');
obj.style.posWidth=document.body.clientWidth*0.8;
}
</script >

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 Oct 15, 2007 9:41 am

Hi Rock,

What about using this?

Code: Select all

<script language="jscript" &
    window.onload=windowload;
    window.onresize=windowResize;

    function windowload()
    {
      var obj=document.getElementById('WebChart1');
      obj.style.posWidth=document.body.clientWidth;
    }
    
    function windowResize()
    {
      var obj=document.getElementById('WebChart1');
      obj.style.posWidth=document.body.clientWidth;
    }
</script>
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

Rock
Newbie
Newbie
Posts: 16
Joined: Tue Sep 04, 2007 12:00 am
Contact:

Post by Rock » Mon Oct 15, 2007 9:55 am

narcis wrote:Hi Rock,

What about using this?

Code: Select all

<script language="jscript" &
    window.onload=windowload;
    window.onresize=windowResize;

    function windowload()
    {
      var obj=document.getElementById('WebChart1');
      obj.style.posWidth=document.body.clientWidth;
    }
    
    function windowResize()
    {
      var obj=document.getElementById('WebChart1');
      obj.style.posWidth=document.body.clientWidth;
    }
</script>
hi ,
you ask me refer to this link :http://www.teechart.net/support/viewtopic.php?t=2572
in this link, supply this method to solve the issue

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 Oct 15, 2007 9:56 am

Hi Rock,

I've made little changes to the code mentioned in the other thread. Could you please try the code I posted here?

Thanks in advance!
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

Rock
Newbie
Newbie
Posts: 16
Joined: Tue Sep 04, 2007 12:00 am
Contact:

Post by Rock » Tue Oct 16, 2007 2:41 am

Hi,
i'm sorry, i have not saw any code and link, please post again.

thanks!

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

Post by Narcís » Tue Oct 16, 2007 7:27 am

Hi Rock,

Sorry if my explanation was unclear but I meant the code in my second post on this thread.
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

Rock
Newbie
Newbie
Posts: 16
Joined: Tue Sep 04, 2007 12:00 am
Contact:

Post by Rock » Tue Oct 16, 2007 8:37 am

hi ,
i'm sorry,i have try the code you posted second ,but the chart is still not change size .whether can i send you my sample or not?
if i can, please give me a link.

thanks!

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

Post by Narcís » Tue Oct 16, 2007 8:40 am

Hi Rock,

Yes, you can post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance!
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

Rock
Newbie
Newbie
Posts: 16
Joined: Tue Sep 04, 2007 12:00 am
Contact:

Post by Rock » Tue Oct 16, 2007 9:21 am

hi,
i have send the sample to your server,please refer to it.

thanks!

Marc
Site Admin
Site Admin
Posts: 1274
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Tue Oct 16, 2007 1:44 pm

Hello,

The code in the earlier posts is suitable for TeeChart for .NET v2. The naming convention for the Chart image is different in version 3, YourChartName + 'img'. If you are using version 3 you should modify it as follows:

Code: Select all

<script language="javascript">
    window.onload=windowload;
    window.onresize=windowResize;
    
    function windowload()
    {
      resizeChart();
    }
   
    function windowResize()
    {
      resizeChart();
    }
    
    function resizeChart()
    {
      var obj=document.getElementById('WebChart1img');
      obj.style.width=document.body.clientWidth;
    }
</script>
Regards,
Marc Meumann
Steema Support

Rock
Newbie
Newbie
Posts: 16
Joined: Tue Sep 04, 2007 12:00 am
Contact:

Post by Rock » Wed Oct 17, 2007 1:06 am

hi ,
thank for your help! :P

tangone
Newbie
Newbie
Posts: 23
Joined: Tue Jun 26, 2007 12:00 am

Map Area was not resized after Chart resizes

Post by tangone » Mon Mar 17, 2008 5:19 am

Hi,

I have map area (for "drill down" purpose) enabled.
After I resize the Chart following the above method, the "clickable" area remains the same.
Is there a way to resize that to follow the size of the chart as well?

Thanks.

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 Mar 17, 2008 11:43 am

Hi tangone,

The image is being resized here, not the chart. As the chart is not being resized then the hotspot map is not being re-written.

You'll have to pass the new size (document.body.clientWidth etc.) back to the server to get TeeChart to return a new image before the hotspot will draw correctly.
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