本文介绍了Visual Studio 2010图表控件 - 线颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何更改水平线和垂直线的颜色?我想让他们更轻一点,但让X和Y轴黑色,可能。
已编辑:
indyfromoz建议在这里:
我想要的效果是:
(Subtler水平线和垂直线,甚至可能没有垂直线。)
解决方案
Chart1.ChartAreas(0).AxisY.MajorGrid.LineColor = Color.FromArgb(& H50,& H9C, & H9A,& H95)
Chart1.ChartAreas(0).AxisX.MajorGrid.LineColor = Color.FromArgb(& H50,& H9C,& H9A,& H95)
C#
Chart1.ChartAreas [0] .AxisX.MajorGrid.LineColor = Color.FromArgb(50,200,200,200);
Chart1.ChartAreas [0] .AxisY.MajorGrid.LineColor = Color.FromArgb(50,200,200,200);
How do I change the color of the horizonal and vertical lines? I'd like to make them a little lighter, yet leave the X and Y axis black, probably.
Edited:
indyfromoz suggestion resulted in this:
The effect I want is this:
(Subtler horiz and vertical lines, maybe even no vertical lines.)
解决方案VB
Chart1.ChartAreas(0).AxisY.MajorGrid.LineColor = Color.FromArgb(&H50, &H9C, &H9A, &H95) Chart1.ChartAreas(0).AxisX.MajorGrid.LineColor = Color.FromArgb(&H50, &H9C, &H9A, &H95)
C#
Chart1.ChartAreas[0].AxisX.MajorGrid.LineColor = Color.FromArgb(50, 200, 200, 200); Chart1.ChartAreas[0].AxisY.MajorGrid.LineColor = Color.FromArgb(50, 200, 200, 200);
这篇关于Visual Studio 2010图表控件 - 线颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!