YAxis title offset from axis labels

2 posts, 0 answers
  1. Ladislav
    Ladislav avatar
    5 posts
    Member since:
    Jun 2013

    Posted 10 Dec 2014 Link to this post

    Hello,
    Is there any option, how to make gap between yaxis title and yaxis labels larger. As you can see in attached picture, it does not look well.
    Here is my code snippet:

    var yLeftAxis = TKChartNumericAxis(range: TKRange(statisticItems: [data[0], data[1]]))
    var yRightAxis = TKChartNumericAxis(range: TKRange(statisticItems: [data[2]]))
            
    yLeftAxis.position = TKChartAxisPosition.Left;
    yLeftAxis.style.lineHidden = false
    yLeftAxis.style.labelStyle.firstLabelTextAlignment = TKChartAxisLabelAlignment.Left;
    yLeftAxis.style.labelStyle.firstLabelTextOffset = UIOffset(horizontal: 10, vertical: 0);
    yLeftAxis.style.labelStyle.textOffset = UIOffset(horizontal: 10, vertical: 0)
    yLeftAxis.title = "Straty (MWh)"
    yLeftAxis.style.titleStyle.rotationAngle = CGFloat(MathHelper.degreeToRadian(-90))
            
    yRightAxis.position = TKChartAxisPosition.Right;
    yRightAxis.style.lineHidden = false
    yRightAxis.style.labelStyle.firstLabelTextAlignment = TKChartAxisLabelAlignment.Left;
    yRightAxis.style.labelStyle.firstLabelTextOffset = UIOffset(horizontal: 10, vertical: 0);
    yRightAxis.style.labelStyle.textOffset = UIOffset(horizontal: 10, vertical: 0)
    yRightAxis.title = "Rozdiel strát (MWh)"
    yRightAxis.style.titleStyle.rotationAngle = CGFloat(MathHelper.degreeToRadian(90))


    Thank you!
  2. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 10 Dec 2014 Link to this post

    Hello Ladislav,

    To avoid duplication I have answered  the same question in other post.
    Regards,
    Pavel Pavlov
    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
Back to Top