Solved

asp ajaxtoolkit barchart not filling

Posted on 2013-06-21
3
1,597 Views
Last Modified: 2013-06-27
I am trying to get a bar chart to load from a database.  i need to create the side chart whihc shows the total number of personnel to check in.  then I need to create 3 columns, one for those checked in, checkout and no shows.  I found an article that showed how to do it but not working for me.  it shows no data, but I am putting in a label and they data comes through but does not populate barchart.

 <td>
       <asp:BarChart ID="ChrtInOut" runat="server" ChartHeight="200" ChartWidth="260" ChartType="Column" Visible="false"></asp:BarChart>
</td>

 Private Sub FILLChart()
        sql = "Exec sp_SRPAttendance " & ddlSrpEvent.SelectedValue & ", " & ddlSRPDay.SelectedValue
     
        myDataTable = New DataTable
        myDataTable = getReader(sql)

        lbltest.Text = "Sched = " & myDataTable.Rows(0)(0) & " CheckIn = " & myDataTable.Rows(0)(1) & " No Show = " & myDataTable.Rows(0)(2) & " Completed = " & myDataTable.Rows(0)(3)

        Dim y As Decimal() = New Decimal(Convert.ToInt32(myDataTable.Rows(0)(0))) {}

        ChrtInOut.Series.Add(New AjaxControlToolkit.BarChartSeries() With {.Data = y})
        ChrtInOut.CategoriesAxis = String.Join(",", "Sched")
        ChrtInOut.ChartTitle = "SRP Scheduled"
        ChrtInOut.DataBind()
    End Sub

Open in new window

0
Comment
Question by:kdeutsch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 23

Expert Comment

by:Roopesh Reddy
ID: 39267442
Hi,

Here is the Bar Chart filling from database example - http://www.aspsnippets.com/Articles/ASPNet-AJAX-Bar-Chart-Control-Populate-from-Database-example.aspx

Cross check what's going wrong!

Hope it helps u...
0
 

Author Comment

by:kdeutsch
ID: 39271462
Hi,

I already tried this site and got errors as well with his example.  With that example it would not bind the y value, it would always show me 0 in the chart.
0
 
LVL 23

Accepted Solution

by:
Roopesh Reddy earned 500 total points
ID: 39272329
Hi,

Oops!!!

Similar question answered in ASP.NET Forums - http://forums.asp.net/t/1897279.aspx/1?Bar+Chart+Ajax+Toolkit

Unfortunately, i personally didn't work with Charts! Let me have a look at it mean while!

Hope it helps u...
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

688 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