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

Show date on Axis labels (DataViz)

1 Answer 35 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:40 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.  

.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

 

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 01 Aug 2013, 09:01 AM
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!
Tags
Charts
Asked by
Sharif
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or