Chart's Legend Font

Thread is closed for posting
2 posts, 0 answers
  1. Viresh
    Viresh avatar
    5 posts
    Member since:
    Feb 2015

    Posted 15 Apr 2015 Link to this post



    How can I change the font of the legend?


  2. Yoanna
    Yoanna avatar
    44 posts

    Posted 16 Apr 2015 Link to this post

    Hi Viresh,

    You can access every TKChartLegendItem in the legend's container by using its index. Changing TKChartLegendItem's label font is possible by applying settings by your choice to its font property. 

    Consider the following code snippet:
    TKChartLegendContainer* container = chart.legend.container;
     chart.legend.hidden = NO;
      for (int i=0; i< container.itemCount; i++) {
          TKChartLegendItem* legendItem = [container itemAtIndex:i];
          legendItem.label.font =[UIFont fontWithName:@"AvenirNext-Heavy" size:26];

    I hope this answers your question. Feel free to contact us if you have other questions.


    See What's Next in App Development. Register for TelerikNEXT.

Back to Top