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

Possible To Offset Axis Labels?

1 Answer 95 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 22 Oct 2012, 03:44 PM
Hello,

I'm working with the asp.net RadChart, trying to more finely tune the displayed labels associated with a chart.

Specifically, I'd like to start the axis labels and ticks at a point not at the start of the data, or at 0. In the attached files, I have my current chart's axis (with RadChart) where the labels start at the minValue and end with the maxValue of the Axis.

Target.png represents what I'd like to see in the chart, with the label starting at a pre-defined point in the data. In this case, I'd like to start my labeling at July 1, 2010 instead of April 28, 2010 in the dataset.

Is there an easy way to do this?


Thanks,
Alex Bucevicius

1 Answer, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 24 Oct 2012, 08:37 AM
Hi Alex,

You can try to set the LayoutMode of the axis to Inside:
this.RadChart1.PlotArea.XAxis.LayoutMode = Telerik.Charting.Styles.ChartAxisLayoutMode.Inside;

Additionally you can put the X-axis into manual mode. Set it's AutoScale property to false and set whatever you need for min, max and step:
this.RadChart1.PlotArea.XAxis.AutoScale = false;
this.RadChart1.PlotArea.XAxis.AddRange(new DateTime(2012, 10, 24).ToOADate(), new DateTime(2012, 10, 30).ToOADate(), 1);

All the best,
Petar Marchev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Chart (Obsolete)
Asked by
Alex
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question
or