Hi,
I am creating a bubble series. Bubbles created at the edge of the chart are getting chopped off as their midpoint is close to the chart boundaries and radius exceeds the avaliable space. How can I avoid this? Is there any property the control exposes to prevent this? Or if I could get the pixel -> radius scaling I could add some dummy points to avoid this. Ex. If radius is bound to dollar property, and if somehow I could know $100 = x pixel it would be helpful.
Hello,
Thank you for your post. I have been looking into your question and I can suggest using the MinimumValue and MaximumValue properties of the numeric x and y axes. You can handle the RangeChanged event of both axes and there you can set the MinimumValue and MaximumValue properties based on the Minimum and Maximum properties of the event args. You can increase the maximum and decrease the minimum. By doing so, the data points on the edges of chart will be rendered completely. I have created a sample application for you, that shows how you can implement this approach.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hi Krasimir,
Thank you for the quick response.I am sorry I forgot to mention I am using xamwebchart 10.3v built on sl4. I was not able to find NumericXAxis and NumericYAxis.
From your sample I can see that you have added/subtracted 10 from minimum and maximum. My problem is my data is very dynamic. It is based on user selection. User can select the properties x-axis and y-axis are bound to. For a certain selection my x-axis might range from 1 to 10. For some other selection it might range from 1-100. The problem is when the range is from 1-10 adding/subtracting 10 from the min and max x-axis value would result in a lot of empty space on the chart. What would help is if I could somehow determine the (minmum value + some buffer) value that I can add to make the x-axis limits just large enough to view the entire bubble.
Thank you for your email and the clarification on the matter. After further investigation, I can suggest using the Minimum, Maximum and Unit properties of the axes of the chart and bind them to your ViewModel. You can create properties in you view model and bound the m to the Minimum, Maximum and Unit properties of the axes. When your data is updated, you can update those properties and by doing so, the ranges of the axes will change. I have created a sample application for you, that shows how you can implement this approach.
Thanks Krasimir,
Here is the sample data that you have provided in the attached sample :-
Data = new List<Data> { new Data { X = 2, Y = 1, R = 3 }, new Data { X = 4, Y = 2, R = 5 }, new Data { X = 6, Y = 3, R = 1 }, new Data { X = 8, Y = 4, R = 3 }, new Data { X = 10, Y = 5, R = 1 }, }; MinX = 0; MaxX = 12; UnitX = 4; MinY = 0; MaxY = 6; UnitY = 2;
How did you derive values for MinX,MaxX,MinY, and MaxY? If I had to write code that adjusts all these min/max values according to data, is there a formula for that?
Hello rdraisinghani,
Please feel free to let us know if you still have any other questions with this matter.
Thanks.
Thank you for your reply. I have looked through it and the approach I have suggested was meant for showing how you can bind the properties of the axes of the XamWebChart to your ViewModel. The way that the properties of your view model are calculated, depends of your data and you should implement the calculation, based on your scenario.