Page 1 of 1

Can't enable zoom in IE

Posted: Mon Dec 19, 2005 11:06 am
by 9524350
Env.: TeeChart Pro 7.0.0.2 (Same problem with 7.0.0.6)

Hi All,

I'm displaying TeeChart in an HTML page but get a odd behaviour with zoom:

- Zoom doesn't work even though it is enabled (I added init for most/all zoom properties in despair. See init code below. My initial code only add Chart.Zoom.Enable= true)

- After I open the TeeChartEditor and close it (no action in there), zoom works ! (editor opened unsing <a href="javascript:document.all.Chart.ShowEditor();">

How come ?

Thanks in advance for your help.


----- Chart Init code : ------
<script language="javascript" type="text/javascript">
function RGB(red, green, blue) { return red+green*255+blue*65536; }

// Set title
var Chart= document.all.Chart;
Chart.Header.Text.Clear();
Chart.Header.Text.Add("History");

// Set general appearance
Chart.Aspect.View3D= false; // 2D
Chart.Panel.BevelInner= 0; // 0= None
Chart.Panel.BevelOuter= 0; // 0= None
Chart.Zoom.Enable= true;
Chart.Zoom.Direction= 2; // 2= tzdBoth
Chart.Zoom.Animated= false;
Chart.Zoom.MinimumPixels= 16;
Chart.Zoom.MouseButton= 1; // mbLeft
Chart.Zoom.Pen.Color= RGB(0,0,0);
Chart.Zoom.Pen.Width= 5;

// Add Series
Chart.RemoveAllSeries();
var nSeries= Chart.AddSeries(0); // 0 = scLine
Chart.Series(0).XValues.DateTime= true; // Time series
Chart.Series(0).Title="MyTag";
Chart.Axis.Left.Title.Caption="MyTag - Description";

Chart.Series(0).FillSampleValues(200);
</script>

Posted: Mon Dec 19, 2005 1:45 pm
by 9524350
OK, found the note in the docs about the manadatory OnAfterDraw handler().

Problem solved.

Posted: Thu Jan 05, 2006 8:14 am
by 6919081
hi.
you can add next code in your sript
in addition, it's not useful to redifine the function RGB(),do you know in javascirpt language,it is a system funciton. :P

Code: Select all

  chart.Zoom.Animated=True