1 Attachment(s)
[RESOLVED] MSChart need to remove the Y Axis Tick Marks
I have a MSChart Control that displays as follows:
Attachment 36130
Code:
chartMRBDaily.ChartAreas[0].AxisY.MajorGrid.Enabled = false;
chartMRBDaily.ChartAreas[0].AxisY.MajorTickMark.Enabled = false;
chartMRBDaily.ChartAreas[0].AxisY.MinorGrid.Enabled = false;
chartMRBDaily.ChartAreas[0].AxisY.MinorTickMark.Enabled = false;
As you can see from the code above. I have have tried setting the AxisY MajorGrid and MinorGrids AND MajorTickMark and MinorTickMark to Enabled = false, but that seems to have no affect on the grid mess you see along the Y Axis. Is there some other variables that need to be set to remove all Grids from the Y Axis?
Re: MSChart need to remove the Y Axis Tick Marks
Figured it out. I also needed to include disabling the AxisY LabelStyle as follows:
Code:
chartMRBDaily.ChartAreas[0].AxisY.LabelStyle.Enabled = false;
Re: [RESOLVED] MSChart need to remove the Y Axis Tick Marks
Try setting the Interval of AxisY.MajorTickMark and AxisY.MinorTickMark to 0 to completely remove the tick marks. Also, disable LineWidth for AxisY to ensure no extra lines appear. Use the following code:
chartMRBDaily.ChartAreas[0].AxisY.MajorTickMark.Interval = 0;
chartMRBDaily.ChartAreas[0].AxisY.MinorTickMark.Interval = 0;
chartMRBDaily.ChartAreas[0].AxisY.LineWidth = 0;
This should remove all tick marks and any extra lines on the Y-axis.
Re: [RESOLVED] MSChart need to remove the Y Axis Tick Marks
Quote:
Originally Posted by
mohrceleste219
Try setting the Interval of AxisY.MajorTickMark and AxisY.MinorTickMark to 0 to completely remove the tick marks. Also, disable LineWidth for AxisY to ensure no extra lines appear. Use the following code:
chartMRBDaily.ChartAreas[0].AxisY.MajorTickMark.Interval = 0;
chartMRBDaily.ChartAreas[0].AxisY.MinorTickMark.Interval = 0;
chartMRBDaily.ChartAreas[0].AxisY.LineWidth = 0;
This should remove all tick marks and any extra lines on the Y-axis.
Have you tried this solution?
**Links removed by Site Administrator so it doesn't look like you're spamming us. Please don't post them again.**