How to plot rectangles that is not bound to the bottom of the x axis

5 posts, 0 answers
  1. Unisense
    Unisense avatar
    34 posts
    Member since:
    Sep 2012

    Posted 06 Jan 2014 Link to this post

    Hi,

    I have to plot some rectangles in for example a RadCartesianChart.

    I have tried to do it with the AreaSeries but when i do so all rectangle are bound to the x axis.

    I want to be able to plot Rectangles anywhere within the RadCartesianChart(see attached image).

    I hope you understand the problem :)

    Can i do this using the AreaSeries or should i do something else?

    Best Regards,
    Jeppe
  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 09 Jan 2014 Link to this post

    Hi Jeppe,

    I think that I understand your requirement and I am happy to inform you that there is straightforward way to achieve it. The RadChartView control supports annotations. I think this feature perfectly fits your custom scenario. Please take a look at our documentation and let us know if you need any further assistance.

    Regards,
    Pavel R. Pavlov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Unisense
    Unisense avatar
    34 posts
    Member since:
    Sep 2012

    Posted 10 Jan 2014 Link to this post

    Hi Pavel,

    Thanks for the reply, this looks great! My data is so that i have 4 datapoints, each with an x and y coordinate.
    These 4 datapoints creates the rectangle.
    I think that the CartesianMarkedZoneAnnotation would be the best solution in my case.
    Do you agree?

    Best regards,
    Jeppe


  5. Unisense
    Unisense avatar
    34 posts
    Member since:
    Sep 2012

    Posted 13 Jan 2014 Link to this post

    Hi Pavel,

    I have been having some trouble understanding the marked zone. I have tried the following:
    <telerik:RadCartesianChart x:Name="chart">
        <telerik:RadCartesianChart.VerticalAxis>
            <telerik:LinearAxis/>
        </telerik:RadCartesianChart.VerticalAxis>
     
        <telerik:RadCartesianChart.HorizontalAxis>
            <telerik:CategoricalAxis IsInverse="True"/>
            </telerik:RadCartesianChart.HorizontalAxis>
     
        <telerik:RadCartesianChart.Annotations>
            <telerik:CartesianMarkedZoneAnnotation HorizontalTo="2.75"
                                   VerticalFrom="0.5" VerticalTo="1"/>
        </telerik:RadCartesianChart.Annotations>
    </telerik:RadCartesianChart>

    Shouldnt the above code plot the same marked zone annotation as on the image(taken from telerik homepage) i have attached?
    I must have misunderstood how to use these markedzones.

    Best regards,
    Jeppe
  6. Unisense
    Unisense avatar
    34 posts
    Member since:
    Sep 2012

    Posted 13 Jan 2014 Link to this post

    Hi again,

    After some time i have figured out how to do it. Again, thx for the help. 

    Have a nice day! :)

    Best regards,
    Jeppe
Back to Top
UI for WPF is Visual Studio 2017 Ready