I am trying to get y-axis values of several series when user mouse left click on chart. I am using TeeChart on my windows form application(c#)
I have tried like this
Code: Select all
private void mainTChart_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
mainTChart.Axes.Bottom.CalcMinMax(ref minTime, ref maxTime);
cdens = mainTChart.Series[0].XValues.IndexOf(e.X);
cdens = mainTChart.Series[0].YValues.IndexOf(e.Y);
cdens = mainTChart.Series[0].YValues.Value[Convert.ToInt16(e.Y)];
//cvisc = mainTChart.Series[1].YScreenToValue(e.Y);
cvisc = mainTChart.Series[1].YValues.Value[e.Y];
}
}
Is there any other way to get y-values of mouse click?
I have tried several ways but i am not able to get values. I have gone through documentation as well but not found what i want to do.
Thanks in advance,
Regards,
biji.