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

Stockchart categoryAxis Issue

3 Answers 89 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Veteran
asked on 05 Aug 2020, 06:24 AM

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

 

3 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 06 Aug 2020, 04:24 PM

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

0
Top achievements
Rank 1
Veteran
answered on 07 Aug 2020, 07:29 AM

Hi Nikolay,

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

Bob

 
0
Nikolay
Telerik team
answered on 11 Aug 2020, 07:15 AM

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

Tags
Charts
Asked by
Top achievements
Rank 1
Veteran
Answers by
Nikolay
Telerik team
Top achievements
Rank 1
Veteran
Share this question
or