Drawing Horizontal Line

4 posts, 1 answers
  1. Daní
    Daní avatar
    303 posts
    Member since:
    Feb 2008

    Posted 19 Jul 2009 Link to this post

    Hi,

    I'm using the RadChart with BarSeriesDefinition. I'd like to draw two horizontal lines that represent the desired rang of values. I've tried to add two LineSeries but the result it's not satisfying enough. These lines start at the middle of the first bar and end at the middle of the last bar but I'd like they extended along the x axis. Setting the XAxis LayoutMode property to Normal I get the desired result, but the first and last bar are cut. How can I solve this situation.

    Thanks.
  2. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 21 Jul 2009 Link to this post

    Hello Daní,

    You can try playing with the XValues of the line series so that you can force them to start a bit to the left of the bar and end a bit to the right. Also, setting AutoRange of the XAxis to false and manually selecting the min, max and step values can help with the adjustments.

    We have logged a new feature request for custom trendlines which will void the need to "hack" line series for such scenarios.

    We apologize for this inconvenience.

    Regards,
    Vladimir Milev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
  4. Daní
    Daní avatar
    303 posts
    Member since:
    Feb 2008

    Posted 21 Jul 2009 Link to this post

    Thanks Vladimir,

    Is the fisrt time I use the chart control so I'm a bit confused. In your post you said:
    "...You can try playing with the XValues of the line series so that you can force them to start a bit to the left of the bar and end a bit to the right."

    How can I do this?

    I've tried to add two "empty" points, one at the start and other at the end. The result is quite nice but, I'm getting an annoying label int he x axis with the record number. How I can avoid these labels?.

  5. Answer
    Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 22 Jul 2009 Link to this post

    Hi Daní,

    On the series definition of the line series, set ShowItemLabels=false. This should take care of the labels.

    Regards,
    Vladimir Milev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top