For I = 0 To Graph.PlotArea.XAxis.Items.Count - 1 Graph.PlotArea.XAxis.Item(I).Visible = False Next The X labels are visible
What is wrong ?
3 Answers, 1 is accepted
answered on 02 Oct 2008, 06:04 AM
The code seems to be correct. However it is important that it is executed after the X axis items are created. If the X axis AutoScale property is set to true (this is the default value) the items will not be available before BeforeLayout event. This means that the labels count in this loop will be 0. While you can move the code to BeforeLayout event handler and it will work, there is another simple solution for this problem: