Horizontal Line Graph WPF

4 posts, 0 answers
  1. M
    M avatar
    2 posts
    Member since:
    Apr 2012

    Posted 05 Apr 2012 Link to this post

    Hello,

    I spent a bit of time trying to find out how to create a horizontal line graph using the WPF RadChart component, but couldn't find any leads.  Basically I need something like the 2nd graph shown in this link, but for WPF

    http://www.telerik.com/help/aspnet-ajax/radchart-types-line.html

    I want all the functionality of the X-Axis to be on the left, and the Y-Axis on the bottom, the X Axis represents an altitude, and the Y is readings at various altitudes.

    I figure there might be a boolean setting for this, but I'm not sure where to look, or if this is even possible.

    I can sort of fake it by plotting my X, Y points as Y, X, but then I'm missing out on some of the special features that are only available on the Y-axis, such as auto refitting when the user zoom in on the X-Axis.

    Any help would be appreciated!

  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 09 Apr 2012 Link to this post

    Hi,

    There is no feature for vertical line series in the RadChart control.

    I can suggest that you try out our new control - the RadChartView as it allows you to have this behavior. We have no demos for this currently and this is why I have attached a very simple app to get you started with vertical  line series.

    Greetings,
    Petar Marchev
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. M
    M avatar
    2 posts
    Member since:
    Apr 2012

    Posted 09 Apr 2012 Link to this post

    Thanks for the reply, I'll have to take a look at the RadChartView, I didn't go that route originally because it was unclear if it might be missing some functionality, such as sample, legends, and user interactivity (clicking points and changing the color of the points)

    One approach I was thinking of is to apply a rotation transform on the chartarea, not sure how well that would work out in the end though.

    Update:

    I just tried the rotate idea and it looks like it does what I need

    I added

    <telerikCharting:ChartArea.LayoutTransform>
     <RotateTransform Angle="90" CenterX="0.5" CenterY="0.5"/>
    </telerikCharting:ChartArea.LayoutTransform>

    and set the axis labels back with:

    <telerikCharting:AxisX IsInverse="True" LabelRotationAngle="-90" />
    <telerikCharting:AxisY IsInverse="True" LabelRotationAngle="-90" />


  5. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 11 Apr 2012 Link to this post

    Hello,

    1. The RadChartView and RadChart are different controls and there is no equivalent for each feature, but in general (as an answer to you inquiry):
    - the chart view has no built-in legend support
    - the chart view supports user interactivity (I have attached a somewhat simple app to demonstrate how you can react to clicking with the chart view)

    For a more detailed comparison see this link.

    2. I would generally not recommend that you use rotation, because the RadChart was not designed to support vertical line series and we can not predict what problems may occur.

    Kind regards,
    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top