This is a migrated thread and some comments may be shown as answers.

Xamarin iOS label TextColor for individual Axis

4 Answers 49 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Karles
Top achievements
Rank 1
Karles asked on 29 Aug 2017, 06:17 PM
hi,

I use Xamarin IOs and telerik to make a ("Chart Series: Line"), I'm trying to display some labels with a certain TextColor and other labels with another TextColor.

I tried Chart.YAxis.Style.LabelStyle.TextColor, but that changes the color for all labels. 

I tried AttributedTextForAxis, but this seems that only returns a string, and y need the textColor of the AttributedText. 

I need help to solve this.

Thanks!

4 Answers, 1 is accepted

Sort by
0
Stefan Nenchev
Telerik team
answered on 01 Sep 2017, 10:40 AM
Hello ,

You can find an example on how to style the labels of the series on the iOS platform in the "Examples" application which is located in the Examples/iOS folder of your local Telerik UI for Xamarin installation. Please have a look at the CustomPointLabel demo and its implementation as you should be able to achieve the behavior in the same manner.

Regards,
Stefan Nenchev
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Karles
Top achievements
Rank 1
answered on 09 Sep 2017, 06:36 PM

Hello,

Stefan can you explain a bit more how can i utilize the example to custom the axis labels?

i need to put the negative values with a red color.

in this moments i use a custom axis but now i can't get the size between the axis, how can i get it? or this is a bad way to custom the axis labels?

thx

0
Stefan Nenchev
Telerik team
answered on 13 Sep 2017, 02:01 PM
Hello ,

Please excuse me for referencing that example as it is regarding the labels of the points within the series. 
As for the labels on the axis, I will have a look whether this is possible with the current implementation and update the thread once I have more information. 

Regards,
Stefan Nenchev
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Stefan Nenchev
Telerik team
answered on 17 Sep 2017, 11:06 AM
Hello ,

Unfortunately, it would not be possible to achieve your requirement with the current implementation of the control. I have logged a feature request so we can consider exposing the functionality in Xamarin.Forms. You can track its progress here - Chart: Change color of label on axis. I suggest you follow the item in order to receive notification when some updates are available. I have also added some points to your account for the suggestion.

Regards,
Stefan Nenchev
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Chart
Asked by
Karles
Top achievements
Rank 1
Answers by
Stefan Nenchev
Telerik team
Karles
Top achievements
Rank 1
Share this question
or