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;//时间点
/*..其他针对该时间点的处理..*/
}
}
上一篇:SparkGraphXTest.scala


下一篇:前端代码在线调试&分享网站