I am facing a problem in binding the values to the StackedColumnGraph of visiblox in WP7 dynamically.
the XAML code has hard coded values..
<UserControl.Resources>
<Style x:Key="NoBorder" TargetType="Border">
<Setter Property="BorderThickness" Value="0" />
<Setter Property="BorderBrush" Value="Black" />
</Style>
<local:PartyList x:Key="Labour" >
<local:ElectionResult Year="1997" VotesMillions="13.5" />
<local:ElectionResult Year="2001" VotesMillions="10.7" />
<local:ElectionResult Year="2005" VotesMillions="9.6" />
<local:ElectionResult Year="2010" VotesMillions="8.6"/>
</local:PartyList>
<local:PartyList x:Key="Conservatives">
<local:ElectionResult Year="1997" VotesMillions="9.6" />
<local:ElectionResult Year="2001" VotesMillions="8.4" />
<local:ElectionResult Year="2005" VotesMillions="8.8" />
<local:ElectionResult Year="2010" VotesMillions="10.7"/>
</local:PartyList>
<local:PartyList x:Key="LibDem">
<local:ElectionResult Year="1997" VotesMillions="5.2" />
<local:ElectionResult Year="2001" VotesMillions="4.8" />
<local:ElectionResult Year="2005" VotesMillions="6.0" />
<local:ElectionResult Year="2010" VotesMillions="6.8"/>
</local:PartyList>
<local:PartyList x:Key="Others">
<local:ElectionResult Year="1997" VotesMillions="2.9" />
<local:ElectionResult Year="2001" VotesMillions="2.5" />
<local:ElectionResult Year="2005" VotesMillions="2.8" />
<local:ElectionResult Year="2010" VotesMillions="3.5"/>
</local:PartyList>
I have a Collection where the fetched data from the service are stored,One thing I need to know how to bind those values with these hard coded values to plot the graph...
You might want to take a look at the following blog post as that explains in general terms how to bind data to a Visiblox Charts. In short, there's a few different options depending on at which level you're trying to do the binding but the BindableDataSeries is the basic building block.
http://www.visiblox.com/blog/2011/06/data-binding-with-visiblox-charts
[Disclaimer: I work for Visiblox]