Column chart Date category

2 posts, 0 answers
  1. Marten
    Marten avatar
    1 posts
    Member since:
    Oct 2013

    Posted 21 Apr 2016 Link to this post

    Hi all,

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

    Date: 01-01-2015
    Value: 10


    Date: 01-01-


    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?


  2. Iliana Nikolova
    Iliana Nikolova avatar
    2622 posts

    Posted 25 Apr 2016 Link to this post

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

    Iliana Nikolova
    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
Back to Top