Solved

asp ajaxtoolkit barchart not filling

Posted on 2013-06-21
3
1,580 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
FTP recursive download files 5 27
MessageBox Appear behind a form in Runtime 1 30
Why am I losing my session variable value 11 39
Need Help With GDI+ in VB.Net 8 39
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net 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…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

732 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