如何创建显示两个特定值的圆环图?

时间:2017-01-17 05:48:59

标签: vb.net

我正在尝试在圆环图中显示两个特定值。这两个值来自另一种形式(因为它们在那里被评估)。这是第一部分的代码。

Private Sub CoursesRemainingChartToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CoursesRemainingChartToolStripMenuItem.Click

    Dim frmCharts As New Charts

    frmCharts.CompletedCoursesPass = CompletedCourses
    frmCharts.IncompleteCoursesPass = IncompleteCourses
    frmCharts.Show()

End Sub

传递此值后,将打开显示图表的新表单。

Public Class Charts

Public Property CompletedCoursesPass As Integer
Public Property IncompleteCoursesPass As Integer

Private Sub Charts_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    Chart1.Series("CompletedCourses").Points.AddXY("Completed Courses", CompletedCoursesPass)
    Chart1.Series("IncompleteCourses").Points.AddXY("Incomplete Courses", IncompleteCoursesPass)

End Sub
End Class

如何正确显示(和编码)这些结果?我正在编程这部分工作。有没有在VB.Net中使用圆环图的代码示例?

0 个答案:

没有答案