Bar Chart connect to SQL server

jpergega

New member
Joined
Feb 12, 2015
Messages
3
Programming Experience
Beginner
Hi,

I am trying to use the bar chart to display a column from my database but after I run the program only the legends appeared. I have two records stored in the database and exactly 2 legends appeared.

here is my code:

C#:
 objConnect.Sql = Properties.Settings.Default.SQL2;


            DataView source = new DataView(ds.Tables[0]);


            chart1.DataSource = source;
            // set series members names for the X and Y values 


             chart1.Series[0].YValueMembers = "progress";
 
            // Populate the chart with data from the data source


            chart1.DataBind();

Thanks
 
Back
Top Bottom