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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:





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

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 12:41 PM UTC

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon