Hi steema support,
We have one regarding how to get axis click or double click on Multiple Custom axis as shown in attached image.
In this i have four custom axis and i want to get that particular axis when i click or double click on axis.
Kindly suggest any solution asap.
Thanks in advance.
How to get axis on Click or double click on axis.
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: How to get axis on Click or double click on axis.
Hello!
Yes, you should be able to use code such as this:
Yes, you should be able to use code such as this:
Code: Select all
private void InitializeChart()
{
Line line1 = new Line(tChart1.Chart);
Line line2 = new Line(tChart1.Chart);
Axis axis = tChart1.Axes.Custom.Add();
axis.RelativePosition = 20;
line2.CustomVertAxis = axis;
line1.FillSampleValues();
line2.FillSampleValues();
tChart1.ClickAxis += TChart1_ClickAxis;
}
private void TChart1_ClickAxis(object sender, MouseEventArgs e)
{
Axis axis = sender as Axis;
string message = "";
int custIndex = tChart1.Axes.Custom.IndexOf(axis);
if (custIndex > -1)
{
message = "Custom Axis " + custIndex.ToString();
}
else
{
if(tChart1.Axes.Left.Equals(axis))
{
message = "Left Axis";
}
else if(tChart1.Axes.Bottom.Equals(axis))
{
message = "Bottom Axis";
}
}
MessageBox.Show(message);
}
Best Regards,
Christopher Ireland / 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 |