Page 1 of 1

Some original functions are disappeared

Posted: Thu May 07, 2009 2:21 am
by 13050934
In a multiply axes project:

All the axes are assigned by the user,including all the vertical axes and a horizontal axis. The original left axis and the bottom axis are unvisible in the frame.
But, two original functions of teechart disappeared in this situation:
First,the lines can’t recover after I draged them when I was pressing right key of mouse.
Secondly, the lines can’t be zoomed in when I selected them in pressing left key of mouse.
I have tested that all the two functions are available if I reserve a original vertical axis. I have no idea how to config the axes in order to use all the control’s original functions. Is it a bug? Or, there are some other configarations.

Posted: Thu May 07, 2009 11:27 am
by 10050769
Hello Carl,

Please, could you send us a simple example project we can run "as-is" to reproduce the problem here? You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page. And explain exactly what we must do, for reproduce the problem.

Also, please you could say which version, of TeeChartFor.NET you can use.

Thanks,

Posted: Mon May 11, 2009 2:08 am
by 13050934
I have uploaded a document which named "Some original functions are disappeared.docx". Please check it and wish it helps for your analysis.

Posted: Mon May 11, 2009 7:24 am
by narcis
Hello Carl,

Thanks for the document but, as Sandra said, to be able to help you on this it would be very helpful if you could send us a simple example project we can run and debug here so that we can find the problem and suggest a solution if possible.

Thanks in advance.

Posted: Tue May 12, 2009 6:50 am
by 13050934
I have uploaded a compressed package named "MultiAxesProblem.rar". There are a project and a document. Please check it and wish it helps for your analysis.

Posted: Tue May 12, 2009 9:27 am
by 10050769
Hello Carl,

Is not possible to make zoom automaticly when use custom axis. You need to assign zoom manually as is explained here.

But in your case, you need make a similar code using UndoneZoom Event and Zoomed Event so in the next example:


UndoneZoom Event:

Code: Select all

        private void tChart1_UndoneZoom(object sender, EventArgs e)
        {
            foreach (Steema.TeeChart.Styles.Series s in tChart1.Series)
            {
                s.GetVertAxis.Automatic = true;
                s.GetHorizAxis.Automatic = true;
            }
        }
Zoomed Event:

Code: Select all

        private void tChart1_Zoomed(object sender, System.EventArgs e)
        {

            Steema.TeeChart.Axis axisv; 
            Steema.TeeChart.Axis axish;
            double amax; 
            double amin;
            foreach (Steema.TeeChart.Styles.Series s in tChart1.Series)
            {
               axisv = s.GetVertAxis;
               amin = axisv.CalcPosPoint(s.Chart.Zoom.y0);
               amax = axisv.CalcPosPoint(s.Chart.Zoom.y1);
               axisv.Automatic = false;
               axisv.SetMinMax(amin, amax);
               axish = s.GetHorizAxis;
               amin = axish.CalcPosPoint(s.Chart.Zoom.x0);
               amax = axish.CalcPosPoint(s.Chart.Zoom.x1);
               axish.Automatic = false;
               axish.SetMinMax(amin, amax);
            }
        } 

I hope that will help.

Posted: Wed May 13, 2009 1:49 am
by 13050934
First, thanks for your suggestion and I have made it zoom automaticly.
But, the lines can't recover after I have zoomed them in.
Is there any other event I should add to the tChart?

Posted: Wed May 13, 2009 2:03 am
by 13050934
Oh, I just have thought it over and I have found out a solution.
In my project, the maximum and minimum are asociated with the settings in the database, so it is forbidden to set the axes are automatic.
I have rewrite the function named tChart1_UndoneZoom, then I have soled this problem.
Thanks for your help again,
Best wishes!