Vb.net 将y值加载到图表后是否重命名?

Vb.net 将y值加载到图表后是否重命名?,vb.net,charts,Vb.net,Charts,这是我的第一个问题,所以我希望我的问题是正确的:) 我在更改y值时遇到问题。 目前他们的数字从1到14。 现在我想重命名这些值:例如,而不是 “1”->ID\u a,“2”->ID\u b等等 有人知道怎么做吗?我用] For Each row As DataRow In viewCIStateVerlauf2.Table.Rows Itemm = "ID" & row.Item("Item_ID") Select Case row.Item("State")

这是我的第一个问题,所以我希望我的问题是正确的:)

我在更改y值时遇到问题。 目前他们的数字从1到14。 现在我想重命名这些值:例如,而不是

“1”->ID\u a,“2”->ID\u b
等等

有人知道怎么做吗?我用
]

For Each row As DataRow In viewCIStateVerlauf2.Table.Rows
    Itemm = "ID" & row.Item("Item_ID")
    Select Case row.Item("State")
        Case "Change Completed                        "
            Series12.Points.AddXY(row.Item("Snapshot_Date"), row.Item("Nummer"))

        Case "Change Failed                           "
            Series11.Points.AddXY(row.Item("Snapshot_Date"), row.Item("Nummer"))
        Case "Change Tested"
            Series10.Points.AddXY(row.Item("Snapshot_Date"), row.Item("Nummer"))
        Case "Change Implemented                      "
            Series9.Points.AddXY(row.Item("Snapshot_Date"), row.Item("Nummer"))
        Case "Change Accepted                         "
            Series8.Points.AddXY(row.Item("Snapshot_Date"), row.Item("Nummer"))
        Case "Change Planned                          "
            Series7.Points.AddXY(row.Item("Snapshot_Date"), row.Item("Nummer"))
        Case "Change Rejected                         "
            Series6.Points.AddXY(row.Item("Snapshot_Date"), row.Item("Nummer"))
        Case "Change CCB_NOK                          "
            Series5.Points.AddXY(row.Item("Snapshot_Date"), row.Item("Nummer"))
        Case "Change CCB_OK                           "
            Series4.Points.AddXY(row.Item("Snapshot_Date"), row.Item("Nummer"))
        Case "Change Analyzed                         "
            Series3.Points.AddXY(row.Item("Snapshot_Date"), row.Item("Nummer"))
        Case "Change New                              "
            Series2.Points.AddXY(row.Item("Snapshot_Date"), row.Item("Nummer"))
    End Select
    Series1.Points.AddXY(Convert.ToDateTime(dateTo), row.Item("Nummer"))
Next

试试这样的事情:

Chart1.Series["Default"].Points[0].AxisLabel = "First Point";
Chart1.Series["Default"].Points[1].AxisLabel = "Second Point";
您可以在MSDN上了解更多信息: