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

Graph Label Shows DateTime (Don't Want Time)

1 Answer 77 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Phil
Top achievements
Rank 1
Phil asked on 11 Mar 2015, 02:37 PM
I have created a graph which has a datetime field as the x-axis.  From the datasource, the datatype is datetime. 

I want the x axis lables to show only MM/dd/yy, but it always wants to show the time.  I have tried custom format on the legend with {0:MM/dd/yy} but that throws an error in the graph saying:  Input string was not in a correct format.  I try without the {} brackets.  Still shows time. 

I have also tried changing Scale to DateTime Scale (at this point I am shooting in the dark).  Is there a way to get these times to go away?

Thanks,
Phil

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 16 Mar 2015, 11:21 AM
Hello Phil,

If you refer to Telerik Reporting Graph item, by default the axis will use CategoryScale where labels are recognized as strings. To change the formatting in thic case you can work with the CategoryGroups - grouping - Label and place a proper expression formatting the labels.
Other approach is to switch to DateTime scale and use the axis LabelFormat - How to: Change the Axis Scale.

Data point labels have their own DataPointLabel settings, which will be applied on individual points in the Graph.


I hope the information is helpful.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Phil
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or