Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

asp ajaxtoolkit barchart not filling

Posted on 2013-06-21
3
Medium Priority
?
1,653 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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

604 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