Legend Customization

2 posts, 0 answers
  1. Zubair
    Zubair avatar
    13 posts
    Member since:
    Nov 2011

    Posted 05 Apr 2012 Link to this post

    Hi,
    I want to Manipulate the "Legend Label" to have different FieldName at run time on the basis of selection of Radio Button which would be either "Value" or "Percent".

    As, such in case of Value it would be:-
    <telerik:ItemMapping DataPointMember="LegendLabel" FieldName="ChartLegendValue"/>
    and in case of "Percent" it would be:-
    <telerik
    :ItemMapping DataPointMember="LegendLabel" FieldName="ChartLegendPercent"/>

    How can i achieve this functionality ?
    Can i use a data trigger / style or some other way?

    Thanks in advance.
  2. Yavor
    Admin
    Yavor avatar
    401 posts

    Posted 09 Apr 2012 Link to this post

    Hello Zubair,

    You can bind the SeriesMapping collection to your view model and modify it from there. I have attached a small sample application that demonstrates this approach.

    Hope this helps!

    Kind regards,
    Yavor
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top