How to add vertical lines with labels

5 posts, 0 answers
  1. David
    David avatar
    22 posts
    Member since:
    Oct 2012

    Posted 17 Oct 2012 Link to this post

    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.
  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 18 Oct 2012 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 18 Oct 2012 Link to this post

    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.

  5. Sergio
    Sergio avatar
    5 posts
    Member since:
    Apr 2012

    Posted 19 Nov 2012 Link to this post

    Can I use the same for WP charts?
  6. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 20 Nov 2012 Link to this post

    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.

Back to Top
UI for WPF is Visual Studio 2017 Ready