Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Bind Database to Silverlight 4 Chart

Posted on 2011-02-21
6
Medium Priority
?
1,226 Views
Last Modified: 2012-05-11
How do I Bind a Database to my Silverlight 4 Chart with VB
0
Comment
Question by:dpdmembers
[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
  • 3
  • 3
6 Comments
 
LVL 25

Expert Comment

by:apeter
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.
0
 

Author Comment

by:dpdmembers
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.
0
 
LVL 25

Expert Comment

by:apeter
ID: 34972132
can we your xaml code and binding code?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:dpdmembers
ID: 34972356
XAML Code

<UserControl x:Class="SilverlightWithWCFService.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="650" d:DesignWidth="525" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/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:Chart.Series>
                <toolkit:ColumnSeries x:Name="ColumnSeries1" Title="Index"  
                                  IndependentValueBinding="{Binding Observation}"
                                  DependentValueBinding="{Binding LEI_Index}"
                                   ItemsSource="{Binding}"   />
                         
            </toolkit:Chart.Series>
        </toolkit:Chart>
    </Grid>
</UserControl>

Behind Code

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

0
 
LVL 25

Accepted Solution

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

Author Closing Comment

by:dpdmembers
ID: 35006553
Examples would be nice
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

715 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