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

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

4 Answers 89 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Unisense
Top achievements
Rank 1
Unisense asked on 06 Jan 2014, 10:51 AM
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

4 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 09 Jan 2014, 08:31 AM
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 >>
0
Unisense
Top achievements
Rank 1
answered on 10 Jan 2014, 08:59 AM
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


0
Unisense
Top achievements
Rank 1
answered on 13 Jan 2014, 09:39 AM
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
0
Unisense
Top achievements
Rank 1
answered on 13 Jan 2014, 10:38 AM
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
Tags
General Discussions
Asked by
Unisense
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Unisense
Top achievements
Rank 1
Share this question
or