Dim table As DataTable = New DataTable
        table.Columns.Clear()
        Chart1.DataSource = Nothing
        Chart1.Series.Clear()
        table.Columns.Add("Color", GetType(System.String))
        table.Columns.Add("Data", GetType(System.Int32))
        table.Rows.Add("Green", Integer.Parse(txtgreen.Text))
        table.Rows.Add("Red", Integer.Parse(txtred.Text))
        table.Rows.Add("Blue", Integer.Parse(txtblue.Text))
        table.Rows.Add("Yellow", Integer.Parse(txtyellow.Text))
        table.Rows.Add("Brown", Integer.Parse(txtnothing.Text))
        Dim IEtable = CType(table, System.ComponentModel.IListSource).GetList
        Chart1.DataBindTable(IEtable, "Color")    
        Chart1.DataBindTable(IEtable, "Data")

whats this??..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.