Multiple axis with zooming

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Vikas Aggarwal
Newbie
Newbie
Posts: 14
Joined: Thu Aug 31, 2006 12:00 am

Multiple axis with zooming

Post by Vikas Aggarwal » Mon Sep 25, 2006 2:19 pm

For Charts with multiple axis if we apply zooming it works only with first left axis and the labels on x axis are displayed only only for first left axis.

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 Sep 25, 2006 2:22 pm

Hi Vikas,

Yes, custom axes don't zoom. However you can implement this by doing something like what's told on this FAQ item.
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

Vikas Aggarwal
Newbie
Newbie
Posts: 14
Joined: Thu Aug 31, 2006 12:00 am

Post by Vikas Aggarwal » Wed Sep 27, 2006 8:57 am

Hi,
The Response in FAQ is for Delphi. Can we get c# code. We have Custom" axes labels (Y-axes) that are not getting updated after zoom.

Thanks
Vikas

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

Post by Narcís » Wed Sep 27, 2006 10:06 am

Hi Vikas,

I've added two line series, line2 having a vertical custom axis (axis1) associated with custom labels. Zoom works fine for the custom axis using this code:

Code: Select all

    private void Form1_Load(object sender, EventArgs e)
    {
      line1.FillSampleValues();
      line2.FillSampleValues();

      axis1.Labels.Items.Clear();

      for (int i = 0; i < line2.Count; i++)
      {
        axis1.Labels.Items.Add(line2.YValues[i]);
      }
    }

    private void tChart1_Zoomed(object sender, EventArgs e)
    {
      axis1.SetMinMax(axis1.CalcPosPoint(tChart1.Zoom.y1), axis1.CalcPosPoint(tChart1.Zoom.y0));
    }

    private void tChart1_UndoneZoom(object sender, EventArgs e)
    {
      axis1.Automatic = true;
    }
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