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

Line graph cut off at ends

5 Answers 260 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 26 Jul 2012, 08:19 AM
I am working with the Silverlight reporting framework (Q2 2011) and I am having some trouble with the Y-axis scaling of the attached graph.

I'm basically drawing various lines of best fit on the graph and the y-axis is representing a % value. However if a line is starting or ending at 0 or 100 % the ends of the line are cut off, so the line end markers are not properly visible.

Is it possible to extend the plot area beyond the ends of the axis somehow just enough to see these ends properly? 

I am fairly new to the reporting side of Telerik Silverlight and it may be that I am missing something obvious, but any help would be appreciated!

Thanks.

5 Answers, 1 is accepted

Sort by
0
Elian
Telerik team
answered on 30 Jul 2012, 11:40 AM
Hello Adam,

Since your graph shows % values if they are always 0-100, you can disable the AutoScale property of the YAxis and manually enter the values for the Axis. From the Chart properties go under PlotArea -> YAxis -> AutoScale = False. Then under the same area you can specify MinValue MaxValue and Step, which will determine the range and the count of the labels on the axis. For e.g. 
MinValue = -10
MaxValue = 110
Step = 10

will leave some space on both sides.

Greetings,
Elian
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Adam
Top achievements
Rank 1
answered on 30 Jul 2012, 01:52 PM
Hi,

Thanks, that makes sense. The only thing is I don't really want my graph to start at -10 as that would look a bit strange - the scale is representing percentages.

I appreciate 0 is at the bottom and so there's not much I can do about that without making the Y-axis start at an earlier value but I was hoping as the graph appears open a the top that it would not cut off the points there, even though lines do end at the highest y-axis value.

Does that make sense? The bottom value is restricted by the x-axis but the top of the graph is open so it looks a bit strange that the lines are cut off when there is nothing apparently stopping them?

Regards,
Adam.
0
Steve
Telerik team
answered on 30 Jul 2012, 02:08 PM
Hi Adam,

For the top of the YAxis, you can set the AxisMode property to Extended, which should take care of the cutting.

All the best,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Adam
Top achievements
Rank 1
answered on 31 Jul 2012, 08:10 AM
Unfortunately setting that option didn't seem to make any difference, the lines are still being cut at the top of the graph. Is there anything else that could prevent that property from being applied? I've tried changing margins and sizes and everything I can think of but none have any effect on the top of the graph.

Thanks again.
0
Accepted
Steve
Telerik team
answered on 31 Jul 2012, 08:20 AM
Hello Adam,

The AxisMode property would affect the height of the YAxis i.e. when set to Extended, it would be increased, so the max value is no longer 100. In this case, the end marker would not be cut off and we have verified this behavior locally. Additionally if you're only concerned about the top cap, you can still use the approach my colleague suggested, by applying MinValue=0, so that you do not get your graph starting at -10.

Greetings,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

Tags
General Discussions
Asked by
Adam
Top achievements
Rank 1
Answers by
Elian
Telerik team
Adam
Top achievements
Rank 1
Steve
Telerik team
Share this question
or