Show date on Axis labels

4 posts, 0 answers
  1. Sharif
    Sharif avatar
    14 posts
    Member since:
    Jun 2013

    Posted 31 Jul 2013 Link to this post

    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

     
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 01 Aug 2013 Link to this post

    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!
  3. Sharif
    Sharif avatar
    14 posts
    Member since:
    Jun 2013

    Posted 01 Aug 2013 Link to this post

    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.  
  4. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 02 Aug 2013 Link to this post

    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!
Back to Top