Some unexpected behavior

4 posts, 0 answers
  1. Alex
    Alex avatar
    10 posts
    Member since:
    Apr 2011

    Posted 30 Oct 2014 Link to this post

    I document several weird chart behaviors in the attached file:
    1. Effect of setting textOffset
    2. Missing labels
    3. Setting categoryAxis

    Please let me know if you need additional information. The file is a word doc but I am renaming it as .jpg so that I can attach it here.
  2. Adrian
    Admin
    Adrian avatar
    167 posts

    Posted 30 Oct 2014 Link to this post

    Hi Alex,

    Thank you for contacting us.

    1. 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 property to 

    TKChartAxisLabelAlignment.Right  

    and then set the desired textOffset. Please consider the code snippet below:
    yAxis.style.labelStyle.textAlignment = TKChartAxisLabelAlignment.Right
    yAxis.style.labelStyle.textOffset = UIOffset(horizontal: 40, vertical: 0)

    2. TKChartDateTimeAxis allows you to modify its interval unit and tick interval using its majorTickIntervalUnit and majorTickInterval 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 = TKChartDateTimeAxis()
    xAxis.majorTickIntervalUnit = TKChartDateTimeAxisIntervalUnit.Hours
    xAxis.majorTickInterval = 1
    series.xAxis = xAxis

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

    Regards,
    Adrian
    Telerik
     

    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.

     
  3. DevCraft banner
  4. Alex
    Alex avatar
    10 posts
    Member since:
    Apr 2011

    Posted 30 Oct 2014 in reply to Adrian Link to this post

    Hi Adrian,

    Thank you for your detailed answers. You guys are great!

    I tried to reproduce item 3 myself today but have not been able to :-). I will let you know when I see the behavior again.

    Alex
  5. Adrian
    Admin
    Adrian avatar
    167 posts

    Posted 31 Oct 2014 Link to this post

    Hi Alex,

    Thank you for this update. I am glad to hear that everything seems to be OK now. If you need further assistance, I will be happy to help you.

    Regards,
    Adrian
    Telerik
     

    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.

     
Back to Top
DevCraft banner