We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Can one set the icons in the legend

See the attachment (didn't see any samples doing this) => I want to bind the symbol in the legend to the adorner attached to the line => so if the adorner changes the legend changes. I see there are 16 different icons available for the legend in documentation. Can u point me to a sample where the line symbol or marker is set to the legend => I assume that is an adorner or is it something else => I don't really want to set an adorner and a legend => want to specify the data series uses a specific symbol or marker and automatically picked up by the legend.



symbols_fa99bae5.zip

7 Replies

PJ Pavithra J Syncfusion Team April 6, 2009 02:00 PM UTC

Hi Dale,

Thanks for your interest in Syncfusion products.

Your requirement of having same Symbol in Adornment and Legends can be achieved by writing SymbolTemplate and ItemTemplate respectively.

For your reference we have created a sample and you could download from the below given link,

Legend and Annotation Template

Please let us know if you have further queries.

Regards,
Pavithra.J



DH Dale Haessel April 6, 2009 06:40 PM UTC

How do I set each element in the legend to a different marker?

Legend.ItemSource={"StaticResource Circle"}
sets all lines to a circle in the legend. Your example bound all legend icons to the same marker. I would like to have each legend icon have a different template rather than all having the same template.



DH Dale Haessel April 6, 2009 06:53 PM UTC

How do I set each element in the legend to a different marker?

Legend.ItemSource={"StaticResource Circle"} => I want to define each line to have a different symbol rather than all legends. sets all lines to a circle in the legend. Your example bound all legend icons to the same marker. I would like to have each legend icon have a different template rather than all having the same template.

Here is some source code from Component One in xaml file => they have symbols on a data series and when symbol is set, it automatically appears in the legend => this is better than the adorners in syncfusion as far as I can tell:












PJ Pavithra J Syncfusion Team April 7, 2009 08:42 AM UTC

Hi Dale,

Thanks for your interest in Syncfusion products.

Your requirement of having different symbols in legends can be achieved with the help of converter logic.

For your reference we have created a sample and you could download from the below link,

Legend with different Icon sample

Please let us know if you have further queries.

Regards,
Pavithra.J



SP Sai Phaneendra Poludasu April 9, 2020 11:19 AM UTC

Unable to download the sample. Can I get a new link to download the sample.


HM Hemalatha Marikumar Syncfusion Team April 13, 2020 09:36 AM UTC

Hi Sai Phaneendra Poludasu, 
 
Currently we are checking this with corresponding team and let you know on April 14,2020. 
 
Regards, 
Hemalatha M. 



SJ Suyamburaja Jayakumar Syncfusion Team April 14, 2020 07:34 AM UTC

Hi Sai Phaneendra Poludasu, 
 
Instead of broken sample link, please refer below sample link. 
 
Please let us know if you need any further assistance on this. 
 
Regards, 
Suyamburaja J. 
 


Loader.
Live Chat Icon For mobile
Up arrow icon