-
February 13th, 2025, 04:33 PM
#1
[RESOLVED] MSChart need to remove the Y Axis Tick Marks
I have a MSChart Control that displays as follows:
MSChart.jpg
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?
Last edited by tim8w123; February 13th, 2025 at 04:41 PM.
-
February 13th, 2025, 04:45 PM
#2
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;
-
February 17th, 2025, 01:54 AM
#3
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.
-
March 1st, 2025, 12:18 AM
#4
Re: [RESOLVED] MSChart need to remove the Y Axis Tick Marks
 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.**
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|