DevExpress.XtraCharts曲线上的点所对应的坐标值

private void chartControl_ObjectSelected(object sender, HotTrackEventArgs e)
{
      e.Cancel = false;
      XYDiagram xyDiagram = null;
      if (e.Object is XYDiagram)
      {
         xyDiagram = (XYDiagram)e.Object;
      }
      else if (e.Object is SeriesBase)
      {
         xyDiagram = (XYDiagram)(e.HitInfo.Diagram);
      }
      if (xyDiagram != null)
      {
         DiagramCoordinates coord = xyDiagram.PointToDiagram(e.HitInfo.HitPoint);
         DateTime pTime = coord.DateTimeArgument;//时间点
         /*..其他针对该时间点的处理..*/
      }
}

 

posted @ 2013-10-14 21:53  Smallbyte  阅读(1491)  评论(0编辑  收藏  举报