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

Set Chart Title Font Name

1 Answer 80 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Maher
Top achievements
Rank 1
Maher asked on 17 Apr 2009, 03:11 PM
I am tying to set the chart title using the line of code shown below

RadChart1.ChartTitle.TextBlock.Appearance.TextProperties.Font.Name =

"Arial";

however, when I try to compile this code I get error

Property or indexer 'System.Drawing.Font.Name' cannot be assigned to -- it is read only C:\Test_Prog\Chart\Default.aspx.cs

Is there a way to set the Char Title's font programmatically?

 

1 Answer, 1 is accepted

Sort by
0
Dessy
Telerik team
answered on 21 Apr 2009, 08:08 AM
Hi Maher,

In order to set Font properties of Chart Title programmatically  you should create a new Font object and set as parameters font name and font size
Here is an example on how to do this:

RadChart1.ChartTitle.TextBlock.Appearance.TextProperties.Font =

new System.Drawing.Font("Arial", 20);

 

 
Hope that helps.

Kind regards,
Dessy
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Chart (Obsolete)
Asked by
Maher
Top achievements
Rank 1
Answers by
Dessy
Telerik team
Share this question
or