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

Attaching a UIElement to the plot area

3 Answers 112 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.
ma
Top achievements
Rank 1
ma asked on 29 Jun 2011, 02:55 PM
Hi,
Is there anyway to add a UIElement to the chart plot area.  At the moment I have 5
line series and just need to add an ellipse at a specific point within the plot area

i.e show something at x=11, y=79 as shown in the attached png

Thanks
Mark

3 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 29 Jun 2011, 04:02 PM
Hi ma,

Thanks for your interest in RadChart for Windows Phone 7.

The only possible ways to add visuals to the plot area is either to derive from RadChart and to use its protected RenderSurface property (of type Canvas) or to change its control template. Changing the control template however may result in some performance hits and/or instability. As of Q2 2011 BETA2 (expected in a day or two) we have added an additional Adorner layer, which is currently used to display interactivity visuals like tooltips and trackball lines and information. We may consider making this adorner layer public for the official Q2 2011 release (expected by mid July) so that you can add arbitrary visuals over the plot area.

You may do another easy trick by simply positioning the chart in a grid panel and arranging the desired visuals over it within the layout container.

I hope this information is useful. Do not hesitate to write us back if you have other questions and/or problems with our components.

All the best,
Georgi
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
ma
Top achievements
Rank 1
answered on 29 Jun 2011, 04:37 PM
Hi Georgi,
Thanks for the quick reply, but what you suggested doesn't really sound ideal, especially if the control might become unstable.
It doesn't necessarily have to be a UIElement that is added to the plot, as long as I can add just one X/Y co-ordinate to the chart and get it to show up then that would also be fine.

I had another look at the documenation and saw that there was a SingleValueDataPoint  class, although from just reading
the current documentation it wasn't clear how to use this.  Could this class be used to show a single point?

Thanks
Mark
 
0
Georgi
Telerik team
answered on 04 Jul 2011, 08:25 AM
Hi Ma,

Thanks for getting back to me.

The DataPoint hierarchy is an abstract logical layer, used to describe the plotted data. As of Beta2 there are two distinct data point types, used to visualize particular series. The CategoricalDataPoint (derives from SingleValueDataPoint) is used to visualize CategoricalSeries - these are series that require a Linear and a Categorical axes to be properly plotted. The ScatterDataPoint is used to visualize ScatterSeries - these are series that may be plotted by two linear axes. So, a DataPoint instance is not a Silverlight visual but rather a model within the chart.

You may visualize a data point within the plot area using the PointTemplate, PointTemplates (index-based collection of templates) or PointTemplateSelector properties to apply the desired template. You may find some hints about these properties practical usage in our Examples Application. Still, the template will be visualized within the layout slot the data point occupies.

As I mentioned in my previous post, you may achieve the desired layout by overlapping the chart with some visuals. Please, feel free to open a support ticket and to attach a sample project demonstrating your scenario and I will do my best to help with some hints.

Best wishes,
Georgi
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
Chart
Asked by
ma
Top achievements
Rank 1
Answers by
Georgi
Telerik team
ma
Top achievements
Rank 1
Share this question
or