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

Legend Customization

1 Answer 16 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Zubair
Top achievements
Rank 1
Zubair asked on 05 Apr 2012, 06:57 AM
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.

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 09 Apr 2012, 09:25 AM
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 >>

Tags
Chart
Asked by
Zubair
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or