Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Modify <code>getGridData</code> to return <code>List&lt;Dictionary&lt;string, object&gt;&gt;</code> and ensure the numeric values are added the dictionary using a numeric type such as <code>int</code> or <code>double</code>.</p> <p><strong>Edit</strong></p> <p>It may be easier to use a concrete example, here is some test code:-</p> <pre><code>public partial class BubbleTest : UserControl { public BubbleTest() { InitializeComponent(); Loaded += new RoutedEventHandler(BubbleTest_Loaded); } void BubbleTest_Loaded(object sender, RoutedEventArgs e) { var s1 = new BubbleSeries(); s1.DependentValueBinding = new Binding("[dependent]"); s1.SizeValueBinding = new Binding("[size]"); s1.IndependentValueBinding = new Binding("[independent]"); s1.ItemsSource = GetGridData(); s1.Title = "Chart"; ChartVis.Series.Add(s1); } private List&lt;Dictionary&lt;string, object&gt;&gt; GetGridData() { List&lt;Dictionary&lt;string, object&gt;&gt; gridData = new List&lt;Dictionary&lt;string, object&gt;&gt;(); gridData.Add(CreateBubbleEntry("First", 10.0, 5.0)); gridData.Add(CreateBubbleEntry("Second", 20.0, 10.0)); return gridData; } private Dictionary&lt;string, object&gt; CreateBubbleEntry(string independent, double dependent, double size) { var item = new Dictionary&lt;string, object&gt;(); item.Add("independent", independent); item.Add("dependent", dependent); item.Add("size", size); return item; } } </code></pre> <p>The Xaml for this user control is as you have it:-</p> <pre><code>&lt;UserControl x:Class="SilverlightApplication1.BubbleTest" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" &gt; &lt;Grid x:Name="LayoutRoot" Background="White"&gt; &lt;toolkit:Chart Title="Visaulization" Grid.Column="0" x:Name="ChartVis"&gt; &lt;toolkit:Chart.Series&gt; &lt;/toolkit:Chart.Series&gt; &lt;/toolkit:Chart&gt; &lt;/Grid&gt; &lt;/UserControl&gt; </code></pre> <p>The above works so whatever you are actually doing will vary in some way.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload