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. Image for the cookie policy date

Latest Data Point Marker on Y Axis


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

3 Replies

RA Rachel A Syncfusion Team 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

TD Tim Douglas 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

SS Sheik Syed Abthaheer M Syncfusion Team 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

Live Chat Icon For mobile
Up arrow icon