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

Latest Data Point Marker on Y Axis

Thread ID:





119165 May 16,2015 08:30 AM UTC May 20,2015 04:05 AM UTC WPF 3
Tags: SfChart
Tim Douglas
Asked On May 16, 2015 08:30 AM UTC


On a chart updating in real time is there a way to show the latest datapoint as a marker on a numerical Y axis?

E.g. if the latest datapoint had a value of 105 this should be shown on the Yaxis.  A example screenshot is attached, the newest datapoint is 2120 and this is clearly represented on the Y axis.


Attachment: DataPoint_1ce1daf1.rar

Rachel A [Syncfusion]
Replied On May 18, 2015 12:03 PM UTC

Hi Tim,
Thank you for contacting Syncfusion support.
We can achieve your requirement using HorizontalLineAnnotation ShowAxisLabel property. When we set this property to true we can able the view the axis labels in y axis.As the chart is updating in real time the annotation Y1 value is updated dynamically as shown in the code snippet below.
Code Snippet:



<chart:HorizontalLineAnnotation x:Name="annotation" ShowAxisLabel="True" ShowLine="False" ></chart:HorizontalLineAnnotation>



void timer_Tick(object sender, EventArgs e)



value = (series.ItemsSource as ObservableCollection<Data>).Count;

annotation.Y1 = ((Chart.Series[0] as CandleSeries).ItemsSource as ObservableCollection<Data>)[value - 1].Value;


Please find the attached sample below for your reference.
Sample: DataMarker.zip
Please let us know if you require any further assistance on this.
Rachel. A

Tim Douglas
Replied On May 18, 2015 05:40 PM UTC

Thanks for the quick response Rachel, it's now working after using your example.

One slight issue - the annotation is appearing at the far right of the axis rather than to the left as it was in your example.  I've tried setting the HorizontalAlignment but it didn't have any effect.  Any ideas?

The xmla is below and an image is attached.




                <charts:CategoryAxis ShowTrackBallInfo="True" LabelFormat="HH:mm" Interval="20" EnableScrollBar="True"
                                             Margin="4" ActualRangeChanged="XAxis_ActualRangeChanged" AxisLineOffset="10" EdgeLabelsDrawingMode="Fit"/>
                <!--<charts:DateTimeCategoryAxis ShowTrackBallInfo="True" LabelFormat="HH:mm" Interval="20" IntervalType="Minutes" EnableScrollBar="True"
                                             ActualRangeChanged="XAxis_ActualRangeChanged" Margin="4" />-->
                <charts:NumericalAxis  ShowTrackBallInfo="True" OpposedPosition="True" Margin="-2" RangePadding="Additional" ActualRangeChanged="YAxis_ActualRangeChanged" />

            <charts:CandleSeries Name="series" ItemsSource="{Binding obPriceBar}" StrokeThickness="1" XBindingPath="DateTime"  High="High" Open="Open" Close="Close"
                                 Low="Low"  Label="Candleseries" ShowTooltip="True" BearFillColor="Blue" BullFillColor="Red"
                                 charts:ChartTooltip.HorizontalAlignment="Left" charts:ChartTooltip.TooltipMargin="10"
                <charts:HorizontalLineAnnotation x:Name="annotation" ShowAxisLabel="True" ShowLine="False" Y1="{Binding annotationCol.Value}"></charts:HorizontalLineAnnotation>

Attachment: RightAlignment_4e133541.rar

Sheik Syed Abthaheer M [Syncfusion]
Replied On May 20, 2015 04:05 AM UTC

Hi Tim,

Thanks for your update.

We were able to reproduce the issue and we have confirmed this as bug and logged a report on this. Also we have created a support incident under your account to track the status of this issue.

Please log on to our support website to check for further updates.


Please let me know if you have any questions.

M. Sheik


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