I only want tick marks to show for the x- axis label. I believe this is called the major tick marks. The major tick marks is the only tick mark I want to show. However I can not get this result.
I have tried
plotArea.XAxes.DefaultIndexedAxis.MinorTickMarks = null;
Yet the minor tick marks still shows
When I use
plotArea.XAxes.DefaultIndexedAxis.MajorTickMarks = null; no tick marks show at all. I mean even the label tick mark does not show. However I
want the label tick mark to show.
Please how can I achieve this. I only have 5 labels and I only want tick marks for the 5 labels.
Below is my code for the x-axis lables
Chart chart = new Chart(0, 0, 500, 400);
PlotArea plotArea = chart.PrimaryPlotArea;
IndexedStackedLineSeries lineSeries = new IndexedStackedLineSeries();
IndexedStackedLineSeriesElement seriesElement1 = new IndexedStackedLineSeriesElement(array1);
seriesElement1.Values.Add((array1Array);
lineSeries.Add(seriesElement1);
plotArea.XAxes.DefaultIndexedAxis.MinorTickMarks = null;
lineSeries.XAxis.Labels.AutoLabels = false;
lineSeries.XAxis.Labels.Add(new IndexedXAxisLabel(firstDataPointTime, 0));
lineSeries.XAxis.Labels.Add(new IndexedXAxisLabel(secDataPointTime, 1));
lineSeries.XAxis.Labels.Add(new IndexedXAxisLabel(thrdDataPointTime, 2));
lineSeries.XAxis.Labels.Add(new IndexedXAxisLabel(frthDataPointTime,3));
lineSeries.XAxis.Labels.Add(new IndexedXAxisLabel(fifthDataPointTime,4));
plotArea.Series.Add(lineSeries);