Can you centre align the Chart Title

6 posts, 0 answers
  1. Christopher
    Christopher avatar
    2 posts
    Member since:
    Mar 2015

    Posted 15 May 2015 Link to this post

    I am currently trying to set the position of the title on a TKChart, however, i can only set it to one of the four TKChartTitlePosition. 

    There is a TKChartTitleStyle class, however, it is empty and simply extends a common base class and adds no further functionality.

    Is there anyway to simply centre align the Chart Title?

    Chris

  2. Adrian
    Admin
    Adrian avatar
    167 posts

    Posted 18 May 2015 Link to this post

    Hi Christopher,

    Thank you for contacting us. 

    Please, find my answer in your other support ticket.

    Regards,
    Adrian
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
  4. Fabrizio
    Fabrizio avatar
    2 posts
    Member since:
    Nov 2015

    Posted 30 Nov 2015 Link to this post

    Hi,

    i'm interested too in how to center chart title.

    Is it possible?

     

    Thanks, 

    Fabrizio

  5. Christopher
    Christopher avatar
    2 posts
    Member since:
    Mar 2015

    Posted 30 Nov 2015 in reply to Fabrizio Link to this post

    The position property of TKChartTitleView is used to determine on which side of the chart the title should be displayed - left, right, top or bottom. If you need to align the title you should use its textAlignment property instead. Please consider the code snippet below:

    chart.title().textAlignment = NSTextAlignment.Center

     

  6. Fabrizio
    Fabrizio avatar
    2 posts
    Member since:
    Nov 2015

    Posted 30 Nov 2015 Link to this post

    Thank you, Christopher
  7. Adrian
    Admin
    Adrian avatar
    167 posts

    Posted 01 Dec 2015 Link to this post

    Hi, Fabrizio,

    Indeed the way to center the chart's title is to set its textAlignment property, like Christopher pointed.
    Christopher, thank you for the cooperation.

    Regards,
    Adrian
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
DevCraft banner