Vb.net 错误栏未显示mschart中的所有值

Vb.net 错误栏未显示mschart中的所有值,vb.net,mschart,Vb.net,Mschart,我正在使用VB.NET和mschart。我正在使用ErroBar chartype,但我无法标记所有值(中、高和低)。当我设置chart.Series(“ErrorBar”).IsValueShownAsLabel=True时,只显示上限值。 我想显示中间值、上限值和下限值 提前感谢我采用的解决方案是一种更简单的使用注释的解决方案,如下面的代码所示 Dim Media1 As New RectangleAnnotation() Media1.BackColor = Color.

我正在使用VB.NET和mschart。我正在使用ErroBar chartype,但我无法标记所有值(中、高和低)。当我设置chart.Series(“ErrorBar”).IsValueShownAsLabel=True时,只显示上限值。

我想显示中间值、上限值和下限值


提前感谢

我采用的解决方案是一种更简单的使用注释的解决方案,如下面的代码所示

    Dim Media1 As New RectangleAnnotation()
    Media1.BackColor = Color.Yellow
    Media1.Text = FormatNumber(D20, 4)
    Dim point As PointF = New PointF(chart.ChartAreas(0).AxisX.ValueToPosition(1), chart.ChartAreas(0).AxisY.ValueToPosition(D20))
    Media1.AnchorX = point.X + 10
    Media1.AnchorY = point.Y + 2
    Media1.AllowMoving = True

    Dim L1 As New RectangleAnnotation()
    L1.BackColor = Color.Yellow
    L1.Text = FormatNumber(D20 - result * My.Settings("IncertezaDensidade20") / 2, 4)
    point = New PointF(chart.ChartAreas(0).AxisX.ValueToPosition(1), chart.ChartAreas(0).AxisY.ValueToPosition(D20 - result * My.Settings("IncertezaDensidade20") / 2))
    L1.AnchorX = point.X
    L1.AnchorY = point.Y + 10
    L1.AllowMoving = True

    Dim L2 As New RectangleAnnotation()
    L2.BackColor = Color.Yellow
    L2.Text = FormatNumber(D20 + result * My.Settings("IncertezaDensidade20") / 2, 4)
    point = New PointF(chart.ChartAreas(0).AxisX.ValueToPosition(1), chart.ChartAreas(0).AxisY.ValueToPosition(D20 + result * My.Settings("IncertezaDensidade20") / 2))
    L2.AnchorX = point.X
    L2.AnchorY = point.Y - 5
    L2.AllowMoving = True
下面是现在的图表


看看这个可能会有帮助,谢谢Wojciech Wojtulewski的快速回复!找到你给我的一个非常有用的参考资料,但是我发现代码对于我想要的东西来说有点复杂,所以我决定使用注释编写一个简单的解决方案。