XAxisPlotBands for AxisTypes.Datetime

Dec 13, 2012 at 10:22 AM

Hi.

It is fantastic project.

Wanted to create a vertical PlotBands for Datetime xAxis and not able to do it.

I would expect it work like this:

.SetYAxis(new YAxis
{
    Title = new XAxisTitle { Text = "Number of development scope items" },
    Min = 0,
    MinorGridLineWidth = 0,
    GridLineWidth = 0
    PlotBands = new[]
        {
             new XAxisPlotBands
                 {
                     From =new DateTime(2012, 11, 17),
                     To = new DateTime(2013, 12, 17),
                     Color = ColorTranslator.FromHtml("#ECF7FB"),
                     Label = new XAxisPlotBandsLabel
                         {
                              Text = "Gentle breeze",
                              Style = "color:'#606060'"
                          }
                   }
         }
})            

but XAxisPlotBands.From and XAxisPlotBands.To expect to receive value of NUmber? and not DateTime.

Am I do this wrong, or the project does not support PlotBands fro DateTime?