VB.Net图表点标签不显示

时间:2016-04-01 17:53:30

标签: vb.net charts labels

我尝试使用Chart控件向VB.Net中的某个点添加标签。这是我的代码:

                chartMain.Series(1).Points.AddXY(x, y)
                chartMain.Series(1).Points(chartMain.Series(1).Points.Count - 1).Label = Math.Round(x, 2) & "nm, " & Math.Round(y, 2) & "%"

但是没有显示标签。在另一个程序中,我做了同样的事情,它完美地工作。我有什么遗失或可能在其他地方无意中被禁用了吗?

2 个答案:

答案 0 :(得分:0)

尝试:

ChartMain.Series(1).Points.AddXY(Math.Round(x, 2) & "nm, " & Math.Round(y, 2) & "%", y)

答案 1 :(得分:0)

已修复 -

数据点类型"快速点"似乎不会显示标签。改为" Point"工作