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

How to add vertical lines with labels

4 Answers 490 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 17 Oct 2012, 04:06 PM
Hi,

I need to draw a vertical line when in particular mode in my application on my ChartView.  The line would go from the X-Axis up to the the top of the chart grid area.  Also I need to add a label near the line which would report out in live time the value (Y-Axis) of the current channel (X-axis value), see Image1.png.  I would like the line to be visible if zoomed in on that area of the chart.  Please provide code snipet of how to add such overlays/labels to the chartview (don't know the exact terminology for this control).

Also is there a built-in way to zoom out of the chart?  It's very easy to zoom-in, but I would also think that there would be a way to zoom out, or does this have to be manually programmed?  If it has to be manually programmed, is there any way to catch the zoom event so I could try to over-ride  a uppper-left to lower-right zoombox to make this zoom out to the default zoom?

Also is there way built-in to pan over the chart with the mouse, or are using scrollbars the only way?

If there are samples that have been written please share, or point me towards them

Thanks!


P.S. - These are the final few items of evaluation before I give the recomendation for my company to buy the WPF suite of controls.

4 Answers, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 18 Oct 2012, 01:12 PM
Hi David,

With the new Q3 release the RadChartView introduced Annotations (check example here) and you can achieve the described scenario with the annotations. I have also attached a simple project to give you a jump start.

Regards,
Petar Marchev
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Petar Marchev
Telerik team
answered on 18 Oct 2012, 02:02 PM
Hello David,

I apologize for this second response, I forgot to answer your other questions in my previous post.

Is there a built-in way to zoom out of the chart?
Unfortunately there is no out-of-the-box feature that lest you do this. We usually suggest that you place a Button ("Zoom Out") somewhere on top of (or by) the chart and in the Click handler of the button set the Zoom of the chart to (1, 1).

Also is there way built-in to pan over the chart with the mouse
Currently you can only pan with the Slider or if you set the PanOffset property through code. Right now there is no out-of-the-box feature that lets you grab the chart area and pan the chart.

Let me know if you have any other inquiries.

Greetings,
Petar Marchev
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Sergio
Top achievements
Rank 1
answered on 19 Nov 2012, 06:10 AM
Can I use the same for WP charts?
0
Victor
Telerik team
answered on 20 Nov 2012, 08:11 AM
Hello Sergio,

Thanks for writing.
Please have a look at this help article. It explains how to use the chart pan and zoom behavior. For further questions about our Windows Phone controls, please post them in the windows phone forum. 

Thanks for understanding.

Greetings,
Victor
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ChartView
Asked by
David
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Sergio
Top achievements
Rank 1
Victor
Telerik team
Share this question
or