Thank you for contacting us.
To calculate the axis width, TKChart
uses its maximum value. However, using custom formatted strings where the maximum value is nil
breaks our internal logic and cases the described issue to appear. The issue appears when label style textAlignment
property is set to Left.
This issue will be addressed in one of our upcoming releases. You can track the issue status in our feedback portal
. I also updated your Telerik points for reporting it.
A possible work around for this issue is to align axis labels on the right side, just like on the screenshots you provided. You should set the textAlignment
and then set the desired textOffset.
Please consider the code snippet below:
allows you to modify its interval unit and tick interval using its majorTickIntervalUnit
properties. To show the time labels in 1 hour interval like on the screenshots, you should set the majorTickIntervalUnit
property to TKChartDateTimeAxisIntervalUnit.Hours
and the majorTickInterval
property to 1 like in the following code snippet:
let xAxis =
I wasn't able to reproduce the described behaviour. Could you, please, send me a sample project where the issue appears. This will help me investigate it and provide you with proper solution. Thank you for your understanding and cooperation.
I am looking forward to your reply.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.