سؤال

Please take a look at this:

enter image description here

Can i modify the default black color of the Axis ? I have searched for this and changed several properties but it is still black.

هل كانت مفيدة؟

المحلول

Have you tried this, Chart would be your chart object you have created

//0 would be indice of chart area you wish to Change, Color.ColorYouWant
Chart.ChartAreas[0].AxisX.LineColor = Color.Red;
Chart.ChartAreas[0].AxisY.LineColor = Color.Red;

//To change the Colors of the interlacing lines you access them like so
Chart.ChartAreas[0].AxisX.InterlacedColor = Color.Red;
Chart.ChartAreas[0].AxisY.InterlacedColor = Color.Red;

//If you are looking to change the color of the Grid Lines
Chart.ChartAreas[0].AxisX.MajorGrid.LineColor = Color.Red;
Chart.ChartAreas[0].AxisY.MajorGrid.LineColor = Color.Red;
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top