Click here to Skip to main content
15,891,765 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello !

I am currently on a project in VB.NET and I would like to know how to make a graph passing through a combo box that takes data from a datagridview.



VB
Me.FlowByBankTableAdapter.Fill(Me.Données_ProjetDataSet.FlowByBank)
       Chart3.Series(0).ChartType = DataVisualization.Charting.SeriesChartType.StackedColumn
       Chart3.Series(0).Points.Clear()

      If ComboBox1.SelectedText Then
           For Count As Integer = 0 To DataGridView1.Rows.Count - 1
            Chart3.Series(0).ChartType = System.Enum.Parse(GetType(System.Windows.Forms.DataVisualization.Charting.SeriesChartType), ComboBox1.SelectedValue.ToString)

           Next
       End If
Posted
Updated 18-Jun-15 21:25pm
v2
Comments
Ralf Meier 19-Jun-15 0:24am    
And now you would like to read the values from the DGV ?
If Yes - iterate through the rows of the DGV and add the value of the needed column(s) as Points into the Chart ...
d1ddle 29-Apr-21 15:11pm    
Me Too.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900