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

Column chart Date category

1 Answer 89 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Marten
Top achievements
Rank 1
Marten asked on 21 Apr 2016, 12:41 PM

Hi all,

In this simplified case my datased is filled with 2 records.

Date: 01-01-2015
Value: 10

and

Date: 01-01-
2016
Value:10

 

I want to see only those 2 days on the X asxis with a "dd-MM-yyyy"  format.

When I do the following:
axis.Date().BaseUnit(ChartAxisBaseUnit.Days).Labels(labels =>  labels.DateFormats(formats => formats.Days("dd-MM-yyyy")
I see 365 squeezed labels

How can configure the category axis to only show the dates which are are in the dataset?

 

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 25 Apr 2016, 07:13 AM
Hi Marten,

When using date axis all dates for a particular date period are rendered and this cannot be prevented. If you would like to display only the dates from the dateset you should use categoryAxis with type "category".

Regards,
Iliana Nikolova
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Chart
Asked by
Marten
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or