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

How to I format Date Time label as multi-line on a DateTimeContinuousAxis?

1 Answer 134 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
IDispose
Top achievements
Rank 1
IDispose asked on 15 Sep 2011, 04:46 PM
The DateTimeContinuousAxis has a property LabelFormat which allows for Date and Time to be formatted. I want the date and time pieces to be displayed in 2 lines like so

Sep 09
11:34 A

Tried using "MMM dd \n\n hh:mm t"

Above does not work

Any ideas?

Thanks

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 19 Sep 2011, 09:37 AM
Hi Ramesh,

Thank you for contacting us.

The XAML parser will ignore the standard "\n" escape character. You need to provide the literal code of the character:

MMM-ddd 
 hh:mm 

If you want more control over the text blocks used to visualize axis labels, you may specify custom DataTemplate using the LabelTemplate property of the axis.

I hope this helps. Let me know if I can assist you in some other way.

Greetings,
Georgi
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Chart
Asked by
IDispose
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or