Custom VisibleLabels for DateTime axis

Hello,


is it possible to set custom visible labels for a DateTimeAxis?


 In docs, I have found an example for NumericalAxis with a note, that this should be possible for all axis types; however, the ChartAxisLabel requires a Double type as a first argument. 


I have a collection of pairs (DateTime:string) for the labels; DateTime is desired position of the label, and string is my desired label. I am not sure, how to transform my DateTime value to a double to make this work for DateTimeAxis.  


https://help.syncfusion.com/xamarin/charts/how-to/adding-custom-labels-to-sfchart-axis


2 Replies 1 reply marked as answer

OS Ondrej Slimak November 23, 2021 10:46 AM UTC

I figured it out, DateTime.ToODate() is the way to convert it :)


Marked as answer

DD Devakumar Dhanapoosanam Syncfusion Team November 24, 2021 05:04 AM UTC

Hi Ondrej Slimak, 
 
Greetings from Syncfusion. 
 
We are glad to know that you have managed to find solution on your own. 
 
Please get back to us if you need any assistance on this. 
 
Regards, 
Devakumar D 


Loader.
Up arrow icon