I have a XamDataChart in a ContentPane and a Legend in another ContentPane. When the chart is visible (and on startup) the LegendItems show, when the chart is not visible they do not show. I have a LegendItemTemplate to override the Series.Visibility binding but I am unable to make the LegendItems visible when the chart is not.
I used Snoop to identify that while the Visibility property on the ContentControl of each LegendItem is set to Visible the IsVisible readonly property is set to false. The Legend is still visible but the LegendItems are not.
This is a screenshot of Snoop on the ContentControl that hides the LegendItem. All of the "(ContentControl) 9" objects represent a LegendItem.
A bigger issue may be that the LegendItem bindings are being wiped out (all of the yellow rows on the right indicate a changed property of the LegendItem's ContentControl when the chart is no longer visible).
Hi firebourne,
Sorry for the delayed response.
I was looking into this and I found that when the application initially starts up, the Legend has items from each chart, even ones that are not currently visible but once the user clicks on one of the tabbed content panes, it removes the legend items from non visible charts. I believe this is because the ContentPane that was just hidden is no longer part of the visual tree so the items are removed from the Legend as a result.
With regards to having a single legend item for multiple charts, the legend item is added based on the series in the chart, not the underlying data. And since charts can't share series objects, each chart needs to have it's own axis and series, there's going to be an entry in the legend for each series.
I've logged these both as new product ideas for the Legend and sent them directly to our product management team. Our product team chooses new product ideas for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested features, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your feature is chosen for development, you will be notified at that time. Your reference number for these product ideas are PI13020114 and PI13020115. PI13020114 is for showing legend items even when the chart is hidden and PI13020115 is for using a single legend with multiple charts without duplicating legend items.
If you would like to follow up on your product idea at a later point, you may contact Developer Support management via email. Please include the reference number of your product idea in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com