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
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 >
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.
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 >
Thanks again.
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 >