Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/340.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何沿MS图表X轴和Y轴设置水平和垂直航向?_C#_.net_Window_Bar Chart_Mschart - Fatal编程技术网

C# 如何沿MS图表X轴和Y轴设置水平和垂直航向?

C# 如何沿MS图表X轴和Y轴设置水平和垂直航向?,c#,.net,window,bar-chart,mschart,C#,.net,Window,Bar Chart,Mschart,我正在c#.Net-windows应用程序中处理图表控件,它很容易使用,但很难自定义,或者格式化有点繁琐 我已经完成了图表,但我想显示水平和垂直箭头线以及其中的一些文本,我正在发布一个图像,例如: 请让我知道图表控件是否对此具有某些属性。非常感谢。终于找到了表达这一点的方法: chart1.ChartAreas["ChartArea1"].AxisX.Title = "Test Number sorted by Date"; chart1.ChartAreas["ChartArea1"].

我正在c#.Net-windows应用程序中处理图表控件,它很容易使用,但很难自定义,或者格式化有点繁琐

我已经完成了图表,但我想显示水平和垂直箭头线以及其中的一些文本,我正在发布一个图像,例如:


请让我知道图表控件是否对此具有某些属性。非常感谢。

终于找到了表达这一点的方法:

 chart1.ChartAreas["ChartArea1"].AxisX.Title = "Test Number sorted by Date";
 chart1.ChartAreas["ChartArea1"].AxisX.TitleFont = new Font("Sans Serif", 10, FontStyle.Bold);
 chart1.ChartAreas["ChartArea1"].AxisY.Title = "Percentage Obtained";
 chart1.ChartAreas["ChartArea1"].AxisY.TitleFont = new Font("Sans Serif", 10, FontStyle.Bold);
现在,图表如下所示:

即使下面的代码也有效。请查看此代码