none
Making pie and colomn charts RRS feed

  • Question

  • I need help making different charts with vb  2010. How can I make a pie chart? Any help would help. Are there any books out there that how tell me how to make and change any charts. Thank you.

    Scott

    Thursday, July 27, 2017 12:01 AM

All replies

  • I need help making different charts with vb  2010. How can I make a pie chart?

    Tutorial here:
    https://msdn.microsoft.com/en-us/library/dd489237.aspx

    Many examples here:
    https://msdn.microsoft.com/en-us/library/dd456753.aspx

    Thursday, July 27, 2017 12:14 AM
  • I need help making different charts with vb  2010. How can I make a pie chart? Any help would help. Are there any books out there that how tell me how to make and change any charts. Thank you.

    Scott

    Hi S.Sweitzer,

    Based on your description, I guess that you want to use chart in Pie chart Type or Column chart Type. If yes, you can click chart series property and choose pie or column chartType.

    Here is the simple way to use chart.

     Dim dt As New DataTable
            dt.Columns.Add("Id", GetType(Int32))
            dt.Columns.Add("MemberName", GetType(String))
            dt.Columns.Add("Momey", GetType(Double))
    
            dt.Rows.Add(1, "A", 10000)
            dt.Rows.Add(2, "B", 20000)
            dt.Rows.Add(3, "C", 30000)
    
            Chart1.DataSource = dt
            Chart1.Series("Series1").XValueMember = "MemberName"
            Chart1.Series("Series1").YValueMembers = "Momey"

    Best Regards,

    Cherry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, July 27, 2017 5:24 AM
    Moderator
  • Assuming you want to use the chart control, this samples environment is a Visual Studio application you open in VS and run. It is a large collection of examples with code of most of the chart control features.

    https://code.msdn.microsoft.com/Samples-Environments-for-b01e9c61

    You can also draw your own charts if that is desired. But the chart control is easier.

    Thursday, July 27, 2017 11:54 AM