Column chart Date category

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

    Posted 21 Apr Link to this post

    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?

     

  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2595 posts

    Posted 25 Apr 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".

    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
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top