[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Bar chart, asp.net

Posted on 2014-07-10
4
Medium Priority
?
394 Views
Last Modified: 2014-07-11
Working in vs 2010, I have a gridview displaying:

Mon     Val
Jan     12
Feb     14
Mar     16
Apr     9
May     11
Jun     16
Jul     18
Aug     12
Sep     14
Oct     11
Nov     13
Dec     10

Open in new window


Question: How can I make a bar-chart from this data?

Thank you.
0
Comment
Question by:Mike Eghtebas
  • 2
  • 2
4 Comments
 
LVL 21

Accepted Solution

by:
Randy Poole earned 2000 total points
ID: 40189447
On your toolbar select Data and add a chart to your project then bind it..
0
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 40189567
I followed the example in this video:

https://www.youtube.com/watch?v=KOV3Z0PaMVs

I guess, the video is suing a later version of visual studio and in the following code I run into a problem:

using (SqlDataSource1 dc = new SqlDataSource1())
            {
                var v = dc.SqlDataSource1.Tolist();

                GridView1.DataSource = v;
                GridView1.DataBind();

                Chart1.DataSource = v;
                Chart1.DataBind();

Open in new window


In vs to generate data source (the video calls it data entity), I dragged and dropped the data table to create a grid-view as well as a data-set (datasource?).

I am stuck here. Do you see a way to make this compatible with vs 2010?

Thank you,

Mike
vsData.png
0
 
LVL 21

Expert Comment

by:Randy Poole
ID: 40190409
I can take a look at it when I get home this evening where I have VS2010, but they still use VS 2008 here at the client I am at today :(
0
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 40191455
SqlDataSource1 was not built properly. Now it is fixed.

Thanks you,

Mike
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question