My issues is that I've changed the size of the marker on one of my series to make it much smaller than the default size. However, the legend shows the marker at it's fill size, so the legend doesn't look like the line. The attached image shows the issue the Cost Basis should have a very small marker.
I want to customize the way the badge shows in the xamDataChart legend. According to the following link, it looks like I need to create a LegentItemBadgeTemplate.
https://es.infragistics.com/help/wpf/designers-guide-styling-points-for-xamdatachart
Where can I get a sample template that I can use to figure out how to do this. If anyone has any better ways of doing it, please let me know.
Hello Bob,
To get the desire behavior ,on the series you can set LegendItemBadgeMode property to LegendItemBadgeMode.MatchSeries enum.
Let me know if this help.
Thanks for your reply. I set that property as you suggested for both series in the graph but it make no difference to the look. I had a modified template for the legend and legend items, so I removed that but it still didn't make any difference.
I've created a small demo that demonstrates the issue. I'm using the latest version.
TestWPFApp.zip
Hello Bob ,
Thank you for sharing the sample for good start. So yes you are right LegendItemBadgeMode dosent respect the marker size, i discussed the mater with the developer and find its expected for now.
Si after little reserch i find instead of useing LegendItemBadgeMode you can sets MarkerTemplate and LegendItemBadgeTemplate to match the marker type.
Here i attached the sample for your reference. Please include your dll/packages to run my sample.
Regards
DC_MarkersTemplate.zip
I did notice that the default line in the legend no longer shows the badge (only the line shows) in the legend. This is not an issue for me now, but should I decide additional series with different markers, it would be nice to know how to fix that. Thanks
Hello,
Yes you are right last legend is just showing the line ,and that is the series with default marker and legend badge, this is how control is designed.
I'm not fully understanding your answer. If I create a basic chart without any of the templates in your response the default legend shows both a line and marker. I'm trying to figure out how to get the line and marker to show when using your sample code - I'd like to add some additional series with different marker types and I'd like both the line and marker to show in the legend. I've attached a sample showing how the basic default legend shows both line and marker. Thanks again.
EDIT: I figured it out: I had to add
LegendItemBadgeMode="MatchSeries"
to the series. Simple when you know how! Thanks again.
TestWPFAppPlainGraph.zip