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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Annotation Label Position

Thread ID:





146099 Jul 19,2019 01:07 PM UTC Jul 19,2019 01:57 PM UTC WPF 1
Tags: SfChart
Asked On July 19, 2019 01:07 PM UTC

Using HorizontalLineAnnotation and ShowAxisLabel (and showline =false ) I can set an axis label (im using it to show the last value of a price chart). But is there any way that I could have

the label appear to the right of the chart, rather than on the left? (but I want to keep the axis on the left).

Two ways I thought of if this is not possible with theHorizontalLineAnnotation
1 - TextAnnotation - this kind of works but it wont display anything to the right of the chart series as it is clipped, and seems no way to add padding to the right of the chart area?
2 - Having a second axis showing same as that on the left, but could hide the axis labels and then the annotional label could be displayed on this axis - but dont know if that is possible

Thanks for any help

Muneesh Kumar G [Syncfusion]
Replied On July 19, 2019 01:57 PM UTC

Hi Tom, 
Greetings from Syncfusion.  
We have analyzed your requirement and you can achieve this by setting YAxis for with OpposedPosition as true, then set the axis name to annotation’s YAxisName, then set default axis and series yaxis Minimum and Maximum as same, finally collapse the opposed axis visibility as Hidden as per the below code snippet.  
Code snippet 
  <chart:SfChart  Margin="10"> 
                <chart:NumericalAxis Minimum="0" Maximum="50"> 
                <chart:HorizontalLineAnnotation Y1="12"  
                                 ShowAxisLabel="True" YAxisName="yAxis"/> 
            <chart:LineSeries XBindingPath="XValue"  
                             ItemsSource="{Binding Data}"> 
                    <chart:NumericalAxis OpposedPosition="True" 
                                         Minimum="0" Maximum="50" ShowGridLines="False" 
Please let us know if you have any other queries.  

Muneesh Kumar G. 


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

Live Chat Icon For mobile
Live Chat Icon