Mick Posted April 12, 2010 Report Share Posted April 12, 2010 How do I change the visibility of the axis "tick lines" that go through the background of the chart? I've tried the following: Chart myChart = new Chart(); // None of these remove the vertical lines myChart.AxisX.Line.Visibility = Visibility.Collapsed; myChart.AxisX.Line.Stroke = Brushes.Transparent; myChart.AxisX.Line.StrokeThickness = 0; Here is a picture of part of what I want: I want to collapse the vertical lines (Chart 1), and to keep the labels along the bottom (Chart 2). How do I do this? Thank you, Mick Quote Link to comment Share on other sites More sharing options...
Mick Posted April 12, 2010 Author Report Share Posted April 12, 2010 JuanZ, Thank you for your reply. Yes, the following code worked: myChart.AxisX.Grids.Major.Visibility = Visibility.Collapsed. I don't know why, but your response that came to my email leads me to an "post not found" page. Mick Quote Link to comment Share on other sites More sharing options...
juanZ Posted April 12, 2010 Report Share Posted April 12, 2010 Hi Mick, Yes, I removed the post since I put the wrong snippet: the correct one is chart1.AxisY.Grids.Major.Visibility = Visibility.Collapsed; this because I set the strokeThickness instead. I was about to repost it, but it seems that the other snippet all ready helped. Well im glad your code is now working. If you need further assistance, just let us know. Im always glad to help. 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.