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

Label with different font Style

1 Answer 245 Views
Chart (obsolete as of Q1 2013)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rakesh
Top achievements
Rank 1
Rakesh asked on 27 Mar 2012, 08:04 AM
I had a requirement to place a value (Eg: 160 (100)) on CharSeriesItem label. I would like to have two different font sizes for the values. Please suggest.

C# Code:
ChartSeriesItem item = new ChartSeriesItem();
TextBlock txt1 = new TextBlock();
        txt1.Text = "Test1"
        txt1.Appearance.TextProperties.Font = new Font("Segoe UI", 9, System.Drawing.FontStyle.Bold);
        item.Label.Add(txt1);

       TextBlock txt2 = new TextBlock("txt2");
       txt2.Text = "Test2";
       txt2.Appearance.TextProperties.Font = new Font("Segoe UI", 7, System.Drawing.FontStyle.Bold);
       item.Label.Add(txt2);

1 Answer, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 29 Mar 2012, 11:38 AM
Hello Rakesh,

What you are trying to achieve is not supported because a single text block is responsible for the label. In case you want to style the label, that style will be applied to the whole text.

All the best,
Peshito
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
Chart (obsolete as of Q1 2013)
Asked by
Rakesh
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Share this question
or