KRO Posted May 13, 2011 Report Share Posted May 13, 2011 Hi I am trying to hide all the axes and the legendbox. With the following lines of code: foreach (var serie in testChart.Series){serie.AxisY.Visibility = System.Windows.Visibility.Collapsed;} testChart.LegendBox.Visibility = System.Windows.Visibility.Collapsed; I got a chart with multiple series and 3 Y-axis (1 near and 2 far). If i check all series, then the third y-axis leaves a gap. It looks like it doesn't collapse the title area. When i try to show the axis again, see the code line below: testChart.LegendBox.Visibility = System.Windows.Visibility.Visible; foreach (var serie in testChart.Series){ serie.AxisY.Visibility = serie.Visibility; } testChart.UpdateLayout(); It does not show the axis, only the label. How do i collapse all the axis with titles? How do i show all the series with axes, so that my checkbox legends still work? Regards, KRO Quote Link to comment Share on other sites More sharing options...
AndreG Posted June 7, 2011 Report Share Posted June 7, 2011 I can't reproduce, seems to be working for me. (attached) Quote Link to comment Share on other sites More sharing options...
KRO Posted June 21, 2011 Author Report Share Posted June 21, 2011 Hi I tried your example, and can't seem to reproduce it either. I must have something to do with our complex setup.We have a lot of logic creating axis and series dynamically. I will try to reproduce it in a simpler setup (if possible). /KRO Quote Link to comment Share on other sites More sharing options...
KRO Posted June 21, 2011 Author Report Share Posted June 21, 2011 Hi I finally managed to reproduce it.Try to hide a serie by clicking at it. And the use the buttons to hide/show all axis+legendbox. Look at the title at the axis. Eg. try to hide the first one, click the hide button, then show all. And watch axisY0. /KRO Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.