- Home
- Forum
- Xamarin.Forms
- Replace the Y axis label to new one
Replace the Y axis label to new one
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
SIGN IN To post a reply.
8 Replies
MK
Magesh Kumar Krishnan
Syncfusion Team
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
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
XQ
Xiaopeng Qi
September 21, 2015 07:26 PM UTC
Thanks Magesh, it works!
XQ
Xiaopeng Qi
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!
ME
Manivannan Elangovan
Syncfusion Team
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
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
XQ
Xiaopeng Qi
September 22, 2015 06:10 PM UTC
Please check the chart screenshot I attached (ss_f71f85aa.7z).
Attachment: 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
ME
Manivannan Elangovan
Syncfusion Team
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
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
XQ
Xiaopeng Qi
September 24, 2015 09:14 PM UTC
Thanks for the solution. It works!
ME
Manivannan Elangovan
Syncfusion Team
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
Thanks for the update. Please let us know if you have any query.
Regards,
Manivannan.E
SIGN IN To post a reply.
- 8 Replies
- 3 Participants
-
XQ Xiaopeng Qi
- Sep 18, 2015 08:20 PM UTC
- Sep 25, 2015 05:12 AM UTC