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

Drawing Horizontal Line

3 Answers 142 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Daní
Top achievements
Rank 1
Daní asked on 20 Jul 2009, 01:52 AM
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.

3 Answers, 1 is accepted

Sort by
0
Vladimir Milev
Telerik team
answered on 21 Jul 2009, 07:30 AM
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.
0
Daní
Top achievements
Rank 1
answered on 21 Jul 2009, 09:10 AM
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?.

0
Accepted
Vladimir Milev
Telerik team
answered on 22 Jul 2009, 06:30 AM
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.
Tags
Chart
Asked by
Daní
Top achievements
Rank 1
Answers by
Vladimir Milev
Telerik team
Daní
Top achievements
Rank 1
Share this question
or