Hi Irene,
You should configure the scale to use Custom step for each row - the following configuration replicates your first case (when the date range is small):
NChart chart = nChartControl1.Charts[0];
NRangeTimelineScaleConfigurator rangeScale = new NRangeTimelineScaleConfigurator();
rangeScale.FirstRow.TickMode = TimelineScaleRowTickMode.Custom;
rangeScale.FirstRow.CustomStep = new NDateTimeSpan(1, NDateTimeUnit.Day);
rangeScale.SecondRow.TickMode = TimelineScaleRowTickMode.Custom;
rangeScale.SecondRow.CustomStep = new NDateTimeSpan(1, NDateTimeUnit.Month);
rangeScale.ThirdRow.TickMode = TimelineScaleRowTickMode.Custom;
rangeScale.ThirdRow.CustomStep = new NDateTimeSpan(1, NDateTimeUnit.Year);
NLineSeries line = new NLineSeries();
chart.Series.Add(line);
line.UseXValues = true;
line.DataLabelStyle.Visible = false;
DateTime current = DateTime.Now;
TimeSpan span = new TimeSpan(0, 4, 0, 0);
Random rand = new Random();
for (int i = 0; i < 100; i++)
{
line.Values.Add(rand.Next(100));
line.XValues.Add(current);
current += span;
}
For the second case you should simply set the visibility of the second and third rows to hidden:
rangeScale.FirstRow.Visible =
false;
rangeScale.SecondRow.Visible = false;
Hope this helps - let us know if you meet any problems or have any questions.
Best Regards,
Nevron Support Team