Page 1 of 1

How to get the bottom axis values for zoom rect

Posted: Tue Jun 08, 2010 3:03 pm
by 15654835
Hello,

I am using TChart for my application, in Tchart you can zoom or undo zoom, . when you select a rectangle for zoom the TChart.Zoom provides the 4 points x0,x1,y0,y1(i.e a rectangle). I couldnt find any method which you use to get the bottm axis values only for zoomed area. is there any function avalable or one has to do it programtically. Any help or idea would be appericaite.

regrads
trimble

Re: How to get the bottom axis values for zoom rect

Posted: Tue Jun 08, 2010 3:50 pm
by yeray
Hi trimble,

I think you are trying to do something like this:

Code: Select all

        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;

            Steema.TeeChart.Styles.Line line = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            line.FillSampleValues();

            tChart1.Zoomed += new EventHandler(tChart1_Zoomed);
        }

        void tChart1_Zoomed(object sender, EventArgs e)
        {
            tChart1.Header.Text = "Bottom Axis Min: " + tChart1.Axes.Bottom.Minimum.ToString("#.##") + ", Max: " + tChart1.Axes.Bottom.Maximum.ToString("#.##");
        }