how can i determine the x,y width and height of the chart?
I use the chart.Axes.Left,Right,Top,Bottom to determine them but it doesn't work.
I want to be able to show a tooltip containing series data only when the
mouse is within the series area:
Code: Select all
private void OnChartMouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
return;
if (tChart1.Series.Count == 0)
return;
Axes axes = tChart1.Axes;
if (e.Location.X < axes.Left.Position
||e.Location.X > axes.Right.Position
||e.Location.Y < axes.Top.Position
||e.Location.Y > axes.Bottom.Position)
{
toolTip.Active = false;
return;
}
toolTip.Active = true;
Thanks in advance,
regards