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

Adding more fields to ItemLabel

2 Answers 45 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.
Tarcisis
Top achievements
Rank 1
Tarcisis asked on 09 Mar 2012, 11:56 AM
Hi there,


I have a Horizontal 2D Stacked Bar.
Now i want to add an addicional field to ItemLabel. This field could be text,numbers,etc..
How can i do that?


Thanks!

2 Answers, 1 is accepted

Sort by
0
Accepted
Peshito
Telerik team
answered on 13 Mar 2012, 10:40 AM
Hello,

You can achieve that by using custom format expression like this:
series1.SeriesDefinition.ItemLabelFormat = "#Y + #DATAITEM.Value2";
The #DATAITEM token is a special one. It allows you to specify a property name from the underlying object and when the format expression is applied, the #DATAITEM token will be replaced with the value from the corresponding property. The format is: #DATAITEM.<PropertyName>. For example, the format expression "#DATAITEM.Description" means, that the value from the property Description will be used.

Regards,
Peshito
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Tarcisis
Top achievements
Rank 1
answered on 13 Mar 2012, 11:56 AM
Hi,

Thanks for the reply! It works perfectly!!

Best regards.

Tags
Chart
Asked by
Tarcisis
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Tarcisis
Top achievements
Rank 1
Share this question
or