This is a migrated thread and some comments may be shown as answers.

How to control point height and width in databound bubble chart

2 Answers 83 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
andre king
Top achievements
Rank 1
andre king asked on 06 Dec 2010, 09:03 PM
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 : http://demos.mcmscontrols.com/aspnet/Chart/Examples/ChartTypes/Bubble/DefaultVB.aspx
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: http://www.telerik.com/community/forums/silverlight/chart/stly-for-scatter-chart.aspx ). I also looked at this forum post: http://www.telerik.com/community/forums/silverlight/chart/change-properties-of-a-point-in-chart.aspx 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 Answers, 1 is accepted

Sort by
0
andre king
Top achievements
Rank 1
answered on 06 Dec 2010, 11:22 PM
I was able to get this working using the second example (http://www.telerik.com/community/forums/silverlight/chart/change-properties-of-a-point-in-chart.aspx).
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?
0
Ves
Telerik team
answered on 09 Dec 2010, 02:58 PM
Hello Adre,

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

Best regards,
Ves
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
Chart
Asked by
andre king
Top achievements
Rank 1
Answers by
andre king
Top achievements
Rank 1
Ves
Telerik team
Share this question
or