Would like to remove some of my series from displaying in the legend.
Have set LegendItemVisibility to Collapsed, with no effect.
Then tried to bind it to a property, can not change the value appears to be read-only
Any ideas
Hi,
Thank you for your feedback. I am glad that everything works as expected now. On my side everything is working as expected with both VS2010 and VS2012 and I am not completely sure what had caused this on your side. Usually, cleaning the project and rebuilding it helps, and it is updated with recent code changes.
Tried your code suggestion, which still did not work. had no effect at all.
so I figured something else was wrong, so I cut the control completely out. and repasted back in in pieces, rerunning each time.
Added the original code all back in with no alterations, and it works.
Go figure!? Looks like VS2012 gets a bit confused, or Infragistics design time elements?
Don't understand enough about VS and Xaml to consider why this could happen. have noticed some discrepancies with converters not being recognised until after compile.
Thanks for the reply
Hello David,
Thank you for posting!
I have been looking into your scenario and created a sample project based on the description. On my side, setting the LegendItemVisibility to Collapsed for some of the series restrict them from showing in the legend.
Another approach that could be used here is creating a template for legend items and using a converter. In the attached project the converter “SeriesToVisibilityConverter” returns Visibility.Collapsed if Series Title is “Series 1” and if LegendItemVisibility property of the series is not set only “Series 1” would be visible.
I hope this helps. If you have any questions, please feel free to let me know.