Page 1 of 1

Chart Width and height 100%

Posted: Mon Oct 15, 2007 4:17 am
by 13046616
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?

Posted: Mon Oct 15, 2007 8:33 am
by narcis
Hi Rock,

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

Thanks in advance!

Posted: Mon Oct 15, 2007 9:09 am
by 13046616
>
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 >

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

Posted: Mon Oct 15, 2007 9:55 am
by 13046616
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

Posted: Mon Oct 15, 2007 9:56 am
by narcis
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!

Posted: Tue Oct 16, 2007 2:41 am
by 13046616
Hi,
i'm sorry, i have not saw any code and link, please post again.

thanks!

Posted: Tue Oct 16, 2007 7:27 am
by narcis
Hi Rock,

Sorry if my explanation was unclear but I meant the code in my second post on this thread.

Posted: Tue Oct 16, 2007 8:37 am
by 13046616
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!

Posted: Tue Oct 16, 2007 8:40 am
by narcis
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!

Posted: Tue Oct 16, 2007 9:21 am
by 13046616
hi,
i have send the sample to your server,please refer to it.

thanks!

Posted: Tue Oct 16, 2007 1:44 pm
by Marc
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

Posted: Wed Oct 17, 2007 1:06 am
by 13046616
hi ,
thank for your help! :P

Map Area was not resized after Chart resizes

Posted: Mon Mar 17, 2008 5:19 am
by 13045688
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.

Posted: Mon Mar 17, 2008 11:43 am
by narcis
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.