Hi Maria,
Greetings from Syncfusion.
We would like to let you know that you can get the trackball label text by using TrackballCreated event in SfChart as per the below code example.
CodeSnippet:
<chart:SfChart TrackballCreated="SfChart_TrackballCreated" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
. . .
</chart:SfChart> |
private void SfChart_TrackballCreated(object sender, ChartTrackballCreatedEventArgs e)
{
foreach(var trackballInfo in e.ChartPointsInfo)
{
// Get or set the trackball label text
var trackballLabelText = trackballInfo.Label;
trackballInfo.Label += "%";
}
rectangleAnnotation.X1 = (e.ChartPointsInfo[0] as ChartPointInfo).XPosition;
if (!rectangleAnnotation.IsVisible)
{
rectangleAnnotation.IsVisible = true;
var seriesBounds = (sender as SfChart).SeriesBounds;
rectangleAnnotation.Y1 = seriesBounds.Top;
rectangleAnnotation.Y2 = seriesBounds.Bottom;
rectangleAnnotation.X2 = seriesBounds.Right;
}
} |
Also, we have attached the sample for your reference. Please find the sample from the below link.
For more details, please refer the below link
Regards,
Yuvaraj.