Bind Database to Silverlight 4 Chart

Posted on 2011-02-21
Last Modified: 2012-05-11
How do I Bind a Database to my Silverlight 4 Chart with VB
Question by:dpdmembers
  • 3
  • 3
LVL 25

Expert Comment

ID: 34957233
Silverlight doesn't support any database providers. You need to get the data using a web service or wcf service. This data willbe put in a data model and will be binded to silverlight chart control.

Author Comment

ID: 34963339
I have created the service but I need help with the binding to the chart.  I can bind it to a datagrid but not a chart.
LVL 25

Expert Comment

ID: 34972132
can we your xaml code and binding code?
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.


Author Comment

ID: 34972356

<UserControl x:Class="SilverlightWithWCFService.MainPage"
    d:DesignHeight="650" d:DesignWidth="525" xmlns:sdk="" xmlns:toolkit="">

    <Grid x:Name="LayoutRoot" Background="White" Height="650" Width="847">
           <toolkit:Chart  HorizontalAlignment="Left" Margin="27,432,0,0" Name="Chart1" Title="LEI Index" VerticalAlignment="Top" Height="206" Width="452">
                <toolkit:ColumnSeries x:Name="ColumnSeries1" Title="Index"  
                                  IndependentValueBinding="{Binding Observation}"
                                  DependentValueBinding="{Binding LEI_Index}"
                                   ItemsSource="{Binding}"   />

Behind Code

 Private Sub client_LEIListCompleted(ByVal sender As Object, ByVal e As LEIListCompletedEventArgs)
          ColumnSeries1.ItemsSource = e.Result
    End Sub

LVL 25

Accepted Solution

apeter earned 500 total points
ID: 34985780
e.Result has a property Observation and LEI_Index? Try binding the itemsource or datacontext of toolkit:chart control.

Author Closing Comment

ID: 35006553
Examples would be nice

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Title # Comments Views Activity
Javascript to set controls visibility 5 48
Reading the Web.Config using IIS 7.5? 4 47
Deploying to Azure 3 38
ASP.NET MVC -Add authentication 2 29
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
User art_snob ( encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

765 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