Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SurfacePoint.NearestSeriesPoint Property

Returns the nearest series point to the SurfacePoint coordinates.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v24.2.dll

NuGet Package: DevExpress.Wpf.Charts

#Declaration

public SeriesPoint3D NearestSeriesPoint { get; }

#Property Value

Type Description
SeriesPoint3D

The nearest series point to the SurfacePoint coordinates.

#Remarks

This example obtains the nearest series point to the mouse cursor when a user clicks a series:

private void Chart3DControl_MouseUp(object sender, MouseButtonEventArgs e) {
  Chart3DHitInfo hitInfo = chart.CalcHitInfo(e.GetPosition(this));
  if (hitInfo.InSeries && hitInfo.AdditionalItem is SurfacePoint) {
    SurfacePoint surfacePoint = (SurfacePoint)hitInfo.AdditionalItem;
    SeriesPoint3D seriesPoint = surfacePoint.NearestSeriesPoint;
  }
}
See Also