Attaching a UIElement to the plot area

4 posts, 0 answers
  1. ma
    ma avatar
    2 posts
    Member since:
    Jun 2011

    Posted 29 Jun 2011 Link to this post

    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

  2. Georgi
    Admin
    Georgi avatar
    296 posts

    Posted 29 Jun 2011 Link to this post

    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>>
  3. DevCraft banner
  4. ma
    ma avatar
    2 posts
    Member since:
    Jun 2011

    Posted 29 Jun 2011 Link to this post

    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
     
  5. Georgi
    Admin
    Georgi avatar
    296 posts

    Posted 04 Jul 2011 Link to this post

    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>>
Back to Top