Skip to content

LiveChartViewModel.GetLineUnderMouse(float, float) method

Defined in

Type: LiveChartViewModel Namespace: CrissCross.WPF.Plot Assembly: CrissCross.WPF.Plot.dll

Applies to

net10.0-windows10.0.19041, net9.0-windows10.0.19041, net8.0-windows10.0.19041, net481

public AxisLine? GetLineUnderMouse(float x, float y)

View source

Summary: Gets the axis line located under the specified mouse coordinates, if any.

Parameters

NameTypeDescription
xfloatThe x-coordinate of the mouse position, in plot units.
yfloatThe y-coordinate of the mouse position, in plot units.

Returns: AxisLine? -- An AxisLine representing the axis line under the mouse position, or null if no axis line is found.

Remarks

This method checks for both horizontal and vertical axis lines near the given coordinates. The search uses a small radius to determine proximity. If multiple axis lines overlap, the first one found is returned.