Annotations and y-axis

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
asupriya
Advanced
Posts: 179
Joined: Mon Dec 01, 2008 12:00 am

Annotations and y-axis

Post by asupriya » Tue Jul 30, 2013 2:08 pm

1. Is it possible to cancel the mouse move option to annotations?
2. Is it possible to change the y-axis setrange() while double_Clicking on the y-axis?

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Annotations and y-axis

Post by Sandra » Wed Jul 31, 2013 9:38 am

Hello asupriya,
1. Is it possible to cancel the mouse move option to annotations?
You can make that in chart nothing is done when the mouse is over in the annotation tool. You can do something as I have made in next example of code in MouseMove event:

Code: Select all

 void tChart1_MouseMove(object sender, MouseEventArgs e)
    {
       if (!(an1.Shape.Left< e.X &&  e.X < an1.Shape.Right) )
      {
        if (!(an1.Shape.Top < e.Y && e.Y < an1.Shape.Bottom))
        {
          an1.Text = "Hello";
          tChart1.Header.Text = e.X.ToString() + "," + e.Y.ToString();
        }
      }
2. Is it possible to change the y-axis setrange() while double_Clicking on the y-axis?
In this case you need use in AxisClick Event the SetMinMax() to change the scale of left axis as you want. For example, you can do something as next:

Code: Select all

void tChart1_ClickAxis(object sender, MouseEventArgs e)
    {
      tChart1.Axes.Left.SetMinMax(tChart1.Axes.Left.Minimum + 10, tChart1.Axes.Left.Maximum); 
    }
Could you tell us if previous codes help you to achieve as you want?

I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / 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