Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
445
Hiding Series by binding to Visibility
posted

I have a group of series on a XamDataChart and I am binding the visibility of each to checkboxes elsewhere in my window, using a converter from bool->visibility

 

The series visibility is updated as expected, and the series does disappear as expected, however, the Chart doesn't update it's layout, so if i have a series with a Y range of say 100-200, and another with a 0-100 range, and change the visibility of one, my Y range is still stuck from 0-200

 

I also tried using a multi-binding on the Datacontext of the series, so that the Datacontext is nothing when the visibility is collapsed, which works the same as the above...i'd like for it to update the range when a series isn't visible, and that doesn't seem to be working

 

On a side note, there may be a memory leak in here somewhere, because I was adding and removing large numbers of series, and they never got released, so I changed it to only add series as needed and never remove them