Since the DateTime-s on the XAxis are presented as doubles (using its OLE Automation equivalent - ToOADate() method), you may set this double as starting point for your marked zone. Here's an example:
data.Add(new ChartData() { Date = DateTime.Today, YValue = 21 });
data.Add(new ChartData() { Date = DateTime.Today.AddDays(1), YValue = 11 });
data.Add(new ChartData() { Date = DateTime.Today.AddDays(2), YValue = 15 });
data.Add(new ChartData() { Date = DateTime.Today.AddDays(3), YValue = 17 });
data.Add(new ChartData() { Date = DateTime.Today.AddDays(4), YValue = 19 });
return data;
}
public class ChartData
{
public double OADate
{
get
{
return this.Date.ToOADate();
}
}
public DateTime Date
{
get;
set;
}
public double YValue
{
get;
set;
}
}
Greetings,
Evgenia
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.