This is a migrated thread and some comments may be shown as answers.

Chart's Legend Font

1 Answer 49 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Viresh
Top achievements
Rank 1
Viresh asked on 15 Apr 2015, 07:09 AM

Hello,

 

How can I change the font of the legend?

 

1 Answer, 1 is accepted

Sort by
0
Yoanna
Telerik team
answered on 16 Apr 2015, 07:05 AM
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.

Regards,
Yoanna
Telerik
 

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

 
Tags
Chart
Asked by
Viresh
Top achievements
Rank 1
Answers by
Yoanna
Telerik team
Share this question
or