Visual Basic.Net Graph Demo

Download
Download is available until [expire_date]
  • Version
  • Download 110
  • File Size 105.31 KB
  • File Count 1
  • Create Date April 5, 2016
  • Last Updated April 5, 2016

Visual Basic.Net Graph Demo

Visual Basic.Net Graph Demo

This is a source code that demonstrate how to use graph in vb.net using the chart control.
Line, Bar and Column graph is available in this source code.

Source code

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.Chart1.Series("Income").Points.AddXY("January", 500)
        Me.Chart1.Series("Income").Points.AddXY("February", 1500)
        Me.Chart1.Series("Income").Points.AddXY("March", 4500)
        Me.Chart1.Series("Income").Points.AddXY("April", 800)
        Me.Chart1.Series("Income").Points.AddXY("May", 1200)
        Me.Chart1.Series("Income").Points.AddXY("June", 900)
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Chart1.Series("Income").ChartType = DataVisualization.Charting.SeriesChartType.Line
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Chart1.Series("Income").ChartType = DataVisualization.Charting.SeriesChartType.Column
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Chart1.Series("Income").ChartType = DataVisualization.Charting.SeriesChartType.Bar
    End Sub
End Class
, , ,

Post navigation

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.