Problem with ClickAxis event and 3D chart
Problem with ClickAxis event and 3D chart
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?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
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.narcis wrote:Please see my reply at your other message.
Thank you.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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 |
Instructions - How to post in this forum |
There is suspicion that Clicked property workes correctly only for X and Y axes. I used orthogonal 3D chart and the following code
and didn't find position where I could see "Depth" text (when my cursor was ower depth axis "None" text appeared).
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";
}
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |