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

RadChart axis alignment

2 Answers 112 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 1
Bill asked on 29 Nov 2010, 07:37 PM
Hi,

I am using RadChart version 2010.2.929.35 . Here is what I would like to accomplish:
I would like to create a scatter plot with a fixed min and max for the X-axis and Y-axis. In this case i want the min/max to be -3/3. The ChartSeriesType that I am using is Point with the following settings:

PlotArea-XAxis-MaxValue=3
PlotArea-XAxis-MinValue=-3
PlotArea-YAxis-MaxValue=3
PlotArea-YAxis-MinValue=-3
PlotArea-XAxis-AutoScale=false
PlotArea-YAxis-AutoScale=false

When the chart gets rendered on my page, the Y-axis display correctly with the min value at the bottom and the max value at the top. For the X-Axis, there seems to be a padding for the min and max. Please see the attached image for refference.

So the question is:
1) Is there a way to force the X-axis to display the min value at the far left and the max value at the far right with out any padding?
2) Also, how can I get rid of the gap to the right of the chart?

Thanks,
Vuthy

2 Answers, 1 is accepted

Sort by
0
Accepted
Evgenia
Telerik team
answered on 02 Dec 2010, 02:37 PM
Hi Vuthy,

1)  You can force the XAxis minvalue and maxvalue to be shown in the far left and right accordingly by setting the AxisX.LayoutMode to Normal like this:
RadChart2.PlotArea.XAxis.LayoutMode = Telerik.Charting.Styles.ChartAxisLayoutMode.Normal;
You can find more information about this property here - http://www.telerik.com/help/aspnet-ajax/understandingelementsmarks.html.

2) The gap in the right appears because you made Legend invisible but RadChart has default Paddings and Margins set by default which may differ in different skins. You can find more information about Paddings and Margins in our help topic -  http://www.telerik.com/help/aspnet-ajax/understandingelementsmargins.html.Anyway to remove this gap in Default skin you should set the Right Margin to 5% for example:
<Appearance Dimensions-Margins="18%, 5%, 12%, 10%">

Kind regards,
Evgenia
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Bill
Top achievements
Rank 1
answered on 03 Dec 2010, 04:26 PM
Hi Evgenia ,

Thank you very much!  This is exactly what I was looking for!

Vuthy
Tags
Chart (Obsolete)
Asked by
Bill
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Bill
Top achievements
Rank 1
Share this question
or