Show date on Axis labels (DataViz)

2 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.  

    .CategoryAxis(axis => axis

                                      

                                       
    .Categories(e=>e.Date)

                                        .Date()

                                        .BaseUnit(ChartAxisBaseUnit.Months)

                                       
    .Labels(labels => labels

                                                             
    .Rotation(-80)

                                                     
            .Format("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,

    I already answered to the same question in your other thread, however I am pasting my reply here too:

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