Stockchart categoryAxis Issue

4 posts, 0 answers
  1. 儒 avatar
    6 posts
    Member since:
    Jul 2018

    Posted 05 Aug Link to this post

    Hi,

         I'd like to use stockchart to display my data across thirty years scale with proximately two data per week. However, setting baseUnit to "days" will cause categoryAxis's label overlapping each other. How can I display the data "daily" in chart and make categoryAxis's label display act like setting baseUnit to  "monthly" or "yearly"? 

    Thanks,

    Bob

     
  2. Nikolay
    Admin
    Nikolay  avatar
    222 posts

    Posted 06 Aug Link to this post

    Hello 儒,

    I could suggest setting the desired baseUnit and adjusting the autoBaseUnitSteps to fit the data according to the data points available:

    Give this a try and let me know if it is what you are looking for.

    Regards,
    Nikolay
    Progress Telerik

  3. 儒 avatar
    6 posts
    Member since:
    Jul 2018

    Posted 07 Aug in reply to Nikolay Link to this post

    Hi Nikolay,

         Thanks for answering. Is it possible to display categoryAxis.label only if there's a data on that date?

    Bob

     
  4. Nikolay
    Admin
    Nikolay  avatar
    222 posts

    Posted 11 Aug Link to this post

    Hi Bob,

    The described functionality is still not supported by the Kendo UI Chart.

    As a workaround, you can remove some of the labels by using the Step and Skip properties:

    Alternatively, you can use a category type axis (instead of date) and manually populate the categories:

    However, note that switching to a category axis will not provide you with all the functionalities of a date axis.

    Additionally, the categoryAxis labels can be rotated so they better fit the available space:

    Finally, it is possible to entirely remove the data point with no data by setting value "null" for that point.

    Regards,
    Nikolay
    Progress Telerik

Back to Top