Bar chart,

Posted on 2014-07-10
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.
Question by:Mike Eghtebas
    LVL 21

    Accepted Solution

    On your toolbar select Data and add a chart to your project then bind it..
    LVL 33

    Author Comment

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

    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;
                    Chart1.DataSource = v;

    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,

    LVL 21

    Expert Comment

    by:Randy Poole
    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 :(
    LVL 33

    Author Comment

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

    Thanks you,


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now