Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/268.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# 添加XY点在图表中,Y点显示但未标记_C#_Graph_Mschart - Fatal编程技术网

C# 添加XY点在图表中,Y点显示但未标记

C# 添加XY点在图表中,Y点显示但未标记,c#,graph,mschart,C#,Graph,Mschart,我想显示一个带有Y轴指定值的图形,但是在运行程序后,它会显示一些序列,如20、40、60等 例如,即使y值为30,它也会绘制它,但y上没有标签 这是密码 this.chart1.ChartAreas[0].AxisY.Title = "Time (MS)"; this.chart1.ChartAreas[0].AxisX.Title = "Algorithm Used"; this.chart1.Series["SURF"].Points.AddXY(1, SURFT/1000); this.c

我想显示一个带有Y轴指定值的图形,但是在运行程序后,它会显示一些序列,如20、40、60等

例如,即使y值为30,它也会绘制它,但y上没有标签

这是密码

this.chart1.ChartAreas[0].AxisY.Title = "Time (MS)";
this.chart1.ChartAreas[0].AxisX.Title = "Algorithm Used";
this.chart1.Series["SURF"].Points.AddXY(1, SURFT/1000);
this.chart1.Series["SURF Sensor"].Points.AddXY(1, SURFSensorT / 1000);
this.chart1.Series["SIFT"].Points.AddXY(2, SIFT/1000);
this.chart1.Series["SIFT Sensor"].Points.AddXY(2, SIFTSensorT / 1000);
this.chart1.Series["BRISK"].Points.AddXY(3, BRISKT/1000);
this.chart1.Series["BRISK Sensor"].Points.AddXY(3, BRISKSensorT/1000);

这很正常;如果所有y值都在y轴上标记,则对杂波进行成像。但是,您可以打开数据点标签。。还可以控制标签的间隔。或者您可以用customlabels替换它们。感谢您的重播,这里有一些不错的技巧,特别是带有cutomlabels的技巧,但是我需要将它们显示在Y轴上,而不是每个栏的顶部。customlabels沿任一轴显示。请注意,它们很复杂,因为它们位于两个值之间的中心