This question is locked. New answers and comments are not allowed.
I am trying to produce a stacked bar chart but without any X axis labels. At the moment I am getting a number for each stacked chart (0, 1 etc) and don't want these to appear. If I set AxisX.MajorGriidLinesVisibility = Visibility.Collapsed this achieves what I want on the X-axis but messes up the Y axis!
I have set AxisY.Minimum =0; and AxisY.Maximum = 4000; and these work fine when AxisX.MajorGridLinesVisibility isn't set to Collapsed. But if I set XAxis.MajorGridLinesVisibility to Collapsed the Y axis scale changes so that it ignores the values I've set and goes from 500 to 4500! I don't see why changing the X axis tick marks should have any effect on the label values I've set for the Y axis?!
The documentation talks about the labels being formatted by the DefaultFormat property and indeed this can be used to eg change the "0" label to "£0.0" but it doesn't tell me how I can just turn off the labels completely.
After some experimentation setting AxisX.Visibility to Visibility.Collapsed almost achieves what I want but I would prefer to just use the MajorGridLinesVisibility setting which produces a slightly tidier main X axis line (ie a line without tick marks and labels cf no line at all)
Is there an easy way to keep the X-axis line, but hide the labels and tick marks without impacting the settings I've made for the Y axis?
Thanks.
Ian
I have set AxisY.Minimum =0; and AxisY.Maximum = 4000; and these work fine when AxisX.MajorGridLinesVisibility isn't set to Collapsed. But if I set XAxis.MajorGridLinesVisibility to Collapsed the Y axis scale changes so that it ignores the values I've set and goes from 500 to 4500! I don't see why changing the X axis tick marks should have any effect on the label values I've set for the Y axis?!
The documentation talks about the labels being formatted by the DefaultFormat property and indeed this can be used to eg change the "0" label to "£0.0" but it doesn't tell me how I can just turn off the labels completely.
After some experimentation setting AxisX.Visibility to Visibility.Collapsed almost achieves what I want but I would prefer to just use the MajorGridLinesVisibility setting which produces a slightly tidier main X axis line (ie a line without tick marks and labels cf no line at all)
Is there an easy way to keep the X-axis line, but hide the labels and tick marks without impacting the settings I've made for the Y axis?
Thanks.
Ian