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

Replace the Y axis label to new one

Thread ID:

Created:

Updated:

Platform:

Replies:

120309 Sep 18,2015 08:20 PM UTC Sep 25,2015 05:12 AM UTC Xamarin.Forms 8
loading
Tags: SfChart
Xiaopeng Qi
Asked On September 18, 2015 08:20 PM UTC

Is there a way to replace the Y axis label to a new label like below?
Or is there a way to get the labels points on Y Axis but hidden, then I can have a new label add at the same points

Original: 1,        2,         3,       4
New:     Bad, Not OK, OK, Good

Thanks,
Xiaopeng

Magesh Kumar Krishnan [Syncfusion]
Replied On September 21, 2015 06:06 AM UTC

Hi Xiaopeng,

Thanks for using Syncfusion Products.

We can achieve the requirement by using the LabelCreated event of ChartAxis. Please refer to the sample from the following location.

Sample : http://www.syncfusion.com/downloads/support/forum/120298/ze/ChartSample_CustomLabel261083821  

Regards,
Magesh Kumar K

Xiaopeng Qi
Replied On September 21, 2015 07:26 PM UTC

Thanks Magesh, it works!

Xiaopeng Qi
Replied On September 21, 2015 11:38 PM UTC

One more question, is it possible to put the new Label in between ticks? It looks only CategoryAxis has property LabelPlacement, but not for NumericAxis. Thanks!

Manivannan Elangovan [Syncfusion]
Replied On September 22, 2015 12:25 PM UTC

Hi Xiaopeng,

In Our SFChart, we don’t have support for the LabelPlacement in NumericalAxis. Since it is a range bases axis, the label will be placed only in its equivalent YAxis value. Please provide more information on your requirement. It will be helpful to try to provide a solution for your requirement.

Regards,
Manivannan.E

Xiaopeng Qi
Replied On September 22, 2015 06:10 PM UTC

Please check the chart screenshot I attached (ss_f71f85aa.7z). 

Basically, I would like Y axis shows (Bad, Not Ok, OK, Good), X axis shows time with format "HH AM/PM" (this is my issue too to get the exact format, only test "HH" works for LabelFormat, do you also have solution on this?)



Attachment: ss_f71f85aa.7z

Manivannan Elangovan [Syncfusion]
Replied On September 23, 2015 11:45 AM UTC

 Hi Xiaopeng,

We are able to achieve your XAxis requirement by setting the DateTimeAxis LabelFormat value as “hh a” for android ,iOS and “hh tt” for WP.

For Yaxis requirment, we can show the custom labels (Bad, Not OK, Ok, Good) but it doesn’t have support to place the labels in between ticks. Instead of that, we have used Striplines. Striplines are used to differentiate the ranges of axes

We have attached the sample for your reference. Please find the sample from the following location.

Sample: ChartSample

Regards,
Manivannan.E

Xiaopeng Qi
Replied On September 24, 2015 09:14 PM UTC

Thanks for the solution. It works!

Manivannan Elangovan [Syncfusion]
Replied On September 25, 2015 05:12 AM UTC

Hi Xiaopeng,

Thanks for the update. Please let us know if you have any query.

Regards,
Manivannan.E

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

;