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

Show date on Axis labels

3 Answers 91 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Sharif
Top achievements
Rank 1
Sharif asked on 31 Jul 2013, 01:44 PM
I have data for 11 month, date 02/26/2012, 03/25/2012,
04/26/2012….. 12/30/2012.

I want to show those dates on Axis labels.  

set it to Date and base unit of a month
           
          with format of MM/dd/yyyy 
 

This code will show first date of the month. 02/01/2012,
03/01/2012 and so on. It doesn’t show the accrual date . If I remove Date and
baseUnit it will show each week. Can you tell me how to accomplish this.

 

Thanks

 

3 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 01 Aug 2013, 08:59 AM
Hi Sharif,

By design when used Date axis the data is aggregated for a particular period - month, week etc. In case you would like to display only the 11 dates form your dataSource as categories you should use categoryAxis with type category (instead of Date axis).

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Sharif
Top achievements
Rank 1
answered on 01 Aug 2013, 03:06 PM
I already  use CategoryAxis with    .Categories(e=>e.Date)
this will result with Jan 2013, Feb 2013. It will not show the day. I am looking for 01/25/2013. When I add the format MM/dd/yyyy this will default to first day of the month.  
0
Iliana Dyankova
Telerik team
answered on 02 Aug 2013, 03:53 PM
Hello Sharif,

I am afraid what you would like to achieve is not supported when categoryAxis with type Date is used - as I mentioned in my previous reply in this case data is aggregated for a particular period and this cannot be prevented. If you wish to display only the particular 11 dates (one date per month) you should use categoryAxis with type category. Another option is to use baseUnit days and display as categories all days for each of the months.

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Charts
Asked by
Sharif
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Sharif
Top achievements
Rank 1
Share this question
or