We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Bug? Within LineSeries TooltipTemplate, YData and Item are not synchronised.

Thread ID:





126009 Sep 17,2016 04:53 PM Sep 19,2016 08:41 AM UWP 1
Tags: SfChart
Tim Rawlinson
Asked On September 17, 2016 04:53 PM

I have a chart with a LineSeries and am trying to set a TooltipTemplate. The problem is that YData and Item are not synchronised within the DataTemplate, and so the following template can display different values in each TextBox even though they should always be equal, given that the LineSeries Y-axis is bound to Item.Y.

        <DataTemplate x:Key="tooltipTemplate">
                <TextBlock Text="{Binding YData}" />
                <TextBlock Text="{Binding Item.Y}" />

It seems that YData comes from the closest data point while Item comes from the previous data point. This behaviour of Item also means that it can never be accessed for the last data point; this is having particular problems when using adornments as hovering over the last marker returns data from the previous data point (it took a while to track that down!).

I may be able to get around this using an adornment template, assuming Item exists in that context and its behaviour is more sensible.

So, am I missing something or is this a bug? And can I work around it?


Tim Rawlinson

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On September 19, 2016 08:41 AM

Hi Tim, 
Thanks for contacting Syncfusion Support. 
The behavior of the line series is, the YData of line segment (Line between two points) is calculated from its nearest data point and item of the segment are corresponding data of the segment from underlying model. This same behavior is applied to the adornments used in the line series. 
However, your requirement (adornment having corresponding index item) can be attained by using the scatter series rather than adornments. We have prepared a demo sample based on this and it can be downloaded from below link 



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.