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.
Syncfusion Feedback

Adding text to a numerical Axis

Thread ID:

Created:

Updated:

Platform:

Replies:

121716 Jan 19,2016 11:31 AM UTC Jan 21,2016 05:10 AM UTC WPF 3
loading
Tags: SfChart
Ryan Archibald
Asked On January 19, 2016 11:31 AM UTC

Hi there

I was wondering how can I add a character to a numerical axis? I want to be able to add the character "P" and then have my numerical values along with it for example "P10, P50, P90, etc"

Is this possible and if so can anyone help me please to find a solution to achieve this?

Thanks

Ryan

Attachment: Crosshar_121246_1feea423.zip

Sumathi Jayaraj [Syncfusion]
Replied On January 20, 2016 12:21 PM UTC

Hi Ryan,
 
Thanks for contacting Syncfusion support.
 
SfChart provided the support for adding units to the axis labels. We are able to add units by using PrefixLabelTemplate and PostfixLabelTemplate. We have modified the sample. Please find the code sample and the output screenshot below.
 
Code sample[XAML]:
 

<syncfusion:NumericalAxis.PrefixLabelTemplate>
    <DataTemplate>
        <TextBlock Text="P"/>
    </DataTemplate>
</syncfusion:NumericalAxis.PrefixLabelTemplate>
 
 
Snapshot:


 
Modified sample: Prefix_sample

 

Please refer to the below link for more information.
Link: http://help.syncfusion.com/wpf/sfchart/axis#add-units-to-labels
 
Regards,
Sumathi J


Ryan Archibald
Replied On January 20, 2016 12:34 PM UTC

Hi Sumathi

Thanks, that was perfect 

Ryan

Sumathi Jayaraj [Syncfusion]
Replied On January 21, 2016 05:10 AM UTC

Hi Ryan,

Thanks for the update.

Please let us know if you have any queries.

Regards,
Sumathi J

CONFIRMATION

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.

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

;