Hello,
We are looking at a functionality where in users should be able to hide/un-hide a series from XamWebChart by clicking on the legend Items.
In LegenItem Click event, we are using the following code to make a series invisible on the chart.
LineChart.Series[i].Visibility = Visibility.Collapse.
The Visibility Property is changing but the Series still exists on the chart.
Please suggest. whats going wrong here.
What you are attempting doesn't work because the series is just a template, and doesn't represent the actual visual controls that get created to render the chart. So, at the moment, setting visibility to collapsed for a series object does not have the effect you are after. Would removing the series from the chart be an option? Or temporarily removing its data points? If you remove the series as the result of a click on the legend, you may need to manually set up the legend so that series' legend item isnt removed when it is clicked also.
If you would like more properties to be meaningfully propagated from the series template to the actual chart visuals that get created (like visibility), you can submit a feature request: http://devcenter.infragistics.com/protected/requestfeature.aspx
In the meantime we should be able to come up with something else that will work for you.
-Graham