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

Adding text to a numerical Axis

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

3 Replies

SJ Sumathi Jayaraj Syncfusion Team 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



RA Ryan Archibald January 20, 2016 12:34 PM UTC

Hi Sumathi

Thanks, that was perfect 

Ryan


SJ Sumathi Jayaraj Syncfusion Team 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

Loader.
Live Chat Icon For mobile
Up arrow icon