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.
4 Answers, 1 is accepted
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.
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?
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.
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.