Hi Pawel,
We have analyzed your query and recommend using the ChartStripline to render a horizontal line when the chart is clicked. You can achieve this by utilizing the OnCrosshairMove event to obtain the Y value of the crosshair and the ChartMouseClick event to set the Y value to start values of the ChartStripline. For your reference, we have attached a sample link and GIF Image. Please check the following code snippet.
<ChartEvents ChartMouseClick="OnMouseEvent" OnCrosshairMove="CrosshairMove"></ChartEvents> <ChartPrimaryYAxis> @if (Start != 0) { <ChartStriplines> <ChartStripline Start="@Start" Size="1" SizeType="SizeType.Pixel" Color="red" /> </ChartStriplines> } <ChartAxisCrosshairTooltip Enable="true"></ChartAxisCrosshairTooltip> </ChartPrimaryYAxis> public void CrosshairMove(CrosshairMoveEventArgs args) { CurrentStartValue = (double)args.AxisInfo[0].Value; } public void OnMouseEvent(ChartMouseEventArgs args) { Start = CurrentStartValue; StateHasChanged(); } |
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/AddHorizontalStripline1655642278.zip
GIF Image:

Kindly revert us if you have any concerns.
Regards,
Gopalakrishnan Veeraraghavan