How to control point height and width in databound bubble chart

3 posts, 0 answers
  1. andre king
    andre king avatar
    9 posts
    Member since:
    Sep 2009

    Posted 06 Dec 2010 Link to this post

    Hi, I am trying to create a bubble chart where the height and width of the ellipse is bound to my data. The end result I want will look something like the example for the asp control :
    I am binding the collection of collections (more than one series) to the ItemsSource property on the chart.
    I would like to map the Xvalue2 and Yvalue2 properties in the same way I am mapping the XValue and YValue:
    SeriesMapping seriesMapping = new SeriesMapping();
    seriesMapping.CollectionIndex = collectionIndex;
    seriesMapping.ItemMappings.Add(new ItemMapping("X", DataPointMember.XValue));
    seriesMapping.ItemMappings.Add(new ItemMapping("Y", DataPointMember.YValue));
    // Would like to do the following but not in enum:
    seriesMapping.ItemMappings.Add(new ItemMapping("X2", DataPointMember.XValue2));
    seriesMapping.ItemMappings.Add(new ItemMapping("Y2", DataPointMember.YValue2));
    I have tried changing the template and binding the ellipse properties myself, but ran into issues with placement of the ellipse (could not set Canvas.Top easily so that the ellipse was centered on x,y, see: ). I also looked at this forum post: but that required the code behind to loop through each point and resize it to match the chart scale. 
    Can you please advise the best way to do this?
  2. andre king
    andre king avatar
    9 posts
    Member since:
    Sep 2009

    Posted 06 Dec 2010 Link to this post

    I was able to get this working using the second example (
    I avoided the loop over the points to map to visual coordinates by including a visual to data ratio and setting it in the resize event handler. Then binding to a property that converted the data value to a visual one.
    Is there any plan to include ellipses in the bubble chart in the future?
  3. Ves
    Ves avatar
    2927 posts

    Posted 09 Dec 2010 Link to this post

    Hello Adre,

    Elliptic bubbles are not present in our immediate plans. Still, I hope this implementation meets your needs.

    Best regards,
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
Back to Top