Adding more fields to ItemLabel

3 posts, 1 answers
  1. Tarcisis
    Tarcisis avatar
    29 posts
    Member since:
    Nov 2010

    Posted 09 Mar 2012 Link to this post

    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. Answer
    Peshito
    Admin
    Peshito avatar
    496 posts

    Posted 13 Mar 2012 Link to this post

    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 >>
  3. DevCraft banner
  4. Tarcisis
    Tarcisis avatar
    29 posts
    Member since:
    Nov 2010

    Posted 13 Mar 2012 Link to this post

    Hi,

    Thanks for the reply! It works perfectly!!

    Best regards.

Back to Top