Problem with ClickAxis event and 3D chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
bairog
Newbie
Newbie
Posts: 72
Joined: Fri Jul 07, 2006 12:00 am
Location: Moscow, Russia
Contact:

Problem with ClickAxis event and 3D chart

Post by bairog » Mon Jul 10, 2006 9:39 am

I need to draw a point on Axis in place of mouse click (3D Chart and two surface series). But ClickAxis appears when I'm clicking somewhere outside axes (looks like this event appears while clicking imaginary 2D axes to the left of zero point of my 3D axes). Moreover this imaginary axes stay at the same place while I'm rotating and elevating my real 3D axes. How could I use this event properly for my 3D axes?

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

Post by Narcís » Tue Jul 11, 2006 11:46 am

Hi bairog,

Please see my reply at your other message.
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

bairog
Newbie
Newbie
Posts: 72
Joined: Fri Jul 07, 2006 12:00 am
Location: Moscow, Russia
Contact:

Post by bairog » Thu Jul 13, 2006 8:23 am

narcis wrote:Please see my reply at your other message.
I can't understand exactly what do you mean. Do you recommend me to use MouseClick event instead of ClixkAxis? I can calculate XYZ position of a click using Mouseclick event arguments as you told me. But how can I determine XYZ posiyion of Axes depending of zoom, rotation and elevation of chart? I need these coordinates to determine if the axis was clicked but not something else. Help me with example please.
Thank you.

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

Post by Narcís » Thu Jul 13, 2006 3:04 pm

Hi bairog,

Ok, you can do something like the code below but it neither works for OpenGL charts nor for non-orthogonal charts (default elevation or rotation changed). So I've added this issue (TF02011581) to our defect list to be fixed for future releases.

Code: Select all

    private void tChart1_MouseClick(object sender, MouseEventArgs e)
    {

      for (int i = 0; i < tChart1.Axes.Count; i++)
      {
        if (tChart1.Axes[i].Clicked(e.X, e.Y))
        {
          switch (i)
          {
            case 0: tChart1.Header.Text = "Left"; break;
            case 1: tChart1.Header.Text = "Top"; break;
            case 2: tChart1.Header.Text = "Right"; break;
            case 3: tChart1.Header.Text = "Bottom"; break;
          }
        }
      }

    }
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

bairog
Newbie
Newbie
Posts: 72
Joined: Fri Jul 07, 2006 12:00 am
Location: Moscow, Russia
Contact:

Post by bairog » Thu Jul 20, 2006 8:51 am

There is suspicion that Clicked property workes correctly only for X and Y axes. I used orthogonal 3D chart and the following code

Code: Select all

private void tChart1_MouseMove(object sender, MouseEventArgs e)
        {
            label1.Text = e.X.ToString();
            label2.Text = e.Y.ToString();
            if (tChart1.Axes.Left.Clicked(e.X, e.Y) != false)
            {
                label3.Text = "Left";
                
            }
            else
                if (tChart1.Axes.Bottom.Clicked(e.X, e.Y) != false)
                    label3.Text = "Bottom";
                else
                    if (tChart1.Axes.Depth.Clicked(e.X, e.Y) != false)
                        label3.Text = "Depth";
                    else
                        label3.Text = "None";

        }
and didn't find position where I could see "Depth" text (when my cursor was ower depth axis "None" text appeared).

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

Post by Narcís » Thu Jul 20, 2006 10:43 am

Hi bairog,

This is the same problem I told you replying to your other thread.
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