Hi all,
I have an UltraChart with values on date time format. When these are displayed in the legend, it is displaying "mm/dd/yyyy hh:MM:ss" but I would like to display only "mm/dd/yyyy" (see picture attached "DateTimeFormat.png"). Is there a way to change the format?
Thank you,
Alvaro.
Hello Alvaro,
Thank you for using our community.
I would like to ask you for an isolated sample, so I can investigate your case and provide you a better support.
Best Regards, Marina Stoyanova, Software Developer, Infragistics, Inc.
Hi Marina,
attached a sample (ChartLegendDateTimeIssue.zip) that displays a DateTime value in the legend with format "mmddyyyy hh/MM/ss", could you please try to remove "hh/dd/mm"?
it worked, thank you so much!
Hi Alvaro,
Thank you for the provided sample.
You can change the format of the labels in the legend by using the FillSceneGraph event. In the event get all the legend Text primitives, then from their text get the DateTime object they represent and parse it back to DateTime with the format that you need.
I have attached a modified version of your sample that demonstrates this suggestion.
Please let me know if you have any additional questions.