gpt4 book ai didi

c# - 更改图表控件轴颜色?

转载 作者:行者123 更新时间:2023-12-03 23:32:00 25 4
gpt4 key购买 nike

请看这个:

enter image description here

我可以修改 Axis 的默认黑色吗?我已经搜索过这个并更改了几个属性,但它仍然是黑色的。

最佳答案

您尝试过吗,Chart 将是您创建的图表对象

//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;

关于c# - 更改图表控件轴颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22386260/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com