C# chart 柱形图单击一个柱子触发事件

2024-11-17 07:44:45
推荐回答(2个)
回答1:

private void chart2_MouseClick(object sender, MouseEventArgs e)
{
System.Windows.Forms.DataVisualization.Charting.HitTestResult Result =
new System.Windows.Forms.DataVisualization.Charting.HitTestResult();
Result = chart2.HitTest(e.X, e.Y);
string value = Result.Series.Points[Result.PointIndex].AxisLabel;
}

回答2:

没有这个功能!!
除非你用GDI+!!