SfChart Crosshair Y-axis label shows rounded pixel value, not actual series data point
In CrosshairLabelTemplate on NumericalAxis, the ValueY property of ChartPointInfo arrives pre-rounded to 2 decimal places (e.g. 0.2400 instead of 0.2368). The precision is lost before our value converter runs. PointToValue in MouseMove returns the same rounded interpolated pixel→axis value, not the actual candle data.
The series data source (CandleChartPoint.Close) has the full precision. We need the crosshair Y-axis label to show the actual data point's Close value from the nearest series point, not the interpolated axis value at the cursor Y.
Question: Is there a built-in binding or event (like TrackBallLabelTemplate which exposes ChartPointInfo.Close) for the crosshair axis label that gives us the real data point value? Or should we hide the Y-axis crosshair label and replicate it manually using ChartCrossHairBehavior.PointInfos
Hi Mehboob Meghani,
Thank you for your patience while we investigated the Crosshair Label behavior in the Axis.
We are glad to inform you that we have successfully reproduced the reported issue and implemented a fix. The fix is scheduled to be included in our upcoming weekly release.
Note:
Before installing the patch, kindly remove the bin and obj folders from all projects in your solution and clear the NuGet cache using the following link: https://support.syncfusion.com/kb/article/6265/how-to-clear-nuget-cache
Please also refer to the following KB documentation to configure the custom assembly: How to apply the custom assemblies when configured the project with Syncfusion NuGet packages?
Kindly test the shared patch on your end and provide your confirmation. If you have any concerns or encounter any issues with the patch, please feel free to let us know. Based on your feedback, we will proceed further, as we are planning to include this fix in our next weekly release scheduled for June 16, 2026.
Root Cause:
The ChartCrossHairBehavior class, SetPostion method applied premature rounding to 2 decimal places before passing the interpolated axis value to GetLabelContent method. When a custom LabelFormat with higher precision was specified, this early rounding caused loss of precision, resulting in incorrect crosshair axis label values.
Resolution:
We have updated the logic to respect the axis LabelFormat:
- If LabelFormat is specified → the raw interpolated value is passed to preserve precision.
- If no LabelFormat is specified → the value is rounded to maintain backward compatibility.
In your case, we can specify the LabelFormat to the axis and will be reflected in the crosshair label formatting, and no precision will be lost for crosshair label.
If you have any further questions or need additional assistance, please feel free to let us know.
Regards,
Vallarasu R.
Attachment: Syncfusion.SfChart.WPF_e2a78a21.zip
Hi,
Thank you for the quick fix. I applied the patched assembly (Syncfusion.SfChart.WPF_e2a78a21.zip) and can confirm that the crosshair Y-axis label is now displaying the correct full-precision values (e.g., showing 0.2368 instead of the previously rounded 0.2400).
However, I noticed an issue with the ChartStripLine label on the NumericalAxis. I replaced mycustom LineAnnotation-based close price line with a ChartStripLine on the Y-axis:
```csharp
var stripLine = new ChartStripLine
{
Start = lastClose,
Width = yRange * 0.03,
Label = lastClose.ToString(format),
Background = new SolidColorBrush(Color.FromArgb(30, 160, 160, 160)),
};
CandleYAxis.StripLines.Add(stripLine);
```
The horizontal line renders correctly, but the Label text does not appear — neither on the axis edge nor inside the strip line area. We tried setting LabelHorizontalAlignment/LabelVerticalAlignment, but the label is still not visible.
I am using OpposedPosition="True" on the NumericalAxis. Does ChartStripLine.Label work with OpposedPosition? Is there an additional property we need to set to make the label visible?
Hi Mehboob Meghani,
We will continue to address the previously committed crosshair label bug fix within this thread. A new thread has been created to handle the latest query more effectively. Please refer to the link below for your convenience:
Forum Link: ChartStripLine label not visible on Numer... | WPF Forums | Syncfusion
Please let us know if you require any further assistance. We will be happy to help.
Best regards,
Vallarasu R.
Hi Mehboob Meghani,
We have fixed the reported issue and included the issue fix in our latest weekly NuGet release update version 33.2.13, which is available for download at nuget.org.
NuGet Version: 33.2.13
Root cause:
The ChartCrossHairBehavior class, SetPostion method applied premature rounding to 2 decimal places before passing the interpolated axis value to GetLabelContent method. When a custom LabelFormat with higher precision was specified, this early rounding caused loss of precision, resulting in incorrect crosshair axis label values.
We appreciate your support and patience. Please feel free to contact us if you need any further assistance.
Regards,
Baranibharathi P.
- 4 Replies
- 3 Participants
-
MM Mehboob Meghani
- Jun 6, 2026 04:35 PM UTC
- Jun 16, 2026 12:33 PM UTC