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

[Solved] Adding a custom vertical rule?

2 Answers 109 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.
Alastair
Top achievements
Rank 1
Alastair asked on 06 Dec 2010, 06:13 AM
Hi,

We are looking to use the Silverlight RadChart in place of old ActiveX controls for display large line datasets (100,000+ points). Part of this upgrade is to replicate as much of the ActiveX controls as possible. So far, using the trials, we are very impressed with the default options and functionality of the RadCharts, but we have a major requirement to replicate that doesn't seem to be part of the default options/code.

We require some kind of vertical rule. Being able to drag/add a vertical line that shows the y-values for each series at the particular x-value. I've investigated the documentation and it seems that the ChartExtensions might be something that  I could implement, but I was unable to work out how to add custom user controls over the top of the chart itself.

This allows our customers to compare values of different series at a the same x value.

Is there some code or a prebuilt way this can replicate this behaviour?

Cheers,
Alastair

2 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 08 Dec 2010, 03:51 PM
Hi Alastair,

Here is a suggestion that should get you started with this task. You can wrap the chart within a Canvas and handle Canvas.MouseLeftButtonUp event. Its event args will provide the coordinates of the point clicked, so that you can draw a vertical line -- within the canvas, on top of the chart. In addition, you can subscribe to ChartArea.PlotAraeMouseLeftButtonUp event. Its event arguments (PlotAreaMouseEventArgs) will hold the XValue and YValue of the point clicked. Having the  XValue should allow you to look into the ChartSeries and find the corresponding YValues for each series.

Best regards,
Ves
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Alastair
Top achievements
Rank 1
answered on 13 Dec 2010, 01:39 AM
Thanks Ves,

I shall have a go and see what I can work out.

Cheers,
Alastair
Tags
Chart
Asked by
Alastair
Top achievements
Rank 1
Answers by
Ves
Telerik team
Alastair
Top achievements
Rank 1
Share this question
or