0

I am developing a web application and now I am trying to develop a dashboard using ASP.NET charts. I am trying now to develop a chart that shows the number of users who uses the system. I have a table in my database that keeps the username of the users who uses the system. I dragged the chart from the toolbox to my web application as shown below.

    <asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSource1">
                <series>
                    <asp:Series Name="Series1">
                    </asp:Series>
                </series>
                <chartareas>
                    <asp:ChartArea Name="ChartArea1">
                    </asp:ChartArea>
                </chartareas>
            </asp:Chart>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:testConnectionString %>" SelectCommand="SELECT COUNT(DISTINCT Username) AS NumberOfUsers FROM  dbo.UserQuiz">
</asp:SqlDataSource>

I debbugged the file and I did not get any error but the browser does not show any chart in the website and I don't know why.

I am using Visual Studio 2010 and .NET Framework 4.0

ashutosh raina
  • 9,228
  • 12
  • 44
  • 80
user976711
  • 115
  • 5
  • 16

1 Answers1

0

This site has some videos about it that you can look through and get the idea. It is difficult to say why it is not working. Do you have data in the database? Do you have the correct connection string. Have you tried to connect a datagrid with this datasource etc.

Daniel Casserly
  • 3,552
  • 2
  • 29
  • 60