Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1084511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:34:14+00:00 2026-05-16T22:34:14+00:00

I am creating a BubbleSeries in a function within CS file. As a data

  • 0

I am creating a BubbleSeries in a function within CS file. As a data source I use a List<Dictionary<string,string>> GridData, Unfortunately my implementation throws an exception: No suitable axis is available for plotting the dependent value. I am SL4 newbie and I can not figure out what could be a reson. Here is how I create and add BubbleSeries to Chart:

 List<Dictionary<string,string>> GridData = getGridData();

  var s1   = new BubbleSeries();
  s1.DependentValueBinding = new Binding("[" + <key to numeric value in DataGrid> + "]");
  s1.SizeValueBinding = new Binding("[" + <key to numeric value in DataGrid> + "]");
  s1.IndependentValueBinding = new Binding("[" + <key to string value in DataGrid> + "]");
  s1.ItemsSource = GridData;
  s1.Title = "Chart";
  // add BubbleSeries to Chart
  ChartVis.Series.Add(s1);

Here is a full description of an error I got in runtime:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E)
Timestamp: Mon, 20 Sep 2010 07:09:33 UTC


Message: Unhandled Error in Silverlight Application 
Code: 4004    
Category: ManagedRuntimeError       
Message: System.InvalidOperationException: No suitable axis is available for plotting the dependent value.
   at System.Windows.Controls.DataVisualization.Charting.BubbleSeries.<>c__DisplayClass6.<GetAxes>b__3()
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeriesWithAxes.GetAxes(DataPoint firstDataPoint, Func`2 independentAxisPredicate, Func`1 independentAxisFactory, Func`2 dependentAxisPredicate, Func`1 dependentAxisFactory)
   at System.Windows.Controls.DataVisualization.Charting.BubbleSeries.GetAxes(DataPoint firstDataPoint)
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeriesWithAxes.GetAxes()
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeriesWithAxes.OnDataPointsChanged(IList`1 newDataPoints, IList`1 oldDataPoints)
   at System.Windows.Controls.DataVisualization.Charting.DataPointSingleSeriesWithAxes.OnDataPointsChanged(IList`1 newDataPoints, IList`1 oldDataPoints)
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeries.LoadDataPoints(IEnumerable newItems, IEnumerable oldItems)
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeries.Refresh()
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeries.OnSizeChanged(Object sender, SizeChangedEventArgs e)
   at System.Windows.FrameworkElement.OnSizeChanged(Object sender, SizeChangedEventArgs e)
   at MS.Internal.JoltHelper.RaiseEvent(IntPtr target, UInt32 eventId, IntPtr coreEventArgs, UInt32 eventArgsTypeIndex)     

Line: 56
Char: 13
Code: 0
URI: http://localhost:49402/MyTestPage.aspx

My chart implementation is:

  <toolkit:Chart Title="Visaulization" Grid.Column="0" x:Name="ChartVis">
                <toolkit:Chart.Series>
                </toolkit:Chart.Series>
 </toolkit:Chart>

UPDATE:
After changing the declaration of my dictionary to Dictionary<string,object>, and putting numeric values as doubles. I got this error:

Message: Unhandled Error in Silverlight Application 
Code: 4004    
Category: ManagedRuntimeError       
Message: System.InvalidOperationException: Assigned dependent axis cannot be used. This may be due to an unset Orientation property for the axis or a type mismatch between the values being plotted and those supported by the axis.
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeriesWithAxes.GetAxes(DataPoint firstDataPoint, Func`2 independentAxisPredicate, Func`1 independentAxisFactory, Func`2 dependentAxisPredicate, Func`1 dependentAxisFactory)
   at System.Windows.Controls.DataVisualization.Charting.BubbleSeries.GetAxes(DataPoint firstDataPoint)
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeriesWithAxes.GetAxes()
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeriesWithAxes.OnDataPointsChanged(IList`1 newDataPoints, IList`1 oldDataPoints)
   at System.Windows.Controls.DataVisualization.Charting.DataPointSingleSeriesWithAxes.OnDataPointsChanged(IList`1 newDataPoints, IList`1 oldDataPoints)
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeries.LoadDataPoints(IEnumerable newItems, IEnumerable oldItems)
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeries.Refresh()
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeries.OnSizeChanged(Object sender, SizeChangedEventArgs e)
   at System.Windows.FrameworkElement.OnSizeChanged(Object sender, SizeChangedEventArgs e)
   at MS.Internal.JoltHelper.RaiseEvent(IntPtr target, UInt32 eventId, IntPtr coreEventArgs, UInt32 eventArgsTypeIndex)     
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:34:15+00:00Added an answer on May 16, 2026 at 10:34 pm

    Modify getGridData to return List<Dictionary<string, object>> and ensure the numeric values are added the dictionary using a numeric type such as int or double.

    Edit

    It may be easier to use a concrete example, here is some test 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<Dictionary<string, object>> GetGridData()
        {
            List<Dictionary<string, object>> gridData = new List<Dictionary<string, object>>();
    
            gridData.Add(CreateBubbleEntry("First", 10.0, 5.0));
            gridData.Add(CreateBubbleEntry("Second", 20.0, 10.0));
    
            return gridData;
        }
    
        private Dictionary<string, object> CreateBubbleEntry(string independent, double dependent, double size)
        {
            var item = new Dictionary<string, object>();
            item.Add("independent", independent);
            item.Add("dependent", dependent);
            item.Add("size", size);
            return item;
        }
    }
    

    The Xaml for this user control is as you have it:-

    <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"
    >   
        <Grid x:Name="LayoutRoot" Background="White">
            <toolkit:Chart Title="Visaulization" Grid.Column="0" x:Name="ChartVis">
                <toolkit:Chart.Series>
                </toolkit:Chart.Series>
            </toolkit:Chart>
        </Grid>
    </UserControl>
    

    The above works so whatever you are actually doing will vary in some way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.